summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-06-04 22:44:21 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-06-04 22:44:21 (GMT)
commit11395d684736467fb010b93b0eaeefcc06bf0f5e (patch)
treed9f9e06d27f5b8721f308b6b4636cd043e4f7d20 /src/gui
parent83ba2204e700501023cb78dfd84978c611fe61b0 (diff)
Fixed bugs when dealing with views and updated the code for GTK3.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@378 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/menus/view.c14
-rw-r--r--src/gui/status.c7
2 files changed, 13 insertions, 8 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 */
diff --git a/src/gui/status.c b/src/gui/status.c
index 50424de..c059f4e 100644
--- a/src/gui/status.c
+++ b/src/gui/status.c
@@ -169,10 +169,6 @@ GEditorItem *g_status_info_new(GObject *ref)
static void update_status_info_for_view(GStatusInfo *info, GtkViewPanel *view)
{
- printf("new view :: %p\n", view);
-
- //track_caret_address_on_buffer_views
-
if (info->caret_instance != NULL)
{
g_signal_handlers_disconnect_by_func(info->caret_instance,
@@ -186,9 +182,6 @@ static void update_status_info_for_view(GStatusInfo *info, GtkViewPanel *view)
G_CALLBACK(track_caret_address_on_buffer_views),
info);
- else
- return;
-
info->caret_instance = G_OBJECT(view);
g_object_ref(info->caret_instance);