[gtkmm-documentation/gmenu] gmenu: Slight changes
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm-documentation/gmenu] gmenu: Slight changes
- Date: Wed, 7 Aug 2013 13:07:55 +0000 (UTC)
commit cf239fac958bb32f34fa7979309ddd81a6904077
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Aug 7 14:43:44 2013 +0200
gmenu: Slight changes
examples/book/menus/popup/examplewindow.cc | 47 ++++++++++++++-------------
examples/book/menus/popup/examplewindow.h | 1 -
2 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/examples/book/menus/popup/examplewindow.cc b/examples/book/menus/popup/examplewindow.cc
index f1bf0e7..63b9ef6 100644
--- a/examples/book/menus/popup/examplewindow.cc
+++ b/examples/book/menus/popup/examplewindow.cc
@@ -40,47 +40,48 @@ ExampleWindow::ExampleWindow()
//Fill menu:
- m_refActionGroup = Gio::SimpleActionGroup::create();
+ Glib::RefPtr<Gio::SimpleActionGroup> refActionGroup =
+ Gio::SimpleActionGroup::create();
//File|New sub menu:
//These menu actions would normally already exist for a main menu, because a
//context menu should not normally contain menu items that are only available
//via a context menu.
- m_refActionGroup->add_action("edit",
+ refActionGroup->add_action("edit",
sigc::mem_fun(*this, &ExampleWindow::on_menu_file_popup_generic));
- m_refActionGroup->add_action("process", //TODO: How to specify "<control>P" as an accelerator.
+ refActionGroup->add_action("process", //TODO: How to specify "<control>P" as an accelerator.
sigc::mem_fun(*this, &ExampleWindow::on_menu_file_popup_generic));
- m_refActionGroup->add_action("remove",
+ refActionGroup->add_action("remove",
sigc::mem_fun(*this, &ExampleWindow::on_menu_file_popup_generic));
- insert_action_group("examplepopup", m_refActionGroup);
+ insert_action_group("examplepopup", refActionGroup);
m_refBuilder = Gtk::Builder::create();
//Layout the actions in a menubar and toolbar:
Glib::ustring ui_info =
- "<interface>"
- " <menu id='menu-examplepopup'>"
- " <section>"
- " <item>"
- " <attribute name='label' translatable='yes'>Edit</attribute>"
- " <attribute name='action'>examplepopup.edit</attribute>"
- " </item>"
- " <item>"
- " <attribute name='label' translatable='yes'>Process</attribute>"
- " <attribute name='action'>examplepopup.process</attribute>"
- " </item>"
- " <item>"
- " <attribute name='label' translatable='yes'>Remove</attribute>"
- " <attribute name='action'>examplepopup.remove</attribute>"
- " </item>"
- " </section>"
- " </menu>"
- "</interface>";
+ "<interface>"
+ " <menu id='menu-examplepopup'>"
+ " <section>"
+ " <item>"
+ " <attribute name='label' translatable='yes'>Edit</attribute>"
+ " <attribute name='action'>examplepopup.edit</attribute>"
+ " </item>"
+ " <item>"
+ " <attribute name='label' translatable='yes'>Process</attribute>"
+ " <attribute name='action'>examplepopup.process</attribute>"
+ " </item>"
+ " <item>"
+ " <attribute name='label' translatable='yes'>Remove</attribute>"
+ " <attribute name='action'>examplepopup.remove</attribute>"
+ " </item>"
+ " </section>"
+ " </menu>"
+ "</interface>";
try
{
diff --git a/examples/book/menus/popup/examplewindow.h b/examples/book/menus/popup/examplewindow.h
index 8ac9177..d57d4ad 100644
--- a/examples/book/menus/popup/examplewindow.h
+++ b/examples/book/menus/popup/examplewindow.h
@@ -38,7 +38,6 @@ protected:
Gtk::Label m_Label;
Glib::RefPtr<Gtk::Builder> m_refBuilder;
- Glib::RefPtr<Gio::SimpleActionGroup> m_refActionGroup;
Gtk::Menu* m_pMenuPopup;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]