Changeset 424
- Timestamp:
- 05/29/06 23:07:46
- Files:
-
- trunk/libtinymail-camel/tny-msg-folder-priv.h (modified) (1 diff)
- trunk/libtinymail-camel/tny-msg-folder.c (modified) (14 diffs)
- trunk/libtinymail-gnome-desktop/tny-device.c (modified) (1 diff)
- trunk/libtinymail/Makefile.am (modified) (2 diffs)
- trunk/libtinymail/tny-iterator-iface.c (added)
- trunk/libtinymail/tny-iterator-iface.h (added)
- trunk/libtinymail/tny-list-iface.c (added)
- trunk/libtinymail/tny-list-iface.h (added)
- trunk/libtinymail/tny-msg-folder-iface.c (modified) (2 diffs)
- trunk/libtinymail/tny-msg-folder-iface.h (modified) (3 diffs)
- trunk/libtinymail/tny-shared.h (modified) (1 diff)
- trunk/libtinymailui-gtk/Makefile.am (modified) (2 diffs)
- trunk/libtinymailui-gtk/tny-msg-header-list-iterator.c (added)
- trunk/libtinymailui-gtk/tny-msg-header-list-iterator.h (added)
- trunk/libtinymailui-gtk/tny-msg-header-list-model-priv.h (added)
- trunk/libtinymailui-gtk/tny-msg-header-list-model.c (modified) (16 diffs)
- trunk/libtinymailui-gtk/tny-msg-header-list-model.h (modified) (1 diff)
- trunk/tinymail/tny-summary-window.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libtinymail-camel/tny-msg-folder-priv.h
r243 r424 30 30 { 31 31 GMutex *cached_hdrs_lock; 32 GList*cached_hdrs;32 TnyListIface *cached_hdrs; 33 33 GPtrArray *cached_uids; 34 34 35 GType headers_list_type; 36 35 37 GMutex *cached_msgs_lock; 36 38 GHashTable *cached_msgs; trunk/libtinymail-camel/tny-msg-folder.c
r401 r424 31 31 #include <tny-store-account-iface.h> 32 32 #include <tny-store-account.h> 33 #include <tny-list-iface.h> 33 34 34 35 #include <camel/camel-folder.h> … … 57 58 typedef struct 58 59 { 59 GList*list;60 TnyListIface *list; 60 61 GFunc relaxed_func; 61 62 GMutex *lock; … … 71 72 g_mutex_lock (d->lock); 72 73 73 g_list_free (d->list); 74 printf ("removed proxy obj\n"); 75 g_object_unref (G_OBJECT (d->list)); 76 74 77 d->list = NULL; 75 78 g_free (d); … … 88 91 { 89 92 RelaxedData *d = data; 90 GList *list = d->list; 93 TnyListIface *list = d->list; 94 95 if (!list) 96 return FALSE; 97 98 TnyIteratorIface *iterator = tny_list_iface_create_iterator (list); 99 GList *toremove=NULL; 100 91 101 gint count = 0; 92 102 93 103 g_mutex_lock (d->lock); 94 104 95 while (G_LIKELY ((count < 5) && list)) 96 { 97 GList *element = list; 98 if (G_LIKELY (element && element->data)) 99 d->relaxed_func (element->data, d->priv); 100 list = g_list_remove_link (list, element); 101 g_list_free (element); 105 while (G_LIKELY ((count < 5) && tny_iterator_iface_has_next (iterator))) 106 { 107 gpointer item = tny_iterator_iface_next (iterator); 108 109 if (G_LIKELY (item)) 110 d->relaxed_func (item, d->priv); 111 112 toremove = g_list_prepend (toremove, item); 113 102 114 count++; 103 115 } 116 g_object_unref (G_OBJECT (iterator)); 117 118 while (toremove) 119 { printf ("rem\n"); 120 tny_list_iface_remove (list, toremove->data); 121 toremove = g_list_next (toremove); 122 } 123 printf ("-\n"); 124 104 125 105 126 d->list = list; … … 135 156 136 157 g_mutex_lock (priv->cached_hdrs_lock); 137 d->list = g_list_copy (priv->cached_hdrs);158 d->list = tny_list_iface_copy (priv->cached_hdrs); 138 159 g_mutex_unlock (priv->cached_hdrs_lock); 139 160 … … 415 436 g_mutex_lock (priv->cached_hdrs_lock); 416 437 417 priv->cached_hdrs = g_list_prepend (priv->cached_hdrs, header);438 tny_list_iface_prepend (priv->cached_hdrs, header); 418 439 priv->cached_length++; 419 440 /* TODO: If unread -- priv->unread_length++; */ … … 554 575 _tny_account_stop_camel_operation (TNY_ACCOUNT_IFACE (priv->account)); 555 576 556 g_list_foreach (priv->cached_hdrs, destroy_header, NULL); 557 g_list_free (priv->cached_hdrs); 577 if (priv->cached_hdrs) 578 { 579 tny_list_iface_foreach (priv->cached_hdrs, destroy_header, NULL); 580 g_object_unref (G_OBJECT (priv->cached_hdrs)); 581 } 558 582 priv->cached_hdrs = NULL; 559 583 … … 591 615 } 592 616 593 static const GList*617 static TnyListIface* 594 618 tny_msg_folder_get_headers (TnyMsgFolderIface *self, gboolean refresh) 595 619 { … … 597 621 598 622 g_mutex_lock (priv->folder_lock); 599 623 600 624 load_folder_no_lock (priv); 601 625 … … 604 628 if (G_UNLIKELY (!priv->cached_hdrs)) 605 629 { 630 606 631 GPtrArray *uids = NULL; 607 632 CamelException ex; … … 609 634 610 635 priv->cached_length = 0; 611 priv->cached_hdrs = NULL; 636 priv->cached_hdrs = g_object_new (priv->headers_list_type, NULL); 637 612 638 g_mutex_unlock (priv->cached_hdrs_lock); 613 639 … … 918 944 919 945 tny_msg_folder_hdr_cache_remover (priv); 946 priv->cached_hdrs = NULL; 920 947 921 948 g_mutex_lock (priv->cached_hdrs_lock); … … 978 1005 979 1006 1007 void 1008 tny_msg_folder_set_headers_list_type (TnyMsgFolderIface *self, GType type) 1009 { 1010 TnyMsgFolderPriv *priv = TNY_MSG_FOLDER_GET_PRIVATE (self); 1011 1012 if (priv->cached_hdrs) 1013 tny_msg_folder_hdr_cache_remover (priv); 1014 1015 priv->headers_list_type = type; 1016 return; 1017 } 1018 980 1019 static void 981 1020 tny_msg_folder_iface_init (gpointer g_iface, gpointer iface_data) … … 983 1022 TnyMsgFolderIfaceClass *klass = (TnyMsgFolderIfaceClass *)g_iface; 984 1023 1024 klass->set_headers_list_type_func = tny_msg_folder_set_headers_list_type; 985 1025 klass->get_headers_func = tny_msg_folder_get_headers; 986 1026 klass->get_message_func = tny_msg_folder_get_message; trunk/libtinymail-gnome-desktop/tny-device.c
r416 r424 75 75 nm_callback (libnm_glib_ctx *nm_ctx, gpointer user_data) 76 76 { 77 TnyDevice *self = (TnyDevice *)user_data;77 TnyDeviceIface *self = (TnyDeviceIface *)user_data; 78 78 79 79 if (tny_device_is_online (self)) 80 tny_device_on_online ( TNY_DEVICE_IFACE (self));80 tny_device_on_online (self); 81 81 else 82 tny_device_on_offline ( TNY_DEVICE_IFACE (self));82 tny_device_on_offline (self); 83 83 84 84 return; trunk/libtinymail/Makefile.am
r379 r424 5 5 libtinymail_1_0_headers = \ 6 6 tny-shared.h \ 7 tny-list-iface.h \ 8 tny-iterator-iface.h \ 7 9 tny-msg-folder-iface.h \ 8 10 tny-msg-mime-part-iface.h \ … … 19 21 libtinymail_1_0_la_SOURCES = \ 20 22 $(libtinymail_1_0_headers) \ 23 tny-list-iface.c \ 24 tny-iterator-iface.c \ 21 25 tny-msg-iface.c \ 22 26 tny-msg-header-iface.c \ trunk/libtinymail/tny-msg-folder-iface.c
r408 r424 26 26 27 27 /** 28 * tny_msg_folder_iface_set_headers_list_type: 29 * @self: a #TnyMsgHeaderIface object 30 * @type: the list-type 31 * 32 * Set which #TnyListIfaceClass type to use for the 33 * tny_msg_header_iface_get_headers return value 34 * 35 * If you use libtinymailui-gtk, you should probably 36 * set this to TNY_TYPE_MSG_HEADER_LIST_MODEL 37 * 38 **/ 39 void 40 tny_msg_folder_iface_set_headers_list_type (TnyMsgFolderIface *self, GType type) 41 { 42 TNY_MSG_FOLDER_IFACE_GET_CLASS (self)->set_headers_list_type_func (self, type); 43 return; 44 } 45 46 /** 28 47 * tny_msg_folder_iface_refresh_headers_async: 29 48 * @self: a TnyMsgFolderIface object … … 177 196 * Get a read-only list of message header instances that are in this folder 178 197 * 179 * Return value: A read-only GListwith TnyMsgHeaderIface instances180 **/ 181 const GList*198 * Return value: A #TnyListIface with TnyMsgHeaderIface instances 199 **/ 200 TnyListIface* 182 201 tny_msg_folder_iface_get_headers (TnyMsgFolderIface *self, gboolean refresh) 183 202 { trunk/libtinymail/tny-msg-folder-iface.h
r367 r424 27 27 #include <tny-msg-header-iface.h> 28 28 #include <tny-account-iface.h> 29 #include <tny-list-iface.h> 29 30 30 31 G_BEGIN_DECLS … … 70 71 const TnyMsgIface* 71 72 (*get_message_func) (TnyMsgFolderIface *self, const TnyMsgHeaderIface *header); 72 const GList* (*get_headers_func) (TnyMsgFolderIface *self, gboolean refresh); 73 74 void (*set_headers_list_type_func) (TnyMsgFolderIface *self, GType type); 75 76 TnyListIface* (*get_headers_func) (TnyMsgFolderIface *self, gboolean refresh); 73 77 74 78 const gchar* (*get_name_func) (TnyMsgFolderIface *self); … … 101 105 const TnyMsgIface* 102 106 tny_msg_folder_iface_get_message (TnyMsgFolderIface *self, const TnyMsgHeaderIface *header); 103 const GList* tny_msg_folder_iface_get_headers (TnyMsgFolderIface *self, gboolean refresh); 107 TnyListIface* tny_msg_folder_iface_get_headers (TnyMsgFolderIface *self, gboolean refresh); 108 109 void tny_msg_folder_iface_set_headers_list_type (TnyMsgFolderIface *self, GType type); 104 110 105 111 const TnyAccountIface* trunk/libtinymail/tny-shared.h
r411 r424 23 23 G_BEGIN_DECLS 24 24 25 typedef struct _TnyListIface TnyListIface; 26 typedef struct _TnyIteratorIface TnyIteratorIface; 27 typedef struct _TnyListIfaceClass TnyListIfaceClass; 28 typedef struct _TnyIteratorIfaceClass TnyIteratorIfaceClass; 25 29 typedef struct _TnyMsgIface TnyMsgIface; 26 30 typedef struct _TnyMsgIfaceClass TnyMsgIfaceClass; trunk/libtinymailui-gtk/Makefile.am
r379 r424 15 15 tny-msg-window.h \ 16 16 tny-msg-header-list-model.h \ 17 tny-msg-header-list-iterator.h \ 17 18 tny-account-tree-model.h \ 18 19 tny-attach-list-model.h \ … … 20 21 tny-msg-header-view.h 21 22 22 libtinymailui_gtk_1_0_la_SOURCES = \ 23 $(libtinymailui_gtk_1_0_headers)\ 24 tny-save-strategy.c \ 25 tny-msg-view.c \ 26 tny-msg-window.c \ 27 tny-msg-header-list-model.c \ 28 tny-account-tree-model.c \ 29 tny-attach-list-model-priv.h \ 30 tny-attach-list-model.c \ 31 tny-text-buffer-stream.c \ 23 libtinymailui_gtk_1_0_la_SOURCES = \ 24 $(libtinymailui_gtk_1_0_headers) \ 25 tny-save-strategy.c \ 26 tny-msg-view.c \ 27 tny-msg-window.c \ 28 tny-msg-header-list-model-priv.h \ 29 tny-msg-header-list-model.c \ 30 tny-msg-header-list-iterator.c \ 31 tny-account-tree-model.c \ 32 tny-attach-list-model-priv.h \ 33 tny-attach-list-model.c \ 34 tny-text-buffer-stream.c \ 32 35 tny-msg-header-view.c 33 36 trunk/libtinymailui-gtk/tny-msg-header-list-model.c
r417 r424 27 27 #include <tny-msg-folder-iface.h> 28 28 29 #include <tny-list-iface.h> 30 #include <tny-iterator-iface.h> 31 32 #include <tny-msg-header-list-iterator.h> 33 29 34 #define G_LIST(o) ((GList *) o) 30 35 31 36 static GObjectClass *parent_class; 32 37 33 struct _TnyMsgHeaderListModel 34 { 35 GObject parent; 36 37 GMutex *folder_lock; 38 TnyMsgFolderIface *folder; 39 gint length; 40 gint stamp; 41 42 guint last_nth; 43 GList *last_iter; 44 }; 45 46 struct _TnyMsgHeaderListModelClass 47 { 48 GObjectClass parent; 49 }; 50 51 52 static void 53 destroy_internal_list (TnyMsgHeaderListModel *self) 54 { 55 self->length = 0; 56 self->last_iter = NULL; 57 self->last_nth = 0; 58 59 return; 60 } 61 38 #include "tny-msg-header-list-model-priv.h" 62 39 63 40 static guint … … 126 103 { 127 104 TnyMsgHeaderListModel *list_model = TNY_MSG_HEADER_LIST_MODEL (self); 105 128 106 GList *list, *headers; 129 107 gint i; … … 141 119 } 142 120 143 if (list_model->last_iter) 144 { /* This is a little speed hack */ 145 if (list_model->last_nth != i) 146 list_model->last_iter = g_list_travel_to_nth (list_model->last_iter, list_model->last_nth, i); 147 list_model->last_nth = i; 148 list = list_model->last_iter; 149 } else { 150 headers = (GList*)tny_msg_folder_iface_get_headers (list_model->folder, FALSE); 151 destroy_internal_list (list_model); 152 list_model->length = g_list_length (headers); 153 list_model->last_nth = i; 154 list = g_list_nth (G_LIST (headers), i); 155 list_model->last_iter = list; 156 } 121 _tny_msg_header_list_iterator_travel_to_nth 122 ((TnyMsgHeaderListIterator*)list_model->iterator, 123 list_model->last_nth, i); 124 125 list_model->last_nth = i; 157 126 158 127 iter->stamp = list_model->stamp; 159 iter->user_data = list;128 iter->user_data = tny_iterator_iface_current (list_model->iterator); 160 129 161 130 g_mutex_unlock (list_model->folder_lock); … … 177 146 g_mutex_lock (list_model->folder_lock); 178 147 179 headers = (GList*)tny_msg_folder_iface_get_headers (list_model->folder, FALSE); 180 destroy_internal_list (list_model); 181 list_model->length = g_list_length (headers); 182 183 for (list = G_LIST (headers); list; list = list->next) 184 { 185 if (G_UNLIKELY (list == G_LIST (iter->user_data))) 148 149 while (tny_iterator_iface_has_next (list_model->iterator)) 150 { 151 if (tny_iterator_iface_next (list_model->iterator) == iter->user_data) 186 152 break; 187 153 i++; 188 154 } 189 190 if (list == NULL) 191 { 192 g_mutex_unlock (list_model->folder_lock); 193 return NULL; 194 } 155 tny_iterator_iface_first (list_model->iterator); 156 195 157 196 158 tree_path = gtk_tree_path_new (); … … 229 191 g_mutex_lock (list_model->folder_lock); 230 192 231 header = G_LIST (iter->user_data)->data;193 header = iter->user_data; 232 194 233 195 switch (column) … … 288 250 g_mutex_lock (list_model->folder_lock); 289 251 290 /* Need to call this in case the instance was uncached */ 291 headers = (GList*)tny_msg_folder_iface_get_headers (list_model->folder, FALSE); 292 destroy_internal_list (list_model); 293 list_model->length = g_list_length (headers); 294 295 iter->user_data = G_LIST (iter->user_data)->next; 252 iter->user_data = tny_iterator_iface_next (list_model->iterator); 296 253 retval = (iter->user_data != NULL); 254 297 255 g_mutex_unlock (list_model->folder_lock); 298 256 … … 333 291 g_mutex_lock (list_model->folder_lock); 334 292 335 headers = (GList*)tny_msg_folder_iface_get_headers (list_model->folder, FALSE); 336 destroy_internal_list (list_model); 337 list_model->length = g_list_length (headers); 338 339 child = g_list_nth (G_LIST (headers), n); 293 child = tny_iterator_iface_nth (list_model->iterator, n); 340 294 341 295 if (G_LIKELY (child)) … … 365 319 g_mutex_lock (list_model->folder_lock); 366 320 367 header = G_LIST (iter->user_data)->data;321 header = iter->user_data; 368 322 369 323 if (G_LIKELY (header)) … … 415 369 } 416 370 371 372 static void 373 tny_msg_header_list_model_prepend (TnyListIface *self, gpointer item) 374 { 375 TnyMsgHeaderListModel *me = (TnyMsgHeaderListModel*)self; 376 377 me->first = g_list_prepend (me->first, item); 378 } 379 380 static void 381 tny_msg_header_list_model_append (TnyListIface *self, gpointer item) 382 { 383 TnyMsgHeaderListModel *me = (TnyMsgHeaderListModel*)self; 384 385 me->first = g_list_append (me->first, item); 386 } 387 388 static void 389 tny_msg_header_list_model_remove (TnyListIface *self, gpointer item) 390 { 391 TnyMsgHeaderListModel *me = (TnyMsgHeaderListModel*)self; 392 393 me->first = g_list_remove (me->first, (gconstpointer)item); 394 } 395 396 static TnyIteratorIface* 397 tny_msg_header_list_model_create_iterator (TnyListIface *self) 398 { 399 TnyMsgHeaderListModel *me = (TnyMsgHeaderListModel*)self; 400 401 return TNY_ITERATOR_IFACE (tny_msg_header_list_iterator_new (me)); 402 } 403 404 static TnyListIface* 405 tny_msg_header_list_model_copy_the_list (TnyListIface *self) 406 { 407 TnyMsgHeaderListModel *me = (TnyMsgHeaderListModel*)self; 408 TnyMsgHeaderListModel *copy = g_object_new (TNY_TYPE_MSG_HEADER_LIST_MODEL, NULL); 409 410 GList *list_copy = g_list_copy (me->first); 411 412 copy->first = list_copy; 413 414 return TNY_LIST_IFACE (copy); 415 } 416 417 static void 418 tny_msg_header_list_model_foreach_in_the_list (TnyListIface *self, GFunc func, gpointer user_data) 419 { 420 TnyMsgHeaderListModel *me = (TnyMsgHeaderListModel*)self; 421 422 g_list_foreach (me->first, func, user_data); 423 424 return; 425 } 426 427 static void 428 tny_list_iface_init (TnyListIfaceClass *klass) 429 { 430 klass->prepend_func = tny_msg_header_list_model_prepend; 431 klass->append_func = tny_msg_header_list_model_append; 432 klass->remove_func = tny_msg_header_list_model_remove; 433 klass->create_iterator_func = tny_msg_header_list_model_create_iterator; 434 klass->copy_func = tny_msg_header_list_model_copy_the_list; 435 klass->foreach_func = tny_msg_header_list_model_foreach_in_the_list; 436 437 return; 438 } 439 440 441 417 442 static void 418 443 tny_msg_header_list_model_finalize (GObject *object) 419 444 { 420 445 TnyMsgHeaderListModel *self = (TnyMsgHeaderListModel *)object; 421 const GList* headers; 446 447 printf ("REALLYT\n"); 422 448 423 449 g_mutex_lock (self->folder_lock); … … 426 452 if (self->folder) 427 453 { 428 headers = tny_msg_folder_iface_get_headers (self->folder, FALSE);429 g_list_foreach ((GList*)headers, unref_header, NULL);454 tny_msg_header_list_model_foreach_in_the_list 455 (TNY_LIST_IFACE (self), unref_header, NULL); 430 456 g_object_unref (G_OBJECT (self->folder)); 431 457 } … … 441 467 } 442 468 469 443 470 static void 444 471 tny_msg_header_list_model_class_init (TnyMsgHeaderListModelClass *klass) … … 459 486 self->folder = NULL; 460 487 self->folder_lock = g_mutex_new (); 461 destroy_internal_list (self); 462 463 return; 464 } 465 466 488 489 self->first = NULL; 490 491 return; 492 } 467 493 468 494 … … 471 497 * @self: A #TnyMsgHeaderListModel instance 472 498 * @folder: a #TnyMsgFolderIface instance 473 * @refresh: whether or not to synchronize with the server first474 499 * 475 500 * Set the folder where the #TnyMsgHeaderIface instances are located 476 501 * 477 502 **/ 503 478 504 void 479 tny_msg_header_list_model_set_folder (TnyMsgHeaderListModel *self, TnyMsgFolderIface *folder , gboolean refresh)505 tny_msg_header_list_model_set_folder (TnyMsgHeaderListModel *self, TnyMsgFolderIface *folder) 480 506 { 481 507 const GList* headers; … … 483 509 g_mutex_lock (self->folder_lock); 484 510 485 destroy_internal_list (self); 486 487 headers = tny_msg_folder_iface_get_headers (folder, refresh); 511 self->iterator = TNY_ITERATOR_IFACE (tny_msg_header_list_iterator_new (self)); 488 512 489 513 if (G_LIKELY (self->folder)) … … 499 523 /* We add a reference to each header instance because this type 500 524 references it (needs it) using the tree-iter token. */ 501 g_list_foreach ((GList*)headers, ref_header, NULL); 525 tny_msg_header_list_model_foreach_in_the_list 526 (TNY_LIST_IFACE (self), ref_header, NULL); 502 527 503 528 g_mutex_unlock (self->folder_lock); … … 549 574 }; 550 575 576 577 static const GInterfaceInfo tny_list_iface_info = { 578 (GInterfaceInitFunc) tny_list_iface_init, 579 NULL, 580 NULL 581 }; 582 551 583 object_type = g_type_register_static (G_TYPE_OBJECT, 552 584 "TnyMsgHeaderListModel", &object_info, 0); 553 585 554 g_type_add_interface_static (object_type, 555 GTK_TYPE_TREE_MODEL, 586 g_type_add_interface_static (object_type, GTK_TYPE_TREE_MODEL, 556 587 &tree_model_info); 588 589 g_type_add_interface_static (object_type, TNY_TYPE_LIST_IFACE, 590 &tny_list_iface_info); 591 557 592 } 558 593 trunk/libtinymailui-gtk/tny-msg-header-list-model.h
r376 r424 54 54 GtkTreeModel* tny_msg_header_list_model_new (void); 55 55 56 void tny_msg_header_list_model_set_folder (TnyMsgHeaderListModel *self, TnyMsgFolderIface *folder , gboolean refresh);56 void tny_msg_header_list_model_set_folder (TnyMsgHeaderListModel *self, TnyMsgFolderIface *folder); 57 57 58 58 G_END_DECLS trunk/tinymail/tny-summary-window.c
r387 r424 242 242 GtkTreeModel *header_model, *sortable; 243 243 GtkTreeModel *select_model; 244 245 header_model = GTK_TREE_MODEL ( 244 TnyListIface *headers = NULL; 245 TnyMsgHeaderListModel *model; 246 247 tny_msg_folder_iface_set_headers_list_type (folder, TNY_TYPE_MSG_HEADER_LIST_MODEL); 248 249 #ifdef ASYNC_HEADERS 250 headers = tny_msg_folder_iface_get_headers (folder, FALSE); 251 #else 252 headers = tny_msg_folder_iface_get_headers (folder, TRUE); 253 #endif 254 255 model = TNY_MSG_HEADER_LIST_MODEL (headers); 256 header_model = GTK_TREE_MODEL (model); 257 258 tny_msg_header_list_model_set_folder (model, folder); 259 260 /* 261 GTK_TREE_MODEL ( 246 262 tny_msg_header_list_model_new ()); 247 263 … … 253 269 TNY_MSG_HEADER_LIST_MODEL (header_model), folder, TRUE); 254 270 #endif 271 */ 255 272 256 273 sortable = gtk_tree_view_get_model (GTK_TREE_VIEW (header_view)); … … 261 278 (GTK_TREE_MODEL_SORT (sortable)); 262 279 263 if (G_LIKELY (model))264 g_object_unref (G_OBJECT (model));280 //if (G_LIKELY (model)) 281 // g_object_unref (G_OBJECT (model)); 265 282 266 283 g_object_unref (G_OBJECT (sortable));
