GtkWidget *result;
- result = modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup,
- label_text, use_markup, control);
+ result = modest_maemo_utils_create_captioned_with_size_type (title_sizegroup, value_sizegroup,
+ label_text, use_markup, control,
+ MODEST_EDITABLE_SIZE);
/* Connect to the appropriate changed signal for the widget,
* so we can ask for the prev/next buttons to be enabled/disabled appropriately:
}
static GtkWidget*
-create_page_account_details (ModestDefaultAccountSettingsDialog *self)
+create_page_account_details (ModestDefaultAccountSettingsDialog *self,
+ GtkSizeGroup *title_sizegroup,
+ GtkSizeGroup *value_sizegroup)
{
ModestDefaultAccountSettingsDialogPrivate *priv;
GtkWidget *box;
- 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);
- 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 ());
gtk_box_pack_start (GTK_BOX (box), priv->checkbox_leave_messages, FALSE, FALSE, 0);
gtk_widget_show (priv->checkbox_leave_messages);
- g_object_unref (title_sizegroup);
- g_object_unref (value_sizegroup);
-
gtk_widget_show (GTK_WIDGET (box));
return GTK_WIDGET (box);
}
static GtkWidget*
-create_page_user_details (ModestDefaultAccountSettingsDialog *self)
+create_page_user_details (ModestDefaultAccountSettingsDialog *self,
+ GtkSizeGroup *title_sizegroup,
+ GtkSizeGroup *value_sizegroup)
{
ModestDefaultAccountSettingsDialogPrivate *priv;
GtkWidget *box;
- GtkSizeGroup* title_sizegroup;
- GtkSizeGroup* value_sizegroup;
priv = MODEST_DEFAULT_ACCOUNT_SETTINGS_DIALOG_GET_PRIVATE (self);
box = gtk_vbox_new (FALSE, MODEST_MARGIN_NONE);
- 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 ());
RESPONSE_SIGNATURE_DUMMY);
gtk_widget_show (priv->button_signature);
- g_object_unref (title_sizegroup);
- g_object_unref (value_sizegroup);
-
gtk_widget_show (GTK_WIDGET (box));
return GTK_WIDGET (box);
g_free (incomingserver_title);
}
-static GtkWidget*
-create_page_incoming (ModestDefaultAccountSettingsDialog *self)
+/* The size groups passed as arguments are only used by the security settings */
+static GtkWidget*
+create_page_incoming (ModestDefaultAccountSettingsDialog *self,
+ GtkSizeGroup *security_title_sizegroup,
+ GtkSizeGroup *security_value_sizegroup)
{
ModestDefaultAccountSettingsDialogPrivate *priv;
GtkWidget *box;
- GtkSizeGroup *title_sizegroup;
- GtkSizeGroup *value_sizegroup;
priv = MODEST_DEFAULT_ACCOUNT_SETTINGS_DIALOG_GET_PRIVATE (self);
- box = gtk_vbox_new (FALSE, MODEST_MARGIN_NONE);
- /* 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. */
- title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
- value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
-
+ box = gtk_vbox_new (FALSE, MODEST_MARGIN_NONE);
+
/* The incoming server widgets: */
if(!priv->entry_incomingserver)
priv->entry_incomingserver = hildon_entry_new (HILDON_SIZE_FINGER_HEIGHT | HILDON_SIZE_AUTO_WIDTH);
if (priv->caption_incoming)
gtk_widget_destroy (priv->caption_incoming);
-
+
/* 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, title_sizegroup, value_sizegroup,
+ priv->caption_incoming = create_captioned (self, security_title_sizegroup, security_value_sizegroup,
"Incoming Server", FALSE, priv->entry_incomingserver);
gtk_widget_show (priv->entry_incomingserver);
connect_for_modified (self, priv->entry_incomingserver);
gtk_widget_show (priv->caption_incoming);
/* Incoming security widgets */
- priv->incoming_security =
+ priv->incoming_security =
modest_maemo_security_options_view_new (MODEST_SECURITY_OPTIONS_INCOMING,
- TRUE, title_sizegroup, value_sizegroup);
- gtk_box_pack_start (GTK_BOX (box), priv->incoming_security,
+ TRUE, security_title_sizegroup,
+ security_value_sizegroup);
+ gtk_box_pack_start (GTK_BOX (box), priv->incoming_security,
FALSE, FALSE, 0);
gtk_widget_show (priv->incoming_security);
-
- g_object_unref (title_sizegroup);
- g_object_unref (value_sizegroup);
gtk_widget_show (GTK_WIDGET (box));
-
+
return GTK_WIDGET (box);
}
!missing);
}
-static GtkWidget*
-create_page_outgoing (ModestDefaultAccountSettingsDialog *self)
+static GtkWidget*
+create_page_outgoing (ModestDefaultAccountSettingsDialog *self,
+ GtkSizeGroup *security_title_sizegroup,
+ GtkSizeGroup *security_value_sizegroup)
{
ModestDefaultAccountSettingsDialogPrivate *priv;
gchar *smtp_caption_label;
GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_NONE);
priv = MODEST_DEFAULT_ACCOUNT_SETTINGS_DIALOG_GET_PRIVATE (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 *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)
/* 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);
smtp_caption_label = g_strconcat (_("mcen_li_emailsetup_smtp"), "\n<small>(SMTP)</small>", NULL);
- GtkWidget *caption = create_captioned (self, title_sizegroup, value_sizegroup,
+ GtkWidget *caption = create_captioned (self, security_title_sizegroup, security_value_sizegroup,
smtp_caption_label, TRUE, priv->entry_outgoingserver);
g_free (smtp_caption_label);
gtk_widget_show (priv->entry_outgoingserver);
/* Outgoing security widgets */
priv->outgoing_security =
modest_maemo_security_options_view_new (MODEST_SECURITY_OPTIONS_OUTGOING,
- TRUE, title_sizegroup, value_sizegroup);
+ TRUE, security_title_sizegroup,
+ security_value_sizegroup);
gtk_box_pack_start (GTK_BOX (box), priv->outgoing_security,
FALSE, FALSE, 0);
gtk_widget_show (priv->outgoing_security);
GtkWidget *separator = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, MODEST_MARGIN_DEFAULT);
+ hildon_gtk_widget_set_theme_size (separator, HILDON_SIZE_AUTO);
gtk_widget_show (separator);
/* connection-specific checkbox: */
enable_widget_for_checkbutton (priv->button_outgoing_smtp_servers,
GTK_BUTTON (priv->checkbox_outgoing_smtp_specific));
- 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);
GtkWidget *pannable;
GtkWidget *separator;
GtkWidget *align;
+ GtkSizeGroup* account_title_sizegroup;
+ GtkSizeGroup* account_value_sizegroup;
+ GtkSizeGroup *sec_title_sizegroup, *sec_value_sizegroup;
priv = MODEST_DEFAULT_ACCOUNT_SETTINGS_DIALOG_GET_PRIVATE(self);
priv->account_manager = modest_runtime_get_account_mgr ();
g_assert (priv->account_manager);
g_object_ref (priv->account_manager);
-
+
priv->protocol_authentication_incoming = MODEST_PROTOCOLS_AUTH_PASSWORD;
- /* Create the common pages,
- */
- priv->page_account_details = create_page_account_details (self);
- priv->page_user_details = create_page_user_details (self);
- priv->page_incoming = create_page_incoming (self);
- priv->page_outgoing = create_page_outgoing (self);
+ /* Create the common pages */
+ account_title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+ account_value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+ priv->page_account_details = create_page_account_details (self, account_title_sizegroup, account_value_sizegroup);
+ priv->page_user_details = create_page_user_details (self, account_title_sizegroup, account_value_sizegroup);
+ g_object_unref (account_title_sizegroup);
+ g_object_unref (account_value_sizegroup);
+
+ /* Create size groups for security settings */
+ sec_title_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+ sec_value_sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+
+ /* Create incoming and outgoing "pages" */
+ priv->page_incoming = create_page_incoming (self, sec_title_sizegroup, sec_value_sizegroup);
+ priv->page_outgoing = create_page_outgoing (self, sec_title_sizegroup, sec_value_sizegroup);
+ g_object_unref (sec_title_sizegroup);
+ g_object_unref (sec_value_sizegroup);
+
/* Add the notebook pages: */
gtk_box_pack_start (GTK_BOX (priv->main_container),
priv->page_account_details,
FALSE, FALSE, 0);
separator = gtk_hseparator_new ();
+ hildon_gtk_widget_set_theme_size (separator, HILDON_SIZE_AUTO);
gtk_box_pack_start (GTK_BOX (priv->main_container), separator,
FALSE, FALSE, MODEST_MARGIN_DEFAULT);
gtk_widget_show (separator);
priv->page_incoming,
FALSE, FALSE, 0);
separator = gtk_hseparator_new ();
+ hildon_gtk_widget_set_theme_size (separator, HILDON_SIZE_AUTO);
gtk_box_pack_start (GTK_BOX (priv->main_container), separator,
FALSE, FALSE, MODEST_MARGIN_DEFAULT);
gtk_widget_show (separator);