Merge lp:~davidmhewitt/pantheon-agent-geoclue2/fix-1667757 into lp:~elementary-pantheon/pantheon-agent-geoclue2/trunk

Proposed by David Hewitt
Status: Merged
Approved by: Danielle Foré
Approved revision: 17
Merged at revision: 15
Proposed branch: lp:~davidmhewitt/pantheon-agent-geoclue2/fix-1667757
Merge into: lp:~elementary-pantheon/pantheon-agent-geoclue2/trunk
Diff against target: 84 lines (+7/-22)
2 files modified
src/Agent.vala (+7/-12)
src/Geoclue2Dialog.vala (+0/-10)
To merge this branch: bzr merge lp:~davidmhewitt/pantheon-agent-geoclue2/fix-1667757
Reviewer Review Type Date Requested Status
elementary Pantheon team Pending
Review via email: mp+318293@code.launchpad.net

Commit message

Remove "never ask again" checkbox.

Description of the change

Remove "never ask again" checkbox. If you deny, you will prompted each time the app requests access again. If you allow, you will not be asked again.

To post a comment you must log in.
Revision history for this message
Danielle Foré (danrabbit) wrote :

Does what it says it does! Just a minor code style issue ;)

17. By David Hewitt

Fix code style

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Agent.vala'
2--- src/Agent.vala 2017-02-24 17:37:39 +0000
3+++ src/Agent.vala 2017-02-25 00:36:22 +0000
4@@ -97,11 +97,9 @@
5 var stored_accuracy = remembered_accuracy.get_uint32();
6 if (req_accuracy <= stored_accuracy) {
7 authorized = true;
8- } else {
9- authorized = false;
10- }
11- allowed_accuracy = req_accuracy;
12- return;
13+ allowed_accuracy = req_accuracy;
14+ return;
15+ }
16 }
17
18 string app_name = app_info.get_display_name ();
19@@ -121,7 +119,6 @@
20 dialog.show_all ();
21
22 var result = dialog.run ();
23- var remember = dialog.remember_checked ();
24
25 switch (result) {
26 case Gtk.ResponseType.YES:
27@@ -132,12 +129,10 @@
28 break;
29 }
30
31- if (remember) {
32- if(authorized) {
33- remember_app (id, new Variant.uint32 (req_accuracy));
34- } else {
35- remember_app (id, new Variant.uint32 (0));
36- }
37+ if (authorized) {
38+ remember_app (id, new Variant.uint32 (req_accuracy));
39+ } else {
40+ remember_app (id, new Variant.uint32 (0));
41 }
42
43 dialog.destroy ();
44
45=== modified file 'src/Geoclue2Dialog.vala'
46--- src/Geoclue2Dialog.vala 2017-02-24 17:37:39 +0000
47+++ src/Geoclue2Dialog.vala 2017-02-25 00:36:22 +0000
48@@ -21,8 +21,6 @@
49
50 namespace Ag.Widgets {
51 public class Geoclue2Dialog : Gtk.Dialog {
52- public signal void done (bool allow);
53- private Gtk.CheckButton remember_checkbox;
54
55 public Geoclue2Dialog (string message, string app_name, string icon_name) {
56 Object (title: _("Location Dialog"), window_position: Gtk.WindowPosition.CENTER, resizable: false, deletable: false, skip_taskbar_hint: true);
57@@ -41,9 +39,6 @@
58 message_label.wrap = true;
59 message_label.xalign = 0;
60
61- remember_checkbox = new Gtk.CheckButton.with_label (_("Never ask again"));
62- remember_checkbox.margin_top = 12;
63-
64 var image = new Gtk.Image.from_icon_name ("find-location", Gtk.IconSize.DIALOG);
65
66 var overlay = new Gtk.Overlay ();
67@@ -63,7 +58,6 @@
68 grid.attach (overlay, 0, 0, 1, 3);
69 grid.attach (heading, 1, 0, 1, 1);
70 grid.attach (message_label, 1, 1, 1, 1);
71- grid.attach (remember_checkbox, 1, 2, 1, 1);
72
73 var deny_button = (Gtk.Button)add_button (_("Deny"), Gtk.ResponseType.NO);
74 var allow_button = (Gtk.Button)add_button (_("Allow"), Gtk.ResponseType.YES);
75@@ -89,9 +83,5 @@
76
77 window.focus (Gdk.CURRENT_TIME);
78 }
79-
80- public bool remember_checked () {
81- return remember_checkbox.get_active ();
82- }
83 }
84 }

Subscribers

People subscribed via source and target branches

to all changes: