Changeset 1747
- Timestamp:
- 03/25/07 14:42:30
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libtinymailui-gtk/tny-gtk-header-list-model.c
r1746 r1747 100 100 if (i >= list_model->items->len) { 101 101 g_static_rec_mutex_unlock (list_model->iterator_lock); 102 g_mutex_unlock (list_model->folder_lock);103 102 return FALSE; 104 103 } … … 236 235 g_warning ("GtkTreeModel in invalid state\n"); 237 236 g_static_rec_mutex_unlock (list_model->iterator_lock); 238 g_mutex_unlock (list_model->folder_lock);239 237 return; 240 238 } … … 439 437 GtkTreePath *path; 440 438 notify_views_data_t *stuff; 439 static int delayer = 0; 441 440 442 441 g_static_rec_mutex_lock (me->iterator_lock); 443 442 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 } 449 451 450 452 /* Prepend something to the list */ … … 457 459 * thread. Else wouldn't the GtkTreeViews like this. */ 458 460 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++; 465 473 466 474 g_static_rec_mutex_unlock (me->iterator_lock);
