From b9fcc55c0d13a98a03533889bc019f7679926a26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Wed, 28 Dec 2005 15:42:31 +0000 Subject: [PATCH] use utils_treeviews_showhide() to get the right settings at startup for the left side treeviews. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@82 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- src/main.c | 17 +++-------------- src/prefs.c | 12 +----------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/src/main.c b/src/main.c index 06933d5d..5976db19 100644 --- a/src/main.c +++ b/src/main.c @@ -79,7 +79,7 @@ void geany_debug(gchar const *format, ...) /* special things for the initial setup of the checkboxes and related stuff - * an action on a setting is only performed if the setting is unequal to the program default + * an action on a setting is only performed if the setting is not equal to the program default * (all the following code is not perfect but it works for the moment) */ void apply_settings(void) { @@ -90,19 +90,7 @@ void apply_settings(void) gtk_widget_hide(app->toolbar); app->toolbar_visible = FALSE; } - if (! app->treeview_symbol_visible) - { - //gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(app->window, "menu_show_symbol_window1")), FALSE); - gtk_widget_hide(app->treeview_notebook); - app->treeview_symbol_visible = FALSE; - } - if (! app->msgwindow_visible) - { - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(app->window, "menu_show_messages_window1")), FALSE); - gtk_container_remove(GTK_CONTAINER(lookup_widget(app->window, "vpaned1")), lookup_widget(app->window, "scrolledwindow1")); - app->msgwindow_visible = FALSE; - } - + utils_treeviews_showhide(); // sets the icon style of the toolbar switch (app->toolbar_icon_style) { @@ -259,6 +247,7 @@ gint main(gint argc, gchar **argv) app->save_filesel = NULL; app->prefs_dialog = NULL; app->find_dialog = NULL; + app->default_tag_tree = NULL; app->main_window_realized= FALSE; #ifdef HAVE_VTE app->have_vte = ! no_vte; diff --git a/src/prefs.c b/src/prefs.c index 00ee1c6a..2446d6d1 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -324,17 +324,7 @@ void on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_dat utils_widget_show_hide(lookup_widget(app->window, "entry1"), app->pref_main_show_search); utils_widget_show_hide(lookup_widget(app->window, "toolbutton18"), app->pref_main_show_search); utils_widget_show_hide(lookup_widget(app->window, "separatortoolitem4"), app->pref_main_show_search); - - utils_widget_show_hide(gtk_notebook_get_nth_page( - GTK_NOTEBOOK(app->treeview_notebook), 0), app->treeview_symbol_visible); - utils_widget_show_hide(gtk_notebook_get_nth_page( - GTK_NOTEBOOK(app->treeview_notebook), 1), app->treeview_openfiles_visible); - // hide complete notebook if both pages are hidden - if ((! app->treeview_symbol_visible) && (! app->treeview_openfiles_visible)) - gtk_widget_hide(app->treeview_notebook); - else - gtk_widget_show(app->treeview_notebook); - + utils_treeviews_showhide(); gtk_widget_modify_font(lookup_widget(app->window, "treeview2"), pango_font_description_from_string(app->tagbar_font)); gtk_widget_modify_font(lookup_widget(app->window, "entry1"), pango_font_description_from_string(app->tagbar_font));