Revision: 1654 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1654&view=re... Author: dimitrov-adrian Date: 2010-10-13 16:28:15 +0000 (Wed, 13 Oct 2010)
Log Message: ----------- Treebrowser: Fixed wrong Show toolbars state when it turned off from the plugin configuration, Fixed possible segfault when deleting file which is in bookmarks tree, Fixed collapsing and preloading bookmarks list when renaming, and deleting objects
Modified Paths: -------------- trunk/geany-plugins/treebrowser/ChangeLog trunk/geany-plugins/treebrowser/README trunk/geany-plugins/treebrowser/src/treebrowser.c
Modified: trunk/geany-plugins/treebrowser/ChangeLog =================================================================== --- trunk/geany-plugins/treebrowser/ChangeLog 2010-10-11 16:25:41 UTC (rev 1653) +++ trunk/geany-plugins/treebrowser/ChangeLog 2010-10-13 16:28:15 UTC (rev 1654) @@ -41,6 +41,15 @@ 09-10-2010 Adrian Dimitrov dimitrov.adrian@gmail.com
* src/treebrowser.c + Fixed possible segfault when deleting file which is in bookmarks tree + Fixed wrong Show toolbars state when it turned off from the plugin configuration + Fixed collapsing and preloading bookmarks list when renaming, and deleting objects + * README + Try to add screenshot for the website + +09-10-2010 Adrian Dimitrov dimitrov.adrian@gmail.com + + * src/treebrowser.c Fixes possible segfaults with bookmarks in ubuntu 10.10 * README Update and fixes website compitables
Modified: trunk/geany-plugins/treebrowser/README =================================================================== --- trunk/geany-plugins/treebrowser/README 2010-10-11 16:25:41 UTC (rev 1653) +++ trunk/geany-plugins/treebrowser/README 2010-10-13 16:28:15 UTC (rev 1654) @@ -12,7 +12,13 @@ Treebrowser is plugin that provide tree like file browser for geany`s sidebar. It is on beta state, then all reports are welcome.
+.. image:: http://img177.imageshack.us/img177/6403/geanytreebrowser.png + :width: 240 + :alt: treebrowser plugin + :align: right + :target: http://img177.imageshack.us/img177/6403/geanytreebrowser.png
+ Features ========
Modified: trunk/geany-plugins/treebrowser/src/treebrowser.c =================================================================== --- trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-10-11 16:25:41 UTC (rev 1653) +++ trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-10-13 16:28:15 UTC (rev 1654) @@ -543,7 +543,9 @@ dir = g_dir_open (root, 0, NULL);
if (!dir) - return; + if (delete_root) + g_remove(root); + else return;
name = g_dir_read_name (dir); while (name != NULL) @@ -803,32 +805,31 @@ GtkTreeIter iter; GtkTreeModel *model; GtkTreePath *path_parent; - gchar *uri; + gchar *uri, *uri_parent;
- if (gtk_tree_selection_get_selected(selection, &model, &iter)) - { + if (! gtk_tree_selection_get_selected(selection, &model, &iter)) + return;
- gtk_tree_model_get(model, &iter, TREEBROWSER_COLUMN_URI, &uri, -1); + gtk_tree_model_get(model, &iter, TREEBROWSER_COLUMN_URI, &uri, -1);
- if (dialogs_show_question(_("Do you really want to delete '%s' ?"), uri)) - { - if (CONFIG_ON_DELETE_CLOSE_FILE && !g_file_test(uri, G_FILE_TEST_IS_DIR)) - document_close(document_find_by_filename(uri)); + if (! dialogs_show_question(_("Do you really want to delete '%s' ?"), uri)) + return;
- fs_remove(uri, TRUE); - path_parent = gtk_tree_model_get_path(GTK_TREE_MODEL(treestore), &iter); + if (CONFIG_ON_DELETE_CLOSE_FILE && !g_file_test(uri, G_FILE_TEST_IS_DIR)) + document_close(document_find_by_filename(uri));
- if (gtk_tree_path_up(path_parent) && - gtk_tree_model_get_iter(GTK_TREE_MODEL(treestore), &iter, path_parent) - ) - { - treebrowser_browse(g_path_get_dirname(uri), &iter); - treebrowser_load_bookmarks(); - } - else - treebrowser_browse(g_path_get_dirname(uri), NULL); - } + uri_parent = g_path_get_dirname(uri); + fs_remove(uri, TRUE); + path_parent = gtk_tree_model_get_path(GTK_TREE_MODEL(treestore), &iter); + if (gtk_tree_path_up(path_parent)) + { + if (gtk_tree_model_get_iter(GTK_TREE_MODEL(treestore), &iter, path_parent)) + treebrowser_browse(uri_parent, &iter); + else + treebrowser_browse(uri_parent, NULL); } + else + treebrowser_browse(uri_parent, NULL); }
static void @@ -1211,16 +1212,13 @@ TREEBROWSER_COLUMN_NAME, name_new, TREEBROWSER_COLUMN_URI, uri_new, -1); - path_parent = gtk_tree_model_get_path(GTK_TREE_MODEL(treestore), &iter); - if (gtk_tree_path_up(path_parent)) { if (gtk_tree_model_get_iter(GTK_TREE_MODEL(treestore), &iter_parent, path_parent)) treebrowser_browse(g_path_get_dirname(uri_new), &iter_parent); else treebrowser_browse(g_path_get_dirname(uri_new), NULL); - treebrowser_load_bookmarks(); } else treebrowser_browse(g_path_get_dirname(uri_new), NULL); @@ -1493,6 +1491,7 @@ treebrowser_chroot(addressbar_last_address); if (CONFIG_SHOW_BOOKMARKS) treebrowser_load_bookmarks(); + showbars(CONFIG_SHOW_BARS); } else dialogs_show_msgbox(GTK_MESSAGE_ERROR,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org