* Added two missing unref's
[modest] / src / maemo / modest-account-settings-dialog.c
index 1ee6c34..922ba55 100644 (file)
@@ -297,11 +297,15 @@ static GtkWidget*
 create_page_account_details (ModestAccountSettingsDialog *self)
 {
        GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_NONE);
+       GtkAdjustment *focus_adjustment = NULL;
        
        /* 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);
+       GtkWidget *scrollwin = gtk_scrolled_window_new (NULL, NULL);
+       gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwin),
+                                       GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
            
        /* The description widgets: */  
        self->entry_account_title = GTK_WIDGET (modest_validating_entry_new ());
@@ -373,7 +377,13 @@ create_page_account_details (ModestAccountSettingsDialog *self)
        
        gtk_widget_show (GTK_WIDGET (box));
        
-       return GTK_WIDGET (box);
+       gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrollwin), box);
+       gtk_widget_show (scrollwin);
+
+       focus_adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrollwin));
+       gtk_container_set_focus_vadjustment (GTK_CONTAINER (box), focus_adjustment); 
+       
+       return GTK_WIDGET (scrollwin);
 }
 
 static gchar*
@@ -1306,8 +1316,7 @@ void modest_account_settings_dialog_set_account_name (ModestAccountSettingsDialo
                const ModestAuthProtocol secure_auth = modest_server_account_get_secure_auth(
                        dialog->account_manager, incoming_account->account_name);
                dialog->protocol_authentication_incoming = secure_auth;
-               if (modest_protocol_info_is_secure(security) || 
-                               modest_protocol_info_auth_is_secure(secure_auth))
+               if (modest_protocol_info_auth_is_secure(secure_auth))
                {
                        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (dialog->checkbox_incoming_auth), 
                                                                                                                                         TRUE);