From 523db871138277062675db9108cbcb3ca61da5e1 Mon Sep 17 00:00:00 2001 From: Nick Dedekind Date: Tue, 8 Sep 2015 12:38:18 +0100 Subject: accelerators --- libqmenumodel/src/unitymenumodel.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libqmenumodel/src/unitymenumodel.cpp b/libqmenumodel/src/unitymenumodel.cpp index 63d5e5b..56d73c6 100644 --- a/libqmenumodel/src/unitymenumodel.cpp +++ b/libqmenumodel/src/unitymenumodel.cpp @@ -50,7 +50,9 @@ enum MenuRoles { ActionStateRole, IsCheckRole, IsRadioRole, - IsToggledRole + IsToggledRole, + KeySequence, + HasSubmenu }; class UnityMenuModelPrivate @@ -482,6 +484,12 @@ QVariant UnityMenuModel::data(const QModelIndex &index, int role) const case IsToggledRole: return gtk_menu_tracker_item_get_toggled (item) == TRUE ? true : false; + case KeySequence: + return QKeySequence(gtk_menu_tracker_item_get_accel (item), QKeySequence::NativeText); + + case HasSubmenu: + return gtk_menu_tracker_item_get_has_submenu (item) == TRUE ? true : false; + default: return QVariant(); } @@ -513,6 +521,8 @@ QHash UnityMenuModel::roleNames() const names[IsCheckRole] = "isCheck"; names[IsRadioRole] = "isRadio"; names[IsToggledRole] = "isToggled"; + names[KeySequence] = "keySequence"; + names[HasSubmenu] = "hasSubmenu"; return names; } -- cgit v1.2.3 From 388be5be7f75b06578074d7a0f6e80caf06f31cb Mon Sep 17 00:00:00 2001 From: Nick Dedekind Date: Tue, 4 Oct 2016 13:17:20 +0100 Subject: better boolean check --- libqmenumodel/src/unitymenumodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libqmenumodel/src/unitymenumodel.cpp b/libqmenumodel/src/unitymenumodel.cpp index 8b64ee2..6a75f40 100644 --- a/libqmenumodel/src/unitymenumodel.cpp +++ b/libqmenumodel/src/unitymenumodel.cpp @@ -483,13 +483,13 @@ QVariant UnityMenuModel::data(const QModelIndex &index, int role) const return gtk_menu_tracker_item_get_role (item) == GTK_MENU_TRACKER_ITEM_ROLE_RADIO; case IsToggledRole: - return gtk_menu_tracker_item_get_toggled (item) == TRUE ? true : false; + return gtk_menu_tracker_item_get_toggled (item) != FALSE; case ShortcutRole: return QKeySequence(gtk_menu_tracker_item_get_accel (item), QKeySequence::NativeText); case HasSubmenuRole: - return gtk_menu_tracker_item_get_has_submenu (item) == TRUE ? true : false; + return gtk_menu_tracker_item_get_has_submenu (item) != FALSE; default: return QVariant(); -- cgit v1.2.3 From a618ff5e99c82aca263e8a52fa2c482b2d58754b Mon Sep 17 00:00:00 2001 From: Nick Dedekind Date: Tue, 4 Oct 2016 14:13:36 +0100 Subject: version bump --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index b6bdb59..6de620f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +qmenumodel (0.2.10) UNRELEASED; urgency=medium + + [ Nick Dedekind ] + * Added shortcut hasSubmenu and roles to UnityMenuModel + + -- Nick Dedekind Tue, 04 Oct 2016 14:11:46 +0100 + qmenumodel (0.2.9+15.04.20150430-0ubuntu1) vivid; urgency=medium [ Michael Terry ] -- cgit v1.2.3 From 6be5a5847ab602cafae3def7cee2735ea85b9e99 Mon Sep 17 00:00:00 2001 From: Nick Dedekind Date: Fri, 9 Dec 2016 17:10:27 +0000 Subject: fixed version file --- debian/changelog | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index ae0f717..a5659e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +qmenumodel (0.2.11) UNRELEASED; urgency=medium + + [ Nick Dedekind ] + * Added shortcut hasSubmenu and roles to UnityMenuModel + + -- Nick Dedekind Fri, 09 Dec 2016 17:09:15 +0000 + qmenumodel (0.2.10+17.04.20161116-0ubuntu1) zesty; urgency=medium [ Florian Boucault ] @@ -14,13 +21,6 @@ qmenumodel (0.2.10+17.04.20161026.2-0ubuntu1) zesty; urgency=medium -- Marco Trevisan (TreviƱo) Wed, 26 Oct 2016 17:28:36 +0000 -qmenumodel (0.2.10) UNRELEASED; urgency=medium - - [ Nick Dedekind ] - * Added shortcut hasSubmenu and roles to UnityMenuModel - - -- Nick Dedekind Tue, 04 Oct 2016 14:11:46 +0100 - qmenumodel (0.2.9+16.04.20160329-0ubuntu1) xenial; urgency=medium [ Nick Dedekind ] -- cgit v1.2.3 From a9c7379c13c4b6494cd8be33925c40f22dd2a6e4 Mon Sep 17 00:00:00 2001 From: Nick Dedekind Date: Fri, 9 Dec 2016 17:11:42 +0000 Subject: added to changelog --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a5659e0..6f859b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ qmenumodel (0.2.11) UNRELEASED; urgency=medium [ Nick Dedekind ] * Added shortcut hasSubmenu and roles to UnityMenuModel + * Added actions property to Group - -- Nick Dedekind Fri, 09 Dec 2016 17:09:15 +0000 + -- Nick Dedekind Fri, 09 Dec 2016 17:11:01 +0000 qmenumodel (0.2.10+17.04.20161116-0ubuntu1) zesty; urgency=medium -- cgit v1.2.3