Merge lp:~lemonboy/switchboard-plug-keyboard/popover into lp:~elementary-pantheon/switchboard-plug-keyboard/trunk

Proposed by The Lemon Man
Status: Merged
Approved by: Danielle Foré
Approved revision: 369
Merged at revision: 367
Proposed branch: lp:~lemonboy/switchboard-plug-keyboard/popover
Merge into: lp:~elementary-pantheon/switchboard-plug-keyboard/trunk
Diff against target: 52 lines (+5/-11)
2 files modified
src/Pages/Layout/add_layout.vala (+3/-7)
src/Pages/Layout/display.vala (+2/-4)
To merge this branch: bzr merge lp:~lemonboy/switchboard-plug-keyboard/popover
Reviewer Review Type Date Requested Status
Danielle Foré Needs Fixing
Review via email: mp+275784@code.launchpad.net

Commit message

Use a Popover instead of a Dialog for AddLayout

To post a comment you must log in.
367. By The Lemon Man

Use a Popover instead of a Dialog for AddLayout.

Revision history for this message
Danielle Foré (danrabbit) wrote :

margins are a little fucky. Probably should change that grid.margin_start to just grid.margin so you get that 12px all the way around

review: Needs Fixing
368. By The Lemon Man

Fix the margin size for the popover.

369. By The Lemon Man

Restore the call to 'add_item'

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Pages/Layout/add_layout.vala'
--- src/Pages/Layout/add_layout.vala 2015-01-18 19:33:54 +0000
+++ src/Pages/Layout/add_layout.vala 2015-10-26 23:56:58 +0000
@@ -1,23 +1,19 @@
1namespace Pantheon.Keyboard.LayoutPage1namespace Pantheon.Keyboard.LayoutPage
2{2{
3 // pop over widget to add a new keyboard layout3 // pop over widget to add a new keyboard layout
4 class AddLayout : Gtk.Dialog4 class AddLayout : Gtk.Popover
5 {5 {
6 public signal void layout_added (int language, int layout = 0);6 public signal void layout_added (int language, int layout = 0);
77
8 public AddLayout()8 public AddLayout()
9 {9 {
10 deletable = false;
11
12 var grid = new Gtk.Grid();10 var grid = new Gtk.Grid();
1311
14 grid.margin_start = 12;12 grid.margin = 12;
15 grid.margin_end = 12;
16 grid.column_spacing = 12;13 grid.column_spacing = 12;
17 grid.row_spacing = 12;14 grid.row_spacing = 12;
1815
19 Gtk.Box content = this.get_content_area ();16 this.add_with_properties (grid);
20 content.pack_start (grid, false, true, 0);
2117
22 // add some labels18 // add some labels
23 var label_language = new Gtk.Label (_("Language:"));19 var label_language = new Gtk.Label (_("Language:"));
2420
=== modified file 'src/Pages/Layout/display.vala'
--- src/Pages/Layout/display.vala 2014-10-04 22:26:16 +0000
+++ src/Pages/Layout/display.vala 2015-10-26 23:56:58 +0000
@@ -75,9 +75,7 @@
75 var pop = new AddLayout ();75 var pop = new AddLayout ();
7676
77 add_button.clicked.connect( () => {77 add_button.clicked.connect( () => {
78 // uncomment when reverting to popover78 pop.set_relative_to (add_button);
79 //pop.move_to_widget (add_button);
80 // and remove this line
81 pop.show_all ();79 pop.show_all ();
82 add_item (pop);80 add_item (pop);
83 });81 });
@@ -205,4 +203,4 @@
205 });203 });
206 }204 }
207 }205 }
208}
209\ No newline at end of file206\ No newline at end of file
207}

Subscribers

People subscribed via source and target branches

to all changes: