[gnote] Add support for separators in widget action menu
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Add support for separators in widget action menu
- Date: Sun, 30 Mar 2014 18:25:00 +0000 (UTC)
commit a899cc600bedee000a3b6a687ab60c1231304662
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Mar 30 21:21:26 2014 +0300
Add support for separators in widget action menu
src/recentchanges.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/recentchanges.cpp b/src/recentchanges.cpp
index d4d5a4d..5992d40 100644
--- a/src/recentchanges.cpp
+++ b/src/recentchanges.cpp
@@ -679,8 +679,8 @@ namespace gnote {
std::vector<Gtk::MenuItem*> & NoteRecentChanges::make_menu_items(std::vector<Gtk::MenuItem*> & items,
const std::vector<Glib::RefPtr<Gtk::Action> > & actions)
{
- for(std::vector<Glib::RefPtr<Gtk::Action> >::const_iterator iter = actions.begin(); iter !=
actions.end(); ++iter) {
- Gtk::MenuItem *item = manage((*iter)->create_menu_item());
+ FOREACH(Glib::RefPtr<Gtk::Action> action, actions) {
+ Gtk::MenuItem *item = manage(action ? action->create_menu_item() : new Gtk::SeparatorMenuItem);
items.push_back(item);
}
return items;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]