summaryrefslogtreecommitdiff
path: root/src/gui/editor.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-08-27 09:47:29 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-08-27 10:07:59 (GMT)
commitacd37cbf8578686d2e5bae64b6b4eb6d2bc5376b (patch)
treec3ec34400c422ccd3e0f122ae6c0ec7ea67e37de /src/gui/editor.c
parent8ca477e012b11a19363542d171b8e973d637641c (diff)
Deleted the reference to the main window in all panels.
Diffstat (limited to 'src/gui/editor.c')
-rw-r--r--src/gui/editor.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/editor.c b/src/gui/editor.c
index a3055c7..d44d2af 100644
--- a/src/gui/editor.c
+++ b/src/gui/editor.c
@@ -286,6 +286,8 @@ GtkWidget *create_editor(void)
gtk_container_set_border_width(GTK_CONTAINER(result), 4);
gtk_window_set_title(GTK_WINDOW(result), _("Chrysalide"));
+ set_editor_window(GTK_WINDOW(result));
+
g_generic_config_get_value(get_main_configuration(), MPK_TITLE_BAR, &hide);
gtk_window_set_hide_titlebar_when_maximized(GTK_WINDOW(result), hide);
@@ -345,7 +347,7 @@ GtkWidget *create_editor(void)
//_support = init_panels2(G_CALLBACK(on_dock_item_switch), ref);
gtk_box_pack_start(GTK_BOX(vbox1), _support, TRUE, TRUE, 0);
- /* ... = */load_all_gui_components(ref);
+ /* ... = */load_all_gui_components();
} while(0);
@@ -1379,7 +1381,8 @@ static void on_dock_item_switch(GtkDockStation *station, GtkWidget *widget, gpoi
else
g_object_unref(G_OBJECT(binary));
- g_object_unref(G_OBJECT(old_binary));
+ if (old_binary != NULL)
+ g_object_unref(G_OBJECT(old_binary));
g_object_ref(G_OBJECT(widget));
change_editor_items_current_view(GTK_DISPLAY_PANEL(widget));