X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/f31a541925033c2ef5e27b85c099d47791b50121..862ceee323ad3b474ce9de11eefbddd99c528fac:/src/main.cpp diff --git a/src/main.cpp b/src/main.cpp index 6d71bd720..98a6a87f1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,28 +15,27 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #include "dolphinapplication.h" -#include "dolphinmainwindow.h" -#include + #include #include #include -#include static KCmdLineOptions options[] = -{ - { "+[Url]", I18N_NOOP( "Document to open" ), 0 }, - KCmdLineLastOption -}; + { + { "+[Url]", I18N_NOOP("Document to open"), 0 + }, + KCmdLineLastOption + }; 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"); @@ -55,32 +54,22 @@ 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; - while (KMainWindow::canBeRestored(n)){ + while (KMainWindow::canBeRestored(n)) { Dolphin::mainWin().restore(n); ++n; } } 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(); -} + return app.exec(); + }