forked from AuroraMiddleware/gtk
Make disconnect work for toolitems.
2003-09-07 Matthias Clasen <maclas@gmx.de> * gtk/gtkaction.c (disconnect_proxy): Make disconnect work for toolitems.
This commit is contained in:
parent
7db084ec5b
commit
0a79e5e3be
@ -1,3 +1,8 @@
|
|||||||
|
2003-09-07 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkaction.c (disconnect_proxy): Make disconnect work
|
||||||
|
for toolitems.
|
||||||
|
|
||||||
2003-09-06 Matthias Clasen <maclas@gmx.de>
|
2003-09-06 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtkaction.c (gtk_action_connect_proxy): Disconnect from
|
* gtk/gtkaction.c (gtk_action_connect_proxy): Disconnect from
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2003-09-07 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkaction.c (disconnect_proxy): Make disconnect work
|
||||||
|
for toolitems.
|
||||||
|
|
||||||
2003-09-06 Matthias Clasen <maclas@gmx.de>
|
2003-09-06 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtkaction.c (gtk_action_connect_proxy): Disconnect from
|
* gtk/gtkaction.c (gtk_action_connect_proxy): Disconnect from
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2003-09-07 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkaction.c (disconnect_proxy): Make disconnect work
|
||||||
|
for toolitems.
|
||||||
|
|
||||||
2003-09-06 Matthias Clasen <maclas@gmx.de>
|
2003-09-06 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtkaction.c (gtk_action_connect_proxy): Disconnect from
|
* gtk/gtkaction.c (gtk_action_connect_proxy): Disconnect from
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2003-09-07 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkaction.c (disconnect_proxy): Make disconnect work
|
||||||
|
for toolitems.
|
||||||
|
|
||||||
2003-09-06 Matthias Clasen <maclas@gmx.de>
|
2003-09-06 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtkaction.c (gtk_action_connect_proxy): Disconnect from
|
* gtk/gtkaction.c (gtk_action_connect_proxy): Disconnect from
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2003-09-07 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkaction.c (disconnect_proxy): Make disconnect work
|
||||||
|
for toolitems.
|
||||||
|
|
||||||
2003-09-06 Matthias Clasen <maclas@gmx.de>
|
2003-09-06 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtkaction.c (gtk_action_connect_proxy): Disconnect from
|
* gtk/gtkaction.c (gtk_action_connect_proxy): Disconnect from
|
||||||
|
@ -599,7 +599,7 @@ connect_proxy (GtkAction *action,
|
|||||||
if (action->private_data->accel_quark)
|
if (action->private_data->accel_quark)
|
||||||
{
|
{
|
||||||
gtk_menu_item_set_accel_path (GTK_MENU_ITEM (proxy),
|
gtk_menu_item_set_accel_path (GTK_MENU_ITEM (proxy),
|
||||||
g_quark_to_string (action->private_data->accel_quark));
|
g_quark_to_string (action->private_data->accel_quark));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_signal_connect_object (proxy, "activate",
|
g_signal_connect_object (proxy, "activate",
|
||||||
@ -657,11 +657,6 @@ static void
|
|||||||
disconnect_proxy (GtkAction *action,
|
disconnect_proxy (GtkAction *action,
|
||||||
GtkWidget *proxy)
|
GtkWidget *proxy)
|
||||||
{
|
{
|
||||||
static guint notify_id = 0;
|
|
||||||
|
|
||||||
if (!notify_id)
|
|
||||||
notify_id = g_signal_lookup ("notify", G_TYPE_OBJECT);
|
|
||||||
|
|
||||||
g_object_set_data (G_OBJECT (proxy), "gtk-action", NULL);
|
g_object_set_data (G_OBJECT (proxy), "gtk-action", NULL);
|
||||||
|
|
||||||
/* remove proxy from list of proxies */
|
/* remove proxy from list of proxies */
|
||||||
@ -687,13 +682,15 @@ disconnect_proxy (GtkAction *action,
|
|||||||
g_signal_handlers_disconnect_by_func (action,
|
g_signal_handlers_disconnect_by_func (action,
|
||||||
G_CALLBACK (gtk_action_sync_label),
|
G_CALLBACK (gtk_action_sync_label),
|
||||||
proxy);
|
proxy);
|
||||||
|
|
||||||
gtk_menu_item_set_accel_path (GTK_MENU_ITEM (proxy), NULL);
|
if (GTK_IS_MENU_ITEM (widget))
|
||||||
|
gtk_menu_item_set_accel_path (GTK_MENU_ITEM (widget), NULL);
|
||||||
|
|
||||||
/* toolbar button specific synchronisers ... */
|
/* toolbar button specific synchronisers ... */
|
||||||
g_signal_handlers_disconnect_by_func (action,
|
g_signal_handlers_disconnect_by_func (action,
|
||||||
G_CALLBACK (gtk_action_sync_short_label),
|
G_CALLBACK (gtk_action_sync_short_label),
|
||||||
proxy);
|
proxy);
|
||||||
|
|
||||||
g_signal_handlers_disconnect_by_func (proxy,
|
g_signal_handlers_disconnect_by_func (proxy,
|
||||||
G_CALLBACK (gtk_action_create_menu_proxy),
|
G_CALLBACK (gtk_action_create_menu_proxy),
|
||||||
action);
|
action);
|
||||||
|
Loading…
Reference in New Issue
Block a user