aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Crozat2018-12-16 15:56:37 +0000
committerThierry Crozat2018-12-16 15:58:44 +0000
commite7ba15fa32b80655f2068e818072a32257582f96 (patch)
tree15caca9b9226eadcba4e7056e89e2fbda7cbad50
parent319b90fb21f5c1e4ca9d9196b65aadb6e2529c09 (diff)
downloadscummvm-rg350-e7ba15fa32b80655f2068e818072a32257582f96.tar.gz
scummvm-rg350-e7ba15fa32b80655f2068e818072a32257582f96.tar.bz2
scummvm-rg350-e7ba15fa32b80655f2068e818072a32257582f96.zip
GUI: Add option to enable/disable using the system file browser
-rw-r--r--gui/ThemeEngine.h2
-rw-r--r--gui/options.cpp16
-rw-r--r--gui/options.h2
-rw-r--r--gui/themes/default.inc10
-rw-r--r--gui/themes/scummclassic.zipbin130822 -> 131157 bytes
-rw-r--r--gui/themes/scummclassic/THEMERC2
-rw-r--r--gui/themes/scummclassic/classic_layout.stx5
-rw-r--r--gui/themes/scummclassic/classic_layout_lowres.stx5
-rw-r--r--gui/themes/scummmodern.zipbin1650353 -> 1650688 bytes
-rw-r--r--gui/themes/scummmodern/THEMERC2
-rw-r--r--gui/themes/scummmodern/scummmodern_layout.stx5
-rw-r--r--gui/themes/scummmodern/scummmodern_layout_lowres.stx5
12 files changed, 51 insertions, 3 deletions
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index ab77cfcbcc..7f13f3b3e4 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -37,7 +37,7 @@
#include "graphics/pixelformat.h"
-#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.25"
+#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.26"
class OSystem;
diff --git a/gui/options.cpp b/gui/options.cpp
index 5c5c9ecd7c..7032d10130 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1468,6 +1468,7 @@ GlobalOptionsDialog::GlobalOptionsDialog(LauncherDialog *launcher)
_guiLanguagePopUpDesc = 0;
_guiLanguagePopUp = 0;
_guiLanguageUseGameLanguageCheckbox = nullptr;
+ _useSystemDialogsCheckbox = 0;
#ifdef USE_UPDATES
_updatesPopUpDesc = 0;
_updatesPopUp = 0;
@@ -1704,6 +1705,17 @@ void GlobalOptionsDialog::build() {
#endif // USE_TRANSLATION
+ if (g_system->hasFeature(OSystem::kFeatureNativeFileBowserDialog)) {
+ _useSystemDialogsCheckbox = new CheckboxWidget(tab, "GlobalOptions_Misc.UseSystemDialogs",
+ _("Use native system file browser"),
+ _("Use the native system file browser instead of the ScummVM one to select a file or directory.")
+ );
+
+ if (ConfMan.hasKey("gui_browser_native")) {
+ _useSystemDialogsCheckbox->setState(ConfMan.getBool("gui_browser_native", _domain));
+ }
+ }
+
#ifdef USE_UPDATES
_updatesPopUpDesc = new StaticTextWidget(tab, "GlobalOptions_Misc.UpdatesPopupDesc", _("Update check:"), _("How often to check ScummVM updates"));
_updatesPopUp = new PopUpWidget(tab, "GlobalOptions_Misc.UpdatesPopup");
@@ -1977,6 +1989,10 @@ void GlobalOptionsDialog::apply() {
ConfMan.setBool("gui_use_game_language", guiUseGameLanguage, _domain);
#endif
+ if (_useSystemDialogsCheckbox) {
+ ConfMan.setBool("gui_browser_native", _useSystemDialogsCheckbox->getState(), _domain);
+ }
+
GUI::ThemeEngine::GraphicsMode gfxMode = (GUI::ThemeEngine::GraphicsMode)_rendererPopUp->getSelectedTag();
Common::String oldGfxConfig = ConfMan.get("gui_renderer");
Common::String newGfxConfig = GUI::ThemeEngine::findModeConfigName(gfxMode);
diff --git a/gui/options.h b/gui/options.h
index 12b42bd3a0..ad9cb2aed9 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -282,6 +282,8 @@ protected:
StaticTextWidget *_guiLanguagePopUpDesc;
PopUpWidget *_guiLanguagePopUp;
CheckboxWidget *_guiLanguageUseGameLanguageCheckbox;
+ CheckboxWidget *_useSystemDialogsCheckbox;
+
#ifdef USE_UPDATES
StaticTextWidget *_updatesPopUpDesc;
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 499ae7b5ee..312f410b32 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -1140,6 +1140,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"/>"
"</layout>"
"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'>"
+"<widget name='UseSystemDialogs' "
+"type='Checkbox' "
+"/>"
+"</layout>"
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'>"
"<widget name='UpdatesPopupDesc' "
"type='OptionsLabel' "
"/>"
@@ -2749,6 +2754,11 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"/>"
"</layout>"
"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'>"
+"<widget name='UseSystemDialogs' "
+"type='Checkbox' "
+"/>"
+"</layout>"
+"<layout type='horizontal' padding='0,0,0,0' spacing='6' center='true'>"
"<widget name='UpdatesPopupDesc' "
"width='80' "
"height='Globals.Line.Height' "
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 2e283e3b79..a71e815e42 100644
--- a/gui/themes/scummclassic.zip
+++ b/gui/themes/scummclassic.zip
Binary files differ
diff --git a/gui/themes/scummclassic/THEMERC b/gui/themes/scummclassic/THEMERC
index dfbec63699..2523c45755 100644
--- a/gui/themes/scummclassic/THEMERC
+++ b/gui/themes/scummclassic/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.25:ScummVM Classic Theme:No Author]
+[SCUMMVM_STX0.8.26:ScummVM Classic Theme:No Author]
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 1ac639046b..c92c4d1718 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -573,6 +573,11 @@
/>
</layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'UseSystemDialogs'
+ type = 'Checkbox'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
<widget name = 'UpdatesPopupDesc'
type = 'OptionsLabel'
/>
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 71c8da3469..67e82f9127 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -575,6 +575,11 @@
/>
</layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
+ <widget name = 'UseSystemDialogs'
+ type = 'Checkbox'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
<widget name = 'UpdatesPopupDesc'
width = '80'
height = 'Globals.Line.Height'
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 197c5feff5..7ed30de8d1 100644
--- a/gui/themes/scummmodern.zip
+++ b/gui/themes/scummmodern.zip
Binary files differ
diff --git a/gui/themes/scummmodern/THEMERC b/gui/themes/scummmodern/THEMERC
index 61c5cfe72a..458e66808f 100644
--- a/gui/themes/scummmodern/THEMERC
+++ b/gui/themes/scummmodern/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.25:ScummVM Modern Theme:No Author]
+[SCUMMVM_STX0.8.26:ScummVM Modern Theme:No Author]
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index 48244c7a23..d6c927c251 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -587,6 +587,11 @@
/>
</layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
+ <widget name = 'UseSystemDialogs'
+ type = 'Checkbox'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
<widget name = 'UpdatesPopupDesc'
type = 'OptionsLabel'
/>
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index 685082e7e3..464450cbdc 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -573,6 +573,11 @@
/>
</layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
+ <widget name = 'UseSystemDialogs'
+ type = 'Checkbox'
+ />
+ </layout>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
<widget name = 'UpdatesPopupDesc'
width = '80'
height = 'Globals.Line.Height'