aboutsummaryrefslogtreecommitdiffstats
path: root/lib/egg
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-11-10 20:25:19 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-11-10 20:25:19 +0800
commit309314a3645910f365dd51807f47c04e1567b5fe (patch)
treec82d73887efb1e1ef12c60c99f7d7b33469bb64d /lib/egg
parente0e28a194f0b59712b096bbde4d6181739f1d975 (diff)
downloadgsoc2013-epiphany-309314a3645910f365dd51807f47c04e1567b5fe.tar
gsoc2013-epiphany-309314a3645910f365dd51807f47c04e1567b5fe.tar.gz
gsoc2013-epiphany-309314a3645910f365dd51807f47c04e1567b5fe.tar.bz2
gsoc2013-epiphany-309314a3645910f365dd51807f47c04e1567b5fe.tar.lz
gsoc2013-epiphany-309314a3645910f365dd51807f47c04e1567b5fe.tar.xz
gsoc2013-epiphany-309314a3645910f365dd51807f47c04e1567b5fe.tar.zst
gsoc2013-epiphany-309314a3645910f365dd51807f47c04e1567b5fe.zip
Remove a decl I forgot.
2003-11-10 Marco Pesenti Gritti <marco@gnome.org> * embed/mozilla/mozilla-embed.cpp: Remove a decl I forgot. * lib/egg/egg-editable-toolbar.c: (create_item_from_action), (create_item), (drag_data_received_cb), (item_added_cb), (egg_editable_toolbar_construct): Copy hack from gtk to make tooltips work.
Diffstat (limited to 'lib/egg')
-rwxr-xr-xlib/egg/egg-editable-toolbar.c35
1 files changed, 27 insertions, 8 deletions
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c
index 46ab956f3..73e1188cc 100755
--- a/lib/egg/egg-editable-toolbar.c
+++ b/lib/egg/egg-editable-toolbar.c
@@ -312,7 +312,8 @@ set_item_drag_source (GtkWidget *item,
static GtkWidget *
create_item_from_action (EggEditableToolbar *t,
const char *action_name,
- gboolean is_separator)
+ gboolean is_separator,
+ GtkAction **ret_action)
{
GtkWidget *item;
GtkAction *action;
@@ -357,6 +358,11 @@ create_item_from_action (EggEditableToolbar *t,
gtk_tool_item_set_use_drag_window (GTK_TOOL_ITEM (item), TRUE);
}
+ if (ret_action)
+ {
+ *ret_action = action;
+ }
+
return item;
}
@@ -364,15 +370,15 @@ static GtkWidget *
create_item (EggEditableToolbar *t,
EggToolbarsModel *model,
int toolbar_position,
- int position)
+ int position,
+ GtkAction **ret_action)
{
const char *action_name;
gboolean is_separator;
action_name = egg_toolbars_model_item_nth
- (model, toolbar_position, position,
- &is_separator);
- return create_item_from_action (t, action_name, is_separator);
+ (model, toolbar_position, position, &is_separator);
+ return create_item_from_action (t, action_name, is_separator, ret_action);
}
static gboolean
@@ -416,7 +422,7 @@ drag_data_received_cb (GtkWidget *widget,
{
etoolbar->priv->pending = FALSE;
etoolbar->priv->dragged_item =
- create_item_from_action (etoolbar, id, data_is_separator (id));
+ create_item_from_action (etoolbar, id, data_is_separator (id), NULL);
}
else
{
@@ -755,12 +761,19 @@ item_added_cb (EggToolbarsModel *model,
{
GtkWidget *toolbar;
GtkWidget *item;
+ GtkAction *action;
toolbar = get_toolbar_nth (t, toolbar_position);
gtk_widget_set_size_request (toolbar, -1, -1);
- item = create_item (t, model, toolbar_position, position);
+ item = create_item (t, model, toolbar_position, position, &action);
gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
GTK_TOOL_ITEM (item), position);
+
+ /* FIXME Hack to make tooltip work from gtk */
+ if (action)
+ {
+ g_object_notify (G_OBJECT (action), "tooltip");
+ }
}
static void
@@ -836,12 +849,18 @@ egg_editable_toolbar_construct (EggEditableToolbar *t)
for (l = 0; l < n_items; l++)
{
GtkWidget *item;
+ GtkAction *action;
- item = create_item (t, model, i, l);
+ item = create_item (t, model, i, l, &action);
if (item)
{
gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
GTK_TOOL_ITEM (item), l);
+ /* FIXME Hack to make tooltip work from gtk */
+ if (action)
+ {
+ g_object_notify (G_OBJECT (action), "tooltip");
+ }
}
else
{