SF.net SVN: geany: [2186] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Wed Jan 23 14:12:08 UTC 2008
Revision: 2186
http://geany.svn.sourceforge.net/geany/?rev=2186&view=rev
Author: eht16
Date: 2008-01-23 06:12:08 -0800 (Wed, 23 Jan 2008)
Log Message:
-----------
Rename ui_treeviews_show_hide() in ui_sidebar_show_hide().
Don't hide sidebar when symbol and document lists are hidden but other notebook tabs are still there.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/callbacks.c
trunk/src/main.c
trunk/src/prefs.c
trunk/src/treeviews.c
trunk/src/ui_utils.c
trunk/src/ui_utils.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-01-23 13:36:53 UTC (rev 2185)
+++ trunk/ChangeLog 2008-01-23 14:12:08 UTC (rev 2186)
@@ -6,6 +6,11 @@
(trying to fix #1869399).
* src/prefs.c: Fix wrong placement of descriptive texts in Templates
and Tools tabs in the preferences dialog.
+ * src/callbacks.c, src/main.c, src/prefs.c, src/treeviews.c,
+ src/ui_utils.c, src/ui_utils.h:
+ Rename ui_treeviews_show_hide() in ui_sidebar_show_hide().
+ Don't hide sidebar when symbol and document lists are hidden but
+ other notebook tabs are still there.
2008-01-22 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2008-01-23 13:36:53 UTC (rev 2185)
+++ trunk/src/callbacks.c 2008-01-23 14:12:08 UTC (rev 2186)
@@ -1646,7 +1646,7 @@
prefs.sidebar_symbol_visible = TRUE;
}
- ui_treeviews_show_hide(TRUE);
+ ui_sidebar_show_hide();
gtk_notebook_set_current_page(GTK_NOTEBOOK(app->treeview_notebook), active_page);
}
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2008-01-23 13:36:53 UTC (rev 2185)
+++ trunk/src/main.c 2008-01-23 14:12:08 UTC (rev 2186)
@@ -187,7 +187,7 @@
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(app->window, "menu_show_sidebar1")), FALSE);
app->ignore_callback = FALSE;
}
- ui_treeviews_show_hide(TRUE);
+ ui_sidebar_show_hide();
// sets the icon style of the toolbar
switch (prefs.toolbar_icon_style)
{
Modified: trunk/src/prefs.c
===================================================================
--- trunk/src/prefs.c 2008-01-23 13:36:53 UTC (rev 2185)
+++ trunk/src/prefs.c 2008-01-23 14:12:08 UTC (rev 2186)
@@ -921,7 +921,7 @@
ui_update_toolbar_items();
ui_update_toolbar_icons(prefs.toolbar_icon_size);
gtk_toolbar_set_style(GTK_TOOLBAR(app->toolbar), prefs.toolbar_icon_style);
- ui_treeviews_show_hide(FALSE);
+ ui_sidebar_show_hide();
gtk_notebook_set_show_tabs(GTK_NOTEBOOK(app->notebook), prefs.show_notebook_tabs);
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(app->notebook), prefs.tab_pos_editor);
Modified: trunk/src/treeviews.c
===================================================================
--- trunk/src/treeviews.c 2008-01-23 13:36:53 UTC (rev 2185)
+++ trunk/src/treeviews.c 2008-01-23 14:12:08 UTC (rev 2186)
@@ -412,14 +412,14 @@
static void on_list_document_activate(GtkCheckMenuItem *item, gpointer user_data)
{
prefs.sidebar_openfiles_visible = gtk_check_menu_item_get_active(item);
- ui_treeviews_show_hide(FALSE);
+ ui_sidebar_show_hide();
}
static void on_list_symbol_activate(GtkCheckMenuItem *item, gpointer user_data)
{
prefs.sidebar_symbol_visible = gtk_check_menu_item_get_active(item);
- ui_treeviews_show_hide(FALSE);
+ ui_sidebar_show_hide();
}
@@ -555,7 +555,7 @@
static void on_openfiles_hide_item_clicked(GtkMenuItem *menuitem, gpointer user_data)
{
ui_prefs.sidebar_visible = FALSE;
- ui_treeviews_show_hide(TRUE);
+ ui_sidebar_show_hide();
}
@@ -615,13 +615,13 @@
case SYMBOL_ACTION_HIDE:
{
prefs.sidebar_symbol_visible = FALSE;
- ui_treeviews_show_hide(FALSE);
+ ui_sidebar_show_hide();
break;
}
case SYMBOL_ACTION_HIDE_ALL:
{
ui_prefs.sidebar_visible = FALSE;
- ui_treeviews_show_hide(TRUE);
+ ui_sidebar_show_hide();
break;
}
}
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2008-01-23 13:36:53 UTC (rev 2185)
+++ trunk/src/ui_utils.c 2008-01-23 14:12:08 UTC (rev 2186)
@@ -615,15 +615,14 @@
}
-void ui_treeviews_show_hide(G_GNUC_UNUSED gboolean force)
+void ui_sidebar_show_hide()
{
GtkWidget *widget;
-/* geany_debug("\nSidebar: %s\nSymbol: %s\nFiles: %s", ui_btoa(ui_prefs.sidebar_visible),
- ui_btoa(prefs.sidebar_symbol_visible), ui_btoa(prefs.sidebar_openfiles_visible));
-*/
-
- if (! prefs.sidebar_openfiles_visible && ! prefs.sidebar_symbol_visible)
+ // check that there are no other notebook pages before hiding the sidebar completely
+ // other pages could be e.g. the file browser plugin
+ if (! prefs.sidebar_openfiles_visible && ! prefs.sidebar_symbol_visible &&
+ gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->treeview_notebook)) <= 2)
{
ui_prefs.sidebar_visible = FALSE;
}
Modified: trunk/src/ui_utils.h
===================================================================
--- trunk/src/ui_utils.h 2008-01-23 13:36:53 UTC (rev 2185)
+++ trunk/src/ui_utils.h 2008-01-23 14:12:08 UTC (rev 2186)
@@ -140,7 +140,7 @@
void ui_document_buttons_update();
-void ui_treeviews_show_hide(gboolean force);
+void ui_sidebar_show_hide();
void ui_document_show_hide(gint idx);
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