aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-07-03 03:13:03 +0800
committerChristian Persch <chpe@src.gnome.org>2003-07-03 03:13:03 +0800
commit13b3d92da4d248b5a4e7a43f6849bac2471f4d21 (patch)
tree210e7b8408f337c943c523240c981345072a8464 /lib
parent2f7b2ca65482177d9c723fb9bef9eb92748d2377 (diff)
downloadgsoc2013-epiphany-13b3d92da4d248b5a4e7a43f6849bac2471f4d21.tar
gsoc2013-epiphany-13b3d92da4d248b5a4e7a43f6849bac2471f4d21.tar.gz
gsoc2013-epiphany-13b3d92da4d248b5a4e7a43f6849bac2471f4d21.tar.bz2
gsoc2013-epiphany-13b3d92da4d248b5a4e7a43f6849bac2471f4d21.tar.lz
gsoc2013-epiphany-13b3d92da4d248b5a4e7a43f6849bac2471f4d21.tar.xz
gsoc2013-epiphany-13b3d92da4d248b5a4e7a43f6849bac2471f4d21.tar.zst
gsoc2013-epiphany-13b3d92da4d248b5a4e7a43f6849bac2471f4d21.zip
Implement custom tooltip setter; sets tooltip on the directional button.
2003-07-02 Christian Persch <chpe@cvs.gnome.org> * lib/widgets/ephy-arrow-toolbutton.c: (ephy_arrow_toolbutton_set_tooltip), (ephy_arrow_toolbutton_class_init): Implement custom tooltip setter; sets tooltip on the directional button. * src/toolbar.c: (toolbar_setup_actions): Set tooltips on custom actions.
Diffstat (limited to 'lib')
-rw-r--r--lib/widgets/ephy-arrow-toolbutton.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/widgets/ephy-arrow-toolbutton.c b/lib/widgets/ephy-arrow-toolbutton.c
index e769abd34..5ab996593 100644
--- a/lib/widgets/ephy-arrow-toolbutton.c
+++ b/lib/widgets/ephy-arrow-toolbutton.c
@@ -76,15 +76,34 @@ ephy_arrow_toolbutton_get_type (void)
return ephy_arrow_toolbutton_type;
}
+
+static gboolean
+ephy_arrow_toolbutton_set_tooltip (EggToolItem *tool_item,
+ GtkTooltips *tooltips,
+ const char *tip_text,
+ const char *tip_private)
+{
+ EphyArrowToolButton *button = EPHY_ARROW_TOOLBUTTON (tool_item);
+
+ g_return_val_if_fail (IS_EPHY_ARROW_TOOLBUTTON (button), FALSE);
+
+ gtk_tooltips_set_tip (tooltips, button->priv->button, tip_text, tip_private);
+
+ return TRUE;
+}
+
static void
ephy_arrow_toolbutton_class_init (EphyArrowToolButtonClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ EggToolItemClass *tool_item_class = EGG_TOOL_ITEM_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = ephy_arrow_toolbutton_finalize;
+ tool_item_class->set_tooltip = ephy_arrow_toolbutton_set_tooltip;
+
EphyArrowToolButtonSignals[EPHY_ARROW_TOOL_BUTTON_MENU_ACTIVATED] =
g_signal_new
("menu-activated", G_OBJECT_CLASS_TYPE (klass),