[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/kturtle/src
From: Anne-Marie Mahfouf <annma () kde ! org>
Date: 2003-12-28 19:59:00
[Download RAW message or body]
CVS commit by annma:
at start, disable execute and enable it when some stuff is written in editor
M +7 -4 kturtle.cpp 1.5
M +1 -0 kturtle.h 1.2
--- kdenonbeta/kturtle/src/kturtle.cpp #1.4:1.5
@@ -70,4 +70,5 @@ void MainWindow::setupActions() {
run = new KAction(i18n("&Execute Commands"), "gear", 0, this, SLOT(slotRun()),
actionCollection(), "run");
+ run->setEnabled(false);
//
KStdAction::print(this, SLOT(slotPrint()), actionCollection());
@@ -146,4 +147,6 @@ void MainWindow::setupEditor() {
// probably when going from KTextEdit to KTextEditor::Editor
EditorDock->setWidget(editor);
+ ///allow to enable run only when some text is written in editor
+ connect(editor, SIGNAL(textChanged()), this, SLOT(setRunEnabled()));
}
@@ -297,10 +300,7 @@ void MainWindow::slotRun() {
run->setIcon("stop");
run->setText("Stop Execution");
-// run->setEnabled(false); // Why the fuck doesnt this aktion update?
-// run->setEnabled(true);
slotStatusBar(i18n("Parsing commands..."), 1);
string txt=editor->text().latin1();///@todo interpreter shouldnt need extra "[" & "]"
- //QString txt(editor->text());
stringbuf sbuf(txt , ios_base::in);
istream in(&sbuf);
@@ -530,4 +530,7 @@ void MainWindow::slotColorPicker() {
}
+void MainWindow::setRunEnabled(){
+ run->setEnabled(true);
+}
#include "kturtle.moc"
--- kdenonbeta/kturtle/src/kturtle.h #1.1:1.2
@@ -99,4 +99,5 @@ class MainWindow : public KMainWindow
void slotConfigureKeys();
void slotColorPicker();
+ void setRunEnabled();
protected:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic