Glade-2 and deprecated gdk_pixbuf_unref() call / Glade-3
Hi, Glade-3 was released as stable a few months ago, right? I saw http://glade.gnome.org stated that Glade-3 requires GTK+ 2.8. Does it mean that the resulting application requires GTK+2.8 too? Or was it a requirement for the development machine only? My application baseline is GTK+ 2.4; does that mean that I can't use Glade-3 in my project yet? I'm trying to get rid of the deprecated gdk_pixbuf_unref() calls in the *_interface.c files from Glade-2. Is there a recommended way to do that? Is Glade-2 going to be fixed to not produce deprecated function calls? This particular fix is really easy -- just replacing gdk_pixbuf_unref() with g_object_unref(). If there is no interest in fixing Glade-2, is there a work-around I can use without manually changing / post-processing the generated files? Thanks. -- Daniel Yek ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Glade-2 and deprecated gdk_pixbuf_unref() call / Glade-3
On Wed, Dec 27, 2006 at 11:23:16AM -0800, Daniel Yek wrote: > I'm trying to get rid of the deprecated gdk_pixbuf_unref() calls in the > *_interface.c files from Glade-2. > > Is there a recommended way to do that? Is Glade-2 going to be fixed to not > produce deprecated function calls? > > This particular fix is really easy -- just replacing gdk_pixbuf_unref() > with g_object_unref(). > > If there is no interest in fixing Glade-2, is there a work-around I can use > without manually changing / post-processing the generated files? Keep them there, this is just a futile excercise. The whole code generation thing is deprecated, so any generated code is essentially deprecated by definition. gdk_pixbuf_unref() is defined void gdk_pixbuf_unref (GdkPixbuf *pixbuf) { g_object_unref (pixbuf); } therefore it does exactly what it should and it isn't going to disappear sooner than in Gtk+ 3.0. If you compile your code with various -DFOO_DISABLE_DEPRECATED then I hope you don't do this in the production version because it's not forward-compatible and I suggest to just leave out these defines for the [deprecated] generated code. Yeti -- Whatever. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Glade-2 and deprecated gdk_pixbuf_unref() call / Glade-3
On Wednesday 27 December 2006 20:23, Daniel Yek wrote: > Hi, > > Glade-3 was released as stable a few months ago, right? > > I saw http://glade.gnome.org stated that Glade-3 requires GTK+ 2.8. Does it > mean that the resulting application requires GTK+2.8 too? Or was it a > requirement for the development machine only? > > My application baseline is GTK+ 2.4; does that mean that I can't use > Glade-3 in my project yet? > > > > I'm trying to get rid of the deprecated gdk_pixbuf_unref() calls in the > *_interface.c files from Glade-2. > > Is there a recommended way to do that? Is Glade-2 going to be fixed to not > produce deprecated function calls? > > This particular fix is really easy -- just replacing gdk_pixbuf_unref() > with g_object_unref(). > If there is no interest in fixing Glade-2, is there a work-around I can use > without manually changing / post-processing the generated files? Maybe: #define gdk_pixbuf_unref g_object_unref Ciao, Tito > > > Thanks. > > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Glade-2 and deprecated gdk_pixbuf_unref() call / Glade-3
At 11:51 AM 12/27/2006, [EMAIL PROTECTED] wrote: >On Wednesday 27 December 2006 20:23, Daniel Yek wrote: > > I'm trying to get rid of the deprecated gdk_pixbuf_unref() calls in the > > *_interface.c files from Glade-2. > > > > Is there a recommended way to do that? Is Glade-2 going to be fixed to not > > produce deprecated function calls? > > > > This particular fix is really easy -- just replacing gdk_pixbuf_unref() > > with g_object_unref(). > > If there is no interest in fixing Glade-2, is there a work-around I can > use > > without manually changing / post-processing the generated files? > >Maybe: > >#define gdk_pixbuf_unref g_object_unref That's right...adding the define to the compiler command line will do: -Dgdk_pixbuf_unref=g_object_unref Thanks for pointing out such an obvious solution that I don't know how I missed. -- Daniel Yek >Ciao, >Tito > > > > > > > Thanks. > > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Glade-2 and deprecated gdk_pixbuf_unref() call / Glade-3
At 11:49 AM 12/27/2006, David wrote: >On Wed, Dec 27, 2006 at 11:23:16AM -0800, Daniel Yek wrote: > > I'm trying to get rid of the deprecated gdk_pixbuf_unref() calls in the > > *_interface.c files from Glade-2. > > > > Is there a recommended way to do that? Is Glade-2 going to be fixed to not > > produce deprecated function calls? > > > >Keep them there, Thanks for responding. gdk_pixbuf_unref() is undefined in LSB 3.1, so I can't leave them there. http://refspecs.freestandards.org/LSB_3.1.0/LSB-Desktop-generic/LSB-Desktop-generic/libgtk-x11-2.0.html http://refspecs.freestandards.org/LSB_3.1.0/LSB-Desktop-generic/LSB-Desktop-generic/book1.html At this point, we are only going to use APIs defined in LSB 3.1, so it would help if tools facilitate creation of LSB 3.1-conforming application. -- Daniel Yek >this is just a futile excercise. >The whole code generation thing is deprecated, so any >generated code is essentially deprecated by definition. > >gdk_pixbuf_unref() is defined > >void >gdk_pixbuf_unref (GdkPixbuf *pixbuf) >{ > g_object_unref (pixbuf); >} > >therefore it does exactly what it should and it isn't going >to disappear sooner than in Gtk+ 3.0. > >If you compile your code with various -DFOO_DISABLE_DEPRECATED >then I hope you don't do this in the production version >because it's not forward-compatible and I suggest to just >leave out these defines for the [deprecated] generated code. > >Yeti > > >-- >Whatever. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Glade-2 and deprecated gdk_pixbuf_unref() call / Glade-3
On Wed, Dec 27, 2006 at 12:44:50PM -0800, Daniel Yek wrote: > > gdk_pixbuf_unref() is undefined in LSB 3.1, so I can't leave them there. > http://refspecs.freestandards.org/LSB_3.1.0/LSB-Desktop-generic/LSB-Desktop-generic/libgtk-x11-2.0.html > http://refspecs.freestandards.org/LSB_3.1.0/LSB-Desktop-generic/LSB-Desktop-generic/book1.html > > > At this point, we are only going to use APIs defined in LSB 3.1, so it > would help if tools facilitate creation of LSB 3.1-conforming application. OK, if you mention LSB as a reason for anything I'm giving up logical argumentation. Yeti -- Whatever. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Glade-2 and deprecated gdk_pixbuf_unref() call / Glade-3
At 12:26 PM 12/27/2006, Daniel Yek wrote: >At 11:51 AM 12/27/2006, [EMAIL PROTECTED] wrote: > >On Wednesday 27 December 2006 20:23, Daniel Yek wrote: > > > I'm trying to get rid of the deprecated gdk_pixbuf_unref() calls in the > > > *_interface.c files from Glade-2. > > > > >Maybe: > > > >#define gdk_pixbuf_unref g_object_unref > >That's right...adding the define to the compiler command line will do: >-Dgdk_pixbuf_unref=g_object_unref Actually, I said that too fast. This would affect GTK+ header file function prototype and won't work. The solution is to include the #define in support.h generated by Glade-2. This is my work-around until we can adopt Glade-3 in the future. -- Daniel Yek ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list