@@ -32,8 +32,6 @@ public class Badger.MainGrid : Gtk.Box {
3232 orientation = Gtk . Orientation . VERTICAL ;
3333
3434
35-
36-
3735 /* ***********************************************/
3836 /* Switch at top */
3937 /* ***********************************************/
@@ -50,16 +48,15 @@ public class Badger.MainGrid : Gtk.Box {
5048 secondary_text = _ ("If on , Badger will remind you to take care of yourself ")
5149 };
5250
53- global_box.append (heading );
54- global_box.append (global_switch );
51+ global_box.append (heading );
52+ global_box.append (global_switch );
5553 append (global_box );
5654
5755
5856 /* ***********************************************/
5957 /* Label to explain */
6058 /* ***********************************************/
6159
62-
6360 var subheading = new Gtk .Label (_ (" Decide how often Badger should remind you to relax these:" )) {
6461 halign = Gtk . Align . START ,
6562 margin_top = 18 ,
@@ -96,13 +93,10 @@ public class Badger.MainGrid : Gtk.Box {
9693 });
9794
9895
99-
10096 /* ***********************************************/
10197 /* All the scales */
10298 /* ***********************************************/
10399
104-
105-
106100 var scale_box = new Gtk .Box (Gtk . Orientation . VERTICAL , 0 );
107101 scale_box. vexpand = true ;
108102
@@ -129,32 +123,13 @@ public class Badger.MainGrid : Gtk.Box {
129123
130124 // Get the scale default value
131125 scale. sensitive = settings. get_boolean (" all" ) ? settings. get_boolean (reminder. name + " -active" ) : false ;
132-
126+
133127 scales. insert (reminder. name + " -active" , scale);
134128
135129 uint interval = settings. get_uint (reminder. name);
136130
137-
138- // Old settings migration: interval == 0 meant "never" till 2.3.1
139- // if ( interval == 0 ) {
140- // // Reset to default value
141- // settings.reset (reminder.name);
142-
143- // // Read interval again (interval = default_value)
144- // interval = settings.get_uint (reminder.name);
145-
146- // // Uncheck the corresponding checkbox
147- // settings.set_boolean (reminder.name + "-active", false);
148- // }
149-
150-
151131 scale. set_value (interval);
152- scale. set_tooltip_text(_ (" %.0f min" ). printf (interval));
153-
154- // The marks take a lotta space
155- // scale.add_mark (0.0, Gtk.PositionType.TOP , null);
156- // scale.add_mark (30.0, Gtk.PositionType.TOP , null);
157- // scale.add_mark (60.0, Gtk.PositionType.TOP , null);
132+ scale. set_tooltip_text (_ (" %.0f min" ). printf (interval));
158133
159134 SetInterval set_interval = reminder. set_reminder_interval;
160135 set_interval (interval);
@@ -164,7 +139,7 @@ public class Badger.MainGrid : Gtk.Box {
164139 settings. set_uint (reminder. name, new_value);
165140 set_interval (new_value);
166141
167- scale. set_tooltip_text(_ (" %.0f min" ). printf (duration)) ;
142+ scale. set_tooltip_text (_ (" %.0f min" ). printf (duration)) ;
168143
169144 return false ;
170145 });
@@ -184,28 +159,21 @@ public class Badger.MainGrid : Gtk.Box {
184159 box. append (scale);
185160 scale_box. append (box);
186161
187- } // Forloop end
188-
189- append (scale_box );
162+ }
190163
164+ append (scale_box );
191165
192166
193167 /* *******************************************/
194168 /* DnD Label */
195169 /* *******************************************/
196170
197-
198- // User may wonder why they get no notification
199- // Ok also this looks better
200171 var hey = new Gtk .Label (_ (" Make sure Do Not Disturb is not on!" )) {
201172 halign = Gtk . Align . START ,
202173 margin_top = 12 ,
203174 margin_bottom = 6
204175 };
205176 hey.add_css_class ("accent ");
206177 append (hey );
207-
208-
209-
210178 }
211179}
0 commit comments