aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorJordi Vilalta Prat2010-10-12 02:18:11 +0000
committerJordi Vilalta Prat2010-10-12 02:18:11 +0000
commit8388e0dfea4ae0d80e51368acd12685c740c5bb5 (patch)
treef960376a145a830cd77b08264c1412f71ec02f7e /gui
parent43161858ac14bae4ac6dea114d8b3e7a8c1b293b (diff)
downloadscummvm-rg350-8388e0dfea4ae0d80e51368acd12685c740c5bb5.tar.gz
scummvm-rg350-8388e0dfea4ae0d80e51368acd12685c740c5bb5.tar.bz2
scummvm-rg350-8388e0dfea4ae0d80e51368acd12685c740c5bb5.zip
JANITORAL: Clean trailing whitespaces.
svn-id: r53160
Diffstat (limited to 'gui')
-rw-r--r--gui/GuiManager.cpp2
-rw-r--r--gui/ThemeEngine.cpp6
-rw-r--r--gui/Tooltip.cpp18
-rw-r--r--gui/Tooltip.h9
-rw-r--r--gui/launcher.cpp2
-rw-r--r--gui/options.cpp6
-rw-r--r--gui/themes/scummmodern/scummmodern_layout.stx2
-rwxr-xr-xgui/themes/scummtheme.py36
8 files changed, 41 insertions, 40 deletions
diff --git a/gui/GuiManager.cpp b/gui/GuiManager.cpp
index 44c6530d7e..a2a8654bf6 100644
--- a/gui/GuiManager.cpp
+++ b/gui/GuiManager.cpp
@@ -62,7 +62,7 @@ GuiManager::GuiManager() : _redrawStatus(kRedrawDisabled), _tooltipCheck(false),
// Clear the cursor
memset(_cursor, 0xFF, sizeof(_cursor));
-
+
// Enable translation
TransMan.setLanguage(ConfMan.get("gui_language").c_str());
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 3d3aca5c5a..d9a1e05855 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -573,7 +573,7 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &file) {
if (!_texts[textId]->_fontPtr) {
// First try to load localized font
_texts[textId]->_fontPtr = loadFont(localized);
-
+
if (_texts[textId]->_fontPtr)
FontMan.assignFontToName(file, _texts[textId]->_fontPtr);
@@ -581,14 +581,14 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &file) {
else {
// Try built-in fonts
_texts[textId]->_fontPtr = FontMan.getFontByName(file);
-
+
// Try to load it
if (!_texts[textId]->_fontPtr) {
_texts[textId]->_fontPtr = loadFont(file);
if (!_texts[textId]->_fontPtr)
error("Couldn't load font '%s'", file.c_str());
-
+
FontMan.assignFontToName(file, _texts[textId]->_fontPtr);
}
TransMan.setLanguage("C");
diff --git a/gui/Tooltip.cpp b/gui/Tooltip.cpp
index 64c34688df..272fa66072 100644
--- a/gui/Tooltip.cpp
+++ b/gui/Tooltip.cpp
@@ -34,7 +34,7 @@
namespace GUI {
-Tooltip::Tooltip() :
+Tooltip::Tooltip() :
Dialog(-1, -1, -1, -1), _maxWidth(-1) {
_backgroundType = GUI::ThemeEngine::kDialogBackgroundTooltip;
@@ -69,7 +69,7 @@ bool Tooltip::tooltipModal(int x, int y) {
_h = (tooltipFont->getFontHeight() + 2) * _wrappedLines.size();
_x = MIN<int16>(g_gui.getTopDialog()->_x + x + _xdelta, g_gui.getWidth() - _w - 3);
- _y = MIN<int16>(g_gui.getTopDialog()->_y + y + _ydelta, g_gui.getHeight() - _h - 3);
+ _y = MIN<int16>(g_gui.getTopDialog()->_y + y + _ydelta, g_gui.getHeight() - _h - 3);
open();
g_gui.runLoop();
@@ -85,14 +85,14 @@ void Tooltip::drawDialog() {
for (Common::StringArray::const_iterator i = _wrappedLines.begin(); i != _wrappedLines.end(); ++i, ++num) {
g_gui.theme()->drawText(
- Common::Rect(_x + 1, _y + 1 + num * h, _x + 1 +_w, _y + 1+ (num + 1) * h), *i,
- ThemeEngine::kStateEnabled,
- Graphics::kTextAlignLeft,
- ThemeEngine::kTextInversionNone,
+ Common::Rect(_x + 1, _y + 1 + num * h, _x + 1 +_w, _y + 1+ (num + 1) * h), *i,
+ ThemeEngine::kStateEnabled,
+ Graphics::kTextAlignLeft,
+ ThemeEngine::kTextInversionNone,
0,
- false,
- ThemeEngine::kFontStyleTooltip,
- ThemeEngine::kFontColorNormal,
+ false,
+ ThemeEngine::kFontStyleTooltip,
+ ThemeEngine::kFontColorNormal,
false
);
}
diff --git a/gui/Tooltip.h b/gui/Tooltip.h
index 60f3cf3a19..02eb01d0d0 100644
--- a/gui/Tooltip.h
+++ b/gui/Tooltip.h
@@ -33,7 +33,7 @@ class Tooltip : public Dialog {
public:
Tooltip();
~Tooltip() {}
-
+
void drawDialog();
bool tooltipModal(int x, int y);
void mustClose();
@@ -44,7 +44,8 @@ protected:
int _xdelta, _ydelta;
Common::StringArray _wrappedLines;
-};
-}
+};
+
+} // End of namespace GUI
-#endif
+#endif // GUI_TOOLTIP_H
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index bc26fe3d47..63d3ba6954 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -1054,7 +1054,7 @@ void LauncherDialog::updateButtons() {
int modifiers = g_system->getEventManager()->getModifierState();
const bool massAdd = (modifiers & Common::KBD_SHIFT) != 0;
const bool lowRes = g_system->getOverlayWidth() <= 320;
-
+
const char *newAddButtonLabel = massAdd
? (lowRes ? _c("Mass Add...", "lowres") : _("Mass Add..."))
: (lowRes ? _c("Add Game...", "lowres") : _("Add Game..."));
diff --git a/gui/options.cpp b/gui/options.cpp
index 2809a68b92..e7888cf095 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -630,7 +630,7 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
Common::String context;
if (g_system->getOverlayWidth() <= 320)
context = "lowres";
-
+
// The GFX mode popup
_gfxPopUpDesc = new StaticTextWidget(boss, prefix + "grModePopupDesc", _("Graphics mode:"));
_gfxPopUp = new PopUpWidget(boss, prefix + "grModePopup");
@@ -798,7 +798,7 @@ void OptionsDialog::addSubtitleControls(GuiObject *boss, const Common::String &p
_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, _("Speech"));
_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, _("Subtitles"));
_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, _("Both"));
-
+
_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", _("Subtitle speed:"));
} else {
_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", _c("Text and Speech:", "lowres"));
@@ -808,7 +808,7 @@ void OptionsDialog::addSubtitleControls(GuiObject *boss, const Common::String &p
_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, _("Spch"), _("Speech"));
_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, _("Subs"), _("Subtitles"));
_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, _c("Both", "lowres"), _("Show subtitles and play speech"));
-
+
_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", _c("Subtitle speed:", "lowres"));
}
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index 95d775e5ea..51f1ce6c6f 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -344,7 +344,7 @@
<widget name = 'auPrefGmPopup'
type = 'PopUp'
/>
- </layout>
+ </layout>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
<widget name = 'mcFontButton'
type = 'Button'
diff --git a/gui/themes/scummtheme.py b/gui/themes/scummtheme.py
index 4a03c89799..e4e9549265 100755
--- a/gui/themes/scummtheme.py
+++ b/gui/themes/scummtheme.py
@@ -11,28 +11,28 @@ def buildTheme(themeName):
if not os.path.isdir(themeName) or not os.path.isfile(os.path.join(themeName, "THEMERC")):
print ("Invalid theme name: " + themeName)
return
-
+
zf = zipfile.ZipFile(themeName + ".zip", 'w')
-
+
print ("Building '" + themeName + "' theme:")
os.chdir(themeName)
-
+
zf.write('THEMERC', './THEMERC')
-
+
for filename in os.listdir('.'):
if os.path.isfile(filename) and not filename[0] == '.' and filename.endswith(THEME_FILE_EXTENSIONS):
zf.write(filename, './' + filename)
print (" Adding file: " + filename)
-
+
os.chdir('../')
-
+
zf.close()
def buildAllThemes():
for f in os.listdir('.'):
if os.path.isdir(os.path.join('.', f)) and not f[0] == '.':
buildTheme(f)
-
+
def parseSTX(theme_file, def_file):
comm = re.compile("<!--(.*?)-->", re.DOTALL)
head = re.compile("<\?(.*?)\?>")
@@ -40,33 +40,33 @@ def parseSTX(theme_file, def_file):
output = ""
for line in theme_file:
output += line.rstrip("\r\n\t ").lstrip() + " \n"
-
+
output = re.sub(comm, "", output)
output = re.sub(head, "", output)
output = output.replace("\t", " ").replace(" ", " ").replace("\"", "'")
output = output.replace(" = ", "=").replace(", ", ",")
-
+
for line in output.splitlines():
if line and not line.isspace():
def_file.write("\"" + line + "\"\n")
def buildDefTheme(themeName):
def_file = open("default.inc", "w")
-
+
if not os.path.isdir(themeName):
print ("Cannot open default theme dir.")
-
+
def_file.write(""" "<?xml version = '1.0'?>"\n""")
-
+
for filename in os.listdir(themeName):
filename = os.path.join(themeName, filename)
if os.path.isfile(filename) and filename.endswith(".stx"):
theme_file = open(filename, "r")
parseSTX(theme_file, def_file)
theme_file.close()
-
+
def_file.close()
-
+
def printUsage():
print ("===============================")
print ("ScummVM Theme Generation Script")
@@ -80,16 +80,16 @@ def printUsage():
print (" Creates a 'default.inc' file to embed the given theme in the source code.\n")
def main():
-
+
if len(sys.argv) == 2 and sys.argv[1] == "makeall":
buildAllThemes()
-
+
elif len(sys.argv) == 3 and sys.argv[1] == "make":
buildTheme(sys.argv[2])
-
+
elif len(sys.argv) == 3 and sys.argv[1] == "default":
buildDefTheme(sys.argv[2])
-
+
else:
printUsage()