[evolution-ews] Bug 783987 - Mail account assistant/editor too tall for small resolution



commit eb396a807a56f3acc65bf42a29023cf974ea3c02
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jun 20 19:02:23 2017 +0200

    Bug 783987 - Mail account assistant/editor too tall for small resolution

 .../e-mail-config-ews-delegates-page.c             |   11 +++++++----
 .../e-mail-config-ews-folder-sizes-page.c          |   12 +++++++-----
 .../e-mail-config-ews-folder-sizes-page.h          |    4 ++--
 src/configuration/e-mail-config-ews-gal.c          |    4 ++--
 src/configuration/e-mail-config-ews-ooo-page.c     |   14 +++++++++-----
 5 files changed, 27 insertions(+), 18 deletions(-)
---
diff --git a/src/configuration/e-mail-config-ews-delegates-page.c 
b/src/configuration/e-mail-config-ews-delegates-page.c
index fa95151..7382a7a 100644
--- a/src/configuration/e-mail-config-ews-delegates-page.c
+++ b/src/configuration/e-mail-config-ews-delegates-page.c
@@ -1010,7 +1010,7 @@ mail_config_ews_delegates_page_constructed (GObject *object)
 {
        EMailConfigEwsDelegatesPage *page;
        GtkGrid *grid;
-       GtkWidget *widget, *button, *hvgrid;
+       GtkWidget *widget, *button, *hvgrid, *main_box;
        GSList *radio_group;
        gchar *markup;
        gint row = 0;
@@ -1020,13 +1020,14 @@ mail_config_ews_delegates_page_constructed (GObject *object)
        /* Chain up to parent's constructed() method. */
        G_OBJECT_CLASS (e_mail_config_ews_delegates_page_parent_class)->constructed (object);
 
-       gtk_box_set_spacing (GTK_BOX (page), 12);
+       main_box = e_mail_config_activity_page_get_internal_box (E_MAIL_CONFIG_ACTIVITY_PAGE (page));
+       gtk_box_set_spacing (GTK_BOX (main_box), 12);
 
        markup = g_markup_printf_escaped ("<b>%s</b>", _("Delegates"));
        widget = gtk_label_new (markup);
        gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
        gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
-       gtk_box_pack_start (GTK_BOX (page), widget, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX (main_box), widget, FALSE, FALSE, 0);
        gtk_widget_show (widget);
        g_free (markup);
 
@@ -1041,7 +1042,7 @@ mail_config_ews_delegates_page_constructed (GObject *object)
                "vexpand", FALSE,
                "valign", GTK_ALIGN_START,
                NULL);
-       gtk_box_pack_start (GTK_BOX (page), widget, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX (main_box), widget, FALSE, FALSE, 0);
 
        grid = GTK_GRID (widget);
 
@@ -1138,6 +1139,8 @@ mail_config_ews_delegates_page_constructed (GObject *object)
 
        gtk_widget_show_all (GTK_WIDGET (grid));
 
+       e_mail_config_page_set_content (E_MAIL_CONFIG_PAGE (page), main_box);
+
        e_mail_config_ews_delegates_page_refresh (page);
 }
 
