diff --git a/src/main.c b/src/main.c index eab57e4496d3df1e77719cd601bb023980bb3f6e..b07b1066ec7708ee940c1a544e09aa52adfd3993 100644 --- a/src/main.c +++ b/src/main.c @@ -774,10 +774,10 @@ main (gint argc, gchar ** argv) #if !GLIB_CHECK_VERSION(2,36,0) g_type_init (); #endif - read_settings (); gtk_init (&argc, &argv); g_set_application_name ("YAD"); + read_settings (); yad_options_init (); ctx = yad_create_context (); @@ -830,12 +830,7 @@ main (gint argc, gchar ** argv) /* set default icons and icon theme */ if (options.data.icon_theme) - { - settings.icon_theme = gtk_icon_theme_new (); - gtk_icon_theme_set_custom_theme (settings.icon_theme, options.data.icon_theme); - } - else - settings.icon_theme = gtk_icon_theme_get_default (); + gtk_icon_theme_set_custom_theme (settings.icon_theme, options.data.icon_theme); gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &w, &h); settings.big_fallback_image = gtk_icon_theme_load_icon (settings.icon_theme, "yad", MIN (w, h), GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL); diff --git a/src/util.c b/src/util.c index a976429c2fc92f71c3d5ffd1743f92a0885e40c3..9d49dc661f462183adc870c0c42eb40c1f077285 100644 --- a/src/util.c +++ b/src/util.c @@ -52,6 +52,8 @@ read_settings (void) settings.print_settings = NULL; settings.page_setup = NULL; + + settings.icon_theme = gtk_icon_theme_get_default (); filename = g_build_filename (g_get_user_config_dir (), YAD_SETTINGS_FILE, NULL);