- /* Restore the last selected folder. Check first that the model is not NULL */
- if (gtk_tree_view_get_model (GTK_TREE_VIEW (folder_view))) {
- key = _modest_widget_memory_get_keyname (name, "last_selected_path");
- if (modest_conf_key_exists (conf, key, NULL)) {
- GtkTreePath *path;
- GtkTreeSelection *selection;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (folder_view));
- str = modest_conf_get_string (conf, key, NULL);
- path = gtk_tree_path_new_from_string ((const gchar *) str);
- gtk_tree_view_expand_to_path (GTK_TREE_VIEW (folder_view), path);
- gtk_tree_selection_select_path (selection, path);
- g_free (str);
- gtk_tree_path_free (path);
- }
- g_free (key);
- }
-