Commit e4ac9938 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Use g_object_notify() instead of triggering a ::notify by re-setting the

2005-04-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkuimanager.c (update_node): Use g_object_notify() instead
	of triggering a ::notify by re-setting the property.  (#300982,
	Sven Neumann)

	* gtk/gtkaction.c (connect_proxy): Use gtk_action_sync_tooltip().
parent f1583ba6
2005-04-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkuimanager.c (update_node): Use g_object_notify() instead
of triggering a ::notify by re-setting the property. (#300982,
Sven Neumann)
* gtk/gtkaction.c (connect_proxy): Use gtk_action_sync_tooltip().
* gtk/gtkiconview.c (gtk_icon_view_scroll_to_item): Also
scroll horizontally when necessary, and keep the northwest
corner of the item visible. (#300913, Mathias Hasselmann)
......
2005-04-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkuimanager.c (update_node): Use g_object_notify() instead
of triggering a ::notify by re-setting the property. (#300982,
Sven Neumann)
* gtk/gtkaction.c (connect_proxy): Use gtk_action_sync_tooltip().
* gtk/gtkiconview.c (gtk_icon_view_scroll_to_item): Also
scroll horizontally when necessary, and keep the northwest
corner of the item visible. (#300913, Mathias Hasselmann)
......
2005-04-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkuimanager.c (update_node): Use g_object_notify() instead
of triggering a ::notify by re-setting the property. (#300982,
Sven Neumann)
* gtk/gtkaction.c (connect_proxy): Use gtk_action_sync_tooltip().
* gtk/gtkiconview.c (gtk_icon_view_scroll_to_item): Also
scroll horizontally when necessary, and keep the northwest
corner of the item visible. (#300913, Mathias Hasselmann)
......
......@@ -889,6 +889,8 @@ connect_proxy (GtkAction *action,
}
else if (GTK_IS_TOOL_ITEM (proxy))
{
GParamSpec *pspec;
/* toolbar item specific synchronisers ... */
g_object_set (proxy,
......@@ -896,9 +898,11 @@ connect_proxy (GtkAction *action,
"visible_vertical", action->private_data->visible_vertical,
"is_important", action->private_data->is_important,
NULL);
/* FIXME: we should set the tooltip here, but the current api
* doesn't allow it before the item is added to a toolbar.
*/
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (action),
"tooltip");
gtk_action_sync_tooltip (action, pspec, proxy);
g_signal_connect_object (action, "notify::visible-horizontal",
G_CALLBACK (gtk_action_sync_property),
proxy, 0);
......@@ -926,9 +930,7 @@ connect_proxy (GtkAction *action,
"use_underline", TRUE,
"stock_id", action->private_data->stock_id,
NULL);
/* FIXME: we should set the tooltip here, but the current api
* doesn't allow it before the item is added to a toolbar.
*/
g_signal_connect_object (action, "notify::short-label",
G_CALLBACK (gtk_action_sync_short_label),
proxy, 0);
......
......@@ -2070,7 +2070,6 @@ update_node (GtkUIManager *self,
Node *info;
GNode *child;
GtkAction *action;
gchar *tooltip;
const gchar *action_name;
NodeUIReference *ref;
......@@ -2455,9 +2454,7 @@ update_node (GtkUIManager *self,
* tooltips on toolitems can't be set before the toolitem
* is added to the toolbar.
*/
g_object_get (action, "tooltip", &tooltip, NULL);
g_object_set (action, "tooltip", tooltip, NULL);
g_free (tooltip);
g_object_notify (G_OBJECT (action), "tooltip");
}
}
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment