diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-12-18 04:38:25 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-12-18 04:38:25 +0800 |
commit | f37b0a1ab7d9dd437905d10d85410992ad9abc0a (patch) | |
tree | c8d13292527ab275073420046acb7f786b4a4008 /mail/mail-vfolder.c | |
parent | e446a3dd9f6f82ef7152a98740092cb1c94af65c (diff) | |
download | gsoc2013-evolution-f37b0a1ab7d9dd437905d10d85410992ad9abc0a.tar gsoc2013-evolution-f37b0a1ab7d9dd437905d10d85410992ad9abc0a.tar.gz gsoc2013-evolution-f37b0a1ab7d9dd437905d10d85410992ad9abc0a.tar.bz2 gsoc2013-evolution-f37b0a1ab7d9dd437905d10d85410992ad9abc0a.tar.lz gsoc2013-evolution-f37b0a1ab7d9dd437905d10d85410992ad9abc0a.tar.xz gsoc2013-evolution-f37b0a1ab7d9dd437905d10d85410992ad9abc0a.tar.zst gsoc2013-evolution-f37b0a1ab7d9dd437905d10d85410992ad9abc0a.zip |
...And a whole bunch more build fixes.
2002-12-17 Jeffrey Stedfast <fejj@ximian.com>
...And a whole bunch more build fixes.
* mail-vfolder.c (mail_vfolder_delete_uri): Don't use
g_string_sprintfa() anymore since it is apparently deprecated.
* mail-session.c (main_get_filter_driver): Don't use
g_string_sprintfa() anymore since it is apparently deprecated.
* mail-ops.c (build_from): Don't use g_string_sprintfa() anymore
since it is apparently deprecated.
* mail-callbacks.c (ask_confirm_for_unwanted_html_mail): Don't use
g_string_sprintfa() anymore since it is apparently deprecated.
* mail-autofilter.c: Don't use g_string_sprintfa() anymore since
it is apparently deprecated.
* folder-browser.c: Don't use g_string_sprintfa() anymore since it
is apparently deprecated.
* mail-search.c (mail_search_set_subject): Remove the unnecessary
g_strdup()'age as well as fix a possible buffer overrun.
* mail-local.c (mail_local_folder_construct): Use
g_path_get_basename().
* mail-config-druid.c (make_account): Don't use e_utf8_*
functions.
svn path=/trunk/; revision=19152
Diffstat (limited to 'mail/mail-vfolder.c')
-rw-r--r-- | mail/mail-vfolder.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index 491fc172a2..2877a7786a 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -405,55 +405,55 @@ mail_vfolder_delete_uri(CamelStore *store, const char *uri) if (context == NULL || !strncmp(uri, "vtrash:", 7)) return; - - d(printf("Deleting uri to check: %s\n", uri)); - - g_assert(pthread_self() == mail_gui_thread); - - changed = g_string_new(""); - + + d(printf ("Deleting uri to check: %s\n", uri)); + + g_assert (pthread_self() == mail_gui_thread); + + changed = g_string_new (""); + LOCK(); - + /* see if any rules directly reference this removed uri */ rule = NULL; - while ( (rule = rule_context_next_rule((RuleContext *)context, 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 = vfolder_rule_next_source ((VfolderRule *) 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)) { - vf = g_hash_table_lookup(vfolder_hash, rule->name); - 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); - g_signal_connect(rule, "changed", G_CALLBACK(rule_changed), vf); - g_string_sprintfa(changed, " %s\n", rule->name); + if (uri_cmp (uri, source)) { + vf = g_hash_table_lookup (vfolder_hash, rule->name); + 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); + g_signal_connect (rule, "changed", G_CALLBACK(rule_changed), vf); + g_string_sprintfa (changed, " %s\n", rule->name); source = NULL; } } } - + UNLOCK(); - + if (changed->str[0]) { - GtkDialog *gd; + GtkWidget *dialog; char *user; - - gd = (GtkDialog *)gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, - _("The following vFolder(s):\n%s" - "Used the removed folder:\n '%s'\n" - "And have been updated."), - changed->str, uri); - g_signal_connect_swapped(gd, "response", G_CALLBACK(gtk_widget_destroy), gd); - gtk_widget_show((GtkWidget *)gd); - - user = g_strdup_printf("%s/vfolders.xml", evolution_dir); - rule_context_save((RuleContext *)context, user); - g_free(user); + + dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, + _("The following vFolder(s):\n%s" + "Used the removed folder:\n '%s'\n" + "And have been updated."), + changed->str, uri); + g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); + gtk_widget_show (dialog); + + user = g_strdup_printf ("%s/vfolders.xml", evolution_dir); + rule_context_save ((RuleContext *) context, user); + g_free (user); } - - g_string_free(changed, TRUE); + + g_string_free (changed, TRUE); } /* called when a uri is renamed in a store */ |