Merge lp:~macslow/unity-notifications/minor-ui-tweaks into lp:unity-notifications

Proposed by Mirco Müller
Status: Merged
Approved by: Michał Sawicz
Approved revision: 179
Merged at revision: 178
Proposed branch: lp:~macslow/unity-notifications/minor-ui-tweaks
Merge into: lp:unity-notifications
Diff against target: 85 lines (+11/-11)
2 files modified
examples/sd-example-password-entry.py (+5/-5)
examples/sd-example-user-auth.py (+6/-6)
To merge this branch: bzr merge lp:~macslow/unity-notifications/minor-ui-tweaks
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+189806@code.launchpad.net

Commit message

Made password-entry- and user-authentication-examples look more like the mockups in the Design-specs.

Description of the change

Made password-entry- and user-authentication-examples look more like the mockups in the Design-specs. This should go into trunk alongside lp:~macslow/unity8/minor-ui-tweaks, otherwise the changes don't look as nice/expected. It doesn't break anything, thus this is not a hard dependency... still it would be nice to have these two branches land close to each other.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/sd-example-password-entry.py'
2--- examples/sd-example-password-entry.py 2013-10-01 07:39:15 +0000
3+++ examples/sd-example-password-entry.py 2013-10-08 10:15:22 +0000
4@@ -55,12 +55,12 @@
5 else:
6 print "That should not have happened (cancel)!"
7
8-def accept (notification, action, data):
9- if action == "accept":
10+def connect (notification, action, data):
11+ if action == "connect":
12 global password
13 print "password entered: " + password
14 else:
15- print "That should not have happened (accept)!"
16+ print "That should not have happened (connect)!"
17
18 def password_changed (action, variant):
19 global password
20@@ -95,7 +95,7 @@
21
22 # NOTE: the order in which actions are added is important... positive
23 # always comes first!
24- n.add_action ("accept", "Accept", accept, None, None);
25+ n.add_action ("connect", "Connect", connect, None, None);
26 n.add_action ("cancel", "Cancel", cancel, None, None);
27
28 # create the menu-model
29@@ -135,7 +135,7 @@
30 password = ""
31
32 loop = GLib.MainLoop()
33- n = pushNotification ("Enter password", "", "")
34+ n = pushNotification ("Connect to \"linksys\"", "", "image://theme/nm-signal-100")
35 n.connect('closed', quit_callback, loop)
36 n.show ()
37
38
39=== modified file 'examples/sd-example-user-auth.py'
40--- examples/sd-example-user-auth.py 2013-10-01 07:39:15 +0000
41+++ examples/sd-example-user-auth.py 2013-10-08 10:15:22 +0000
42@@ -55,14 +55,14 @@
43 else:
44 print "That should not have happened (cancel)!"
45
46-def accept (notification, action, data):
47- if action == "accept":
48+def connect (notification, action, data):
49+ if action == "connect":
50 global login
51 print "login entered: " + login
52 global password
53 print "password entered: " + password
54 else:
55- print "That should not have happened (accept)!"
56+ print "That should not have happened (connect)!"
57
58 def login_changed (action, variant):
59 global login
60@@ -76,7 +76,7 @@
61 # menu
62 menu = Gio.Menu();
63
64- login_item = Gio.MenuItem.new ("Login:", "notifications.login");
65+ login_item = Gio.MenuItem.new ("Login name:", "notifications.login");
66 login_item.set_attribute_value ("x-canonical-type", GLib.Variant.new_string("com.canonical.snapdecision.textfield"));
67 login_item.set_attribute_value ('x-echo-mode-password', GLib.Variant.new_boolean(False))
68 menu.append_item (login_item);
69@@ -109,7 +109,7 @@
70
71 # NOTE: the order in which actions are added is important... positive
72 # always comes first!
73- n.add_action ("accept", "Accept", accept, None, None);
74+ n.add_action ("connect", "Connect", connect, None, None);
75 n.add_action ("cancel", "Cancel", cancel, None, None);
76
77 # create the menu-model
78@@ -150,7 +150,7 @@
79 password = ""
80
81 loop = GLib.MainLoop()
82- n = pushNotification ("Authenticate yourself", "", "")
83+ n = pushNotification ("Connect to \"linksys\"", "", "image://theme/nm-signal-100")
84 n.connect('closed', quit_callback, loop)
85 n.show ()
86

Subscribers

People subscribed via source and target branches

to all changes: