Merge lp:~amigadave/gnome-control-center-signon/legal-notice-tweaks into lp:gnome-control-center-signon

Proposed by David King
Status: Merged
Approved by: Alberto Mardegan
Approved revision: 109
Merged at revision: 108
Proposed branch: lp:~amigadave/gnome-control-center-signon/legal-notice-tweaks
Merge into: lp:gnome-control-center-signon
Diff against target: 99 lines (+27/-15)
2 files modified
libaccount-plugin/oauth-plugin.c (+24/-12)
src/cc-credentials-accounts-page.vala (+3/-3)
To merge this branch: bzr merge lp:~amigadave/gnome-control-center-signon/legal-notice-tweaks
Reviewer Review Type Date Requested Status
Alberto Mardegan (community) Approve
jenkins (community) continuous-integration Approve
Review via email: mp+126490@code.launchpad.net

This proposal supersedes a proposal from 2012-09-26.

Description of the change

Tweak button location and add only one string (‘Legal notice’)

* Move legal notice button in OAuth widget to bottom right
* Move legal notice button in AccountsPage to bottom right

To post a comment you must log in.
Revision history for this message
jenkins (martin-mrazik+qa) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
David King (amigadave) wrote : Posted in a previous version of this proposal

The Jenkins failure is sadly completely unrelated. :/

Revision history for this message
jenkins (martin-mrazik+qa) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alberto Mardegan (mardy) wrote :

Still works perfectly, and looks much better!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libaccount-plugin/oauth-plugin.c'
2--- libaccount-plugin/oauth-plugin.c 2012-09-26 06:22:34 +0000
3+++ libaccount-plugin/oauth-plugin.c 2012-09-26 16:03:23 +0000
4@@ -483,9 +483,7 @@
5 create_infobar (ApOAuthPlugin *self)
6 {
7 GtkWidget *infobar;
8- GtkWidget *grid;
9 GtkWidget *infobar_label;
10- GtkWidget *legal_button;
11 GtkWidget *content_area;
12 GtkCssProvider *css;
13 GError *error;
14@@ -503,23 +501,15 @@
15 g_signal_connect (infobar, "response",
16 G_CALLBACK (on_infobar_response), self);
17
18- grid = gtk_grid_new ();
19-
20 provider = ap_plugin_get_provider ((ApPlugin *)self);
21 text = g_strdup_printf (_("Please authorize Ubuntu to access "
22- "your %s account."),
23+ "your %s account"),
24 ag_provider_get_display_name (provider));
25 infobar_label = gtk_label_new (text);
26 g_free (text);
27
28- gtk_container_add (GTK_CONTAINER (grid), infobar_label);
29-
30- legal_button = gtk_link_button_new_with_label ("help:web-credentials/legal-notice",
31- _("Learn more"));
32- gtk_container_add (GTK_CONTAINER (grid), legal_button);
33-
34 content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (infobar));
35- gtk_container_add (GTK_CONTAINER (content_area), grid);
36+ gtk_container_add (GTK_CONTAINER (content_area), infobar_label);
37
38 css = gtk_css_provider_new ();
39 error = NULL;
40@@ -574,6 +564,24 @@
41 return frame;
42 }
43
44+static GtkWidget *
45+create_legal_button ()
46+{
47+ GtkWidget *buttonbox;
48+ GtkWidget *link_button;
49+
50+ buttonbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
51+ gtk_button_box_set_layout (GTK_BUTTON_BOX (buttonbox), GTK_BUTTONBOX_END);
52+
53+ link_button = gtk_link_button_new_with_label ("help:web-credentials/legal-notice",
54+ _("Legal notice"));
55+
56+ gtk_container_add (GTK_CONTAINER (buttonbox), link_button);
57+ gtk_widget_show_all (buttonbox);
58+
59+ return buttonbox;
60+}
61+
62 static void
63 ap_oauth_plugin_init (ApOAuthPlugin *self)
64 {
65@@ -655,6 +663,7 @@
66 GtkWidget *grid;
67 GtkWidget *infobar;
68 GtkWidget *socket_frame;
69+ GtkWidget *legal_button;
70
71 grid = gtk_grid_new ();
72 gtk_widget_set_hexpand (grid, TRUE);
73@@ -679,6 +688,9 @@
74 socket_frame = create_socket_frame (self);
75 gtk_container_add (GTK_CONTAINER (grid), socket_frame);
76
77+ legal_button = create_legal_button ();
78+ gtk_container_add (GTK_CONTAINER (grid), legal_button);
79+
80 return grid;
81 }
82
83
84=== modified file 'src/cc-credentials-accounts-page.vala'
85--- src/cc-credentials-accounts-page.vala 2012-09-26 05:59:52 +0000
86+++ src/cc-credentials-accounts-page.vala 2012-09-26 16:03:23 +0000
87@@ -98,9 +98,9 @@
88 row_spacing = 6;
89 column_spacing = 12;
90
91- this.attach (create_legal_button (), 0, 0, 2, 1);
92- this.attach (create_accounts_tree (), 0, 1, 1, 1);
93- this.attach (create_accounts_notebook (), 1, 1, 1, 1);
94+ this.attach (create_accounts_tree (), 0, 0, 1, 1);
95+ this.attach (create_accounts_notebook (), 1, 0, 1, 1);
96+ this.attach (create_legal_button (), 0, 1, 2, 1);
97
98 // Force handling of the changed signal.
99 var selection = accounts_tree.get_selection ();

Subscribers

People subscribed via source and target branches

to all changes: