summaryrefslogtreecommitdiff
path: root/src/gui/menus
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/menus')
-rw-r--r--src/gui/menus/view.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gui/menus/view.c b/src/gui/menus/view.c
index 0bcc2fe..511d9db 100644
--- a/src/gui/menus/view.c
+++ b/src/gui/menus/view.c
@@ -192,8 +192,20 @@ static void mcb_view_change_support(GtkRadioMenuItem *menuitem, GMenuBar *bar)
view = GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(iter->data), "kind_of_view"));
+ /**
+ * La hiérarchie des composants empilés est la suivante :
+ *
+ * - GtkBlockView / GtkGraphView / GtkSourceView
+ * - GtkViewport
+ * - GtkScrolledWindow
+ * - GtkNotebook
+ * - GtkDockStation
+ *
+ */
+
vpanel = g_editor_item_get_current_view(G_EDITOR_ITEM(bar));
- station = gtk_widget_get_parent(GTK_WIDGET(vpanel)); /* ScrollWindow */
+ station = gtk_widget_get_parent(GTK_WIDGET(vpanel)); /* GtkViewport */
+ station = gtk_widget_get_parent(GTK_WIDGET(station)); /* ScrollWindow */
station = gtk_widget_get_parent(station); /* NoteBook */
station = gtk_widget_get_parent(station); /* DockStation */