Properly show/hide the mesages window when using the View menu item (closes #2961282).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4734 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2010-03-07 17:57:45 +00:00
parent f07cd20405
commit 37b67fb9f5
2 changed files with 8 additions and 3 deletions

View File

@ -30,6 +30,8 @@
* src/callbacks.c:
Focus the editor widget after hiding the sidebar when it had the
input focus (patch by Can Koy, thanks).
Properly show/hide the mesages window when using the View menu item
(closes #2961282).
2010-03-05 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>

View File

@ -984,10 +984,11 @@ void
on_show_messages_window1_toggled (GtkCheckMenuItem *checkmenuitem,
gpointer user_data)
{
if (ignore_callback) return;
if (ignore_callback)
return;
ui_prefs.msgwindow_visible = (ui_prefs.msgwindow_visible) ? FALSE : TRUE;
ui_widget_show_hide(ui_lookup_widget(main_widgets.window, "scrolledwindow1"), ui_prefs.msgwindow_visible);
msgwin_show_hide(ui_prefs.msgwindow_visible);
}
@ -1664,9 +1665,11 @@ on_menu_show_sidebar1_toggled (GtkCheckMenuItem *checkmenuitem,
#if GTK_CHECK_VERSION(2, 14, 0)
/* if window has input focus, set it back to the editor before toggling off */
if (ui_prefs.sidebar_visible == FALSE &&
if (! ui_prefs.sidebar_visible &&
gtk_container_get_focus_child(GTK_CONTAINER(main_widgets.sidebar_notebook)) != NULL)
{
keybindings_send_command(GEANY_KEY_GROUP_FOCUS, GEANY_KEYS_FOCUS_EDITOR);
}
#endif
ui_sidebar_show_hide();