diff options
author | Peter Harvey <peter.a.harvey@gmail.com> | 2006-02-02 07:03:27 +0800 |
---|---|---|
committer | Peter Anthony Harvey <paharvey@src.gnome.org> | 2006-02-02 07:03:27 +0800 |
commit | 256ef024e275dc7aa56c5b93d4c387b9ba12746c (patch) | |
tree | 0085b7457732bd7605878ea794e0b12bd4db377f /lib | |
parent | 1a64c9089d114a6d5ceab206798bd6ef885f812e (diff) | |
download | gsoc2013-epiphany-256ef024e275dc7aa56c5b93d4c387b9ba12746c.tar gsoc2013-epiphany-256ef024e275dc7aa56c5b93d4c387b9ba12746c.tar.gz gsoc2013-epiphany-256ef024e275dc7aa56c5b93d4c387b9ba12746c.tar.bz2 gsoc2013-epiphany-256ef024e275dc7aa56c5b93d4c387b9ba12746c.tar.lz gsoc2013-epiphany-256ef024e275dc7aa56c5b93d4c387b9ba12746c.tar.xz gsoc2013-epiphany-256ef024e275dc7aa56c5b93d4c387b9ba12746c.tar.zst gsoc2013-epiphany-256ef024e275dc7aa56c5b93d4c387b9ba12746c.zip |
lib/egg/egg-editable-toolbar.c
2006-01-31 Peter Harvey <peter.a.harvey@gmail.com>
* lib/egg/egg-editable-toolbar.c
Add tooltips to toolitems again (reverses a regression).
Use _forall instead of _foreach when connecting signals,
to make sure that widgets like Zoom get a right-click menu.
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/egg/egg-editable-toolbar.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c index 9fb204968..532debb1d 100755 --- a/lib/egg/egg-editable-toolbar.c +++ b/lib/egg/egg-editable-toolbar.c @@ -418,14 +418,28 @@ configure_item_cursor (GtkToolItem *item, } } + +static void +configure_item_tooltip (GtkToolItem *item) +{ + GtkAction *action = g_object_get_data (G_OBJECT (item), + "gtk-action"); + + if (action != NULL) + { + g_object_notify (G_OBJECT (action), "tooltip"); + } +} + + static void connect_widget_signals (GtkWidget *proxy, EggEditableToolbar *etoolbar) { if (GTK_IS_CONTAINER (proxy)) { - gtk_container_foreach (GTK_CONTAINER (proxy), - (GtkCallback) connect_widget_signals, - (gpointer) etoolbar); + gtk_container_forall (GTK_CONTAINER (proxy), + (GtkCallback) connect_widget_signals, + (gpointer) etoolbar); } if (GTK_IS_TOOL_ITEM (proxy)) @@ -1031,6 +1045,7 @@ item_added_cb (EggToolbarsModel *model, gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, ipos); connect_widget_signals (GTK_WIDGET (item), etoolbar); + configure_item_tooltip (item); configure_item_cursor (item, etoolbar); configure_item_sensitivity (item, etoolbar); @@ -1099,6 +1114,7 @@ egg_editable_toolbar_build (EggEditableToolbar *etoolbar) gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, l); connect_widget_signals (GTK_WIDGET (item), etoolbar); + configure_item_tooltip (item); configure_item_sensitivity (item, etoolbar); } else |