mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
remove quark_user_data usage in gtk_object_{g|s}et_user_data(). fixes
Fri Feb 7 04:49:46 2003 Tim Janik <timj@gtk.org> * gtk/gtkobject.c: remove quark_user_data usage in gtk_object_{g|s}et_user_data(). fixes get_user_data() returning NULL for user_data set through property interface. * gtk/gtkitemfactory.c (gtk_item_factory_create_item): don't put out warnings if a pixbuf couldn't be retrieved, since (a) this doesn't need to be a programming error (in case of loaded data), (b) it breaks with 2.0 behaviour where extra magic could be used to create empty images. don't attempt to retrieve pixbufs from NULL extra_data.
This commit is contained in:
parent
f683ed9a0a
commit
10d67ceb23
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
Fri Feb 7 04:49:46 2003 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkobject.c: remove quark_user_data usage in
|
||||
gtk_object_{g|s}et_user_data(). fixes get_user_data()
|
||||
returning NULL for user_data set through property interface.
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): don't put out
|
||||
warnings if a pixbuf couldn't be retrieved, since (a) this doesn't
|
||||
need to be a programming error (in case of loaded data), (b) it breaks
|
||||
with 2.0 behaviour where extra magic could be used to create empty
|
||||
images. don't attempt to retrieve pixbufs from NULL extra_data.
|
||||
|
||||
2003-02-06 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gdk/x11/gdkvisual-x11.c (gdk_visual_get_best_with_depth): Return
|
||||
|
@ -1,3 +1,15 @@
|
||||
Fri Feb 7 04:49:46 2003 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkobject.c: remove quark_user_data usage in
|
||||
gtk_object_{g|s}et_user_data(). fixes get_user_data()
|
||||
returning NULL for user_data set through property interface.
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): don't put out
|
||||
warnings if a pixbuf couldn't be retrieved, since (a) this doesn't
|
||||
need to be a programming error (in case of loaded data), (b) it breaks
|
||||
with 2.0 behaviour where extra magic could be used to create empty
|
||||
images. don't attempt to retrieve pixbufs from NULL extra_data.
|
||||
|
||||
2003-02-06 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gdk/x11/gdkvisual-x11.c (gdk_visual_get_best_with_depth): Return
|
||||
|
@ -1,3 +1,15 @@
|
||||
Fri Feb 7 04:49:46 2003 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkobject.c: remove quark_user_data usage in
|
||||
gtk_object_{g|s}et_user_data(). fixes get_user_data()
|
||||
returning NULL for user_data set through property interface.
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): don't put out
|
||||
warnings if a pixbuf couldn't be retrieved, since (a) this doesn't
|
||||
need to be a programming error (in case of loaded data), (b) it breaks
|
||||
with 2.0 behaviour where extra magic could be used to create empty
|
||||
images. don't attempt to retrieve pixbufs from NULL extra_data.
|
||||
|
||||
2003-02-06 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gdk/x11/gdkvisual-x11.c (gdk_visual_get_best_with_depth): Return
|
||||
|
@ -1,3 +1,15 @@
|
||||
Fri Feb 7 04:49:46 2003 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkobject.c: remove quark_user_data usage in
|
||||
gtk_object_{g|s}et_user_data(). fixes get_user_data()
|
||||
returning NULL for user_data set through property interface.
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): don't put out
|
||||
warnings if a pixbuf couldn't be retrieved, since (a) this doesn't
|
||||
need to be a programming error (in case of loaded data), (b) it breaks
|
||||
with 2.0 behaviour where extra magic could be used to create empty
|
||||
images. don't attempt to retrieve pixbufs from NULL extra_data.
|
||||
|
||||
2003-02-06 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gdk/x11/gdkvisual-x11.c (gdk_visual_get_best_with_depth): Return
|
||||
|
@ -1,3 +1,15 @@
|
||||
Fri Feb 7 04:49:46 2003 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkobject.c: remove quark_user_data usage in
|
||||
gtk_object_{g|s}et_user_data(). fixes get_user_data()
|
||||
returning NULL for user_data set through property interface.
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): don't put out
|
||||
warnings if a pixbuf couldn't be retrieved, since (a) this doesn't
|
||||
need to be a programming error (in case of loaded data), (b) it breaks
|
||||
with 2.0 behaviour where extra magic could be used to create empty
|
||||
images. don't attempt to retrieve pixbufs from NULL extra_data.
|
||||
|
||||
2003-02-06 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gdk/x11/gdkvisual-x11.c (gdk_visual_get_best_with_depth): Return
|
||||
|
@ -1076,22 +1076,17 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
|
||||
gtk_radio_menu_item_set_group (GTK_RADIO_MENU_ITEM (widget), radio_group);
|
||||
if (type_id == quark_type_image_item)
|
||||
{
|
||||
GError *error = NULL;
|
||||
GdkPixbuf *pixbuf = NULL;
|
||||
|
||||
image = NULL;
|
||||
pixbuf = gdk_pixbuf_new_from_inline (-1,
|
||||
entry->extra_data,
|
||||
FALSE,
|
||||
&error);
|
||||
if (pixbuf)
|
||||
image = gtk_image_new_from_pixbuf (pixbuf);
|
||||
else
|
||||
if (entry->extra_data)
|
||||
{
|
||||
g_warning ("Error loading menu image: %s", error->message);
|
||||
g_error_free (error);
|
||||
pixbuf = gdk_pixbuf_new_from_inline (-1,
|
||||
entry->extra_data,
|
||||
FALSE,
|
||||
NULL);
|
||||
if (pixbuf)
|
||||
image = gtk_image_new_from_pixbuf (pixbuf);
|
||||
}
|
||||
|
||||
if (image)
|
||||
{
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (widget), image);
|
||||
|
@ -63,7 +63,6 @@ static void gtk_object_notify_weaks (GtkObject *object);
|
||||
|
||||
static gpointer parent_class = NULL;
|
||||
static guint object_signals[LAST_SIGNAL] = { 0 };
|
||||
static GQuark quark_user_data = 0;
|
||||
static GQuark quark_weakrefs = 0;
|
||||
|
||||
|
||||
@ -717,10 +716,7 @@ gtk_object_set_user_data (GtkObject *object,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_OBJECT (object));
|
||||
|
||||
if (!quark_user_data)
|
||||
quark_user_data = g_quark_from_static_string ("user_data");
|
||||
|
||||
g_datalist_id_set_data (&G_OBJECT (object)->qdata, quark_user_data, data);
|
||||
g_object_set_data (G_OBJECT (object), "user_data", data);
|
||||
}
|
||||
|
||||
gpointer
|
||||
@ -728,7 +724,7 @@ gtk_object_get_user_data (GtkObject *object)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_OBJECT (object), NULL);
|
||||
|
||||
return g_datalist_id_get_data (&G_OBJECT (object)->qdata, quark_user_data);
|
||||
return g_object_get_data (G_OBJECT (object), "user_data");
|
||||
}
|
||||
|
||||
GtkObject*
|
||||
|
Loading…
Reference in New Issue
Block a user