aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-04-09 06:02:36 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-04-09 06:02:36 +0800
commitbe3def8d200a27d4e5282c8c269ae2c017208cfa (patch)
treee023091db336fcb40ca53bf7b9b69d000cdc399d /mail
parentd29047d941bd4781fa55d7d39715fdc4c52afe60 (diff)
downloadgsoc2013-evolution-be3def8d200a27d4e5282c8c269ae2c017208cfa.tar
gsoc2013-evolution-be3def8d200a27d4e5282c8c269ae2c017208cfa.tar.gz
gsoc2013-evolution-be3def8d200a27d4e5282c8c269ae2c017208cfa.tar.bz2
gsoc2013-evolution-be3def8d200a27d4e5282c8c269ae2c017208cfa.tar.lz
gsoc2013-evolution-be3def8d200a27d4e5282c8c269ae2c017208cfa.tar.xz
gsoc2013-evolution-be3def8d200a27d4e5282c8c269ae2c017208cfa.tar.zst
gsoc2013-evolution-be3def8d200a27d4e5282c8c269ae2c017208cfa.zip
Fixed up a bit to look nicer and make it closer to HIG compliant.
2004-04-08 Jeffrey Stedfast <fejj@ximian.com> * 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
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog3
-rw-r--r--mail/mail-account-gui.c108
-rw-r--r--mail/mail-config.glade233
3 files changed, 189 insertions, 155 deletions
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 <fejj@ximian.com>
+ * 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 ("<span weight=\"bold\">%s</span>", 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
@@ -1717,27 +1717,6 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkLabel" id="label490">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;Checking for New Mail&lt;/span&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
<widget class="GtkTable" id="extra_mailcheck_table">
<property name="visible">True</property>
<property name="n_rows">1</property>
@@ -1747,109 +1726,135 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<property name="column_spacing">6</property>
<child>
- <widget class="GtkHBox" id="extra_mailcheck_hbox">
+ <widget class="GtkTable" id="extra_table">
<property name="visible">True</property>
+ <property name="n_rows">1</property>
+ <property name="n_columns">2</property>
<property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">0</property>
<child>
- <widget class="GtkLabel" id="label546">
+ <widget class="GtkVBox" id="extra_mailcheck_frame">
<property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
- <child>
- <widget class="GtkLabel" id="label571">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkLabel" id="lblMailCheck">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;Checking for New Mail&lt;/span&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkCheckButton" id="extra_auto_check">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Automatically check for _new mail every</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkTable" id="extra_mailcheck_table">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="n_rows">1</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">0</property>
+ <property name="column_spacing">0</property>
- <child>
- <widget class="GtkSpinButton" id="extra_auto_check_min">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">10 1 1440 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkHBox" id="extra_mailcheck_hbox">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</property>
- <child>
- <widget class="GtkLabel" id="label36">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_minute(s)</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">extra_auto_check_min</property>
+ <child>
+ <widget class="GtkCheckButton" id="extra_auto_check">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Automatically check for _new mail every</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkSpinButton" id="extra_auto_check_min">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">1 0 1440 1 10 10</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="lblMinutes">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">minutes</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="left_attach">0</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
</packing>
</child>
</widget>
@@ -4429,6 +4434,7 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
+ <property name="mnemonic_widget">FontVariable</property>
</widget>
<packing>
<property name="left_attach">0</property>
@@ -4495,6 +4501,7 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
+ <property name="mnemonic_widget">FontFixed</property>
</widget>
<packing>
<property name="left_attach">0</property>