-rw-r--r-- | korganizer/mainwindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 61c39f5..856f7db 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -1997,70 +1997,70 @@ void MainWindow::syncFileRequest() { if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { mSyncManager->slotSyncMenu( 999 ); } save(); } void MainWindow::getFile( bool success ) { if ( ! success ) { setCaption( i18n("Error receiving file. Nothing changed!") ); return; } mView->openCalendar( defaultFileName() ); if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { mSyncManager->slotSyncMenu( 999 ); } setCaption( i18n("Pi-Sync successful!") ); } void MainWindow::printSel( ) { mView->viewManager()->agendaView()->agenda()->printSelection(); } void MainWindow::printCal() { mView->print();//mCp->showDialog(); } #include "libkdepim/kdatepicker.h" #include <kdatetbl.h> void MainWindow::weekAction() { int month; KPopupFrame* popup = new KPopupFrame(this); KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(10, popup); // ----- picker->resize(picker->sizeHint()); popup->setMainWidget(picker); picker->setFocus(); connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); int x = 0; int y = iconToolBar->height(); int dX = 0; int dY = 0; if ( iconToolBar->orientation () == Qt:: Horizontal ) { if ( iconToolBar->y() > height()/2 ) { - dY = iconToolBar->height()+picker->sizeHint().height(); + dY = picker->sizeHint().height()+8; y = 0; } } else { if ( iconToolBar->x() > width()/2 ) { // right side x=0; - dX= iconToolBar->width()+picker->sizeHint().width(); + dX= picker->sizeHint().width()+8; y = 0; } else { x= iconToolBar->width(); y = 0; } } - qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); + //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)))) { month = picker->getResult(); emit selectWeek ( month ); //qDebug("weekSelected %d ", month); } delete popup; } |