Changeset 1747

Show
Ignore:
Timestamp:
03/25/07 14:42:30
Author:
pvanhoof
Message:

Bugfixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libtinymailui-gtk/tny-gtk-header-list-model.c

    r1746 r1747  
    100100        if (i >= list_model->items->len) { 
    101101                g_static_rec_mutex_unlock (list_model->iterator_lock); 
    102                 g_mutex_unlock (list_model->folder_lock); 
    103102                return FALSE; 
    104103        } 
     
    236235                g_warning ("GtkTreeModel in invalid state\n"); 
    237236                g_static_rec_mutex_unlock (list_model->iterator_lock); 
    238                 g_mutex_unlock (list_model->folder_lock); 
    239237                return; 
    240238        } 
     
    439437        GtkTreePath *path; 
    440438        notify_views_data_t *stuff; 
     439        static int delayer = 0; 
    441440 
    442441        g_static_rec_mutex_lock (me->iterator_lock); 
    443442 
    444         stuff = g_slice_new (notify_views_data_t); 
    445         stuff->self = g_object_ref (G_OBJECT (self)); 
    446         stuff->path = gtk_tree_path_new (); 
    447         gtk_tree_path_append_index (stuff->path, 0); 
    448         stuff->iter.stamp = me->stamp; 
     443        if (delayer == 100) 
     444        { 
     445                stuff = g_slice_new (notify_views_data_t); 
     446                stuff->self = g_object_ref (G_OBJECT (self)); 
     447                stuff->path = gtk_tree_path_new (); 
     448                gtk_tree_path_append_index (stuff->path, 0); 
     449                stuff->iter.stamp = me->stamp; 
     450        } 
    449451 
    450452        /* Prepend something to the list */ 
     
    457459         * thread. Else wouldn't the GtkTreeViews like this. */ 
    458460 
    459         if (stuff->path) 
    460                 g_timeout_add (0, notify_views, stuff); 
    461         else { 
    462                 g_object_unref (G_OBJECT (stuff->self)); 
    463                 g_slice_free (notify_views_data_t, stuff); 
    464         } 
     461        if (delayer == 100) 
     462        { 
     463                if (stuff->path) 
     464                        g_timeout_add (0, notify_views, stuff); 
     465                else { 
     466                        g_object_unref (G_OBJECT (stuff->self)); 
     467                        g_slice_free (notify_views_data_t, stuff); 
     468                } 
     469                delayer = 0; 
     470        } 
     471 
     472        delayer++; 
    465473 
    466474        g_static_rec_mutex_unlock (me->iterator_lock);