author | zautrix <zautrix> | 2005-03-02 15:12:43 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-02 15:12:43 (UTC) |
commit | 9e0ceaa58a686fb64f8133ffa9e73866e985a464 (patch) (side-by-side diff) | |
tree | 794d5af071dba939d4ff6b27544274c36b5ecec5 | |
parent | 6733b0548df446fade0a58d409d5f80314e5ed4b (diff) | |
download | kdepimpi-9e0ceaa58a686fb64f8133ffa9e73866e985a464.zip kdepimpi-9e0ceaa58a686fb64f8133ffa9e73866e985a464.tar.gz kdepimpi-9e0ceaa58a686fb64f8133ffa9e73866e985a464.tar.bz2 |
print fix. added desktop Qtopia import
-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 @@ -904,33 +904,33 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & // This list keeps all starting points of the parent todos so the connection // lines of the tree can easily be drawn (needed if a new page is started) static QPtrList<TodoParentStart> startPoints; if (level<1) { 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); int to = p.viewport().bottom(); // draw either from start point of parent or from top of the page if (rct->mSamePage) diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 2de7f28..006a8dd 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -820,47 +820,47 @@ void MainWindow::initActions() } // actionMenu->insertSeparator(); action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, 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() ) ); importMenu->insertSeparator(); action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); @@ -1496,44 +1496,53 @@ void MainWindow::importOL() } void MainWindow::importBday() { int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 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 ); p->mToolBarUp = iconToolBar->x() > width()/2 || iconToolBar->y() > height()/2; mView->writeSettings(); if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) |