diff options
author | Not Zed <NotZed@Ximian.com> | 2002-11-12 22:59:35 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-11-12 22:59:35 +0800 |
commit | f9804e11931411358ce98ad5a7726de6d68f2115 (patch) | |
tree | a8fb046c3abbc7c0e07147c21557a3e22504dbda /mail/mail-ops.c | |
parent | 83f816df158441ca750b0bc12b7ccab2d43c0e43 (diff) | |
download | gsoc2013-evolution-f9804e11931411358ce98ad5a7726de6d68f2115.tar.gz gsoc2013-evolution-f9804e11931411358ce98ad5a7726de6d68f2115.tar.zst gsoc2013-evolution-f9804e11931411358ce98ad5a7726de6d68f2115.zip |
Commented out stuff that doesn't build yet. Also fixed idl build rule.
2002-11-13 Not Zed <NotZed@Ximian.com>
* Makefile.am: Commented out stuff that doesn't build yet. Also
fixed idl build rule. importers still not built.
* main.c (main): bonobactivationise. remove push visual/colormap.
(main): no longer activate activation, let bonobo_init do it.
* mail-signature-editor.c (menu_help): Change help api.
* mail-session.c (user_message_destroy_noreply): removed. Not
used?
* mail-local.c (load_metainfo): xml root->children.
* mail-format.c (g_string_append_len): Removed, it exists now.
2002-11-12 Not Zed <NotZed@Ximian.com>
* subscribe-dialog.c: gnome2ised, use gtkdialog.
(subscribe_get_global_extras): use a weak ref rather than destroy signal.
* message-tag-followup.c: gnome2ised.
* message-tag-editor.c: gnome2ised & converted to gtkdialog.
* message-list.c: gnome2ised.
(message_list_finalise): From destroy method. maybe should be
destroy still.
* message-browser.c: port to gnome2
(message_browser_finalise): renamed from destroy method.
* mail-stream-gtkhtml.c: removed redundant
camel_class_get_global_classfuncs() call.
* mail-signature-editor.c: gtkdialogised, & bonobo api changes.
* mail-search-dialogue.c: gtkdialogised.
* mail-folder-cache.c: cleaned up camel ref/hook casts.
* mail-composer-prefs.c (mail_composer_prefs_get_type): convert to
gtype.
* mail-font-prefs.c (mail_font_prefs_destroy): from finalise.
* mail-config.c: s/bonobo_config/e_config_listener/
Added /apps/Evolution prefix to the evolution keys.
Changed to use e_config_listener, etc.
(mail_config_init): remove bonobo_config stuff.
(mail_config_check_service): gtk dialogise.
(check_response): from check_cancelled.
* mail-config-druid.c (mail_config_druid_destroy): renamed from
_finalize, turned into destroy handler.
(construct): set type to toplevel, GTK_WINDOW_DIALOG no longer exists.
* mail-config-factory.c (mail_config_register_factory): bonobo api
changes.
* mail-crypto.c (mail_crypto_get_pgp_cipher_context): cleaned up
unref casts.
* mail-display.c (write_data_to_file): gnome->gtkdialog.
(on_link_clicked): use ascii_str*cmp on url.
(save_part): g_path stuff.
(launch_cb): gtk dialog.
(pixmap_press): de-oafify.
(pixbuf_for_mime_type): gnome-vfs api changes.
(do_attachment_header): Change the pixmap to a gtkimage.
(do_signature): "
(pixbuf_gen_idle): "
(do_attachment_header): ascii_str*cmp
(do_attachment_header): gnome pixmap->gtkimage.
(mail_display_destroy): protect against gtk mentalness.
(html_button_press_event): ascii_str*cmp
(drag_data_get_cb): added comment for translators of filename.
* mail-format.c (component_supports): de-oafise.
(is_anonymous): ascii_strncmp
(attachment_header): remove utf8<>locale stuff, and gnomevfs api
changes.
(format_mime_part): fix g_strdown call.
(write_field_row_begin): kill utf8->gtk stuff.
(write_address): "
(default_header_index): ascii_strcasecmp
(handle_text_plain): "
(handle_text_enriched): "
(handle_multipart_encrypted): remove utf/gtk stuff.
(handle_message_external_body): ascii_str*cmp
* mail-identify.c (mail_identify_mime_part):
(identify_by_magic): gnome vfs api changes.
* mail-importer.c: Converted.
* mail-local.c (load_metainfo): xml childs -> children.
(mls_get_folder): g_strerror.
(mls_delete_folder): g_strerror.
(reconfigure_got_folder): Gnome->GtkDialog
(reconfigure_response): from reconfigure_clicked.
* mail-mt.c (mail_msg_check_error): gnome -> gtk dialog
(error_response): renmae from error_gone. destroy widget on any
response.
* mail-offline-handler.c (impl_finalise): renamed from
impl_destroy since thats what it should be anyway.
* mail-ops.c: removed utf8 widget conversion & camel_object_un/ref
casts.
* mail-preferences.c (mail_preferences_get_type): glib2'ised.
* mail-search.c (mail_search_finalise): renmaed from destroy &
properly chain.
(mail_search_get_type): glib2 & make gtkdialog parent.
(entry_run_search): run search when entry activated. not sure if
gtkdialog has anohter way to do this on an arbitrary widget.
* mail-send-recv.c (dialogue_response): renamed from clicked. Use
gtkdialog.
* mail-session.c (request_password_deleted): removed, redundant.
(pass_response): rename from pass_got, changed for gtkdialog.
(user_message_destroy): Removed, redundant.
(user_message_response): Renamed from user_message_clicked.
2002-11-11 Not Zed <NotZed@Ximian.com>
* mail-stream-gtkhtml.c (mail_stream_gtkhtml_class_init): dont use
get_global_classfuncs, just get the type
* mail-tools.c: converted gnome2 api's.
* mail-vfolder.c (vfolder_editor_response): clicked->response.
(vfolder_editor_destroy): Removed.
(vfolder_edit): gtk dialog api
(edit_rule_response): clicked->response.
(vfolder_edit_rule): gnomedialog->gtkdialog.
(vfolder_gui_add_rule): "
(new_rule_clicked): clicked->response
svn path=/trunk/; revision=18723
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 132 |
1 files changed, 63 insertions, 69 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index f00a25f555..726474345d 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -29,12 +29,12 @@ #endif /* #include <ctype.h> */ +#include <string.h> #include <errno.h> #include <libgnome/gnome-defs.h> #include <libgnome/gnome-exec.h> #include <gal/util/e-util.h> #include <gal/widgets/e-unicode.h> -#include <gal/util/e-unicode-i18n.h> #include <camel/camel-mime-filter-from.h> #include <camel/camel-operation.h> #include <camel/camel-vtrash-folder.h> @@ -137,7 +137,7 @@ filter_folder_filter (struct _mail_msg *mm) /* this may thaw/unref source folders, do it here so we dont do it in the main thread see also fetch_mail_fetch() below */ - camel_object_unref(CAMEL_OBJECT(m->driver)); + camel_object_unref(m->driver); m->driver = NULL; if (m->cancel) @@ -156,7 +156,7 @@ filter_folder_free (struct _mail_msg *mm) int i; if (m->source_folder) - camel_object_unref (CAMEL_OBJECT (m->source_folder)); + camel_object_unref (m->source_folder); if (m->source_uids) { for (i = 0; i < m->source_uids->len; i++) @@ -169,10 +169,10 @@ filter_folder_free (struct _mail_msg *mm) camel_operation_unref (m->cancel); if (m->destination) - camel_object_unref (CAMEL_OBJECT (m->destination)); + camel_object_unref (m->destination); if (m->driver) - camel_object_unref (CAMEL_OBJECT (m->driver)); + camel_object_unref (m->driver); mail_session_flush_filter_log (); } @@ -193,7 +193,7 @@ mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids, m = mail_msg_new (&filter_folder_op, NULL, sizeof (*m)); m->source_folder = source_folder; - camel_object_ref (CAMEL_OBJECT (source_folder)); + camel_object_ref (source_folder); m->source_uids = uids; m->cache = NULL; m->delete = FALSE; @@ -356,7 +356,7 @@ fetch_mail_fetch (struct _mail_msg *mm) /* we unref the source folder here since we may now block in finalize (we try to disconnect cleanly) */ - camel_object_unref (CAMEL_OBJECT (fm->source_folder)); + camel_object_unref (fm->source_folder); fm->source_folder = NULL; } } @@ -368,7 +368,7 @@ fetch_mail_fetch (struct _mail_msg *mm) folders and whatnot) before we are really done */ /* should this be cancellable too? (i.e. above unregister above) */ if (fm->driver) { - camel_object_unref (CAMEL_OBJECT (fm->driver)); + camel_object_unref (fm->driver); fm->driver = NULL; } } @@ -525,13 +525,13 @@ mail_send_message (CamelMimeMessage *message, const char *destination, } camel_transport_send_to (xport, message, from, recipients, ex); - camel_object_unref (CAMEL_OBJECT (recipients)); - camel_object_unref (CAMEL_OBJECT (from)); + camel_object_unref (recipients); + camel_object_unref (from); mail_tool_restore_xevolution_headers (message, xev); mail_tool_destroy_xevolution (xev); - camel_object_unref (CAMEL_OBJECT (xport)); + camel_object_unref (xport); if (camel_exception_is_set (ex)) { g_free (sent_folder_uri); return; @@ -564,11 +564,11 @@ mail_send_message (CamelMimeMessage *message, const char *destination, g_free (sent_folder_uri); if (!folder) { /* FIXME */ - camel_object_ref (CAMEL_OBJECT (sent_folder)); + camel_object_ref (sent_folder); folder = sent_folder; } } else { - camel_object_ref (CAMEL_OBJECT (sent_folder)); + camel_object_ref (sent_folder); folder = sent_folder; } @@ -583,7 +583,7 @@ mail_send_message (CamelMimeMessage *message, const char *destination, } camel_folder_sync (folder, FALSE, NULL); - camel_object_unref (CAMEL_OBJECT (folder)); + camel_object_unref (folder); } camel_message_info_free (info); @@ -606,19 +606,13 @@ static char * send_mail_desc (struct _mail_msg *mm, int done) { struct _send_mail_msg *m = (struct _send_mail_msg *)mm; - char *subject; - const char *subject_utf8; + const char *subject; - subject_utf8 = camel_mime_message_get_subject (m->message); + subject = camel_mime_message_get_subject (m->message); - if (subject_utf8) { - char *desc; - - subject = e_utf8_to_locale_string (subject_utf8); - desc = g_strdup_printf (_("Sending \"%s\""), subject); - g_free (subject); - return desc; - } else + if (subject) + return g_strdup_printf (_("Sending \"%s\""), subject); + else return g_strdup (_("Sending message")); } @@ -644,8 +638,8 @@ send_mail_free (struct _mail_msg *mm) { struct _send_mail_msg *m = (struct _send_mail_msg *)mm; - camel_object_unref (CAMEL_OBJECT (m->driver)); - camel_object_unref (CAMEL_OBJECT (m->message)); + camel_object_unref (m->driver); + camel_object_unref (m->message); g_free (m->destination); } @@ -667,7 +661,7 @@ mail_send_mail (const char *uri, CamelMimeMessage *message, m = mail_msg_new (&send_mail_op, NULL, sizeof (*m)); m->destination = g_strdup (uri); m->message = message; - camel_object_ref (CAMEL_OBJECT (message)); + camel_object_ref (message); m->data = data; m->done = done; @@ -790,8 +784,8 @@ send_queue_free(struct _mail_msg *mm) struct _send_queue_msg *m = (struct _send_queue_msg *)mm; if (m->driver) - camel_object_unref((CamelObject *)m->driver); - camel_object_unref((CamelObject *)m->queue); + camel_object_unref(m->driver); + camel_object_unref(m->queue); g_free(m->destination); if (m->cancel) camel_operation_unref(m->cancel); @@ -816,7 +810,7 @@ mail_send_queue(CamelFolder *queue, const char *destination, m = mail_msg_new(&send_queue_op, NULL, sizeof(*m)); m->queue = queue; - camel_object_ref((CamelObject *)queue); + camel_object_ref(queue); m->destination = g_strdup(destination); if (cancel) { m->cancel = cancel; @@ -876,8 +870,8 @@ append_mail_free (struct _mail_msg *mm) { struct _append_msg *m = (struct _append_msg *)mm; - camel_object_unref((CamelObject *)m->message); - camel_object_unref((CamelObject *)m->folder); + camel_object_unref(m->message); + camel_object_unref(m->folder); g_free (m->appended_uid); } @@ -900,9 +894,9 @@ mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageIn m = mail_msg_new (&append_mail_op, NULL, sizeof (*m)); m->folder = folder; - camel_object_ref (CAMEL_OBJECT (folder)); + camel_object_ref(folder); m->message = message; - camel_object_ref (CAMEL_OBJECT (message)); + camel_object_ref(message); m->info = info; m->done = done; @@ -947,7 +941,7 @@ transfer_messages_transfer (struct _mail_msg *mm) return; if (dest == m->source) { - camel_object_unref((CamelObject *)dest); + camel_object_unref(dest); /* no-op */ return; } @@ -970,7 +964,7 @@ transfer_messages_transfer (struct _mail_msg *mm) camel_folder_thaw (m->source); camel_folder_thaw (dest); camel_folder_sync (dest, FALSE, NULL); - camel_object_unref (CAMEL_OBJECT (dest)); + camel_object_unref (dest); } static void @@ -988,7 +982,7 @@ transfer_messages_free (struct _mail_msg *mm) struct _transfer_msg *m = (struct _transfer_msg *)mm; int i; - camel_object_unref (CAMEL_OBJECT (m->source)); + camel_object_unref (m->source); g_free (m->dest_uri); for (i = 0; i < m->uids->len; i++) g_free (m->uids->pdata[i]); @@ -1019,7 +1013,7 @@ mail_transfer_messages (CamelFolder *source, GPtrArray *uids, m = mail_msg_new(&transfer_messages_op, NULL, sizeof(*m)); m->source = source; - camel_object_ref (CAMEL_OBJECT (source)); + camel_object_ref (source); m->uids = uids; m->delete = delete_from_source; m->dest_uri = g_strdup (dest_uri); @@ -1098,7 +1092,7 @@ add_vtrash_info (CamelStore *store, CamelFolderInfo *info) } /* Fill in the new fields */ - vtrash->full_name = g_strdup (U_("Trash")); + vtrash->full_name = g_strdup (_("Trash")); vtrash->name = g_strdup(vtrash->full_name); vtrash->url = g_strdup_printf ("vtrash:%s", uri); vtrash->unread_message_count = -1; @@ -1112,7 +1106,7 @@ add_unmatched_info(CamelFolderInfo *fi) for (; fi; fi = fi->sibling) { if (!strcmp(fi->full_name, CAMEL_UNMATCHED_NAME)) { g_free(fi->name); - fi->name = g_strdup(U_("Unmatched")); + fi->name = g_strdup(_("Unmatched")); g_free(fi->path); fi->path = g_strdup_printf("/%s", fi->name); break; @@ -1165,7 +1159,7 @@ get_folderinfo_free (struct _mail_msg *mm) if (m->info) camel_store_free_folder_info(m->store, m->info); - camel_object_unref((CamelObject *)m->store); + camel_object_unref(m->store); } static struct _mail_msg_op get_folderinfo_op = { @@ -1183,7 +1177,7 @@ mail_get_folderinfo (CamelStore *store, void (*done)(CamelStore *store, CamelFol m = mail_msg_new(&get_folderinfo_op, NULL, sizeof(*m)); m->store = store; - camel_object_ref((CamelObject *)store); + camel_object_ref(store); m->done = done; m->data = data; id = m->msg.seq; @@ -1225,11 +1219,11 @@ do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, for (i=0;i<messages->len;i++) { part = mail_tool_make_message_attachment(messages->pdata[i]); camel_multipart_add_part(multipart, part); - camel_object_unref((CamelObject *)part); + camel_object_unref(part); } part = camel_mime_part_new(); camel_medium_set_content_object(CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER(multipart)); - camel_object_unref((CamelObject *)multipart); + camel_object_unref(multipart); camel_mime_part_set_description(part, _("Forwarded messages")); } @@ -1237,7 +1231,7 @@ do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, subject = mail_tool_generate_forward_subject(messages->pdata[0]); d->done(folder, messages, part, subject, d->data); g_free(subject); - camel_object_unref((CamelObject *)part); + camel_object_unref(part); g_free(d); } @@ -1301,7 +1295,7 @@ get_folder_free (struct _mail_msg *mm) g_free (m->uri); if (m->folder) - camel_object_unref (CAMEL_OBJECT (m->folder)); + camel_object_unref (m->folder); } static struct _mail_msg_op get_folder_op = { @@ -1377,7 +1371,7 @@ get_store_free (struct _mail_msg *mm) g_free (m->uri); if (m->store) - camel_object_unref (CAMEL_OBJECT (m->store)); + camel_object_unref (m->store); } static struct _mail_msg_op get_store_op = { @@ -1455,7 +1449,7 @@ remove_folder_get (struct _mail_msg *mm) /* Then delete the folder from the store */ camel_store_delete_folder (store, folder->full_name, &mm->ex); m->removed = !camel_exception_is_set (&mm->ex); - camel_object_unref (CAMEL_OBJECT (folder)); + camel_object_unref (folder); } static void @@ -1553,7 +1547,7 @@ mail_sync_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *d m = mail_msg_new(&sync_folder_op, NULL, sizeof(*m)); m->folder = folder; - camel_object_ref((CamelObject *)folder); + camel_object_ref(folder); m->data = data; m->done = done; @@ -1589,7 +1583,7 @@ mail_refresh_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void m = mail_msg_new(&refresh_folder_op, NULL, sizeof(*m)); m->folder = folder; - camel_object_ref((CamelObject *)folder); + camel_object_ref(folder); m->data = data; m->done = done; @@ -1625,7 +1619,7 @@ mail_expunge_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void m = mail_msg_new(&expunge_folder_op, NULL, sizeof(*m)); m->folder = folder; - camel_object_ref((CamelObject *)folder); + camel_object_ref(folder); m->data = data; m->done = done; @@ -1695,7 +1689,7 @@ mail_get_message(CamelFolder *folder, const char *uid, void (*done) (CamelFolder m = mail_msg_new(&get_message_op, NULL, sizeof(*m)); m->folder = folder; - camel_object_ref((CamelObject *)folder); + camel_object_ref(folder); m->uid = g_strdup(uid); m->data = data; m->done = done; @@ -1760,10 +1754,10 @@ static void get_messages_free(struct _mail_msg *mm) g_ptr_array_free(m->uids, TRUE); for (i=0;i<m->messages->len;i++) { if (m->messages->pdata[i]) - camel_object_unref((CamelObject *)m->messages->pdata[i]); + camel_object_unref(m->messages->pdata[i]); } g_ptr_array_free(m->messages, TRUE); - camel_object_unref((CamelObject *)m->folder); + camel_object_unref(m->folder); } static struct _mail_msg_op get_messages_op = { @@ -1782,7 +1776,7 @@ mail_get_messages(CamelFolder *folder, GPtrArray *uids, m = mail_msg_new(&get_messages_op, NULL, sizeof(*m)); m->folder = folder; - camel_object_ref((CamelObject *)folder); + camel_object_ref(folder); m->uids = uids; m->messages = g_ptr_array_new(); m->data = data; @@ -1927,7 +1921,7 @@ save_messages_save (struct _mail_msg *mm) from_filter = camel_mime_filter_from_new(); filtered_stream = camel_stream_filter_new_with_stream(stream); camel_stream_filter_add(filtered_stream, (CamelMimeFilter *)from_filter); - camel_object_unref((CamelObject *)from_filter); + camel_object_unref(from_filter); for (i=0; i<m->uids->len; i++) { CamelMimeMessage *message; @@ -1953,11 +1947,11 @@ save_messages_save (struct _mail_msg *mm) break; } g_free(from); - camel_object_unref((CamelObject *)message); + camel_object_unref(message); } - camel_object_unref((CamelObject *)filtered_stream); - camel_object_unref((CamelObject *)stream); + camel_object_unref(filtered_stream); + camel_object_unref(stream); } static void save_messages_saved(struct _mail_msg *mm) @@ -1976,7 +1970,7 @@ static void save_messages_free(struct _mail_msg *mm) for (i=0;i<m->uids->len;i++) g_free(m->uids->pdata[i]); g_ptr_array_free(m->uids, TRUE); - camel_object_unref((CamelObject *)m->folder); + camel_object_unref(m->folder); g_free(m->path); } @@ -1996,7 +1990,7 @@ mail_save_messages(CamelFolder *folder, GPtrArray *uids, const char *path, m = mail_msg_new(&save_messages_op, NULL, sizeof(*m)); m->folder = folder; - camel_object_ref((CamelObject *)folder); + camel_object_ref(folder); m->uids = uids; m->path = g_strdup(path); m->data = data; @@ -2059,7 +2053,7 @@ save_part_save (struct _mail_msg *mm) camel_object_unref (CAMEL_OBJECT (stream_fs)); if (charsetfilter) { camel_stream_filter_add (CAMEL_STREAM_FILTER (filtered_stream), CAMEL_MIME_FILTER (charsetfilter)); - camel_object_unref (CAMEL_OBJECT (charsetfilter)); + camel_object_unref (charsetfilter); } } else { filtered_stream = stream_fs; @@ -2071,7 +2065,7 @@ save_part_save (struct _mail_msg *mm) _("Could not write data: %s"), g_strerror (errno)); - camel_object_unref (CAMEL_OBJECT (filtered_stream)); + camel_object_unref (filtered_stream); } static void @@ -2088,7 +2082,7 @@ save_part_free (struct _mail_msg *mm) { struct _save_part_msg *m = (struct _save_part_msg *)mm; - camel_object_unref (CAMEL_OBJECT (m->part)); + camel_object_unref (m->part); g_free (m->path); } @@ -2108,7 +2102,7 @@ mail_save_part (CamelMimePart *part, const char *path, m = mail_msg_new (&save_part_op, NULL, sizeof (*m)); m->part = part; - camel_object_ref (CAMEL_OBJECT (part)); + camel_object_ref (part); m->path = g_strdup (path); m->data = data; m->done = done; @@ -2149,7 +2143,7 @@ static void prep_offline_do(struct _mail_msg *mm) /* prepare_for_offline should do this? */ /* of course it should all be atomic, but ... */ camel_folder_sync(folder, FALSE, NULL); - camel_object_unref((CamelObject *)folder); + camel_object_unref(folder); } if (m->cancel) @@ -2257,7 +2251,7 @@ static void set_offline_free(struct _mail_msg *mm) { struct _set_offline_msg *m = (struct _set_offline_msg *)mm; - camel_object_unref((CamelObject *)m->store); + camel_object_unref(m->store); } static struct _mail_msg_op set_offline_op = { @@ -2282,7 +2276,7 @@ mail_store_set_offline (CamelStore *store, gboolean offline, m = mail_msg_new(&set_offline_op, NULL, sizeof(*m)); m->store = store; - camel_object_ref((CamelObject *)store); + camel_object_ref(store); m->offline = offline; m->data = data; m->done = done; |