summaryrefslogtreecommitdiff
path: root/src/gui/editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/editor.c')
-rw-r--r--src/gui/editor.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/gui/editor.c b/src/gui/editor.c
index d63b3a9..3b8497c 100644
--- a/src/gui/editor.c
+++ b/src/gui/editor.c
@@ -389,7 +389,8 @@ GtkWidget *create_editor(void)
register_project_change_notification(notify_editor_project_change);
- change_editor_items_current_binary(NULL);
+ change_editor_items_current_content(NULL);
+ change_editor_items_current_view(NULL);
@@ -1374,8 +1375,8 @@ void on_panel_item_undock_request(GPanelItem *panel, gpointer unused)
static void on_dock_item_switch(GtkDockStation *station, GtkWidget *widget, gpointer unused)
{
- GLoadedBinary *old_binary; /* Ancien binaire édité */
- GLoadedBinary *binary; /* Binaire en cours d'édition */
+ GLoadedPanel *panel; /* Vue du contenu chargé */
+ GLoadedContent *content; /* Contenu en cours d'édition */
if (GTK_IS_SCROLLED_WINDOW(widget))
widget = gtk_bin_get_child(GTK_BIN(widget));
@@ -1383,23 +1384,17 @@ static void on_dock_item_switch(GtkDockStation *station, GtkWidget *widget, gpoi
if (GTK_IS_VIEWPORT(widget))
widget = gtk_bin_get_child(GTK_BIN(widget));
- if (GTK_IS_DISPLAY_PANEL(widget))
+ if (G_IS_LOADED_PANEL(widget))
{
- /* Changement de binaire ? */
+ panel = G_LOADED_PANEL(widget);
- old_binary = get_current_binary();
- binary = gtk_display_panel_get_binary(GTK_DISPLAY_PANEL(widget));
+ content = g_loaded_panel_get_content(panel);
- if (old_binary != binary)
- change_editor_items_current_binary(binary);
- else
- g_object_unref(G_OBJECT(binary));
+ change_editor_items_current_content(content);
- if (old_binary != NULL)
- g_object_unref(G_OBJECT(old_binary));
+ g_object_unref(G_OBJECT(content));
- g_object_ref(G_OBJECT(widget));
- change_editor_items_current_view(G_LOADED_PANEL(widget));
+ change_editor_items_current_view(panel);
}