Mailing List Archive

r19545 - in projects/haf/trunk/gtk+: . docs/reference/gtk/tmpl gtk
Author: kalikiana
Date: 2009-12-03 13:24:49 +0200 (Thu, 03 Dec 2009)
New Revision: 19545

Modified:
projects/haf/trunk/gtk+/ChangeLog
projects/haf/trunk/gtk+/docs/reference/gtk/tmpl/gtkbuildable.sgml
projects/haf/trunk/gtk+/gtk/gtkwidget.c
Log:
2009-12-03 Christian Dywan <christian@lanedo.com>

Fixes: NB#125177 - GtkButton + hildon_gtk_widget_set_theme_size() has
wrong style when created via GtkBuilder

* gtk/gtkwidget.c (gtk_widget_buildable_interface_init),
(gtk_widget_buildable_set_name), (gtk_widget_buildable_get_name): Use
object data to store the buildable name.

Modified: projects/haf/trunk/gtk+/ChangeLog
===================================================================
--- projects/haf/trunk/gtk+/ChangeLog 2009-12-02 16:14:56 UTC (rev 19544)
+++ projects/haf/trunk/gtk+/ChangeLog 2009-12-03 11:24:49 UTC (rev 19545)
@@ -1,3 +1,12 @@
+2009-12-03 Christian Dywan <christian@lanedo.com>
+
+ Fixes: NB#125177 - GtkButton + hildon_gtk_widget_set_theme_size() has
+ wrong style when created via GtkBuilder
+
+ * gtk/gtkwidget.c (gtk_widget_buildable_interface_init),
+ (gtk_widget_buildable_set_name), (gtk_widget_buildable_get_name): Use
+ object data to store the buildable name.
+
2009-12-02 Christian Dywan <christian@lanedo.com>

* gtk/Makefile.am:

Modified: projects/haf/trunk/gtk+/docs/reference/gtk/tmpl/gtkbuildable.sgml
===================================================================
--- projects/haf/trunk/gtk+/docs/reference/gtk/tmpl/gtkbuildable.sgml 2009-12-02 16:14:56 UTC (rev 19544)
+++ projects/haf/trunk/gtk+/docs/reference/gtk/tmpl/gtkbuildable.sgml 2009-12-03 11:24:49 UTC (rev 19545)
@@ -41,10 +41,8 @@

@g_iface: the parent class
@set_name: Stores the name attribute given in the GtkBuilder UI definition.
- #GtkWidget maps this to the #GtkWidget:name property, and
- gtk_buildable_set_name() has a fallback implementation that stores
- the name as object data. Implement this method if your object
- has some notion of "name" and it makes sense to map the XML name
+ #GtkWidget stores the name as object data. Implement this method if your
+ object has some notion of "name" and it makes sense to map the XML name
attribute to it.
@get_name: The getter corresponding to @set_name. Implement this
if you implement @set_name.

Modified: projects/haf/trunk/gtk+/gtk/gtkwidget.c
===================================================================
--- projects/haf/trunk/gtk+/gtk/gtkwidget.c 2009-12-02 16:14:56 UTC (rev 19544)
+++ projects/haf/trunk/gtk+/gtk/gtkwidget.c 2009-12-03 11:24:49 UTC (rev 19545)
@@ -9627,6 +9627,7 @@
static GQuark quark_builder_has_default = 0;
static GQuark quark_builder_has_focus = 0;
static GQuark quark_builder_atk_relations = 0;
+static GQuark quark_builder_set_name = 0;

static void
gtk_widget_buildable_interface_init (GtkBuildableIface *iface)
@@ -9634,6 +9635,7 @@
quark_builder_has_default = g_quark_from_static_string ("gtk-builder-has-default");
quark_builder_has_focus = g_quark_from_static_string ("gtk-builder-has-focus");
quark_builder_atk_relations = g_quark_from_static_string ("gtk-builder-atk-relations");
+ quark_builder_set_name = g_quark_from_static_string ("gtk-builder-set-name");

iface->set_name = gtk_widget_buildable_set_name;
iface->get_name = gtk_widget_buildable_get_name;
@@ -9648,13 +9650,14 @@
gtk_widget_buildable_set_name (GtkBuildable *buildable,
const gchar *name)
{
- gtk_widget_set_name (GTK_WIDGET (buildable), name);
+ g_object_set_qdata_full (G_OBJECT (buildable), quark_builder_set_name,
+ g_strdup (name), g_free);
}

static const gchar *
gtk_widget_buildable_get_name (GtkBuildable *buildable)
{
- return gtk_widget_get_name (GTK_WIDGET (buildable));
+ return g_object_get_qdata (G_OBJECT (buildable), quark_builder_set_name);
}

static GObject *

_______________________________________________
maemo-commits mailing list
maemo-commits@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-commits