SF.net SVN: geany:[5422] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Mon Nov 22 13:49:39 UTC 2010
Revision: 5422
http://geany.svn.sourceforge.net/geany/?rev=5422&view=rev
Author: ntrel
Date: 2010-11-22 13:49:38 +0000 (Mon, 22 Nov 2010)
Log Message:
-----------
Fix auto-displaying of sidebar tab bar when sidebar is reshown.
Only auto-display symbols and documents tabs when showing the
sidebar if there are no plugin tabs.
Don't hide the sidebar on startup if only plugin tabs are visible
(fixes #3101867).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/callbacks.c
trunk/src/main.c
trunk/src/sidebar.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-11-22 12:45:20 UTC (rev 5421)
+++ trunk/ChangeLog 2010-11-22 13:49:38 UTC (rev 5422)
@@ -2,6 +2,12 @@
* doc/geany.txt, doc/geany.html:
Explain how to grep the source for Scintilla lexer properties.
+ * src/sidebar.c, src/callbacks.c, src/main.c:
+ Fix auto-displaying of sidebar tab bar when sidebar is reshown.
+ Only auto-display symbols and documents tabs when showing the
+ sidebar if there are no plugin tabs.
+ Don't hide the sidebar on startup if only plugin tabs are visible
+ (fixes #3101867).
2010-11-21 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2010-11-22 12:45:20 UTC (rev 5421)
+++ trunk/src/callbacks.c 2010-11-22 13:49:38 UTC (rev 5422)
@@ -1577,7 +1577,10 @@
ui_prefs.sidebar_visible = ! ui_prefs.sidebar_visible;
- if (! interface_prefs.sidebar_openfiles_visible && ! interface_prefs.sidebar_symbol_visible)
+ /* show built-in tabs if no tabs visible */
+ if (ui_prefs.sidebar_visible &&
+ ! interface_prefs.sidebar_openfiles_visible && ! interface_prefs.sidebar_symbol_visible &&
+ gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.sidebar_notebook)) <= 2)
{
interface_prefs.sidebar_openfiles_visible = TRUE;
interface_prefs.sidebar_symbol_visible = TRUE;
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2010-11-22 12:45:20 UTC (rev 5421)
+++ trunk/src/main.c 2010-11-22 13:49:38 UTC (rev 5422)
@@ -192,7 +192,6 @@
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "menu_show_sidebar1")), FALSE);
ignore_callback = FALSE;
}
- ui_sidebar_show_hide();
toolbar_apply_settings();
toolbar_update_ui();
@@ -1072,6 +1071,8 @@
plugins_load_active();
#endif
+ ui_sidebar_show_hide();
+
/* set the active sidebar page after plugins have been loaded */
gtk_notebook_set_current_page(GTK_NOTEBOOK(main_widgets.sidebar_notebook), ui_prefs.sidebar_page);
Modified: trunk/src/sidebar.c
===================================================================
--- trunk/src/sidebar.c 2010-11-22 12:45:20 UTC (rev 5421)
+++ trunk/src/sidebar.c 2010-11-22 13:49:38 UTC (rev 5422)
@@ -1043,6 +1043,10 @@
g_signal_connect(main_widgets.sidebar_notebook, "page-removed",
G_CALLBACK(sidebar_tabs_show_hide), NULL);
+
+ /* tabs may have changed when sidebar is reshown */
+ g_signal_connect(main_widgets.sidebar_notebook, "show",
+ G_CALLBACK(sidebar_tabs_show_hide), NULL);
}
sidebar_tabs_show_hide(GTK_NOTEBOOK(main_widgets.sidebar_notebook), NULL, 0, NULL);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list