Add more accessible option to re-enable the Aseprite file dialog (fix #4051)

As now the native file selector is the default one, we moved the
option to re-enable the previous file selector to Edit > Preferences >
General > Show Aseprite file dialog option.

Related to #3615 and added as a simple alternative to #2745 which
require native widgets on each native file dialog.
This commit is contained in:
David Capello 2023-10-04 16:57:11 -03:00
parent 5a59ed32c1
commit 3f101d48d4
3 changed files with 19 additions and 9 deletions

View File

@ -1513,6 +1513,7 @@ download_translations = Download Translations
gpu_acceleration = GPU acceleration [DEVMODE/INTERNAL TESTING ONLY]
gpu_acceleration_tooltip = Check this option to enable hardware acceleration
show_menu_bar = Show Aseprite menu bar
show_aseprite_file_dialog = Show Aseprite file dialog
show_home = Show Home tab when Aseprite is started
expand_menu_bar_items_on_mouseover = Expand menu bar items on mouseover
expand_menu_bar_items_on_mouseover_tooltip = <<<END

View File

@ -71,6 +71,8 @@
tooltip="@.gpu_acceleration_tooltip" />
<check id="show_menu_bar"
text="@.show_menu_bar" />
<check id="show_aseprite_file_dialog"
text="@.show_aseprite_file_dialog" />
<check id="show_home"
text="@.show_home" />
<check id="expand_menubar_on_mouseover"
@ -548,8 +550,10 @@
pref="experimental.new_blend" />
<link text="(#1096)" url="https://github.com/aseprite/aseprite/issues/1096" />
</hbox>
<check id="native_clipboard" text="@.native_clipboard" />
<check id="native_file_dialog" text="@.native_file_dialog" />
<check id="native_clipboard" text="@.native_clipboard"
pref="experimental.use_native_clipboard" />
<check id="native_file_dialog" text="@.native_file_dialog"
pref="experimental.use_native_file_dialog" />
<check id="tint_shade_tone_hue_with_sat_value"
text="@.hue_with_sat_value"
pref="experimental.hue_with_sat_value_for_color_selector" />

View File

@ -417,11 +417,18 @@ public:
onNativeCursorChange();
if (m_pref.experimental.useNativeClipboard())
nativeClipboard()->setSelected(true);
if (m_pref.experimental.useNativeFileDialog())
nativeFileDialog()->setSelected(true);
// "Show Aseprite file dialog" option is the inverse of the old
// experimental "use native file dialog" option
showAsepriteFileDialog()->setSelected(
!m_pref.experimental.useNativeFileDialog());
showAsepriteFileDialog()->Click.connect([this]{
nativeFileDialog()->setSelected(
!showAsepriteFileDialog()->isSelected());
});
nativeFileDialog()->Click.connect([this]{
showAsepriteFileDialog()->setSelected(
!nativeFileDialog()->isSelected());
});
#ifdef _WIN32 // Show Tablet section on Windows
{
@ -814,8 +821,6 @@ public:
m_pref.undo.allowNonlinearHistory(undoAllowNonlinearHistory()->isSelected());
// Experimental features
m_pref.experimental.useNativeClipboard(nativeClipboard()->isSelected());
m_pref.experimental.useNativeFileDialog(nativeFileDialog()->isSelected());
m_pref.experimental.flashLayer(flashLayer()->isSelected());
m_pref.experimental.nonactiveLayersOpacity(nonactiveLayersOpacity()->getValue());
m_pref.quantization.rgbmapAlgorithm(m_rgbmapAlgorithmSelector.algorithm());