diff --git a/thunar/thunar-standard-view-model.c b/thunar/thunar-standard-view-model.c index c44f6b0691adc69a610f04a0d026f7397be0be07..db5244eb082232784505a9e89fb8eed9a0b7ac49 100644 --- a/thunar/thunar-standard-view-model.c +++ b/thunar/thunar-standard-view-model.c @@ -602,18 +602,9 @@ thunar_standard_view_model_get_statusbar_text (ThunarStandardViewModel *model, if (selected_items == NULL) /* nothing selected */ { - /* build a GList of all files */ - has_next = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter); - while (has_next) - { - _file = thunar_standard_view_model_get_file (model, &iter); - if (_file != NULL) - relevant_files = g_list_append (relevant_files, _file); - has_next = gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter); - } - /* try to determine a file for the current folder */ folder = thunar_standard_view_model_get_folder (model); + relevant_files = thunar_folder_get_files (folder); file = (folder != NULL) ? thunar_folder_get_corresponding_file (folder) : NULL; temp_string = thunar_standard_view_model_get_statusbar_text_for_files (model, relevant_files, show_file_size_binary_format); text_list = g_list_append (text_list, temp_string); @@ -628,7 +619,7 @@ thunar_standard_view_model_get_statusbar_text (ThunarStandardViewModel *model, g_free (size_string); } - g_list_free_full (relevant_files, g_object_unref); + g_list_free (relevant_files); } else if (selected_items->next == NULL) /* only one item selected */ { diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c index 5e0a7f044fc60c33293d7cb4ba15b61f9b473270..3b8873b105e9f00bf61dc22d615e2850b5b2c16d 100644 --- a/thunar/thunar-standard-view.c +++ b/thunar/thunar-standard-view.c @@ -2245,7 +2245,7 @@ thunar_standard_view_update_statusbar_text_idle (gpointer data) standard_view->priv->statusbar_text_idle_id = 0; - /* tell everybody that the statusbar text may have changed */ + /* tell everybody that the statusbar text may have changed (This will trigger a "get" and as such an update of the string) */ g_object_notify_by_pspec (G_OBJECT (standard_view), standard_view_props[PROP_STATUSBAR_TEXT]); return FALSE; @@ -2263,7 +2263,7 @@ thunar_standard_view_update_statusbar_text (ThunarStandardView *standard_view) /* restart a new one, this way we avoid multiple update when * the user is pressing a key to scroll */ standard_view->priv->statusbar_text_idle_id = - g_timeout_add_full (G_PRIORITY_LOW, 50, thunar_standard_view_update_statusbar_text_idle, + g_timeout_add_full (G_PRIORITY_LOW, 500, thunar_standard_view_update_statusbar_text_idle, standard_view, NULL); }