summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2014-12-05 23:50:14 +0100
committerJonas Suhr Christensen <jsc@umbraculum.org>2014-12-05 23:50:14 +0100
commitd31ef86d0b51092bab5813f1cc893fdf6d688123 (patch)
treea21fe8b8dcb3ebb38e77a32a0efe19bff468341e
parent27d50151320e2bc23aa0f7629ddf042543eb909b (diff)
Removed printf/debug and outcommented code.
-rw-r--r--plugingui/lineedit.cc11
1 files changed, 0 insertions, 11 deletions
diff --git a/plugingui/lineedit.cc b/plugingui/lineedit.cc
index b8f7ca2..5e1eb9b 100644
--- a/plugingui/lineedit.cc
+++ b/plugingui/lineedit.cc
@@ -76,7 +76,6 @@ void GUI::LineEdit::setText(std::string text)
{
_text = text;
pos = text.size();
-// if(_text.size() < pos) pos = text.size();
repaintEvent(NULL);
textChanged();
@@ -99,7 +98,6 @@ void GUI::LineEdit::buttonEvent(ButtonEvent *e)
break;
}
}
-// if(e->x >= (int)(font.textWidth(_visibletext) + BORDER)) pos = _visibletext.length();
repaintEvent(NULL);
}
}
@@ -108,8 +106,6 @@ void GUI::LineEdit::keyEvent(GUI::KeyEvent *e)
{
if(readOnly()) return;
- DEBUG(lineedit, "Handling keyevent with text '%s'\n", _text.c_str());
-
bool change = false;
if(e->direction == -1) {
@@ -117,7 +113,6 @@ void GUI::LineEdit::keyEvent(GUI::KeyEvent *e)
if(e->keycode == GUI::KeyEvent::KEY_LEFT) {
if(pos) pos--;
if(offsetpos >= pos) walkstate = WALK_LEFT;
-// else walkstate = NOOP;
} else if(e->keycode == GUI::KeyEvent::KEY_HOME) {
pos = 0;
@@ -129,7 +124,6 @@ void GUI::LineEdit::keyEvent(GUI::KeyEvent *e)
if(pos < _text.length()) pos++;
if(offsetpos + _visibletext.length() <= pos &&
pos < _text.length()) walkstate = WALK_RIGHT;
-// else walkstate = NOOP;
} else if(e->keycode == GUI::KeyEvent::KEY_DELETE) {
if(pos < _text.length()) {
@@ -210,9 +204,6 @@ void GUI::LineEdit::repaintEvent(GUI::RepaintEvent *e)
}
}
else {
- DEBUG(lienedit, "Full text: '%s'\n", _text.c_str());
- DEBUG(lineedit, "Drawing text in lineedit '%s'\n", _visibletext.c_str());
- DEBUG(lineedit, "Offset, pos: %d, %d\n", offsetpos, pos);
break;
}
}
@@ -224,9 +215,7 @@ void GUI::LineEdit::repaintEvent(GUI::RepaintEvent *e)
if(readOnly()) return;
if(hasKeyboardFocus()) {
-// size_t px = font.textWidth(_text.substr(0, pos - offsetpos));
size_t px = font.textWidth(_visibletext.substr(0, pos - offsetpos));
- //p.setColour(Colour(0.8));
p.drawLine(px + BORDER - 1 - 4 + 3, 6,
px + BORDER - 1 - 4 + 3, height() - 7);
}