diff --git a/src/configuration/e-mail-config-ews-folder-sizes-page.c 
b/src/configuration/e-mail-config-ews-folder-sizes-page.c
index af1346a..f0aff35 100644
--- a/src/configuration/e-mail-config-ews-folder-sizes-page.c
+++ b/src/configuration/e-mail-config-ews-folder-sizes-page.c
@@ -49,7 +49,7 @@ enum {
 
 static void e_mail_config_ews_folder_sizes_page_interface_init (EMailConfigPageInterface *iface);
 
-G_DEFINE_DYNAMIC_TYPE_EXTENDED (EMailConfigEwsFolderSizesPage, e_mail_config_ews_folder_sizes_page, 
GTK_TYPE_BOX, 0,
+G_DEFINE_DYNAMIC_TYPE_EXTENDED (EMailConfigEwsFolderSizesPage, e_mail_config_ews_folder_sizes_page, 
GTK_TYPE_SCROLLED_WINDOW, 0,
        G_IMPLEMENT_INTERFACE_DYNAMIC (E_TYPE_MAIL_CONFIG_PAGE, 
e_mail_config_ews_folder_sizes_page_interface_init))
 
 static void
@@ -176,19 +176,19 @@ mail_config_ews_folder_sizes_page_constructed (GObject *object)
 {
        EMailConfigEwsFolderSizesPage *page = E_MAIL_CONFIG_EWS_FOLDER_SIZES_PAGE (object);
        GtkWidget *widget;
+       GtkWidget *main_box;
        GtkGrid *content_grid;
        gchar *markup;
 
        /* Chain up to parent's constructed() method. */
        G_OBJECT_CLASS (e_mail_config_ews_folder_sizes_page_parent_class)->constructed (object);
 
-       gtk_orientable_set_orientation (GTK_ORIENTABLE (page), GTK_ORIENTATION_VERTICAL);
-       gtk_box_set_spacing (GTK_BOX (page), 12);
+       main_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
 
        content_grid = GTK_GRID (gtk_grid_new ());
        gtk_grid_set_row_spacing (content_grid, 6);
        gtk_grid_set_column_spacing (content_grid, 6);
-       gtk_box_pack_start (GTK_BOX (page), GTK_WIDGET (content_grid), FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX (main_box), GTK_WIDGET (content_grid), FALSE, FALSE, 0);
 
        markup = g_markup_printf_escaped ("<b>%s</b>", _("EWS Settings"));
        widget = gtk_label_new (markup);
@@ -205,7 +205,9 @@ mail_config_ews_folder_sizes_page_constructed (GObject *object)
        g_signal_connect (widget, "clicked", G_CALLBACK (folder_sizes_clicked_cb), page);
        gtk_grid_attach (content_grid, widget, 1, 1, 1, 1);
 
-       gtk_widget_show_all (GTK_WIDGET (page));
+       gtk_widget_show_all (GTK_WIDGET (main_box));
+
+       e_mail_config_page_set_content (E_MAIL_CONFIG_PAGE (page), main_box);
 }
 
 static void
diff --git a/src/configuration/e-mail-config-ews-folder-sizes-page.h 
b/src/configuration/e-mail-config-ews-folder-sizes-page.h
index d59caad..b01dc27 100644
--- a/src/configuration/e-mail-config-ews-folder-sizes-page.h
+++ b/src/configuration/e-mail-config-ews-folder-sizes-page.h
@@ -50,12 +50,12 @@ typedef struct _EMailConfigEwsFolderSizesPageClass EMailConfigEwsFolderSizesPage
 typedef struct _EMailConfigEwsFolderSizesPagePrivate EMailConfigEwsFolderSizesPagePrivate;
 
 struct _EMailConfigEwsFolderSizesPage {
-       GtkBox parent;
+       GtkScrolledWindow parent;
        EMailConfigEwsFolderSizesPagePrivate *priv;
 };
 
 struct _EMailConfigEwsFolderSizesPageClass {
-       GtkBoxClass parent_class;
+       GtkScrolledWindowClass parent_class;
 };
 
 GType                  e_mail_config_ews_folder_sizes_page_get_type            (void) G_GNUC_CONST;
diff --git a/src/configuration/e-mail-config-ews-gal.c b/src/configuration/e-mail-config-ews-gal.c
index 6668d01..7b7d4bf 100644
--- a/src/configuration/e-mail-config-ews-gal.c
+++ b/src/configuration/e-mail-config-ews-gal.c
@@ -269,7 +269,7 @@ mail_config_ews_gal_constructed (GObject *object)
        if (!CAMEL_IS_EWS_SETTINGS (settings))
                return;
 
-       container = GTK_WIDGET (page);
+       container = e_mail_config_activity_page_get_internal_box (E_MAIL_CONFIG_ACTIVITY_PAGE (page));
 
        text = _("Global Address List");
        markup = g_markup_printf_escaped ("<b>%s</b>", text);
@@ -285,7 +285,7 @@ mail_config_ews_gal_constructed (GObject *object)
        gtk_widget_set_margin_left (widget, 12);
        gtk_grid_set_row_spacing (GTK_GRID (widget), 6);
        gtk_grid_set_column_spacing (GTK_GRID (widget), 6);
-       gtk_box_pack_start (GTK_BOX (page), widget, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
        gtk_widget_show (widget);
 
        e_binding_bind_property_full (
diff --git a/src/configuration/e-mail-config-ews-ooo-page.c b/src/configuration/e-mail-config-ews-ooo-page.c
index 01ba775..28580ce 100644
--- a/src/configuration/e-mail-config-ews-ooo-page.c
+++ b/src/configuration/e-mail-config-ews-ooo-page.c
@@ -376,6 +376,7 @@ mail_config_ews_ooo_page_constructed (GObject *object)
        GtkWidget *grid;
        GtkWidget *widget;
        GtkWidget *container;
+       GtkWidget *main_box;
        GtkSizeGroup *size_group;
        GtkTextBuffer *text_buffer;
        GSList *group = NULL;
@@ -387,22 +388,23 @@ mail_config_ews_ooo_page_constructed (GObject *object)
        /* Chain up to parent's constructed() method. */
        G_OBJECT_CLASS (e_mail_config_ews_ooo_page_parent_class)->constructed (object);
 
-       size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+       main_box = e_mail_config_activity_page_get_internal_box (E_MAIL_CONFIG_ACTIVITY_PAGE (page));
+       gtk_box_set_spacing (GTK_BOX (main_box), 12);
 
-       gtk_box_set_spacing (GTK_BOX (page), 12);
+       size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
        text = _("Out of Office");
        markup = g_markup_printf_escaped ("<b>%s</b>", text);
        widget = gtk_label_new (markup);
        gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
        gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
-       gtk_box_pack_start (GTK_BOX (page), widget, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX (main_box), widget, FALSE, FALSE, 0);
        gtk_widget_show (widget);
        g_free (markup);
 
        widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_widget_set_margin_left (widget, 12);
-       gtk_box_pack_start (GTK_BOX (page), widget, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX (main_box), widget, FALSE, FALSE, 0);
        gtk_widget_show (widget);
 
        container = widget;
@@ -441,7 +443,7 @@ mail_config_ews_ooo_page_constructed (GObject *object)
        widget = gtk_grid_new ();
        gtk_grid_set_row_spacing (GTK_GRID (widget), 6);
        gtk_grid_set_column_spacing (GTK_GRID (widget), 6);
-       gtk_box_pack_start (GTK_BOX (page), widget, TRUE, TRUE, 0);
+       gtk_box_pack_start (GTK_BOX (main_box), widget, TRUE, TRUE, 0);
        gtk_widget_show (widget);
 
        e_binding_bind_property (
@@ -601,6 +603,8 @@ mail_config_ews_ooo_page_constructed (GObject *object)
 
        g_object_unref (size_group);
 
+       e_mail_config_page_set_content (E_MAIL_CONFIG_PAGE (page), main_box);
+
        e_mail_config_ews_ooo_page_refresh (page);
 }
 


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