[gnome-online-accounts] oauth, oauth2: Stop the web view from leaking out of the dialog



commit fd3837aeb76e432c3626e7e0a1aeba077ad5a9ac
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Mar 14 19:23:09 2016 +0100

    oauth, oauth2: Stop the web view from leaking out of the dialog
    
    The GtkWindow size handling logic has changed in newer GTK+. We should
    use GtkWindow API to explicitly unset the default height and width set
    on the dialog, so that it can resize itself to accommodate the
    embedded web view.
    
    However, gtk_window_set_default_size didn't work with non-resizable
    GtkWindows, until now.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762548

 src/goabackend/goaoauth2provider.c |    1 +
 src/goabackend/goaoauthprovider.c  |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/goabackend/goaoauth2provider.c b/src/goabackend/goaoauth2provider.c
index 0150406..7948ec4 100644
--- a/src/goabackend/goaoauth2provider.c
+++ b/src/goabackend/goaoauth2provider.c
@@ -1014,6 +1014,7 @@ get_tokens_and_identity (GoaOAuth2Provider  *provider,
   g_signal_connect (web_view, "password-submit", G_CALLBACK (on_web_view_password_submit), provider);
 
   gtk_container_add (GTK_CONTAINER (grid), web_view);
+  gtk_window_set_default_size (GTK_WINDOW (dialog), -1, -1);
 
   gtk_widget_show_all (GTK_WIDGET (vbox));
   gtk_dialog_run (GTK_DIALOG (dialog));
diff --git a/src/goabackend/goaoauthprovider.c b/src/goabackend/goaoauthprovider.c
index fc9ba4b..a9a826e 100644
--- a/src/goabackend/goaoauthprovider.c
+++ b/src/goabackend/goaoauthprovider.c
@@ -847,6 +847,7 @@ get_tokens_and_identity (GoaOAuthProvider *provider,
   g_signal_connect (web_view, "password-submit", G_CALLBACK (on_web_view_password_submit), &data);
 
   gtk_container_add (GTK_CONTAINER (grid), web_view);
+  gtk_window_set_default_size (GTK_WINDOW (dialog), -1, -1);
 
   gtk_widget_show_all (GTK_WIDGET (vbox));
   gtk_dialog_run (GTK_DIALOG (dialog));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]