Revision: 522 Author: ntrel Date: 2006-07-01 11:49:44 -0700 (Sat, 01 Jul 2006) ViewCVS: http://svn.sourceforge.net/geany/?rev=522&view=rev
Log Message: ----------- Use the user settings for toolbar icon size & style
Modified Paths: -------------- trunk/ChangeLog trunk/src/keyfile.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-07-01 17:41:46 UTC (rev 521) +++ trunk/ChangeLog 2006-07-01 18:49:44 UTC (rev 522) @@ -21,6 +21,7 @@ Add utils_find_tm_tag. * src/keyfile.c: Save the toolbar icon size when quitting. Set large toolbar icons by default. + * src/keyfile.c: Use the user settings for toolbar icon size & style.
2006-06-30 Enrico Tröger enrico.troeger@uvena.de
Modified: trunk/src/keyfile.c =================================================================== --- trunk/src/keyfile.c 2006-07-01 17:41:46 UTC (rev 521) +++ trunk/src/keyfile.c 2006-07-01 18:49:44 UTC (rev 522) @@ -191,6 +191,14 @@ }
+#define GEANY_GET_SETTING(propertyname, value, default_value) \ + if (g_object_class_find_property( \ + G_OBJECT_GET_CLASS(G_OBJECT(gtk_settings_get_default())), propertyname)) \ + g_object_get(G_OBJECT(gtk_settings_get_default()), propertyname, &value, \ + NULL); \ + else \ + value = default_value; + gboolean configuration_load(void) { gboolean config_exists; @@ -207,10 +215,17 @@ config_exists = g_key_file_load_from_file(config, configfile, G_KEY_FILE_KEEP_COMMENTS, NULL);
app->toolbar_visible = utils_get_setting_boolean(config, PACKAGE, "toolbar_visible", TRUE); + { + GtkIconSize tb_iconsize; + GtkToolbarStyle tb_style; + GEANY_GET_SETTING("gtk-toolbar-style", tb_style, GTK_TOOLBAR_ICONS); + GEANY_GET_SETTING("gtk-toolbar-icon-size", tb_iconsize, + GTK_ICON_SIZE_LARGE_TOOLBAR); + app->toolbar_icon_style = utils_get_setting_integer(config, PACKAGE, "toolbar_icon_style", tb_style); + app->toolbar_icon_size = utils_get_setting_integer(config, PACKAGE, "toolbar_icon_size", tb_iconsize); + } app->beep_on_errors = utils_get_setting_boolean(config, PACKAGE, "beep_on_errors", TRUE); app->mru_length = utils_get_setting_integer(config, PACKAGE, "mru_length", GEANY_DEFAULT_MRU_LENGHTH); - app->toolbar_icon_style = utils_get_setting_integer(config, PACKAGE, "toolbar_icon_style", GTK_TOOLBAR_ICONS); - app->toolbar_icon_size = utils_get_setting_integer(config, PACKAGE, "toolbar_icon_size", GTK_ICON_SIZE_LARGE_TOOLBAR); app->long_line_type = utils_get_setting_integer(config, PACKAGE, "long_line_type", 0); app->long_line_color = utils_get_setting_string(config, PACKAGE, "long_line_color", "#C2EBC2"); app->long_line_column = utils_get_setting_integer(config, PACKAGE, "long_line_column", 72);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.