Kaydet (Commit) f217a608 authored tarafından Enrico Tröger's avatar Enrico Tröger

Show/hide the toolbar without a restart when the setting in the preferences…

Show/hide the toolbar without a restart when the setting in the preferences dialog is changed (closes #2824785).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4009 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 45d64e86
......@@ -3,6 +3,9 @@
* src/utils.c:
Start unifying usage of @a and @c markup elements in API docs,
to be continued.
* src/main.c, src/prefs.c, src/toolbar.c, src/toolbar.h:
Show/hide the toolbar without a restart when the setting in the
preferences dialog is changed (closes #2824785).
2009-07-21 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
......
......@@ -170,13 +170,7 @@ static void apply_settings(void)
ui_update_fold_items();
/* toolbar, message window and sidebar are by default visible, so don't change it if it is true */
if (! toolbar_prefs.visible)
{
ignore_callback = TRUE;
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "menu_show_toolbar1")), FALSE);
gtk_widget_hide(main_widgets.toolbar);
ignore_callback = FALSE;
}
toolbar_show_hide();
if (! ui_prefs.msgwindow_visible)
{
ignore_callback = TRUE;
......
......@@ -1106,9 +1106,9 @@ on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_data)
/* apply the changes made */
ui_statusbar_showhide(interface_prefs.statusbar_visible);
treeviews_openfiles_update_all(); /* to update if full path setting has changed */
gtk_toolbar_set_icon_size(GTK_TOOLBAR(main_widgets.toolbar), toolbar_prefs.icon_size);
gtk_toolbar_set_style(GTK_TOOLBAR(main_widgets.toolbar), toolbar_prefs.icon_style);
toolbar_apply_settings();
toolbar_update_ui();
toolbar_show_hide();
ui_sidebar_show_hide();
gtk_notebook_set_show_tabs(GTK_NOTEBOOK(main_widgets.notebook), interface_prefs.show_notebook_tabs);
......
......@@ -484,6 +484,16 @@ void toolbar_finalize(void)
}
void toolbar_show_hide(void)
{
ignore_callback = TRUE;
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(
ui_lookup_widget(main_widgets.window, "menu_show_toolbar1")), toolbar_prefs.visible);
ui_widget_show_hide(main_widgets.toolbar, toolbar_prefs.visible);
ignore_callback = FALSE;
}
void toolbar_apply_settings(void)
{
/* sets the icon style of the toolbar */
......
......@@ -49,6 +49,8 @@ void toolbar_update_ui(void);
void toolbar_apply_settings(void);
void toolbar_show_hide(void);
void toolbar_item_ref(GtkToolItem *item);
GtkWidget *toolbar_init(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment