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: Patch that fixes folder additions to the folder store
- Date: Wed, 06 Jun 2007 18:14:06 +0300
Hi,
this patch fixes the problem that the tree model has when trying to add
a folder that is created just under an account. The old code was not
considering this situation.
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 (type != TNY_FOLDER_TYPE_ROOT)
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]