[gnome-online-accounts] Fix the dialogs' dimensions with newer GTK+



commit f7406ce479ea424bb25fdb08600b94c6b18cbeec
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Mar 14 19:13:45 2016 +0100

    Fix the dialogs' dimensions with newer GTK+
    
    We should be pairing gtk_window_get_size gtk_window_set_default_size to
    avoid inconsistencies between the size reading and setting code. eg.,
    in recent GTK+ versions, gtk_window_get_size and
    gtk_widget_set_size_request differ in their interpretation of the CSD
    chrome.
    
    However, gtk_window_set_default_size didn't work with non-resizable
    GtkWindows, until now.
    
    Bump minimum GTK+ version to 3.19.12 for the new GtkWindow size
    handling logic.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762548

 configure.ac                            |    2 +-
 src/goabackend/goaexchangeprovider.c    |    4 ++--
 src/goabackend/goaimapsmtpprovider.c    |    4 ++--
 src/goabackend/goakerberosprovider.c    |    2 +-
 src/goabackend/goalastfmprovider.c      |    4 ++--
 src/goabackend/goamediaserverprovider.c |    2 +-
 src/goabackend/goaowncloudprovider.c    |    4 ++--
 7 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 368f18b..8dbbe7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,7 +114,7 @@ AM_CONDITIONAL(BUILD_BACKEND, [test x$enable_backend != xno])
 if test "$enable_backend" != "no"; then
   AC_DEFINE(GOA_BACKEND_ENABLED, 1, [Enable goabackend library])
 
-  PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.11.1])
+  PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.19.12])
   AC_SUBST(GTK_CFLAGS)
   AC_SUBST(GTK_LIBS)
 
diff --git a/src/goabackend/goaexchangeprovider.c b/src/goabackend/goaexchangeprovider.c
index ccecda8..5a22a5f 100644
--- a/src/goabackend/goaexchangeprovider.c
+++ b/src/goabackend/goaexchangeprovider.c
@@ -483,7 +483,7 @@ create_account_details_ui (GoaProvider    *provider,
   if (new_account)
     {
       gtk_window_get_size (GTK_WINDOW (data->dialog), &width, NULL);
-      gtk_widget_set_size_request (GTK_WIDGET (data->dialog), width, -1);
+      gtk_window_set_default_size (GTK_WINDOW (data->dialog), width, -1);
     }
   else
     {
@@ -496,7 +496,7 @@ create_account_details_ui (GoaProvider    *provider,
       if (parent != NULL)
         {
           gtk_window_get_size (parent, &width, NULL);
-          gtk_widget_set_size_request (GTK_WIDGET (data->dialog), (gint) (0.5 * width), -1);
+          gtk_window_set_default_size (GTK_WINDOW (data->dialog), (gint) (0.5 * width), -1);
         }
     }
 }
diff --git a/src/goabackend/goaimapsmtpprovider.c b/src/goabackend/goaimapsmtpprovider.c
index d7f9c80..f8486c4 100644
--- a/src/goabackend/goaimapsmtpprovider.c
+++ b/src/goabackend/goaimapsmtpprovider.c
@@ -758,7 +758,7 @@ create_account_details_ui (GoaProvider    *provider,
   if (new_account)
     {
       gtk_window_get_size (GTK_WINDOW (data->dialog), &width, NULL);
-      gtk_widget_set_size_request (GTK_WIDGET (data->dialog), width, -1);
+      gtk_window_set_default_size (GTK_WINDOW (data->dialog), width, -1);
     }
   else
     {
@@ -771,7 +771,7 @@ create_account_details_ui (GoaProvider    *provider,
       if (parent != NULL)
         {
           gtk_window_get_size (parent, &width, NULL);
-          gtk_widget_set_size_request (GTK_WIDGET (data->dialog), (gint) (0.5 * width), -1);
+          gtk_window_set_default_size (GTK_WINDOW (data->dialog), (gint) (0.5 * width), -1);
         }
     }
 }
diff --git a/src/goabackend/goakerberosprovider.c b/src/goabackend/goakerberosprovider.c
index 640102f..8e018af 100644
--- a/src/goabackend/goakerberosprovider.c
+++ b/src/goabackend/goakerberosprovider.c
@@ -758,7 +758,7 @@ create_account_details_ui (GoaKerberosProvider *self,
   gtk_container_add (GTK_CONTAINER (request->progress_grid), label);
 
   gtk_window_get_size (GTK_WINDOW (request->dialog), &width, NULL);
-  gtk_widget_set_size_request (GTK_WIDGET (request->dialog), width, -1);
+  gtk_window_set_default_size (GTK_WINDOW (request->dialog), width, -1);
 }
 
 static void
diff --git a/src/goabackend/goalastfmprovider.c b/src/goabackend/goalastfmprovider.c
index 928dd63..fe759f8 100644
--- a/src/goabackend/goalastfmprovider.c
+++ b/src/goabackend/goalastfmprovider.c
@@ -449,7 +449,7 @@ create_account_details_ui (GoaProvider    *provider,
   if (new_account)
     {
       gtk_window_get_size (GTK_WINDOW (data->dialog), &width, NULL);
-      gtk_widget_set_size_request (GTK_WIDGET (data->dialog), width, -1);
+      gtk_window_set_default_size (GTK_WINDOW (data->dialog), width, -1);
     }
   else
     {
@@ -462,7 +462,7 @@ create_account_details_ui (GoaProvider    *provider,
       if (parent != NULL)
         {
           gtk_window_get_size (parent, &width, NULL);
-          gtk_widget_set_size_request (GTK_WIDGET (data->dialog), (gint) (0.5 * width), -1);
+          gtk_window_set_default_size (GTK_WINDOW (data->dialog), (gint) (0.5 * width), -1);
         }
     }
 }
diff --git a/src/goabackend/goamediaserverprovider.c b/src/goabackend/goamediaserverprovider.c
index b0968da..28a9b30 100644
--- a/src/goabackend/goamediaserverprovider.c
+++ b/src/goabackend/goamediaserverprovider.c
@@ -418,7 +418,7 @@ create_account_details_ui (GoaProvider    *provider,
   gtk_widget_show (label);
 
   gtk_window_get_size (GTK_WINDOW (data->dialog), NULL, &height);
-  gtk_widget_set_size_request (GTK_WIDGET (data->dialog), -1, height);
+  gtk_window_set_default_size (GTK_WINDOW (data->dialog), -1, height);
 }
 
 /* ---------------------------------------------------------------------------------------------------- */
diff --git a/src/goabackend/goaowncloudprovider.c b/src/goabackend/goaowncloudprovider.c
index a763007..47f533c 100644
--- a/src/goabackend/goaowncloudprovider.c
+++ b/src/goabackend/goaowncloudprovider.c
@@ -589,7 +589,7 @@ create_account_details_ui (GoaProvider    *provider,
   if (new_account)
     {
       gtk_window_get_size (GTK_WINDOW (data->dialog), &width, NULL);
-      gtk_widget_set_size_request (GTK_WIDGET (data->dialog), width, -1);
+      gtk_window_set_default_size (GTK_WINDOW (data->dialog), width, -1);
     }
   else
     {
@@ -602,7 +602,7 @@ create_account_details_ui (GoaProvider    *provider,
       if (parent != NULL)
         {
           gtk_window_get_size (parent, &width, NULL);
-          gtk_widget_set_size_request (GTK_WIDGET (data->dialog), (gint) (0.5 * width), -1);
+          gtk_window_set_default_size (GTK_WINDOW (data->dialog), (gint) (0.5 * width), -1);
         }
     }
 }


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