Changeset 3821
- Timestamp:
- 11/21/08 16:25:09
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/libtinymail-camel/camel-lite/camel/camel-operation.c (modified) (4 diffs)
- trunk/libtinymail-camel/camel-lite/camel/camel-operation.h (modified) (1 diff)
- trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r3820 r3821 1 2008-11-21 Martin Bonnin <martinbonnin@gmail.com> 2 3 * revert last changeset: 4 We want this to be fixed a better way 5 1 6 2008-11-20 Martin Bonnin <martinbonnin@gmail.com> 2 7 trunk/libtinymail-camel/camel-lite/camel/camel-operation.c
r3820 r3821 44 44 #endif 45 45 #define CAMEL_OPERATION_TRANSIENT (1<<1) 46 #define CAMEL_OPERATION_MUTE (1<<2)47 46 48 47 /* Delay before a transient operation has any effect on the status */ … … 113 112 } 114 113 115 static void116 co_mute(CamelOperation *cc, gboolean mute)117 {118 struct _status_stack *s;119 120 if (cc == NULL)121 cc = co_getcc();122 123 if (cc == NULL)124 return;125 126 LOCK();127 128 if (cc->status == NULL || cc->status_stack == NULL) {129 UNLOCK();130 return;131 }132 133 s = cc->status_stack->data;134 135 if (mute){136 s->flags |= CAMEL_OPERATION_MUTE;137 } else {138 s->flags &= ~CAMEL_OPERATION_MUTE;139 }140 141 UNLOCK();142 }143 144 145 114 /** 146 115 * camel_operation_mute: 147 116 * @cc: 148 117 * 149 * mutes a camel operation .from this point on you will never118 * mutes a camel operation permanently. from this point on you will never 150 119 * receive operation updates, even if more are sent. 151 120 **/ … … 153 122 camel_operation_mute(CamelOperation *cc) 154 123 { 155 co_mute(cc, TRUE); 156 } 157 158 /** 159 * camel_operation_unmute: 160 * @cc: 161 * 162 * unmutes a camel operation. 163 * Makes the operation send updates again 164 **/ 165 void 166 camel_operation_unmute(CamelOperation *cc) 167 { 168 co_mute(cc, FALSE); 124 LOCK(); 125 cc->status = NULL; 126 cc->status_data = NULL; 127 UNLOCK(); 169 128 } 170 129 … … 619 578 620 579 s = cc->status_stack->data; 621 622 if( s->flags & CAMEL_OPERATION_MUTE ){623 UNLOCK();624 return;625 }626 627 580 s->sofar = sofar; 628 581 s->oftotal = oftotal; trunk/libtinymail-camel/camel-lite/camel/camel-operation.h
r3820 r3821 82 82 CamelOperation *camel_operation_new(CamelOperationStatusFunc status, void *status_data); 83 83 void camel_operation_mute(CamelOperation *cc); 84 void camel_operation_unmute(CamelOperation *cc);85 84 void camel_operation_ref(CamelOperation *cc); 86 85 void camel_operation_unref(CamelOperation *cc); trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c
r3820 r3821 3285 3285 3286 3286 camel_operation_start (NULL, _("Fetching summary information for new messages in folder")); 3287 camel_operation_mute (NULL);3288 3287 3289 3288 camel_folder_summary_prepare_hash (folder->summary); … … 3553 3552 3554 3553 allhdrs++; 3555 3556 camel_operation_unmute (NULL);3557 3554 camel_operation_progress (NULL, allhdrs , ineed); 3558 camel_operation_mute (NULL);3559 3560 3555 sequence = GPOINTER_TO_INT (g_datalist_get_data (&data, "SEQUENCE")); 3561 3556 curlen = camel_folder_summary_count (folder->summary);
