From b3f55760cbb99bd4cc96d86eae8068e724d0abe9 Mon Sep 17 00:00:00 2001 From: John Smith Date: Sun, 2 Sep 2012 13:24:45 +0900 Subject: Fix for 273539 : Add Group action to the context menu (bzr r11640) --- src/interface.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/interface.cpp') diff --git a/src/interface.cpp b/src/interface.cpp index 71be84f59..b10ba3077 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -1887,6 +1887,17 @@ void ContextMenu::MakeItemMenu (void) } mi->show(); append(*mi); + + /* Group */ + mi = manage(new Gtk::MenuItem(_("_Group"),1)); + mi->signal_activate().connect(sigc::mem_fun(*this, &ContextMenu::ActivateGroup)); + if (_desktop->selection->isEmpty() || _desktop->selection->single()) { + mi->set_sensitive(FALSE); + } else { + mi->set_sensitive(TRUE); + } + mi->show(); + append(*mi); } void ContextMenu::SelectSameFillStroke(void) @@ -1979,6 +1990,11 @@ void ContextMenu::MakeGroupMenu(void) append(*mi); } +void ContextMenu::ActivateGroup(void) +{ + sp_selection_group(_desktop); +} + void ContextMenu::ActivateUngroup(void) { GSList *children = NULL; -- cgit v1.2.3