-rw-r--r-- | korganizer/calprintbase.cpp | 2 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 23 |
2 files changed, 17 insertions, 8 deletions
diff --git a/korganizer/calprintbase.cpp b/korganizer/calprintbase.cpp index af32ebc..6bb407d 100644 --- a/korganizer/calprintbase.cpp +++ b/korganizer/calprintbase.cpp @@ -908,25 +908,25 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & startPoints.clear(); } // size of item outStr=item->summary(); if ( ! item->location().isEmpty() ) outStr += " ("+item->location()+")"; if ( item->hasDueDate() && posDueDt>=0 ) { outStr += " [" +local->formatDate(item->dtDue().date(),true)+"]"; } int left = possummary+(level*10); rect = p.boundingRect(left, y, (posdue-left-5),-1, WordBreak, outStr); - if ( !item->description().isEmpty() && !desc ) { + if ( !item->description().isEmpty() && desc ) { outStr = item->description(); rect = p.boundingRect( left+20, rect.bottom()+5, width-(left+10-x), -1, WordBreak, outStr ); } // if too big make new page if ( rect.bottom() > y+height) { // first draw the connection lines from parent todos: if (level > 0 && connectSubTodos) { TodoParentStart *rct; for ( rct = startPoints.first(); rct; rct = startPoints.next() ) { int start; int center = rct->mRect.left() + (rct->mRect.width()/2); diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 2de7f28..006a8dd 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -824,39 +824,39 @@ void MainWindow::initActions() this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); action = new QAction( "import_quick", i18n("Import last file"), 0, this ); action->addTo( importMenu ); 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() ) ); action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); @@ -1500,36 +1500,45 @@ void MainWindow::importBday() i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), i18n("Import!"), i18n("Cancel"), 0, 0, 1 ); if ( result == 0 ) { mView->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 } void MainWindow::saveOnClose() { KOPrefs *p = KOPrefs::instance(); p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); |