Revision: 356 Author: eht16 Date: 2006-05-22 06:43:56 -0700 (Mon, 22 May 2006) ViewCVS: http://svn.sourceforge.net/geany/?rev=356&view=rev
Log Message: ----------- improved toggle visibility of sidebar when toggled by keyboard
Modified Paths: -------------- trunk/ChangeLog trunk/src/keybindings.c trunk/src/utils.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-05-22 11:55:07 UTC (rev 355) +++ trunk/ChangeLog 2006-05-22 13:43:56 UTC (rev 356) @@ -1,3 +1,9 @@ +2006-05-22 Enrico Troeger enrico.troeger@uvena.de + + * src/keybindings.c, src/utils.c: improved toggle visibility of + sidebar when toggled by keyboard + + 2006-05-21 Enrico Troeger enrico.troeger@uvena.de
* src/keybindings.c: added menu_messagewindow and toggle_sidebar
Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2006-05-22 11:55:07 UTC (rev 355) +++ trunk/src/keybindings.c 2006-05-22 13:43:56 UTC (rev 356) @@ -484,10 +484,28 @@
static void cb_func_toggle_sidebar(void) { - app->treeview_symbol_visible = ! app->treeview_symbol_visible; - app->treeview_openfiles_visible = ! app->treeview_openfiles_visible; + static gboolean symbol = FALSE; + static gboolean openfiles = FALSE; + static gboolean is_visible = FALSE;
- utils_treeviews_showhide();; + /* this code is a bit confusing, but I want to keep the settings in the preferences dialog + * synchronous with the real status of the sidebar, so we have to store the previous state when + * hiding the sidebar to restore it correctly */ + is_visible = (app->treeview_symbol_visible || app->treeview_openfiles_visible) ? TRUE : FALSE; + if (is_visible) + { + symbol = app->treeview_symbol_visible; + openfiles = app->treeview_openfiles_visible; + app->treeview_symbol_visible = FALSE; + app->treeview_openfiles_visible = FALSE; + } + else + { + app->treeview_symbol_visible = symbol; + app->treeview_openfiles_visible = openfiles; + } + + utils_treeviews_showhide(); }
static void cb_func_edit_duplicateline(void)
Modified: trunk/src/utils.c =================================================================== --- trunk/src/utils.c 2006-05-22 11:55:07 UTC (rev 355) +++ trunk/src/utils.c 2006-05-22 13:43:56 UTC (rev 356) @@ -649,7 +649,7 @@ }
// make all inactive, because there is no more tab left, or something strange occured - if (idx == -1 || ! app->treeview_symbol_visible || ! doc_list[idx].file_type->has_tags) + if (idx == -1 || ! doc_list[idx].file_type->has_tags) { gtk_widget_set_sensitive(app->tagbar, FALSE); gtk_container_add(GTK_CONTAINER(app->tagbar), app->default_tag_tree);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.