aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-vfolder.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-06-17 15:34:50 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-06-17 15:34:50 +0800
commita218c7d2f7e86bccc7665a3c96569eb14d1c75da (patch)
tree1195c4ed2291f51c36d15125d32be3cc53b9822b /mail/mail-vfolder.c
parent5d5f3b88c3ad76e0b81763f9c48b7fee84df2292 (diff)
downloadgsoc2013-evolution-a218c7d2f7e86bccc7665a3c96569eb14d1c75da.tar.gz
gsoc2013-evolution-a218c7d2f7e86bccc7665a3c96569eb14d1c75da.tar.zst
gsoc2013-evolution-a218c7d2f7e86bccc7665a3c96569eb14d1c75da.zip
** See #59885.
2004-06-17 Not Zed <NotZed@Ximian.com> ** See #59885. ** Moved all of the mail specific filtering stuff from filter/* to here. Renamed appropriately into em* space, etc. * em-filter-folder-element.c (emff_copy_value): implement for folders. * em-vfolder-rule.c (get_widget): read the vfolder glade from mail-config.glade. * mail-config.glade: moved the vfolder source selector here. * em-search-context.c: new mail search specific rule context. * mail-component.c (setup_search_context): use the new em_search_context. * vfolder-rule.c (validate): change error to mail context. * filter-folder.c (validate): change error to mail context. * Makefile.am (em-filter-i18n.h): added rule for i18n of mail filter type stuff. (libevolution_mail_la_SOURCES): added in the filter and vfolder rule stuff specific to mail. ** See #59885. * em-format-html-quote.[ch]: remove and remove from build, not used. * Makefile.am (libevolution_mail_la_LIBADD): add libeabutil and evolutionsmime. * mail-component-factory.c (factory): there is no mail_config anymore. svn path=/trunk/; revision=26380
Diffstat (limited to 'mail/mail-vfolder.c')
-rw-r--r--mail/mail-vfolder.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 14fa477b63..c8ed01a9eb 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -45,12 +45,12 @@
#include "camel/camel-vee-store.h"
#include "camel/camel-vtrash-folder.h"
-#include "filter/vfolder-context.h"
-#include "filter/vfolder-editor.h"
+#include "em-vfolder-context.h"
+#include "em-vfolder-editor.h"
#define d(x) /*(printf("%s(%d):%s: ", __FILE__, __LINE__, __PRETTY_FUNCTION__), (x))*/
-static VfolderContext *context; /* context remains open all time */
+static EMVFolderContext *context; /* context remains open all time */
CamelStore *vfolder_store; /* the 1 static vfolder store */
/* lock for accessing shared resources (below) */
@@ -465,14 +465,14 @@ mail_vfolder_add_uri(CamelStore *store, const char *curi, int remove)
/* dont auto-add any sent/drafts folders etc, they must be explictly listed as a source */
if (rule->source
&& !is_ignore
- && ((((VfolderRule *)rule)->with == VFOLDER_RULE_WITH_LOCAL && !remote)
- || (((VfolderRule *)rule)->with == VFOLDER_RULE_WITH_REMOTE_ACTIVE && remote)
- || (((VfolderRule *)rule)->with == VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE)))
+ && ((((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_LOCAL && !remote)
+ || (((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_REMOTE_ACTIVE && remote)
+ || (((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE)))
found = TRUE;
/* we check using the store uri_cmp since its more accurate */
source = NULL;
- while (!found && (source = vfolder_rule_next_source((VfolderRule *)rule, source))) {
+ while (!found && (source = em_vfolder_rule_next_source((EMVFolderRule *)rule, source))) {
char *esource;
esource = em_uri_from_camel(source);
@@ -526,7 +526,7 @@ mail_vfolder_delete_uri(CamelStore *store, const char *curi)
rule = NULL;
while ((rule = rule_context_next_rule ((RuleContext *) context, rule, NULL))) {
source = NULL;
- while ((source = vfolder_rule_next_source ((VfolderRule *) rule, source))) {
+ while ((source = em_vfolder_rule_next_source ((EMVFolderRule *) rule, source))) {
/* Remove all sources that match, ignore changed events though
because the adduri call above does the work async */
if (uri_cmp (uri, source)) {
@@ -534,7 +534,7 @@ mail_vfolder_delete_uri(CamelStore *store, const char *curi)
g_assert (vf != NULL);
g_signal_handlers_disconnect_matched (rule, G_SIGNAL_MATCH_FUNC|G_SIGNAL_MATCH_DATA, 0,
0, NULL, rule_changed, vf);
- vfolder_rule_remove_source ((VfolderRule *)rule, source);
+ em_vfolder_rule_remove_source ((EMVFolderRule *)rule, source);
g_signal_connect (rule, "changed", G_CALLBACK(rule_changed), vf);
g_string_append_printf (changed, " %s\n", rule->name);
source = NULL;
@@ -600,7 +600,7 @@ mail_vfolder_rename_uri(CamelStore *store, const char *cfrom, const char *cto)
rule = NULL;
while ( (rule = rule_context_next_rule((RuleContext *)context, rule, NULL)) ) {
source = NULL;
- while ( (source = vfolder_rule_next_source((VfolderRule *)rule, source)) ) {
+ while ( (source = em_vfolder_rule_next_source((EMVFolderRule *)rule, source)) ) {
/* Remove all sources that match, ignore changed events though
because the adduri call above does the work async */
if (uri_cmp(from, source)) {
@@ -609,8 +609,8 @@ mail_vfolder_rename_uri(CamelStore *store, const char *cfrom, const char *cto)
g_assert(vf);
g_signal_handlers_disconnect_matched(rule, G_SIGNAL_MATCH_FUNC|G_SIGNAL_MATCH_DATA, 0,
0, NULL, rule_changed, vf);
- vfolder_rule_remove_source((VfolderRule *)rule, source);
- vfolder_rule_add_source((VfolderRule *)rule, to);
+ em_vfolder_rule_remove_source((EMVFolderRule *)rule, source);
+ em_vfolder_rule_add_source((EMVFolderRule *)rule, to);
g_signal_connect(rule, "changed", G_CALLBACK(rule_changed), vf);
changed++;
source = NULL;
@@ -693,12 +693,12 @@ rule_changed(FilterRule *rule, CamelFolder *folder)
d(printf("Filter rule changed? for folder '%s'!!\n", folder->name));
/* find any (currently available) folders, and add them to the ones to open */
- rule_add_sources(((VfolderRule *)rule)->sources, &sources_folder, &sources_uri);
+ rule_add_sources(((EMVFolderRule *)rule)->sources, &sources_folder, &sources_uri);
LOCK();
- if (((VfolderRule *)rule)->with == VFOLDER_RULE_WITH_LOCAL || ((VfolderRule *)rule)->with == VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE)
+ if (((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_LOCAL || ((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE)
rule_add_sources(source_folders_local, &sources_folder, &sources_uri);
- if (((VfolderRule *)rule)->with == VFOLDER_RULE_WITH_REMOTE_ACTIVE || ((VfolderRule *)rule)->with == VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE)
+ if (((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_REMOTE_ACTIVE || ((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE)
rule_add_sources(source_folders_remote, &sources_folder, &sources_uri);
UNLOCK();
@@ -870,7 +870,7 @@ vfolder_load_storage(void)
/* load our rules */
user = g_strdup_printf ("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
- context = vfolder_context_new ();
+ context = em_vfolder_context_new ();
if (rule_context_load ((RuleContext *)context,
EVOLUTION_PRIVDATADIR "/vfoldertypes.xml", user) != 0) {
g_warning("cannot load vfolders: %s\n", ((RuleContext *)context)->error);
@@ -906,7 +906,7 @@ vfolder_revert(void)
static GtkWidget *vfolder_editor = NULL;
static void
-vfolder_editor_response (GtkWidget *dialog, int button, void *data)
+em_vfolder_editor_response (GtkWidget *dialog, int button, void *data)
{
char *user;
@@ -935,9 +935,9 @@ vfolder_edit (void)
return;
}
- vfolder_editor = GTK_WIDGET (vfolder_editor_new (context));
+ vfolder_editor = GTK_WIDGET (em_vfolder_editor_new (context));
gtk_window_set_title (GTK_WINDOW (vfolder_editor), _("vFolders"));
- g_signal_connect(vfolder_editor, "response", G_CALLBACK(vfolder_editor_response), NULL);
+ g_signal_connect(vfolder_editor, "response", G_CALLBACK(em_vfolder_editor_response), NULL);
gtk_widget_show (vfolder_editor);
}
@@ -1040,7 +1040,7 @@ vfolder_create_part(const char *name)
FilterRule *
vfolder_clone_rule(FilterRule *in)
{
- FilterRule *rule = (FilterRule *)vfolder_rule_new();
+ FilterRule *rule = (FilterRule *)em_vfolder_rule_new();
xmlNodePtr xml;
xml = filter_rule_xml_encode(in);
@@ -1052,7 +1052,7 @@ vfolder_clone_rule(FilterRule *in)
/* adds a rule with a gui */
void
-vfolder_gui_add_rule(VfolderRule *rule)
+vfolder_gui_add_rule(EMVFolderRule *rule)
{
GtkWidget *w;
GtkDialog *gd;
@@ -1082,11 +1082,11 @@ vfolder_gui_add_rule(VfolderRule *rule)
void
vfolder_gui_add_from_message(CamelMimeMessage *msg, int flags, const char *source)
{
- VfolderRule *rule;
+ EMVFolderRule *rule;
g_return_if_fail (msg != NULL);
- rule = (VfolderRule*)vfolder_rule_from_message(context, msg, flags, source);
+ rule = (EMVFolderRule*)em_vfolder_rule_from_message(context, msg, flags, source);
vfolder_gui_add_rule(rule);
}