[Gtk-sharp-list] show gnome window in glade

John Luke jluke@users.sourceforge.net
Sat, 15 May 2004 18:05:03 -0400

Rob Brown-Bayliss wrote:

>Hi.  I am just playing about with monodevelop and have created a basic
>project with a glade gui.  
>I am having a basic problem I guess, if the glade gui uses a standard
>window, when running the .exe the window will show, but if I try to use
>a gnome window the window will not show.
>in this code:
>Glade.XML gxml = new Glade.XML (null, "gui.glade", "window1", null);
>I replace the window1 with app1 as this is what glade calls the first
>gnome window, and the window is set to show.  
>But nothing happens, unless I am trying to show a basic window.  Is
>there some other step that must be taken to show a gnomeapp window?
When you step into the Gnome-side of things you have to make sure it is 
also initialized.  Instead of Gtk.Application.Init () and 
Gtk.Application.Run() you need to do:
Gnome.Program p = new Gnome.Program ("Name", "Version", 
Gnome.Modules.UI, args);
and p.Run (); which initializes the underlying gnome libs.  Also, look 
for a line in the .glade file like:
<requires lib="gnome" />.