Merge lp:~l-admin-3/eidete/main-stack-fix into lp:eidete

Proposed by Marcus Wichelmann
Status: Merged
Approved by: Tom Beckmann
Approved revision: 181
Merged at revision: 186
Proposed branch: lp:~l-admin-3/eidete/main-stack-fix
Merge into: lp:eidete
Diff against target: 101 lines (+24/-21)
1 file modified
src/eidete.vala (+24/-21)
To merge this branch: bzr merge lp:~l-admin-3/eidete/main-stack-fix
Reviewer Review Type Date Requested Status
Tom Beckmann (community) Approve
Review via email: mp+245688@code.launchpad.net

Commit message

I've moved the buttons out of the stack so they would not disappear if the user switches the tab-page.

Description of the change

I've moved the buttons out of the stack so they would not disappear if the user switches the tab-page.

To post a comment you must log in.
lp:~l-admin-3/eidete/main-stack-fix updated
181. By Marcus Wichelmann

Buttons are now hidden on the pause-screen.

Revision history for this message
Tom Beckmann (tombeckmann) wrote :

looks nice!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/eidete.vala'
--- src/eidete.vala 2015-01-07 10:40:39 +0000
+++ src/eidete.vala 2015-01-07 16:12:42 +0000
@@ -95,6 +95,7 @@
95 private Gtk.Stack tabs;95 private Gtk.Stack tabs;
96 private Gtk.Grid pause_grid;96 private Gtk.Grid pause_grid;
97 private Gtk.Grid main_box;97 private Gtk.Grid main_box;
98 private Gtk.Box home_buttons;
98 private Gtk.StackSwitcher stack_switcher;99 private Gtk.StackSwitcher stack_switcher;
99 public Wnck.Window win;100 public Wnck.Window win;
100 public Gdk.Screen screen;101 public Gdk.Screen screen;
@@ -202,25 +203,6 @@
202 var mouse = new LLabel.markup ("<b>" + _("Mouse") + "</b>");203 var mouse = new LLabel.markup ("<b>" + _("Mouse") + "</b>");
203 mouse.margin_top = 12;204 mouse.margin_top = 12;
204205
205 var start_bt = new Gtk.Button.with_label (_("Start Recording"));
206 start_bt.can_default = true;
207 start_bt.get_style_context ().add_class ("noundo");
208 start_bt.get_style_context ().add_class ("suggested-action");
209
210 var cancel_bt = new Gtk.Button.with_label (_("Cancel"));
211
212 var about_bt = new Gtk.Button.with_label (_("About"));
213 about_bt.image = new Gtk.Image.from_stock (Gtk.Stock.ABOUT, Gtk.IconSize.BUTTON);
214
215 var buttons = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 5);
216 buttons.homogeneous = true;
217 buttons.pack_start (about_bt, false, true, 0);
218 buttons.pack_start (cancel_bt, false, true, 0);
219 buttons.pack_end (start_bt, false, true, 0);
220 buttons.margin_top = 24;
221
222 this.main_window.set_default (start_bt);
223
224 grid.attach (sound, 0, 0, 1, 1);206 grid.attach (sound, 0, 0, 1, 1);
225 grid.attach (new LLabel.right (_("Record Computer Sounds") + ":"), 0, 1, 1, 1);207 grid.attach (new LLabel.right (_("Record Computer Sounds") + ":"), 0, 1, 1, 1);
226 grid.attach (use_comp_sounds, 1, 1, 1, 1);208 grid.attach (use_comp_sounds, 1, 1, 1, 1);
@@ -235,7 +217,6 @@
235 grid.attach (width, 1, 6, 1, 1);217 grid.attach (width, 1, 6, 1, 1);
236 grid.attach (new LLabel.right (_("Height") + ":"), 0, 7, 1, 1);218 grid.attach (new LLabel.right (_("Height") + ":"), 0, 7, 1, 1);
237 grid.attach (height, 1, 7, 1, 1);219 grid.attach (height, 1, 7, 1, 1);
238 grid.attach (buttons, 0, 8, 2, 1);
239220
240 // grid2221 // grid2
241 var grid2 = new Gtk.Grid ();222 var grid2 = new Gtk.Grid ();
@@ -281,11 +262,31 @@
281 main_box.attach (stack_switcher, 0, 0, 1, 1);262 main_box.attach (stack_switcher, 0, 0, 1, 1);
282 main_box.attach (tabs, 0, 1, 1, 1);263 main_box.attach (tabs, 0, 1, 1, 1);
283 main_box.attach (pause_grid, 0, 2, 1, 1);264 main_box.attach (pause_grid, 0, 2, 1, 1);
265
266 var start_bt = new Gtk.Button.with_label (_("Start Recording"));
267 start_bt.can_default = true;
268 start_bt.get_style_context ().add_class ("noundo");
269 start_bt.get_style_context ().add_class ("suggested-action");
270
271 var cancel_bt = new Gtk.Button.with_label (_("Cancel"));
272
273 var about_bt = new Gtk.Button.with_label (_("About"));
274 about_bt.image = new Gtk.Image.from_stock (Gtk.Stock.ABOUT, Gtk.IconSize.BUTTON);
275
276 home_buttons = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 5);
277 home_buttons.homogeneous = true;
278 home_buttons.pack_start (about_bt, false, true, 0);
279 home_buttons.pack_start (cancel_bt, false, true, 0);
280 home_buttons.pack_end (start_bt, false, true, 0);
281 home_buttons.margin_top = 24;
282
283 main_box.attach (home_buttons, 0, 3, 1, 1);
284 main_box.margin = 12;284 main_box.margin = 12;
285285
286 this.main_window.add (main_box);286 this.main_window.add (main_box);
287287
288 this.main_window.show_all ();288 this.main_window.show_all ();
289 this.main_window.set_default (start_bt);
289 this.main_window.present ();290 this.main_window.present ();
290291
291 /*292 /*
@@ -321,7 +322,7 @@
321322
322 settings.monitor = int.parse (monitors_combo.active_id);323 settings.monitor = int.parse (monitors_combo.active_id);
323324
324 this.screen.get_monitor_geometry(settings.monitor, out this.monitor_rec);325 this.screen.get_monitor_geometry (settings.monitor, out this.monitor_rec);
325326
326 settings.sx = this.monitor_rec.x;327 settings.sx = this.monitor_rec.x;
327 settings.sy = this.monitor_rec.y;328 settings.sy = this.monitor_rec.y;
@@ -766,6 +767,7 @@
766767
767 tabs.hide ();768 tabs.hide ();
768 stack_switcher.hide ();769 stack_switcher.hide ();
770 home_buttons.hide ();
769 pause_grid.show ();771 pause_grid.show ();
770772
771 this.main_window.icon_name = "eidete";773 this.main_window.icon_name = "eidete";
@@ -776,6 +778,7 @@
776 if (tabs.visible) {778 if (tabs.visible) {
777 tabs.hide ();779 tabs.hide ();
778 stack_switcher.hide ();780 stack_switcher.hide ();
781 home_buttons.hide ();
779 pause_grid.show ();782 pause_grid.show ();
780 }783 }
781784

Subscribers

People subscribed via source and target branches