aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-07-03 04:56:42 +0800
committerChristian Persch <chpe@src.gnome.org>2003-07-03 04:56:42 +0800
commit6650d3ac5caa4cdad7d5a555fb47e19113b90b02 (patch)
treec7b30a9e567dda241ba0567d31eb47956d50dda5 /lib
parent13b3d92da4d248b5a4e7a43f6849bac2471f4d21 (diff)
downloadgsoc2013-epiphany-6650d3ac5caa4cdad7d5a555fb47e19113b90b02.tar
gsoc2013-epiphany-6650d3ac5caa4cdad7d5a555fb47e19113b90b02.tar.gz
gsoc2013-epiphany-6650d3ac5caa4cdad7d5a555fb47e19113b90b02.tar.bz2
gsoc2013-epiphany-6650d3ac5caa4cdad7d5a555fb47e19113b90b02.tar.lz
gsoc2013-epiphany-6650d3ac5caa4cdad7d5a555fb47e19113b90b02.tar.xz
gsoc2013-epiphany-6650d3ac5caa4cdad7d5a555fb47e19113b90b02.tar.zst
gsoc2013-epiphany-6650d3ac5caa4cdad7d5a555fb47e19113b90b02.zip
Implement custom tooltip setter.
2003-07-02 Christian Persch <chpe@cvs.gnome.org> * lib/widgets/ephy-zoom-control.c: (ephy_zoom_control_set_tooltip), (ephy_zooom_control_class_init): Implement custom tooltip setter.
Diffstat (limited to 'lib')
-rw-r--r--lib/widgets/ephy-zoom-control.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/widgets/ephy-zoom-control.c b/lib/widgets/ephy-zoom-control.c
index b4c7db5c5..ccd193a7d 100644
--- a/lib/widgets/ephy-zoom-control.c
+++ b/lib/widgets/ephy-zoom-control.c
@@ -27,6 +27,7 @@
#include <gtk/gtk.h>
#include <gtk/gtkmenu.h>
#include <gtk/gtkoptionmenu.h>
+#include <gtk/gtktooltips.h>
#include <bonobo/bonobo-i18n.h>
/**
@@ -270,6 +271,21 @@ ephy_zoom_control_get_property (GObject *object,
}
}
+static gboolean
+ephy_zoom_control_set_tooltip (EggToolItem *tool_item,
+ GtkTooltips *tooltips,
+ const char *tip_text,
+ const char *tip_private)
+{
+ EphyZoomControl *control = EPHY_ZOOM_CONTROL (tool_item);
+
+ g_return_val_if_fail (EPHY_IS_ZOOM_CONTROL (control), FALSE);
+
+ gtk_tooltips_set_tip (tooltips, control->priv->option_menu, tip_text, tip_private);
+
+ return TRUE;
+}
+
static void
ephy_zoom_control_class_init (EphyZoomControlClass *klass)
{
@@ -286,6 +302,7 @@ ephy_zoom_control_class_init (EphyZoomControlClass *klass)
object_class->finalize = ephy_zoom_control_finalize;
tool_item_class->create_menu_proxy = ephy_zoom_control_create_menu_proxy;
+ tool_item_class->set_tooltip = ephy_zoom_control_set_tooltip;
g_object_class_install_property (object_class,
PROP_ZOOM,