[Scummvm-git-logs] scummvm master -> 8d8e6765a245ad9fba15140e65616e38dca122c2
sev-
sev at scummvm.org
Mon Aug 2 15:09:21 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8d8e6765a2 GUI: Display last browse path and add button for resetting it
Commit: 8d8e6765a245ad9fba15140e65616e38dca122c2
https://github.com/scummvm/scummvm/commit/8d8e6765a245ad9fba15140e65616e38dca122c2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-08-02T17:09:03+02:00
Commit Message:
GUI: Display last browse path and add button for resetting it
This bumps the theme version.
The primary target is Android where a user may navigate to a location
where there is no read permission which leads to them being stuck.
This option has no effect on those native browse dialogs that do not
use the "browser_lastpath" config setting. Particularly, macOS is
not affected.
Changed paths:
gui/ThemeEngine.h
gui/options.cpp
gui/options.h
gui/themes/default.inc
gui/themes/residualvm.zip
gui/themes/residualvm/THEMERC
gui/themes/residualvm/residualvm_layout.stx
gui/themes/residualvm/residualvm_layout_lowres.stx
gui/themes/scummclassic.zip
gui/themes/scummclassic/THEMERC
gui/themes/scummclassic/classic_layout.stx
gui/themes/scummclassic/classic_layout_lowres.stx
gui/themes/scummmodern.zip
gui/themes/scummmodern/THEMERC
gui/themes/scummmodern/scummmodern_layout.stx
gui/themes/scummmodern/scummmodern_layout_lowres.stx
gui/themes/scummremastered.zip
gui/themes/scummremastered/THEMERC
gui/themes/scummremastered/remastered_layout.stx
gui/themes/scummremastered/remastered_layout_lowres.stx
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 77af3405de..760ee1938c 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.48"
+#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.49"
class OSystem;
diff --git a/gui/options.cpp b/gui/options.cpp
index 2401994592..80dcff2641 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -82,6 +82,7 @@ enum {
kSavePathClearCmd = 'clsp',
kChooseThemeDirCmd = 'chth',
kThemePathClearCmd = 'clth',
+ kBrowserPathClearCmd = 'clbr',
kChooseExtraDirCmd = 'chex',
kExtraPathClearCmd = 'clex',
kChoosePluginsDirCmd = 'chpl',
@@ -1867,6 +1868,8 @@ GlobalOptionsDialog::GlobalOptionsDialog(LauncherDialog *launcher)
_pluginsPath = nullptr;
_pluginsPathClearButton = nullptr;
#endif
+ _browserPath = nullptr;
+ _browserPathClearButton = nullptr;
_curTheme = nullptr;
_guiBasePopUpDesc = nullptr;
_guiBasePopUp = nullptr;
@@ -2242,6 +2245,14 @@ void GlobalOptionsDialog::addPathsControls(GuiObject *boss, const Common::String
if (confPath.empty())
confPath = g_system->getDefaultConfigFileName();
new StaticTextWidget(boss, prefix + "ConfigPath", _("ScummVM config path: ") + confPath, confPath);
+
+ Common::U32String browserPath = _("<default>");
+ if (ConfMan.hasKey("browser_lastpath"))
+ browserPath = ConfMan.get("browser_lastpath");
+
+ // I18N: Referring to the last path memorized when adding a game
+ _browserPath = new StaticTextWidget(boss, prefix + "BrowserPath", _("Last browser path: ") + browserPath, browserPath);
+ _browserPathClearButton = addClearButton(boss, prefix + "BrowserPathClearButton", kBrowserPathClearCmd);
}
void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String &prefix, bool lowres) {
@@ -2778,6 +2789,12 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
_pluginsPath->setLabel(_c("None", "path"));
break;
#endif
+ case kBrowserPathClearCmd:
+ ConfMan.removeKey("browser_lastpath", Common::ConfigManager::kApplicationDomain);
+ ConfMan.flushToDisk();
+ _browserPath->setLabel(_("Last browser path: ") + _("<default>"));
+
+ break;
#ifdef USE_CLOUD
#ifdef USE_SDL_NET
case kRootPathClearCmd:
@@ -3046,6 +3063,11 @@ void GlobalOptionsDialog::reflowLayout() {
_extraPathClearButton->setNext(nullptr);
delete _extraPathClearButton;
_extraPathClearButton = addClearButton(_tabWidget, "GlobalOptions_Paths.ExtraPathClearButton", kExtraPathClearCmd);
+
+ _tabWidget->removeWidget(_browserPathClearButton);
+ _browserPathClearButton->setNext(nullptr);
+ delete _browserPathClearButton;
+ _browserPathClearButton = addClearButton(_tabWidget, "GlobalOptions_Paths.BrowserPathClearButton", kBrowserPathClearCmd);
}
_tabWidget->setActiveTab(activeTab);
diff --git a/gui/options.h b/gui/options.h
index 0c670959cf..ede91be4ae 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -290,6 +290,8 @@ protected:
StaticTextWidget *_pluginsPath;
ButtonWidget *_pluginsPathClearButton;
#endif
+ StaticTextWidget *_browserPath;
+ ButtonWidget *_browserPathClearButton;
void addPathsControls(GuiObject *boss, const Common::String &prefix, bool lowres);
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 0bfa8eacd0..99d6edbb0e 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -1633,9 +1633,6 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"<widget name='grTouchpadCheckbox' "
"type='Checkbox' "
"/>"
-"<widget name='grOnScreenSAFRevokeCheckbox' "
-"type='Checkbox' "
-"/>"
"<widget name='grSwapMenuAndBackBtnsCheckbox' "
"type='Checkbox' "
"/>"
@@ -1952,7 +1949,7 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"width='Globals.Line.Height' "
"/>"
"</layout>"
-"<layout type='horizontal' padding='0,0,0,0' spacing='16'>"
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' align='center'>"
"<widget name='PluginsButton' "
"type='Button' "
"/>"
@@ -1965,6 +1962,15 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"/>"
"</layout>"
"<widget name='ConfigPath' height='Globals.Line.Height' />"
+"<layout type='horizontal' padding='0,0,0,0' spacing='10' align='center'>"
+"<widget name='BrowserPath' "
+"height='Globals.Line.Height' "
+"/>"
+"<widget name='BrowserPathClearButton' "
+"height='Globals.Line.Height' "
+"width='Globals.Line.Height' "
+"/>"
+"</layout>"
"</layout>"
"</dialog>"
"<dialog name='GlobalOptions_Misc' overlays='Dialog.GlobalOptions.TabWidget'>"
@@ -3476,9 +3482,6 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"<widget name='grTouchpadCheckbox' "
"type='Checkbox' "
"/>"
-"<widget name='grOnScreenSAFRevokeCheckbox' "
-"type='Checkbox' "
-"/>"
"<widget name='grSwapMenuAndBackBtnsCheckbox' "
"type='Checkbox' "
"/>"
@@ -3807,6 +3810,15 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"/>"
"</layout>"
"<widget name='ConfigPath' height='Globals.Line.Height' />"
+"<layout type='horizontal' padding='0,0,0,0' spacing='16'>"
+"<widget name='BrowserPath' "
+"height='Globals.Line.Height' "
+"/>"
+"<widget name='BrowserPathClearButton' "
+"height='Globals.Line.Height' "
+"width='Globals.Line.Height' "
+"/>"
+"</layout>"
"</layout>"
"</dialog>"
"<dialog name='GlobalOptions_Misc' overlays='Dialog.GlobalOptions.TabWidget'>"
diff --git a/gui/themes/residualvm.zip b/gui/themes/residualvm.zip
index eef585ee81..9cc96b602a 100644
Binary files a/gui/themes/residualvm.zip and b/gui/themes/residualvm.zip differ
diff --git a/gui/themes/residualvm/THEMERC b/gui/themes/residualvm/THEMERC
index 38131f98b0..e20a5058e2 100644
--- a/gui/themes/residualvm/THEMERC
+++ b/gui/themes/residualvm/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.48:ResidualVM Modern Theme:No Author]
+[SCUMMVM_STX0.8.49:ResidualVM Modern Theme:No Author]
diff --git a/gui/themes/residualvm/residualvm_layout.stx b/gui/themes/residualvm/residualvm_layout.stx
index 6299982b8a..9654dd8f37 100644
--- a/gui/themes/residualvm/residualvm_layout.stx
+++ b/gui/themes/residualvm/residualvm_layout.stx
@@ -615,6 +615,15 @@
/>
</layout>
<widget name = 'ConfigPath' height = 'Globals.Line.Height' />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+ <widget name = 'BrowserPath'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'BrowserPathClearButton'
+ height = 'Globals.Line.Height'
+ width = 'Globals.Line.Height'
+ />
+ </layout>
</layout>
</dialog>
diff --git a/gui/themes/residualvm/residualvm_layout_lowres.stx b/gui/themes/residualvm/residualvm_layout_lowres.stx
index 7dc0d4695c..bb1fffa29a 100644
--- a/gui/themes/residualvm/residualvm_layout_lowres.stx
+++ b/gui/themes/residualvm/residualvm_layout_lowres.stx
@@ -596,6 +596,15 @@
/>
</layout>
<widget name = 'ConfigPath' height = 'Globals.Line.Height' />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16' align = 'center'>
+ <widget name = 'BrowserPath'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'BrowserPathClearButton'
+ height = 'Globals.Line.Height'
+ width = 'Globals.Line.Height'
+ />
+ </layout>
</layout>
</dialog>
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index b47436bf1e..592a506a40 100644
Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ
diff --git a/gui/themes/scummclassic/THEMERC b/gui/themes/scummclassic/THEMERC
index de9947cf51..8717c19529 100644
--- a/gui/themes/scummclassic/THEMERC
+++ b/gui/themes/scummclassic/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.48:ScummVM Classic Theme:No Author]
+[SCUMMVM_STX0.8.49:ScummVM Classic Theme:No Author]
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 44951a4338..3582bb12b2 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -585,7 +585,7 @@
width = 'Globals.Line.Height'
/>
</layout>
- <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16'>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
<widget name = 'PluginsButton'
type = 'Button'
/>
@@ -598,6 +598,15 @@
/>
</layout>
<widget name = 'ConfigPath' height = 'Globals.Line.Height' />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+ <widget name = 'BrowserPath'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'BrowserPathClearButton'
+ height = 'Globals.Line.Height'
+ width = 'Globals.Line.Height'
+ />
+ </layout>
</layout>
</dialog>
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index c889eb1f72..386d69ec1d 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -593,6 +593,15 @@
/>
</layout>
<widget name = 'ConfigPath' height = 'Globals.Line.Height' />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16'>
+ <widget name = 'BrowserPath'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'BrowserPathClearButton'
+ height = 'Globals.Line.Height'
+ width = 'Globals.Line.Height'
+ />
+ </layout>
</layout>
</dialog>
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 478accc81d..d86b5b8cf1 100644
Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ
diff --git a/gui/themes/scummmodern/THEMERC b/gui/themes/scummmodern/THEMERC
index d13e792996..eb81b9693c 100644
--- a/gui/themes/scummmodern/THEMERC
+++ b/gui/themes/scummmodern/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.48:ScummVM Modern Theme:No Author]
+[SCUMMVM_STX0.8.49:ScummVM Modern Theme:No Author]
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index 6299982b8a..9654dd8f37 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -615,6 +615,15 @@
/>
</layout>
<widget name = 'ConfigPath' height = 'Globals.Line.Height' />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+ <widget name = 'BrowserPath'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'BrowserPathClearButton'
+ height = 'Globals.Line.Height'
+ width = 'Globals.Line.Height'
+ />
+ </layout>
</layout>
</dialog>
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index 7dc0d4695c..bb1fffa29a 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -596,6 +596,15 @@
/>
</layout>
<widget name = 'ConfigPath' height = 'Globals.Line.Height' />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16' align = 'center'>
+ <widget name = 'BrowserPath'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'BrowserPathClearButton'
+ height = 'Globals.Line.Height'
+ width = 'Globals.Line.Height'
+ />
+ </layout>
</layout>
</dialog>
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index 361b9a8445..baaa4f3720 100644
Binary files a/gui/themes/scummremastered.zip and b/gui/themes/scummremastered.zip differ
diff --git a/gui/themes/scummremastered/THEMERC b/gui/themes/scummremastered/THEMERC
index bbc4a7857d..bf495bf23a 100644
--- a/gui/themes/scummremastered/THEMERC
+++ b/gui/themes/scummremastered/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.48:ScummVM Modern Theme Remastered:No Author]
+[SCUMMVM_STX0.8.49:ScummVM Modern Theme Remastered:No Author]
diff --git a/gui/themes/scummremastered/remastered_layout.stx b/gui/themes/scummremastered/remastered_layout.stx
index a93dcf87b0..44f4f3bd03 100644
--- a/gui/themes/scummremastered/remastered_layout.stx
+++ b/gui/themes/scummremastered/remastered_layout.stx
@@ -617,6 +617,15 @@
/>
</layout>
<widget name = 'ConfigPath' height = 'Globals.Line.Height' />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' align = 'center'>
+ <widget name = 'BrowserPath'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'BrowserPathClearButton'
+ height = 'Globals.Line.Height'
+ width = 'Globals.Line.Height'
+ />
+ </layout>
</layout>
</dialog>
diff --git a/gui/themes/scummremastered/remastered_layout_lowres.stx b/gui/themes/scummremastered/remastered_layout_lowres.stx
index 3952929640..78b8d20afb 100644
--- a/gui/themes/scummremastered/remastered_layout_lowres.stx
+++ b/gui/themes/scummremastered/remastered_layout_lowres.stx
@@ -598,6 +598,15 @@
/>
</layout>
<widget name = 'ConfigPath' height = 'Globals.Line.Height' />
+ <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '16' align = 'center'>
+ <widget name = 'BrowserPath'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'BrowserPathClearButton'
+ height = 'Globals.Line.Height'
+ width = 'Globals.Line.Height'
+ />
+ </layout>
</layout>
</dialog>
More information about the Scummvm-git-logs
mailing list