summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
authorzautrix <zautrix>2005-03-02 15:12:43 (UTC)
committer zautrix <zautrix>2005-03-02 15:12:43 (UTC)
commit9e0ceaa58a686fb64f8133ffa9e73866e985a464 (patch) (side-by-side diff)
tree794d5af071dba939d4ff6b27544274c36b5ecec5 /korganizer/mainwindow.cpp
parent6733b0548df446fade0a58d409d5f80314e5ed4b (diff)
downloadkdepimpi-9e0ceaa58a686fb64f8133ffa9e73866e985a464.zip
kdepimpi-9e0ceaa58a686fb64f8133ffa9e73866e985a464.tar.gz
kdepimpi-9e0ceaa58a686fb64f8133ffa9e73866e985a464.tar.bz2
print fix. added desktop Qtopia import
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp23
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
@@ -830,27 +830,27 @@ void MainWindow::initActions()
connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) );
importMenu->insertSeparator();
action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0,
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,
this );
action->addTo( importMenu );
connect( action, SIGNAL( activated() ), SLOT( importOL() ) );
#endif
-#endif
+ //#endif
importMenu->insertSeparator();
action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0,
this );
action->addTo( importMenu );
connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) );
@@ -1506,24 +1506,33 @@ 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,
0, 1 );
#endif