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
1=== modified file 'src/eidete.vala'
2--- src/eidete.vala 2015-01-07 10:40:39 +0000
3+++ src/eidete.vala 2015-01-07 16:12:42 +0000
4@@ -95,6 +95,7 @@
5 private Gtk.Stack tabs;
6 private Gtk.Grid pause_grid;
7 private Gtk.Grid main_box;
8+ private Gtk.Box home_buttons;
9 private Gtk.StackSwitcher stack_switcher;
10 public Wnck.Window win;
11 public Gdk.Screen screen;
12@@ -202,25 +203,6 @@
13 var mouse = new LLabel.markup ("<b>" + _("Mouse") + "</b>");
14 mouse.margin_top = 12;
15
16- var start_bt = new Gtk.Button.with_label (_("Start Recording"));
17- start_bt.can_default = true;
18- start_bt.get_style_context ().add_class ("noundo");
19- start_bt.get_style_context ().add_class ("suggested-action");
20-
21- var cancel_bt = new Gtk.Button.with_label (_("Cancel"));
22-
23- var about_bt = new Gtk.Button.with_label (_("About"));
24- about_bt.image = new Gtk.Image.from_stock (Gtk.Stock.ABOUT, Gtk.IconSize.BUTTON);
25-
26- var buttons = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 5);
27- buttons.homogeneous = true;
28- buttons.pack_start (about_bt, false, true, 0);
29- buttons.pack_start (cancel_bt, false, true, 0);
30- buttons.pack_end (start_bt, false, true, 0);
31- buttons.margin_top = 24;
32-
33- this.main_window.set_default (start_bt);
34-
35 grid.attach (sound, 0, 0, 1, 1);
36 grid.attach (new LLabel.right (_("Record Computer Sounds") + ":"), 0, 1, 1, 1);
37 grid.attach (use_comp_sounds, 1, 1, 1, 1);
38@@ -235,7 +217,6 @@
39 grid.attach (width, 1, 6, 1, 1);
40 grid.attach (new LLabel.right (_("Height") + ":"), 0, 7, 1, 1);
41 grid.attach (height, 1, 7, 1, 1);
42- grid.attach (buttons, 0, 8, 2, 1);
43
44 // grid2
45 var grid2 = new Gtk.Grid ();
46@@ -281,11 +262,31 @@
47 main_box.attach (stack_switcher, 0, 0, 1, 1);
48 main_box.attach (tabs, 0, 1, 1, 1);
49 main_box.attach (pause_grid, 0, 2, 1, 1);
50+
51+ var start_bt = new Gtk.Button.with_label (_("Start Recording"));
52+ start_bt.can_default = true;
53+ start_bt.get_style_context ().add_class ("noundo");
54+ start_bt.get_style_context ().add_class ("suggested-action");
55+
56+ var cancel_bt = new Gtk.Button.with_label (_("Cancel"));
57+
58+ var about_bt = new Gtk.Button.with_label (_("About"));
59+ about_bt.image = new Gtk.Image.from_stock (Gtk.Stock.ABOUT, Gtk.IconSize.BUTTON);
60+
61+ home_buttons = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 5);
62+ home_buttons.homogeneous = true;
63+ home_buttons.pack_start (about_bt, false, true, 0);
64+ home_buttons.pack_start (cancel_bt, false, true, 0);
65+ home_buttons.pack_end (start_bt, false, true, 0);
66+ home_buttons.margin_top = 24;
67+
68+ main_box.attach (home_buttons, 0, 3, 1, 1);
69 main_box.margin = 12;
70
71 this.main_window.add (main_box);
72
73 this.main_window.show_all ();
74+ this.main_window.set_default (start_bt);
75 this.main_window.present ();
76
77 /*
78@@ -321,7 +322,7 @@
79
80 settings.monitor = int.parse (monitors_combo.active_id);
81
82- this.screen.get_monitor_geometry(settings.monitor, out this.monitor_rec);
83+ this.screen.get_monitor_geometry (settings.monitor, out this.monitor_rec);
84
85 settings.sx = this.monitor_rec.x;
86 settings.sy = this.monitor_rec.y;
87@@ -766,6 +767,7 @@
88
89 tabs.hide ();
90 stack_switcher.hide ();
91+ home_buttons.hide ();
92 pause_grid.show ();
93
94 this.main_window.icon_name = "eidete";
95@@ -776,6 +778,7 @@
96 if (tabs.visible) {
97 tabs.hide ();
98 stack_switcher.hide ();
99+ home_buttons.hide ();
100 pause_grid.show ();
101 }
102

Subscribers

People subscribed via source and target branches