Changeset 3312
- Timestamp:
- 01/29/08 17:10:35
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/libtinymail/tny-simple-list-iterator.c (modified) (3 diffs)
- trunk/libtinymailui-gtk/tny-gtk-account-list-model-iterator.c (modified) (3 diffs)
- trunk/libtinymailui-gtk/tny-gtk-attach-list-model-iterator.c (modified) (2 diffs)
- trunk/libtinymailui-gtk/tny-gtk-folder-store-tree-model-iterator.c (modified) (3 diffs)
- trunk/libtinymailui-gtk/tny-gtk-header-list-iterator.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r3309 r3312 1 2008-01-29 Philip Van Hoof <pvanhoof@gnome.org>2 3 * Fixed reference counting for all TnyIterator implementations4 5 1 2008-01-28 Philip Van Hoof <pvanhoof@gnome.org> 6 2 trunk/libtinymail/tny-simple-list-iterator.c
r3311 r3312 36 36 TnySimpleListPriv *lpriv; 37 37 38 lpriv = TNY_SIMPLE_LIST_GET_PRIVATE (model); 39 40 g_mutex_lock (lpriv->iterator_lock); 41 if (self->model) 42 g_object_unref (self->model); 43 self->model = (TnySimpleList *) g_object_ref (self->model); 38 self->model = model; 39 40 lpriv = TNY_SIMPLE_LIST_GET_PRIVATE (self->model); 41 42 g_mutex_lock (lpriv->iterator_lock); 44 43 self->current = lpriv->first; 45 44 g_mutex_unlock (lpriv->iterator_lock); … … 63 62 tny_simple_list_iterator_instance_init (GTypeInstance *instance, gpointer g_class) 64 63 { 65 TnySimpleListIterator *self = (TnySimpleListIterator *) instance;64 TnySimpleListIterator *self = (TnySimpleListIterator *)instance; 66 65 67 66 self->model = NULL; … … 74 73 tny_simple_list_iterator_finalize (GObject *object) 75 74 { 76 77 TnySimpleListIterator *self = (TnySimpleListIterator *) object;78 79 if (self->model)80 g_object_unref (self->model);81 82 75 (*parent_class->finalize) (object); 83 76 trunk/libtinymailui-gtk/tny-gtk-account-list-model-iterator.c
r3311 r3312 32 32 _tny_gtk_account_list_model_iterator_set_model (TnyGtkAccountListModelIterator *self, TnyGtkAccountListModel *model) 33 33 { 34 if (self->model) 35 g_object_unref (self->model); 36 self->model = (TnyGtkAccountListModel *) g_object_ref (model); 34 self->model = model; 37 35 self->current = model->first; 38 36 … … 66 64 tny_gtk_account_list_model_iterator_finalize (GObject *object) 67 65 { 68 TnyGtkAccountListModelIterator *self = (TnyGtkAccountListModelIterator *) object;69 70 if (self->model)71 g_object_unref (self->model);72 73 66 (*parent_class->finalize) (object); 74 67 … … 197 190 return NULL; 198 191 199 g_object_ref (me->model);192 g_object_ref (G_OBJECT (me->model)); 200 193 201 194 return TNY_LIST (me->model); trunk/libtinymailui-gtk/tny-gtk-attach-list-model-iterator.c
r3311 r3312 33 33 _tny_gtk_attach_list_model_iterator_set_model (TnyGtkAttachListModelIterator *self, TnyGtkAttachListModel *model) 34 34 { 35 if (self->model) 36 g_object_unref (self->model); 37 self->model = (TnyGtkAttachListModel *) g_object_ref (model); 35 self->model = model; 38 36 self->current = model->first; 39 37 … … 67 65 tny_gtk_attach_list_model_iterator_finalize (GObject *object) 68 66 { 69 TnyGtkAttachListModelIterator *self = (TnyGtkAttachListModelIterator *) object;70 71 if (self->model)72 g_object_unref (self->model);73 74 67 (*parent_class->finalize) (object); 75 68 trunk/libtinymailui-gtk/tny-gtk-folder-store-tree-model-iterator.c
r3309 r3312 32 32 _tny_gtk_folder_store_tree_model_iterator_set_model (TnyGtkFolderStoreTreeModelIterator *self, TnyGtkFolderStoreTreeModel *model) 33 33 { 34 self->model = (TnyGtkFolderStoreTreeModel *) g_object_ref (model);34 self->model = model; 35 35 self->current = model->first; 36 36 … … 64 64 tny_gtk_folder_store_tree_model_iterator_finalize (GObject *object) 65 65 { 66 TnyGtkFolderStoreTreeModelIterator *self = (TnyGtkFolderStoreTreeModelIterator *) object;67 68 if (self->model)69 g_object_unref (self);70 71 66 (*parent_class->finalize) (object); 72 67 … … 179 174 180 175 if (ptr) 181 g_object_ref ( ptr);176 g_object_ref (G_OBJECT(ptr)); 182 177 183 178 return G_OBJECT(ptr); trunk/libtinymailui-gtk/tny-gtk-header-list-iterator.c
r3311 r3312 33 33 _tny_gtk_header_list_iterator_set_model (TnyGtkHeaderListIterator *self, TnyGtkHeaderListModel *model) 34 34 { 35 36 if (self->model) 37 g_object_unref (self->model); 38 self->model = (TnyGtkHeaderListModel *) g_object_ref (model); 35 self->model = model; 39 36 40 37 /* It's not a list_copy, so don't free this list when … … 76 73 tny_gtk_header_list_iterator_finalize (GObject *object) 77 74 { 78 TnyGtkHeaderListIterator *self = (TnyGtkHeaderListIterator *) object;79 80 if (self->model)81 g_object_unref (self->model);82 83 75 (*parent_class->finalize) (object); 84 76
