[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdevelop/parts/filter
From:       Laurent Montel <montel () kde ! org>
Date:       2003-06-22 18:09:40
[Download RAW message or body]

CVS commit by mlaurent: 

Disable ok button when shell command is empty


  M +9 -1      shellinsertdlg.cpp   1.3
  M +2 -1      shellinsertdlg.h   1.2


--- kdevelop/parts/filter/shellinsertdlg.cpp  #1.2:1.3
@@ -21,4 +21,5 @@
 #include <kmessagebox.h>
 #include <kprocess.h>
+#include <klineedit.h>
 
 #include "kdevplugin.h"
@@ -47,5 +48,5 @@ ShellInsertDialog::ShellInsertDialog()
     connect( cancel_button, SIGNAL(clicked()),
              this, SLOT(reject()) );
-
+    connect( combo->lineEdit(), SIGNAL(textChanged( const QString &)), this, \
SLOT(executeTextChanged( const QString &)));  m_proc = 0;
 
@@ -54,4 +55,6 @@ ShellInsertDialog::ShellInsertDialog()
     QStringList items = config->readListEntry("InsertItems");
     combo->insertStringList(items);
+    executeTextChanged( combo->lineEdit()->text());
+
 }
 
@@ -72,4 +75,9 @@ ShellInsertDialog::~ShellInsertDialog()
 }
 
+
+void ShellInsertDialog::executeTextChanged( const QString &text)
+{
+    start_button->setEnabled(!text.isEmpty());
+}
 
 int ShellInsertDialog::exec()

--- kdevelop/parts/filter/shellinsertdlg.h  #1.1:1.2
@@ -38,4 +38,5 @@ private slots:
     void slotReceivedStdout(KProcess *, char *text, int len);
     void slotProcessExited(KProcess *);
+    void executeTextChanged( const QString &text);
     
 private:


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic