]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/main.cpp
No need to call rowCount() all the time.
[dolphin.git] / src / main.cpp
index f5a51ee30bf5f924be21372cb6adec820a94e511..b0843a5e7a6206022fa535e37a92b5bf8c980b59 100644 (file)
  ***************************************************************************/
 
 #include "dolphinapplication.h"
-#include "dolphinmainwindow.h"
+
 #include <kaboutdata.h>
 #include <kcmdlineargs.h>
 #include <klocale.h>
-#include <krun.h>
 
 static KCmdLineOptions options[] =
 {
@@ -35,7 +34,7 @@ int main(int argc, char **argv)
 {
     KAboutData about("dolphin",
                      I18N_NOOP("Dolphin"),
-                     "0.8.0",
+                     "0.9.0",
                      I18N_NOOP("File Manager"),
                      KAboutData::License_GPL,
                      "(C) 2006 Peter Penz");
@@ -54,10 +53,14 @@ int main(int argc, char **argv)
     KCmdLineArgs::init(argc, argv, &about);
     KCmdLineArgs::addCmdLineOptions(options);
 
-    DolphinApplication app;
-
+    if (!DolphinApplication::start()) {
+        return 0;
+    }
 
+    DolphinApplication app;
+#ifdef __GNUC__
 #warning TODO, SessionManagement
+#endif
 #if 0
     if (false /* KDE4-TODO: app.isSessionRestored() */) {
         int n = 1;
@@ -67,19 +70,5 @@ int main(int argc, char **argv)
         }
     } else {
 #endif
-
-        KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
-        if (args->count() > 0) {
-            for (int i = 0; i < args->count(); ++i) {
-                DolphinMainWindow *win = app.createMainWindow();
-                win->activeView()->setUrl(args->url(i));
-                win->show();
-            }
-        } else {
-            DolphinMainWindow* mainWin = app.createMainWindow();
-            mainWin->show();
-        }
-        args->clear();
-    
     return app.exec();
 }