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



commit ecc3c03a7ce7e6a8b9d28af686725e64cb34cf07
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jun 20 19:03:45 2017 +0200

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

 src/configuration/e-mail-config-mapi-page.c |   12 +++++++-----
 src/configuration/e-mail-config-mapi-page.h |    4 ++--
 2 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/configuration/e-mail-config-mapi-page.c b/src/configuration/e-mail-config-mapi-page.c
index b82f3f9..877e29c 100644
--- a/src/configuration/e-mail-config-mapi-page.c
+++ b/src/configuration/e-mail-config-mapi-page.c
@@ -48,7 +48,7 @@ enum {
 
 static void e_mail_config_mapi_page_interface_init (EMailConfigPageInterface *iface);
 
-G_DEFINE_DYNAMIC_TYPE_EXTENDED (EMailConfigMapiPage, e_mail_config_mapi_page, GTK_TYPE_BOX, 0,
+G_DEFINE_DYNAMIC_TYPE_EXTENDED (EMailConfigMapiPage, e_mail_config_mapi_page, GTK_TYPE_SCROLLED_WINDOW, 0,
        G_IMPLEMENT_INTERFACE_DYNAMIC (E_TYPE_MAIL_CONFIG_PAGE, e_mail_config_mapi_page_interface_init))
 
 static void
@@ -172,19 +172,19 @@ mail_config_mapi_page_constructed (GObject *object)
 {
        EMailConfigMapiPage *page = E_MAIL_CONFIG_MAPI_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_mapi_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>", _("MAPI Settings"));
        widget = gtk_label_new (markup);
@@ -200,7 +200,9 @@ mail_config_mapi_page_constructed (GObject *object)
        g_signal_connect (widget, "clicked", G_CALLBACK (folder_size_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-mapi-page.h b/src/configuration/e-mail-config-mapi-page.h
index 6098d82..338dc58 100644
--- a/src/configuration/e-mail-config-mapi-page.h
+++ b/src/configuration/e-mail-config-mapi-page.h
@@ -50,12 +50,12 @@ typedef struct _EMailConfigMapiPageClass EMailConfigMapiPageClass;
 typedef struct _EMailConfigMapiPagePrivate EMailConfigMapiPagePrivate;
 
 struct _EMailConfigMapiPage {
-       GtkBox parent;
+       GtkScrolledWindow parent;
        EMailConfigMapiPagePrivate *priv;
 };
 
 struct _EMailConfigMapiPageClass {
-       GtkBoxClass parent_class;
+       GtkScrolledWindowClass parent_class;
 };
 
 GType                  e_mail_config_mapi_page_get_type                (void) G_GNUC_CONST;


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