aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-08-08 07:19:20 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-08-08 07:19:20 +0800
commitfc7ad0c9a97377934f6f1c03c5fa805a6c471513 (patch)
tree07e894ae98ad386f35bbad9ab2359cbd18152afd
parenta3075377cc82352d45107303b3cde5a22b0cfb44 (diff)
downloadgsoc2013-evolution-fc7ad0c9a97377934f6f1c03c5fa805a6c471513.tar
gsoc2013-evolution-fc7ad0c9a97377934f6f1c03c5fa805a6c471513.tar.gz
gsoc2013-evolution-fc7ad0c9a97377934f6f1c03c5fa805a6c471513.tar.bz2
gsoc2013-evolution-fc7ad0c9a97377934f6f1c03c5fa805a6c471513.tar.lz
gsoc2013-evolution-fc7ad0c9a97377934f6f1c03c5fa805a6c471513.tar.xz
gsoc2013-evolution-fc7ad0c9a97377934f6f1c03c5fa805a6c471513.tar.zst
gsoc2013-evolution-fc7ad0c9a97377934f6f1c03c5fa805a6c471513.zip
This should return a GtkWidget not a GtkObject.
2001-08-07 Jeffrey Stedfast <fejj@ximian.com> * subscribe-dialog.c (subscribe_dialog_new): This should return a GtkWidget not a GtkObject. * mail-session.c (get_filter_driver): Update to use user's logging preferences. * mail-accounts.c (filter_log_toggled): New. (filter_log_path_changed): New. (construct): Get and attach signals to the filter logging option widgets. * mail-config.c (config_read): Read in filter logging options. (mail_config_write_on_exit): Save filter logging options. (mail_config_set_filter_log_path): Implemented. (mail_config_get_filter_log_path): Implemented. (mail_config_set_filter_log): Implemented. (mail_config_get_filter_log): Implemented. svn path=/trunk/; revision=11751
-rw-r--r--mail/ChangeLog72
-rw-r--r--mail/mail-accounts.c70
-rw-r--r--mail/mail-accounts.h10
-rw-r--r--mail/mail-config.c42
-rw-r--r--mail/mail-config.glade105
-rw-r--r--mail/mail-config.h5
-rw-r--r--mail/mail-ops.c134
-rw-r--r--mail/mail-session.c13
-rw-r--r--mail/subscribe-dialog.c8
-rw-r--r--mail/subscribe-dialog.h2
10 files changed, 319 insertions, 142 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 2ce5672e61..46a0ab8fd0 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,39 +1,67 @@
+2001-08-07 Jeffrey Stedfast <fejj@ximian.com>
+
+ * subscribe-dialog.c (subscribe_dialog_new): This should return a
+ GtkWidget not a GtkObject.
+
+ * mail-session.c (get_filter_driver): Update to use user's logging
+ preferences.
+
+ * mail-accounts.c (filter_log_toggled): New.
+ (filter_log_path_changed): New.
+ (construct): Get and attach signals to the filter logging option
+ widgets.
+
+ * mail-config.c (config_read): Read in filter logging options.
+ (mail_config_write_on_exit): Save filter logging options.
+ (mail_config_set_filter_log_path): Implemented.
+ (mail_config_get_filter_log_path): Implemented.
+ (mail_config_set_filter_log): Implemented.
+ (mail_config_get_filter_log): Implemented.
+
2001-08-07 Peter Williams <peterw@ximian.com>
- * mail-callbacks.c (folder_created): Use bonobo_object_unref on the storage
- since it's a bonobo object.
+ * subscribe-dialog.c (folder_etree_construct): Move
+ fe_create_root_node farther down, so we can check for its children
+ without problems.
+
+ * mail-callbacks.c (folder_created): Use bonobo_object_unref on
+ the storage since it's a bonobo object.
(mail_storage_create_folder): Same.
(folder_deleted): Same.
- * subscribe-dialog.c (fe_destroy): Unref the e_storage since lookup_store
- gives us a ref.
+ * subscribe-dialog.c (fe_destroy): Unref the e_storage since
+ lookup_store gives us a ref.
2001-08-07 Peter Williams <peterw@ximian.com>
- * subscribe-dialog.c (folder_etree_construct): Move fe_create_root_node
- farther down, so we can check for its children without problems.
+ * subscribe-dialog.c (folder_etree_construct): Move
+ fe_create_root_node farther down, so we can check for its children
+ without problems.
(storage_tree_path): Removed, this was broken.
- (subscribe_get_short_folderinfo): Use the queued thread instead of the
- new thread.
+ (subscribe_get_short_folderinfo): Use the queued thread instead of
+ the new thread.
(subscribe_do_subscribe_folder): Same.
- (ftree_node_new_root): Don't create the path anymore; it was broken
- and there's a better way to get it now.
+ (ftree_node_new_root): Don't create the path anymore; it was
+ broken and there's a better way to get it now.
(fe_got_children): Remove some debugging output.
(fe_check_for_children): Here too.
- (fe_done_subscribing): Get the path from the URI instead of the ftree_node.
- (_SubscribeDialogPrivate): Add all of our useful widgets as members.
- (sc_refresh_pressed): Don't clear the search... that makes no sense now.
- (sc_search_activated): Don't set the filter radio button as active now;
- we use sensitivity instead.
+ (fe_done_subscribing): Get the path from the URI instead of the
+ ftree_node.
+ (_SubscribeDialogPrivate): Add all of our useful widgets as
+ members.
+ (sc_refresh_pressed): Don't clear the search... that makes no
+ sense now.
+ (sc_search_activated): Don't set the filter radio button as active
+ now; we use sensitivity instead.
(sc_all_toggled): Make the search entry insensitive.
(sc_filter_toggled): Make the search entry sensitive.
- (kill_default_view): New function. Gets rid of the default view stuff and
- makes all the widgetry sensitive.
- (menu_item_selected): Check if we moved off of the default view and, if so,
- call kill_default_view().
- (subscribe_dialog_construct): Initialize our new private widget members, and
- by default insensitize most of the buttons because they make no sense in the
- default view.
+ (kill_default_view): New function. Gets rid of the default view
+ stuff and makes all the widgetry sensitive.
+ (menu_item_selected): Check if we moved off of the default view
+ and, if so, call kill_default_view().
+ (subscribe_dialog_construct): Initialize our new private widget
+ members, and by default insensitize most of the buttons because
+ they make no sense in the default view.
2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c
index a35ec7586b..605b7e2eb9 100644
--- a/mail/mail-accounts.c
+++ b/mail/mail-accounts.c
@@ -636,6 +636,16 @@ pgp_path_changed (GtkEntry *entry, gpointer data)
}
static void
+filter_log_path_changed (GtkEntry *entry, gpointer data)
+{
+ const char *path;
+
+ path = gtk_entry_get_text (entry);
+
+ mail_config_set_filter_log_path (path && *path ? path : NULL);
+}
+
+static void
set_color (GnomeColorPicker *cp)
{
guint32 rgb = mail_config_get_citation_color ();
@@ -693,6 +703,12 @@ show_preview_toggled (GtkWidget *toggle, gpointer data)
}
static void
+filter_log_toggled (GtkWidget *toggle, gpointer data)
+{
+ mail_config_set_filter_log (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle)));
+}
+
+static void
forward_style_activated (GtkWidget *item, gpointer data)
{
int style = GPOINTER_TO_INT (data);
@@ -796,12 +812,12 @@ construct (MailAccountsDialog *dialog)
set_color (dialog->citation_color);
gtk_signal_connect (GTK_OBJECT (dialog->citation_color), "color_set",
GTK_SIGNAL_FUNC (citation_color_set), dialog);
-
+
dialog->timeout_toggle = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "checkMarkTimeout"));
gtk_toggle_button_set_active (dialog->timeout_toggle, mail_config_get_do_seen_timeout ());
gtk_signal_connect (GTK_OBJECT (dialog->timeout_toggle), "toggled",
GTK_SIGNAL_FUNC (timeout_toggled), dialog);
-
+
dialog->timeout = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "spinMarkTimeout"));
gtk_spin_button_set_value (dialog->timeout, (1.0 * mail_config_get_mark_as_seen_timeout ()) / 1000.0);
gtk_signal_connect (GTK_OBJECT (dialog->timeout), "changed",
@@ -820,6 +836,16 @@ construct (MailAccountsDialog *dialog)
gtk_signal_connect (GTK_OBJECT (dialog->images_always), "toggled",
GTK_SIGNAL_FUNC (images_radio_toggled), dialog);
+ dialog->thread_list = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkThreadedList"));
+ gtk_toggle_button_set_active (dialog->thread_list, mail_config_get_thread_list (NULL));
+ gtk_signal_connect (GTK_OBJECT (dialog->thread_list), "toggled",
+ GTK_SIGNAL_FUNC (thread_list_toggled), dialog);
+
+ dialog->show_preview = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkShowPreview"));
+ gtk_toggle_button_set_active (dialog->show_preview, mail_config_get_show_preview (NULL));
+ gtk_signal_connect (GTK_OBJECT (dialog->show_preview), "toggled",
+ GTK_SIGNAL_FUNC (show_preview_toggled), dialog);
+
/* Composer page */
dialog->send_html = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkSendHTML"));
gtk_toggle_button_set_active (dialog->send_html, mail_config_get_send_html ());
@@ -833,6 +859,16 @@ construct (MailAccountsDialog *dialog)
gtk_container_foreach (GTK_CONTAINER (gtk_option_menu_get_menu (dialog->forward_style)),
attach_forward_style_signal, &num);
+ dialog->prompt_empty_subject = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptEmptySubject"));
+ gtk_toggle_button_set_active (dialog->prompt_empty_subject, mail_config_get_prompt_empty_subject ());
+ gtk_signal_connect (GTK_OBJECT (dialog->prompt_empty_subject), "toggled",
+ GTK_SIGNAL_FUNC (prompt_empty_subject_toggled), dialog);
+
+ dialog->prompt_bcc_only = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptBccOnly"));
+ gtk_toggle_button_set_active (dialog->prompt_bcc_only, mail_config_get_prompt_only_bcc ());
+ gtk_signal_connect (GTK_OBJECT (dialog->prompt_bcc_only), "toggled",
+ GTK_SIGNAL_FUNC (prompt_bcc_only_toggled), dialog);
+
/* Other page */
dialog->pgp_path = GNOME_FILE_ENTRY (glade_xml_get_widget (gui, "filePgpPath"));
gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (dialog->pgp_path)),
@@ -857,25 +893,17 @@ construct (MailAccountsDialog *dialog)
gtk_signal_connect (GTK_OBJECT (dialog->empty_trash), "toggled",
GTK_SIGNAL_FUNC (empty_trash_toggled), dialog);
- dialog->prompt_empty_subject = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptEmptySubject"));
- gtk_toggle_button_set_active (dialog->prompt_empty_subject, mail_config_get_prompt_empty_subject ());
- gtk_signal_connect (GTK_OBJECT (dialog->prompt_empty_subject), "toggled",
- GTK_SIGNAL_FUNC (prompt_empty_subject_toggled), dialog);
-
- dialog->prompt_bcc_only = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptBccOnly"));
- gtk_toggle_button_set_active (dialog->prompt_bcc_only, mail_config_get_prompt_only_bcc ());
- gtk_signal_connect (GTK_OBJECT (dialog->prompt_bcc_only), "toggled",
- GTK_SIGNAL_FUNC (prompt_bcc_only_toggled), dialog);
-
- dialog->thread_list = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkThreadedList"));
- gtk_toggle_button_set_active (dialog->thread_list, mail_config_get_thread_list (NULL));
- gtk_signal_connect (GTK_OBJECT (dialog->thread_list), "toggled",
- GTK_SIGNAL_FUNC (thread_list_toggled), dialog);
-
- dialog->show_preview = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkShowPreview"));
- gtk_toggle_button_set_active (dialog->show_preview, mail_config_get_show_preview (NULL));
- gtk_signal_connect (GTK_OBJECT (dialog->show_preview), "toggled",
- GTK_SIGNAL_FUNC (show_preview_toggled), dialog);
+ dialog->filter_log = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkFilterLog"));
+ gtk_toggle_button_set_active (dialog->filter_log, mail_config_get_filter_log ());
+ gtk_signal_connect (GTK_OBJECT (dialog->filter_log), "toggled",
+ GTK_SIGNAL_FUNC (filter_log_toggled), dialog);
+
+ dialog->filter_log_path = GNOME_FILE_ENTRY (glade_xml_get_widget (gui, "fileFilterLog"));
+ gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (dialog->filter_log_path)),
+ mail_config_get_filter_log_path ());
+ gnome_file_entry_set_default_path (dialog->filter_log_path, mail_config_get_filter_log_path ());
+ gtk_signal_connect (GTK_OBJECT (gnome_file_entry_gtk_entry (dialog->filter_log_path)),
+ "changed", GTK_SIGNAL_FUNC (filter_log_path_changed), dialog);
/* now to fill in the clists */
dialog->accounts_row = -1;
diff --git a/mail/mail-accounts.h b/mail/mail-accounts.h
index 227a887010..0db2acb3b8 100644
--- a/mail/mail-accounts.h
+++ b/mail/mail-accounts.h
@@ -78,18 +78,20 @@ struct _MailAccountsDialog {
GtkToggleButton *timeout_toggle;
GtkSpinButton *timeout;
GtkToggleButton *images_always, *images_sometimes, *images_never;
+ GtkToggleButton *thread_list;
+ GtkToggleButton *show_preview;
/* Composer page */
GtkToggleButton *send_html;
GtkOptionMenu *forward_style;
GtkOptionMenu *charset;
+ GtkToggleButton *prompt_empty_subject;
+ GtkToggleButton *prompt_bcc_only;
/* Other page */
GtkToggleButton *empty_trash;
- GtkToggleButton *prompt_empty_subject;
- GtkToggleButton *prompt_bcc_only;
- GtkToggleButton *thread_list;
- GtkToggleButton *show_preview;
+ GtkToggleButton *filter_log;
+ GnomeFileEntry *filter_log_path;
/* PGP page */
GnomeFileEntry *pgp_path;
diff --git a/mail/mail-config.c b/mail/mail-config.c
index fae3a8a0d0..40d0fc8cbc 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -85,6 +85,9 @@ typedef struct {
GHashTable *threaded_hash;
GHashTable *preview_hash;
+
+ gboolean filter_log;
+ char *filter_log_path;
} MailConfig;
static MailConfig *config = NULL;
@@ -551,6 +554,13 @@ config_read (void)
/* Trash folders */
config->empty_trash_on_exit = bonobo_config_get_boolean_with_default (
config->db, "/Mail/Trash/empty_on_exit", FALSE, NULL);
+
+ /* Filter logging */
+ config->filter_log = bonobo_config_get_boolean_with_default (
+ config->db, "/Mail/Filters/log", FALSE, NULL);
+
+ config->filter_log_path = bonobo_config_get_string (
+ config->db, "/Mail/Filters/log_path", NULL);
}
#define bonobo_config_set_string_wrapper(db, path, val, ev) bonobo_config_set_string (db, path, val ? val : "", ev)
@@ -811,6 +821,13 @@ mail_config_write_on_exit (void)
bonobo_config_set_boolean (config->db, "/Mail/Trash/empty_on_exit",
config->empty_trash_on_exit, NULL);
+ /* Filter logging */
+ bonobo_config_set_boolean (config->db, "/Mail/Filters/log",
+ config->filter_log, NULL);
+
+ bonobo_config_set_string_wrapper (config->db, "/Mail/Filters/log_path",
+ config->filter_log_path, NULL);
+
g_hash_table_foreach_remove (config->threaded_hash,
hash_save_state, "Threads");
@@ -988,6 +1005,31 @@ mail_config_set_thread_list (const char *uri, gboolean value)
}
gboolean
+mail_config_get_filter_log (void)
+{
+ return config->filter_log;
+}
+
+void
+mail_config_set_filter_log (gboolean value)
+{
+ config->filter_log = value;
+}
+
+const char *
+mail_config_get_filter_log_path (void)
+{
+ return config->filter_log_path;
+}
+
+void
+mail_config_set_filter_log_path (const char *path)
+{
+ g_free (config->filter_log_path);
+ config->filter_log_path = g_strdup (path);
+}
+
+gboolean
mail_config_get_hide_deleted (void)
{
return config->hide_deleted;
diff --git a/mail/mail-config.glade b/mail/mail-config.glade
index 48a78496ed..76fabd40c5 100644
--- a/mail/mail-config.glade
+++ b/mail/mail-config.glade
@@ -266,13 +266,14 @@ Click &quot;Finish&quot; to save your settings.</text>
<widget>
<class>GtkLabel</class>
<name>management_name_label</name>
- <label>Name:</label>
+ <label>_Name:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <default_focus_target>management_name</default_focus_target>
<child>
<padding>0</padding>
<expand>False</expand>
@@ -300,7 +301,7 @@ Click &quot;Finish&quot; to save your settings.</text>
<class>GtkCheckButton</class>
<name>management_default</name>
<can_focus>True</can_focus>
- <label>Make this my default account</label>
+ <label>Make this my _default account</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
@@ -389,13 +390,14 @@ Click &quot;Finish&quot; to save your settings.</text>
<widget>
<class>GtkLabel</class>
<name>identity_address_label</name>
- <label>Email Address:</label>
+ <label>_Email Address:</label>
<justify>GTK_JUSTIFY_RIGHT</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <default_focus_target>identity_address</default_focus_target>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
@@ -415,13 +417,14 @@ Click &quot;Finish&quot; to save your settings.</text>
<widget>
<class>GtkLabel</class>
<name>identity_full_name_label</name>
- <label>Full Name:</label>
+ <label>_Full Name:</label>
<justify>GTK_JUSTIFY_RIGHT</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <default_focus_target>identity_full_name</default_focus_target>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
@@ -501,13 +504,14 @@ Click &quot;Finish&quot; to save your settings.</text>
<widget>
<class>GtkLabel</class>
<name>identity_organization_label</name>
- <label>Organization:</label>
+ <label>_Organization:</label>
<justify>GTK_JUSTIFY_RIGHT</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>7</xpad>
<ypad>0</ypad>
+ <default_focus_target>identity_organization</default_focus_target>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
@@ -528,7 +532,7 @@ Click &quot;Finish&quot; to save your settings.</text>
<class>GtkCheckButton</class>
<name>check_html_signature</name>
<can_focus>True</can_focus>
- <label>HTML Signature:</label>
+ <label>_HTML Signature:</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
@@ -585,13 +589,14 @@ Click &quot;Finish&quot; to save your settings.</text>
<widget>
<class>GtkLabel</class>
<name>identity_signature_label</name>
- <label>Signature file:</label>
+ <label>_Signature file:</label>
<justify>GTK_JUSTIFY_RIGHT</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>7</xpad>
<ypad>0</ypad>
+ <default_focus_target>entry_signature</default_focus_target>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
@@ -793,13 +798,14 @@ None
<widget>
<class>GtkLabel</class>
<name>source_host_label</name>
- <label>Host:</label>
+ <label>_Host:</label>
<justify>GTK_JUSTIFY_RIGHT</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <default_focus_target>source_host</default_focus_target>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
@@ -819,13 +825,14 @@ None
<widget>
<class>GtkLabel</class>
<name>source_user_label</name>
- <label>Username:</label>
+ <label>_Username:</label>
<justify>GTK_JUSTIFY_RIGHT</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <default_focus_target>source_user</default_focus_target>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
@@ -893,13 +900,14 @@ None
<widget>
<class>GtkLabel</class>
<name>source_path_label</name>
- <label>Path:</label>
+ <label>_Path:</label>
<justify>GTK_JUSTIFY_RIGHT</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <default_focus_target>source_path</default_focus_target>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
@@ -920,7 +928,7 @@ None
<class>GtkCheckButton</class>
<name>source_use_ssl</name>
<can_focus>True</can_focus>
- <label>Use secure connection (SSL)</label>
+ <label>Use secure connection (_SSL)</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
@@ -1083,7 +1091,7 @@ Kerberos
<class>GtkButton</class>
<name>source_check_supported</name>
<can_focus>True</can_focus>
- <label> Check for supported types </label>
+ <label>_Check for supported types</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>
@@ -1093,7 +1101,7 @@ Kerberos
<class>GtkCheckButton</class>
<name>source_remember_password</name>
<can_focus>True</can_focus>
- <label>Remember this password</label>
+ <label>_Remember this password</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
@@ -1149,7 +1157,7 @@ Kerberos
<class>GtkHBox</class>
<name>hbox53</name>
<homogeneous>False</homogeneous>
- <spacing>0</spacing>
+ <spacing>4</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
@@ -1160,7 +1168,7 @@ Kerberos
<class>GtkCheckButton</class>
<name>extra_auto_check</name>
<can_focus>True</can_focus>
- <label>Automatically check for new mail every</label>
+ <label>_Automatically check for new mail every</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
@@ -1336,13 +1344,14 @@ Sendmail
<widget>
<class>GtkLabel</class>
<name>transport_host_label</name>
- <label>Host:</label>
+ <label>_Host:</label>
<justify>GTK_JUSTIFY_RIGHT</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <default_focus_target>transport_host</default_focus_target>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
@@ -1388,7 +1397,7 @@ Sendmail
<class>GtkCheckButton</class>
<name>transport_use_ssl</name>
<can_focus>True</can_focus>
- <label>Use secure connection (SSL)</label>
+ <label>Use secure connection (_SSL)</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
@@ -1420,7 +1429,7 @@ Sendmail
<class>GtkCheckButton</class>
<name>transport_needs_auth</name>
<can_focus>True</can_focus>
- <label>Server requires authentication</label>
+ <label>Server requires _authentication</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
@@ -1513,7 +1522,7 @@ Kerberos
<class>GtkButton</class>
<name>transport_check_supported</name>
<can_focus>True</can_focus>
- <label> Check for supported types </label>
+ <label>_Check for supported types</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>
@@ -1533,13 +1542,14 @@ Kerberos
<widget>
<class>GtkLabel</class>
<name>transport_user_label</name>
- <label>Username:</label>
+ <label>_Username:</label>
<justify>GTK_JUSTIFY_RIGHT</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <default_focus_target>transport_user</default_focus_target>
<child>
<padding>0</padding>
<expand>False</expand>
@@ -1567,7 +1577,7 @@ Kerberos
<class>GtkCheckButton</class>
<name>transport_remember_password</name>
<can_focus>True</can_focus>
- <label>Remember this password</label>
+ <label>_Remember this password</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
@@ -2783,7 +2793,7 @@ Quoted
<widget>
<class>GtkLabel</class>
<name>lblPgpPath</name>
- <label>PGP _binary path:</label>
+ <label>_PGP binary path:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
@@ -2894,6 +2904,57 @@ Quoted
<fill>False</fill>
</child>
</widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox57</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkCheckButton</class>
+ <name>chkFilterLog</name>
+ <can_focus>True</can_focus>
+ <label>_Log filter actions to:</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GnomeFileEntry</class>
+ <name>fileFilterLog</name>
+ <max_saved>10</max_saved>
+ <title>Select Filter Log file...</title>
+ <directory>False</directory>
+ <modal>True</modal>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GnomeEntry:entry</child_name>
+ <name>combo-entry2</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+ </widget>
+ </widget>
</widget>
<widget>
diff --git a/mail/mail-config.h b/mail/mail-config.h
index a997802c6d..5f5fd78645 100644
--- a/mail/mail-config.h
+++ b/mail/mail-config.h
@@ -105,6 +105,11 @@ void mail_config_write_on_exit (void);
/* General Accessor functions */
gboolean mail_config_is_configured (void);
+gboolean mail_config_get_filter_log (void);
+void mail_config_set_filter_log (gboolean value);
+const char *mail_config_get_filter_log_path (void);
+void mail_config_set_filter_log_path (const char *path);
+
gboolean mail_config_get_empty_trash_on_exit (void);
void mail_config_set_empty_trash_on_exit (gboolean value);
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 0a3ea46293..b3b47d81d7 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -55,7 +55,7 @@
/* used both for fetching mail, and for filtering mail */
struct _filter_mail_msg {
struct _mail_msg msg;
-
+
CamelFolder *source_folder; /* where they come from */
GPtrArray *source_uids; /* uids to copy, or NULL == copy all */
CamelUIDCache *cache; /* UID cache if we are to cache the uids, NULL otherwise */
@@ -134,12 +134,12 @@ filter_folder_filter (struct _mail_msg *mm)
}
static void
-filter_folder_filtered(struct _mail_msg *mm)
+filter_folder_filtered (struct _mail_msg *mm)
{
}
static void
-filter_folder_free(struct _mail_msg *mm)
+filter_folder_free (struct _mail_msg *mm)
{
struct _filter_mail_msg *m = (struct _filter_mail_msg *)mm;
int i;
@@ -190,7 +190,7 @@ mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids,
m->driver = camel_session_get_filter_driver (session, type, NULL);
- e_thread_put(mail_thread_new, (EMsg *)m);
+ e_thread_put (mail_thread_new, (EMsg *)m);
}
/* convenience function for it */
@@ -354,11 +354,11 @@ static struct _mail_msg_op fetch_mail_op = {
};
/* ouch, a 'do everything' interface ... */
-void mail_fetch_mail(const char *source, int keep,
- const char *type, CamelOperation *cancel,
- CamelFilterGetFolderFunc get_folder, void *get_data,
- CamelFilterStatusFunc *status, void *status_data,
- void (*done)(char *source, void *data), void *data)
+void
+mail_fetch_mail (const char *source, int keep, const char *type, CamelOperation *cancel,
+ CamelFilterGetFolderFunc get_folder, void *get_data,
+ CamelFilterStatusFunc *status, void *status_data,
+ void (*done)(char *source, void *data), void *data)
{
struct _fetch_mail_msg *m;
struct _filter_mail_msg *fm;
@@ -380,7 +380,7 @@ void mail_fetch_mail(const char *source, int keep,
if (status)
camel_filter_driver_set_status_func (fm->driver, status, status_data);
- e_thread_put(mail_thread_new, (EMsg *)m);
+ e_thread_put (mail_thread_new, (EMsg *)m);
}
@@ -402,15 +402,15 @@ do_update_subfolders_rec (CamelStore *store, CamelFolderInfo *info, EvolutionSto
mail_folder_cache_set_update_estorage (info->url, storage);
mail_folder_cache_note_folderinfo (info->url, info);
}
-
- path = g_strdup_printf("%s/%s", prefix, info->name);
-
+
+ path = g_strdup_printf ("%s/%s", prefix, info->name);
+
if (info->child)
- do_update_subfolders_rec(store, info->child, storage, path);
+ do_update_subfolders_rec (store, info->child, storage, path);
if (info->sibling)
- do_update_subfolders_rec(store, info->sibling, storage, prefix);
-
- g_free(path);
+ do_update_subfolders_rec (store, info->sibling, storage, prefix);
+
+ g_free (path);
}
static void
@@ -419,14 +419,14 @@ do_update_subfolders (CamelStore *store, CamelFolderInfo *info, void *data)
struct _update_info *uinfo = data;
if (uinfo && info) {
- do_update_subfolders_rec(store, info, uinfo->storage, "");
+ do_update_subfolders_rec (store, info, uinfo->storage, "");
}
-
+
if (uinfo->done)
- uinfo->done(store, uinfo->data);
-
- gtk_object_unref((GtkObject *)uinfo->storage);
- g_free(uinfo);
+ uinfo->done (store, uinfo->data);
+
+ gtk_object_unref ((GtkObject *)uinfo->storage);
+ g_free (uinfo);
}
/* this interface is a little icky */
@@ -1153,11 +1153,12 @@ do_scan_subfolders (CamelStore *store, CamelFolderInfo *info, void *data)
}
/* synchronous function to scan the & and add folders in a store */
-void mail_scan_subfolders(CamelStore *store, EvolutionStorage *storage)
+void
+mail_scan_subfolders (CamelStore *store, EvolutionStorage *storage)
{
int id;
-
- id = mail_get_folderinfo(store, do_scan_subfolders, storage);
+
+ id = mail_get_folderinfo (store, do_scan_subfolders, storage);
/*mail_msg_wait(id);*/
}
@@ -1168,7 +1169,8 @@ struct _build_data {
void *data;
};
-static void do_build_attachment(CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *data)
+static void
+do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *data)
{
struct _build_data *d = data;
CamelMultipart *multipart;
@@ -1235,37 +1237,41 @@ struct _get_folder_msg {
void *data;
};
-static char *get_folder_desc(struct _mail_msg *mm, int done)
+static char *
+get_folder_desc (struct _mail_msg *mm, int done)
{
struct _get_folder_msg *m = (struct _get_folder_msg *)mm;
return g_strdup_printf(_("Opening folder %s"), m->uri);
}
-static void get_folder_get(struct _mail_msg *mm)
+static void
+get_folder_get (struct _mail_msg *mm)
{
struct _get_folder_msg *m = (struct _get_folder_msg *)mm;
-
- camel_operation_register(mm->cancel);
- m->folder = mail_tool_uri_to_folder(m->uri, &mm->ex);
- camel_operation_unregister(mm->cancel);
+
+ camel_operation_register (mm->cancel);
+ m->folder = mail_tool_uri_to_folder (m->uri, &mm->ex);
+ camel_operation_unregister (mm->cancel);
}
-static void get_folder_got(struct _mail_msg *mm)
+static void
+get_folder_got (struct _mail_msg *mm)
{
struct _get_folder_msg *m = (struct _get_folder_msg *)mm;
-
+
if (m->done)
m->done (m->uri, m->folder, m->data);
}
-static void get_folder_free(struct _mail_msg *mm)
+static void
+get_folder_free (struct _mail_msg *mm)
{
struct _get_folder_msg *m = (struct _get_folder_msg *)mm;
-
- g_free(m->uri);
+
+ g_free (m->uri);
if (m->folder)
- camel_object_unref((CamelObject *)m->folder);
+ camel_object_unref (CAMEL_OBJECT (m->folder));
}
static struct _mail_msg_op get_folder_op = {
@@ -1276,18 +1282,18 @@ static struct _mail_msg_op get_folder_op = {
};
int
-mail_get_folder(const char *uri, void (*done) (char *uri, CamelFolder *folder, void *data), void *data)
+mail_get_folder (const char *uri, void (*done) (char *uri, CamelFolder *folder, void *data), void *data)
{
struct _get_folder_msg *m;
int id;
-
- m = mail_msg_new(&get_folder_op, NULL, sizeof(*m));
- m->uri = g_strdup(uri);
+
+ m = mail_msg_new (&get_folder_op, NULL, sizeof(*m));
+ m->uri = g_strdup (uri);
m->data = data;
m->done = done;
-
+
id = m->msg.seq;
- e_thread_put(mail_thread_new, (EMsg *)m);
+ e_thread_put (mail_thread_new, (EMsg *)m);
return id;
}
@@ -1302,37 +1308,41 @@ struct _get_store_msg {
void *data;
};
-static char *get_store_desc(struct _mail_msg *mm, int done)
+static char *
+get_store_desc (struct _mail_msg *mm, int done)
{
struct _get_store_msg *m = (struct _get_store_msg *)mm;
return g_strdup_printf(_("Opening store %s"), m->uri);
}
-static void get_store_get(struct _mail_msg *mm)
+static void
+get_store_get (struct _mail_msg *mm)
{
struct _get_store_msg *m = (struct _get_store_msg *)mm;
-
- camel_operation_register(mm->cancel);
- m->store = camel_session_get_store(session, m->uri, &mm->ex);
- camel_operation_unregister(mm->cancel);
+
+ camel_operation_register (mm->cancel);
+ m->store = camel_session_get_store (session, m->uri, &mm->ex);
+ camel_operation_unregister (mm->cancel);
}
-static void get_store_got(struct _mail_msg *mm)
+static void
+get_store_got (struct _mail_msg *mm)
{
struct _get_store_msg *m = (struct _get_store_msg *)mm;
if (m->done)
- m->done(m->uri, m->store, m->data);
+ m->done (m->uri, m->store, m->data);
}
-static void get_store_free(struct _mail_msg *mm)
+static void
+get_store_free (struct _mail_msg *mm)
{
struct _get_store_msg *m = (struct _get_store_msg *)mm;
-
- g_free(m->uri);
+
+ g_free (m->uri);
if (m->store)
- camel_object_unref((CamelObject *)m->store);
+ camel_object_unref (CAMEL_OBJECT (m->store));
}
static struct _mail_msg_op get_store_op = {
@@ -1343,18 +1353,18 @@ static struct _mail_msg_op get_store_op = {
};
int
-mail_get_store(const char *uri, void (*done) (char *uri, CamelStore *store, void *data), void *data)
+mail_get_store (const char *uri, void (*done) (char *uri, CamelStore *store, void *data), void *data)
{
struct _get_store_msg *m;
int id;
- m = mail_msg_new(&get_store_op, NULL, sizeof(*m));
- m->uri = g_strdup(uri);
+ m = mail_msg_new (&get_store_op, NULL, sizeof (*m));
+ m->uri = g_strdup (uri);
m->data = data;
m->done = done;
-
+
id = m->msg.seq;
- e_thread_put(mail_thread_new, (EMsg *)m);
+ e_thread_put (mail_thread_new, (EMsg *)m);
return id;
}
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 05b1e79d17..fe56537588 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -343,7 +343,7 @@ get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
RuleContext *fc;
GString *fsearch, *faction;
FilterRule *rule = NULL;
- char *user, *system, *filename;
+ char *user, *system;
user = g_strdup_printf ("%s/filters.xml", evolution_dir);
system = EVOLUTION_DATADIR "/evolution/filtertypes.xml";
@@ -354,14 +354,15 @@ get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
driver = camel_filter_driver_new ();
camel_filter_driver_set_folder_func (driver, get_folder, NULL);
- if (TRUE /* perform_logging FIXME */) {
+ if (mail_config_get_filter_log ()) {
MailSession *ms = (MailSession *)session;
if (ms->filter_logfile == NULL) {
- filename = g_strdup_printf ("%s/evolution-filter-log",
- evolution_dir);
- ms->filter_logfile = fopen (filename, "a+");
- g_free (filename);
+ const char *filename;
+
+ filename = mail_config_get_filter_log_path ();
+ if (filename)
+ ms->filter_logfile = fopen (filename, "a+");
}
if (ms->filter_logfile)
camel_filter_driver_set_logfile (driver, ms->filter_logfile);
diff --git a/mail/subscribe-dialog.c b/mail/subscribe-dialog.c
index c075bbfa00..4e868e3c6e 100644
--- a/mail/subscribe-dialog.c
+++ b/mail/subscribe-dialog.c
@@ -1520,15 +1520,15 @@ subscribe_dialog_construct (GtkObject *object)
populate_store_list (sc);
}
-GtkObject *
+GtkWidget *
subscribe_dialog_new (void)
{
SubscribeDialog *subscribe_dialog;
-
+
subscribe_dialog = gtk_type_new (SUBSCRIBE_DIALOG_TYPE);
subscribe_dialog_construct (GTK_OBJECT (subscribe_dialog));
-
- return GTK_OBJECT (subscribe_dialog);
+
+ return GTK_WIDGET (subscribe_dialog);
}
E_MAKE_TYPE (subscribe_dialog, "SubscribeDialog", SubscribeDialog, subscribe_dialog_class_init, subscribe_dialog_init, PARENT_TYPE);
diff --git a/mail/subscribe-dialog.h b/mail/subscribe-dialog.h
index 10fa5d9f44..b838f13cc4 100644
--- a/mail/subscribe-dialog.h
+++ b/mail/subscribe-dialog.h
@@ -54,7 +54,7 @@ typedef struct {
} SubscribeDialogClass;
GtkType subscribe_dialog_get_type (void);
-GtkObject *subscribe_dialog_new (void);
+GtkWidget *subscribe_dialog_new (void);
void subscribe_dialog_run_and_close (SubscribeDialog *dialog);
#endif /* _SUBSCRIBE_DIALOG_H_ */