summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp6
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()
1997{ 1997{
1998 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 1998 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
1999 mSyncManager->slotSyncMenu( 999 ); 1999 mSyncManager->slotSyncMenu( 999 );
2000 } 2000 }
2001 save(); 2001 save();
2002} 2002}
2003void MainWindow::getFile( bool success ) 2003void MainWindow::getFile( bool success )
2004{ 2004{
2005 if ( ! success ) { 2005 if ( ! success ) {
2006 setCaption( i18n("Error receiving file. Nothing changed!") ); 2006 setCaption( i18n("Error receiving file. Nothing changed!") );
2007 return; 2007 return;
2008 } 2008 }
2009 mView->openCalendar( defaultFileName() ); 2009 mView->openCalendar( defaultFileName() );
2010 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 2010 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
2011 mSyncManager->slotSyncMenu( 999 ); 2011 mSyncManager->slotSyncMenu( 999 );
2012 } 2012 }
2013 setCaption( i18n("Pi-Sync successful!") ); 2013 setCaption( i18n("Pi-Sync successful!") );
2014} 2014}
2015 2015
2016void MainWindow::printSel( ) 2016void MainWindow::printSel( )
2017{ 2017{
2018 mView->viewManager()->agendaView()->agenda()->printSelection(); 2018 mView->viewManager()->agendaView()->agenda()->printSelection();
2019} 2019}
2020 2020
2021void MainWindow::printCal() 2021void MainWindow::printCal()
2022{ 2022{
2023 mView->print();//mCp->showDialog(); 2023 mView->print();//mCp->showDialog();
2024} 2024}
2025 2025
2026 2026
2027#include "libkdepim/kdatepicker.h" 2027#include "libkdepim/kdatepicker.h"
2028#include <kdatetbl.h> 2028#include <kdatetbl.h>
2029void MainWindow::weekAction() 2029void MainWindow::weekAction()
2030{ 2030{
2031 int month; 2031 int month;
2032 KPopupFrame* popup = new KPopupFrame(this); 2032 KPopupFrame* popup = new KPopupFrame(this);
2033 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(10, popup); 2033 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(10, popup);
2034 // ----- 2034 // -----
2035 picker->resize(picker->sizeHint()); 2035 picker->resize(picker->sizeHint());
2036 popup->setMainWidget(picker); 2036 popup->setMainWidget(picker);
2037 picker->setFocus(); 2037 picker->setFocus();
2038 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); 2038 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
2039 int x = 0; 2039 int x = 0;
2040 int y = iconToolBar->height(); 2040 int y = iconToolBar->height();
2041 int dX = 0; 2041 int dX = 0;
2042 int dY = 0; 2042 int dY = 0;
2043 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 2043 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
2044 if ( iconToolBar->y() > height()/2 ) { 2044 if ( iconToolBar->y() > height()/2 ) {
2045 dY = iconToolBar->height()+picker->sizeHint().height(); 2045 dY = picker->sizeHint().height()+8;
2046 y = 0; 2046 y = 0;
2047 } 2047 }
2048 } else { 2048 } else {
2049 if ( iconToolBar->x() > width()/2 ) { // right side 2049 if ( iconToolBar->x() > width()/2 ) { // right side
2050 x=0; 2050 x=0;
2051 dX= iconToolBar->width()+picker->sizeHint().width(); 2051 dX= picker->sizeHint().width()+8;
2052 y = 0; 2052 y = 0;
2053 } else { 2053 } else {
2054 x= iconToolBar->width(); 2054 x= iconToolBar->width();
2055 y = 0; 2055 y = 0;
2056 } 2056 }
2057 } 2057 }
2058 qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); 2058 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() );
2059 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)))) 2059 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))))
2060 { 2060 {
2061 month = picker->getResult(); 2061 month = picker->getResult();
2062 emit selectWeek ( month ); 2062 emit selectWeek ( month );
2063 //qDebug("weekSelected %d ", month); 2063 //qDebug("weekSelected %d ", month);
2064 } 2064 }
2065 delete popup; 2065 delete popup;
2066} 2066}