gnome_program_init() error while loading main window with libglademm
- From: Andrea <edriv email it>
- To: gnomemm-list gnome org
- Subject: gnome_program_init() error while loading main window with libglademm
- Date: Mon, 09 Jan 2006 16:56:21 +0100
I tried to write a little program that opens loads a window from a glade
file.
When the program starts I get this error:
GnomeUI-ERROR **: You must call gnome_program_init() before creating a
GnomeApp
aborting...
Have I to call this function or it is the same og a Gtk::Main object?
Here's my code:
(main.cpp)
> Gtk::Main kit(argc, argv);
> FogwerGui window;
> kit.run(window.get_main_window());
(fogwergui.h)
> class FogwerGui {
> ...
> Gtk::Window &get_main_window(); // just returns *main_window
> Gtk::Window *main_window, *pref_window;
> Gtk::VBox *menubox_auto, *menubox_generic;
> ... }
(fogwergui.cpp)
>FogwerGui::FogwerGui(MenuManager &m)
>{
> Glib::RefPtr<Gnome::Glade::Xml> refXml =
Gnome::Glade::Xml::create("fogwer.glade");
> if(!refXml) return;
> refXml->get_widget("app_main", main_window);
> refXml->get_widget("win_pref", pref_window);
> refXml->get_widget("auto_menu", menubox_auto);
> refXml->get_widget("generic_menu", menubox_generic);
> main_window->show();
>}
Have I to make my class derive from Gtk::Window?
But if I do so, I can't load the window from the glade file... i haven't
understood anything.
What's wring? and I'm sorry... I can't speak English. I hope you will
understand me.
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor:
Vuoi proteggere la tua casa? Chiedi a Ras come, clicca e fai un preventivo online!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=4028&d=9-1
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]