aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/browser.h1
-rw-r--r--gui/browser_osx.mm73
-rw-r--r--gui/options.cpp2
-rw-r--r--gui/themes/translations.datbin435372 -> 441486 bytes
4 files changed, 75 insertions, 1 deletions
diff --git a/gui/browser.h b/gui/browser.h
index 7c098617bb..b82fe516f9 100644
--- a/gui/browser.h
+++ b/gui/browser.h
@@ -51,6 +51,7 @@ protected:
#ifdef MACOSX
const void *_titleRef;
const void *_chooseRef;
+ const void *_hiddenFilesRef;
#else
ListWidget *_fileList;
StaticTextWidget *_currentPath;
diff --git a/gui/browser_osx.mm b/gui/browser_osx.mm
index ecd60915f8..642718df94 100644
--- a/gui/browser_osx.mm
+++ b/gui/browser_osx.mm
@@ -30,10 +30,55 @@
#include "common/algorithm.h"
#include "common/translation.h"
+#include <AppKit/NSNibDeclarations.h>
#include <AppKit/NSOpenPanel.h>
+#include <AppKit/NSButton.h>
#include <Foundation/NSString.h>
#include <Foundation/NSURL.h>
+@interface ShowHiddenFilesController : NSObject {
+ NSOpenPanel* _panel;
+}
+
+- (id) init;
+- (void) dealloc;
+- (void) setOpenPanel : (NSOpenPanel*) panel;
+- (IBAction) showHiddenFiles : (id) sender;
+
+@end
+
+@implementation ShowHiddenFilesController
+
+- (id) init {
+ self = [super init];
+ _panel = 0;
+
+ return self;
+}
+
+- (void) dealloc {
+ [_panel release];
+ [super dealloc];
+}
+
+- (void) setOpenPanel : (NSOpenPanel*) panel {
+ _panel = panel;
+ [_panel retain];
+}
+
+
+- (IBAction) showHiddenFiles : (id) sender {
+ if ([sender state] == NSOnState) {
+ [_panel setShowsHiddenFiles: YES];
+ ConfMan.setBool("gui_browser_show_hidden", true, Common::ConfigManager::kApplicationDomain);
+ } else {
+ [_panel setShowsHiddenFiles: NO];
+ ConfMan.setBool("gui_browser_show_hidden", false, Common::ConfigManager::kApplicationDomain);
+ }
+}
+
+@end
+
namespace GUI {
BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
@@ -56,11 +101,13 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
// Convert button text to NSString
_chooseRef = CFStringCreateWithCString(0, _("Choose"), stringEncoding);
+ _hiddenFilesRef = CFStringCreateWithCString(0, _("Show hidden files"), stringEncoding);
}
BrowserDialog::~BrowserDialog() {
CFRelease(_titleRef);
CFRelease(_chooseRef);
+ CFRelease(_hiddenFilesRef);
}
int BrowserDialog::runModal() {
@@ -82,6 +129,29 @@ int BrowserDialog::runModal() {
[panel setCanChooseDirectories:_isDirBrowser];
[panel setTitle:(NSString *)_titleRef];
[panel setPrompt:(NSString *)_chooseRef];
+
+ NSButton *showHiddenFilesButton = 0;
+ ShowHiddenFilesController *showHiddenFilesController = 0;
+ if ([panel respondsToSelector:@selector(setShowsHiddenFiles:)]) {
+ showHiddenFilesButton = [[NSButton alloc] init];
+ [showHiddenFilesButton setButtonType:NSSwitchButton];
+ [showHiddenFilesButton setTitle:(NSString *)_hiddenFilesRef];
+ [showHiddenFilesButton sizeToFit];
+ if (ConfMan.getBool("gui_browser_show_hidden", Common::ConfigManager::kApplicationDomain)) {
+ [showHiddenFilesButton setState:NSOnState];
+ [panel setShowsHiddenFiles: YES];
+ } else {
+ [showHiddenFilesButton setState:NSOffState];
+ [panel setShowsHiddenFiles: NO];
+ }
+ [panel setAccessoryView:showHiddenFilesButton];
+
+ showHiddenFilesController = [[ShowHiddenFilesController alloc] init];
+ [showHiddenFilesController setOpenPanel:panel];
+ [showHiddenFilesButton setTarget:showHiddenFilesController];
+ [showHiddenFilesButton setAction:@selector(showHiddenFiles:)];
+ }
+
if ([panel runModal] == NSOKButton) {
NSURL *url = [panel URL];
if ([url isFileURL]) {
@@ -91,6 +161,9 @@ int BrowserDialog::runModal() {
}
}
+ [showHiddenFilesButton release];
+ [showHiddenFilesController release];
+
// If we were in fullscreen mode, switch back
if (wasFullscreen) {
g_system->beginGFXTransaction();
diff --git a/gui/options.cpp b/gui/options.cpp
index fb57c15d98..a9fdc19274 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -887,7 +887,7 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", _c("True Roland MT-32 (no GM emulation)", "lowres"), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
// GS Extensions setting
- _enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", _("Roland GS Mode (disable GM mapping)"), _("Turns off General MIDI mapping for games with Roland MT-32 soundtrack"));
+ _enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", _("Roland GS Device (enable MT-32 mappings)"), _("Check if you want to enable patch mappings to emulate an MT-32 on a Roland GS device"));
const MusicPlugin::List p = MusicMan.getPlugins();
// Make sure the null device is the first one in the list to avoid undesired
diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat
index b22316f880..7bd1316208 100644
--- a/gui/themes/translations.dat
+++ b/gui/themes/translations.dat
Binary files differ