Branch: refs/heads/master Author: Frank Lanitz frank@frank.uvena.de Committer: Frank Lanitz frank@frank.uvena.de Date: Sat, 07 Jul 2012 07:57:36 Commit: 71136fb8b0858d9eac3286f7e5260b3941c27e6a https://github.com/geany/geany-plugins/commit/71136fb8b0858d9eac3286f7e5260b...
Log Message: ----------- Merge pull request #55 from b4n/fixes/treebrowser
Fix various treebrowser things
Modified Paths: -------------- treebrowser/src/treebrowser.c
Modified: treebrowser/src/treebrowser.c 47 files changed, 26 insertions(+), 21 deletions(-) =================================================================== @@ -342,6 +342,9 @@ enum if (! NZV(base_name)) return FALSE;
+ if (CONFIG_SHOW_HIDDEN_FILES) + return FALSE; + #ifdef G_OS_WIN32 if (win32_check_hidden(filename)) return TRUE; @@ -483,7 +486,8 @@ enum treebrowser_bookmarks_set_state(); }
- gtk_tree_store_iter_clear_nodes(parent, FALSE); + if (parent) + gtk_tree_store_iter_clear_nodes(parent, FALSE);
list = utils_get_file_list(directory, NULL, NULL); if (list != NULL) @@ -682,30 +686,31 @@ enum GtkTreePath *path; gchar *uri_current;
- gtk_tree_model_iter_children(GTK_TREE_MODEL(treestore), &iter, parent); - - do + if (gtk_tree_model_iter_children(GTK_TREE_MODEL(treestore), &iter, parent)) { - if (gtk_tree_model_iter_has_child(GTK_TREE_MODEL(treestore), &iter)) - if (treebrowser_search(uri, &iter)) - return TRUE; + do + { + if (gtk_tree_model_iter_has_child(GTK_TREE_MODEL(treestore), &iter)) + if (treebrowser_search(uri, &iter)) + return TRUE;
- gtk_tree_model_get(GTK_TREE_MODEL(treestore), &iter, TREEBROWSER_COLUMN_URI, &uri_current, -1); + gtk_tree_model_get(GTK_TREE_MODEL(treestore), &iter, TREEBROWSER_COLUMN_URI, &uri_current, -1);
- if (utils_str_equal(uri, uri_current) == TRUE) - { - path = gtk_tree_model_get_path(GTK_TREE_MODEL(treestore), &iter); - gtk_tree_view_expand_to_path(GTK_TREE_VIEW(treeview), path); - gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(treeview), path, TREEBROWSER_COLUMN_ICON, FALSE, 0, 0); - gtk_tree_view_set_cursor(GTK_TREE_VIEW(treeview), path, treeview_column_text, FALSE); - gtk_tree_path_free(path); - g_free(uri_current); - return TRUE; - } - else - g_free(uri_current); + if (utils_str_equal(uri, uri_current) == TRUE) + { + path = gtk_tree_model_get_path(GTK_TREE_MODEL(treestore), &iter); + gtk_tree_view_expand_to_path(GTK_TREE_VIEW(treeview), path); + gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(treeview), path, TREEBROWSER_COLUMN_ICON, FALSE, 0, 0); + gtk_tree_view_set_cursor(GTK_TREE_VIEW(treeview), path, treeview_column_text, FALSE); + gtk_tree_path_free(path); + g_free(uri_current); + return TRUE; + } + else + g_free(uri_current);
- } while(gtk_tree_model_iter_next(GTK_TREE_MODEL(treestore), &iter)); + } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(treestore), &iter)); + }
return FALSE; }
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).