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