forked from AuroraMiddleware/gtk
Remove work-around for the old tooltips code, and just set the action
2007-07-10 Christian Persch <chpe@gnome.org> * gtk/gtkaction.c: (gtk_action_sync_tooltip), (gtk_action_set_tooltip): * gtk/gtkuimanager.c: (update_node): Remove work-around for the old tooltips code, and just set the action tooltip immediately on the proxy widget. Bug #455482. svn path=/trunk/; revision=18437
This commit is contained in:
parent
75d9d02b72
commit
03970ddcaf
@ -1,3 +1,11 @@
|
|||||||
|
2007-07-10 Christian Persch <chpe@gnome.org>
|
||||||
|
|
||||||
|
* gtk/gtkaction.c: (gtk_action_sync_tooltip),
|
||||||
|
(gtk_action_set_tooltip):
|
||||||
|
* gtk/gtkuimanager.c: (update_node): Remove work-around for the old
|
||||||
|
tooltips code, and just set the action tooltip immediately on the
|
||||||
|
proxy widget. Bug #455482.
|
||||||
|
|
||||||
2007-07-10 Kristian Rietveld <kris@imendio.com>
|
2007-07-10 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
* gtk/gtktooltip.c (find_widget_under_pointer),
|
* gtk/gtktooltip.c (find_widget_under_pointer),
|
||||||
|
@ -1451,13 +1451,8 @@ static void
|
|||||||
gtk_action_sync_tooltip (GtkAction *action,
|
gtk_action_sync_tooltip (GtkAction *action,
|
||||||
GtkWidget *proxy)
|
GtkWidget *proxy)
|
||||||
{
|
{
|
||||||
GtkWidget *parent;
|
gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (proxy),
|
||||||
|
action->private_data->tooltip);
|
||||||
parent = gtk_widget_get_parent (proxy);
|
|
||||||
|
|
||||||
if (GTK_IS_TOOL_ITEM (proxy) && GTK_IS_TOOLBAR (parent))
|
|
||||||
gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (proxy),
|
|
||||||
action->private_data->tooltip);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1475,8 +1470,9 @@ gtk_action_set_tooltip (GtkAction *action,
|
|||||||
for (p = action->private_data->proxies; p; p = p->next)
|
for (p = action->private_data->proxies; p; p = p->next)
|
||||||
{
|
{
|
||||||
proxy = (GtkWidget *)p->data;
|
proxy = (GtkWidget *)p->data;
|
||||||
|
|
||||||
gtk_action_sync_tooltip (action, proxy);
|
if (GTK_IS_TOOL_ITEM (proxy))
|
||||||
|
gtk_action_sync_tooltip (action, proxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (action), "tooltip");
|
g_object_notify (G_OBJECT (action), "tooltip");
|
||||||
|
@ -2613,16 +2613,6 @@ update_node (GtkUIManager *self,
|
|||||||
|
|
||||||
if (info->proxy)
|
if (info->proxy)
|
||||||
{
|
{
|
||||||
/* FIXME: we must re-set the tooltip, since tooltips on
|
|
||||||
* toolitems can't be set before the toolitem is added
|
|
||||||
* to the toolbar.
|
|
||||||
*/
|
|
||||||
gchar *tooltip;
|
|
||||||
|
|
||||||
g_object_get (G_OBJECT (action), "tooltip", &tooltip, NULL);
|
|
||||||
g_object_set (G_OBJECT (action), "tooltip", tooltip, NULL);
|
|
||||||
g_free (tooltip);
|
|
||||||
|
|
||||||
g_signal_connect (info->proxy, "notify::visible",
|
g_signal_connect (info->proxy, "notify::visible",
|
||||||
G_CALLBACK (update_smart_separators), NULL);
|
G_CALLBACK (update_smart_separators), NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user