summaryrefslogtreecommitdiff
path: root/src/gui/menus/binary.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-06-24 19:16:23 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-06-24 19:16:23 (GMT)
commitd614d4b09230411455ed07aac289025a55633da8 (patch)
treec94a14097f9e97b21e5780852589d167ca68ba59 /src/gui/menus/binary.c
parentafc9e5510d9520928480042a56a193dd71db6a01 (diff)
Referenced all accesses to the main window.
Diffstat (limited to 'src/gui/menus/binary.c')
-rw-r--r--src/gui/menus/binary.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/src/gui/menus/binary.c b/src/gui/menus/binary.c
index 3a143da..cb131d7 100644
--- a/src/gui/menus/binary.c
+++ b/src/gui/menus/binary.c
@@ -212,13 +212,16 @@ void update_access_for_view_in_menu_binary(GLoadedPanel *new)
static void mcb_binary_entry_points(GtkMenuItem *menuitem, GMenuBar *bar)
{
GLoadedBinary *binary; /* Binaire présenté à l'écran */
+ GtkWindow *editor; /* Fenêtre graphique principale*/
GtkWidget *dialog; /* Boîte de dialogue à montrer */
vmpa2t *addr; /* Adresse de destination */
GLoadedPanel *panel; /* Afficheur effectif de code */
binary = G_LOADED_BINARY(get_current_content());
- dialog = create_gotox_dialog_for_entry_points(get_editor_window(), binary);
+ editor = get_editor_window();
+
+ dialog = create_gotox_dialog_for_entry_points(editor, binary);
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK)
{
@@ -237,6 +240,8 @@ static void mcb_binary_entry_points(GtkMenuItem *menuitem, GMenuBar *bar)
gtk_widget_destroy(dialog);
+ g_object_unref(G_OBJECT(editor));
+
g_object_unref(G_OBJECT(binary));
}
@@ -278,12 +283,15 @@ static void mcb_binary_storage(GtkMenuItem *menuitem, GMenuBar *bar)
{
GLoadedBinary *binary; /* Edition courante */
GtkBuilder *builder; /* Constructeur utilisé */
+ GtkWindow *editor; /* Fenêtre graphique principale*/
GtkWidget *dialog; /* Boîte de dialogue à montrer */
gint ret; /* Retour de confirmation */
binary = G_LOADED_BINARY(get_current_content());
- dialog = create_storage_dialog(binary, get_editor_window(), &builder);
+ editor = get_editor_window();
+
+ dialog = create_storage_dialog(binary, editor, &builder);
ret = gtk_dialog_run(GTK_DIALOG(dialog));
@@ -294,6 +302,8 @@ static void mcb_binary_storage(GtkMenuItem *menuitem, GMenuBar *bar)
g_object_unref(G_OBJECT(builder));
+ g_object_unref(G_OBJECT(editor));
+
g_object_unref(G_OBJECT(binary));
}
@@ -315,10 +325,15 @@ static void mcb_binary_storage(GtkMenuItem *menuitem, GMenuBar *bar)
static void mcb_binary_export_disass(GtkMenuItem *menuitem, gpointer unused)
{
GLoadedBinary *binary; /* Edition courante */
+ GtkWindow *editor; /* Fenêtre graphique principale*/
binary = G_LOADED_BINARY(get_current_content());
- run_export_assistant(binary, get_editor_window());
+ editor = get_editor_window();
+
+ run_export_assistant(binary, editor);
+
+ g_object_unref(G_OBJECT(editor));
g_object_unref(G_OBJECT(binary));
@@ -342,12 +357,17 @@ static void mcb_binary_export_graph(GtkMenuItem *menuitem, gpointer unused)
{
GtkGraphDisplay *panel; /* Panneau de code courant */
GLoadedBinary *binary; /* Edition courante */
+ GtkWindow *editor; /* Fenêtre graphique principale*/
binary = G_LOADED_BINARY(get_current_content());
panel = GTK_GRAPH_DISPLAY(get_current_view());
- run_graph_export_assistant(binary, panel, get_editor_window());
+ editor = get_editor_window();
+
+ run_graph_export_assistant(binary, panel, editor);
+
+ g_object_unref(G_OBJECT(editor));
g_object_unref(G_OBJECT(panel));