improved toggle visibility of sidebar when toggled by keyboard
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@356 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
573679601b
commit
db7f89ca65
@ -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>
|
2006-05-21 Enrico Troeger <enrico.troeger@uvena.de>
|
||||||
|
|
||||||
* src/keybindings.c: added menu_messagewindow and toggle_sidebar
|
* src/keybindings.c: added menu_messagewindow and toggle_sidebar
|
||||||
|
@ -484,10 +484,28 @@ static void cb_func_switch_tabright(void)
|
|||||||
|
|
||||||
static void cb_func_toggle_sidebar(void)
|
static void cb_func_toggle_sidebar(void)
|
||||||
{
|
{
|
||||||
app->treeview_symbol_visible = ! app->treeview_symbol_visible;
|
static gboolean symbol = FALSE;
|
||||||
app->treeview_openfiles_visible = ! app->treeview_openfiles_visible;
|
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)
|
static void cb_func_edit_duplicateline(void)
|
||||||
|
@ -649,7 +649,7 @@ void utils_update_tag_list(gint idx, gboolean update)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// make all inactive, because there is no more tab left, or something strange occured
|
// 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_widget_set_sensitive(app->tagbar, FALSE);
|
||||||
gtk_container_add(GTK_CONTAINER(app->tagbar), app->default_tag_tree);
|
gtk_container_add(GTK_CONTAINER(app->tagbar), app->default_tag_tree);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user