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

List:       kde-commits
Subject:    kdeutils/kedit
From:       Stephan Binner <binner () kde ! org>
Date:       2004-05-27 13:02:07
Message-ID: 20040527130207.08DE4126CD () office ! kde ! org
[Download RAW message or body]

CVS commit by binner: 

"Insert" button in file dialog when inserting file


  M +4 -4      kedit.cpp   1.199
  M +32 -28    ktextfiledlg.cpp   1.12
  M +9 -8      ktextfiledlg.h   1.3


--- kdeutils/kedit/kedit.cpp  #1.198:1.199
@@ -549,5 +549,5 @@ void TopLevel::file_insert()
     KURL url = KTextFileDialog::getOpenURLwithEncoding(
         QString::null, QString::null, this,
-        i18n("Insert File") );
+        i18n("Insert File"), "", i18n("&Insert"));
     if( url.isEmpty() )
     {

--- kdeutils/kedit/ktextfiledlg.cpp  #1.11:1.12
@@ -28,4 +28,5 @@
 #include <krecentdocument.h>
 #include <ktoolbar.h>   
+#include <kpushbutton.h>
 
 #include "ktextfiledlg.h"
@@ -147,5 +148,6 @@ KURL KTextFileDialog::getOpenURLwithEnco
      QWidget *parent, 
      const QString& caption,
-     const QString& encoding)
+     const QString& encoding,
+     const QString& buttontext)
 {
   KTextFileDialog dlg(startDir, filter, parent, "filedialog", true);
@@ -155,4 +157,6 @@ KURL KTextFileDialog::getOpenURLwithEnco
   dlg.setCaption(caption.isNull() ? i18n("Open") : caption);
   dlg.ops->clearHistory();
+  if (!buttontext.isEmpty())
+    dlg.okButton()->setText(buttontext);
   dlg.exec();
   

--- kdeutils/kedit/ktextfiledlg.h  #1.2:1.3
@@ -52,5 +52,6 @@ class KTextFileDialog : public KFileDial
          QWidget *parent= 0,
          const QString& caption = QString::null,
-         const QString& encoding = QString::null);
+         const QString& encoding = QString::null,
+         const QString& buttonText = QString::null);
 
     static KURL getSaveURLwithEncoding(


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

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