Re: GTK adjustement changes create incompatible behaviour between versions?



I think GTK+ is now doing the right thing.

>From my understanding, this only affects UIs created with Glade (which
has been setting a page_size of 10 -- and it seems still isn't fixed).

Matt here developed a workaround for this in libglade. That sets the
page_size to 0 and reports a warning that your app is broken.

FWIW, I have mentioned this change in the developer section of the 2.24
release notes.

--davyd

On Mon, 2008-09-22 at 09:12 +0100, Ghee Teo wrote:
> Hi Vincent,
> 
> While you have just announced 2.24.0 tarballs to be available for 22nd Sep.
> Does this mean we are going to ship 2.24.0 without an possible 
> resolution to this regression?
> Since applications would not have a change to workaround this should 
> gtk+ is not going to
> back up this feature. If gtk+ going to back out this feature, it can 
> only be done after 23rd Sept!
> 
> Have the release team considered moving the 2.24.0 release date by a 
> couple of days to
> accommodate this?
> 
> -Ghee
> 
> Vincent Untz wrote:
> > Le vendredi 19 septembre 2008, à 09:17 -0400, Matthias Clasen a écrit :
> >   
> >> I don't see any way around discussing this with the GTK+ team before
> >> taking any decisions.
> >>     
> >
> > I was hoping this would be discussed on gtk-devel-list and that a
> > decision would have been taken there :/
> >
> >   
> >> If you think this is a blocker for 2.24, then having it reverted on
> >> September 23 should still be good for a Gnome release on September 24.
> >>     
> >
> > Hrm, well, that's definitely late for smoketesting...
> >
> > Vincent
> >
> >   
> 
> 
> _______________________________________________
> desktop-devel-list mailing list
> desktop-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/desktop-devel-list
-- 
Davyd Madeley        Software Engineer
Fugro Seismic Imaging, Perth Australia
--- libglade-2.6.3/glade/glade-gtk.c.orig	2008-08-18 15:58:59.000000000 +0800
+++ libglade-2.6.3/glade/glade-gtk.c	2008-09-22 11:59:39.000000000 +0800
@@ -1130,6 +1130,31 @@
     return NULL;
 }
 
+static GtkWidget *
+fsi_glade_build_gtkspinbutton(GladeXML *xml, GType widget_type,
+                              GladeWidgetInfo *info)
+{
+    GtkWidget *w;
+    w = glade_standard_build_widget(xml, widget_type, info);
+    if (w) {
+        GObject *adj;
+        g_object_get(w, "adjustment", &adj, NULL);
+        if (adj) {
+            double page_size;
+            g_object_get(adj, "page_size", &page_size, NULL);
+            if (page_size != 0.0)
+            {
+                g_warning ("Spin button '%s' has non-zero page_size (%f). Workaround applied.",
+                           info->name, page_size);
+            }
+            page_size = 0;
+            g_object_set(adj, "page_size", &page_size, NULL);
+            g_object_unref(adj);
+        }
+    }
+    return w;
+}
+
 void
 _glade_init_gtk_widgets(void)
 {
@@ -1313,7 +1338,7 @@
     glade_register_widget (GTK_TYPE_SOCKET, glade_standard_build_widget,
 			   NULL, NULL);
 #endif
-    glade_register_widget (GTK_TYPE_SPIN_BUTTON, glade_standard_build_widget,
+    glade_register_widget (GTK_TYPE_SPIN_BUTTON, fsi_glade_build_gtkspinbutton,
 			   NULL, NULL);
     glade_register_widget (GTK_TYPE_STATUSBAR, glade_standard_build_widget,
 			   NULL, NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]