Revision: 1309 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1309&view=re... Author: dimitrov-adrian Date: 2010-04-25 21:16:59 +0000 (Sun, 25 Apr 2010)
Log Message: ----------- Treebrowser: Added option to change bars position (Top or Bottom)
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-04-25 20:38:37 UTC (rev 1308) +++ trunk/geany-plugins/treebrowser/ChangeLog 2010-04-25 21:16:59 UTC (rev 1309) @@ -7,7 +7,7 @@ "CRITICAL : g_object_ref: assertion `object->ref_count > 0' failed" (FIXED) Double click on bookmarks, do nothing (FIXED) show/hide hidden files not working on Windows - (FIXED) "Go Up" not working if the current path ends with slash + (FIXED) "Go Up" not working if the current path ends with slash // thanks to <dmaphy> for report
+---------------------------+ @@ -29,7 +29,7 @@ (DONE) Using font from geany settings for sidebar * Migrating to stash * Adding keybindings for renaming/deleting/refreshing - * Add option to change bars position + (DONE) Add option to change bars position // requested by <dmaphy> * Add option to autorename the newest created objects by the Treebrowser
@@ -40,6 +40,11 @@ 25-04-2010 Adrian Dimitrov dimitrov.adrian@gmail.com
* src/treebrowser.c + Added option to change bars position (Top or Bottom) + +25-04-2010 Adrian Dimitrov dimitrov.adrian@gmail.com + + * src/treebrowser.c Menu elements are inactive instands of hidden Added experimental bookmarks view Added option to show/hide tree lines
Modified: trunk/geany-plugins/treebrowser/src/treebrowser.c =================================================================== --- trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-04-25 20:38:37 UTC (rev 1308) +++ trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-04-25 21:16:59 UTC (rev 1309) @@ -53,6 +53,7 @@ static gboolean CONFIG_SHOW_HIDDEN_FILES = FALSE; static gboolean CONFIG_HIDE_OBJECT_FILES = FALSE; static gboolean CONFIG_SHOW_BARS = TRUE; +static gboolean CONFIG_SHOW_BARS_AT_TOP = FALSE; static gboolean CONFIG_CHROOT_ON_DCLICK = FALSE; static gboolean CONFIG_FOLLOW_CURRENT_DOC = TRUE; static gboolean CONFIG_ON_EXPAND_REFRESH = TRUE; @@ -1258,11 +1259,6 @@ g_signal_connect(wid, "clicked", G_CALLBACK(treebrowser_track_current), NULL); gtk_container_add(GTK_CONTAINER(toolbar), wid);
- wid = GTK_WIDGET(gtk_tool_button_new_from_stock(GTK_STOCK_ABOUT)); - ui_widget_set_tooltip_text(wid, _("Bookmarks")); - g_signal_connect(wid, "clicked", G_CALLBACK(treebrowser_load_bookmarks), NULL); - gtk_container_add(GTK_CONTAINER(toolbar), wid); - wid = GTK_WIDGET(gtk_tool_button_new_from_stock(GTK_STOCK_CLOSE)); ui_widget_set_tooltip_text(wid, _("Hide bars")); g_signal_connect(wid, "clicked", G_CALLBACK(on_button_hide_bars), NULL); @@ -1284,8 +1280,16 @@ ui_widget_set_tooltip_text(addressbar, _("Addressbar for example '/projects/my-project'"));
- gtk_box_pack_start(GTK_BOX(sidebar_vbox), scrollwin, TRUE, TRUE, 1); - gtk_box_pack_start(GTK_BOX(sidebar_vbox), sidebar_vbox_bars, FALSE, TRUE, 1); + if (CONFIG_SHOW_BARS_AT_TOP) + { + gtk_box_pack_start(GTK_BOX(sidebar_vbox), sidebar_vbox_bars, FALSE, TRUE, 1); + gtk_box_pack_start(GTK_BOX(sidebar_vbox), scrollwin, TRUE, TRUE, 1); + } + else + { + gtk_box_pack_start(GTK_BOX(sidebar_vbox), scrollwin, TRUE, TRUE, 1); + gtk_box_pack_start(GTK_BOX(sidebar_vbox), sidebar_vbox_bars, FALSE, TRUE, 1); + }
g_signal_connect(selection, "changed", G_CALLBACK(on_treeview_changed), NULL); g_signal_connect(treeview, "button-press-event", G_CALLBACK(on_treeview_mouseclick), selection); @@ -1317,6 +1321,7 @@ GtkWidget *SHOW_HIDDEN_FILES; GtkWidget *HIDE_OBJECT_FILES; GtkWidget *SHOW_BARS; + GtkWidget *SHOW_BARS_AT_TOP; GtkWidget *CHROOT_ON_DCLICK; GtkWidget *FOLLOW_CURRENT_DOC; GtkWidget *ON_EXPAND_REFRESH; @@ -1340,6 +1345,7 @@ CONFIG_SHOW_HIDDEN_FILES = utils_get_setting_boolean(config, "treebrowser", "show_hidden_files", CONFIG_SHOW_HIDDEN_FILES); CONFIG_HIDE_OBJECT_FILES = utils_get_setting_boolean(config, "treebrowser", "hide_object_files", CONFIG_HIDE_OBJECT_FILES); CONFIG_SHOW_BARS = utils_get_setting_boolean(config, "treebrowser", "show_bars", CONFIG_SHOW_BARS); + CONFIG_SHOW_BARS_AT_TOP = utils_get_setting_boolean(config, "treebrowser", "show_bars_at_top", CONFIG_SHOW_BARS_AT_TOP); CONFIG_CHROOT_ON_DCLICK = utils_get_setting_boolean(config, "treebrowser", "chroot_on_dclick", CONFIG_CHROOT_ON_DCLICK); CONFIG_FOLLOW_CURRENT_DOC = utils_get_setting_boolean(config, "treebrowser", "follow_current_doc", CONFIG_FOLLOW_CURRENT_DOC); CONFIG_ON_EXPAND_REFRESH = utils_get_setting_boolean(config, "treebrowser", "on_expand_refresh", CONFIG_ON_EXPAND_REFRESH); @@ -1369,6 +1375,7 @@ g_key_file_set_boolean(config, "treebrowser", "show_hidden_files", CONFIG_SHOW_HIDDEN_FILES); g_key_file_set_boolean(config, "treebrowser", "hide_object_files", CONFIG_HIDE_OBJECT_FILES); g_key_file_set_boolean(config, "treebrowser", "show_bars", CONFIG_SHOW_BARS); + g_key_file_set_boolean(config, "treebrowser", "show_bars_at_top", CONFIG_SHOW_BARS_AT_TOP); g_key_file_set_boolean(config, "treebrowser", "chroot_on_dclick", CONFIG_CHROOT_ON_DCLICK); g_key_file_set_boolean(config, "treebrowser", "follow_current_doc", CONFIG_FOLLOW_CURRENT_DOC); g_key_file_set_boolean(config, "treebrowser", "on_expand_refresh", CONFIG_ON_EXPAND_REFRESH); @@ -1396,6 +1403,7 @@ CONFIG_ONE_CLICK_CHDOC = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configure_widgets.ONE_CLICK_CHDOC)); CONFIG_SHOW_HIDDEN_FILES = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configure_widgets.SHOW_HIDDEN_FILES)); CONFIG_HIDE_OBJECT_FILES = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configure_widgets.HIDE_OBJECT_FILES)); + CONFIG_SHOW_BARS_AT_TOP = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configure_widgets.SHOW_BARS_AT_TOP)); CONFIG_CHROOT_ON_DCLICK = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configure_widgets.CHROOT_ON_DCLICK)); CONFIG_FOLLOW_CURRENT_DOC = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configure_widgets.FOLLOW_CURRENT_DOC)); CONFIG_ON_EXPAND_REFRESH = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configure_widgets.ON_EXPAND_REFRESH)); @@ -1420,12 +1428,12 @@ GtkWidget* plugin_configure(GtkDialog *dialog) { - GtkWidget *label; - GtkWidget *vbox, *hbox; + GtkWidget *label; + GtkWidget *vbox, *hbox;
vbox = gtk_vbox_new(FALSE, 0); + hbox = gtk_hbox_new(FALSE, 0);
- hbox = gtk_hbox_new(FALSE, 0); label = gtk_label_new(_("External open command")); configure_widgets.OPEN_EXTERNAL_CMD = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(configure_widgets.OPEN_EXTERNAL_CMD), CONFIG_OPEN_EXTERNAL_CMD); @@ -1449,6 +1457,16 @@ gtk_box_pack_start(GTK_BOX(hbox), configure_widgets.INITIAL_DIR_DEEP, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 6);
+ configure_widgets.SHOW_BARS = gtk_check_button_new_with_label(_("Show bars")); + gtk_button_set_focus_on_click(GTK_BUTTON(configure_widgets.SHOW_BARS), FALSE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configure_widgets.SHOW_BARS), CONFIG_SHOW_BARS); + gtk_box_pack_start(GTK_BOX(vbox), configure_widgets.SHOW_BARS, FALSE, FALSE, 0); + + configure_widgets.SHOW_BARS_AT_TOP = gtk_check_button_new_with_label(_("Show bars at top (Require plugin restart)")); + gtk_button_set_focus_on_click(GTK_BUTTON(configure_widgets.SHOW_BARS_AT_TOP), FALSE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configure_widgets.SHOW_BARS_AT_TOP), CONFIG_SHOW_BARS_AT_TOP); + gtk_box_pack_start(GTK_BOX(vbox), configure_widgets.SHOW_BARS_AT_TOP, FALSE, FALSE, 0); + configure_widgets.SHOW_HIDDEN_FILES = gtk_check_button_new_with_label(_("Show hidden files")); gtk_button_set_focus_on_click(GTK_BUTTON(configure_widgets.SHOW_HIDDEN_FILES), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configure_widgets.SHOW_HIDDEN_FILES), CONFIG_SHOW_HIDDEN_FILES);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org