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. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2186 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
26cf56ffc0
commit
a377002f4e
@ -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>
|
||||
|
@ -1646,7 +1646,7 @@ on_menu_show_sidebar1_toggled (GtkCheckMenuItem *checkmenuitem,
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ static void apply_settings(void)
|
||||
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)
|
||||
{
|
||||
|
@ -921,7 +921,7 @@ on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_data)
|
||||
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);
|
||||
|
@ -412,14 +412,14 @@ static void on_openfiles_fullpath_activate(GtkCheckMenuItem *item, gpointer user
|
||||
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_document_action(GtkMenuItem *menuitem, gpointer user_da
|
||||
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 @@ static void on_taglist_tree_popup_clicked(GtkMenuItem *menuitem, gpointer user_d
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -615,15 +615,14 @@ void ui_widget_show_hide(GtkWidget *widget, gboolean show)
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ void ui_save_buttons_toggle(gboolean enable);
|
||||
void ui_document_buttons_update();
|
||||
|
||||
|
||||
void ui_treeviews_show_hide(gboolean force);
|
||||
void ui_sidebar_show_hide();
|
||||
|
||||
void ui_document_show_hide(gint idx);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user