diff --git a/gtk/src/gtk_config.cpp b/gtk/src/gtk_config.cpp index d55e5ed3..90f8f5b8 100644 --- a/gtk/src/gtk_config.cpp +++ b/gtk/src/gtk_config.cpp @@ -115,6 +115,7 @@ int Snes9xConfig::load_defaults () preferences_height = -1; shader_parameters_width = -1; shader_parameters_height = -1; + enable_icons = true; current_display_tab = 0; sram_directory.clear (); export_directory.clear (); @@ -310,6 +311,7 @@ int Snes9xConfig::save_config_file () cf.SetInt (z"ShaderParametersHeight", shader_parameters_height); cf.SetInt (z"CurrentDisplayTab", current_display_tab); outbool (cf, z"UIVisible", ui_visible); + outbool (cf, z"EnableIcons", enable_icons); if (default_esc_behavior != ESC_TOGGLE_MENUBAR) outbool (cf, z"Fullscreen", 0); else @@ -542,6 +544,7 @@ int Snes9xConfig::load_config_file () inint (z"CurrentDisplayTab", current_display_tab); inbool (z"UIVisible", ui_visible); inbool (z"Fullscreen", fullscreen); + inbool (z"EnableIcons", enable_icons); #undef z #define z "Netplay::" diff --git a/gtk/src/gtk_config.h b/gtk/src/gtk_config.h index cca16ce7..c816e4a9 100644 --- a/gtk/src/gtk_config.h +++ b/gtk/src/gtk_config.h @@ -140,6 +140,7 @@ class Snes9xConfig int num_threads; bool screensaver_needs_reset; bool modal_dialogs; + bool enable_icons; bool pointer_is_visible; gint64 pointer_timestamp; diff --git a/gtk/src/gtk_preferences.cpp b/gtk/src/gtk_preferences.cpp index 1a64bd6a..e4f8ccae 100644 --- a/gtk/src/gtk_preferences.cpp +++ b/gtk/src/gtk_preferences.cpp @@ -669,6 +669,11 @@ Snes9xPreferences::move_settings_to_dialog () set_spin ("superfx_multiplier", Settings.SuperFXClockMultiplier); set_combo ("splash_background", config->splash_image); +#if GTK_MAJOR_VERSION < 3 + gtk_widget_hide (get_widget ("force_enable_icons")); +#endif + set_check ("force_enable_icons", config->enable_icons); + int num_sound_drivers = 0; #ifdef USE_PORTAUDIO num_sound_drivers++; @@ -808,6 +813,15 @@ Snes9xPreferences::get_settings_from_dialog () if (config->force_inverted_byte_order != get_check ("force_inverted_byte_order")) gfx_needs_restart = true; + config->enable_icons = get_check ("force_enable_icons"); +#if GTK_MAJOR_VERSION >= 3 + auto settings = gtk_settings_get_default(); + g_object_set(settings, + "gtk-menu-images", gui_config->enable_icons, + "gtk_button_images", gui_config->enable_icons, + NULL); +#endif + config->full_screen_on_open = get_check ("full_screen_on_open"); Settings.DisplayFrameRate = get_check ("show_frame_rate"); Settings.DisplayPressedKeys = get_check ("show_pressed_keys"); diff --git a/gtk/src/gtk_s9x.cpp b/gtk/src/gtk_s9x.cpp index 86e4159d..fcd52656 100644 --- a/gtk/src/gtk_s9x.cpp +++ b/gtk/src/gtk_s9x.cpp @@ -63,7 +63,10 @@ int main (int argc, char *argv[]) #if GTK_MAJOR_VERSION >= 3 auto settings = gtk_settings_get_default(); - g_object_set(settings, "gtk-menu-images", true, "gtk_button_images", true, NULL); + g_object_set(settings, + "gtk-menu-images", gui_config->enable_icons, + "gtk_button_images", gui_config->enable_icons, + NULL); #endif S9xReportControllers (); diff --git a/gtk/src/snes9x.ui b/gtk/src/snes9x.ui index c0a353c6..ece879d8 100644 --- a/gtk/src/snes9x.ui +++ b/gtk/src/snes9x.ui @@ -9073,6 +9073,20 @@ 0 + + + Force-enable button and menu icons + True + True + False + True + + + False + True + 1 + + True @@ -9112,7 +9126,7 @@ False True - 1 + 2 @@ -9154,7 +9168,7 @@ False True - 2 + 3