Re: Patch that fixes folder additions to the folder store
- From: Sergio Villar Senin <svillar igalia com>
- To: tinymail devel list <tinymail-devel-list gnome org>
- Subject: Re: Patch that fixes folder additions to the folder store
- Date: Thu, 07 Jun 2007 09:21:08 +0300
Philip Van Hoof wrote:
On Wed, 2007-06-06 at 18:14 +0300, Sergio Villar Senin wrote:
+ if (type != TNY_FOLDER_TYPE_ROOT)
g_object_unref (G_OBJECT (fol));
Why not "if (fol != NULL)" ?
Because I was stupid :-). See the new one attached.
Br
Index: tny-gtk-folder-store-tree-model.c
===================================================================
--- tny-gtk-folder-store-tree-model.c (revision 2077)
+++ tny-gtk-folder-store-tree-model.c (working copy)
@@ -663,29 +663,26 @@
{
GtkTreeIter child;
gint type;
+ TnyFolderStore *fol;
+ gboolean found = FALSE;
gtk_tree_model_get (model, iter,
TNY_GTK_FOLDER_STORE_TREE_MODEL_TYPE_COLUMN,
&type, -1);
- if (type != TNY_FOLDER_TYPE_ROOT)
- {
- TnyFolderStore *fol;
- gboolean found = FALSE;
-
- gtk_tree_model_get (model, iter,
- TNY_GTK_FOLDER_STORE_TREE_MODEL_INSTANCE_COLUMN,
- &fol, -1);
-
- if (fol == user_data)
- found = TRUE;
-
+ gtk_tree_model_get (model, iter,
+ TNY_GTK_FOLDER_STORE_TREE_MODEL_INSTANCE_COLUMN,
+ &fol, -1);
+
+ if (fol == user_data)
+ found = TRUE;
+
+ if (fol != NULL)
g_object_unref (G_OBJECT (fol));
- if (found) {
- *f = *iter;
- return TRUE;
- }
+ if (found) {
+ *f = *iter;
+ return TRUE;
}
if (gtk_tree_model_iter_children (model, &child, iter))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]