aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog7
-rw-r--r--shell/e-storage-set-view.c24
2 files changed, 23 insertions, 8 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index b1061f760f..3f89a3575d 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,10 @@
+2002-09-19 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-storage-set-view.c (resort): New.
+ (sort_idle_callback): Use it.
+ (insert_storages): Use resort() instead of queue_resort() so we
+ sort immediately.
+
2002-09-18 Mike Kestner <mkestner@ximian.com>
* e-storage-set-view.c (etree_value_at): bandaid for 30248.
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index 880ca55e9e..86538851d2 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -188,7 +188,7 @@ storage_sort_callback (ETreeMemory *etmm,
return -1;
if (path_2_local)
return 1;
-
+
return g_utf8_collate (e_tree_model_value_at (E_TREE_MODEL (etmm), node1, 0),
e_tree_model_value_at (E_TREE_MODEL (etmm), node2, 0));
}
@@ -241,13 +241,11 @@ sort_traverse_callback (ETreeModel *model,
return FALSE;
}
-static int
-sort_idle_callback (void *data)
+static void
+resort (EStorageSetView *storage_set_view)
{
- EStorageSetView *storage_set_view;
EStorageSetViewPrivate *priv;
- storage_set_view = E_STORAGE_SET_VIEW (data);
priv = storage_set_view->priv;
e_tree_memory_sort_node (E_TREE_MEMORY (priv->etree_model), priv->root_node,
@@ -255,6 +253,18 @@ sort_idle_callback (void *data)
e_tree_model_node_traverse (priv->etree_model, priv->root_node,
sort_traverse_callback, storage_set_view);
+}
+
+static int
+sort_idle_callback (void *data)
+{
+ EStorageSetView *storage_set_view;
+ EStorageSetViewPrivate *priv;
+
+ storage_set_view = E_STORAGE_SET_VIEW (data);
+ priv = storage_set_view->priv;
+
+ resort (storage_set_view);
priv->sort_idle_id = 0;
return FALSE;
@@ -2082,8 +2092,6 @@ insert_folders (EStorageSetView *storage_set_view,
}
e_free_string_list (folder_path_list);
-
- queue_resort (storage_set_view);
}
static void
@@ -2119,7 +2127,7 @@ insert_storages (EStorageSetView *storage_set_view)
e_free_object_list (storage_list);
- queue_resort (storage_set_view);
+ resort (storage_set_view);
}
void