aboutsummaryrefslogtreecommitdiffstats
path: root/lib/egg/egg-action.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-07-02 02:28:05 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-07-02 02:28:05 +0800
commitc621f76b4e81a30f6d6db5eb16bf2c75d0980468 (patch)
treed2b3d20a5b3482fc27b0faa3fdfcf2624d9ab93a /lib/egg/egg-action.c
parent0ab1c928c782530b2d5ab0ad81cb46e5aaed539d (diff)
downloadgsoc2013-epiphany-c621f76b4e81a30f6d6db5eb16bf2c75d0980468.tar
gsoc2013-epiphany-c621f76b4e81a30f6d6db5eb16bf2c75d0980468.tar.gz
gsoc2013-epiphany-c621f76b4e81a30f6d6db5eb16bf2c75d0980468.tar.bz2
gsoc2013-epiphany-c621f76b4e81a30f6d6db5eb16bf2c75d0980468.tar.lz
gsoc2013-epiphany-c621f76b4e81a30f6d6db5eb16bf2c75d0980468.tar.xz
gsoc2013-epiphany-c621f76b4e81a30f6d6db5eb16bf2c75d0980468.tar.zst
gsoc2013-epiphany-c621f76b4e81a30f6d6db5eb16bf2c75d0980468.zip
Make the location entry an EggToolItem, and provide a custom tooptip
2003-07-01 Christian Persch <chpe@cvs.gnome.org> * lib/widgets/ephy-location-entry.h: * lib/widgets/ephy-location-entry.c: (ephy_location_entry_set_tooltip), (ephy_location_entry_construct_contents), (ephy_location_entry_class_init), (ephy_location_entry_init), (ephy_location_entry_finalize): Make the location entry an EggToolItem, and provide a custom tooptip setter. Fix mem leak. * src/ephy-location-action.c: (create_tool_item), (ephy_location_action_class_init), (connect_proxy): Use the location entry EggToolItem instead of constructing it explicitly. * src/toolbar.c: (toolbar_setup_action): Set tooltip for location entry. * lib/egg/egg-action.c: (connect_proxy), (disconnect_proxy): Connect the tooltip sync'er on any EggToolItem, not just EggTollButton:s. Disconnect the tooltip sync func on disconnect, too.
Diffstat (limited to 'lib/egg/egg-action.c')
-rw-r--r--lib/egg/egg-action.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/egg/egg-action.c b/lib/egg/egg-action.c
index aba6d59db..054159f45 100644
--- a/lib/egg/egg-action.c
+++ b/lib/egg/egg-action.c
@@ -549,10 +549,6 @@ connect_proxy (EggAction *action, GtkWidget *proxy)
g_signal_connect_object (action, "notify::short_label",
G_CALLBACK (egg_action_sync_short_label),
proxy, 0);
- egg_action_sync_tooltip (action, NULL, proxy);
- g_signal_connect_object (action, "notify::tooltip",
- G_CALLBACK (egg_action_sync_tooltip),
- proxy, 0);
g_object_set (G_OBJECT (proxy), "stock_id", action->stock_id, NULL);
g_signal_connect_object (action, "notify::stock_id",
@@ -566,6 +562,14 @@ connect_proxy (EggAction *action, GtkWidget *proxy)
G_CALLBACK (egg_action_activate), action,
G_CONNECT_SWAPPED);
}
+
+ if (EGG_IS_TOOL_ITEM (proxy))
+ {
+ egg_action_sync_tooltip (action, NULL, proxy);
+ g_signal_connect_object (action, "notify::tooltip",
+ G_CALLBACK (egg_action_sync_tooltip),
+ proxy, 0);
+ }
}
static void
@@ -597,6 +601,10 @@ disconnect_proxy (EggAction *action, GtkWidget *proxy)
g_signal_handlers_disconnect_by_func (action,
G_CALLBACK (egg_action_sync_stock_id), proxy);
+ g_signal_handlers_disconnect_by_func (proxy,
+ G_CALLBACK (egg_action_sync_tooltip),
+ action);
+
/* menu item specific synchronisers ... */
g_signal_handlers_disconnect_by_func (action,
G_CALLBACK (egg_action_sync_label),