Merge lp:~bpierre/ubuntu-ui-toolkit/gallery-section into lp:ubuntu-ui-toolkit/staging

Proposed by Pierre Bertet
Status: Work in progress
Proposed branch: lp:~bpierre/ubuntu-ui-toolkit/gallery-section
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 71 lines (+21/-2)
3 files modified
examples/ubuntu-ui-toolkit-gallery/MainPage.qml (+13/-0)
gallery.sh (+1/-1)
ubuntu-ui-toolkit-launcher/launcher.cpp (+7/-1)
To merge this branch: bzr merge lp:~bpierre/ubuntu-ui-toolkit/gallery-section
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Zoltan Balogh Approve
Pierre Bertet (community) Needs Resubmitting
Review via email: mp+287071@code.launchpad.net

Commit message

Gallery: add a --section parameter

Use ./gallery.sh --section "sectionName" to select a specific section when launching the Gallery.

Description of the change

Gallery: add a --section parameter

Use ./gallery.sh --section "sectionName" to select a specific section when launching the Gallery.

To post a comment you must log in.
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
1869. By Pierre Bertet

[merge] staging sync

Revision history for this message
Pierre Bertet (bpierre) :
review: Needs Resubmitting
1870. By Pierre Bertet

[sync] merge staging

1871. By Pierre Bertet

[sync] merge staging

Revision history for this message
Zoltan Balogh (bzoltan) :
review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
1872. By Pierre Bertet

[sync] merge staging

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
1873. By Pierre Bertet

[sync] merge staging

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Unmerged revisions

1873. By Pierre Bertet

[sync] merge staging

1872. By Pierre Bertet

[sync] merge staging

1871. By Pierre Bertet

[sync] merge staging

1870. By Pierre Bertet

[sync] merge staging

1869. By Pierre Bertet

[merge] staging sync

1868. By Pierre Bertet

Gallery: add a --section parameter

Use --section "sectionName" to select a specific section when launching the Gallery.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/ubuntu-ui-toolkit-gallery/MainPage.qml'
2--- examples/ubuntu-ui-toolkit-gallery/MainPage.qml 2016-03-31 10:30:29 +0000
3+++ examples/ubuntu-ui-toolkit-gallery/MainPage.qml 2016-04-11 17:21:18 +0000
4@@ -127,5 +127,18 @@
5 ProgressionSlot {}
6 }
7 }
8+
9+ Component.onCompleted: {
10+ if (typeof startingSection === "undefined") {
11+ return
12+ }
13+ for (var i = 0; i < model.count; i++) {
14+ if (model.get(i).label === startingSection) {
15+ currentIndex = i
16+ positionViewAtIndex(i, ListView.Beginning)
17+ break
18+ }
19+ }
20+ }
21 }
22 }
23
24=== modified file 'gallery.sh'
25--- gallery.sh 2016-01-19 11:44:45 +0000
26+++ gallery.sh 2016-04-11 17:21:18 +0000
27@@ -20,6 +20,6 @@
28 tests/Gallery/gallery -testability &
29 autopilot vis
30 else
31- tests/Gallery/gallery $@
32+ tests/Gallery/gallery "$@"
33
34 fi
35
36=== modified file 'ubuntu-ui-toolkit-launcher/launcher.cpp'
37--- ubuntu-ui-toolkit-launcher/launcher.cpp 2016-04-07 14:03:00 +0000
38+++ ubuntu-ui-toolkit-launcher/launcher.cpp 2016-04-11 17:21:18 +0000
39@@ -72,6 +72,7 @@
40 QCommandLineOption _frameless("frameless", "Run without borders");
41 QCommandLineOption _engine("engine", "Use quick engine from quick view");
42 QCommandLineOption _desktop_file_hint("desktop_file_hint", "Desktop file - ignored", "desktop_file");
43+ QCommandLineOption _section("section", "Open a section on launch by specifying its name", "section_name");
44
45 args.addOption(_import);
46 args.addOption(_enableTouch);
47@@ -79,6 +80,7 @@
48 args.addOption(_frameless);
49 args.addOption(_engine);
50 args.addOption(_desktop_file_hint);
51+ args.addOption(_section);
52 args.addPositionalArgument("filename", "Document to be viewed");
53 args.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions);
54 args.addHelpOption();
55@@ -136,6 +138,11 @@
56 }
57 }
58
59+ if (args.isSet(_section)) {
60+ QString section = args.value(_section);
61+ view->rootContext()->setContextProperty("startingSection", section);
62+ }
63+
64 view->setResizeMode(QQuickView::SizeRootObjectToView);
65 view->setTitle("UI Toolkit QQuickView");
66 if (args.isSet(_frameless)) {
67@@ -156,4 +163,3 @@
68
69 return application.exec();
70 }
71-

Subscribers

People subscribed via source and target branches