Merge lp:~rpadovani/reminders-app/1289342 into lp:reminders-app

Proposed by Riccardo Padovani
Status: Merged
Approved by: Michael Zanetti
Approved revision: 86
Merged at revision: 85
Proposed branch: lp:~rpadovani/reminders-app/1289342
Merge into: lp:reminders-app
Diff against target: 38 lines (+16/-0)
1 file modified
src/app/qml/reminders.qml (+16/-0)
To merge this branch: bzr merge lp:~rpadovani/reminders-app/1289342
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+210471@code.launchpad.net

Commit message

Added dialog to inform users if no account is available.

Description of the change

Added dialog to inform users if no account is available. When there will be possibility to launch system settings from the app we will can add a button to open system settings or we will automatically open system settings.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

When this happens, the whole NotesList is empty. Why not just paint that text in there instead of opening a popup?

Also, below the text, would a button to launch system settings make sense?

review: Needs Information
Revision history for this message
Riccardo Padovani (rpadovani) wrote :

> When this happens, the whole NotesList is empty. Why not just paint that text
> in there instead of opening a popup?

In my opinion a popup is better, because the user can't do anything. If we modify NotesList we don't disable user's commands, e.g. user can change tab in the header

> Also, below the text, would a button to launch system settings make sense?

Yes, it makes sense at all, but I didn't find a way to launch system settings and I preferred to add nothing rather a button that doesn't nothing.
Do I miss something? There is a way to do this?

Revision history for this message
Michael Zanetti (mzanetti) wrote :

> > When this happens, the whole NotesList is empty. Why not just paint that
> text
> > in there instead of opening a popup?
>
> In my opinion a popup is better, because the user can't do anything. If we
> modify NotesList we don't disable user's commands, e.g. user can change tab in
> the header

Ok, convinced. A popup it is :)

>
> > Also, below the text, would a button to launch system settings make sense?
>
> Yes, it makes sense at all, but I didn't find a way to launch system settings
> and I preferred to add nothing rather a button that doesn't nothing.
> Do I miss something? There is a way to do this?

It should be possible, yes. I think Qt.openUrlExternally("settings://system/online-accounts") should do.

lp:~rpadovani/reminders-app/1289342 updated
86. By Riccardo Padovani

Added button to open accounts settings

Revision history for this message
Riccardo Padovani (rpadovani) wrote :

> Ok, convinced. A popup it is :)

Yeah :-)

> It should be possible, yes. I think Qt.openUrlExternally("settings://system
> /online-accounts") should do.

Wow, awesome, thanks! Very useful!

You just forgot a slash, it's settings:///system/online-accounts ;-)

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

ack

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app/qml/reminders.qml'
2--- src/app/qml/reminders.qml 2014-02-19 00:07:09 +0000
3+++ src/app/qml/reminders.qml 2014-03-12 22:37:24 +0000
4@@ -18,6 +18,7 @@
5
6 import QtQuick 2.0
7 import Ubuntu.Components 0.1
8+import Ubuntu.Components.Popups 0.1
9 import Ubuntu.Components.ListItems 0.1
10 //import "components"
11 import "ui"
12@@ -134,6 +135,7 @@
13 if (!accountService.objectHandle) {
14 switch (accounts.count) {
15 case 0:
16+ PopupUtils.open(noAccountDialog)
17 print("No account available! Please setup an account in the system settings");
18 break;
19 case 1:
20@@ -274,4 +276,18 @@
21 source = "";
22 }
23 }
24+
25+ Component {
26+ id: noAccountDialog
27+ Dialog {
28+ id: noAccount
29+ title: i18n.tr("No account available")
30+ text: i18n.tr("Please setup an account in the system settings")
31+ Button {
32+ text: i18n.tr("Open account settings")
33+ color: UbuntuColors.orange
34+ onClicked: Qt.openUrlExternally("settings:///system/online-accounts")
35+ }
36+ }
37+ }
38 }

Subscribers

People subscribed via source and target branches