Merge lp:~elementary-apps/capnet-assist/grid-not-box into lp:~elementary-apps/capnet-assist/trunk

Proposed by Danielle Foré
Status: Merged
Approved by: Danielle Foré
Approved revision: 89
Merged at revision: 91
Proposed branch: lp:~elementary-apps/capnet-assist/grid-not-box
Merge into: lp:~elementary-apps/capnet-assist/trunk
Diff against target: 58 lines (+17/-17)
1 file modified
src/CaptiveLogin.vala (+17/-17)
To merge this branch: bzr merge lp:~elementary-apps/capnet-assist/grid-not-box
Reviewer Review Type Date Requested Status
Zisu Andrei (community) builds and does not introduce regressions Approve
Review via email: mp+305155@code.launchpad.net

Commit message

CaptiveLogin.vala: rewrite hbox as header_grid

To post a comment you must log in.
89. By Danielle Foré

merge trunk

Revision history for this message
Zisu Andrei (matzipan) :
review: Approve (builds and does not introduce regressions)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/CaptiveLogin.vala'
2--- src/CaptiveLogin.vala 2016-09-08 03:02:45 +0000
3+++ src/CaptiveLogin.vala 2016-09-08 03:26:30 +0000
4@@ -72,30 +72,29 @@
5 }
6
7 private void create_widgets () {
8- var header = new Gtk.HeaderBar ();
9- header.set_show_close_button (true);
10- header.get_style_context ().add_class ("compact");
11-
12- this.set_titlebar (header);
13-
14 tls_button = new Gtk.ToggleButton ();
15- tls_button.set_image (new Gtk.Image.from_icon_name ("content-loading-symbolic", Gtk.IconSize.BUTTON));
16+ tls_button.image = new Gtk.Image.from_icon_name ("content-loading-symbolic", Gtk.IconSize.BUTTON);
17 var tls_button_style_context = tls_button.get_style_context ();
18 tls_button_style_context.add_class (Gtk.STYLE_CLASS_FLAT);
19 tls_button_style_context.add_class ("titlebutton");
20- tls_button.set_sensitive (false);
21- tls_button.toggled.connect (on_tls_button_click);
22-
23- var hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
24- hbox.set_margin_top (3);
25- hbox.set_margin_bottom (3);
26- hbox.pack_start (tls_button);
27+ tls_button.sensitive = false;
28
29 title_label = new Gtk.Label (ValaBrowser.TITLE);
30 title_label.get_style_context ().add_class (Gtk.STYLE_CLASS_TITLE);
31- hbox.pack_start (title_label);
32-
33- header.set_custom_title (hbox);
34+
35+ var header_grid = new Gtk.Grid ();
36+ header_grid.column_spacing = 6;
37+ header_grid.margin_top = 3;
38+ header_grid.margin_bottom = 3;
39+ header_grid.add (tls_button);
40+ header_grid.add (title_label);
41+
42+ var header = new Gtk.HeaderBar ();
43+ header.show_close_button = true;
44+ header.get_style_context ().add_class ("compact");
45+ header.custom_title = header_grid;
46+
47+ set_titlebar (header);
48
49 web_view = new WebKit.WebView ();
50
51@@ -281,6 +280,7 @@
52
53 private void connect_signals () {
54 this.destroy.connect (Gtk.main_quit);
55+ tls_button.toggled.connect (on_tls_button_click);
56 //should title change?
57 web_view.notify["title"].connect ((view, param_spec) => {
58 title_label.set_text (web_view.get_title ());

Subscribers

People subscribed via source and target branches

to all changes: