[glom] PrintLayoutEdit: Revert changes to use the win. actio group.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] PrintLayoutEdit: Revert changes to use the win. actio group.
- Date: Mon, 21 Oct 2013 09:44:52 +0000 (UTC)
commit 300486bb4bbe13846e3d05a0ba67faeaa9b1c1b9
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Oct 21 11:42:58 2013 +0200
PrintLayoutEdit: Revert changes to use the win. actio group.
For some reason the menu items are not enabled, suggesting that
the actions are not recognized.
glom/frame_glom.cc | 4 ++++
.../print_layouts/window_print_layout_edit.cc | 18 ++++++++++--------
ui/developer/window_print_layout_edit.glade | 16 ++++++++--------
3 files changed, 22 insertions(+), 16 deletions(-)
---
diff --git a/glom/frame_glom.cc b/glom/frame_glom.cc
index 1c3e814..526cea4 100644
--- a/glom/frame_glom.cc
+++ b/glom/frame_glom.cc
@@ -1828,6 +1828,10 @@ void Frame_Glom::on_box_print_layouts_selected(const Glib::ustring& print_layout
Glib::RefPtr<Gtk::Application> app = app_window->get_application();
if(app)
app->add_window(*m_pDialogLayoutPrint);
+ else
+ {
+ std::cerr << G_STRFUNC << ": app is null." << std::endl;
+ }
}
m_pDialog_PrintLayouts->hide();
diff --git a/glom/mode_design/print_layouts/window_print_layout_edit.cc
b/glom/mode_design/print_layouts/window_print_layout_edit.cc
index fc52228..4d9f6f8 100644
--- a/glom/mode_design/print_layouts/window_print_layout_edit.cc
+++ b/glom/mode_design/print_layouts/window_print_layout_edit.cc
@@ -196,27 +196,29 @@ void Window_PrintLayout_Edit::init_menu()
{
Glib::RefPtr<Gio::SimpleActionGroup> action_group = Gio::SimpleActionGroup::create();
- add_action("page-setup",
+ action_group->add_action("page-setup",
sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_menu_file_page_setup));
- add_action("print-preview",
+ action_group->add_action("print-preview",
sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_menu_file_print_preview) );
- m_action_edit_cut = add_action("cut",
+ //TODO: Use the regular add_action() for the standard menu items, using the win. prefix in the .glade file,
+ //when we can get that to work:
+ m_action_edit_cut = action_group->add_action("cut",
sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_menu_edit_cut) );
- m_action_edit_copy = add_action("copy",
+ m_action_edit_copy = action_group->add_action("copy",
sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_menu_edit_copy) );
- m_action_edit_paste = add_action("paste",
+ m_action_edit_paste = action_group->add_action("paste",
sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_menu_edit_paste) );
m_action_edit_paste->set_enabled(false); //This is enabled when something is copied or cut.
- m_action_edit_delete = add_action("delete",
+ m_action_edit_delete = action_group->add_action("delete",
sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_menu_edit_delete) );
- add_action("select-all",
+ action_group->add_action("select-all",
sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_menu_edit_selectall) ); //TODO:
Gtk::AccelKey("<control>A"), //TODO: Suggest this as part of the stock item in GTK+?
- add_action("unselect-all", //TODO: Propose a new stock item for GTK+.
+ action_group->add_action("unselect-all", //TODO: Propose a new stock item for GTK+.
sigc::mem_fun(*this, &Window_PrintLayout_Edit::on_menu_edit_unselectall) );
action_group->add_action("insert-field",
diff --git a/ui/developer/window_print_layout_edit.glade b/ui/developer/window_print_layout_edit.glade
index 992d295..2225866 100644
--- a/ui/developer/window_print_layout_edit.glade
+++ b/ui/developer/window_print_layout_edit.glade
@@ -9,11 +9,11 @@
<section>
<item>
<attribute name='label' translatable='yes'>Page Set_up</attribute>
- <attribute name='action'>win.pagesetup</attribute>
+ <attribute name='action'>printlayout.pagesetup</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>Print Pre_view</attribute>
- <attribute name='action'>win.printpreview</attribute>
+ <attribute name='action'>printlayout.printpreview</attribute>
</item>
</section>
</submenu>
@@ -22,29 +22,29 @@
<section>
<item>
<attribute name='label' translatable='yes'>Cu_t</attribute>
- <attribute name='action'>win.cut</attribute>
+ <attribute name='action'>printlayout.cut</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Copy</attribute>
- <attribute name='action'>win.copy</attribute>
+ <attribute name='action'>printlayout.copy</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Paste</attribute>
- <attribute name='action'>win.paste</attribute>
+ <attribute name='action'>printlayout.paste</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Delete</attribute>
- <attribute name='action'>win.delete</attribute>
+ <attribute name='action'>printlayout.delete</attribute>
</item>
</section>
<section>
<item>
<attribute name='label' translatable='yes'>Select _All</attribute>
- <attribute name='action'>win.selectall</attribute>
+ <attribute name='action'>printlayout.select-all</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Unselect All</attribute>
- <attribute name='action'>win.unselectall</attribute>
+ <attribute name='action'>printlayout.unselect-all</attribute>
</item>
</section>
</submenu>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]