summaryrefslogtreecommitdiff
path: root/plugins/ropgadgets
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-11-28 18:09:57 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-11-28 18:09:57 (GMT)
commit43c13d32ebaec164879dfadcdf2e341fbce26887 (patch)
treee1635df0f2aaedc7443837b67b6ccbefbea32a6b /plugins/ropgadgets
parent701e2be310a2cc708ac9d319d1366e821f58486c (diff)
Unblocked access to the ROP tool pages.
Diffstat (limited to 'plugins/ropgadgets')
-rw-r--r--plugins/ropgadgets/select.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/plugins/ropgadgets/select.c b/plugins/ropgadgets/select.c
index ea679bb..019855b 100644
--- a/plugins/ropgadgets/select.c
+++ b/plugins/ropgadgets/select.c
@@ -80,7 +80,7 @@ static void rop_finder_assistant_prepare(GtkAssistant *, GtkWidget *, GObject *)
static void register_input_output_panel(GtkAssistant *, GObject *);
/* Construit la sélection d'un binaire déjà chargé. */
-static GtkWidget *load_and_populate_current_project_binaries(GObject *);
+static GtkWidget *load_and_populate_current_project_binaries(GObject *, gint *);
/* Réagit à un changement de sélection du binaire d'entrée. */
static void on_loaded_binary_selection_change(GtkComboBox *, GObject *);
@@ -388,6 +388,7 @@ static void register_input_output_panel(GtkAssistant *assistant, GObject *ref)
GtkWidget *vbox; /* Support principal */
GtkWidget *frame; /* Support avec encadrement */
GtkWidget *sub_vbox; /* Division verticale */
+ gint selected; /* Indice à sélectionner */
GtkWidget *combobox; /* Sélection du binaire interne*/
GtkWidget *sub_hbox; /* Division horizontale */
GtkWidget *entry; /* Zone de saisie de texte */
@@ -405,7 +406,7 @@ static void register_input_output_panel(GtkAssistant *assistant, GObject *ref)
frame = qck_create_frame(_("<b>Input binary</b>"), sub_vbox, 0, 0, 12, 8);
gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, TRUE, 0);
- combobox = load_and_populate_current_project_binaries(ref);
+ combobox = load_and_populate_current_project_binaries(ref, &selected);
gtk_box_pack_start(GTK_BOX(sub_vbox), combobox, TRUE, TRUE, 0);
/* Fichier de sortie */
@@ -445,12 +446,15 @@ static void register_input_output_panel(GtkAssistant *assistant, GObject *ref)
gtk_assistant_set_page_title(assistant, vbox, _("Input / output"));
gtk_assistant_set_page_type(assistant, vbox, GTK_ASSISTANT_PAGE_INTRO);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), selected);
+
}
/******************************************************************************
* *
-* Paramètres : ref = espace de référencements inter-panneaux. *
+* Paramètres : ref = espace de référencements inter-panneaux. *
+* selected = éventuel indice de binaire à sélectionner. [OUT] *
* *
* Description : Construit la sélection d'un binaire déjà chargé. *
* *
@@ -460,12 +464,11 @@ static void register_input_output_panel(GtkAssistant *assistant, GObject *ref)
* *
******************************************************************************/
-static GtkWidget *load_and_populate_current_project_binaries(GObject *ref)
+static GtkWidget *load_and_populate_current_project_binaries(GObject *ref, gint *selected)
{
GtkWidget *result; /* Composant à retourner */
GStudyProject *project; /* Projet courant */
GLoadedContent *current; /* Contenu actif courant */
- gint selected; /* Indice à sélectionner */
GtkListStore *store; /* Modèle de gestion en liste */
GLoadedContent **contents; /* Liste de contenus chargés */
size_t count; /* Taille de cette liste */
@@ -482,7 +485,7 @@ static GtkWidget *load_and_populate_current_project_binaries(GObject *ref)
/* Constitution d'une liste de binaires courants */
- selected = -1;
+ *selected = -1;
store = gtk_list_store_new(CPB_COUNT, G_TYPE_OBJECT, G_TYPE_STRING);
@@ -503,7 +506,7 @@ static GtkWidget *load_and_populate_current_project_binaries(GObject *ref)
-1);
if (binary == (GLoadedBinary *)current)
- selected = i;
+ *selected = i;
}
@@ -524,8 +527,6 @@ static GtkWidget *load_and_populate_current_project_binaries(GObject *ref)
gtk_widget_show(result);
- gtk_combo_box_set_active(GTK_COMBO_BOX(result), selected);
-
renderer = gtk_cell_renderer_text_new();
gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(result), renderer, TRUE);
gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(result), renderer,