aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--lib/widgets/ephy-arrow-toolbutton.c19
-rwxr-xr-xsrc/toolbar.c7
3 files changed, 36 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 12a878589..4ce1b04b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+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.
+
2003-07-02 Jordi Mallach <jordi@sindominio.net>
* data/bme.desktop.in, data/epiphany.desktop.in: Replace "0" with
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),
diff --git a/src/toolbar.c b/src/toolbar.c
index 0a290d551..0fdda294e 100755
--- a/src/toolbar.c
+++ b/src/toolbar.c
@@ -300,6 +300,7 @@ toolbar_setup_actions (Toolbar *t)
"name", "NavigationBack",
"label", _("Back"),
"stock_id", GTK_STOCK_GO_BACK,
+ "tooltip", _("Go back"),
"window", t->priv->window,
"direction", EPHY_NAVIGATION_DIRECTION_BACK,
NULL);
@@ -312,6 +313,7 @@ toolbar_setup_actions (Toolbar *t)
"name", "NavigationForward",
"label", _("Forward"),
"stock_id", GTK_STOCK_GO_FORWARD,
+ "tooltip", _("Go forward"),
"window", t->priv->window,
"direction", EPHY_NAVIGATION_DIRECTION_FORWARD,
NULL);
@@ -323,9 +325,10 @@ toolbar_setup_actions (Toolbar *t)
action = g_object_new (EPHY_TYPE_NAVIGATION_ACTION,
"name", "NavigationUp",
"label", _("Up"),
+ "stock_id", GTK_STOCK_GO_UP,
+ "tooltip", _("Go up"),
"window", t->priv->window,
"direction", EPHY_NAVIGATION_DIRECTION_UP,
- "stock_id", GTK_STOCK_GO_UP,
NULL);
g_signal_connect (action, "activate",
G_CALLBACK (window_cmd_go_up), t->priv->window);
@@ -356,6 +359,7 @@ toolbar_setup_actions (Toolbar *t)
action = g_object_new (EPHY_TYPE_ZOOM_ACTION,
"name", "Zoom",
"label", _("Zoom"),
+ "tooltip", _("Zoom"),
"zoom", 1.0,
NULL);
g_signal_connect (action, "zoom_to_level",
@@ -375,6 +379,7 @@ toolbar_setup_actions (Toolbar *t)
"name", "ToolbarGo",
"label", _("Go"),
"stock_id", GTK_STOCK_JUMP_TO,
+ "tooltip", _("Go to the address entered in the location entry."),
NULL);
g_signal_connect (action, "activate",
G_CALLBACK (window_cmd_load_location), t->priv->window);