[evolution] I#1170 - EWebDAVBrowser: The home sets not always expanded



commit ebad44c8aa21cc14830b3ea9aa4fe3e866a52481
Author: Milan Crha <mcrha redhat com>
Date:   Tue Oct 20 11:09:44 2020 +0200

    I#1170 - EWebDAVBrowser: The home sets not always expanded
    
    Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1170

 src/e-util/e-webdav-browser.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/e-util/e-webdav-browser.c b/src/e-util/e-webdav-browser.c
index d121e450df..cdd6b22418 100644
--- a/src/e-util/e-webdav-browser.c
+++ b/src/e-util/e-webdav-browser.c
@@ -378,13 +378,14 @@ static void
 webdav_browser_update_ui (EWebDAVBrowser *webdav_browser)
 {
        GtkTreeModel *model;
+       GtkTreeModel *sort_model;
        GtkTreeStore *tree_store;
        GSList *added_iters = NULL, *link;
 
        g_return_if_fail (E_IS_WEBDAV_BROWSER (webdav_browser));
 
-       model = gtk_tree_view_get_model (GTK_TREE_VIEW (webdav_browser->priv->tree_view));
-       model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (model));
+       sort_model = gtk_tree_view_get_model (GTK_TREE_VIEW (webdav_browser->priv->tree_view));
+       model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (sort_model));
        tree_store = GTK_TREE_STORE (model);
 
        webdav_browser->priv->resources = g_slist_sort (webdav_browser->priv->resources, 
resource_data_compare);
@@ -450,10 +451,13 @@ webdav_browser_update_ui (EWebDAVBrowser *webdav_browser)
 
                        if (!is_loaded) {
                                GtkTreeIter child;
+                               GtkTreeIter sort_iter;
 
                                gtk_tree_store_set (tree_store, &parent_iter, COLUMN_BOOL_CHILDREN_LOADED, 
TRUE, -1);
 
-                               path = gtk_tree_model_get_path (model, &parent_iter);
+                               gtk_tree_model_sort_convert_child_iter_to_iter (GTK_TREE_MODEL_SORT 
(sort_model), &sort_iter, &parent_iter);
+
+                               path = gtk_tree_model_get_path (sort_model, &sort_iter);
                                if (path) {
                                        gtk_tree_view_expand_row (GTK_TREE_VIEW 
(webdav_browser->priv->tree_view), path, FALSE);
                                        gtk_tree_path_free (path);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]