SF.net SVN: geany:[4009] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Tue Jul 21 22:10:42 UTC 2009


Revision: 4009
          http://geany.svn.sourceforge.net/geany/?rev=4009&view=rev
Author:   eht16
Date:     2009-07-21 22:10:42 +0000 (Tue, 21 Jul 2009)

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

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/main.c
    trunk/src/prefs.c
    trunk/src/toolbar.c
    trunk/src/toolbar.h

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-07-21 22:09:43 UTC (rev 4008)
+++ trunk/ChangeLog	2009-07-21 22:10:42 UTC (rev 4009)
@@ -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>

Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c	2009-07-21 22:09:43 UTC (rev 4008)
+++ trunk/src/main.c	2009-07-21 22:10:42 UTC (rev 4009)
@@ -170,13 +170,7 @@
 	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;

Modified: trunk/src/prefs.c
===================================================================
--- trunk/src/prefs.c	2009-07-21 22:09:43 UTC (rev 4008)
+++ trunk/src/prefs.c	2009-07-21 22:10:42 UTC (rev 4009)
@@ -1106,9 +1106,9 @@
 		/* 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);
 

Modified: trunk/src/toolbar.c
===================================================================
--- trunk/src/toolbar.c	2009-07-21 22:09:43 UTC (rev 4008)
+++ trunk/src/toolbar.c	2009-07-21 22:10:42 UTC (rev 4009)
@@ -484,6 +484,16 @@
 }
 
 
+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 */

Modified: trunk/src/toolbar.h
===================================================================
--- trunk/src/toolbar.h	2009-07-21 22:09:43 UTC (rev 4008)
+++ trunk/src/toolbar.h	2009-07-21 22:10:42 UTC (rev 4009)
@@ -49,6 +49,8 @@
 
 void toolbar_apply_settings(void);
 
+void toolbar_show_hide(void);
+
 void toolbar_item_ref(GtkToolItem *item);
 
 GtkWidget *toolbar_init(void);


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