[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Fri Oct 29 05:52:21 CEST 2004


CVS commit by staikos: 

- fix the KURLRequesters to complete in the proper location
- on second thought, don't store the full path to files from the wizard because
  we don't want them to end up absolute in the .kst file.  In the future we
  can have both features by storing the working directory separately in
  vector defaults and concatenating it with the relative file if it's
  different on next launch.


  M +3 -2      datawizard.ui.h   1.94
  M +2 -1      kstchangefiledialog_i.cpp   1.28
  M +2 -0      kstgraphfiledialog_i.cpp   1.14
  M +2 -1      kstquickstartdialog_i.cpp   1.7
  M +2 -0      kstvectordialog_i.cpp   1.52
  M +1 -7      main.cpp   1.89


--- kdeextragear-2/kst/kst/datawizard.ui.h  #1.93:1.94
@@ -100,5 +100,5 @@ void DataWizard::sourceChanged( const QS
             url.setPath(txt);
         } else {
-            KURL url = KURL::fromPathOrURL(txt);
+            url = KURL::fromPathOrURL(txt);
         }
 
@@ -108,5 +108,6 @@ void DataWizard::sourceChanged( const QS
         }
 
-        QString file = QFileInfo(url.path()).absFilePath();
+        QString file = url.path();
+        //QFileInfo(url.path()).absFilePath();
         
         KstDataSourcePtr ds = *KST::dataSourceList.findFileName(file);

--- kdeextragear-2/kst/kst/kstchangefiledialog_i.cpp  #1.27:1.28
@@ -20,4 +20,5 @@
 #include <kiconloader.h>
 #include <kmessagebox.h>
+#include <kurlcompletion.h>
 #include <kurlrequester.h>
 
@@ -35,5 +36,5 @@ KstChangeFileDialogI::KstChangeFileDialo
                                            WFlags fl)
 : KstChangeFileDialog(parent, name, modal, fl) {
-
+  _dataFile->completionObject()->setDir(QDir::currentDirPath());
   _clearFilter->setPixmap(BarIcon("locationbar_erase"));
   connect(_clearFilter, SIGNAL(clicked()), _filter, SLOT(clear()));

--- kdeextragear-2/kst/kst/kstgraphfiledialog_i.cpp  #1.13:1.14
@@ -28,4 +28,5 @@
 #include <kdebug.h>
 #include <kimageio.h>
+#include <kurlcompletion.h>
 #include <kurlrequester.h>
 
@@ -37,4 +38,5 @@ KstGraphFileDialogI::KstGraphFileDialogI
                                          bool modal, WFlags fl)
 : KstGraphFileDialog(parent, name, modal, fl) {
+  _url->completionObject()->setDir(QDir::currentDirPath());
   _autoSaveTimer = new QTimer(this);
 

--- kdeextragear-2/kst/kst/kstquickstartdialog_i.cpp  #1.6:1.7
@@ -21,4 +21,5 @@
 
 // include files for KDE
+#include <kurlcompletion.h>
 #include <kurlrequester.h>
 
@@ -31,5 +32,5 @@
 KstQuickStartDialogI::KstQuickStartDialogI(QWidget *parent, const char *name,
         bool modal, WFlags fl ) : KstQuickStartDialog(parent, name, modal, fl ) {
-
+  _fileName->completionObject()->setDir(QDir::currentDirPath());
   _app = KstApp::inst();
   _isRecentFile = false;

--- kdeextragear-2/kst/kst/kstvectordialog_i.cpp  #1.51:1.52
@@ -24,4 +24,5 @@
 #include <kmessagebox.h>
 #include <kstaticdeleter.h>
+#include <kurlcompletion.h>
 #include <kurlrequester.h>
 
@@ -49,4 +50,5 @@ KstVectorDialogI::KstVectorDialogI(QWidg
                                    bool modal, WFlags fl)
 : KstVectorDialog(parent, name, modal, fl) {
+  FileName->completionObject()->setDir(QDir::currentDirPath());
   Init();
 

--- kdeextragear-2/kst/kst/main.cpp  #1.88:1.89
@@ -667,12 +667,6 @@ int main(int argc, char *argv[]) {
 
       kst->slotUpdateProgress( 0, 0, QString::null );
-    } else if (args->count() > 0) {
-      //
-      // open a kst file
-      //
-
-      //
+    } else if (args->count() > 0) { // open a kst file
       // some of the options can be overridden
-      //
       kst->openDocumentFile(args->arg(0),
           args->getOption("F"),             // override FileName





More information about the Kst mailing list