From d791ed7c0651d118dfd7db58e38446e256958db6 Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz Date: Tue, 17 Nov 2009 18:57:18 +0100 Subject: [PATCH] Refactored some maemo utils to toolkit utils --- src/hildon2/modest-address-book.c | 12 +- .../modest-connection-specific-smtp-edit-window.c | 44 ++-- .../modest-default-account-settings-dialog.c | 8 +- src/hildon2/modest-easysetup-wizard-dialog.c | 43 +-- .../modest-hildon2-global-settings-dialog.c | 48 ++-- src/hildon2/modest-maemo-security-options-view.c | 90 +++---- src/hildon2/modest-maemo-utils.c | 273 -------------------- src/hildon2/modest-maemo-utils.h | 39 --- src/hildon2/modest-msg-edit-window.c | 32 +-- src/modest-ui-actions.c | 29 +-- src/widgets/Makefile.am | 2 + src/widgets/modest-gtk-security-options-view.c | 38 +-- 12 files changed, 168 insertions(+), 490 deletions(-) diff --git a/src/hildon2/modest-address-book.c b/src/hildon2/modest-address-book.c index 63dcdd7..72cf524 100644 --- a/src/hildon2/modest-address-book.c +++ b/src/hildon2/modest-address-book.c @@ -390,16 +390,16 @@ run_add_email_addr_to_contact_dlg(const gchar * contact_name, name_label = gtk_label_new(contact_name); gtk_misc_set_alignment(GTK_MISC(name_label), 0.0, 0.5); cptn_cntrl = - modest_maemo_utils_create_captioned (size_group, NULL, - _("mcen_ia_add_email_name"), FALSE, - name_label); + modest_toolkit_utils_create_captioned (size_group, NULL, + _("mcen_ia_add_email_name"), FALSE, + name_label); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(add_email_addr_to_contact_dlg)->vbox), cptn_cntrl, FALSE, FALSE, 0); email_entry = modest_toolkit_factory_create_entry (modest_runtime_get_toolkit_factory ()); - cptn_cntrl = modest_maemo_utils_create_captioned (size_group, NULL, - _("mcen_fi_add_email_name"), FALSE, - email_entry); + cptn_cntrl = modest_toolkit_utils_create_captioned (size_group, NULL, + _("mcen_fi_add_email_name"), FALSE, + email_entry); hildon_gtk_entry_set_input_mode(GTK_ENTRY(email_entry), HILDON_GTK_INPUT_MODE_FULL); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(add_email_addr_to_contact_dlg)->vbox), cptn_cntrl, TRUE, TRUE, 0); diff --git a/src/hildon2/modest-connection-specific-smtp-edit-window.c b/src/hildon2/modest-connection-specific-smtp-edit-window.c index 2f5a6ec..42e20dd 100644 --- a/src/hildon2/modest-connection-specific-smtp-edit-window.c +++ b/src/hildon2/modest-connection-specific-smtp-edit-window.c @@ -381,9 +381,9 @@ modest_connection_specific_smtp_edit_window_init (ModestConnectionSpecificSmtpEd server_label = g_strconcat (_("mcen_li_emailsetup_smtp"), "\n(SMTP)", NULL); GtkWidget *captioned = - modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup, - server_label, TRUE, - priv->entry_outgoingserver); + modest_toolkit_utils_create_captioned (title_sizegroup, value_sizegroup, + server_label, TRUE, + priv->entry_outgoingserver); g_free (server_label); gtk_widget_show (priv->entry_outgoingserver); gtk_box_pack_start (GTK_BOX (vbox), captioned, FALSE, FALSE, 0); @@ -396,15 +396,15 @@ modest_connection_specific_smtp_edit_window_init (ModestConnectionSpecificSmtpEd } if (GTK_IS_COMBO_BOX (priv->outgoing_auth_selector)) { GtkWidget *captioned; - captioned = modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup, - _("mcen_li_emailsetup_secure_authentication"), FALSE, - priv->outgoing_auth_selector); + captioned = modest_toolkit_utils_create_captioned (title_sizegroup, value_sizegroup, + _("mcen_li_emailsetup_secure_authentication"), FALSE, + priv->outgoing_auth_selector); gtk_widget_show (captioned); gtk_box_pack_start (GTK_BOX (vbox), captioned, FALSE, FALSE, 0); } else { - modest_maemo_utils_set_hbutton_layout (title_sizegroup, value_sizegroup, - _("mcen_li_emailsetup_secure_authentication"), - priv->outgoing_auth_selector); + modest_toolkit_utils_set_hbutton_layout (title_sizegroup, value_sizegroup, + _("mcen_li_emailsetup_secure_authentication"), + priv->outgoing_auth_selector); gtk_box_pack_start (GTK_BOX (vbox), priv->outgoing_auth_selector, FALSE, FALSE, 0); } gtk_widget_show (priv->outgoing_auth_selector); @@ -413,9 +413,9 @@ 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 (title_sizegroup, value_sizegroup, - _("mail_fi_username"), FALSE, - priv->entry_user_username); + captioned = modest_toolkit_utils_create_captioned (title_sizegroup, value_sizegroup, + _("mail_fi_username"), FALSE, + priv->entry_user_username); g_signal_connect(G_OBJECT(priv->entry_user_username), "changed", G_CALLBACK(on_mandatory_entry_changed), self); gtk_widget_show (priv->entry_user_username); gtk_box_pack_start (GTK_BOX (vbox), captioned, FALSE, FALSE, 0); @@ -437,8 +437,8 @@ 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 (title_sizegroup, value_sizegroup, - _("mail_fi_password"), FALSE, priv->entry_user_password); + captioned = modest_toolkit_utils_create_captioned (title_sizegroup, value_sizegroup, + _("mail_fi_password"), FALSE, 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); gtk_box_pack_start (GTK_BOX (vbox), captioned, FALSE, FALSE, 0); @@ -453,15 +453,15 @@ modest_connection_specific_smtp_edit_window_init (ModestConnectionSpecificSmtpEd if (GTK_IS_COMBO_BOX (priv->outgoing_security_selector)) { GtkWidget *captioned; - captioned = modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup, - _("mcen_li_emailsetup_secure_connection"), FALSE, - priv->outgoing_security_selector); + captioned = modest_toolkit_utils_create_captioned (title_sizegroup, value_sizegroup, + _("mcen_li_emailsetup_secure_connection"), FALSE, + priv->outgoing_security_selector); gtk_box_pack_start (GTK_BOX (vbox), captioned, FALSE, FALSE, MODEST_MARGIN_HALF); gtk_widget_show (captioned); } else { - modest_maemo_utils_set_hbutton_layout (title_sizegroup, value_sizegroup, - _("mcen_li_emailsetup_secure_connection"), - priv->outgoing_security_selector); + modest_toolkit_utils_set_hbutton_layout (title_sizegroup, value_sizegroup, + _("mcen_li_emailsetup_secure_connection"), + priv->outgoing_security_selector); gtk_box_pack_start (GTK_BOX (vbox), priv->outgoing_security_selector, FALSE, FALSE, 0); } gtk_widget_show (priv->outgoing_security_selector); @@ -470,8 +470,8 @@ modest_connection_specific_smtp_edit_window_init (ModestConnectionSpecificSmtpEd if (!priv->entry_port) priv->entry_port = modest_toolkit_factory_create_number_entry (modest_runtime_get_toolkit_factory (), PORT_RANGE_MIN, PORT_RANGE_MAX); - captioned = modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup, - _("mcen_fi_emailsetup_port"), FALSE, priv->entry_port); + captioned = modest_toolkit_utils_create_captioned (title_sizegroup, value_sizegroup, + _("mcen_fi_emailsetup_port"), FALSE, priv->entry_port); gtk_widget_add_events(GTK_WIDGET(priv->entry_port), GDK_FOCUS_CHANGE_MASK); gtk_widget_show (priv->entry_port); gtk_box_pack_start (GTK_BOX (vbox), captioned, FALSE, FALSE, 0); diff --git a/src/hildon2/modest-default-account-settings-dialog.c b/src/hildon2/modest-default-account-settings-dialog.c index 725d593..618173d 100644 --- a/src/hildon2/modest-default-account-settings-dialog.c +++ b/src/hildon2/modest-default-account-settings-dialog.c @@ -267,9 +267,9 @@ create_captioned (ModestDefaultAccountSettingsDialog *self, GtkWidget *result; - result = modest_maemo_utils_create_captioned_with_size_type (title_sizegroup, value_sizegroup, - label_text, use_markup, control, - MODEST_EDITABLE_SIZE); + result = modest_toolkit_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: @@ -616,7 +616,7 @@ update_incoming_server_title (ModestDefaultAccountSettingsDialog *self, incomingserver_title = g_strconcat(_("mcen_li_emailsetup_servertype"), "*", "\n(", protocol_display_name, ")", NULL); - modest_maemo_utils_captioned_set_label (priv->caption_incoming, incomingserver_title, TRUE); + modest_toolkit_utils_captioned_set_label (priv->caption_incoming, incomingserver_title, TRUE); g_free (incomingserver_title); } diff --git a/src/hildon2/modest-easysetup-wizard-dialog.c b/src/hildon2/modest-easysetup-wizard-dialog.c index 01495ec..c9b8ad6 100644 --- a/src/hildon2/modest-easysetup-wizard-dialog.c +++ b/src/hildon2/modest-easysetup-wizard-dialog.c @@ -58,6 +58,7 @@ #include "modest-address-book.h" #include #include +#include /* Include config.h so that _() works: */ #ifdef HAVE_CONFIG_H @@ -386,9 +387,9 @@ create_captioned (ModestEasysetupWizardDialog *self, { GtkWidget *result; - result = modest_maemo_utils_create_captioned_with_size_type (title_size_group, value_size_group, - value, use_markup, control, - MODEST_EDITABLE_SIZE); + result = modest_toolkit_utils_create_captioned_with_size_type (title_size_group, value_size_group, + value, 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: @@ -550,15 +551,15 @@ create_page_account_details (ModestEasysetupWizardDialog *self) GtkWidget *captioned; g_signal_connect (G_OBJECT (priv->account_country_selector), "changed", G_CALLBACK (on_picker_button_value_changed), self); - captioned = modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup, - _("mcen_fi_country"), FALSE, - priv->account_country_selector); + captioned = modest_toolkit_utils_create_captioned (title_sizegroup, value_sizegroup, + _("mcen_fi_country"), FALSE, + priv->account_country_selector); gtk_box_pack_start (GTK_BOX (box), captioned, FALSE, FALSE, MODEST_MARGIN_HALF); gtk_widget_show (captioned); } else { - modest_maemo_utils_set_hbutton_layout (title_sizegroup, value_sizegroup, - _("mcen_fi_country"), priv->account_country_selector); + modest_toolkit_utils_set_hbutton_layout (title_sizegroup, value_sizegroup, + _("mcen_fi_country"), priv->account_country_selector); g_signal_connect (G_OBJECT (priv->account_country_selector), "value-changed", G_CALLBACK (on_picker_button_value_changed), self); gtk_box_pack_start (GTK_BOX (box), priv->account_country_selector, FALSE, FALSE, MODEST_MARGIN_HALF); @@ -571,18 +572,18 @@ create_page_account_details (ModestEasysetupWizardDialog *self) GtkWidget *captioned; g_signal_connect (G_OBJECT (priv->account_serviceprovider_selector), "changed", G_CALLBACK (on_serviceprovider_selector_value_changed), self); - captioned = modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup, - _("mcen_fi_serviceprovider"), FALSE, - priv->account_serviceprovider_selector); + captioned = modest_toolkit_utils_create_captioned (title_sizegroup, value_sizegroup, + _("mcen_fi_serviceprovider"), FALSE, + priv->account_serviceprovider_selector); g_signal_connect (G_OBJECT (priv->account_serviceprovider_selector), "changed", G_CALLBACK (on_serviceprovider_selector_value_changed), self); gtk_box_pack_start (GTK_BOX (box), captioned, FALSE, FALSE, MODEST_MARGIN_HALF); gtk_widget_show (captioned); } else { - modest_maemo_utils_set_hbutton_layout (title_sizegroup, value_sizegroup, - _("mcen_fi_serviceprovider"), - priv->account_serviceprovider_selector); + modest_toolkit_utils_set_hbutton_layout (title_sizegroup, value_sizegroup, + _("mcen_fi_serviceprovider"), + priv->account_serviceprovider_selector); g_signal_connect (G_OBJECT (priv->account_serviceprovider_selector), "value-changed", G_CALLBACK (on_serviceprovider_selector_value_changed), self); gtk_box_pack_start (GTK_BOX (box), priv->account_serviceprovider_selector, FALSE, FALSE, 0); @@ -888,7 +889,7 @@ update_incoming_server_title (ModestEasysetupWizardDialog *self) incomingserver_title = g_strconcat (_("mcen_li_emailsetup_servertype"), "\n(", protocol_display_name, ")", NULL); - modest_maemo_utils_captioned_set_label (priv->caption_incoming, incomingserver_title, TRUE); + modest_toolkit_utils_captioned_set_label (priv->caption_incoming, incomingserver_title, TRUE); g_free(incomingserver_title); } @@ -1002,16 +1003,16 @@ create_page_custom_incoming (ModestEasysetupWizardDialog *self) GtkWidget *captioned; g_signal_connect (G_OBJECT (priv->incoming_servertype_selector), "changed", G_CALLBACK (on_picker_button_value_changed), self); - captioned = modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup, - _("mcen_fi_country"), FALSE, - priv->incoming_servertype_selector); + captioned = modest_toolkit_utils_create_captioned (title_sizegroup, value_sizegroup, + _("mcen_fi_country"), FALSE, + priv->incoming_servertype_selector); gtk_box_pack_start (GTK_BOX (box), captioned, FALSE, FALSE, MODEST_MARGIN_HALF); gtk_widget_show (captioned); } else { - modest_maemo_utils_set_hbutton_layout (title_sizegroup, value_sizegroup, - _("mcen_li_emailsetup_type"), - priv->incoming_servertype_selector); + modest_toolkit_utils_set_hbutton_layout (title_sizegroup, value_sizegroup, + _("mcen_li_emailsetup_type"), + priv->incoming_servertype_selector); g_signal_connect (G_OBJECT (priv->incoming_servertype_selector), "value-changed", G_CALLBACK (on_picker_button_value_changed), self); gtk_box_pack_start (GTK_BOX (box), priv->incoming_servertype_selector, FALSE, FALSE, 0); diff --git a/src/hildon2/modest-hildon2-global-settings-dialog.c b/src/hildon2/modest-hildon2-global-settings-dialog.c index ca02740..10e26a0 100644 --- a/src/hildon2/modest-hildon2-global-settings-dialog.c +++ b/src/hildon2/modest-hildon2-global-settings-dialog.c @@ -226,16 +226,16 @@ create_updating_page (ModestHildon2GlobalSettingsDialog *self) if (GTK_IS_COMBO_BOX (ppriv->default_account_selector)) { GtkWidget *caption; - caption = modest_maemo_utils_create_vcaptioned (title_size_group, - _("mcen_ti_default_account"), FALSE, - ppriv->default_account_selector); + caption = modest_toolkit_utils_create_vcaptioned (title_size_group, + _("mcen_ti_default_account"), FALSE, + ppriv->default_account_selector); gtk_widget_show (caption); gtk_box_pack_start (GTK_BOX (vbox), caption, FALSE, FALSE, 0); } else { - modest_maemo_utils_set_vbutton_layout (title_size_group, - _("mcen_ti_default_account"), - ppriv->default_account_selector); + modest_toolkit_utils_set_vbutton_layout (title_size_group, + _("mcen_ti_default_account"), + ppriv->default_account_selector); gtk_box_pack_start (GTK_BOX (vbox), ppriv->default_account_selector, FALSE, FALSE, 0); } @@ -249,15 +249,15 @@ create_updating_page (ModestHildon2GlobalSettingsDialog *self) ppriv->msg_format_list, g_int_equal); if (GTK_IS_COMBO_BOX (ppriv->msg_format)) { GtkWidget *caption; - caption = modest_maemo_utils_create_vcaptioned (title_size_group, - _("mcen_fi_options_messageformat"), FALSE, - ppriv->msg_format); + caption = modest_toolkit_utils_create_vcaptioned (title_size_group, + _("mcen_fi_options_messageformat"), FALSE, + ppriv->msg_format); gtk_widget_show (caption); gtk_box_pack_start (GTK_BOX (vbox), caption, FALSE, FALSE, 0); } else { - modest_maemo_utils_set_vbutton_layout (title_size_group, - _("mcen_fi_options_messageformat"), - ppriv->msg_format); + modest_toolkit_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, 0); } @@ -283,15 +283,15 @@ create_updating_page (ModestHildon2GlobalSettingsDialog *self) ppriv->connect_via_list, g_int_equal); if (GTK_IS_COMBO_BOX (ppriv->connect_via)) { GtkWidget *caption; - caption = modest_maemo_utils_create_vcaptioned (title_size_group, - _("mcen_fi_options_connectiontype"), FALSE, - ppriv->connect_via); + caption = modest_toolkit_utils_create_vcaptioned (title_size_group, + _("mcen_fi_options_connectiontype"), FALSE, + ppriv->connect_via); gtk_widget_show (caption); gtk_box_pack_start (GTK_BOX (vbox), caption, FALSE, FALSE, 0); } else { - modest_maemo_utils_set_vbutton_layout (title_size_group, - _("mcen_fi_options_connectiontype"), - ppriv->connect_via); + modest_toolkit_utils_set_vbutton_layout (title_size_group, + _("mcen_fi_options_connectiontype"), + ppriv->connect_via); gtk_box_pack_start (GTK_BOX (vbox), ppriv->connect_via, FALSE, FALSE, 0); } @@ -305,15 +305,15 @@ create_updating_page (ModestHildon2GlobalSettingsDialog *self) ppriv->update_interval_list, g_int_equal); if (GTK_IS_COMBO_BOX (ppriv->update_interval)) { GtkWidget *caption; - caption = modest_maemo_utils_create_vcaptioned (title_size_group, - _("mcen_fi_options_updateinterval"), FALSE, - ppriv->update_interval); + caption = modest_toolkit_utils_create_vcaptioned (title_size_group, + _("mcen_fi_options_updateinterval"), FALSE, + ppriv->update_interval); gtk_widget_show (caption); gtk_box_pack_start (GTK_BOX (vbox), caption, FALSE, FALSE, 0); } else { - modest_maemo_utils_set_vbutton_layout (title_size_group, - _("mcen_fi_options_updateinterval"), - ppriv->update_interval); + modest_toolkit_utils_set_vbutton_layout (title_size_group, + _("mcen_fi_options_updateinterval"), + ppriv->update_interval); gtk_box_pack_start (GTK_BOX (vbox), ppriv->update_interval, FALSE, FALSE, 0); } diff --git a/src/hildon2/modest-maemo-security-options-view.c b/src/hildon2/modest-maemo-security-options-view.c index c3553f3..4ffbed1 100644 --- a/src/hildon2/modest-maemo-security-options-view.c +++ b/src/hildon2/modest-maemo-security-options-view.c @@ -153,18 +153,18 @@ create_incoming_security (ModestSecurityOptionsView* self, if (GTK_IS_COMBO_BOX (ppriv->security_view)) { GtkWidget *captioned; - captioned = modest_maemo_utils_create_captioned (title_size_group, value_size_group, - _("mcen_li_emailsetup_secure_connection"), FALSE, - ppriv->security_view); + captioned = modest_toolkit_utils_create_captioned (title_size_group, value_size_group, + _("mcen_li_emailsetup_secure_connection"), FALSE, + ppriv->security_view); g_signal_connect (G_OBJECT (ppriv->security_view), "changed", G_CALLBACK (on_security_changed), self); gtk_box_pack_start (GTK_BOX (self), captioned, FALSE, FALSE, 0); gtk_widget_show (captioned); } else { - modest_maemo_utils_set_hbutton_layout (title_size_group, - value_size_group, - _("mcen_li_emailsetup_secure_connection"), - ppriv->security_view); + modest_toolkit_utils_set_hbutton_layout (title_size_group, + value_size_group, + _("mcen_li_emailsetup_secure_connection"), + ppriv->security_view); g_signal_connect (G_OBJECT (ppriv->security_view), "value-changed", G_CALLBACK (on_security_changed), self); gtk_box_pack_start (GTK_BOX (self), ppriv->security_view, FALSE, FALSE, 0); @@ -178,12 +178,12 @@ create_incoming_security (ModestSecurityOptionsView* self, ppriv->port_view = modest_toolkit_factory_create_number_entry (modest_runtime_get_toolkit_factory (), PORT_MIN, PORT_MAX); entry_caption = - modest_maemo_utils_create_captioned_with_size_type (title_size_group, - value_size_group, - _("mcen_fi_emailsetup_port"), - FALSE, - ppriv->port_view, - MODEST_EDITABLE_SIZE); + modest_toolkit_utils_create_captioned_with_size_type (title_size_group, + value_size_group, + _("mcen_fi_emailsetup_port"), + FALSE, + ppriv->port_view, + MODEST_EDITABLE_SIZE); /* Pack & show widgets */ gtk_box_pack_start (GTK_BOX (self), entry_caption, FALSE, FALSE, 0); gtk_widget_show (ppriv->port_view); @@ -278,30 +278,30 @@ create_outgoing_security (ModestSecurityOptionsView* self, modest_serversecurity_selector_fill (ppriv->security_view, MODEST_PROTOCOLS_TRANSPORT_SMTP); if (GTK_IS_COMBO_BOX (ppriv->security_view)) { - security_caption = modest_maemo_utils_create_captioned (title_size_group, value_size_group, - _("mcen_li_emailsetup_secure_connection"), FALSE, - ppriv->security_view); + security_caption = modest_toolkit_utils_create_captioned (title_size_group, value_size_group, + _("mcen_li_emailsetup_secure_connection"), FALSE, + ppriv->security_view); gtk_widget_show (security_caption); } else { - modest_maemo_utils_set_hbutton_layout (title_size_group, - value_size_group, - _("mcen_li_emailsetup_secure_connection"), - ppriv->security_view); + modest_toolkit_utils_set_hbutton_layout (title_size_group, + value_size_group, + _("mcen_li_emailsetup_secure_connection"), + ppriv->security_view); security_caption = ppriv->security_view; } /* The secure authentication widgets */ ppriv->auth_view = modest_toolkit_factory_create_secureauth_selector (modest_runtime_get_toolkit_factory ()); if (GTK_IS_COMBO_BOX (ppriv->auth_view)) { - auth_caption = modest_maemo_utils_create_captioned (title_size_group, value_size_group, - _("mcen_li_emailsetup_secure_authentication"), FALSE, - ppriv->auth_view); + auth_caption = modest_toolkit_utils_create_captioned (title_size_group, value_size_group, + _("mcen_li_emailsetup_secure_authentication"), FALSE, + ppriv->auth_view); gtk_widget_show (auth_caption); } else { - modest_maemo_utils_set_hbutton_layout (title_size_group, - value_size_group, - _("mcen_li_emailsetup_secure_authentication"), - ppriv->auth_view); + modest_toolkit_utils_set_hbutton_layout (title_size_group, + value_size_group, + _("mcen_li_emailsetup_secure_authentication"), + ppriv->auth_view); auth_caption = ppriv->auth_view; } @@ -318,12 +318,12 @@ create_outgoing_security (ModestSecurityOptionsView* self, #endif user_label = g_strdup_printf("%s*", _("mail_fi_username")); - user_caption = modest_maemo_utils_create_captioned_with_size_type (title_size_group, - value_size_group, - user_label, - FALSE, - ppriv->user_entry, - MODEST_EDITABLE_SIZE); + user_caption = modest_toolkit_utils_create_captioned_with_size_type (title_size_group, + value_size_group, + user_label, + FALSE, + ppriv->user_entry, + MODEST_EDITABLE_SIZE); g_free (user_label); /* Prevent the use of some characters. Limit the max @@ -346,22 +346,22 @@ create_outgoing_security (ModestSecurityOptionsView* self, gtk_entry_set_visibility (GTK_ENTRY (ppriv->pwd_entry), FALSE); pwd_caption = - modest_maemo_utils_create_captioned_with_size_type (title_size_group, - value_size_group, - _("mail_fi_password"), - FALSE, - ppriv->pwd_entry, - MODEST_EDITABLE_SIZE); + modest_toolkit_utils_create_captioned_with_size_type (title_size_group, + value_size_group, + _("mail_fi_password"), + FALSE, + ppriv->pwd_entry, + MODEST_EDITABLE_SIZE); ppriv->port_view = modest_toolkit_factory_create_number_entry (modest_runtime_get_toolkit_factory (), PORT_MIN, PORT_MAX); port_caption = - modest_maemo_utils_create_captioned_with_size_type (title_size_group, - value_size_group, - _("mcen_fi_emailsetup_port"), - FALSE, - ppriv->port_view, - MODEST_EDITABLE_SIZE); + modest_toolkit_utils_create_captioned_with_size_type (title_size_group, + value_size_group, + _("mcen_fi_emailsetup_port"), + FALSE, + ppriv->port_view, + MODEST_EDITABLE_SIZE); } /* Track changes in UI */ diff --git a/src/hildon2/modest-maemo-utils.c b/src/hildon2/modest-maemo-utils.c index 939a199..b545c48 100644 --- a/src/hildon2/modest-maemo-utils.c +++ b/src/hildon2/modest-maemo-utils.c @@ -244,279 +244,6 @@ modest_maemo_utils_setup_images_filechooser (GtkFileChooser *chooser) } -GtkWidget * -modest_maemo_utils_get_manager_menubar_as_menu (GtkUIManager *manager, - const gchar *item_name) -{ - GtkWidget *new_menu; - GtkWidget *menubar; - GList *children, *iter; - - menubar = gtk_ui_manager_get_widget (manager, item_name); - new_menu = gtk_menu_new (); - - children = gtk_container_get_children (GTK_CONTAINER (menubar)); - for (iter = children; iter != NULL; iter = g_list_next (iter)) { - GtkWidget *menu; - - menu = GTK_WIDGET (iter->data); - gtk_widget_reparent (menu, new_menu); - } - - g_list_free (children); - - 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 *title_size_group, - GtkSizeGroup *value_size_group, - const gchar *title, - gboolean use_markup, - GtkWidget *control) -{ - return modest_maemo_utils_create_captioned_with_size_type (title_size_group, - value_size_group, - title, - use_markup, - control, - 0); -} - -GtkWidget * -modest_maemo_utils_create_vcaptioned (GtkSizeGroup *size_group, - const gchar *title, - gboolean use_markup, - GtkWidget *control) -{ - return modest_maemo_utils_create_vcaptioned_with_size_type (size_group, - title, - use_markup, - control, - 0); -} - -/** - * modest_maemo_utils_create_captioned_with_size_type: - * @title_size_group: a #GtkSizeGroup - * @value_size_group: a #GtkSizeGroup - * @title: a string - * @control: a #GtkWidget - * @size_type: a #HildonSizeType - * - * 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_with_size_type (GtkSizeGroup *title_size_group, - GtkSizeGroup *value_size_group, - const gchar *title, - gboolean use_markup, - GtkWidget *control, - HildonSizeType size_type) -{ - GtkWidget *label; - GtkWidget *align; - GtkWidget *box; - - if (use_markup) { - label = gtk_label_new (NULL); - gtk_label_set_markup (GTK_LABEL (label), title); - } else { - label = gtk_label_new (title); - } - align = gtk_alignment_new (0.0, 0.0, 1.0, 1.0); - gtk_alignment_set_padding (GTK_ALIGNMENT (align), 0, 0, MODEST_MARGIN_DOUBLE, MODEST_MARGIN_DOUBLE); - - gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); - hildon_gtk_widget_set_theme_size (label, HILDON_SIZE_FINGER_HEIGHT); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_widget_show (label); - gtk_widget_show (align); - box = gtk_hbox_new (FALSE, 0); - gtk_container_add (GTK_CONTAINER (align), label); - gtk_box_pack_start (GTK_BOX (box), align, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (box), control, TRUE, TRUE, 0); - 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, size_type); - - g_object_set_data (G_OBJECT (box), CAPTIONED_LABEL_CHILD, label); - - return box; -} - -GtkWidget * -modest_maemo_utils_create_vcaptioned_with_size_type (GtkSizeGroup *size_group, - const gchar *title, - gboolean use_markup, - GtkWidget *control, - HildonSizeType size_type) -{ - GtkWidget *label; - GtkWidget *align; - GtkWidget *box; - - if (use_markup) { - label = gtk_label_new (NULL); - gtk_label_set_markup (GTK_LABEL (label), title); - } else { - label = gtk_label_new (title); - } - align = gtk_alignment_new (0.0, 0.0, 1.0, 1.0); - gtk_alignment_set_padding (GTK_ALIGNMENT (align), 0, 0, MODEST_MARGIN_DOUBLE, MODEST_MARGIN_DOUBLE); - - gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); - hildon_gtk_widget_set_theme_size (label, HILDON_SIZE_FINGER_HEIGHT); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_widget_show (label); - gtk_widget_show (align); - box = gtk_vbox_new (FALSE, 0); - gtk_container_add (GTK_CONTAINER (align), label); - gtk_box_pack_start (GTK_BOX (box), align, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (box), control, TRUE, TRUE, 0); - if (size_group) { - gtk_size_group_add_widget (size_group, label); - gtk_size_group_add_widget (size_group, control); - } - - hildon_gtk_widget_set_theme_size (control, size_type); - - g_object_set_data (G_OBJECT (box), CAPTIONED_LABEL_CHILD, label); - - return box; -} - -/** - * modest_maemo_utils_captioned_set_label: - * @captioned: a #GtkWidget built as captioned - * @new_label: a string - * @use_markup: a #gboolean - * - * set a new label for the captioned - */ -void -modest_maemo_utils_captioned_set_label (GtkWidget *captioned, - const gchar *new_label, - gboolean use_markup) -{ - GtkWidget *label; - - g_return_if_fail (GTK_IS_WIDGET (captioned)); - - label = g_object_get_data (G_OBJECT (captioned), CAPTIONED_LABEL_CHILD); - g_return_if_fail (GTK_IS_LABEL (label)); - - if (use_markup) { - gtk_label_set_markup (GTK_LABEL (label), new_label); - } else { - gtk_label_set_text (GTK_LABEL (label), new_label); - } -} - -/** - * modest_maemo_utils_captioned_get_label_widget: - * @captioned: a #GtkWidget built as captioned - * - * obtains the label widget for the captioned - * - * Returns: a #GtkLabel - */ -GtkWidget * -modest_maemo_utils_captioned_get_label_widget (GtkWidget *captioned) -{ - GtkWidget *label; - - g_return_val_if_fail (GTK_IS_WIDGET (captioned), NULL); - - label = g_object_get_data (G_OBJECT (captioned), CAPTIONED_LABEL_CHILD); - g_return_val_if_fail (GTK_IS_LABEL (label), NULL); - - return label; - -} - -/** - * 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_value_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_set_vbutton_layout (GtkSizeGroup *sizegroup, - const gchar *title, - GtkWidget *button) -{ - 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 * -modest_maemo_utils_create_group_box (const gchar *label_text, GtkWidget *contents) -{ - GtkWidget *label; - GtkWidget *box; - - label = gtk_label_new (label_text); - gtk_widget_show (label); - - box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF); - gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (box), contents, TRUE, TRUE, 0); - gtk_widget_show (box); - - return box; -} - static gboolean match_all (TnyList *list, GObject *item, gpointer match_data) { return TRUE; diff --git a/src/hildon2/modest-maemo-utils.h b/src/hildon2/modest-maemo-utils.h index de7fd49..92cc141 100644 --- a/src/hildon2/modest-maemo-utils.h +++ b/src/hildon2/modest-maemo-utils.h @@ -105,45 +105,6 @@ 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 *title_size_group, - GtkSizeGroup *value_size_group, - const gchar *title, - gboolean use_markup, - GtkWidget *control); -GtkWidget *modest_maemo_utils_create_vcaptioned (GtkSizeGroup *size_group, - const gchar *title, - gboolean use_markup, - GtkWidget *control); - -GtkWidget *modest_maemo_utils_create_captioned_with_size_type (GtkSizeGroup *title_size_group, - GtkSizeGroup *value_size_group, - const gchar *title, - gboolean use_markup, - GtkWidget *control, - HildonSizeType size_type); - -GtkWidget *modest_maemo_utils_create_vcaptioned_with_size_type (GtkSizeGroup *size_group, - const gchar *title, - gboolean use_markup, - GtkWidget *control, - HildonSizeType size_type); - -void modest_maemo_utils_captioned_set_label (GtkWidget *captioned, - const gchar *new_label, - gboolean use_markup); - -GtkWidget *modest_maemo_utils_captioned_get_label_widget (GtkWidget *captioned); - -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); - gboolean modest_maemo_utils_select_attachments (GtkWindow *window, TnyList *att_list, gboolean include_msgs); #ifdef MODEST_PLATFORM_MAEMO diff --git a/src/hildon2/modest-msg-edit-window.c b/src/hildon2/modest-msg-edit-window.c index 93b5079..4822c00 100644 --- a/src/hildon2/modest-msg-edit-window.c +++ b/src/hildon2/modest-msg-edit-window.c @@ -902,13 +902,13 @@ init_window (ModestMsgEditWindow *obj) NULL, g_str_equal); modest_selector_set_value_max_chars (priv->from_field, MAX_FROM_VALUE); if (GTK_IS_COMBO_BOX (priv->from_field)) { - from_caption = modest_maemo_utils_create_captioned (title_size_group, NULL, - _("mail_va_from"), FALSE, - priv->from_field); + from_caption = modest_toolkit_utils_create_captioned (title_size_group, NULL, + _("mail_va_from"), FALSE, + priv->from_field); gtk_widget_show (from_caption); } else { - modest_maemo_utils_set_hbutton_layout (title_size_group, NULL, - _("mail_va_from"), priv->from_field); + modest_toolkit_utils_set_hbutton_layout (title_size_group, NULL, + _("mail_va_from"), priv->from_field); hildon_button_set_alignment (HILDON_BUTTON (priv->from_field), 0.0, 0.5, 1.0, 1.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), 1.0, 0.5); @@ -946,15 +946,15 @@ init_window (ModestMsgEditWindow *obj) priv->bcc_caption = _create_addressbook_box (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"), FALSE, priv->subject_box); - priv->attachments_caption = modest_maemo_utils_create_captioned_with_size_type (NULL, NULL, - _("mail_va_attachment"), - FALSE, - priv->attachments_view, - HILDON_SIZE_AUTO_WIDTH | - HILDON_SIZE_AUTO_HEIGHT); - attachments_label = modest_maemo_utils_captioned_get_label_widget (priv->attachments_caption); + subject_caption = modest_toolkit_utils_create_captioned (title_size_group, value_size_group, + _("mail_va_subject"), FALSE, priv->subject_box); + priv->attachments_caption = modest_toolkit_utils_create_captioned_with_size_type (NULL, NULL, + _("mail_va_attachment"), + FALSE, + priv->attachments_view, + HILDON_SIZE_AUTO_WIDTH | + HILDON_SIZE_AUTO_HEIGHT); + attachments_label = modest_toolkit_utils_captioned_get_label_widget (priv->attachments_caption); hildon_gtk_widget_set_theme_size (attachments_label, HILDON_SIZE_AUTO_HEIGHT); @@ -4268,8 +4268,8 @@ modest_msg_edit_window_show_msg_settings_dialog (ModestMsgEditWindow *window) gtk_box_pack_start (GTK_BOX (priority_hbox), medium_toggle, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (priority_hbox), high_toggle, TRUE, TRUE, 0); gtk_widget_show_all (priority_hbox); - captioned = modest_maemo_utils_create_captioned (title_sizegroup, value_sizegroup, - _("mcen_me_editor_message_priority"), FALSE, priority_hbox); + captioned = modest_toolkit_utils_create_captioned (title_sizegroup, value_sizegroup, + _("mcen_me_editor_message_priority"), FALSE, priority_hbox); gtk_widget_show (captioned); gtk_box_pack_start (GTK_BOX (vbox), captioned, FALSE, FALSE, 0); diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index aa278a0..9445606 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -4142,7 +4142,6 @@ modest_ui_actions_on_password_requested (TnyAccountStore *account_store, */ gtk_widget_set_sensitive (entry_username, FALSE); -#ifndef MODEST_TOOLKIT_GTK /* Auto-capitalization is the default, so let's turn it off: */ hildon_gtk_entry_set_input_mode (GTK_ENTRY (entry_username), HILDON_GTK_INPUT_MODE_FULL); @@ -4151,45 +4150,33 @@ modest_ui_actions_on_password_requested (TnyAccountStore *account_store, * We use GTK_SIZE_GROUP_HORIZONTAL, so that the widths are the same. */ GtkSizeGroup *sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); -#ifdef MODEST_TOOLKIT_HILDON2 - GtkWidget *caption = modest_maemo_utils_create_captioned (sizegroup, NULL, - _("mail_fi_username"), FALSE, - entry_username); -#else - GtkWidget *caption = hildon_caption_new (sizegroup, - _("mail_fi_username"), entry_username, NULL, HILDON_CAPTION_MANDATORY); -#endif + GtkWidget *caption = modest_toolkit_utils_create_captioned (sizegroup, NULL, + _("mail_fi_username"), FALSE, + entry_username); gtk_widget_show (entry_username); gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox), caption, FALSE, FALSE, MODEST_MARGIN_HALF); gtk_widget_show (caption); -#else - gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox), entry_username, - TRUE, FALSE, 0); -#endif /* !MODEST_TOOLKIT_GTK */ /* password: */ GtkWidget *entry_password = modest_toolkit_factory_create_entry (modest_runtime_get_toolkit_factory ()); gtk_entry_set_visibility (GTK_ENTRY(entry_password), FALSE); /* gtk_entry_set_invisible_char (GTK_ENTRY(entry_password), "*"); */ -#ifndef MODEST_TOOLKIT_GTK /* Auto-capitalization is the default, so let's turn it off: */ +#ifdef MAEMO_CHANGES hildon_gtk_entry_set_input_mode (GTK_ENTRY (entry_password), HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE); +#endif - caption = modest_maemo_utils_create_captioned (sizegroup, NULL, - _("mail_fi_password"), FALSE, - entry_password); + caption = modest_toolkit_utils_create_captioned (sizegroup, NULL, + _("mail_fi_password"), FALSE, + entry_password); gtk_widget_show (entry_password); gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox), caption, FALSE, FALSE, MODEST_MARGIN_HALF); gtk_widget_show (caption); g_object_unref (sizegroup); -#else - gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox), entry_password, - TRUE, FALSE, 0); -#endif /* !MODEST_TOOLKIT_GTK */ if (initial_username != NULL) gtk_widget_grab_focus (GTK_WIDGET (entry_password)); diff --git a/src/widgets/Makefile.am b/src/widgets/Makefile.am index 4aa30db..d3d47a1 100644 --- a/src/widgets/Makefile.am +++ b/src/widgets/Makefile.am @@ -128,6 +128,8 @@ libmodest_widgets_la_SOURCES= \ modest-tny-stream-gtkhtml.h \ modest-toolkit-factory.c \ modest-toolkit-factory.h \ + modest-toolkit-utils.c \ + modest-toolkit-utils.h \ modest-validating-entry.c \ modest-window.c \ modest-window-mgr-priv.h \ diff --git a/src/widgets/modest-gtk-security-options-view.c b/src/widgets/modest-gtk-security-options-view.c index 25bd7c3..1a46c7c 100644 --- a/src/widgets/modest-gtk-security-options-view.c +++ b/src/widgets/modest-gtk-security-options-view.c @@ -137,15 +137,15 @@ create_incoming_security (ModestSecurityOptionsView* self, /* Create widgets for incoming security */ ppriv->security_view = modest_toolkit_factory_create_serversecurity_selector (modest_runtime_get_toolkit_factory ()); - combo_caption = modest_maemo_utils_create_captioned (title_size_group, value_size_group, - _("mcen_li_emailsetup_secure_connection"), FALSE, - ppriv->security_view); + combo_caption = modest_toolkit_utils_create_captioned (title_size_group, value_size_group, + _("mcen_li_emailsetup_secure_connection"), FALSE, + ppriv->security_view); if (ppriv->full) { ppriv->port_view = modest_toolkit_factory_create_number_entry (modest_runtime_get_toolkit_factory (), PORT_MIN, PORT_MAX); - entry_caption = modest_maemo_utils_create_captioned (title_size_group, value_size_group, - _("mcen_fi_emailsetup_port"), FALSE, - ppriv->port_view); + entry_caption = modest_toolkit_utils_create_captioned (title_size_group, value_size_group, + _("mcen_fi_emailsetup_port"), FALSE, + ppriv->port_view); } ppriv->auth_view = modest_toolkit_factory_create_check_button (modest_runtime_get_toolkit_factory (), @@ -239,15 +239,15 @@ create_outgoing_security (ModestSecurityOptionsView* self, ppriv->security_view = modest_toolkit_factory_create_serversecurity_selector (modest_runtime_get_toolkit_factory ()); modest_serversecurity_selector_fill (ppriv->security_view, MODEST_PROTOCOLS_TRANSPORT_SMTP); - sec_caption = modest_maemo_utils_create_captioned (title_size_group, value_size_group, - _("mcen_li_emailsetup_secure_connection"), FALSE, - ppriv->security_view); + sec_caption = modest_toolkit_utils_create_captioned (title_size_group, value_size_group, + _("mcen_li_emailsetup_secure_connection"), FALSE, + ppriv->security_view); /* The secure authentication widgets */ ppriv->auth_view = modest_toolkit_factory_create_secureauth_selector (modest_runtime_get_toolkit_factory ()); - auth_caption = modest_maemo_utils_create_captioned (title_size_group, value_size_group, - _("mcen_li_emailsetup_secure_authentication"), FALSE, - ppriv->auth_view); + auth_caption = modest_toolkit_utils_create_captioned (title_size_group, value_size_group, + _("mcen_li_emailsetup_secure_authentication"), FALSE, + ppriv->auth_view); if (ppriv->full) { gchar *user_label; @@ -260,9 +260,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 (title_size_group, value_size_group, - user_label, FALSE, - ppriv->user_entry); + user_caption = modest_toolkit_utils_create_captioned (title_size_group, value_size_group, + user_label, FALSE, + ppriv->user_entry); g_free (user_label); /* Prevent the use of some characters. Limit the max @@ -284,15 +284,15 @@ create_outgoing_security (ModestSecurityOptionsView* self, #endif gtk_entry_set_visibility (GTK_ENTRY (ppriv->pwd_entry), FALSE); - pwd_caption = modest_maemo_utils_create_captioned (title_size_group, value_size_group, + pwd_caption = modest_toolkit_utils_create_captioned (title_size_group, value_size_group, _("mail_fi_password"), FALSE, ppriv->pwd_entry); ppriv->port_view = modest_toolkit_factory_create_number_entry (modest_runtime_get_toolkit_factory (), PORT_MIN, PORT_MAX); - port_caption = modest_maemo_utils_create_captioned (title_size_group, value_size_group, - _("mcen_fi_emailsetup_port"), FALSE, - ppriv->port_view); + port_caption = modest_toolkit_utils_create_captioned (title_size_group, value_size_group, + _("mcen_fi_emailsetup_port"), FALSE, + ppriv->port_view); } /* Track changes in UI */ -- 1.7.9.5