-rw-r--r-- | korganizer/mainwindow.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 2de7f28..006a8dd 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -833,13 +833,13 @@ void MainWindow::initActions() this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); -#ifndef DESKTOP_VERSION + //#ifndef DESKTOP_VERSION importMenu->insertSeparator(); action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); -#else + //#else #ifdef _OL_IMPORT_ importMenu->insertSeparator(); action = new QAction( "import_ol", i18n("Import from OL"), 0, @@ -847,7 +847,7 @@ void MainWindow::initActions() action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); #endif -#endif + //#endif importMenu->insertSeparator(); action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, @@ -1509,18 +1509,27 @@ void MainWindow::importBday() } void MainWindow::importQtopia() { -#ifndef DESKTOP_VERSION - int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), - i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing"), + //#ifndef DESKTOP_VERSION + QString mess = i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing"); +#ifdef DESKTOP_VERSION + mess += i18n("The content of the following files will be\nimported (located in your home directory (hd)):\n(hd)/Applications/datebook/datebook.xml\n(hd)/Applications/todolist/todolist.xml\nThe following category file will be used:\n(hd)/Settings/Categories.xml"); +#endif + int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess, i18n("Import!"), i18n("Cancel"), 0, 0, 1 ); if ( result == 0 ) { +#ifndef DESKTOP_VERSION QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; +#else + QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml"; + QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml"; + QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml"; +#endif mView->importQtopia( categories, datebook, todolist ); } -#else +#if 0 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), i18n("Not supported \non desktop!\n"), i18n("Ok"), i18n("Cancel"), 0, |