aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/credits.h8
-rw-r--r--gui/predictivedialog.cpp15
-rw-r--r--gui/recorderdialog.h2
-rw-r--r--gui/widgets/list.cpp3
4 files changed, 22 insertions, 6 deletions
diff --git a/gui/credits.h b/gui/credits.h
index b4d1680842..aca3745631 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -77,6 +77,12 @@ static const char *credits[] = {
"C0""Ludvig Strigeus",
"C2""(retired)",
"",
+"C1""AVALANCHE",
+"A0""Peter Bozso",
+"C0""Peter Bozs\363",
+"A0""Arnaud Boutonne",
+"C0""Arnaud Boutonn\351",
+"",
"C1""CGE",
"A0""Arnaud Boutonne",
"C0""Arnaud Boutonn\351",
@@ -621,6 +627,8 @@ static const char *credits[] = {
"C2""Several fixes for Simon1",
"C0""Jeroen Janssen",
"C2""Numerous readability and bugfix patches",
+"C0""Keith Kaisershot",
+"C2""Several Pegasus Prime patches",
"C0""Andreas Karlsson",
"C2""Initial port for SymbianOS",
"C0""Claudio Matsuoka",
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index 5ce093e054..ef94ec6d50 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -69,7 +69,7 @@ enum {
PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
new StaticTextWidget(this, "Predictive.Headline", "Enter Text");
- _btns = (ButtonWidget **)calloc(1, sizeof(ButtonWidget *) * 16);
+ _btns = (ButtonWidget **)calloc(16, sizeof(ButtonWidget *));
_btns[kCancelAct] = new ButtonWidget(this, "Predictive.Cancel", _("Cancel") , 0, kCancelCmd);
_btns[kOkAct] = new ButtonWidget(this, "Predictive.OK", _("Ok") , 0, kOkCmd);
@@ -144,6 +144,7 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
_currentWord.clear();
_wordNumber = 0;
_numMatchingWords = 0;
+ memset(_predictiveResult, 0, sizeof(_predictiveResult));
_lastbutton = kNoAct;
_mode = kModePre;
@@ -420,6 +421,9 @@ void PredictiveDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 d
case kCancelCmd:
saveUserDictToFile();
close();
+ // When we cancel the dialog no result should be returned. Thus, we
+ // will invalidate any result here.
+ _predictiveResult[0] = 0;
return;
case kOkCmd:
_currBtn = kOkAct;
@@ -614,7 +618,7 @@ void PredictiveDialog::handleTickle() {
void PredictiveDialog::mergeDicts() {
_unitedDict.dictLineCount = _predictiveDict.dictLineCount + _userDict.dictLineCount;
- _unitedDict.dictLine = (char **)calloc(1, sizeof(char *) * _unitedDict.dictLineCount);
+ _unitedDict.dictLine = (char **)calloc(_unitedDict.dictLineCount, sizeof(char *));
if (!_unitedDict.dictLine) {
debug("Predictive Dialog: cannot allocate memory for united dic");
@@ -853,7 +857,7 @@ void PredictiveDialog::addWord(Dict &dict, const Common::String &word, const Com
}
// start from here are INSERTING new line to dictionaty ( dict )
- char **newDictLine = (char **)calloc(1, sizeof(char *) * (dict.dictLineCount + 1));
+ char **newDictLine = (char **)calloc(dict.dictLineCount + 1, sizeof(char *));
if (!newDictLine) {
warning("Predictive Dialog: cannot allocate memory for index buffer");
@@ -861,7 +865,6 @@ void PredictiveDialog::addWord(Dict &dict, const Common::String &word, const Com
return;
}
- newDictLine[dict.dictLineCount] = '\0';
int k = 0;
bool inserted = false;
@@ -883,7 +886,7 @@ void PredictiveDialog::addWord(Dict &dict, const Common::String &word, const Com
free(dict.dictLine);
dict.dictLineCount += 1;
- dict.dictLine = (char **)calloc(1, sizeof(char *) * dict.dictLineCount);
+ dict.dictLine = (char **)calloc(dict.dictLineCount, sizeof(char *));
if (!dict.dictLine) {
warning("Predictive Dialog: cannot allocate memory for index buffer");
free(newDictLine);
@@ -935,7 +938,7 @@ void PredictiveDialog::loadDictionary(Common::SeekableReadStream *in, Dict &dict
ptr++;
}
- dict.dictLine = (char **)calloc(1, sizeof(char *) * lines);
+ dict.dictLine = (char **)calloc(lines, sizeof(char *));
if (dict.dictLine == NULL) {
warning("Predictive Dialog: Cannot allocate memory for line index buffer");
return;
diff --git a/gui/recorderdialog.h b/gui/recorderdialog.h
index eb690a4f38..9c5965f56d 100644
--- a/gui/recorderdialog.h
+++ b/gui/recorderdialog.h
@@ -34,6 +34,8 @@ class ContainerWidget;
class StaticTextWidget;
class RecorderDialog : public GUI::Dialog {
+ using GUI::Dialog::runModal;
+
private:
bool _firstScreenshotUpdate;
Common::PlaybackFile _playbackFile;
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp
index 473d5f04df..8ecb31311f 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -91,6 +91,9 @@ ListWidget::ListWidget(Dialog *boss, int x, int y, int w, int h, const char *too
// FIXME: This flag should come from widget definition
_editable = true;
+
+ _quickSelect = true;
+ _editColor = ThemeEngine::kFontColorNormal;
}
ListWidget::~ListWidget() {