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

List:       kde-commits
Subject:    kdewebdev/kfilereplace
From:       Andras Mantia <amantia () kde ! org>
Date:       2004-09-15 12:21:37
Message-ID: 20040915122137.D2B89126B7 () office ! kde ! org
[Download RAW message or body]

CVS commit by amantia: 

Use the URL specified in the openURL() as a start URL when launching the KFileReplace part.


  M +6 -6      kfilereplacepart.cpp   1.43
  M +1 -1      kfilereplacepart.h   1.13


--- kdewebdev/kfilereplace/kfilereplacepart.cpp  #1.42:1.43
@@ -36,4 +36,5 @@
 #include <kapplication.h>
 #include <kaboutapplication.h>
+#include <kcombobox.h>
 
 //own includes
@@ -69,7 +70,4 @@ KFileReplacePart::KFileReplacePart(QWidg
   initGUI();
   setWhatsThis();
-
-  launchNewProjectDialog();
-
 }
 
@@ -86,8 +84,9 @@ KFileReplacePart::~KFileReplacePart()
 }
 
-void KFileReplacePart::launchNewProjectDialog()
+void KFileReplacePart::launchNewProjectDialog(const KURL & startURL)
 {
   KNewProjectDlg dlg(0L, m_config);
-
+  if (!startURL.isEmpty())
+    dlg.cbLocation->setCurrentText(startURL.path());
   if(!dlg.exec())
     return;
@@ -818,4 +817,5 @@ bool KFileReplacePart::openURL(const KUR
     return false;
   }
+  launchNewProjectDialog(url);
   return true;
 }
@@ -1231,5 +1231,5 @@ void KFileReplacePart::slotFileNew()
   m_view->resultView()->clear();
   m_config->reparseConfiguration();
-  launchNewProjectDialog();
+  launchNewProjectDialog(KURL());
   emit setStatusBarText(i18n("Ready."));
 }

--- kdewebdev/kfilereplace/kfilereplacepart.h  #1.12:1.13
@@ -121,5 +121,5 @@ class KFileReplacePart: public KParts::R
     void searchLiteral(const QString& currentDir, const QString& oldFileName);
     void loadInformationFromView();
-    void launchNewProjectDialog();
+    void launchNewProjectDialog(const KURL &startURL);
     void setOptionMask();
 


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

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