Glade problem

Linux specific forum
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Glade problem

Post by Trond »

Edit: But it still doesn't show the window. The glade_xml_get_widget() also fails.

Edit: I found out. libglade.so.0 should be libglade-2.0.so.

This is my code:

Code: Select all

ImportC "/usr/lib/libglade.so.0"
  glade_xml_new(filename.s, root.s, domain.s)
  glade_xml_get_widget(a.l, b.s)
  glade_init()
EndImport
  
  gtk_init_(0, 0)
  Debug FileSize("/home/trond/Source/Juggernaught/juggernaught.glade")
  main_window = glade_xml_new ("/home/trond/Source/Juggernaught/juggernaught.glade", "", "")
  Debug main_window
  widget = glade_xml_get_widget(main_window, "wnd_main")
  Debug widget
For some reason, glade_xml_new() fails. What's wrong?
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

Post by walker »

hmmm.. tried it with one of my apps... it fails too.. but only if you don't specify the root widget in

Code: Select all

  main_window = glade_xml_new ("/home/trond/Source/Juggernaught/juggernaught.glade", "", "") 
replace the first "" with the first created widget (i.e window1) and all works well

I guess (as I tried the same with Openlibrary) that there must be a small bug in libglade-2 ... it works not as described in the docs... :roll:
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Ok, thanks I will try that. (As you say, it shouldn't be required to specify a root widget.)
Post Reply