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
=== modified file 'libaccount-plugin/oauth-plugin.c'
--- libaccount-plugin/oauth-plugin.c 2012-09-26 06:22:34 +0000
+++ libaccount-plugin/oauth-plugin.c 2012-09-26 16:03:23 +0000
@@ -483,9 +483,7 @@
483create_infobar (ApOAuthPlugin *self)483create_infobar (ApOAuthPlugin *self)
484{484{
485 GtkWidget *infobar;485 GtkWidget *infobar;
486 GtkWidget *grid;
487 GtkWidget *infobar_label;486 GtkWidget *infobar_label;
488 GtkWidget *legal_button;
489 GtkWidget *content_area;487 GtkWidget *content_area;
490 GtkCssProvider *css;488 GtkCssProvider *css;
491 GError *error;489 GError *error;
@@ -503,23 +501,15 @@
503 g_signal_connect (infobar, "response",501 g_signal_connect (infobar, "response",
504 G_CALLBACK (on_infobar_response), self);502 G_CALLBACK (on_infobar_response), self);
505503
506 grid = gtk_grid_new ();
507
508 provider = ap_plugin_get_provider ((ApPlugin *)self);504 provider = ap_plugin_get_provider ((ApPlugin *)self);
509 text = g_strdup_printf (_("Please authorize Ubuntu to access "505 text = g_strdup_printf (_("Please authorize Ubuntu to access "
510 "your %s account."),506 "your %s account"),
511 ag_provider_get_display_name (provider));507 ag_provider_get_display_name (provider));
512 infobar_label = gtk_label_new (text);508 infobar_label = gtk_label_new (text);
513 g_free (text);509 g_free (text);
514510
515 gtk_container_add (GTK_CONTAINER (grid), infobar_label);
516
517 legal_button = gtk_link_button_new_with_label ("help:web-credentials/legal-notice",
518 _("Learn more"));
519 gtk_container_add (GTK_CONTAINER (grid), legal_button);
520
521 content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (infobar));511 content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (infobar));
522 gtk_container_add (GTK_CONTAINER (content_area), grid);512 gtk_container_add (GTK_CONTAINER (content_area), infobar_label);
523513
524 css = gtk_css_provider_new ();514 css = gtk_css_provider_new ();
525 error = NULL;515 error = NULL;
@@ -574,6 +564,24 @@
574 return frame;564 return frame;
575}565}
576566
567static GtkWidget *
568create_legal_button ()
569{
570 GtkWidget *buttonbox;
571 GtkWidget *link_button;
572
573 buttonbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
574 gtk_button_box_set_layout (GTK_BUTTON_BOX (buttonbox), GTK_BUTTONBOX_END);
575
576 link_button = gtk_link_button_new_with_label ("help:web-credentials/legal-notice",
577 _("Legal notice"));
578
579 gtk_container_add (GTK_CONTAINER (buttonbox), link_button);
580 gtk_widget_show_all (buttonbox);
581
582 return buttonbox;
583}
584
577static void585static void
578ap_oauth_plugin_init (ApOAuthPlugin *self)586ap_oauth_plugin_init (ApOAuthPlugin *self)
579{587{
@@ -655,6 +663,7 @@
655 GtkWidget *grid;663 GtkWidget *grid;
656 GtkWidget *infobar;664 GtkWidget *infobar;
657 GtkWidget *socket_frame;665 GtkWidget *socket_frame;
666 GtkWidget *legal_button;
658667
659 grid = gtk_grid_new ();668 grid = gtk_grid_new ();
660 gtk_widget_set_hexpand (grid, TRUE);669 gtk_widget_set_hexpand (grid, TRUE);
@@ -679,6 +688,9 @@
679 socket_frame = create_socket_frame (self);688 socket_frame = create_socket_frame (self);
680 gtk_container_add (GTK_CONTAINER (grid), socket_frame);689 gtk_container_add (GTK_CONTAINER (grid), socket_frame);
681690
691 legal_button = create_legal_button ();
692 gtk_container_add (GTK_CONTAINER (grid), legal_button);
693
682 return grid;694 return grid;
683}695}
684696
685697
=== modified file 'src/cc-credentials-accounts-page.vala'
--- src/cc-credentials-accounts-page.vala 2012-09-26 05:59:52 +0000
+++ src/cc-credentials-accounts-page.vala 2012-09-26 16:03:23 +0000
@@ -98,9 +98,9 @@
98 row_spacing = 6;98 row_spacing = 6;
99 column_spacing = 12;99 column_spacing = 12;
100100
101 this.attach (create_legal_button (), 0, 0, 2, 1);101 this.attach (create_accounts_tree (), 0, 0, 1, 1);
102 this.attach (create_accounts_tree (), 0, 1, 1, 1);102 this.attach (create_accounts_notebook (), 1, 0, 1, 1);
103 this.attach (create_accounts_notebook (), 1, 1, 1, 1);103 this.attach (create_legal_button (), 0, 1, 2, 1);
104104
105 // Force handling of the changed signal.105 // Force handling of the changed signal.
106 var selection = accounts_tree.get_selection ();106 var selection = accounts_tree.get_selection ();

Subscribers

People subscribed via source and target branches

to all changes: