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
1=== modified file 'src/Pages/Layout/add_layout.vala'
2--- src/Pages/Layout/add_layout.vala 2015-01-18 19:33:54 +0000
3+++ src/Pages/Layout/add_layout.vala 2015-10-26 23:56:58 +0000
4@@ -1,23 +1,19 @@
5 namespace Pantheon.Keyboard.LayoutPage
6 {
7 // pop over widget to add a new keyboard layout
8- class AddLayout : Gtk.Dialog
9+ class AddLayout : Gtk.Popover
10 {
11 public signal void layout_added (int language, int layout = 0);
12
13 public AddLayout()
14 {
15- deletable = false;
16-
17 var grid = new Gtk.Grid();
18
19- grid.margin_start = 12;
20- grid.margin_end = 12;
21+ grid.margin = 12;
22 grid.column_spacing = 12;
23 grid.row_spacing = 12;
24
25- Gtk.Box content = this.get_content_area ();
26- content.pack_start (grid, false, true, 0);
27+ this.add_with_properties (grid);
28
29 // add some labels
30 var label_language = new Gtk.Label (_("Language:"));
31
32=== modified file 'src/Pages/Layout/display.vala'
33--- src/Pages/Layout/display.vala 2014-10-04 22:26:16 +0000
34+++ src/Pages/Layout/display.vala 2015-10-26 23:56:58 +0000
35@@ -75,9 +75,7 @@
36 var pop = new AddLayout ();
37
38 add_button.clicked.connect( () => {
39- // uncomment when reverting to popover
40- //pop.move_to_widget (add_button);
41- // and remove this line
42+ pop.set_relative_to (add_button);
43 pop.show_all ();
44 add_item (pop);
45 });
46@@ -205,4 +203,4 @@
47 });
48 }
49 }
50-}
51\ No newline at end of file
52+}

Subscribers

People subscribed via source and target branches

to all changes: