Merge lp:~amigadave/gnome-control-center-signon/remove-infobar into lp:gnome-control-center-signon

Proposed by David King
Status: Merged
Approved by: Alberto Mardegan
Approved revision: 114
Merged at revision: 116
Proposed branch: lp:~amigadave/gnome-control-center-signon/remove-infobar
Merge into: lp:gnome-control-center-signon
Diff against target: 67 lines (+11/-28)
1 file modified
src/cc-credentials-providers-page.vala (+11/-28)
To merge this branch: bzr merge lp:~amigadave/gnome-control-center-signon/remove-infobar
Reviewer Review Type Date Requested Status
Alberto Mardegan (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+131320@code.launchpad.net

Description of the change

Remove InfoBar in ProvidersPage

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alberto Mardegan (mardy) wrote :

Perfect!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/cc-credentials-providers-page.vala'
2--- src/cc-credentials-providers-page.vala 2012-09-26 05:59:52 +0000
3+++ src/cc-credentials-providers-page.vala 2012-10-25 07:49:19 +0000
4@@ -71,7 +71,7 @@
5 // TODO: Use common Ag.Manager.
6 manager = new Ag.Manager ();
7
8- this.add (create_providers_infobar ());
9+ this.add (create_providers_selector ());
10 this.add (create_providers_notebook ());
11
12 /* This defaults to -1, no selection, so force it to have the first
13@@ -108,11 +108,8 @@
14 *
15 * @return a Gtk.InfoBar describing the account providers
16 */
17- private Gtk.Widget create_providers_infobar ()
18+ private Gtk.Widget create_providers_selector ()
19 {
20- var infobar = new Gtk.InfoBar ();
21- infobar.message_type = Gtk.MessageType.QUESTION;
22- infobar.name = "providers-infobar";
23 var label = new Gtk.Label (_("Show accounts that integrate with:"));
24 var applications_model = new ApplicationsModel ();
25 applications_combo = new Gtk.ComboBox.with_model (applications_model);
26@@ -121,32 +118,18 @@
27 applications_combo.pack_start (text_renderer, false);
28 applications_combo.set_attributes (text_renderer, "markup",
29 ApplicationsModel.ModelColumns.APPLICATION_DESCRIPTION);
30- var infobar_grid = new Gtk.Grid ();
31- infobar_grid.column_spacing = 6;
32- infobar_grid.add (label);
33- infobar_grid.add (applications_combo);
34- var content_area = infobar.get_content_area () as Gtk.Container;
35- content_area.add (infobar_grid);
36+ var grid = new Gtk.Grid ();
37+ grid.column_spacing = 6;
38+ grid.add (label);
39+ grid.add (applications_combo);
40
41 applications_combo.changed.connect (on_applications_combo_changed);
42
43- // Override theme colors according to the UI specification.
44- try
45- {
46- var css = new Gtk.CssProvider ();
47- css.load_from_data ("@define-color question_bg_color rgb (222, 222, 222); GtkInfoBar#providers-infobar { color: @fg_color; -GtkInfoBar-action-area-border: 0 }", -1);
48- var context = infobar.get_style_context ();
49- context.add_provider (css, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
50- }
51- catch (Error err)
52- {
53- warning ("Error processing CSS theme override: %s", err.message);
54- }
55-
56- infobar.set_size_request (-1, 48);
57- infobar.show_all ();
58-
59- return infobar;
60+ // Height matches infobar of AccountDetailsPage.
61+ grid.set_size_request (-1, 48);
62+ grid.show_all ();
63+
64+ return grid;
65 }
66
67 /**

Subscribers

People subscribed via source and target branches

to all changes: