Merge lp:~elementary-pantheon/pantheon-agent-geoclue2/design-tweaks into lp:~elementary-pantheon/pantheon-agent-geoclue2/trunk

Proposed by Danielle Foré
Status: Merged
Approved by: David Hewitt
Approved revision: 14
Merged at revision: 14
Proposed branch: lp:~elementary-pantheon/pantheon-agent-geoclue2/design-tweaks
Merge into: lp:~elementary-pantheon/pantheon-agent-geoclue2/trunk
Diff against target: 98 lines (+18/-16)
3 files modified
data/org.pantheon.agent-geoclue2.desktop.in.in (+1/-1)
src/Agent.vala (+8/-8)
src/Geoclue2Dialog.vala (+9/-7)
To merge this branch: bzr merge lp:~elementary-pantheon/pantheon-agent-geoclue2/design-tweaks
Reviewer Review Type Date Requested Status
Adam Bieńkowski (community) code / testing Approve
Review via email: mp+318261@code.launchpad.net

Commit message

* Use the icon "find-location"
* Change copy
* wrap text at 50 chars
* remove valigns
* double space above checkbox

To post a comment you must log in.
Revision history for this message
Adam Bieńkowski (donadigo) wrote :

Looks good.

review: Approve (code / testing)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/org.pantheon.agent-geoclue2.desktop.in.in'
2--- data/org.pantheon.agent-geoclue2.desktop.in.in 2017-02-19 11:35:33 +0000
3+++ data/org.pantheon.agent-geoclue2.desktop.in.in 2017-02-24 17:39:16 +0000
4@@ -1,7 +1,7 @@
5 [Desktop Entry]
6 _Name=Location Dialog
7 Exec=${LIBDIR}/geoclue2-1-pantheon/pantheon-agent-geoclue2
8-Icon=dialog-password
9+Icon=find-location
10 Terminal=false
11 Type=Application
12 StartupNotify=false
13
14=== modified file 'src/Agent.vala'
15--- src/Agent.vala 2017-02-23 22:36:13 +0000
16+++ src/Agent.vala 2017-02-24 17:39:16 +0000
17@@ -117,7 +117,7 @@
18 }
19 });
20
21- var dialog = new Widgets.Geoclue2Dialog (accuracy_string, app_info.get_icon ().to_string ());
22+ var dialog = new Widgets.Geoclue2Dialog (accuracy_string, app_name, app_info.get_icon ().to_string ());
23 dialog.show_all ();
24
25 var result = dialog.run ();
26@@ -157,26 +157,26 @@
27 string message = "";
28 switch (accuracy) {
29 case GeoClue2.AccuracyLevel.COUNTRY:
30- message = _("%s wants to obtain your location to a country level");
31+ message = _("the current country");
32 break;
33 case GeoClue2.AccuracyLevel.CITY:
34- message = _("%s wants to obtain your location to a city level");
35+ message = _("the nearest city or town");
36 break;
37 case GeoClue2.AccuracyLevel.NEIGHBORHOOD:
38- message = _("%s wants to obtain your location to a neighborhood level");
39+ message = _("the nearest neighborhood");
40 break;
41 case GeoClue2.AccuracyLevel.STREET:
42- message = _("%s wants to obtain your location to a street level");
43+ message = _("the nearest street");
44 break;
45 case GeoClue2.AccuracyLevel.EXACT:
46- message = _("%s wants to obtain your exact location");
47+ message = _("your exact location");
48 break;
49 default:
50- message = _("%s wants to obtain your location");
51+ message = _("your location");
52 break;
53 }
54
55- return message.printf (app_name);
56+ return _("%s will be able to detect %s. Permissions can be changed in <a href='settings://security/privacy/location'>Location Settings…</a>").printf (app_name, message);
57 }
58
59 private async void register_with_geoclue () {
60
61=== modified file 'src/Geoclue2Dialog.vala'
62--- src/Geoclue2Dialog.vala 2017-02-23 23:17:16 +0000
63+++ src/Geoclue2Dialog.vala 2017-02-24 17:39:16 +0000
64@@ -24,25 +24,27 @@
65 public signal void done (bool allow);
66 private Gtk.CheckButton remember_checkbox;
67
68- public Geoclue2Dialog (string message, string icon_name) {
69+ public Geoclue2Dialog (string message, string app_name, string icon_name) {
70 Object (title: _("Location Dialog"), window_position: Gtk.WindowPosition.CENTER, resizable: false, deletable: false, skip_taskbar_hint: true);
71
72 set_keep_above (true);
73
74- var heading = new Gtk.Label (_("Location Request"));
75+ var heading = new Gtk.Label (_("Allow %s to Access This Device's Location?".printf (app_name)));
76 heading.get_style_context ().add_class ("primary");
77- heading.valign = Gtk.Align.END;
78+ heading.max_width_chars = 50;
79+ heading.wrap = true;
80 heading.xalign = 0;
81
82 var message_label = new Gtk.Label (message);
83- message_label.max_width_chars = 60;
84+ message_label.max_width_chars = 50;
85+ message_label.use_markup = true;
86 message_label.wrap = true;
87- message_label.valign = Gtk.Align.START;
88 message_label.xalign = 0;
89
90- remember_checkbox = new Gtk.CheckButton.with_label (_("Remember this choice"));
91+ remember_checkbox = new Gtk.CheckButton.with_label (_("Never ask again"));
92+ remember_checkbox.margin_top = 12;
93
94- var image = new Gtk.Image.from_icon_name ("dialog-question", Gtk.IconSize.DIALOG);
95+ var image = new Gtk.Image.from_icon_name ("find-location", Gtk.IconSize.DIALOG);
96
97 var overlay = new Gtk.Overlay ();
98 overlay.valign = Gtk.Align.START;

Subscribers

People subscribed via source and target branches