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
=== modified file 'data/org.pantheon.agent-geoclue2.desktop.in.in'
--- data/org.pantheon.agent-geoclue2.desktop.in.in 2017-02-19 11:35:33 +0000
+++ data/org.pantheon.agent-geoclue2.desktop.in.in 2017-02-24 17:39:16 +0000
@@ -1,7 +1,7 @@
1[Desktop Entry]1[Desktop Entry]
2_Name=Location Dialog2_Name=Location Dialog
3Exec=${LIBDIR}/geoclue2-1-pantheon/pantheon-agent-geoclue2 3Exec=${LIBDIR}/geoclue2-1-pantheon/pantheon-agent-geoclue2
4Icon=dialog-password4Icon=find-location
5Terminal=false5Terminal=false
6Type=Application6Type=Application
7StartupNotify=false7StartupNotify=false
88
=== modified file 'src/Agent.vala'
--- src/Agent.vala 2017-02-23 22:36:13 +0000
+++ src/Agent.vala 2017-02-24 17:39:16 +0000
@@ -117,7 +117,7 @@
117 }117 }
118 }); 118 });
119119
120 var dialog = new Widgets.Geoclue2Dialog (accuracy_string, app_info.get_icon ().to_string ());120 var dialog = new Widgets.Geoclue2Dialog (accuracy_string, app_name, app_info.get_icon ().to_string ());
121 dialog.show_all ();121 dialog.show_all ();
122122
123 var result = dialog.run ();123 var result = dialog.run ();
@@ -157,26 +157,26 @@
157 string message = "";157 string message = "";
158 switch (accuracy) {158 switch (accuracy) {
159 case GeoClue2.AccuracyLevel.COUNTRY:159 case GeoClue2.AccuracyLevel.COUNTRY:
160 message = _("%s wants to obtain your location to a country level");160 message = _("the current country");
161 break;161 break;
162 case GeoClue2.AccuracyLevel.CITY:162 case GeoClue2.AccuracyLevel.CITY:
163 message = _("%s wants to obtain your location to a city level");163 message = _("the nearest city or town");
164 break;164 break;
165 case GeoClue2.AccuracyLevel.NEIGHBORHOOD:165 case GeoClue2.AccuracyLevel.NEIGHBORHOOD:
166 message = _("%s wants to obtain your location to a neighborhood level");166 message = _("the nearest neighborhood");
167 break;167 break;
168 case GeoClue2.AccuracyLevel.STREET:168 case GeoClue2.AccuracyLevel.STREET:
169 message = _("%s wants to obtain your location to a street level");169 message = _("the nearest street");
170 break;170 break;
171 case GeoClue2.AccuracyLevel.EXACT:171 case GeoClue2.AccuracyLevel.EXACT:
172 message = _("%s wants to obtain your exact location");172 message = _("your exact location");
173 break;173 break;
174 default:174 default:
175 message = _("%s wants to obtain your location");175 message = _("your location");
176 break;176 break;
177 }177 }
178 178
179 return message.printf (app_name);179 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);
180 }180 }
181181
182 private async void register_with_geoclue () {182 private async void register_with_geoclue () {
183183
=== modified file 'src/Geoclue2Dialog.vala'
--- src/Geoclue2Dialog.vala 2017-02-23 23:17:16 +0000
+++ src/Geoclue2Dialog.vala 2017-02-24 17:39:16 +0000
@@ -24,25 +24,27 @@
24 public signal void done (bool allow);24 public signal void done (bool allow);
25 private Gtk.CheckButton remember_checkbox;25 private Gtk.CheckButton remember_checkbox;
2626
27 public Geoclue2Dialog (string message, string icon_name) {27 public Geoclue2Dialog (string message, string app_name, string icon_name) {
28 Object (title: _("Location Dialog"), window_position: Gtk.WindowPosition.CENTER, resizable: false, deletable: false, skip_taskbar_hint: true);28 Object (title: _("Location Dialog"), window_position: Gtk.WindowPosition.CENTER, resizable: false, deletable: false, skip_taskbar_hint: true);
2929
30 set_keep_above (true);30 set_keep_above (true);
3131
32 var heading = new Gtk.Label (_("Location Request"));32 var heading = new Gtk.Label (_("Allow %s to Access This Device's Location?".printf (app_name)));
33 heading.get_style_context ().add_class ("primary");33 heading.get_style_context ().add_class ("primary");
34 heading.valign = Gtk.Align.END;34 heading.max_width_chars = 50;
35 heading.wrap = true;
35 heading.xalign = 0;36 heading.xalign = 0;
3637
37 var message_label = new Gtk.Label (message);38 var message_label = new Gtk.Label (message);
38 message_label.max_width_chars = 60;39 message_label.max_width_chars = 50;
40 message_label.use_markup = true;
39 message_label.wrap = true;41 message_label.wrap = true;
40 message_label.valign = Gtk.Align.START;
41 message_label.xalign = 0;42 message_label.xalign = 0;
4243
43 remember_checkbox = new Gtk.CheckButton.with_label (_("Remember this choice"));44 remember_checkbox = new Gtk.CheckButton.with_label (_("Never ask again"));
45 remember_checkbox.margin_top = 12;
4446
45 var image = new Gtk.Image.from_icon_name ("dialog-question", Gtk.IconSize.DIALOG);47 var image = new Gtk.Image.from_icon_name ("find-location", Gtk.IconSize.DIALOG);
4648
47 var overlay = new Gtk.Overlay ();49 var overlay = new Gtk.Overlay ();
48 overlay.valign = Gtk.Align.START;50 overlay.valign = Gtk.Align.START;

Subscribers

People subscribed via source and target branches