* Removed the setting for putting all the hildon buttons as
authorJose Dapena Paz <jdapena@igalia.com>
Thu, 30 Oct 2008 12:13:01 +0000 (12:13 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Thu, 30 Oct 2008 12:13:01 +0000 (12:13 +0000)
  horizontal arrangement, as we have both types.
* Reworked the alignments of captioneds and pickers to fit specs
  easier.
* Renamed modest_maemo_utils_create_picker_layout to
  modest_maemo_utils_set_hbutton_layout, and added
  the vbutton counterpart. These are used for properly setting
  the layout we need in HildonButton with horizontal or vertical
  arrangement.
* Lots of missing sizegroup unrefs.
* Now signature edition button is a dialog action.
* Better default size for signature dialog.
* Set the default signature to the one in specs.
* Replaced signature editor scrolled window with pannable.
* Now check buttons are aligned to the left.

pmo-trunk-r6196

src/hildon2/modest-connection-specific-smtp-edit-window.c
src/hildon2/modest-default-account-settings-dialog.c
src/hildon2/modest-easysetup-wizard-dialog.c
src/hildon2/modest-maemo-global-settings-dialog.c
src/hildon2/modest-maemo-security-options-view.c
src/hildon2/modest-maemo-security-options-view.h
src/hildon2/modest-maemo-utils.c
src/hildon2/modest-maemo-utils.h
src/hildon2/modest-msg-edit-window.c
src/hildon2/modest-signature-editor-dialog.c
src/widgets/modest-ui-constants.h

index 509f58f..e3ab2e7 100644 (file)
@@ -277,7 +277,8 @@ modest_connection_specific_smtp_edit_window_init (ModestConnectionSpecificSmtpEd
        /* Create a size group to be used by all captions.
         * Note that HildonCaption does not create a default size group if we do not specify one.
         * We use GTK_SIZE_GROUP_HORIZONTAL, so that the widths are the same. */
-       GtkSizeGroup *sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       GtkSizeGroup *title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       GtkSizeGroup *value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
         
        /* The outgoing server widgets: */
        if (!priv->entry_outgoingserver)
@@ -287,7 +288,7 @@ modest_connection_specific_smtp_edit_window_init (ModestConnectionSpecificSmtpEd
        g_signal_connect(G_OBJECT(priv->entry_outgoingserver), "changed", G_CALLBACK(on_change), self);
        
        GtkWidget *captioned = 
-         modest_maemo_utils_create_captioned (sizegroup, 
+         modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup,
                                               _("mcen_li_emailsetup_smtp"), 
                                               priv->entry_outgoingserver);
        gtk_widget_show (priv->entry_outgoingserver);
@@ -298,11 +299,11 @@ modest_connection_specific_smtp_edit_window_init (ModestConnectionSpecificSmtpEd
        if (!priv->outgoing_auth_picker) {
                priv->outgoing_auth_picker = 
                        GTK_WIDGET (modest_secureauth_picker_new (MODEST_EDITABLE_SIZE,
-                                                                 MODEST_EDITABLE_ARRANGEMENT));
+                                                                 HILDON_BUTTON_ARRANGEMENT_HORIZONTAL));
        }
-       modest_maemo_utils_create_picker_layout (sizegroup, 
-                                                _("mcen_li_emailsetup_secure_authentication"),
-                                                priv->outgoing_auth_picker);
+       modest_maemo_utils_set_hbutton_layout (title_sizegroup, value_sizegroup,
+                                              _("mcen_li_emailsetup_secure_authentication"),
+                                              priv->outgoing_auth_picker);
        g_signal_connect (G_OBJECT (priv->outgoing_auth_picker), "value-changed", G_CALLBACK(on_change), self);
        gtk_widget_show (priv->outgoing_auth_picker);
        gtk_box_pack_start (GTK_BOX (vbox), priv->outgoing_auth_picker, FALSE, FALSE, MODEST_MARGIN_HALF);
@@ -311,7 +312,8 @@ modest_connection_specific_smtp_edit_window_init (ModestConnectionSpecificSmtpEd
        priv->entry_user_username = GTK_WIDGET (modest_validating_entry_new ());
        /* Auto-capitalization is the default, so let's turn it off: */
        hildon_gtk_entry_set_input_mode (GTK_ENTRY (priv->entry_user_username), HILDON_GTK_INPUT_MODE_FULL);
-       captioned = modest_maemo_utils_create_captioned (sizegroup, _("mail_fi_username"), 
+       captioned = modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup,
+                                                        _("mail_fi_username"), 
                                                         priv->entry_user_username);
        g_signal_connect(G_OBJECT(priv->entry_user_username), "changed", G_CALLBACK(on_change), self);
        gtk_widget_show (priv->entry_user_username);
@@ -334,7 +336,7 @@ modest_connection_specific_smtp_edit_window_init (ModestConnectionSpecificSmtpEd
                HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE);
        gtk_entry_set_visibility (GTK_ENTRY (priv->entry_user_password), FALSE);
        /* gtk_entry_set_invisible_char (GTK_ENTRY (priv->entry_user_password), '*'); */
-       captioned = modest_maemo_utils_create_captioned (sizegroup, 
+       captioned = modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup,
                _("mail_fi_password"), priv->entry_user_password);
        g_signal_connect(G_OBJECT(priv->entry_user_password), "changed", G_CALLBACK(on_change), self);
        gtk_widget_show (priv->entry_user_password);
@@ -345,20 +347,22 @@ modest_connection_specific_smtp_edit_window_init (ModestConnectionSpecificSmtpEd
        if (!priv->outgoing_security_picker)
                priv->outgoing_security_picker = 
                        GTK_WIDGET (modest_serversecurity_picker_new (MODEST_EDITABLE_SIZE,
-                                                                     MODEST_EDITABLE_ARRANGEMENT));
+                                                                     HILDON_BUTTON_ARRANGEMENT_HORIZONTAL));
        modest_serversecurity_picker_fill (
                MODEST_SERVERSECURITY_PICKER (priv->outgoing_security_picker), MODEST_PROTOCOLS_TRANSPORT_SMTP);
        modest_serversecurity_picker_set_active_serversecurity (
                MODEST_SERVERSECURITY_PICKER (priv->outgoing_security_picker), MODEST_PROTOCOLS_CONNECTION_NONE);
-       modest_maemo_utils_create_picker_layout (sizegroup,  _("mcen_li_emailsetup_secure_connection"), priv->outgoing_security_picker);
+       modest_maemo_utils_set_hbutton_layout (title_sizegroup, value_sizegroup,
+                                              _("mcen_li_emailsetup_secure_connection"), 
+                                              priv->outgoing_security_picker);
        gtk_widget_show (priv->outgoing_security_picker);
        gtk_box_pack_start (GTK_BOX (vbox), priv->outgoing_security_picker, FALSE, FALSE, MODEST_MARGIN_HALF);
        
        /* The port number widgets: */
        if (!priv->entry_port)
                priv->entry_port = GTK_WIDGET (hildon_number_editor_new (PORT_RANGE_MIN, PORT_RANGE_MAX));
-       captioned = modest_maemo_utils_create_captioned (sizegroup, 
-               _("mcen_fi_emailsetup_port"), priv->entry_port);
+       captioned = modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup,
+                                                        _("mcen_fi_emailsetup_port"), priv->entry_port);
        gtk_widget_add_events(GTK_WIDGET(priv->entry_port), GDK_FOCUS_CHANGE_MASK);
        g_signal_connect(G_OBJECT(priv->entry_port), "range-error", G_CALLBACK(on_range_error), self);
        g_signal_connect(G_OBJECT(priv->entry_port), "notify::value", G_CALLBACK(on_value_changed), self);
@@ -387,7 +391,9 @@ modest_connection_specific_smtp_edit_window_init (ModestConnectionSpecificSmtpEd
        
        gtk_widget_show_all (dialog_box);
        gtk_window_set_default_size (GTK_WINDOW (self), -1, 220);
-       
+
+       g_object_unref (title_sizegroup);
+       g_object_unref (value_sizegroup);
        
        /* When this window is shown, hibernation should not be possible, 
         * because there is no sensible way to save the state: */
index 5482e6d..33b4b88 100644 (file)
@@ -257,14 +257,16 @@ on_caption_entry_changed (GtkEditable *editable, gpointer user_data)
 
 static GtkWidget* 
 create_captioned (ModestDefaultAccountSettingsDialog *self,
-                 GtkSizeGroup *group,
+                 GtkSizeGroup *title_sizegroup,
+                 GtkSizeGroup *value_sizegroup,
                  const gchar *label_text,
                  GtkWidget *control)
 {
 
        GtkWidget *result;
 
-       result = modest_maemo_utils_create_captioned (group, label_text, control);
+       result = modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup,
+                                                     label_text, control);
 
        /* Connect to the appropriate changed signal for the widget, 
         * so we can ask for the prev/next buttons to be enabled/disabled appropriately:
@@ -319,18 +321,22 @@ create_page_account_details (ModestDefaultAccountSettingsDialog *self)
 {
        ModestDefaultAccountSettingsDialogPrivate *priv;
        GtkWidget *box;
-       GtkSizeGroup* sizegroup;
+       GtkSizeGroup* title_sizegroup;
+       GtkSizeGroup* value_sizegroup;
+       GtkWidget *hbox;
 
        priv = MODEST_DEFAULT_ACCOUNT_SETTINGS_DIALOG_GET_PRIVATE (self);
        box = gtk_vbox_new (FALSE, MODEST_MARGIN_NONE);
-       sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
            
        /* The description widgets: */  
        priv->entry_account_title = GTK_WIDGET (modest_validating_entry_new ());
        /* Do use auto-capitalization: */
        hildon_gtk_entry_set_input_mode (GTK_ENTRY (priv->entry_account_title), 
                HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_AUTOCAP);
-       GtkWidget *caption = create_captioned (self, sizegroup, _("mcen_fi_account_title"), 
+       GtkWidget *caption = create_captioned (self, title_sizegroup, value_sizegroup,
+                                              _("mcen_fi_account_title"), 
                                               priv->entry_account_title);
        gtk_widget_show (priv->entry_account_title);
        connect_for_modified (self, priv->entry_account_title);
@@ -361,23 +367,29 @@ create_page_account_details (ModestDefaultAccountSettingsDialog *self)
        gtk_entry_set_max_length (GTK_ENTRY (priv->entry_account_title), 64);
        modest_validating_entry_set_max_func (MODEST_VALIDATING_ENTRY (priv->entry_account_title), 
                on_entry_max, self);
-       
+
+       hbox = gtk_hbox_new (TRUE, 0);
        /* The retrieve picker: */
        priv->retrieve_picker = GTK_WIDGET (modest_retrieve_picker_new (MODEST_EDITABLE_SIZE,
-                                                                       MODEST_EDITABLE_ARRANGEMENT));
-       modest_maemo_utils_create_picker_layout (sizegroup, _("mcen_fi_advsetup_retrievetype"), priv->retrieve_picker);
+                                                                       HILDON_BUTTON_ARRANGEMENT_VERTICAL));
+       modest_maemo_utils_set_vbutton_layout (title_sizegroup, 
+                                              _("mcen_fi_advsetup_retrievetype"), priv->retrieve_picker);
        
        gtk_widget_show (priv->retrieve_picker);
        connect_for_modified (self, priv->retrieve_picker);
-       gtk_box_pack_start (GTK_BOX (box), priv->retrieve_picker, FALSE, FALSE, MODEST_MARGIN_HALF);
+       gtk_box_pack_start (GTK_BOX (hbox), priv->retrieve_picker, TRUE, TRUE, MODEST_MARGIN_HALF);
        
        /* The limit-retrieve picker: */
        priv->limit_retrieve_picker = GTK_WIDGET (modest_limit_retrieve_picker_new (MODEST_EDITABLE_SIZE,
-                                                                                   MODEST_EDITABLE_ARRANGEMENT));
-       modest_maemo_utils_create_picker_layout (sizegroup, _("mcen_fi_advsetup_limit_retrieve"), priv->limit_retrieve_picker);
+                                                                                   HILDON_BUTTON_ARRANGEMENT_VERTICAL));
+       modest_maemo_utils_set_vbutton_layout (value_sizegroup, 
+                                              _("mcen_fi_advsetup_limit_retrieve"), 
+                                              priv->limit_retrieve_picker);
        gtk_widget_show (priv->limit_retrieve_picker);
        connect_for_modified (self, priv->limit_retrieve_picker);
