Gtk::UIManager aborting program execution
- From: Miguel Angel Polo <miguel polo telefonica net>
- To: gtkmm-list gnome org
- Subject: Gtk::UIManager aborting program execution
- Date: Wed, 12 Jan 2005 22:05:20 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all (again)
I have spent some time changing my application interface, to start using
Gtk::UIManager (really cool and nice feature, very comfortable).
Inside a sample class' (derived from Gtk::Window) ctor I have this piece
of code (almost the same code from gtkmm manual):
-
-------------------------------------------------------------------------------------------
~ m_refActionGroup = Gtk::ActionGroup::create();
~ // File Menu
~ m_refActionGroup->add(Gtk::Action::create("FileMenu","_File"));
~ m_refActionGroup->add(Gtk::Action::create("FileNew",Gtk::Stock::NEW),
~ sigc::mem_fun(*this,&LSDWindow::on_action_file_new));
~ m_refActionGroup->add(Gtk::Action::create("FileOpen",Gtk::Stock::OPEN),
~ sigc::mem_fun(*this,&LSDWindow::on_action_file_open));
~ m_refActionGroup->add(Gtk::Action::create("FileSave",Gtk::Stock::SAVE),
~ sigc::mem_fun(*this,&LSDWindow::on_action_file_save));
m_refActionGroup->add(Gtk::Action::create("FileSaveAs",Gtk::Stock::SAVE_AS),
~ sigc::mem_fun(*this,&LSDWindow::on_action_file_saveas));
~ m_refActionGroup->add(Gtk::Action::create("FileQuit",Gtk::Stock::QUIT),
~ sigc::mem_fun(*this,&LSDWindow::on_action_file_quit));
~ // Help Menu
~ m_refActionGroup->add(Gtk::Action::create("HelpMenu",Gtk::Stock::HELP));
~ m_refActionGroup->add(Gtk::Action::create("HelpAbout","_About"),
~ sigc::mem_fun(*this,&LSDWindow::on_action_help_about));
~ m_refUIManager = Gtk::UIManager::create();
~ m_refUIManager->insert_action_group(m_refActionGroup);
~ Glib::ustring ui_info =
"<ui>"
"<menubar name='MenuBar'>"
"<menu action='FileMenu'>"
"<menuitem action='FileNew'/>"
"<menuitem action='FileOpen'/>"
"<menuitem action='FileSave'/>"
"<menuitem action='FileSaveAs'/>"
~ "<separator/>"
"<menuitem action='FileQuit'/>"
"</menu>"
"<menu action='HelpMenu'>"
"<menuitem action='HelpAbout'/>"
"</menu>"
"</menubar>"
"<toolbar name='ToolBar'>"
"<toolitem action='FileNew'/>'"
"<toolitem action='FileOpen'/>"
"<toolitem action='FileSave'/>"
"<toolitem action='FileSaveAs'/>"
"<separator/>"
"<toolitem action='FileQuit'/>"
"<separator/>"
"<toolitem action='HelpAbout'/>"
"</toolbar>"
"</ui>";
~ try
~ {
~ m_refUIManager->add_ui_from_string(ui_info);
~ }
~ catch(Glib::Error& e)
~ {
~ std::cerr << e.what() << std::endl;
~ }
-
-------------------------------------------------------------------------------------------
but add_ui_from_string() aborts execution ("Aborted" is all the feedback
I get).
I have even tried using add_ui_from_file, using an XML file with the
code above, with same results.
I just want to enjoy UIManager, some help will be appreciated.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFB5ZEQZSBU6dC79g0RAobwAJ0brX42y8gPvHmiOza5az9R5aLDOwCfb5n9
74dmreqaosVQkbNoieWW1HE=
=+mU9
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]