Revision: 1306 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1306&view=re... Author: dimitrov-adrian Date: 2010-04-25 18:53:59 +0000 (Sun, 25 Apr 2010)
Log Message: ----------- Treebrowser: Bookmarks, small fixups // again :D
Modified Paths: -------------- trunk/geany-plugins/treebrowser/src/treebrowser.c
Modified: trunk/geany-plugins/treebrowser/src/treebrowser.c =================================================================== --- trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-04-25 18:43:01 UTC (rev 1305) +++ trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-04-25 18:53:59 UTC (rev 1306) @@ -370,19 +370,21 @@ } else { - gtk_tree_store_prepend(treestore, &iter, NULL); - gtk_tree_store_set(treestore, &iter, - TREEBROWSER_COLUMN_ICON, NULL, - TREEBROWSER_COLUMN_NAME, NULL, - TREEBROWSER_COLUMN_URI, FALSE, - TREEBROWSER_COLUMN_FLAG, TREEBROWSER_FLAGS_SEPARATOR, - -1); gtk_tree_store_prepend(treestore, &bookmarks_iter, NULL); gtk_tree_store_set(treestore, &bookmarks_iter, TREEBROWSER_COLUMN_ICON, GTK_STOCK_ABOUT, TREEBROWSER_COLUMN_NAME, _("Bookmarks"), TREEBROWSER_COLUMN_URI, FALSE, -1); + + gtk_tree_store_insert_after(treestore, &iter, NULL, &bookmarks_iter); + gtk_tree_store_set(treestore, &iter, + TREEBROWSER_COLUMN_ICON, NULL, + TREEBROWSER_COLUMN_NAME, NULL, + TREEBROWSER_COLUMN_URI, FALSE, + TREEBROWSER_COLUMN_FLAG, TREEBROWSER_FLAGS_SEPARATOR, + -1); + } lines = g_strsplit (contents, "\n", 0); for (line = lines; *line; ++line) @@ -415,12 +417,12 @@ } g_strfreev(lines); g_free(contents); + if (bookmarks_expanded) + gtk_tree_view_expand_row(GTK_TREE_VIEW(treeview), gtk_tree_model_get_path(GTK_TREE_MODEL(treestore), &bookmarks_iter), FALSE); + CONFIG_SHOW_BOOKMARKS = TRUE; } else g_error_free(error); - - if (bookmarks_expanded) - gtk_tree_view_expand_row(GTK_TREE_VIEW(treeview), gtk_tree_model_get_path(GTK_TREE_MODEL(treestore), &bookmarks_iter), FALSE); }
static gboolean @@ -782,11 +784,8 @@ on_menu_show_bookmarks(GtkMenuItem *menuitem, gpointer *user_data) { CONFIG_SHOW_BOOKMARKS = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)); - if (CONFIG_SHOW_BOOKMARKS) - treebrowser_load_bookmarks(); - else - gtk_tree_store_iter_clear_nodes(&bookmarks_iter, TRUE); save_settings(); + treebrowser_chroot(addressbar_last_address); }
static void
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org