Merge lp:~elementary-pantheon/switchboard-plug-keyboard/behavior-attach into lp:~elementary-pantheon/switchboard-plug-keyboard/trunk

Proposed by Danielle Foré
Status: Merged
Approved by: Danielle Foré
Approved revision: 508
Merged at revision: 511
Proposed branch: lp:~elementary-pantheon/switchboard-plug-keyboard/behavior-attach
Merge into: lp:~elementary-pantheon/switchboard-plug-keyboard/trunk
Diff against target: 82 lines (+26/-32)
1 file modified
src/Views/Behavior.vala (+26/-32)
To merge this branch: bzr merge lp:~elementary-pantheon/switchboard-plug-keyboard/behavior-attach
Reviewer Review Type Date Requested Status
David Hewitt code, function Approve
elementary Pantheon team Pending
Review via email: mp+317045@code.launchpad.net

Commit message

Behavior.vala:
* Group all grid attach methods
* code style
* remove unnecessary comments

To post a comment you must log in.
Revision history for this message
David Hewitt (davidmhewitt) :
review: Approve (code, function)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Views/Behavior.vala'
2--- src/Views/Behavior.vala 2017-02-12 04:10:35 +0000
3+++ src/Views/Behavior.vala 2017-02-12 04:30:58 +0000
4@@ -51,18 +51,6 @@
5 scale_repeat_delay.draw_value = false;
6 scale_repeat_speed.draw_value = false;
7
8- // attach to this
9- this.attach (label_repeat, 0, 0, 1, 1);
10- this.attach (label_repeat_delay, 0, 1, 1, 1);
11- this.attach (label_repeat_speed, 0, 2, 1, 1);
12- this.attach (switch_repeat, 1, 0, 1, 1);
13- this.attach (scale_repeat_delay, 1, 1, 1, 1);
14- this.attach (scale_repeat_speed, 1, 2, 1, 1);
15- this.attach (spin_repeat_delay, 2, 1, 1, 1);
16- this.attach (spin_repeat_speed, 2, 2, 1, 1);
17- this.attach (label_repeat_ms1, 3, 1, 1, 1);
18- this.attach (label_repeat_ms2, 3, 2, 1, 1);
19-
20 // set values from settigns
21 var double_delay = (double) settings_repeat.delay;
22 var double_speed = (double) settings_repeat.repeat_interval;
23@@ -128,17 +116,32 @@
24 scale_blink_speed.draw_value = false;
25 scale_blink_time.draw_value = false;
26
27- // attach to this
28- this.attach (label_blink, 0, 3, 1, 1);
29- this.attach (label_blink_speed, 0, 4, 1, 1);
30- this.attach (label_blink_time, 0, 5, 1, 1);
31- this.attach (switch_blink, 1, 3, 1, 1);
32- this.attach (scale_blink_speed, 1, 4, 1, 1);
33- this.attach (scale_blink_time, 1, 5, 1, 1);
34- this.attach (spin_blink_speed, 2, 4, 1, 1);
35- this.attach (spin_blink_time, 2, 5, 1, 1);
36- this.attach (label_blink_ms, 3, 4, 1, 1);
37- this.attach (label_blink_s, 3, 5, 1, 1);
38+ var entry_test = new Gtk.Entry ();
39+ entry_test.margin_top = 24;
40+ entry_test.placeholder_text = (_("Type to test your settings…"));
41+ entry_test.hexpand = true;
42+
43+ attach (label_repeat, 0, 0, 1, 1);
44+ attach (switch_repeat, 1, 0, 1, 1);
45+ attach (label_repeat_delay, 0, 1, 1, 1);
46+ attach (scale_repeat_delay, 1, 1, 1, 1);
47+ attach (spin_repeat_delay, 2, 1, 1, 1);
48+ attach (label_repeat_ms1, 3, 1, 1, 1);
49+ attach (label_repeat_speed, 0, 2, 1, 1);
50+ attach (scale_repeat_speed, 1, 2, 1, 1);
51+ attach (spin_repeat_speed, 2, 2, 1, 1);
52+ attach (label_repeat_ms2, 3, 2, 1, 1);
53+ attach (label_blink, 0, 3, 1, 1);
54+ attach (switch_blink, 1, 3, 1, 1);
55+ attach (label_blink_speed, 0, 4, 1, 1);
56+ attach (scale_blink_speed, 1, 4, 1, 1);
57+ attach (spin_blink_speed, 2, 4, 1, 1);
58+ attach (label_blink_ms, 3, 4, 1, 1);
59+ attach (label_blink_time, 0, 5, 1, 1);
60+ attach (scale_blink_time, 1, 5, 1, 1);
61+ attach (spin_blink_time, 2, 5, 1, 1);
62+ attach (label_blink_s, 3, 5, 1, 1);
63+ attach (entry_test, 1, 6, 1, 1);
64
65 // set values from settings
66 var double_blink_speed = (double) settings_blink.cursor_blink_time;
67@@ -193,15 +196,6 @@
68 settings_blink.changed["cursor-blink-timeout"].connect (() => {
69 scale_blink_time.adjustment.value = spin_blink_time.adjustment.value = (double) settings_blink.cursor_blink_timeout;
70 } );
71-
72- /** Test Settings **/
73-
74- var entry_test = new Gtk.Entry ();
75- entry_test.margin_top = 24;
76- entry_test.placeholder_text = (_("Type to test your settings…"));
77- entry_test.hexpand = true;
78-
79- this.attach (entry_test, 1, 6, 1, 1);
80 }
81 }
82 }

Subscribers

People subscribed via source and target branches