Revision: 1221 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1221&view=re... Author: dimitrov-adrian Date: 2010-03-31 15:43:19 +0000 (Wed, 31 Mar 2010)
Log Message: ----------- Treebrowser: fixed bug when 'Right click->Refresh'; now changing root directory when change current project
Modified Paths: -------------- trunk/geany-plugins/treebrowser/ChangeLog trunk/geany-plugins/treebrowser/src/treebrowser.c
Modified: trunk/geany-plugins/treebrowser/ChangeLog =================================================================== --- trunk/geany-plugins/treebrowser/ChangeLog 2010-03-31 15:25:20 UTC (rev 1220) +++ trunk/geany-plugins/treebrowser/ChangeLog 2010-03-31 15:43:19 UTC (rev 1221) @@ -1,12 +1,31 @@ -Development release ChangeLog ------------------------------
++---------------------------+ +| TODO | ++---------------------------+
+ (DONE) codestyle improve to be same as other parts as geany`s + (DONE) configuration dialog + * trackick path to current focused document (currently now roking on Windows) + * In windows can choice between devices (C:, D:,...) + * Windows compitable + * Language files + (DONE) Saving state of Showbars in config file everytime where is changed + (DONE) oneclick document opening + (DONE) filter separating ex.: "*.c;*.cpp;*.h" + * fix possible memory leaks (using g_free... where is need) + + ++-------------------------------+ +| Development release ChangeLog | ++-------------------------------+ + 31-03-2010 Adrian Dimitrov dimitrov.adrian@gmail.com
* src/treebrowser.c fixed saving state of Show the toolbars when starting Geany moving settings saving in separated function - save_settings() + now changing root directory when change current project + fixed bug when 'Right click->Refresh'
30-03-2010 Adrian Dimitrov dimitrov.adrian@gmail.com @@ -115,19 +134,3 @@
* src/treebrowser.c initial, with base options - - - -TODO ---------------------------- - (DONE) codestyle improve to be same as other parts as geany`s - (DONE) configuration dialog - * trackick path to current focused document (currently now roking on Windows) - * In windows can choice between devices (C:, D:,...) - * Windows compitable - * Language files - * Saving state of Showbars in config file everytime where is changed - (DONE) oneclick document opening - (DONE) filter separating ex.: "*.c;*.cpp;*.h" - * fix possible memory leaks (using g_free... where is need) -
Modified: trunk/geany-plugins/treebrowser/src/treebrowser.c =================================================================== --- trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-03-31 15:25:20 UTC (rev 1220) +++ trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-03-31 15:43:19 UTC (rev 1221) @@ -54,6 +54,7 @@ /* ------------------ * TREEVIEW STRUCT * ------------------ */ + enum { TREEBROWSER_COLUMNC = 3, @@ -70,6 +71,7 @@ /* ------------------ * PLUGIN INFO * ------------------ */ + PLUGIN_VERSION_CHECK(147) PLUGIN_SET_INFO(_("Tree Browser"), _("Treeview filebrowser plugin."), "0.1" , "Adrian Dimitrov (dimitrov.adrian@gmail.com)")
@@ -77,6 +79,7 @@ /* ------------------ * PREDEFINES * ------------------ */ + #define foreach_slist_free(node, list) for (node = list, list = NULL; g_slist_free_1(list), node != NULL; list = node, node = node->next)
static GList* @@ -93,6 +96,8 @@ /* ------------------ * PROTOTYPES * ------------------ */ + +static void project_change_cb(G_GNUC_UNUSED GObject *obj, G_GNUC_UNUSED GKeyFile *config, G_GNUC_UNUSED gpointer data); static void treebrowser_browse(gchar *directory, gpointer parent, gint deep_limit); static void gtk_tree_store_iter_clear_nodes(gpointer iter, gboolean delete_root); static void load_settings(void); @@ -100,6 +105,18 @@
/* ------------------ + * PLUGIN CALLBACKS + * ------------------ */ + +PluginCallback plugin_callbacks[] = +{ + { "project-open", (GCallback) &project_change_cb, TRUE, NULL }, + { "project-save", (GCallback) &project_change_cb, TRUE, NULL }, + { NULL, NULL, FALSE, NULL } +}; + + +/* ------------------ * TREEBROWSER CORE FUNCTIONS * ------------------ */
@@ -419,9 +436,7 @@ g_free(locale_cmd); g_free(cmd); g_free(dir); - } - }
static void @@ -568,6 +583,8 @@ treebrowser_browse(uri, &iter, CONFIG_INITIAL_DIR_DEEP); } } + else + treebrowser_browse(addressbar_last_address, NULL, CONFIG_INITIAL_DIR_DEEP); }
static void @@ -1135,6 +1152,12 @@ * GEANY HOOKS * ------------------ */
+static void +project_change_cb(G_GNUC_UNUSED GObject *obj, G_GNUC_UNUSED GKeyFile *config, G_GNUC_UNUSED gpointer data) +{ + treebrowser_chroot(get_default_dir()); +} + void plugin_init(GeanyData *data) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.