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

List:       kde-commits
Subject:    extragear/pim/ksig
From:       Pino Toscano <pino () kde ! org>
Date:       2012-09-21 10:32:27
Message-ID: 20120921103227.A0DD5AC7E8 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1317156 by pino:

switch from StandardText to KInputDialog::getMultiLineText()

implier, and looking like other KDE dialogs


 M  +13 -15    ksig.cpp  


--- trunk/extragear/pim/ksig/ksig.cpp #1317155:1317156
@@ -16,7 +16,6 @@
  ***************************************************************************/
 #include "ksig.h"
 #include "siglistviewitem.h"
-#include "standardtext.h"
 
 #include <kstandardaction.h>
 #include <kactioncollection.h>
@@ -29,6 +28,7 @@
 #include <ktextedit.h>
 #include <k3listviewsearchline.h>
 #include <klocale.h>
+#include <kinputdialog.h>
 
 #include <qsplitter.h>
 #include <kconfiggroup.h>
@@ -230,24 +230,22 @@
 
 void KSig::editHeader()
 {
-    StandardText *t = new StandardText(0);
-    t->setLabel(i18n("Standard signature header:"));
-    t->setText(header);
-
-    connect(t, SIGNAL(textUpdated(const QString &)), this, SLOT(setHeader(const QString &)));
-
-    t->exec();
+    bool ok = false;
+    const QString caption = i18n("Edit Header");
+    const QString label = i18n("Standard signature header:");
+    const QString text = KInputDialog::getMultiLineText(caption, label, header, &ok, this);
+    if(ok)
+	setHeader(text);
 }
 
 void KSig::editFooter()
 {
-    StandardText *t = new StandardText(0);
-    t->setLabel(i18n("Standard signature footer:"));
-    t->setText(footer);
-
-    connect(t, SIGNAL(textUpdated(const QString &)), this, SLOT(setFooter(const QString &)));
-
-    t->exec();
+    bool ok = false;
+    const QString caption = i18n("Edit Footer");
+    const QString label = i18n("Standard signature footer:");
+    const QString text = KInputDialog::getMultiLineText(caption, label, footer, &ok, this);
+    if(ok)
+	setFooter(text);
 }
 
 void KSig::updateList()
[prev in list] [next in list] [prev in thread] [next in thread] 

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