Re: Porting UIs to GtkBuilder

2009-04-15 Thread Ardhan Madras
I ever have this situation (in glade 3.4.5), my solution is: by copying it's 
parent window into a new window, let say you copy main_window into a new 
window named main_window1... delete the old one (main_window), rename 
main_window1 to main_window. save and try to convert it again... working 
for me ;p

I noticed another issues in GtkBuilder, when i grab a widget from a converted 
xml file with GtkBuilder, then set the widget property for example to set it's 
sensitive: gtk_widget_set_sensitive().. i got GTK_IS_WIDGET(widget) condition 
failed, i use g_object_set() instead and it's working...

-- ajhwb


--- t...@gnome.org wrote:

From: Tristan Van Berkom t...@gnome.org
To: Zeeshan Ali (Khattak) zee...@gmail.com
Cc: gtk-app-devel-list: gnome.org gtk-app-devel-list@gnome.org
Subject: Re: Porting UIs to GtkBuilder
Date: Tue, 14 Apr 2009 18:35:43 -0400

On Tue, Apr 14, 2009 at 4:50 PM, Zeeshan Ali (Khattak) zee...@gmail.com wrote:
 Hi,
   Reading through planet gnome and related mailing-lists recently, I
 got the impression that this would be a good time to port my UIs from
 libglade usage to GtkBuilder. So following the guidelines on this
 page:

 http://library.gnome.org/devel/gtk/stable/gtk-migrating-GtkBuilder.html

   I tried to do so:
 http://gitorious.org/projects/gupnp-tools/repos/mainline/commits/e8bb5436aa22009b5b312da5a459324382e889c5

Errr, try converting with Glade 3.6 instead of the conversion script ?

Thanks in advance,
-Tristan
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




_
Listen to KNAC, Hit the Home page and Tune In Live! --- http://www.knac.com
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Porting UIs to GtkBuilder

2009-04-15 Thread Zeeshan Ali (Khattak)
Hi,

On Wed, Apr 15, 2009 at 1:35 AM, Tristan Van Berkom t...@gnome.org wrote:
 On Tue, Apr 14, 2009 at 4:50 PM, Zeeshan Ali (Khattak) zee...@gmail.com 
 wrote:
 Hi,
   Reading through planet gnome and related mailing-lists recently, I
 got the impression that this would be a good time to port my UIs from
 libglade usage to GtkBuilder. So following the guidelines on this
 page:

 http://library.gnome.org/devel/gtk/stable/gtk-migrating-GtkBuilder.html

   I tried to do so:
 http://gitorious.org/projects/gupnp-tools/repos/mainline/commits/e8bb5436aa22009b5b312da5a459324382e889c5

 Errr, try converting with Glade 3.6 instead of the conversion script ?

   I just tried glade3 from trunk[1]. One of the three UIs just work
fine now but two others don't. One of them hits a fatal on startup:

console
$ gupnp-universal-cp
Gtk-Message: Failed to load module atk-bridge: libatk-bridge.so:
cannot open shared object file: No such file or directory

** (gupnp-universal-cp:12727): CRITICAL **: Unable to load the GUI
file /opt/gnome2/share/gupnp-tools/gupnp-universal-cp.ui: Unknown
internal child: image
/console

   The other one has some minor issues that i might be able to figure on my own:

console
(gupnp-av-cp:13063): Gtk-WARNING **: Cannot add an object of type
GtkMenu to a container of type GtkMenuItem

(gupnp-av-cp:13063): Gtk-WARNING **: Cannot add an object of type
GtkMenu to a container of type GtkMenuItem

(gupnp-av-cp:13063): Gtk-WARNING **: No object called:

(gupnp-av-cp:13063): Gtk-WARNING **: No object called:
/console

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124

[1] git://git-mirror.gnome.org/git/glade3
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Porting UIs to GtkBuilder

2009-04-15 Thread Tristan Van Berkom
On Wed, Apr 15, 2009 at 9:59 AM, Zeeshan Ali (Khattak) zee...@gmail.com wrote:
 Hi,
