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) (unidiff)
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
@@ -833,13 +833,13 @@ void MainWindow::initActions()
833 this ); 833 this );
834 action->addTo( importMenu ); 834 action->addTo( importMenu );
835 connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); 835 connect( action, SIGNAL( activated() ), SLOT( importBday() ) );
836#ifndef DESKTOP_VERSION 836 //#ifndef DESKTOP_VERSION
837 importMenu->insertSeparator(); 837 importMenu->insertSeparator();
838 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, 838 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0,
839 this ); 839 this );
840 action->addTo( importMenu ); 840 action->addTo( importMenu );
841 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); 841 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) );
842#else 842 //#else
843#ifdef _OL_IMPORT_ 843#ifdef _OL_IMPORT_
844 importMenu->insertSeparator(); 844 importMenu->insertSeparator();
845 action = new QAction( "import_ol", i18n("Import from OL"), 0, 845 action = new QAction( "import_ol", i18n("Import from OL"), 0,
@@ -847,7 +847,7 @@ void MainWindow::initActions()
847 action->addTo( importMenu ); 847 action->addTo( importMenu );
848 connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); 848 connect( action, SIGNAL( activated() ), SLOT( importOL() ) );
849#endif 849#endif
850#endif 850 //#endif
851 851
852 importMenu->insertSeparator(); 852 importMenu->insertSeparator();
853 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, 853 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0,
@@ -1509,18 +1509,27 @@ void MainWindow::importBday()
1509} 1509}
1510void MainWindow::importQtopia() 1510void MainWindow::importQtopia()
1511{ 1511{
1512#ifndef DESKTOP_VERSION 1512 //#ifndef DESKTOP_VERSION
1513 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 1513 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");
1514 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"), 1514#ifdef DESKTOP_VERSION
1515 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");
1516#endif
1517 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess,
1515 i18n("Import!"), i18n("Cancel"), 0, 1518 i18n("Import!"), i18n("Cancel"), 0,
1516 0, 1 ); 1519 0, 1 );
1517 if ( result == 0 ) { 1520 if ( result == 0 ) {
1521#ifndef DESKTOP_VERSION
1518 QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); 1522 QString datebook = Global::applicationFileName( "datebook", "datebook.xml");
1519 QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); 1523 QString todolist = Global::applicationFileName( "todolist", "todolist.xml");
1520 QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; 1524 QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml";
1525#else
1526 QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml";
1527 QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml";
1528 QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml";
1529#endif
1521 mView->importQtopia( categories, datebook, todolist ); 1530 mView->importQtopia( categories, datebook, todolist );
1522 } 1531 }
1523#else 1532#if 0
1524 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 1533 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
1525 i18n("Not supported \non desktop!\n"), 1534 i18n("Not supported \non desktop!\n"),
1526 i18n("Ok"), i18n("Cancel"), 0, 1535 i18n("Ok"), i18n("Cancel"), 0,