/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * Authors: Jeffrey Stedfast * * Copyright 2001 Ximian, Inc. (www.ximian.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. * */ #include #include "camel-exception.h" #include "camel-vtrash-folder.h" #include "camel-store.h" #include "camel-vee-store.h" #include "camel-mime-message.h" #include static CamelVeeFolderClass *camel_vtrash_folder_parent; static void vtrash_append_message (CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *info, CamelException *ex); static void vtrash_copy_messages_to (CamelFolder *folder, GPtrArray *uids, CamelFolder *dest, CamelException *ex); static void vtrash_move_messages_to (CamelFolder *folder, GPtrArray *uids, CamelFolder *dest, CamelException *ex); static void camel_vtrash_folder_class_init (CamelVTrashFolderClass *klass) { CamelFolderClass *folder_class = (CamelFolderClass *) klass; camel_vtrash_folder_parent = CAMEL_VEE_FOLDER_CLASS (camel_type_get_global_classfuncs (camel_folder_get_type ())); folder_class->append_message = vtrash_append_message; folder_class->copy_messages_to = vtrash_copy_messages_to; folder_class->move_messages_to = vtrash_move_messages_to; } CamelType camel_vtrash_folder_get_type (void) { static CamelType type = CAMEL_INVALID_TYPE; if (type == CAMEL_INVALID_TYPE) { type = camel_type_register (camel_vee_folder_get_type (), "CamelVTrashFolder", sizeof (CamelVTrashFolder), sizeof (CamelVTrashFolderClass), (CamelObjectClassInitFunc) camel_vtrash_folder_class_init, NULL, NULL, NULL); } return type; } /** * camel_vee_folder_new: * @parent_store: the parent CamelVeeStore * @name: the vfolder name * @ex: a CamelException * * Create a new CamelVeeFolder object. * * Return value: A new CamelVeeFolder widget. **/ CamelFolder * camel_vtrash_folder_new (CamelStore *parent_store, const char *name) { CamelFolder *vtrash; vtrash = (CamelFolder *)camel_object_new (camel_vtrash_folder_get_type ()); camel_vee_folder_construct (CAMEL_VEE_FOLDER (vtrash), parent_store, name, CAMEL_STORE_FOLDER_PRIVATE | CAMEL_STORE_FOLDER_CREATE | CAMEL_STORE_VEE_FOLDER_AUTO); camel_vee_folder_set_expression((CamelVeeFolder *)vtrash, "(match-all (system-flag \"Deleted\"))"); return vtrash; } static void vtrash_append_message (CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *info, CamelException *ex) { /* no-op */ } static void vtrash_copy_messages_to (CamelFolder *source, GPtrArray *uids, CamelFolder *dest, CamelException *ex) { /* don't allow the user to copy to or from the vtrash folder */ camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("You cannot copy messages from this trash folder.")); } static void vtrash_move_messages_to (CamelFolder *source, GPtrArray *uids, CamelFolder *dest, CamelException *ex) { CamelVeeMessageInfo *mi; int i; for (i = 0; i < uids->len; i++) { mi = (CamelVeeMessageInfo *)camel_folder_get_message_info (source, uids->pdata[i]); if (mi == NULL) { g_warning ("Cannot find uid %s in source folder during move_to", (char *) uids->pdata[i]); continue; } if (dest == mi->folder) { /* Just undelete the original message */ CAMEL_FOLDER_CLASS (dest)->set_message_flags (dest, uids->pdata[i], CAMEL_MESSAGE_DELETED, 0); } else { /* This means that the user is trying to move the message from the vTrash to a folder other than the original. */ GPtrArray *tuids; tuids = g_ptr_array_new (); g_ptr_array_add (tuids, uids->pdata[i]); camel_folder_move_messages_to (mi->folder, tuids, dest, ex); g_ptr_array_free (tuids, TRUE); } camel_folder_free_message_info (source, (CamelMessageInfo *)mi); } } son2002-06-252-6/+25 * pass NULL to e_contact_list_save_as. modality sucks. fixes broken build.Chris Toshok2002-06-182-4/+2 * pass NULL to e_contact_list_save_as. modality sucks. fixes broken build.Chris Toshok2002-06-181-0/+9 * [ fixes bug #26130 ] pass ce->app as parent_window.Chris Toshok2002-06-165-8/+37 * use ldap_unbind_ext. (create_card_handler): don't leak the new vcard.Chris Toshok2002-06-162-6/+22 * up the max threshold to 3000 cards from 1000 cards.. seems to improveChris Toshok2002-06-162-4/+13 * Made "" compare as not equal to "" for addresses. (use_common_book_cb):Christopher James Lahey2002-06-152-4/+14 * Don't enable fields if the editor isn't editable and theChristopher James Lahey2002-06-142-0/+11 * [ fixes bug #17332 ] we shouldn't ever return NULL here. in error cases weChris Toshok2002-06-122-1/+8 * Made double clicking on read only folders not do anything.Christopher James Lahey2002-06-122-8/+14 * Made expand_uri a bit more robust and readable.Christopher James Lahey2002-06-113-18/+33 * Call e_minicard_selected in the GDK_BUTTON_RELEASE case here.Christopher James Lahey2002-06-062-0/+14 * Commented out this unused function.Christopher James Lahey2002-06-043-3/+16 * Set the title of our GalVIewCollection.Christopher James Lahey2002-06-042-0/+7 * Changed some spacing and expanding behavior to make this dialog behaveAnna Marie Dirks2002-05-302-73/+89 * put this back in, accidentally got snipped with the hacking going on inChris Toshok2002-05-252-0/+7 * [ part of #25047 ] remove the autocompletion config control from here, asChris Toshok2002-05-243-105/+8 * [ #24189 ] ifdef out the body of this because it only works with a singleChris Toshok2002-05-249-72/+281 * fix parameter/local variable overloading.Chris Toshok2002-05-242-3/+8 * Fix typo in the ChangeLog.Ettore Perazzoli2002-05-221-1/+1 * Don't try to invoke e_book_get_uri() on NULL. Fixes #20069.Ettore Perazzoli2002-05-222-3/+8 * make sure we map status -> string correctly (add missing strings).Chris Toshok2002-05-214-2/+20 * Set the can_sync_offline property on the EFolder based on theEttore Perazzoli2002-05-212-2/+9 * New, quit handler for the EvolutionShellComponent. (add_creatable_item):Ettore Perazzoli2002-05-177-20/+133 * Check with e_shell_prepare_for_quit() before quitting.Ettore Perazzoli2002-05-162-1/+6 * Removed an incorrect comment here.Christopher James Lahey2002-05-142-2/+5 * Enable the dropdown widgets even if the contact is not editable so thatChristopher James Lahey2002-05-142-1/+8 * Added SimpleCard interface.Christopher James Lahey2002-05-116-12/+455 * Added "first_email" property.Christopher James Lahey2002-05-102-0/+26 * Pass %FALSE as @has_shared_folders to evolution_storage_new().Ettore Perazzoli2002-05-102-1/+7 * link against the libtool version of libversitJP Rosevear2002-05-082-1/+6 * oops, add the NULL back at the end of possible_types.Chris Toshok2002-05-082-1/+7 * bleah, need to pass the GtkWindow here so we can pop up the a modalChris Toshok2002-05-082-22/+48 * s/ldap_config/addressbook_config/ so this compiles again.Dan Winship2002-05-072-1/+6 * doh, remove >>>>>'sChris Toshok2002-05-041-1/+0 * finally remove the #if 0's and use the oaf query stuff to get backendsChris Toshok2002-05-042-2/+7 * Call evolution_config_control_changed when the EFolderList changes.Christopher James Lahey2002-05-042-0/+16 * Updated this to have the ConfigControlFactory have an addressbookwideChristopher James Lahey2002-05-048-36/+167 * Desensitize the to, cc, and bcc buttons if there's no selection here.Christopher James Lahey2002-05-032-0/+34 * Changed some of these to bind to the ContactListEditor verbs since they'reChristopher James Lahey2002-05-032-3/+9 * fixJP Rosevear2002-05-012-4/+7 * Added this function so that there would be less duplication of cardsChristopher James Lahey2002-05-014-61/+119 * Changed this to set a subject when sending a contact. This makes theChristopher James Lahey2002-05-012-1/+64 * ugh, missed one.Jeffrey Stedfast2002-04-271-1/+0 * oops, should have done a search to make sure I had gotten all of the libibexesJeffrey Stedfast2002-04-271-6/+0 * Don't link to libibex anymore.Jeffrey Stedfast2002-04-273-2/+4 * Don't link to libibex anymore.Jeffrey Stedfast2002-04-272-1/+2 * Don't link to libibex anymore.Jeffrey Stedfast2002-04-272-1/+4 * Unref the text_model here instead of the model, since the model never getsChristopher James Lahey2002-04-262-4/+10 * Updated this for the new e_table_memory_store_insert function prototype.Christopher James Lahey2002-04-252-20/+13 * Added a "Browse..." button to switch to a different addressbook folder.Christopher James Lahey2002-04-255-17/+112 * Coded handling of the select_entry to search within the displayedChristopher James Lahey2002-04-244-68/+99 * Updated this dialog to match the redesign.Christopher James Lahey2002-04-242-205/+264 * Make unused menu items disappear instead of graying out.Christopher James Lahey2002-04-242-1/+34 * Removed e_addressbook_reflow_adapter_right_click andChristopher James Lahey2002-04-248-691/+474 * Removed an unused variable here.Christopher James Lahey2002-04-233-2/+25 * Allow GDK_ACTION_COPY also, since the composer for example does not acceptJeffrey Stedfast2002-04-232-2/+8 * change order of scope option menu to match how it's stored.Chris Toshok2002-04-192-2/+7 * change ldap config control text so it fits in the config dialog.Chris Toshok2002-04-193-23/+105 * add LDAP_CFLAGS to INCLUDESChris Toshok2002-04-192-0/+5 * no more source->type.Chris Toshok2002-04-192-1/+6 * fill in source->ssl. (addressbook_source_dialog_set_source): set upChris Toshok2002-04-195-47/+74 * fix memory leaks.Chris Toshok2002-04-1913-1848/+7606 * Append /addressbook.db to the end of the default URI if it starts withDan Winship2002-04-193-3/+19 * Bumped required gal version number to 0.19.99.11.Christopher James Lahey2002-04-184-49/+65 * Include addressbook-config.h here as this file uses it.Christopher James Lahey2002-04-128-44/+196 * Update for new-and-improved consistent default folder uri.Dan Winship2002-04-103-64/+23 * Add view_info arg, but don't do anything with it.Dan Winship2002-04-092-0/+6 * add config_item:typeJP Rosevear2002-04-072-0/+10 * link to the static libversitJP Rosevear2002-04-052-1/+5 * Update for evolution_shell_client_user_select_folder API change.Dan Winship2002-04-052-16/+18 * Remove AddressbookConfig, ContactNew, ContactNewList EPixmap entries.Ettore Perazzoli2002-04-043-3/+13 * Fix spelling of E_CARD_SIMPLE_PHONE_ID_TTYTDD andDan Winship2002-04-024-7/+17 * ignore .pureChris Toshok2002-04-022-0/+2 * parent_class should be static. (From Max Horn <max@quendi.de>)Dan Winship2002-04-012-1/+6 * Add priority for the config page. Renamed to "Directory Servers".Ettore Perazzoli2002-03-302-2/+9 * don't free req->vcard. it's freed in pas_book_free_request.Chris Toshok2002-03-282-19/+12 * make sure to call ldap_value_free (values);, and ldap_msgfree (resp).Chris Toshok2002-03-282-12/+40 * Update for libversit change: Use .a rather than .la now.Dan Winship2002-03-204-10/+19 * [Search bar re-design implementation, Take 2.]Ettore Perazzoli2002-03-192-23/+16 * Update to use new EPopupMenu API.Jeffrey Stedfast2002-03-164-31/+44 * [Start implementing the new Search Bar design.]Ettore Perazzoli2002-03-163-2/+8 * Add an icon for the LDAP sources configuration control.Ettore Perazzoli2002-03-142-0/+8 * Remove verb "AddressbookConfig". (config_cb): Removed.Ettore Perazzoli2002-03-137-52/+171 * change contains x-evolution-any-field to beginswith on email, full_name,Chris Toshok2002-03-122-1/+11 * add TLSNotAvailable to BookLister_CallStatus.Chris Toshok2002-03-105-16/+86 * since I've gone ahead and made the file backend (by way ofChris Toshok2002-03-104-22/+53 * track union/struct change. (pas_book_queue_remove_card): same.Chris Toshok2002-03-085-713/+1136 * Update for evolution_storage_new() change.Dan Winship2002-03-082-1/+7 * don't set "editable" here, as the way things work the backend isn't ableChris Toshok2002-03-052-1/+7 * [fixes bug #20871] add the status-message label.Chris Toshok2002-03-053-1/+43 * don't ref the view here, since it keeps the view alive until the search isChris Toshok2002-03-012-4/+12 * i2002-02-26 Chris Toshok <toshok@ximian.com>Chris Toshok2002-03-012-2/+7 * [fixes bug #20690] the data arg is not GList** anymore, it'sChris Toshok2002-03-012-52/+86 * only handle the ESB_ADVANCED case here now. the actual query work is doneChris Toshok2002-02-252-2/+29 * make the right auth page start up open.Chris Toshok2002-02-253-1/+15 * [ Fixes bugs 20740, 16680, and god knows what else :) ] double theChris Toshok2002-02-234-49/+206 * Define $(iconsdir).Ettore Perazzoli2002-02-223-7/+48 * track change to signature, and (for now) just change all the returnChris Toshok2002-02-218-17/+59 * if the load_uri fails, notify the listener that the repository is offline.Chris Toshok2002-02-192-1/+24 * escape commas in the dn, since they're used by ldap to specify the node'sChris Toshok2002-02-192-7/+29 * Keep a ref of the model in this case as well.Christopher James Lahey2002-02-142-0/+7 * Make sure to only set the query once when creating a new book and not atChristopher James Lahey2002-02-143-24/+65 * Attach to the emvw instead of the emv here.Christopher James Lahey2002-02-146-39/+92 * Finishing commit that failed in the middle:Christopher James Lahey2002-02-1410-87/+357 * New functions that take a file:// url ending in the directory name andChristopher James Lahey2002-02-145-38/+211 * Attach the GalViewMinicard to the EMinicardView here.Christopher James Lahey2002-02-134-15/+103 * Added an argument to get the model.Christopher James Lahey2002-02-135-27/+105 * remove "New" from user creatable menu itemsJP Rosevear2002-02-082-2/+7 * Missed one.Chris Lahey2002-02-072-4/+7 * Bumped the required version of gal.Christopher James Lahey2002-02-072-155/+281 * tidyJP Rosevear2002-02-053-21/+178 * if the shown address in the mailing address or there is no mailingJP Rosevear2002-02-044-6/+134 * New function to find out if a destination was one which was auto-maticallyJeffrey Stedfast2002-02-023-273/+319 * Made this preserve addressbook flags other than the first three.Christopher James Lahey2002-02-025-1638/+100 * compute the change db filename based on our contact db filename.Chris Toshok2002-01-312-6/+25 * Revert my previous change as trow says this will break auto-completionJeffrey Stedfast2002-01-292-1/+7 * Final cleanup for the CFLAGS and LIBS in the Makefiles.Ettore Perazzoli2002-01-286-34/+16 * Don't check for an @ in the email address. This is to fix bug #10960.Jeffrey Stedfast2002-01-262-1/+11 * [ fixes bug 16097 ] gui love for the new auth stuff.Chris Toshok2002-01-262-10/+28 * [ fixes bug 16097 ] gui love for the new auth stuff.Chris Toshok2002-01-25