[...]

 Errr, try converting with Glade 3.6 instead of the conversion script ?

   I just tried glade3 from trunk[1]. One of the three UIs just work
 fine now but two others don't. One of them hits a fatal on startup:

 console
 $ gupnp-universal-cp
 Gtk-Message: Failed to load module atk-bridge: libatk-bridge.so:
 cannot open shared object file: No such file or directory

 ** (gupnp-universal-cp:12727): CRITICAL **: Unable to load the GUI
 file /opt/gnome2/share/gupnp-tools/gupnp-universal-cp.ui: Unknown
 internal child: image
 /console

   The other one has some minor issues that i might be able to figure on my 
 own:

 console
 (gupnp-av-cp:13063): Gtk-WARNING **: Cannot add an object of type
 GtkMenu to a container of type GtkMenuItem

 (gupnp-av-cp:13063): Gtk-WARNING **: Cannot add an object of type
 GtkMenu to a container of type GtkMenuItem

 (gupnp-av-cp:13063): Gtk-WARNING **: No object called:

 (gupnp-av-cp:13063): Gtk-WARNING **: No object called:
 /console

Did Glade at least give you a warning after loading the old
Glade file, converting it and saving it (at save time) ?

It looks like either
  a.) You did not convert the old Glade file using Glade
and or
  b.) You are running an old version of GTK+ unsupported
   by your Glade file (there should be a requires tag
   specifying the minimum required version, configure this
   from your project's preferences dialog).

Note that GTK+  2.16 does not natively support building
of menus and that Glade 3.6 only converts to native menu
representation (i.e. no roundabout building of uimanagers
that build menus).

I am extra curious about how you ended up with an
internal image in a GtkImageMenuItem (if I'm guessing
your Glade file correctly), those are supposed to be
internal only in libglade format and referenced (by object
type property) in GtkBuilder format.

Cheers,
   -Tristan
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Porting UIs to GtkBuilder

2009-04-15 Thread Zeeshan Ali (Khattak)
Hi Tristan,

On Wed, Apr 15, 2009 at 7:43 PM, Tristan Van Berkom t...@gnome.org wrote:
 It looks like either
  a.) You did not convert the old Glade file using Glade
 and or

   Somehow that was the case. Don't ask me how but now that i rebooted
the machine, the glade3 inside my jhbuild does the conversion nicely
and my UIs work more or less out of the box. Thanks a lot for your
replies.

 I am extra curious about how you ended up with an
 internal image in a GtkImageMenuItem (if I'm guessing
 your Glade file correctly), those are supposed to be
 internal only in libglade format and referenced (by object
 type property) in GtkBuilder format.

  That is gone too now with a fresh conversion using glade3 so I am
afraid, we might never find out. :) Thanks again.

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Porting UIs to GtkBuilder

2009-04-14 Thread Zeeshan Ali (Khattak)
Hi,
   Reading through planet gnome and related mailing-lists recently, I
got the impression that this would be a good time to port my UIs from
libglade usage to GtkBuilder. So following the guidelines on this
page:

http://library.gnome.org/devel/gtk/stable/gtk-migrating-GtkBuilder.html

   I tried to do so:
http://gitorious.org/projects/gupnp-tools/repos/mainline/commits/e8bb5436aa22009b5b312da5a459324382e889c5

   With this change, everything builds but I get this error from two
of my UIs on startup:

Gtk:ERROR:gtkbuilder.c:541:_gtk_builder_add: assertion failed:
(GTK_IS_BUILDABLE (parent))
Aborted

  The error from the third UI says a bit more so i think i can debug
that on my own, but what is this supposed to mean?

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Porting UIs to GtkBuilder

2009-04-14 Thread Tristan Van Berkom
On Tue, Apr 14, 2009 at 4:50 PM, Zeeshan Ali (Khattak) zee...@gmail.com wrote:
 Hi,
   Reading through planet gnome and related mailing-lists recently, I
 got the impression that this would be a good time to port my UIs from
 libglade usage to GtkBuilder. So following the guidelines on this
 page:

 http://library.gnome.org/devel/gtk/stable/gtk-migrating-GtkBuilder.html

   I tried to do so:
 http://gitorious.org/projects/gupnp-tools/repos/mainline/commits/e8bb5436aa22009b5b312da5a459324382e889c5

Errr, try converting with Glade 3.6 instead of the conversion script ?

Thanks in advance,
-Tristan
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list