Merge lp:~tintou/switchboard-plug-security-privacy/center-lock-label into lp:~elementary-apps/switchboard-plug-security-privacy/trunk

Proposed by Corentin Noël
Status: Merged
Approved by: Danielle Foré
Approved revision: 170
Merged at revision: 170
Proposed branch: lp:~tintou/switchboard-plug-security-privacy/center-lock-label
Merge into: lp:~elementary-apps/switchboard-plug-security-privacy/trunk
Diff against target: 70 lines (+15/-22)
1 file modified
src/LockPanel.vala (+15/-22)
To merge this branch: bzr merge lp:~tintou/switchboard-plug-security-privacy/center-lock-label
Reviewer Review Type Date Requested Status
Danielle Foré Approve
Review via email: mp+256050@code.launchpad.net

Commit message

Center lock labels.

To post a comment you must log in.
170. By Corentin Noël

Center lock labels.

Revision history for this message
Danielle Foré (danrabbit) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/LockPanel.vala'
--- src/LockPanel.vala 2015-02-28 09:18:27 +0000
+++ src/LockPanel.vala 2015-04-13 22:32:42 +0000
@@ -1,6 +1,6 @@
1// -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*-1// -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*-
2/*-2/*-
3 * Copyright (c) 2014 Security & Privacy Plug (http://launchpad.net/your-project)3 * Copyright (c) 2014-2015 Security & Privacy Plug (https://launchpad.net/switchboard-plug-security-privacy)
4 *4 *
5 * This library is free software; you can redistribute it and/or5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public6 * modify it under the terms of the GNU Library General Public
@@ -17,7 +17,7 @@
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.18 * Boston, MA 02111-1307, USA.
19 *19 *
20 * Authored by: Corentin Noël <tintou@mailoo.org>20 * Authored by: Corentin Noël <corentin@elementary.io>
21 */21 */
2222
23public class SecurityPrivacy.LockPanel : Gtk.Grid {23public class SecurityPrivacy.LockPanel : Gtk.Grid {
@@ -51,36 +51,29 @@
51 lock_sleep_switch.active = false;51 lock_sleep_switch.active = false;
52 });52 });
5353
54 lock_sleep_switch.notify["active"].connect (() => {54 lock_sleep_switch.notify["active"].connect (() => {
55 if (lock_sleep_switch.active)55 if (lock_sleep_switch.active)
56 locker.set_uint ("lock-after-screensaver", 1);56 locker.set_uint ("lock-after-screensaver", 1);
57 else57 else
58 locker.set_uint ("lock-after-screensaver", 0);58 locker.set_uint ("lock-after-screensaver", 0);
59 });59 });
6060
61 lock_suspend_label.margin_bottom = 15;
62 lock_sleep_label.margin_bottom = 15;
63 lock_suspend_switch.margin_bottom = 10;
64 lock_sleep_switch.margin_bottom = 10;
65
66 lock_suspend_label.halign = Gtk.Align.END;61 lock_suspend_label.halign = Gtk.Align.END;
67 lock_sleep_label.halign = Gtk.Align.END;62 lock_sleep_label.halign = Gtk.Align.END;
63 lock_suspend_label.valign = Gtk.Align.CENTER;
64 lock_sleep_label.valign = Gtk.Align.CENTER;
68 lock_suspend_switch.halign = Gtk.Align.START;65 lock_suspend_switch.halign = Gtk.Align.START;
69 lock_sleep_switch.halign = Gtk.Align.START;66 lock_sleep_switch.halign = Gtk.Align.START;
7067
71 var grid_left = new Gtk.Grid ();68 var expander_grid = new Gtk.Grid ();
72 grid_left.expand = true;69 expander_grid.hexpand = true;
73 grid_left.halign = Gtk.Align.END;70
74 var grid_right = new Gtk.Grid ();71 attach (expander_grid, 0, 0, 4, 1);
75 grid_right.expand = true;72 attach (lock_suspend_label, 1, 0, 1, 1);
76 grid_right.halign = Gtk.Align.START;73 attach (lock_sleep_label, 1, 1, 1, 1);
7774 attach (lock_suspend_switch, 2, 0, 1, 1);
78 grid_left.attach (lock_suspend_label, 0, 0, 1, 1);75 attach (lock_sleep_switch, 2, 1, 1, 1);
79 grid_left.attach (lock_sleep_label, 0, 1, 1, 1);76
80 grid_right.attach (lock_suspend_switch, 0, 0, 1, 1);77 hexpand = true;
81 grid_right.attach (lock_sleep_switch, 0, 1, 1, 1);
82
83 attach (grid_left, 0, 0, 1, 1);
84 attach (grid_right, 1, 0, 1, 1);
85 }78 }
86}79}

Subscribers

People subscribed via source and target branches

to all changes: