diff options
Diffstat (limited to 'src/gui/panels')
-rw-r--r-- | src/gui/panels/strings.c | 8 | ||||
-rw-r--r-- | src/gui/panels/welcome.c | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/panels/strings.c b/src/gui/panels/strings.c index 7fd0ffc..a99b40c 100644 --- a/src/gui/panels/strings.c +++ b/src/gui/panels/strings.c @@ -1269,7 +1269,7 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa const mrange_t *range; /* Couverture en mémoire */ GArchProcessor *proc; /* Processeur de l'architecture*/ GArchInstruction *instr; /* Point de croisements */ - GObject *ref; /* Espace de référencements */ + GtkWindow *editor; /* Fenêtre graphique principale*/ GtkWidget *dialog; /* Boîte de dialogue à montrer */ vmpa2t *addr; /* Adresse de destination */ GLoadedPanel *display; /* Afficheur effectif de code */ @@ -1287,9 +1287,9 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa */ instr = g_arch_processor_find_instr_by_address(proc, get_mrange_addr(range)); - ref = G_OBJECT(get_editor_window());//g_editor_item_get_global_ref(G_EDITOR_ITEM(panel)); + editor = get_editor_window(); - dialog = create_gotox_dialog_for_cross_references(GTK_WINDOW(ref), panel->binary, instr, true); + dialog = create_gotox_dialog_for_cross_references(editor, panel->binary, instr, true); if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) { @@ -1308,6 +1308,8 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa gtk_widget_destroy(dialog); + g_object_unref(G_OBJECT(editor)); + if (instr != NULL) g_object_unref(G_OBJECT(instr)); diff --git a/src/gui/panels/welcome.c b/src/gui/panels/welcome.c index 6812125..63811a9 100644 --- a/src/gui/panels/welcome.c +++ b/src/gui/panels/welcome.c @@ -463,10 +463,12 @@ static void on_new_binary_clicked(GtkButton *button, GWelcomePanel *panel) GObject *ref; /* Espace de référencements */ GtkMenuItem *item; /* Elément de menu simulé */ - ref = G_OBJECT(get_editor_window());//g_editor_item_get_global_ref(G_EDITOR_ITEM(panel)); + ref = G_OBJECT(get_editor_window()); item = GTK_MENU_ITEM(g_object_get_data(ref, "mnu_project_add_binary")); + g_object_unref(ref); + gtk_menu_item_activate(item); } |