-       gtk_box_pack_start (GTK_BOX (box), priv->limit_retrieve_picker, FALSE, FALSE, MODEST_MARGIN_HALF);
+       gtk_box_pack_start (GTK_BOX (hbox), priv->limit_retrieve_picker, TRUE, TRUE, MODEST_MARGIN_HALF);
+       gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, FALSE, MODEST_MARGIN_HALF);
+       gtk_widget_show (hbox);
 
        /* The leave-messages widgets: */
        if(!priv->checkbox_leave_messages) {
@@ -385,13 +397,14 @@ create_page_account_details (ModestDefaultAccountSettingsDialog *self)
                        hildon_check_button_new (HILDON_SIZE_FINGER_HEIGHT);
                gtk_button_set_label (GTK_BUTTON (priv->checkbox_leave_messages),
                                      _("mcen_fi_advsetup_leave_on_server"));
-               gtk_size_group_add_widget (sizegroup, priv->checkbox_leave_messages);
+               gtk_button_set_alignment (GTK_BUTTON (priv->checkbox_leave_messages), 0.0, 0.5);
        }
        connect_for_modified (self, priv->checkbox_leave_messages);
        gtk_box_pack_start (GTK_BOX (box), priv->checkbox_leave_messages, FALSE, FALSE, MODEST_MARGIN_HALF);
        gtk_widget_show (priv->checkbox_leave_messages);
 
-       g_object_unref (sizegroup);
+       g_object_unref (title_sizegroup);
+       g_object_unref (value_sizegroup);
        
        gtk_widget_show (GTK_WIDGET (box));
        
