aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-09-20 01:03:09 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-09-20 01:03:09 +0800
commit5f467a8f64182807cae9a27da004f84770590b7d (patch)
tree0584a9e8313b7a7e2a761c4a083b46cacaecfd3c /shell
parentfb51bbedb012169c1ab68e8fe1be4c742ffbf272 (diff)
downloadgsoc2013-evolution-5f467a8f64182807cae9a27da004f84770590b7d.tar
gsoc2013-evolution-5f467a8f64182807cae9a27da004f84770590b7d.tar.gz
gsoc2013-evolution-5f467a8f64182807cae9a27da004f84770590b7d.tar.bz2
gsoc2013-evolution-5f467a8f64182807cae9a27da004f84770590b7d.tar.lz
gsoc2013-evolution-5f467a8f64182807cae9a27da004f84770590b7d.tar.xz
gsoc2013-evolution-5f467a8f64182807cae9a27da004f84770590b7d.tar.zst
gsoc2013-evolution-5f467a8f64182807cae9a27da004f84770590b7d.zip
(resort): New. (sort_idle_callback): Use it. (insert_storages): Use
(resort): New. (sort_idle_callback): Use it. (insert_storages): Use resort() instead of queue_resort() so we sort immediately. svn path=/trunk/; revision=18116
Diffstat (limited to 'shell')
-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