Merge lp://staging/~larsu/qmenumodel/add-unitymenumodel into lp://staging/~phablet-team/qmenumodel/trunk

Proposed by Lars Karlitski
Status: Merged
Approved by: Nick Dedekind
Approved revision: 104
Merged at revision: 70
Proposed branch: lp://staging/~larsu/qmenumodel/add-unitymenumodel
Merge into: lp://staging/~phablet-team/qmenumodel/trunk
Diff against target: 4347 lines (+4106/-22)
27 files modified
CMakeLists.txt (+2/-0)
examples/exportmenu.py (+8/-18)
examples/unityqmlmenumodel.qml (+118/-0)
libqmenumodel/QMenuModel/CMakeLists.txt (+1/-1)
libqmenumodel/QMenuModel/plugin.cpp (+11/-2)
libqmenumodel/QMenuModel/plugin.h (+1/-0)
libqmenumodel/src/CMakeLists.txt (+20/-1)
libqmenumodel/src/actionstateparser.cpp (+34/-0)
libqmenumodel/src/actionstateparser.h (+37/-0)
libqmenumodel/src/gtk/gtkactionmuxer.c (+778/-0)
libqmenumodel/src/gtk/gtkactionmuxer.h (+52/-0)
libqmenumodel/src/gtk/gtkactionobservable.c (+78/-0)
libqmenumodel/src/gtk/gtkactionobservable.h (+60/-0)
libqmenumodel/src/gtk/gtkactionobserver.c (+159/-0)
libqmenumodel/src/gtk/gtkactionobserver.h (+83/-0)
libqmenumodel/src/gtk/gtkmenutracker.c (+495/-0)
libqmenumodel/src/gtk/gtkmenutracker.h (+52/-0)
libqmenumodel/src/gtk/gtkmenutrackeritem.c (+908/-0)
libqmenumodel/src/gtk/gtkmenutrackeritem.h (+103/-0)
libqmenumodel/src/unitymenuaction.cpp (+60/-0)
libqmenumodel/src/unitymenuaction.h (+66/-0)
libqmenumodel/src/unitymenumodel.cpp (+706/-0)
libqmenumodel/src/unitymenumodel.h (+76/-0)
libqmenumodel/src/unitymenumodelevents.cpp (+63/-0)
libqmenumodel/src/unitymenumodelevents.h (+69/-0)
libqmenumodel/src/unitythemediconprovider.cpp (+35/-0)
libqmenumodel/src/unitythemediconprovider.h (+31/-0)
To merge this branch: bzr merge lp://staging/~larsu/qmenumodel/add-unitymenumodel
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Nick Dedekind (community) Approve
Ubuntu Phablet Team Pending
Review via email: mp+176857@code.staging.launchpad.net

Commit message

Added UnityMenuModel

Description of the change

Add UnityMenuModel

It serves the same purpose as QMenuModel, but has a different API and semantics.

Most importantly, it's a flat QAbstractItemModel of menu items (including separators) which doesn't need the flattening proxy model. It does not expose actions or action groups, other than taking the D-Bus object path to an action group as a property. Activating a menu item from qml activates the associated action, taking care of action namespaces, parameters, and sensitive state.

It handles icons via g_icon_serialize(), thus making it independent of GdkPixbuf while still supporting raw images in all formats that QImage can load (via data:// urls). It also includes a QIconProvider for themed icons (handling the image://theme/ namespace).

There's an example of how to use UnityMenuModel in examples/unitymenumodel.qml.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

No action role in UnityMenuModel::data.

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

All is well.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches