Re: Menubar items created in a loop



Hello Adam

I'm not sure about the solution. You can look at my sources, where I use loop and UIManager for building dynamic menus.  The function is the next one:
Gtk::Menu* MainWindow::BuildBgSubmenu ()
I hope it might help you.

Sincerely,
Vlad Volodin


2009/3/2 Adam Kovari <kovariadam gmail com>
Hello,
i am unable to find any documentation or examples for creating menu items in loop.
This approach creates nothing and gives no error.

    Glib::RefPtr<Gtk::UIManager> m_refUIManager;
    Glib::RefPtr<Gtk::ActionGroup> m_refActionGroup;
while(...)
        m_refActionGroup->get_action("Connect")->create("aaa");

    m_refUIManager = Gtk::UIManager::create();
    m_refUIManager->insert_action_group(m_refActionGroup);

refActionGroup contains some other menus and there is xml containing its UI definition
m_refUIManager->add_ui_from_file("MainWindow.MenuBar.ui.xml");

Can you please provide me with some example code?

Thanks in advance
--
---
Adam Kovari(mailto:kovariadam gmail com)

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]