From be3def8d200a27d4e5282c8c269ae2c017208cfa Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 8 Apr 2004 22:02:36 +0000 Subject: Fixed up a bit to look nicer and make it closer to HIG compliant. 2004-04-08 Jeffrey Stedfast * mail-account-gui.c (mail_account_gui_build_extra_conf): Fixed up a bit to look nicer and make it closer to HIG compliant. svn path=/trunk/; revision=25377 --- mail/ChangeLog | 3 + mail/mail-account-gui.c | 108 +++++++++++++--------- mail/mail-config.glade | 233 +++++++++++++++++++++++++----------------------- 3 files changed, 189 insertions(+), 155 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 28a2869e86..717322f11e 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,8 @@ 2004-04-08 Jeffrey Stedfast + * mail-account-gui.c (mail_account_gui_build_extra_conf): Fixed up + a bit to look nicer and make it closer to HIG compliant. + * em-folder-tree.c (emft_drop_folder): We need to recursively copy the dragged folder tree over to the drop location, not just the parent folder. We also need to subscribe to the newly created diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index 6234b2007e..3814f9bf97 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -783,7 +783,7 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string) GtkWidget *hostname, *username, *path; GtkTable *main_table, *cur_table; CamelProviderConfEntry *entries; - GList *children, *child; + GList *child, *next; char *name; int i, rows; @@ -807,29 +807,37 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string) /* Remove the contents of the extra_table except for the * mailcheck_frame. */ - main_table = (GtkTable *)glade_xml_get_widget (gui->xml, "extra_table"); + main_table = (GtkTable *) glade_xml_get_widget (gui->xml, "extra_table"); + gtk_container_set_border_width ((GtkContainer *) main_table, 12); + gtk_table_set_row_spacings (main_table, 6); + gtk_table_set_col_spacings (main_table, 8); mailcheck_frame = glade_xml_get_widget (gui->xml, "extra_mailcheck_frame"); - children = gtk_container_get_children (GTK_CONTAINER (main_table)); - for (child = children; child; child = child->next) { - if (child->data != (gpointer)mailcheck_frame) { - gtk_container_remove (GTK_CONTAINER (main_table), - child->data); - } + child = gtk_container_get_children (GTK_CONTAINER (main_table)); + while (child != NULL) { + next = child->next; + if (child->data != (gpointer) mailcheck_frame) + gtk_container_remove (GTK_CONTAINER (main_table), child->data); + g_list_free_1 (child); + child = next; } - g_list_free (children); + gtk_table_resize (main_table, 1, 2); /* Remove any additional mailcheck items. */ - cur_table = (GtkTable *)glade_xml_get_widget (gui->xml, "extra_mailcheck_table"); + cur_table = (GtkTable *) glade_xml_get_widget (gui->xml, "extra_mailcheck_table"); + gtk_container_set_border_width ((GtkContainer *) cur_table, 12); + gtk_table_set_row_spacings (cur_table, 6); + gtk_table_set_col_spacings (cur_table, 8); mailcheck_hbox = glade_xml_get_widget (gui->xml, "extra_mailcheck_hbox"); - children = gtk_container_get_children (GTK_CONTAINER (cur_table)); - for (child = children; child; child = child->next) { - if (child->data != (gpointer)mailcheck_hbox) { - gtk_container_remove (GTK_CONTAINER (cur_table), - child->data); - } + child = gtk_container_get_children (GTK_CONTAINER (cur_table)); + while (child != NULL) { + next = child->next; + if (child->data != (gpointer) mailcheck_hbox) + gtk_container_remove (GTK_CONTAINER (cur_table), child->data); + g_list_free_1 (child); + child = next; } - g_list_free (children); + gtk_table_resize (cur_table, 1, 2); if (!gui->source.provider) { @@ -853,29 +861,45 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string) rows = main_table->nrows; for (i = 0; ; i++) { GtkWidget *enable_widget = NULL; - + switch (entries[i].type) { case CAMEL_PROVIDER_CONF_SECTION_START: { - GtkWidget *frame; + GtkWidget *frame, *label; + char *markup; - if (entries[i].name && !strcmp (entries[i].name, "mailcheck")) - cur_table = (GtkTable *)glade_xml_get_widget (gui->xml, "extra_mailcheck_table"); - else { - frame = gtk_frame_new (entries[i].text); - gtk_container_set_border_width (GTK_CONTAINER (frame), 3); - gtk_table_attach (main_table, frame, 0, 2, - rows, rows + 1, - GTK_EXPAND | GTK_FILL, 0, 0, 0); - - cur_table = (GtkTable *)gtk_table_new (0, 2, FALSE); - rows = 0; - gtk_table_set_row_spacings (cur_table, 4); - gtk_table_set_col_spacings (cur_table, 8); - gtk_container_set_border_width (GTK_CONTAINER (cur_table), 3); - - gtk_container_add (GTK_CONTAINER (frame), GTK_WIDGET (cur_table)); + if (entries[i].name && !strcmp (entries[i].name, "mailcheck")) { + cur_table = (GtkTable *) glade_xml_get_widget (gui->xml, "extra_mailcheck_table"); + rows = cur_table->nrows; + break; } + + markup = g_strdup_printf ("%s", entries[i].text); + label = gtk_label_new (NULL); + gtk_label_set_markup ((GtkLabel *) label, markup); + gtk_label_set_justify ((GtkLabel *) label, GTK_JUSTIFY_LEFT); + gtk_label_set_use_markup ((GtkLabel *) label, TRUE); + gtk_misc_set_alignment ((GtkMisc *) label, 0.0, 0.5); + gtk_widget_show (label); + g_free (markup); + + cur_table = (GtkTable *) gtk_table_new (0, 2, FALSE); + gtk_container_set_border_width ((GtkContainer *) cur_table, 12); + gtk_table_set_row_spacings (cur_table, 6); + gtk_table_set_col_spacings (cur_table, 8); + gtk_widget_show ((GtkWidget *) cur_table); + + frame = gtk_vbox_new (FALSE, 0); + gtk_box_pack_start ((GtkBox *) frame, label, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) frame, (GtkWidget *) cur_table, FALSE, FALSE, 0); + gtk_widget_show (frame); + + gtk_table_attach (main_table, frame, 0, 2, + rows, rows + 1, + GTK_EXPAND | GTK_FILL, 0, 0, 0); + + rows = 0; + break; } case CAMEL_PROVIDER_CONF_SECTION_END: @@ -919,14 +943,14 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string) else active = atoi (entries[i].value); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbox), active); - + gtk_table_attach (cur_table, checkbox, 0, 2, rows, rows + 1, GTK_EXPAND | GTK_FILL, 0, 0, 0); rows++; g_hash_table_insert (gui->extra_config, entries[i].name, checkbox); if (entries[i].depname) setup_toggle (checkbox, entries[i].depname, gui); - + enable_widget = checkbox; break; } @@ -960,7 +984,7 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string) GTK_EXPAND | GTK_FILL, 0, 0, 0); rows++; } - + if (url) text = camel_url_get_param (url, entries[i].name); else @@ -973,9 +997,9 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string) setup_toggle (entry, entries[i].depname, gui); setup_toggle (label, entries[i].depname, gui); } - + g_hash_table_insert (gui->extra_config, entries[i].name, entry); - + enable_widget = entry; break; } @@ -1040,7 +1064,7 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string) setup_toggle (spin, entries[i].depname, gui); setup_toggle (label, entries[i].depname, gui); } - + enable_widget = hbox; break; } @@ -1048,7 +1072,7 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string) case CAMEL_PROVIDER_CONF_END: goto done; } - + if (enable_widget) gtk_widget_set_sensitive(enable_widget, e_account_writable_option(gui->account, gui->source.provider->protocol, entries[i].name)); } diff --git a/mail/mail-config.glade b/mail/mail-config.glade index ca7f7dc1bb..c938702eb1 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -1716,27 +1716,6 @@ For example: "Work" or "Personal" False 6 - - - True - <span weight="bold">Checking for New Mail</span> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 0 - False - False - - - True @@ -1747,109 +1726,135 @@ For example: "Work" or "Personal" 6 - + True + 1 + 2 False - 6 + 6 + 0 - + True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - + False + 0 - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - + + + True + <span weight="bold">Checking for New Mail</span> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + False + False + + - - - True - True - Automatically check for _new mail every - True - GTK_RELIEF_NORMAL - False - False - True - - - 0 - False - False - - + + + 12 + True + 1 + 2 + False + 0 + 0 - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 10 1 1440 1 10 10 - - - 0 - False - False - - + + + True + False + 4 - - - True - _minute(s) - True - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - extra_auto_check_min + + + True + True + Automatically check for _new mail every + True + GTK_RELIEF_NORMAL + False + False + True + + + 0 + False + False + + + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + 1 0 1440 1 10 10 + + + 0 + False + True + + + + + + True + minutes + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + 0 + 2 + 0 + 1 + + + + + 0 + True + True + + - 0 - False - False + 0 + 2 + 0 + 1 @@ -4429,6 +4434,7 @@ For example: "Work" or "Personal" 0.5 0 0 + FontVariable 0 @@ -4495,6 +4501,7 @@ For example: "Work" or "Personal" 0.5 0 0 + FontFixed 0 -- cgit v1.2.3