Changeset 3821

Show
Ignore:
Timestamp:
11/21/08 16:25:09
Author:
mbonnin
Message:

revert last commit, we want this to be fixed a better way

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r3820 r3821  
     12008-11-21  Martin Bonnin  <martinbonnin@gmail.com> 
     2  
     3        * revert last changeset: 
     4        We want this to be fixed a better way 
     5 
    162008-11-20  Martin Bonnin  <martinbonnin@gmail.com> 
    27  
  • trunk/libtinymail-camel/camel-lite/camel/camel-operation.c

    r3820 r3821  
    4444#endif 
    4545#define CAMEL_OPERATION_TRANSIENT (1<<1) 
    46 #define CAMEL_OPERATION_MUTE      (1<<2) 
    4746 
    4847/* Delay before a transient operation has any effect on the status */ 
     
    113112} 
    114113 
    115 static void 
    116 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  
    145114/** 
    146115 * camel_operation_mute: 
    147116 * @cc: 
    148117 * 
    149  * mutes a camel operation. from this point on you will never 
     118 * mutes a camel operation permanently. from this point on you will never 
    150119 * receive operation updates, even if more are sent. 
    151120 **/ 
     
    153122camel_operation_mute(CamelOperation *cc) 
    154123{ 
    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(); 
    169128} 
    170129 
     
    619578 
    620579        s = cc->status_stack->data; 
    621  
    622         if( s->flags & CAMEL_OPERATION_MUTE ){ 
    623                 UNLOCK(); 
    624                 return; 
    625         } 
    626  
    627580        s->sofar = sofar; 
    628581        s->oftotal = oftotal; 
  • trunk/libtinymail-camel/camel-lite/camel/camel-operation.h

    r3820 r3821  
    8282CamelOperation *camel_operation_new(CamelOperationStatusFunc status, void *status_data); 
    8383void camel_operation_mute(CamelOperation *cc); 
    84 void camel_operation_unmute(CamelOperation *cc); 
    8584void camel_operation_ref(CamelOperation *cc); 
    8685void camel_operation_unref(CamelOperation *cc); 
  • trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c

    r3820 r3821  
    32853285 
    32863286   camel_operation_start (NULL, _("Fetching summary information for new messages in folder")); 
    3287    camel_operation_mute (NULL); 
    32883287 
    32893288   camel_folder_summary_prepare_hash (folder->summary); 
     
    35533552 
    35543553                                  allhdrs++; 
    3555  
    3556                                   camel_operation_unmute (NULL); 
    35573554                                  camel_operation_progress (NULL, allhdrs , ineed); 
    3558                                   camel_operation_mute (NULL); 
    3559  
    35603555                                  sequence = GPOINTER_TO_INT (g_datalist_get_data (&data, "SEQUENCE")); 
    35613556                                  curlen = camel_folder_summary_count (folder->summary);