mirror of https://github.com/snes9xgit/snes9x.git
GTK: Allow shutting off button and menu icons.
This commit is contained in:
parent
83916eb56d
commit
9c733497fe
|
@ -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::"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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 ();
|
||||
|
|
|
@ -9073,6 +9073,20 @@
|
|||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="force_enable_icons">
|
||||
<property name="label" translatable="yes">Force-enable button and menu icons</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox15">
|
||||
<property name="visible">True</property>
|
||||
|
@ -9112,7 +9126,7 @@
|
|||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -9154,7 +9168,7 @@
|
|||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
|
Loading…
Reference in New Issue