Hi!
I tried the derived example which works just fine. Now I
tried to include it in my Pertergrin program code.
This is a main window (Gtk::Window, currently not using
gtk_widget_derived) and a Gtk::Dialog which is opened
by using a menu item. I use it this way:
Glib::RefPtr<Gnome::Glade::Xml> oRefGlade;
oRefGlade = Gnome::Glade::Xml::create(Glib::ustring(GUI_DIRECTORY) +
Glib::ustring("/worlddialog.glade"));
// Open world dialog
if( !mopWorldDialog )
{
oRefGlade->get_widget_derived("WorldDialog", mopWorldDialog);
//mopWorldDialog = new PTGWorldDialog();
}
if( mopWorldDialog )
{
iRes = mopWorldDialog->run();
The dialog does open, but there is also another (small) empty
window opened when I call run(). I have to close this window or
the dialog cannot be used.
If I press "Ok" or "Cancel" I call the hide() method (also tried
hide_all() ). This has contrary to the example program no effect
at all. The window is not hidden (I checked that the slot gets
called). I also tried to use the response() call and hide
the dialog from the mainwindow -> no effect at all.
How do I access my dialog properly ?
The complete code is available from CVS on
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/pertergrin/pertergrin/editor/gui/
The dialog is worlddialog.cc/worlddialog.h, the main window is
mainwindow.cc/mainwindow.h
Many thanks for helping,
Reinhard Katzmann
--
Software-Engineer, Developer for Embedded Devices
Project: Pertergrin - a RPG system - http://pertergrin.berlios.de
GnuPG Public Key available on request
Attachment:
pgpLShd0TNw2J.pgp
Description: PGP signature