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
=== modified file 'src/Views/Behavior.vala'
--- src/Views/Behavior.vala 2017-02-12 04:10:35 +0000
+++ src/Views/Behavior.vala 2017-02-12 04:30:58 +0000
@@ -51,18 +51,6 @@
51 scale_repeat_delay.draw_value = false;51 scale_repeat_delay.draw_value = false;
52 scale_repeat_speed.draw_value = false;52 scale_repeat_speed.draw_value = false;
5353
54 // attach to this
55 this.attach (label_repeat, 0, 0, 1, 1);
56 this.attach (label_repeat_delay, 0, 1, 1, 1);
57 this.attach (label_repeat_speed, 0, 2, 1, 1);
58 this.attach (switch_repeat, 1, 0, 1, 1);
59 this.attach (scale_repeat_delay, 1, 1, 1, 1);
60 this.attach (scale_repeat_speed, 1, 2, 1, 1);
61 this.attach (spin_repeat_delay, 2, 1, 1, 1);
62 this.attach (spin_repeat_speed, 2, 2, 1, 1);
63 this.attach (label_repeat_ms1, 3, 1, 1, 1);
64 this.attach (label_repeat_ms2, 3, 2, 1, 1);
65
66 // set values from settigns54 // set values from settigns
67 var double_delay = (double) settings_repeat.delay;55 var double_delay = (double) settings_repeat.delay;
68 var double_speed = (double) settings_repeat.repeat_interval;56 var double_speed = (double) settings_repeat.repeat_interval;
@@ -128,17 +116,32 @@
128 scale_blink_speed.draw_value = false;116 scale_blink_speed.draw_value = false;
129 scale_blink_time.draw_value = false;117 scale_blink_time.draw_value = false;
130118
131 // attach to this119 var entry_test = new Gtk.Entry ();
132 this.attach (label_blink, 0, 3, 1, 1);120 entry_test.margin_top = 24;
133 this.attach (label_blink_speed, 0, 4, 1, 1);121 entry_test.placeholder_text = (_("Type to test your settings…"));
134 this.attach (label_blink_time, 0, 5, 1, 1);122 entry_test.hexpand = true;
135 this.attach (switch_blink, 1, 3, 1, 1);123
136 this.attach (scale_blink_speed, 1, 4, 1, 1);124 attach (label_repeat, 0, 0, 1, 1);
137 this.attach (scale_blink_time, 1, 5, 1, 1);125 attach (switch_repeat, 1, 0, 1, 1);
138 this.attach (spin_blink_speed, 2, 4, 1, 1);126 attach (label_repeat_delay, 0, 1, 1, 1);
139 this.attach (spin_blink_time, 2, 5, 1, 1);127 attach (scale_repeat_delay, 1, 1, 1, 1);
140 this.attach (label_blink_ms, 3, 4, 1, 1);128 attach (spin_repeat_delay, 2, 1, 1, 1);
141 this.attach (label_blink_s, 3, 5, 1, 1);129 attach (label_repeat_ms1, 3, 1, 1, 1);
130 attach (label_repeat_speed, 0, 2, 1, 1);
131 attach (scale_repeat_speed, 1, 2, 1, 1);
132 attach (spin_repeat_speed, 2, 2, 1, 1);
133 attach (label_repeat_ms2, 3, 2, 1, 1);
134 attach (label_blink, 0, 3, 1, 1);
135 attach (switch_blink, 1, 3, 1, 1);
136 attach (label_blink_speed, 0, 4, 1, 1);
137 attach (scale_blink_speed, 1, 4, 1, 1);
138 attach (spin_blink_speed, 2, 4, 1, 1);
139 attach (label_blink_ms, 3, 4, 1, 1);
140 attach (label_blink_time, 0, 5, 1, 1);
141 attach (scale_blink_time, 1, 5, 1, 1);
142 attach (spin_blink_time, 2, 5, 1, 1);
143 attach (label_blink_s, 3, 5, 1, 1);
144 attach (entry_test, 1, 6, 1, 1);
142145
143 // set values from settings146 // set values from settings
144 var double_blink_speed = (double) settings_blink.cursor_blink_time;147 var double_blink_speed = (double) settings_blink.cursor_blink_time;
@@ -193,15 +196,6 @@
193 settings_blink.changed["cursor-blink-timeout"].connect (() => {196 settings_blink.changed["cursor-blink-timeout"].connect (() => {
194 scale_blink_time.adjustment.value = spin_blink_time.adjustment.value = (double) settings_blink.cursor_blink_timeout;197 scale_blink_time.adjustment.value = spin_blink_time.adjustment.value = (double) settings_blink.cursor_blink_timeout;
195 } );198 } );
196
197 /** Test Settings **/
198
199 var entry_test = new Gtk.Entry ();
200 entry_test.margin_top = 24;
201 entry_test.placeholder_text = (_("Type to test your settings…"));
202 entry_test.hexpand = true;
203
204 this.attach (entry_test, 1, 6, 1, 1);
205 }199 }
206 }200 }
207}201}

Subscribers

People subscribed via source and target branches