aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/predictivedialog.cpp4
-rw-r--r--gui/predictivedialog.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index 627e6c1b96..e7766de586 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -70,8 +70,6 @@ enum {
PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
new StaticTextWidget(this, "Predictive.Headline", "Enter Text");
- _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);
_btns[kBtn1Act] = new ButtonWidget(this, "Predictive.Button1", "1 `-.&" , 0, kBut1Cmd);
@@ -153,8 +151,6 @@ PredictiveDialog::~PredictiveDialog() {
free(_userDict.dictLine);
free(_predictiveDict.dictLine);
free(_unitedDict.dictLine);
-
- free(_btns);
}
void PredictiveDialog::reflowLayout() {
diff --git a/gui/predictivedialog.h b/gui/predictivedialog.h
index a7b7b993cc..c64fcc8264 100644
--- a/gui/predictivedialog.h
+++ b/gui/predictivedialog.h
@@ -54,6 +54,10 @@ enum ButtonId {
};
enum {
+ kButtonCount = kBtn0Act + 1
+};
+
+enum {
kRepeatDelay = 500
};
@@ -140,7 +144,7 @@ private:
bool _needRefresh;
private:
EditTextWidget *_edittext;
- ButtonWidget **_btns;
+ ButtonWidget *_btns[kButtonCount];
};
} // namespace GUI