2007-04-23 Murray Cumming <murrayc@murrayc.com>
+ * src/maemo/Makefile.am:
+ * src/maemo/modest-maemo-ui-constants.h: New header with some defines for widget spacing,
+ based on maemo-develoers email from Dirk.
+
+ * src/maemo/easysetup/modest-easysetup-wizard.c:
+ (create_page_welcome), (create_page_account_details),
+ (create_page_user_details), (create_page_complete_easysetup),
+ (create_page_custom_incoming), (create_page_custom_outgoing),
+ (create_page_complete_custom),
+ (modest_easysetup_wizard_dialog_init):
+ * src/maemo/modest-account-settings-dialog.c:
+ (create_page_account_details), (create_page_user_details),
+ (create_page_incoming), (create_page_outgoing),
+ (modest_account_settings_dialog_init):
+ * src/maemo/modest-connection-specific-smtp-window.c:
+ (modest_connection_specific_smtp_window_init): Used the smallest of the spacing constants.
+
+2007-04-23 Murray Cumming <murrayc@murrayc.com>
+
* src/maemo/easysetup/modest-easysetup-wizard.c:
(create_page_account_details), (create_page_custom_outgoing),
(create_page_complete_custom):
modest-account-view-window.c \
modest-address-book.c \
modest-icon-names.h \
+ modest-maemo-ui-constants.h \
modest-main-window.c \
modest-main-window-ui.h \
modest-platform.c \
#include "modest-account-mgr-helpers.h"
#include "modest-runtime.h" /* For modest_runtime_get_account_mgr(). */
#include "maemo/modest-connection-specific-smtp-window.h"
+#include "maemo/modest-maemo-ui-constants.h"
#include <gconf/gconf-client.h>
#include <string.h> /* For strlen(). */
static GtkWidget*
create_page_welcome (ModestEasysetupWizardDialog *self)
{
- GtkWidget *box = gtk_vbox_new (FALSE, 2);
+ GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF);
GtkWidget *label = gtk_label_new(_("mcen_ia_emailsetup_intro"));
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
gtk_widget_show (label);
static GtkWidget*
create_page_account_details (ModestEasysetupWizardDialog *self)
{
- GtkWidget *box = gtk_vbox_new (FALSE, 2);
+ GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF);
GtkWidget *label = gtk_label_new(_("mcen_ia_accountdetails"));
- gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (label);
/* Create a size group to be used by all captions.
GtkWidget *caption = create_caption_new_with_asterix (self, sizegroup, _("mcen_fi_country"),
self->combo_account_country, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->combo_account_country);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* connect to country combo's changed signal, so we can fill the provider combo: */
G_CALLBACK (on_combo_account_country), self);
GtkWidget *separator = gtk_hseparator_new ();
- gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (separator);
/* The service provider widgets: */
caption = create_caption_new_with_asterix (self, sizegroup, _("mcen_fi_serviceprovider"),
self->combo_account_serviceprovider, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->combo_account_serviceprovider);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* connect to providers combo's changed signal, so we can fill the email address: */
caption = create_caption_new_with_asterix (self, sizegroup, _("mcen_fi_account_title"),
self->entry_account_title, NULL, HILDON_CAPTION_MANDATORY);
gtk_widget_show (self->entry_account_title);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* Prevent the use of some characters in the account title,
static GtkWidget*
create_page_user_details (ModestEasysetupWizardDialog *self)
{
- GtkWidget *box = gtk_vbox_new (FALSE, 2);
+ GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF);
/* 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.
GtkWidget *caption = create_caption_new_with_asterix (self, sizegroup,
_("mcen_li_emailsetup_name"), self->entry_user_name, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->entry_user_name);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* Prevent the use of some characters in the name,
caption = create_caption_new_with_asterix (self, sizegroup, _("mail_fi_username"),
self->entry_user_username, NULL, HILDON_CAPTION_MANDATORY);
gtk_widget_show (self->entry_user_username);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* Prevent the use of some characters in the username,
caption = create_caption_new_with_asterix (self, sizegroup,
_("mail_fi_password"), self->entry_user_password, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->entry_user_password);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* The email address widgets: */
_("mcen_li_emailsetup_email_address"), self->entry_user_email, NULL, HILDON_CAPTION_MANDATORY);
gtk_entry_set_text (GTK_ENTRY (self->entry_user_email), EXAMPLE_EMAIL_ADDRESS); /* Default text. */
gtk_widget_show (self->entry_user_email);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* Set max length as in the UI spec:
static GtkWidget* create_page_complete_easysetup (ModestEasysetupWizardDialog *self)
{
- GtkWidget *box = gtk_vbox_new (FALSE, 2);
+ GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF);
GtkWidget *label = gtk_label_new(_("mcen_ia_emailsetup_setup_complete"));
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
gtk_widget_show (label);
static GtkWidget* create_page_custom_incoming (ModestEasysetupWizardDialog *self)
{
- GtkWidget *box = gtk_vbox_new (FALSE, 2);
+ GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF);
/* 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.
GtkWidget *caption = create_caption_new_with_asterix (self, sizegroup,
_("mcen_li_emailsetup_type"), self->combo_incoming_servertype, NULL, HILDON_CAPTION_MANDATORY);
gtk_widget_show (self->combo_incoming_servertype);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
if(!self->entry_incomingserver)
"Incoming Server", self->entry_incomingserver, NULL, HILDON_CAPTION_MANDATORY);
update_incoming_server_title (self);
gtk_widget_show (self->entry_incomingserver);
- gtk_box_pack_start (GTK_BOX (box), self->caption_incoming, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), self->caption_incoming, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (self->caption_incoming);
/* Change the caption title when the servertype changes,
caption = hildon_caption_new (sizegroup, _("mcen_li_emailsetup_secure_connection"),
self->combo_incoming_security, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->combo_incoming_security);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
if(!self->checkbox_incoming_auth)
self->checkbox_incoming_auth =
gtk_check_button_new_with_label (_("mcen_li_emailsetup_secure_authentication"));
- gtk_box_pack_start (GTK_BOX (box), self->checkbox_incoming_auth, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), self->checkbox_incoming_auth, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (self->checkbox_incoming_auth);
gtk_widget_show (GTK_WIDGET (box));
static GtkWidget* create_page_custom_outgoing (ModestEasysetupWizardDialog *self)
{
- GtkWidget *box = gtk_vbox_new (FALSE, 2);
+ GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF);
/* 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.
GtkWidget *caption = create_caption_new_with_asterix (self, sizegroup,
_("mcen_li_emailsetup_smtp"), self->entry_outgoingserver, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->entry_outgoingserver);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
set_default_custom_servernames (self);
caption = hildon_caption_new (sizegroup, _("mcen_li_emailsetup_secure_connection"),
self->combo_outgoing_security, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->combo_outgoing_security);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* The secure authentication widgets: */
caption = hildon_caption_new (sizegroup, _("mcen_li_emailsetup_secure_authentication"),
self->combo_outgoing_auth, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->combo_outgoing_auth);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* connection-specific checkbox: */
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->checkbox_outgoing_smtp_specific),
FALSE);
}
- gtk_box_pack_start (GTK_BOX (box), self->checkbox_outgoing_smtp_specific, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), self->checkbox_outgoing_smtp_specific, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (self->checkbox_outgoing_smtp_specific);
GtkWidget *separator = gtk_hseparator_new ();
- gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (separator);
/* Connection-specific SMTP-Severs Edit button: */
self->button_outgoing_smtp_servers, NULL, HILDON_CAPTION_OPTIONAL);
hildon_caption_set_child_expand (HILDON_CAPTION (caption), FALSE);
gtk_widget_show (self->button_outgoing_smtp_servers);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* Only enable the button when the checkbox is checked: */
static GtkWidget* create_page_complete_custom (ModestEasysetupWizardDialog *self)
{
- GtkWidget *box = gtk_vbox_new (FALSE, 2);
+ GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF);
GtkWidget *label = gtk_label_new(_("mcen_ia_emailsetup_setup_complete"));
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
gtk_widget_show (label);
self->button_edit, NULL, HILDON_CAPTION_OPTIONAL);
hildon_caption_set_child_expand (HILDON_CAPTION (caption), FALSE);
gtk_widget_show (self->button_edit);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
gtk_widget_show (GTK_WIDGET (box));
static void
modest_easysetup_wizard_dialog_init (ModestEasysetupWizardDialog *self)
{
+ gtk_container_set_border_width (GTK_CONTAINER (self), MODEST_MARGIN_HALF);
+
/* Create the notebook to be used by the ModestWizardDialog base class:
* Each page of the notebook will be a page of the wizard: */
GtkNotebook *notebook = GTK_NOTEBOOK (gtk_notebook_new());
#include "modest-account-mgr-helpers.h" /* For modest_account_mgr_get_account_data(). */
#include "modest-runtime.h" /* For modest_runtime_get_account_mgr(). */
#include "maemo/modest-connection-specific-smtp-window.h"
+#include <maemo/modest-maemo-ui-constants.h>
#include <gconf/gconf-client.h>
#include <string.h> /* For strlen(). */
static GtkWidget*
create_page_account_details (ModestAccountSettingsDialog *self)
{
- GtkWidget *box = gtk_vbox_new (FALSE, 2);
+ GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF);
GtkWidget *label = gtk_label_new(_("mcen_ia_accountdetails"));
- gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (label);
/* Create a size group to be used by all captions.
self->entry_account_title, NULL, HILDON_CAPTION_MANDATORY);
gtk_widget_show (self->entry_account_title);
connect_for_modified (self, self->entry_account_title);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* Prevent the use of some characters in the account title,
self->combo_retrieve, NULL, HILDON_CAPTION_MANDATORY);
gtk_widget_show (self->combo_retrieve);
connect_for_modified (self, self->combo_retrieve);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* The limit-retrieve combobox: */
self->combo_limit_retrieve, NULL, HILDON_CAPTION_MANDATORY);
gtk_widget_show (self->combo_limit_retrieve);
connect_for_modified (self, self->combo_limit_retrieve);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* The leave-messages widgets: */
if(!self->checkbox_leave_messages)
self->checkbox_leave_messages =
gtk_check_button_new_with_label (_("mcen_fi_advsetup_leave_on_server"));
- gtk_box_pack_start (GTK_BOX (box), self->checkbox_leave_messages, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), self->checkbox_leave_messages, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (self->checkbox_leave_messages);
connect_for_modified (self, self->checkbox_leave_messages);
static GtkWidget*
create_page_user_details (ModestAccountSettingsDialog *self)
{
- GtkWidget *box = gtk_vbox_new (FALSE, 2);
+ GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF);
/* 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.
_("mcen_li_emailsetup_name"), self->entry_user_name, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->entry_user_name);
connect_for_modified (self, self->entry_user_name);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* Prevent the use of some characters in the name,
self->entry_user_username, NULL, HILDON_CAPTION_MANDATORY);
gtk_widget_show (self->entry_user_username);
connect_for_modified (self, self->entry_user_username);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* Prevent the use of some characters in the username,
_("mail_fi_password"), self->entry_user_password, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->entry_user_password);
connect_for_modified (self, self->entry_user_password);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* The email address widgets: */
gtk_entry_set_text (GTK_ENTRY (self->entry_user_email), EXAMPLE_EMAIL_ADDRESS); /* Default text. */
gtk_widget_show (self->entry_user_email);
connect_for_modified (self, self->entry_user_email);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* Set max length as in the UI spec:
self->button_signature, NULL, HILDON_CAPTION_OPTIONAL);
hildon_caption_set_child_expand (HILDON_CAPTION (caption), FALSE);
gtk_widget_show (self->button_signature);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
g_signal_connect (G_OBJECT (self->button_signature), "clicked",
static GtkWidget* create_page_incoming (ModestAccountSettingsDialog *self)
{
- GtkWidget *box = gtk_vbox_new (FALSE, 2);
+ GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF);
/* 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.
"Incoming Server", self->entry_incomingserver, NULL, HILDON_CAPTION_MANDATORY);
gtk_widget_show (self->entry_incomingserver);
connect_for_modified (self, self->entry_incomingserver);
- gtk_box_pack_start (GTK_BOX (box), self->caption_incoming, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), self->caption_incoming, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (self->caption_incoming);
/* The secure connection widgets: */
self->combo_incoming_security, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->combo_incoming_security);
connect_for_modified (self, self->combo_incoming_security);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* Show a default port number when the security method changes, as per the UI spec: */
self->entry_incoming_port, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->entry_incoming_port);
connect_for_modified (self, self->entry_incoming_port);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* The secure authentication widgets: */
if(!self->checkbox_incoming_auth)
self->checkbox_incoming_auth =
gtk_check_button_new_with_label (_("mcen_li_emailsetup_secure_authentication"));
- gtk_box_pack_start (GTK_BOX (box), self->checkbox_incoming_auth, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), self->checkbox_incoming_auth, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (self->checkbox_incoming_auth);
connect_for_modified (self, self->checkbox_incoming_auth);
static GtkWidget* create_page_outgoing (ModestAccountSettingsDialog *self)
{
- GtkWidget *box = gtk_vbox_new (FALSE, 2);
+ GtkWidget *box = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF);
/* 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.
_("mcen_li_emailsetup_smtp"), self->entry_outgoingserver, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->entry_outgoingserver);
connect_for_modified (self, self->entry_outgoingserver);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* The secure authentication widgets: */
self->combo_outgoing_auth, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->combo_outgoing_auth);
connect_for_modified (self, self->combo_outgoing_auth);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* Dim the outgoing username and password when no secure authentication is used, as per the UI spec: */
self->entry_outgoing_username, NULL, HILDON_CAPTION_MANDATORY);
gtk_widget_show (self->entry_outgoing_username);
connect_for_modified (self, self->entry_outgoing_username);
- gtk_box_pack_start (GTK_BOX (box), self->caption_outgoing_username, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), self->caption_outgoing_username, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (self->caption_outgoing_username);
/* Prevent the use of some characters in the username,
_("mail_fi_password"), self->entry_outgoing_password, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->entry_outgoing_password);
connect_for_modified (self, self->entry_outgoing_password);
- gtk_box_pack_start (GTK_BOX (box), self->caption_outgoing_password, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), self->caption_outgoing_password, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (self->caption_outgoing_password);
/* The secure connection widgets: */
self->combo_outgoing_security, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->combo_outgoing_security);
connect_for_modified (self, self->combo_outgoing_security);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* Show a default port number when the security method changes, as per the UI spec: */
self->entry_outgoing_port, NULL, HILDON_CAPTION_OPTIONAL);
gtk_widget_show (self->entry_outgoing_port);
connect_for_modified (self, self->entry_outgoing_port);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
GtkWidget *separator = gtk_hseparator_new ();
- gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (separator);
/* connection-specific checkbox: */
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->checkbox_outgoing_smtp_specific),
FALSE);
}
- gtk_box_pack_start (GTK_BOX (box), self->checkbox_outgoing_smtp_specific, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), self->checkbox_outgoing_smtp_specific, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (self->checkbox_outgoing_smtp_specific);
connect_for_modified (self, self->checkbox_outgoing_smtp_specific);
self->button_outgoing_smtp_servers, NULL, HILDON_CAPTION_OPTIONAL);
hildon_caption_set_child_expand (HILDON_CAPTION (caption), FALSE);
gtk_widget_show (self->button_outgoing_smtp_servers);
- gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (caption);
/* Only enable the button when the checkbox is checked: */
GtkDialog *dialog = GTK_DIALOG (self);
gtk_container_add (GTK_CONTAINER (dialog->vbox), GTK_WIDGET (notebook));
+ gtk_container_set_border_width (GTK_CONTAINER (dialog->vbox), MODEST_MARGIN_HALF);
gtk_widget_show (GTK_WIDGET (notebook));
/* Add the buttons: */
#include "modest-connection-specific-smtp-window.h"
#include "modest-connection-specific-smtp-edit-window.h"
#include <modest-account-mgr-helpers.h>
+#include <maemo/modest-maemo-ui-constants.h>
#include <modest-runtime.h>
#include <tny-maemo-conic-device.h>
/* The application must call modest_connection_specific_smtp_window_fill_with_connections(). */
- GtkWidget *vbox = gtk_vbox_new (FALSE, 2);
+ GtkWidget *vbox = gtk_vbox_new (FALSE, MODEST_MARGIN_HALF);
/* Put the treeview in a scrolled window and add it to the box: */
GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_show (scrolled_window);
gtk_container_add (GTK_CONTAINER (scrolled_window), GTK_WIDGET (priv->treeview));
- gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (scrolled_window), TRUE, TRUE, 2);
+ gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (scrolled_window), TRUE, TRUE, MODEST_MARGIN_HALF);
gtk_widget_show (GTK_WIDGET (priv->treeview));
/* Add the buttons: */
- GtkWidget *hbox = gtk_hbox_new (FALSE, 2);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2);
+ GtkWidget *hbox = gtk_hbox_new (FALSE, MODEST_MARGIN_HALF);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (hbox);
priv->button_edit = gtk_button_new_from_stock (GTK_STOCK_EDIT);
- gtk_box_pack_start (GTK_BOX (hbox), priv->button_edit, TRUE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (hbox), priv->button_edit, TRUE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (priv->button_edit);
g_signal_connect (G_OBJECT (priv->button_edit), "clicked",
G_CALLBACK (on_button_edit), self);
GtkWidget *button_cancel = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
- gtk_box_pack_start (GTK_BOX (hbox), button_cancel, TRUE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (hbox), button_cancel, TRUE, FALSE, MODEST_MARGIN_HALF);
gtk_widget_show (button_cancel);
g_signal_connect (G_OBJECT (button_cancel), "clicked",
G_CALLBACK (on_button_cancel), self);
--- /dev/null
+/* Copyright (c) 2007, Nokia Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Nokia Corporation nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#ifndef __MODEST_MAEMO_UI_CONSTANTS_H__
+#define __MODEST_MAEMO_UI_CONSTANTS_H__
+
+/* These are based on an email on the maemo-developers mailing list from Dirk-Jan Binnema,
+ * title "RE: Standard widget spacing and padding?":
+ */
+
+#define MODEST_MARGIN_DEFAULT 6
+#define MODEST_MARGIN_DOUBLE 12
+#define MODEST_MARGIN_TRIPLE 18
+#define MODEST_MARGIN_HALF 3
+
+#endif /*__MODEST_MAEMO_UI_CONSTANTS_H__*/