@@ -474,12 +487,14 @@ create_page_user_details (ModestDefaultAccountSettingsDialog *self)
 {
        ModestDefaultAccountSettingsDialogPrivate *priv;
        GtkWidget *box;
-       GtkSizeGroup* sizegroup;
+       GtkSizeGroup* title_sizegroup;
+       GtkSizeGroup* value_sizegroup;
 
        priv = MODEST_DEFAULT_ACCOUNT_SETTINGS_DIALOG_GET_PRIVATE (self);
 
        box = gtk_vbox_new (FALSE, MODEST_MARGIN_NONE);
-       sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
         
        /* The name widgets: */
        priv->entry_user_name = GTK_WIDGET (modest_validating_entry_new ());
@@ -492,7 +507,7 @@ create_page_user_details (ModestDefaultAccountSettingsDialog *self)
        modest_validating_entry_set_max_func (MODEST_VALIDATING_ENTRY (priv->entry_user_name), 
                on_entry_max, self);
        GtkWidget *caption = 
-               create_captioned (self, sizegroup, 
+               create_captioned (self, title_sizegroup, value_sizegroup,
                                  _("mcen_li_emailsetup_name"), priv->entry_user_name);
        gtk_widget_show (priv->entry_user_name);
        connect_for_modified (self, priv->entry_user_name);
@@ -515,7 +530,8 @@ create_page_user_details (ModestDefaultAccountSettingsDialog *self)
        priv->entry_user_username = GTK_WIDGET (modest_validating_entry_new ());
        /* Auto-capitalization is the default, so let's turn it off: */
        hildon_gtk_entry_set_input_mode (GTK_ENTRY (priv->entry_user_username), HILDON_GTK_INPUT_MODE_FULL);
-       caption = create_captioned (self, sizegroup, _("mail_fi_username"), 
+       caption = create_captioned (self, title_sizegroup, value_sizegroup,
+                                   _("mail_fi_username"), 
                                    priv->entry_user_username);
        gtk_widget_show (priv->entry_user_username);
        connect_for_modified (self, priv->entry_user_username);
@@ -543,7 +559,7 @@ create_page_user_details (ModestDefaultAccountSettingsDialog *self)
                HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE);
        gtk_entry_set_visibility (GTK_ENTRY (priv->entry_user_password), FALSE);
        /* gtk_entry_set_invisible_char (GTK_ENTRY (priv->entry_user_password), '*'); */
-       caption = create_captioned (self, sizegroup, 
+       caption = create_captioned (self, title_sizegroup, value_sizegroup,
                                    _("mail_fi_password"), priv->entry_user_password);
        gtk_widget_show (priv->entry_user_password);
        connect_for_modified (self, priv->entry_user_password);
@@ -554,7 +570,7 @@ create_page_user_details (ModestDefaultAccountSettingsDialog *self)
        priv->entry_user_email = GTK_WIDGET (modest_validating_entry_new ());
        /* Auto-capitalization is the default, so let's turn it off: */
        hildon_gtk_entry_set_input_mode (GTK_ENTRY (priv->entry_user_email), HILDON_GTK_INPUT_MODE_FULL);
-       caption = create_captioned (self, sizegroup, 
+       caption = create_captioned (self, title_sizegroup, value_sizegroup,
                                    _("mcen_li_emailsetup_email_address"), priv->entry_user_email);
        gtk_entry_set_text (GTK_ENTRY (priv->entry_user_email), MODEST_EXAMPLE_EMAIL_ADDRESS); /* Default text. */
        gtk_widget_show (priv->entry_user_email);
@@ -570,13 +586,13 @@ create_page_user_details (ModestDefaultAccountSettingsDialog *self)
        
        /* Signature button: */
        if (!priv->button_signature)
-               priv->button_signature = gtk_button_new_with_label (_("mcen_bd_edit"));
-       caption = create_captioned (self, sizegroup, _("mcen_fi_email_signature"), priv->button_signature);
+               priv->button_signature = gtk_button_new_with_label (_("mcen_fi_email_signature"));
+       gtk_box_pack_start (GTK_BOX (GTK_DIALOG (self)->action_area), priv->button_signature, 
+                           FALSE, FALSE, 0);
        gtk_widget_show (priv->button_signature);
-       gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
-       gtk_widget_show (caption);
 
-       g_object_unref (sizegroup);
+       g_object_unref (title_sizegroup);
+       g_object_unref (value_sizegroup);
                
        g_signal_connect (G_OBJECT (priv->button_signature), "clicked",
                G_CALLBACK (on_button_signature), self);
@@ -620,7 +636,8 @@ create_page_incoming (ModestDefaultAccountSettingsDialog *self)
 {
        ModestDefaultAccountSettingsDialogPrivate *priv;
        GtkWidget *box;
-       GtkSizeGroup *sizegroup;
+       GtkSizeGroup *title_sizegroup;
+       GtkSizeGroup *value_sizegroup;
 
        priv = MODEST_DEFAULT_ACCOUNT_SETTINGS_DIALOG_GET_PRIVATE (self);
 
@@ -628,7 +645,8 @@ create_page_incoming (ModestDefaultAccountSettingsDialog *self)
        /* Create a size group to be used by all captions.
         * Note that HildonCaption does not create a default size group if we do not specify one.
         * We use GTK_SIZE_GROUP_HORIZONTAL, so that the widths are the same. */
-       sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
         
        /* The incoming server widgets: */
        if(!priv->entry_incomingserver)
@@ -642,7 +660,7 @@ create_page_incoming (ModestDefaultAccountSettingsDialog *self)
        /* The caption title will be updated in update_incoming_server_title().
         * so this default text will never be seen: */
        /* (Note: Changing the title seems pointless. murrayc) */
-       priv->caption_incoming = create_captioned (self, sizegroup, 
+       priv->caption_incoming = create_captioned (self, title_sizegroup, value_sizegroup,
                                                   "Incoming Server", priv->entry_incomingserver);
        gtk_widget_show (priv->entry_incomingserver);
        connect_for_modified (self, priv->entry_incomingserver);
@@ -652,13 +670,14 @@ create_page_incoming (ModestDefaultAccountSettingsDialog *self)
        /* Incoming security widgets */
        priv->incoming_security = 
                modest_maemo_security_options_view_new (MODEST_SECURITY_OPTIONS_INCOMING,
-                                                       TRUE, sizegroup);
+                                                       TRUE, title_sizegroup, value_sizegroup);
        gtk_box_pack_start (GTK_BOX (box), priv->incoming_security, 
                            FALSE, FALSE, MODEST_MARGIN_HALF);
 
        gtk_widget_show (priv->incoming_security);
 
-       g_object_unref (sizegroup);     
+       g_object_unref (title_sizegroup);       
+       g_object_unref (value_sizegroup);       
        gtk_widget_show (GTK_WIDGET (box));
        
        return GTK_WIDGET (box);
@@ -727,7 +746,8 @@ create_page_outgoing (ModestDefaultAccountSettingsDialog *self)
        /* Create a size group to be used by all captions.
         * Note that HildonCaption does not create a default size group if we do not specify one.
         * We use GTK_SIZE_GROUP_HORIZONTAL, so that the widths are the same. */
-       GtkSizeGroup *sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       GtkSizeGroup *title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       GtkSizeGroup *value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
         
        /* The outgoing server widgets: */
        if (!priv->entry_outgoingserver)
@@ -735,7 +755,7 @@ create_page_outgoing (ModestDefaultAccountSettingsDialog *self)
                        hildon_entry_new (HILDON_SIZE_FINGER_HEIGHT | HILDON_SIZE_AUTO_WIDTH);
        /* Auto-capitalization is the default, so let's turn it off: */
        hildon_gtk_entry_set_input_mode (GTK_ENTRY (priv->entry_outgoingserver), HILDON_GTK_INPUT_MODE_FULL);
-       GtkWidget *caption = create_captioned (self, sizegroup, 
+       GtkWidget *caption = create_captioned (self, title_sizegroup, value_sizegroup,
                                               _("mcen_li_emailsetup_smtp"), priv->entry_outgoingserver);
        gtk_widget_show (priv->entry_outgoingserver);
        connect_for_modified (self, priv->entry_outgoingserver);
@@ -745,7 +765,7 @@ create_page_outgoing (ModestDefaultAccountSettingsDialog *self)
        /* Outgoing security widgets */
        priv->outgoing_security = 
                modest_maemo_security_options_view_new (MODEST_SECURITY_OPTIONS_OUTGOING,
-                                                       TRUE, sizegroup);
+                                                       TRUE, title_sizegroup, value_sizegroup);
        gtk_box_pack_start (GTK_BOX (box), priv->outgoing_security, 
                            FALSE, FALSE, MODEST_MARGIN_HALF);
        gtk_widget_show (priv->outgoing_security);
@@ -761,28 +781,29 @@ create_page_outgoing (ModestDefaultAccountSettingsDialog *self)
                priv->checkbox_outgoing_smtp_specific = hildon_check_button_new (MODEST_EDITABLE_SIZE);
                hildon_check_button_set_active (HILDON_CHECK_BUTTON (priv->checkbox_outgoing_smtp_specific), 
                        FALSE);
+               gtk_button_set_label (GTK_BUTTON (priv->checkbox_outgoing_smtp_specific),
+                                     _("mcen_fi_advsetup_connection_smtp"));
+               gtk_button_set_alignment (GTK_BUTTON (priv->checkbox_outgoing_smtp_specific), 0.0, 0.5);
        }
-       caption = create_captioned (self, sizegroup, _("mcen_fi_advsetup_connection_smtp"), 
-                                   priv->checkbox_outgoing_smtp_specific);
        gtk_widget_show (priv->checkbox_outgoing_smtp_specific);
-       gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
-       gtk_widget_show (caption);
+       gtk_box_pack_start (GTK_BOX (box), priv->checkbox_outgoing_smtp_specific, 
+                           FALSE, FALSE, MODEST_MARGIN_HALF);
        connect_for_modified (self, priv->checkbox_outgoing_smtp_specific);
        
        /* Connection-specific SMTP-Severs Edit button: */
        if (!priv->button_outgoing_smtp_servers)
-               priv->button_outgoing_smtp_servers = gtk_button_new_with_label (_("mcen_bd_edit"));
-       caption = create_captioned (self, sizegroup, _("mcen_fi_advsetup_optional_smtp"), 
-                                   priv->button_outgoing_smtp_servers);
+               priv->button_outgoing_smtp_servers = gtk_button_new_with_label (_("mcen_fi_advsetup_optional_smtp"));
+       hildon_gtk_widget_set_theme_size (priv->button_outgoing_smtp_servers, 
+                                         HILDON_SIZE_FINGER_HEIGHT | HILDON_SIZE_AUTO_WIDTH);  
        gtk_widget_show (priv->button_outgoing_smtp_servers);
-       gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
-       gtk_widget_show (caption);
+       gtk_box_pack_start (GTK_BOX (box), priv->button_outgoing_smtp_servers, FALSE, FALSE, MODEST_MARGIN_HALF);
        
        /* Only enable the button when the checkbox is checked: */
        enable_widget_for_checkbutton (priv->button_outgoing_smtp_servers, 
                GTK_BUTTON (priv->checkbox_outgoing_smtp_specific));
 
-       g_object_unref (sizegroup);
+       g_object_unref (title_sizegroup);
+       g_object_unref (value_sizegroup);
                
        g_signal_connect (G_OBJECT (priv->button_outgoing_smtp_servers), "clicked",
                G_CALLBACK (on_button_outgoing_smtp_servers), self);
@@ -969,6 +990,7 @@ modest_default_account_settings_dialog_init (ModestDefaultAccountSettingsDialog
 {
        ModestDefaultAccountSettingsDialogPrivate *priv;
        GtkWidget *pannable;
+       GtkWidget *separator;
 
        priv = MODEST_DEFAULT_ACCOUNT_SETTINGS_DIALOG_GET_PRIVATE(self);
 
@@ -996,21 +1018,25 @@ modest_default_account_settings_dialog_init (ModestDefaultAccountSettingsDialog
        
        /* Add the notebook pages: */
        gtk_box_pack_start (GTK_BOX (priv->main_container),
-                           modest_maemo_utils_create_group_box (_("mcen_ti_account_settings_account"),
-                                                                priv->page_account_details),
+                           priv->page_account_details,
                            FALSE, FALSE, 0);
        gtk_box_pack_start (GTK_BOX (priv->main_container),
-                           modest_maemo_utils_create_group_box (_("mcen_ti_account_settings_userinfo"),
-                                                                priv->page_user_details),
+                           priv->page_user_details,
                            FALSE, FALSE, 0);
 
+       separator = gtk_hseparator_new ();
+       gtk_box_pack_start (GTK_BOX (priv->main_container), separator,
+                           FALSE, FALSE, 0);
+       gtk_widget_show (separator);
        gtk_box_pack_start (GTK_BOX (priv->main_container),
-                           modest_maemo_utils_create_group_box (_("mcen_ti_advsetup_retrieval"),
-                                                                priv->page_incoming),
+                           priv->page_incoming,
+                           FALSE, FALSE, 0);
+       separator = gtk_hseparator_new ();
+       gtk_box_pack_start (GTK_BOX (priv->main_container), separator,
                            FALSE, FALSE, 0);
+       gtk_widget_show (separator);
        gtk_box_pack_start (GTK_BOX (priv->main_container),
-                           modest_maemo_utils_create_group_box (_("mcen_ti_advsetup_sending"),
-                                                                priv->page_outgoing),
+                           priv->page_outgoing,
                            FALSE, FALSE, 0);
                
        GtkDialog *dialog = GTK_DIALOG (self);
@@ -1022,7 +1048,7 @@ modest_default_account_settings_dialog_init (ModestDefaultAccountSettingsDialog
        gtk_widget_show (GTK_WIDGET (pannable));
         
     /* Add the buttons: */
-    gtk_dialog_add_button (GTK_DIALOG(self), _("mcen_bd_dialog_ok"), GTK_RESPONSE_OK);
+       gtk_dialog_add_button (GTK_DIALOG(self), _HL("wdgt_bd_save"), GTK_RESPONSE_OK);
 
     gtk_window_set_default_size (GTK_WINDOW (self), -1, 340);
     
index a2dd2ea..9f30a52 100644 (file)
@@ -261,13 +261,15 @@ on_picker_button_value_changed (HildonPickerButton *widget, gpointer user_data)
  */
 static GtkWidget* 
 create_captioned (ModestEasysetupWizardDialog *self,
-                 GtkSizeGroup *group,
+                 GtkSizeGroup *title_size_group,
+                 GtkSizeGroup *value_size_group,
                  const gchar *value,
                  GtkWidget *control)
 {
 
        GtkWidget *result;
-       result = modest_maemo_utils_create_captioned (group, value, control);
+       result = modest_maemo_utils_create_captioned (title_size_group, value_size_group,
+                                                     value, control);
 
        /* Connect to the appropriate changed signal for the widget, 
         * so we can ask for the prev/next buttons to be enabled/disabled appropriately:
@@ -380,12 +382,14 @@ create_page_account_details (ModestEasysetupWizardDialog *self)
        /* Create a size group to be used by all captions.
         * Note that HildonCaption does not create a default size group if we do not specify one.
         * We use GTK_SIZE_GROUP_HORIZONTAL, so that the widths are the same. */
-       GtkSizeGroup* sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       GtkSizeGroup* title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       GtkSizeGroup* value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
 
        /* The country widgets: */
        priv->account_country_picker = GTK_WIDGET (modest_country_picker_new (MODEST_EDITABLE_SIZE,
-                                                                             MODEST_EDITABLE_ARRANGEMENT));
-       hildon_button_set_title (HILDON_BUTTON (priv->account_country_picker), _("mcen_fi_country"));
+                                                                             HILDON_BUTTON_ARRANGEMENT_HORIZONTAL));
+       modest_maemo_utils_set_hbutton_layout (title_sizegroup, value_sizegroup, 
+                                              _("mcen_fi_country"), priv->account_country_picker);
        g_signal_connect (G_OBJECT (priv->account_country_picker), "value-changed",
                          G_CALLBACK (on_picker_button_value_changed), self);
        gtk_box_pack_start (GTK_BOX (box), priv->account_country_picker, FALSE, FALSE, MODEST_MARGIN_HALF);
@@ -397,8 +401,10 @@ create_page_account_details (ModestEasysetupWizardDialog *self)
             
        /* The service provider widgets: */     
        priv->account_serviceprovider_picker = GTK_WIDGET (modest_provider_picker_new (MODEST_EDITABLE_SIZE,
-                                                                                      MODEST_EDITABLE_ARRANGEMENT));
-       hildon_button_set_title (HILDON_BUTTON (priv->account_serviceprovider_picker), _("mcen_fi_serviceprovider"));
+                                                                                      HILDON_BUTTON_ARRANGEMENT_HORIZONTAL));
+       modest_maemo_utils_set_hbutton_layout (title_sizegroup, value_sizegroup,
+                                              _("mcen_fi_serviceprovider"), 
+                                              priv->account_serviceprovider_picker);
        g_signal_connect (G_OBJECT (priv->account_serviceprovider_picker), "value-changed",
                          G_CALLBACK (on_picker_button_value_changed), self);
        gtk_box_pack_start (GTK_BOX (box), priv->account_serviceprovider_picker, FALSE, FALSE, MODEST_MARGIN_HALF);
@@ -424,7 +430,7 @@ create_page_account_details (ModestEasysetupWizardDialog *self)
        g_free (default_account_name);
        default_account_name = NULL;
 
-       caption = create_captioned (self, sizegroup, _("mcen_fi_account_title"), 
+       caption = create_captioned (self, title_sizegroup, value_sizegroup, _("mcen_fi_account_title"), 
                                    priv->entry_account_title);
        gtk_widget_show (priv->entry_account_title);
        gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
@@ -458,6 +464,9 @@ create_page_account_details (ModestEasysetupWizardDialog *self)
                                              on_entry_max, self);
        
        gtk_widget_show (GTK_WIDGET (box));
+
+       g_object_unref (title_sizegroup);
+       g_object_unref (value_sizegroup);
        
        return GTK_WIDGET (box);
 }
@@ -465,7 +474,8 @@ create_page_account_details (ModestEasysetupWizardDialog *self)
 static GtkWidget*
 create_page_user_details (ModestEasysetupWizardDialog *self)
 {
-       GtkSizeGroup* sizegroup;
+       GtkSizeGroup* title_sizegroup;
+       GtkSizeGroup* value_sizegroup;
        GtkWidget *box;
        ModestEasysetupWizardDialogPrivate *priv;
 
@@ -475,7 +485,8 @@ create_page_user_details (ModestEasysetupWizardDialog *self)
         * Note that HildonCaption does not create a default size group if we do not specify one.
         * We use GTK_SIZE_GROUP_HORIZONTAL, so that the widths are the same. */
        box = gtk_vbox_new (FALSE, MODEST_MARGIN_NONE);
-       sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
         
        /* The name widgets: (use auto cap) */
        priv->entry_user_name = GTK_WIDGET (modest_validating_entry_new ());
@@ -487,7 +498,7 @@ create_page_user_details (ModestEasysetupWizardDialog *self)
        gtk_entry_set_max_length (GTK_ENTRY (priv->entry_user_name), 64);
        modest_validating_entry_set_max_func (MODEST_VALIDATING_ENTRY (priv->entry_user_name), 
                                              on_entry_max, self);
-       GtkWidget *caption = create_captioned (self, sizegroup, 
+       GtkWidget *caption = create_captioned (self, title_sizegroup, value_sizegroup,
                                               _("mcen_li_emailsetup_name"), priv->entry_user_name);
        g_signal_connect(G_OBJECT(priv->entry_user_name), "changed", 
                         G_CALLBACK(on_easysetup_changed), self);
@@ -511,7 +522,7 @@ create_page_user_details (ModestEasysetupWizardDialog *self)
        /* Auto-capitalization is the default, so let's turn it off: */
        hildon_gtk_entry_set_input_mode (GTK_ENTRY (priv->entry_user_username), 
                                         HILDON_GTK_INPUT_MODE_FULL);
-       caption = create_captioned (self, sizegroup, _("mail_fi_username"), 
+       caption = create_captioned (self, title_sizegroup, value_sizegroup, _("mail_fi_username"), 
                                    priv->entry_user_username);
        gtk_widget_show (priv->entry_user_username);
        gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
@@ -539,7 +550,7 @@ create_page_user_details (ModestEasysetupWizardDialog *self)
                                         HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE);
        gtk_entry_set_visibility (GTK_ENTRY (priv->entry_user_password), FALSE);
        /* gtk_entry_set_invisible_char (GTK_ENTRY (priv->entry_user_password), '*'); */
-       caption = create_captioned (self, sizegroup, 
+       caption = create_captioned (self, title_sizegroup, value_sizegroup,
                                    _("mail_fi_password"), priv->entry_user_password);
        g_signal_connect(G_OBJECT(priv->entry_user_password), "changed", 
                         G_CALLBACK(on_easysetup_changed), self);
@@ -551,7 +562,7 @@ create_page_user_details (ModestEasysetupWizardDialog *self)
        priv->entry_user_email = GTK_WIDGET (modest_validating_entry_new ());
        /* Auto-capitalization is the default, so let's turn it off: */
        hildon_gtk_entry_set_input_mode (GTK_ENTRY (priv->entry_user_email), HILDON_GTK_INPUT_MODE_FULL);
-       caption = create_captioned (self, sizegroup, 
+       caption = create_captioned (self, title_sizegroup, value_sizegroup,
                                    _("mcen_li_emailsetup_email_address"), priv->entry_user_email);
        update_user_email_from_provider (self);
        gtk_widget_show (priv->entry_user_email);
@@ -568,6 +579,8 @@ create_page_user_details (ModestEasysetupWizardDialog *self)
        
        
        gtk_widget_show (GTK_WIDGET (box));
+       g_object_unref (title_sizegroup);
+       g_object_unref (value_sizegroup);
        
        return GTK_WIDGET (box);
 }
@@ -688,7 +701,8 @@ create_page_custom_incoming (ModestEasysetupWizardDialog *self)
        GtkWidget *box; 
        GtkWidget *scrolled_window;
        GtkWidget *label;
-       GtkSizeGroup *sizegroup;
+       GtkSizeGroup *title_sizegroup;
+       GtkSizeGroup *value_sizegroup;
 
        priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE(self);
        protocol_registry = modest_runtime_get_protocol_registry ();
@@ -710,11 +724,12 @@ create_page_custom_incoming (ModestEasysetupWizardDialog *self)
        /* Create a size group to be used by all captions.
         * Note that HildonCaption does not create a default size group if we do not specify one.
         * We use GTK_SIZE_GROUP_HORIZONTAL, so that the widths are the same. */
-       sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
         
        /* The incoming server widgets: */
        priv->incoming_servertype_picker = GTK_WIDGET (modest_servertype_picker_new (MODEST_EDITABLE_SIZE,
-                                                                                    MODEST_EDITABLE_ARRANGEMENT,
+                                                                                    HILDON_BUTTON_ARRANGEMENT_HORIZONTAL,
                                                                                     TRUE));
        hildon_button_set_title (HILDON_BUTTON (priv->incoming_servertype_picker), _("mcen_li_emailsetup_type"));
        g_signal_connect (G_OBJECT (priv->incoming_servertype_picker), "value-changed",
@@ -731,7 +746,7 @@ create_page_custom_incoming (ModestEasysetupWizardDialog *self)
        /* The caption title will be updated in update_incoming_server_title().
         * so this default text will never be seen: */
        /* (Note: Changing the title seems pointless. murrayc) */
-       priv->caption_incoming = create_captioned (self, sizegroup, 
+       priv->caption_incoming = create_captioned (self, title_sizegroup, value_sizegroup,
                                                   "Incoming Server", 
                                                   priv->entry_incomingserver);
        update_incoming_server_title (self);
@@ -753,7 +768,7 @@ create_page_custom_incoming (ModestEasysetupWizardDialog *self)
           protocols with security */   
        priv->incoming_security = 
                modest_maemo_security_options_view_new (MODEST_SECURITY_OPTIONS_INCOMING,
-                                                       FALSE, sizegroup);
+                                                       FALSE, title_sizegroup, value_sizegroup);
        gtk_box_pack_start (GTK_BOX (box), priv->incoming_security, 
                            FALSE, FALSE, MODEST_MARGIN_HALF);
        gtk_widget_show_all (priv->incoming_security);
@@ -769,6 +784,9 @@ create_page_custom_incoming (ModestEasysetupWizardDialog *self)
        gtk_widget_show (GTK_WIDGET (box));
        gtk_widget_show (scrolled_window);
 
+       g_object_unref (title_sizegroup);
+       g_object_unref (value_sizegroup);
+
        return GTK_WIDGET (scrolled_window);
 }
 
@@ -831,7 +849,8 @@ create_page_custom_outgoing (ModestEasysetupWizardDialog *self)
        /* Create a size group to be used by all captions.
         * Note that HildonCaption does not create a default size group if we do not specify one.
         * We use GTK_SIZE_GROUP_HORIZONTAL, so that the widths are the same. */
-       GtkSizeGroup *sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       GtkSizeGroup *title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+       GtkSizeGroup *value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
         
        /* The outgoing server widgets: */
        priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE (self);
@@ -840,7 +859,7 @@ create_page_custom_outgoing (ModestEasysetupWizardDialog *self)
                   G_CALLBACK (on_easysetup_changed), self);
        /* Auto-capitalization is the default, so let's turn it off: */
        hildon_gtk_entry_set_input_mode (GTK_ENTRY (priv->entry_outgoingserver), HILDON_GTK_INPUT_MODE_FULL);
-       GtkWidget *caption = create_captioned (self, sizegroup, 
+       GtkWidget *caption = create_captioned (self, title_sizegroup, value_sizegroup,
                                               _("mcen_li_emailsetup_smtp"), priv->entry_outgoingserver);
        gtk_widget_show (priv->entry_outgoingserver);
        gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
@@ -851,7 +870,7 @@ create_page_custom_outgoing (ModestEasysetupWizardDialog *self)
           protocols with security */   
        priv->outgoing_security = 
                modest_maemo_security_options_view_new (MODEST_SECURITY_OPTIONS_OUTGOING,
-                                                       FALSE, sizegroup);
+                                                       FALSE, title_sizegroup, value_sizegroup);
        gtk_box_pack_start (GTK_BOX (box), priv->outgoing_security, 
                            FALSE, FALSE, MODEST_MARGIN_HALF);
        gtk_widget_show (priv->outgoing_security);
@@ -867,7 +886,8 @@ create_page_custom_outgoing (ModestEasysetupWizardDialog *self)
        g_signal_connect (G_OBJECT (priv->checkbox_outgoing_smtp_specific), "toggled",
                   G_CALLBACK (on_easysetup_changed), self);
 
-       caption = modest_maemo_utils_create_captioned (sizegroup, _("mcen_fi_advsetup_connection_smtp"), 
+       caption = modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup,
+                                                      _("mcen_fi_advsetup_connection_smtp"), 
                                                       priv->checkbox_outgoing_smtp_specific);
        gtk_widget_show (priv->checkbox_outgoing_smtp_specific);
        gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
@@ -875,7 +895,8 @@ create_page_custom_outgoing (ModestEasysetupWizardDialog *self)
        
        /* Connection-specific SMTP-Severs Edit button: */
        priv->button_outgoing_smtp_servers = gtk_button_new_with_label (_("mcen_bd_edit"));
-       caption = modest_maemo_utils_create_captioned (sizegroup, _("mcen_fi_advsetup_optional_smtp"), 
+       caption = modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup,
+                                                      _("mcen_fi_advsetup_optional_smtp"), 
                                                       priv->button_outgoing_smtp_servers);
        gtk_widget_show (priv->button_outgoing_smtp_servers);
        gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
@@ -893,6 +914,9 @@ create_page_custom_outgoing (ModestEasysetupWizardDialog *self)
        
        
        gtk_widget_show (GTK_WIDGET (box));
+
+       g_object_unref (title_sizegroup);
+       g_object_unref (value_sizegroup);
        
        return GTK_WIDGET (box);
 }
@@ -948,7 +972,8 @@ create_page_complete_custom (ModestEasysetupWizardDialog *self)
        gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
        gtk_widget_show (label);
        
-       GtkWidget *caption = modest_maemo_utils_create_captioned (NULL, _("mcen_fi_advanced_settings"), 
+       GtkWidget *caption = modest_maemo_utils_create_captioned (NULL, NULL,
+                                                                 _("mcen_fi_advanced_settings"), 
                                                                  button_edit);
        gtk_widget_show (button_edit);
        gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
index 9c87290..fb64ea4 100644 (file)
@@ -191,7 +191,8 @@ static GtkWidget*
 create_updating_page (ModestMaemoGlobalSettingsDialog *self)
 {
        GtkWidget *vbox, *vbox_update, *vbox_limit, *label, *hbox;
-       GtkSizeGroup *size_group;
+       GtkSizeGroup *title_size_group;
+       GtkSizeGroup *value_size_group;
        ModestGlobalSettingsDialogPrivate *ppriv;
        GtkWidget *pannable;
 
@@ -199,11 +200,13 @@ create_updating_page (ModestMaemoGlobalSettingsDialog *self)
        vbox = gtk_vbox_new (FALSE, MODEST_MARGIN_DEFAULT);
 
        vbox_update = gtk_vbox_new (FALSE, MODEST_MARGIN_DEFAULT);
-       size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+       title_size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+       value_size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
        /* Auto update */
        ppriv->auto_update = hildon_check_button_new (MODEST_EDITABLE_SIZE);
        gtk_button_set_label (GTK_BUTTON (ppriv->auto_update), _("mcen_fi_options_autoupdate"));
+       gtk_button_set_alignment (GTK_BUTTON (ppriv->auto_update), 0.0, 0.5);
        gtk_box_pack_start (GTK_BOX (vbox_update), ppriv->auto_update, FALSE, FALSE, MODEST_MARGIN_HALF);
        g_signal_connect (ppriv->auto_update, "clicked", G_CALLBACK (on_auto_update_clicked), self);
 
@@ -214,10 +217,11 @@ create_updating_page (ModestMaemoGlobalSettingsDialog *self)
         * so it can't know how to manage its memory. */ 
        ppriv->connect_via_list = _modest_global_settings_dialog_get_connected_via ();
        ppriv->connect_via = modest_selector_picker_new (MODEST_EDITABLE_SIZE,
-                                                        MODEST_EDITABLE_ARRANGEMENT,
+                                                        HILDON_BUTTON_ARRANGEMENT_VERTICAL,
                                                         ppriv->connect_via_list, g_int_equal);
-       modest_maemo_utils_create_picker_layout (size_group, _("mcen_fi_options_connectiontype"),
-                                                ppriv->connect_via);
+       modest_maemo_utils_set_vbutton_layout (title_size_group, 
+                                              _("mcen_fi_options_connectiontype"),
+                                              ppriv->connect_via);
        gtk_box_pack_start (GTK_BOX (vbox_update), ppriv->connect_via, FALSE, FALSE, MODEST_MARGIN_HALF);
 
        /* Update interval */
@@ -227,10 +231,11 @@ create_updating_page (ModestMaemoGlobalSettingsDialog *self)
         * so it can't know how to manage its memory. */ 
        ppriv->update_interval_list = _modest_global_settings_dialog_get_update_interval ();
        ppriv->update_interval = modest_selector_picker_new (MODEST_EDITABLE_SIZE,
-                                                            MODEST_EDITABLE_ARRANGEMENT,
+                                                            HILDON_BUTTON_ARRANGEMENT_VERTICAL,
                                                             ppriv->update_interval_list, g_int_equal);
-       modest_maemo_utils_create_picker_layout (size_group, _("mcen_fi_options_updateinterval"), 
-                                                ppriv->update_interval);
+       modest_maemo_utils_set_vbutton_layout (title_size_group, 
+                                              _("mcen_fi_options_updateinterval"), 
+                                              ppriv->update_interval);
        gtk_box_pack_start (GTK_BOX (vbox_update), ppriv->update_interval, FALSE, FALSE, MODEST_MARGIN_HALF);
 
        /* Add to vbox */
@@ -239,9 +244,13 @@ create_updating_page (ModestMaemoGlobalSettingsDialog *self)
        /* Separator */
        gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, MODEST_MARGIN_HALF);
 
+       g_object_unref (title_size_group);
+       g_object_unref (value_size_group);
+
        /* Limits */
        vbox_limit = gtk_vbox_new (FALSE, MODEST_MARGIN_DEFAULT);
-       size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+       title_size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+       value_size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
        /* Size limit */
        ppriv->size_limit = hildon_number_editor_new (MSG_SIZE_MIN_VAL, MSG_SIZE_MAX_VAL);
@@ -264,10 +273,11 @@ create_updating_page (ModestMaemoGlobalSettingsDialog *self)
         * so it can't know how to manage its memory. */ 
        ppriv->msg_format_list = _modest_global_settings_dialog_get_msg_formats ();
        ppriv->msg_format = modest_selector_picker_new (MODEST_EDITABLE_SIZE,
-                                                       MODEST_EDITABLE_ARRANGEMENT,
+                                                       HILDON_BUTTON_ARRANGEMENT_VERTICAL,
                                                        ppriv->msg_format_list, g_int_equal);
-       modest_maemo_utils_create_picker_layout (size_group, _("mcen_fi_options_messageformat"), 
-                                                ppriv->msg_format);
+       modest_maemo_utils_set_vbutton_layout (title_size_group, 
+                                              _("mcen_fi_options_messageformat"), 
+                                              ppriv->msg_format);
 
        gtk_box_pack_start (GTK_BOX (vbox), ppriv->msg_format, FALSE, FALSE, MODEST_MARGIN_HALF);
 
@@ -277,6 +287,9 @@ create_updating_page (ModestMaemoGlobalSettingsDialog *self)
        gtk_widget_show (vbox);
        gtk_widget_show (pannable);
 
+       g_object_unref (title_size_group);
+       g_object_unref (value_size_group);
+
        return pannable;
 }
 
index 2038b5f..41e55d9 100644 (file)
@@ -128,7 +128,8 @@ on_auth_changed (GtkWidget *widget,
 
 static void
 create_incoming_security (ModestSecurityOptionsView* self,
-                         GtkSizeGroup *size_group)
+                         GtkSizeGroup *title_size_group,
+                         GtkSizeGroup *value_size_group)
 {
        ModestSecurityOptionsViewPrivate *ppriv;
        GtkWidget *entry_caption = NULL;
@@ -137,22 +138,25 @@ create_incoming_security (ModestSecurityOptionsView* self,
 
        /* Create widgets for incoming security */
        ppriv->security_view = GTK_WIDGET (modest_serversecurity_picker_new (MODEST_EDITABLE_SIZE,
-                                                                            MODEST_EDITABLE_ARRANGEMENT));
+                                                                            HILDON_BUTTON_ARRANGEMENT_HORIZONTAL));
        modest_serversecurity_picker_fill (MODEST_SERVERSECURITY_PICKER (ppriv->security_view), 
                                           modest_protocol_registry_get_pop_type_id ());
-       modest_maemo_utils_create_picker_layout (size_group, 
-                                                _("mcen_li_emailsetup_secure_connection"), 
-                                                ppriv->security_view);
+       modest_maemo_utils_set_hbutton_layout (title_size_group, 
+                                              value_size_group,
+                                              _("mcen_li_emailsetup_secure_connection"), 
+                                              ppriv->security_view);
 
        if (ppriv->full) {              
                ppriv->port_view = GTK_WIDGET (hildon_number_editor_new (PORT_MIN, PORT_MAX));
-               entry_caption = modest_maemo_utils_create_captioned (size_group, _("mcen_fi_emailsetup_port"), 
+               entry_caption = modest_maemo_utils_create_captioned (title_size_group,
+                                                                    value_size_group,
+                                                                    _("mcen_fi_emailsetup_port"), 
                                                                     ppriv->port_view);
        }
 
        ppriv->auth_view = hildon_check_button_new (MODEST_EDITABLE_SIZE);
        gtk_button_set_label (GTK_BUTTON (ppriv->auth_view), _("mcen_li_emailsetup_secure_authentication"));
-       gtk_size_group_add_widget (size_group, ppriv->auth_view);
+       gtk_button_set_alignment (GTK_BUTTON (ppriv->auth_view), 0.0, 0.5);
 
        /* Track changes in UI */       
        g_signal_connect (G_OBJECT (ppriv->security_view), "value-changed",
@@ -224,7 +228,8 @@ on_entry_changed (GtkEditable *editable,
 
 static void
 create_outgoing_security (ModestSecurityOptionsView* self,
-                         GtkSizeGroup *size_group)
+                         GtkSizeGroup *title_size_group,
+                         GtkSizeGroup *value_size_group)
 {
        ModestSecurityOptionsViewPrivate *ppriv;
        GtkWidget *user_caption = NULL;
@@ -234,17 +239,21 @@ create_outgoing_security (ModestSecurityOptionsView* self,
        
        /* The secure connection widgets */
        ppriv->security_view = GTK_WIDGET (modest_serversecurity_picker_new (MODEST_EDITABLE_SIZE,
-                                                                            MODEST_EDITABLE_ARRANGEMENT));
+                                                                            HILDON_BUTTON_ARRANGEMENT_HORIZONTAL));
        modest_serversecurity_picker_fill (MODEST_SERVERSECURITY_PICKER (ppriv->security_view), 
                                              MODEST_PROTOCOLS_TRANSPORT_SMTP);
-       modest_maemo_utils_create_picker_layout (size_group, _("mcen_li_emailsetup_secure_connection"), 
-                                                ppriv->security_view);
+       modest_maemo_utils_set_hbutton_layout (title_size_group,
+                                              value_size_group,
+                                              _("mcen_li_emailsetup_secure_connection"), 
+                                              ppriv->security_view);
        
        /* The secure authentication widgets */
        ppriv->auth_view = GTK_WIDGET (modest_secureauth_picker_new (MODEST_EDITABLE_SIZE,
-                                                                    MODEST_EDITABLE_ARRANGEMENT));
-       modest_maemo_utils_create_picker_layout (size_group, _("mcen_li_emailsetup_secure_authentication"), 
-                                                ppriv->auth_view);
+                                                                    HILDON_BUTTON_ARRANGEMENT_HORIZONTAL));
+       modest_maemo_utils_set_hbutton_layout (title_size_group,
+                                              value_size_group,
+                                              _("mcen_li_emailsetup_secure_authentication"), 
+                                              ppriv->auth_view);
 
        if (ppriv->full) {
                gchar *user_label;
@@ -257,7 +266,9 @@ create_outgoing_security (ModestSecurityOptionsView* self,
                                                 HILDON_GTK_INPUT_MODE_FULL);
 
                user_label = g_strdup_printf("%s*", _("mail_fi_username"));
-               user_caption = modest_maemo_utils_create_captioned (size_group, user_label, 
+               user_caption = modest_maemo_utils_create_captioned (title_size_group,
+                                                                   value_size_group,
+                                                                   user_label, 
                                                                    ppriv->user_entry);
                g_free (user_label);
        
@@ -278,11 +289,15 @@ create_outgoing_security (ModestSecurityOptionsView* self,
                                                 HILDON_GTK_INPUT_MODE_INVISIBLE);
                gtk_entry_set_visibility (GTK_ENTRY (ppriv->pwd_entry), FALSE);
 
-               pwd_caption = modest_maemo_utils_create_captioned (size_group, _("mail_fi_password"), 
+               pwd_caption = modest_maemo_utils_create_captioned (title_size_group,
+                                                                  value_size_group,
+                                                                  _("mail_fi_password"), 
                                                                   ppriv->pwd_entry);
 
                ppriv->port_view = GTK_WIDGET (hildon_number_editor_new (PORT_MIN, PORT_MAX));
-               port_caption = modest_maemo_utils_create_captioned (size_group, _("mcen_fi_emailsetup_port"), 
+               port_caption = modest_maemo_utils_create_captioned (title_size_group,
+                                                                   value_size_group,
+                                                                   _("mcen_fi_emailsetup_port"), 
                                                                    ppriv->port_view);
        }
 
@@ -333,7 +348,8 @@ create_outgoing_security (ModestSecurityOptionsView* self,
 GtkWidget *    
 modest_maemo_security_options_view_new  (ModestSecurityOptionsType type,
                                         gboolean full,
-                                        GtkSizeGroup *size_group)
+                                        GtkSizeGroup *title_size_group,
+                                        GtkSizeGroup *value_size_group)
 {
        ModestSecurityOptionsView* self;
        ModestSecurityOptionsViewPrivate *ppriv;
@@ -345,9 +361,9 @@ modest_maemo_security_options_view_new  (ModestSecurityOptionsType type,
        ppriv->full = full;
        self->type = type;
        if (self->type == MODEST_SECURITY_OPTIONS_INCOMING)
-               create_incoming_security (self, size_group);
+               create_incoming_security (self, title_size_group, value_size_group);
        else
-               create_outgoing_security (self, size_group);
+               create_outgoing_security (self, title_size_group, value_size_group);
 
        return (GtkWidget *) self;
 }
index 9511c5c..7333dd6 100644 (file)
@@ -61,7 +61,8 @@ GType        modest_maemo_security_options_view_get_type    (void) G_GNUC_CONST;
 
 GtkWidget* modest_maemo_security_options_view_new (ModestSecurityOptionsType type,
                                                   gboolean full,
-                                                  GtkSizeGroup *size_group);
+                                                  GtkSizeGroup *title_size_group,
+                                                  GtkSizeGroup *value_size_group);
 
 G_END_DECLS
 
index 12a1817..0f56b59 100644 (file)
@@ -290,39 +290,87 @@ modest_maemo_utils_get_manager_menubar_as_menu (GtkUIManager *manager,
        return new_menu;
 }
 
+/**
+ * modest_maemo_utils_create_captioned:
+ * @title_size_group: a #GtkSizeGroup
+ * @value_size_group: a #GtkSizeGroup
+ * @title: a string
+ * @control: a #GtkWidget
+ *
+ * this creates a widget (a #GtkHBox) with a control, and a label
+ * (@string) captioning it. It also uses the proper size groups for title
+ * and control.
+ *
+ * Returns: a widget containing the control and a proper label.
+ */
 GtkWidget *
-modest_maemo_utils_create_captioned    (GtkSizeGroup *group,
-                                       const gchar *label_text,
+modest_maemo_utils_create_captioned    (GtkSizeGroup *title_size_group,
+                                       GtkSizeGroup *value_size_group,
+                                       const gchar *title,
                                        GtkWidget *control)
 {
        GtkWidget *label;
        GtkWidget *box;
   
-       label = gtk_label_new (label_text);
+       label = gtk_label_new (title);
        gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
        gtk_widget_show (label);
-       box = gtk_hbox_new (FALSE, MODEST_MARGIN_NONE);
-       gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, MODEST_MARGIN_HALF);
+       box = gtk_hbox_new (TRUE, MODEST_MARGIN_HALF);
+       gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, MODEST_MARGIN_HALF);
        gtk_box_pack_start (GTK_BOX (box), control, TRUE, TRUE, MODEST_MARGIN_HALF);
-       if (group)
-               gtk_size_group_add_widget (group, label);
+       if (title_size_group)
+               gtk_size_group_add_widget (title_size_group, label);
+       if (value_size_group)
+               gtk_size_group_add_widget (value_size_group, control);
 
        hildon_gtk_widget_set_theme_size (control, HILDON_SIZE_FINGER_HEIGHT | HILDON_SIZE_AUTO_WIDTH);
 
        return box;
 }
 
+/**
+ * modest_maemo_utils_set_hbutton_layout:
+ * @title_sizegroup: a #GtkSizeGroup, or %NULL
+ * @value_sizegroup: a #GtkSizeGroup, or %NULL
+ * @title: a string
+ * @button: a #HildonButton
+ *
+ * Configures the alignment and layout of @button. If @title_sizegroup is provided,
+ * the title will be aligned to the left using it. If @value_sizegroup is provided,
+ * the value will be aligned to the left using it. It also sets the title
+ * of the button.
+ *
+ * The alignment is left for the title and for the value.
+ */
+void
+modest_maemo_utils_set_hbutton_layout (GtkSizeGroup *title_sizegroup, 
+                                      GtkSizeGroup *value_sizegroup,
+                                      const gchar *title, 
+                                      GtkWidget *button)
+{
+       hildon_button_set_title (HILDON_BUTTON (button), title);
+       if (title_sizegroup)
+               hildon_button_add_title_size_group (HILDON_BUTTON (button), title_sizegroup);
+       if (value_sizegroup)
+               hildon_button_add_title_size_group (HILDON_BUTTON (button), value_sizegroup);
+       hildon_button_set_alignment (HILDON_BUTTON (button), 0.0, 0.5, 1.0, 0.0);
+       hildon_button_set_title_alignment (HILDON_BUTTON (button), 0.0, 0.5);
+       hildon_button_set_value_alignment (HILDON_BUTTON (button), 0.0, 0.5);
+}
+
 void
-modest_maemo_utils_create_picker_layout (GtkSizeGroup *sizegroup, 
-                                        const gchar *label, 
-                                        GtkWidget *picker)
+modest_maemo_utils_set_vbutton_layout (GtkSizeGroup *sizegroup, 
+                                      const gchar *title, 
+                                      GtkWidget *button)
 {
-       hildon_button_set_title (HILDON_BUTTON (picker), label);
-       if (sizegroup)
-               hildon_button_add_title_size_group (HILDON_BUTTON (picker), sizegroup);
-       hildon_button_set_alignment (HILDON_BUTTON (picker), 0.0, 0.5, 1.0, 0.0);
-       hildon_button_set_title_alignment (HILDON_BUTTON (picker), 0.0, 0.5);
-       hildon_button_set_value_alignment (HILDON_BUTTON (picker), 0.0, 0.5);
+       hildon_button_set_title (HILDON_BUTTON (button), title);
+       if (sizegroup) {
+               hildon_button_add_title_size_group (HILDON_BUTTON (button), sizegroup);
+               hildon_button_add_value_size_group (HILDON_BUTTON (button), sizegroup);
+       }
+       hildon_button_set_alignment (HILDON_BUTTON (button), 0.0, 0.5, 1.0, 0.0);
+       hildon_button_set_title_alignment (HILDON_BUTTON (button), 0.0, 0.5);
+       hildon_button_set_value_alignment (HILDON_BUTTON (button), 0.0, 0.5);
 }
 
 GtkWidget *
index cb5a71f..e3f03c1 100644 (file)
@@ -123,14 +123,18 @@ void modest_maemo_utils_set_osso_context (osso_context_t *osso_context);
  */
 GtkWidget *modest_maemo_utils_get_manager_menubar_as_menu (GtkUIManager *manager, const gchar *item_name);
 
-GtkWidget *modest_maemo_utils_create_captioned    (GtkSizeGroup *group,
-                                                  const gchar *label_text,
+GtkWidget *modest_maemo_utils_create_captioned    (GtkSizeGroup *title_size_group,
+                                                  GtkSizeGroup *value_size_group,
+                                                  const gchar *title,
                                                   GtkWidget *control);
 
-void
-modest_maemo_utils_create_picker_layout (GtkSizeGroup *sizegroup, 
-                                        const gchar *label, 
-                                        GtkWidget *picker);
+void       modest_maemo_utils_set_hbutton_layout (GtkSizeGroup *title_sizegroup, 
+                                                 GtkSizeGroup *value_sizegroup,
+                                                 const gchar *title, 
+                                                 GtkWidget *button);
+void       modest_maemo_utils_set_vbutton_layout (GtkSizeGroup *sizegroup, 
+                                                 const gchar *title, 
+                                                 GtkWidget *button);
 
 GtkWidget *modest_maemo_utils_create_group_box (const gchar *label, GtkWidget *contents);
 
index dfefb1e..6ea289d 100644 (file)
@@ -729,7 +729,8 @@ init_window (ModestMsgEditWindow *obj)
        GdkPixbuf *window_icon = NULL;
        GError *error = NULL;
 
-       GtkSizeGroup *size_group;
+       GtkSizeGroup *title_size_group;
+       GtkSizeGroup *value_size_group;
        GtkWidget *subject_box;
        GtkWidget *attachment_icon;
        GtkWidget *window_box;
@@ -788,17 +789,17 @@ init_window (ModestMsgEditWindow *obj)
 
        parent_priv->menubar = NULL;
 
-       size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+       title_size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+       value_size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
        /* Note: This ModestPairList* must exist for as long as the picker
         * that uses it, because the ModestSelectorPicker uses the ID opaquely, 
         * so it can't know how to manage its memory. */ 
        priv->from_field    = modest_selector_picker_new (MODEST_EDITABLE_SIZE,
-                                                         MODEST_EDITABLE_ARRANGEMENT,
+                                                         HILDON_BUTTON_ARRANGEMENT_HORIZONTAL,
                                                          NULL, g_str_equal);
-       hildon_button_set_alignment (HILDON_BUTTON (priv->from_field), 0.0, 0.5, 1.0, 0.0);
-       hildon_button_set_title_alignment (HILDON_BUTTON (priv->from_field), 0.0, 0.5);
-       hildon_button_set_value_alignment (HILDON_BUTTON (priv->from_field), 0.0, 0.5);
+       modest_maemo_utils_set_hbutton_layout (title_size_group, value_size_group, 
+                                              _("mail_va_from"), priv->from_field);
 
        priv->to_field      = modest_recpt_editor_new ();
        priv->cc_field      = modest_recpt_editor_new ();
@@ -824,22 +825,22 @@ init_window (ModestMsgEditWindow *obj)
        
        priv->header_box = gtk_vbox_new (FALSE, 0);
        
-       hildon_button_add_title_size_group (HILDON_BUTTON (priv->from_field), size_group);
-       to_caption = modest_maemo_utils_create_captioned (size_group, _("mail_va_to"), priv->to_field);
-       priv->cc_caption = modest_maemo_utils_create_captioned (size_group, _("mail_va_cc"), priv->cc_field);
-       priv->bcc_caption = modest_maemo_utils_create_captioned (size_group, _("mail_va_hotfix1"), priv->bcc_field);
-       subject_caption = modest_maemo_utils_create_captioned (size_group, _("mail_va_subject"), subject_box);
-       priv->attachments_caption = modest_maemo_utils_create_captioned (size_group, _("mail_va_attachment"), priv->attachments_view);
-       g_object_unref (size_group);
-
-       size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
-       hildon_button_add_value_size_group (HILDON_BUTTON (priv->from_field), size_group);
-       modest_recpt_editor_set_field_size_group (MODEST_RECPT_EDITOR (priv->to_field), size_group);
-       modest_recpt_editor_set_field_size_group (MODEST_RECPT_EDITOR (priv->cc_field), size_group);
-       modest_recpt_editor_set_field_size_group (MODEST_RECPT_EDITOR (priv->bcc_field), size_group);
-       gtk_size_group_add_widget (size_group, priv->subject_field);
-       gtk_size_group_add_widget (size_group, priv->attachments_view);
-       g_object_unref (size_group);
+       to_caption = modest_maemo_utils_create_captioned (title_size_group, value_size_group,
+                                                         _("mail_va_to"), priv->to_field);
+       priv->cc_caption = modest_maemo_utils_create_captioned (title_size_group, value_size_group,
+                                                               _("mail_va_cc"), priv->cc_field);
+       priv->bcc_caption = modest_maemo_utils_create_captioned (title_size_group, value_size_group,
+                                                                _("mail_va_hotfix1"), priv->bcc_field);
+       subject_caption = modest_maemo_utils_create_captioned (title_size_group, value_size_group,
+                                                              _("mail_va_subject"), subject_box);
+       priv->attachments_caption = modest_maemo_utils_create_captioned (title_size_group, value_size_group,
+                                                                        _("mail_va_attachment"), 
+                                                                        priv->attachments_view);
+       /* modest_recpt_editor_set_field_size_group (MODEST_RECPT_EDITOR (priv->to_field), value_size_group); */
+       /* modest_recpt_editor_set_field_size_group (MODEST_RECPT_EDITOR (priv->cc_field), value_size_group); */
+       /* modest_recpt_editor_set_field_size_group (MODEST_RECPT_EDITOR (priv->bcc_field), value_size_group); */
+       g_object_unref (title_size_group);
+       g_object_unref (value_size_group);
 
        gtk_box_pack_start (GTK_BOX (priv->header_box), priv->from_field, FALSE, FALSE, 0);
        gtk_box_pack_start (GTK_BOX (priv->header_box), to_caption, FALSE, FALSE, 0);
index cd9a0fc..ad655e0 100644 (file)
@@ -37,7 +37,7 @@
 #include <gtk/gtkvbox.h>
 #include <gtk/gtktextview.h>
 #include <gtk/gtklabel.h>
-#include <gtk/gtkscrolledwindow.h>
+#include <hildon/hildon-pannable-area.h>
 #include <gtk/gtkstock.h>
 #include <glib/gi18n.h>
 #include <modest-maemo-utils.h>
@@ -54,7 +54,7 @@ struct _ModestSignatureEditorDialogPrivate
 {
        GtkWidget *checkbox_use;
        GtkWidget *label;
-       GtkWidget *scrolledwindow;
+       GtkWidget *pannable;
        GtkWidget *textview;
 };
 
@@ -112,7 +112,7 @@ enable_widgets (ModestSignatureEditorDialog *self)
                
        const gboolean enable = hildon_check_button_get_active (HILDON_CHECK_BUTTON (priv->checkbox_use));
        gtk_widget_set_sensitive (priv->label, enable);
-       gtk_widget_set_sensitive (priv->scrolledwindow, enable);
+       gtk_widget_set_sensitive (priv->pannable, enable);
        gtk_text_view_set_editable (GTK_TEXT_VIEW (priv->textview), enable);
 }
 
@@ -137,6 +137,7 @@ modest_signature_editor_dialog_init (ModestSignatureEditorDialog *self)
        priv->checkbox_use = hildon_check_button_new (HILDON_SIZE_FINGER_HEIGHT);
        gtk_button_set_label (GTK_BUTTON (priv->checkbox_use), 
                              _("mcen_fi_email_signatures_use_signature"));
+       gtk_button_set_alignment (GTK_BUTTON (priv->checkbox_use), 0.0, 0.5);
        gtk_box_pack_start (GTK_BOX (box), priv->checkbox_use, FALSE, FALSE, MODEST_MARGIN_HALF);
        gtk_widget_show (priv->checkbox_use);
        
@@ -144,28 +145,25 @@ modest_signature_editor_dialog_init (ModestSignatureEditorDialog *self)
                          G_CALLBACK (on_toggle_button_changed), self);         
        
        priv->label = gtk_label_new (""); /* Set in modest_signature_editor_dialog_set_settings(). */
+       gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.0);
        gtk_box_pack_start (GTK_BOX (box), priv->label, FALSE, FALSE, MODEST_MARGIN_HALF);
        gtk_widget_show (priv->label);
        
-       priv->scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
-       gtk_container_set_border_width (GTK_CONTAINER (priv->scrolledwindow), MODEST_MARGIN_DEFAULT);
-       gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->scrolledwindow), 
-               GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
-       gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (priv->scrolledwindow), GTK_SHADOW_IN);
-       gtk_box_pack_start (GTK_BOX (box), priv->scrolledwindow, FALSE, FALSE, MODEST_MARGIN_HALF);
-       gtk_widget_show (priv->scrolledwindow);
+       priv->pannable = hildon_pannable_area_new ();
+       gtk_box_pack_start (GTK_BOX (box), priv->pannable, TRUE, TRUE, MODEST_MARGIN_HALF);
+       gtk_widget_show (priv->pannable);
                
        priv->textview = gtk_text_view_new ();
-       gtk_container_add (GTK_CONTAINER (priv->scrolledwindow), priv->textview);
+       gtk_container_add (GTK_CONTAINER (priv->pannable), priv->textview);
        gtk_widget_show (priv->textview);
        GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->textview));
-       gtk_text_buffer_set_text (buffer, "--\n", -1); /* Default, as per the UI spec. */
+       gtk_text_buffer_set_text (buffer, _("mcen_va_default_signature_tablet"), -1); /* Default, as per the UI spec. */
        
        /* Add the buttons: */
        gtk_dialog_add_button (GTK_DIALOG (self), _HL("wdgt_bd_save"), GTK_RESPONSE_OK);
        
        gtk_widget_show (box);
-       gtk_widget_set_size_request (GTK_WIDGET (self), 480, -1);
+       gtk_widget_set_size_request (GTK_WIDGET (self), -1, 320);
        
        /* When this window is shown, hibernation should not be possible, 
         * because there is no sensible way to save the state: */
@@ -200,10 +198,10 @@ modest_signature_editor_dialog_set_settings (
        hildon_check_button_set_active (HILDON_CHECK_BUTTON (priv->checkbox_use), use_signature);
        
        GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->textview));
-       if (signature)
+       if (signature && signature[0] != '\0')
                gtk_text_buffer_set_text (buffer, signature, -1);
        else
-               gtk_text_buffer_set_text (buffer, "--\n", -1); /* Default, as per the UI spec. */
+               gtk_text_buffer_set_text (buffer, _("mcen_va_default_signature_tablet"), -1); /* Default, as per the UI spec. */
                
        enable_widgets (window);
 }
index fc92a8f..fa5e9ec 100644 (file)
@@ -47,7 +47,6 @@
 #define MODEST_DIALOG_WINDOW_MIN_WIDTH 172
 #ifdef MODEST_TOOLKIT_HILDON2
 #define MODEST_EDITABLE_SIZE (HILDON_SIZE_FINGER_HEIGHT | HILDON_SIZE_AUTO_WIDTH)
-#define MODEST_EDITABLE_ARRANGEMENT (HILDON_BUTTON_ARRANGEMENT_HORIZONTAL)
 #endif
 #else /* MODEST_TOOLKIT_GTK */
 /* TODO: review this values with GNOME HIG */