mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 05:20:17 +00:00
use the second argument to the weak ref notify, cleaning up some uglyness.
2001-08-18 James Henstridge <james@daa.com.au> * gtk/gtkaccelgroup.c (gtk_accel_group_object_destroy): use the second argument to the weak ref notify, cleaning up some uglyness. (gtk_accel_group_attach): remove and add the weak notifier when changing the accel groups slist. (gtk_accel_group_detach): same here.
This commit is contained in:
parent
65159e1c52
commit
a6d2714c02
@ -1,3 +1,11 @@
|
||||
2001-08-18 James Henstridge <james@daa.com.au>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_object_destroy): use the
|
||||
second argument to the weak ref notify, cleaning up some uglyness.
|
||||
(gtk_accel_group_attach): remove and add the weak notifier when
|
||||
changing the accel groups slist.
|
||||
(gtk_accel_group_detach): same here.
|
||||
|
||||
2001-08-17 Darin Adler <darin@bentspoon.com>
|
||||
|
||||
* gtk/gtktreeview.c: (gtk_tree_view_search_equal_func): Add
|
||||
|
@ -1,3 +1,11 @@
|
||||
2001-08-18 James Henstridge <james@daa.com.au>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_object_destroy): use the
|
||||
second argument to the weak ref notify, cleaning up some uglyness.
|
||||
(gtk_accel_group_attach): remove and add the weak notifier when
|
||||
changing the accel groups slist.
|
||||
(gtk_accel_group_detach): same here.
|
||||
|
||||
2001-08-17 Darin Adler <darin@bentspoon.com>
|
||||
|
||||
* gtk/gtktreeview.c: (gtk_tree_view_search_equal_func): Add
|
||||
|
@ -1,3 +1,11 @@
|
||||
2001-08-18 James Henstridge <james@daa.com.au>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_object_destroy): use the
|
||||
second argument to the weak ref notify, cleaning up some uglyness.
|
||||
(gtk_accel_group_attach): remove and add the weak notifier when
|
||||
changing the accel groups slist.
|
||||
(gtk_accel_group_detach): same here.
|
||||
|
||||
2001-08-17 Darin Adler <darin@bentspoon.com>
|
||||
|
||||
* gtk/gtktreeview.c: (gtk_tree_view_search_equal_func): Add
|
||||
|
@ -1,3 +1,11 @@
|
||||
2001-08-18 James Henstridge <james@daa.com.au>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_object_destroy): use the
|
||||
second argument to the weak ref notify, cleaning up some uglyness.
|
||||
(gtk_accel_group_attach): remove and add the weak notifier when
|
||||
changing the accel groups slist.
|
||||
(gtk_accel_group_detach): same here.
|
||||
|
||||
2001-08-17 Darin Adler <darin@bentspoon.com>
|
||||
|
||||
* gtk/gtktreeview.c: (gtk_tree_view_search_equal_func): Add
|
||||
|
@ -1,3 +1,11 @@
|
||||
2001-08-18 James Henstridge <james@daa.com.au>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_object_destroy): use the
|
||||
second argument to the weak ref notify, cleaning up some uglyness.
|
||||
(gtk_accel_group_attach): remove and add the weak notifier when
|
||||
changing the accel groups slist.
|
||||
(gtk_accel_group_detach): same here.
|
||||
|
||||
2001-08-17 Darin Adler <darin@bentspoon.com>
|
||||
|
||||
* gtk/gtktreeview.c: (gtk_tree_view_search_equal_func): Add
|
||||
|
@ -1,3 +1,11 @@
|
||||
2001-08-18 James Henstridge <james@daa.com.au>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_object_destroy): use the
|
||||
second argument to the weak ref notify, cleaning up some uglyness.
|
||||
(gtk_accel_group_attach): remove and add the weak notifier when
|
||||
changing the accel groups slist.
|
||||
(gtk_accel_group_detach): same here.
|
||||
|
||||
2001-08-17 Darin Adler <darin@bentspoon.com>
|
||||
|
||||
* gtk/gtktreeview.c: (gtk_tree_view_search_equal_func): Add
|
||||
|
@ -1,3 +1,11 @@
|
||||
2001-08-18 James Henstridge <james@daa.com.au>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_object_destroy): use the
|
||||
second argument to the weak ref notify, cleaning up some uglyness.
|
||||
(gtk_accel_group_attach): remove and add the weak notifier when
|
||||
changing the accel groups slist.
|
||||
(gtk_accel_group_detach): same here.
|
||||
|
||||
2001-08-17 Darin Adler <darin@bentspoon.com>
|
||||
|
||||
* gtk/gtktreeview.c: (gtk_tree_view_search_equal_func): Add
|
||||
|
@ -201,19 +201,17 @@ gtk_accel_group_unref (GtkAccelGroup *accel_group)
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_accel_group_object_destroy (GObject *object)
|
||||
gtk_accel_group_object_destroy (GSList *free_list,
|
||||
GObject *where_the_object_was)
|
||||
{
|
||||
GSList *free_list, *slist;
|
||||
|
||||
free_list = g_object_get_qdata (object, accel_groups_key_id);
|
||||
g_object_set_qdata (object, accel_groups_key_id, NULL);
|
||||
GSList *slist;
|
||||
|
||||
for (slist = free_list; slist; slist = slist->next)
|
||||
{
|
||||
GtkAccelGroup *accel_group;
|
||||
|
||||
accel_group = slist->data;
|
||||
accel_group->attach_objects = g_slist_remove (accel_group->attach_objects, object);
|
||||
accel_group->attach_objects = g_slist_remove (accel_group->attach_objects, where_the_object_was);
|
||||
g_object_unref (accel_group);
|
||||
}
|
||||
g_slist_free (free_list);
|
||||
@ -232,12 +230,15 @@ gtk_accel_group_attach (GtkAccelGroup *accel_group,
|
||||
accel_group->attach_objects = g_slist_prepend (accel_group->attach_objects, object);
|
||||
g_object_ref (accel_group);
|
||||
slist = g_object_get_qdata (object, accel_groups_key_id);
|
||||
if (!slist)
|
||||
g_object_weak_ref(object,
|
||||
(GWeakNotify)gtk_accel_group_object_destroy,
|
||||
object);
|
||||
if (slist)
|
||||
g_object_weak_unref(object,
|
||||
(GWeakNotify)gtk_accel_group_object_destroy,
|
||||
slist);
|
||||
slist = g_slist_prepend (slist, accel_group);
|
||||
g_object_set_qdata (object, accel_groups_key_id, slist);
|
||||
g_object_weak_ref(object,
|
||||
(GWeakNotify)gtk_accel_group_object_destroy,
|
||||
slist);
|
||||
}
|
||||
|
||||
void
|
||||
@ -253,12 +254,15 @@ gtk_accel_group_detach (GtkAccelGroup *accel_group,
|
||||
accel_group->attach_objects = g_slist_remove (accel_group->attach_objects, object);
|
||||
g_object_unref (accel_group);
|
||||
slist = g_object_get_qdata (object, accel_groups_key_id);
|
||||
g_object_weak_unref(object,
|
||||
(GWeakNotify)gtk_accel_group_object_destroy,
|
||||
slist);
|
||||
slist = g_slist_remove (slist, accel_group);
|
||||
if (!slist)
|
||||
g_object_weak_unref(object,
|
||||
(GWeakNotify)gtk_accel_group_object_destroy,
|
||||
object);
|
||||
g_object_set_qdata (object, accel_groups_key_id, slist);
|
||||
if (slist)
|
||||
g_object_weak_ref(object,
|
||||
(GWeakNotify)gtk_accel_group_object_destroy,
|
||||
slist);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user