Properly guard the automatic sidebar notebook tab hiding against older GTK versions

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4841 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2010-04-19 20:48:54 +00:00
parent c499da1b4d
commit 9761d8057d

View File

@ -988,12 +988,15 @@ void sidebar_focus_symbols_tab(void)
static void sidebar_tabs_show_hide(GtkNotebook *notebook, GtkWidget *child, static void sidebar_tabs_show_hide(GtkNotebook *notebook, GtkWidget *child,
guint page_num, gpointer data) guint page_num, gpointer data)
{ {
gint tabs = gtk_notebook_get_n_pages(notebook); if (gtk_check_version(2, 10, 0) == NULL)
{
gint tabs = gtk_notebook_get_n_pages(notebook);
if (interface_prefs.sidebar_symbol_visible == FALSE) if (interface_prefs.sidebar_symbol_visible == FALSE)
tabs--; tabs--;
if (interface_prefs.sidebar_openfiles_visible == FALSE) if (interface_prefs.sidebar_openfiles_visible == FALSE)
tabs--; tabs--;
gtk_notebook_set_show_tabs(notebook, (tabs > 1)); gtk_notebook_set_show_tabs(notebook, (tabs > 1));
}
} }