summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-08-17 00:13:25 (UTC)
committer ulf69 <ulf69>2004-08-17 00:13:25 (UTC)
commitf3875aba68f175e8da32462f64b12fc46bc31102 (patch) (side-by-side diff)
treec17a6e839a27ddfdc80699739e9934327a4a8610
parentab3b10a5018152dedbdb64d0d5a4bd8ec752ccdb (diff)
downloadkdepimpi-f3875aba68f175e8da32462f64b12fc46bc31102.zip
kdepimpi-f3875aba68f175e8da32462f64b12fc46bc31102.tar.gz
kdepimpi-f3875aba68f175e8da32462f64b12fc46bc31102.tar.bz2
added listener for reults of Ka/Pi
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp500
1 files changed, 258 insertions, 242 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 6c0aa9b..4b00062 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -12,7 +12,8 @@
#include <qfileinfo.h>
#include <qlabel.h>
-#include <qwmatrix.h>
-#include <qtextbrowser.h>
-#include <qtextstream.h>
+#include <qmap.h>
+#include <qwmatrix.h>
+#include <qtextbrowser.h>
+#include <qtextstream.h>
#ifndef DESKTOP_VERSION
#include <qpe/global.h>
@@ -21,6 +22,6 @@
#include <qpe/resource.h>
#include <qpe/qpeapplication.h>
-#include <qtopia/alarmserver.h>
-#include <qtopia/qcopenvelope_qws.h>
+#include <qtopia/alarmserver.h>
+#include <qtopia/qcopenvelope_qws.h>
#else
#include <qmenubar.h>
@@ -52,5 +53,7 @@
#include "kconfig.h"
#include "simplealarmclient.h"
-using namespace KCal;
+#include "externalapphandler.h"
+
+using namespace KCal;
#ifndef _WIN32_
#include <unistd.h>
@@ -67,9 +70,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
#ifdef DESKTOP_VERSION
setFont( QFont("Arial"), 14 );
-#endif
+#endif
//QString confFile = KStandardDirs::appDir() + "config/korganizerrc";
QString confFile = locateLocal("config","korganizerrc");
- QFileInfo finf ( confFile );
+ QFileInfo finf ( confFile );
bool showWarning = !finf.exists();
setIcon(SmallIcon( "ko24" ) );
@@ -81,5 +84,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
// if ( p->mHourSize == 4 )
// p->mHourSize = 6;
-// }
+// }
if ( p->mHourSize > 18 )
p->mHourSize = 18;
@@ -103,6 +106,6 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
addToolBar (iconToolBar , tbd );
mBlockSaveFlag = false;
- mCalendarModifiedFlag = false;
-
+ mCalendarModifiedFlag = false;
+
QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this );
splash->setAlignment ( AlignCenter );
@@ -117,7 +120,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
mView->hide();
//mView->resize(splash->size() );
- initActions();
+ initActions();
#ifndef DESKTOP_VERSION
- iconToolBar->show();
+ iconToolBar->show();
qApp->processEvents();
#endif
@@ -134,5 +137,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
//mView->resize( splash->size() );
//qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
- mView->readSettings();
+ mView->readSettings();
bool oldOpened = false;
bool newFile = false;
@@ -149,10 +152,10 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
} else {
oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics");
- finfo.setFile( oldFile );
+ finfo.setFile( oldFile );
if (finfo.exists() ) {
KMessageBox::information( this, message);
mView->openCalendar( oldFile );
qApp->processEvents();
- }
+ }
}
mView->saveCalendar( defaultFileName() );
@@ -176,5 +179,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
connect( mView, SIGNAL( modifiedChanged( bool ) ),
SLOT( slotModifiedChanged( bool ) ) );
-
+
connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) );
@@ -185,34 +188,37 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
globalFlagBlockStartup = 0;
mView->show();
- delete splash;
+ delete splash;
if ( newFile )
mView->updateConfig();
// qApp->processEvents();
//qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
- fillSyncMenu();
+ fillSyncMenu();
mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins );
if ( showWarning ) {
- KMessageBox::information( this,
+ KMessageBox::information( this,
"You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information");
qApp->processEvents();
mView->dialogManager()->showSyncOptions();
}
+
+ //US listen for result adressed from Ka/Pi
+ connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
}
MainWindow::~MainWindow()
{
//qDebug("MainWindow::~MainWindow() ");
- //save toolbar location
-
- delete mCalendar;
+ //save toolbar location
+
+ delete mCalendar;
delete KOPrefs::instance();
delete KIncidenceFormatter::instance();
-
-
+
+
}
void MainWindow::closeEvent( QCloseEvent* ce )
{
-
-
-
+
+
+
if ( ! KOPrefs::instance()->mAskForQuit ) {
saveOnClose();
@@ -224,5 +230,5 @@ void MainWindow::closeEvent( QCloseEvent* ce )
switch( QMessageBox::information( this, "KO/Pi",
i18n("Do you really want\nto close KO/Pi?"),
- i18n("Close"), i18n("No"),
+ i18n("Close"), i18n("No"),
0, 0 ) ) {
case 0:
@@ -231,8 +237,8 @@ void MainWindow::closeEvent( QCloseEvent* ce )
break;
case 1:
- ce->ignore();
+ ce->ignore();
break;
case 2:
-
+
default:
break;
@@ -249,16 +255,26 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
//qDebug("message ");
qDebug("KO: QCOP message received: %s ", cmsg.data() );
+
+ if ( cmsg == "-writeFile" ) {
+ // I made from the "-writeFile" an "-writeAlarm"
+ mView->viewManager()->showWhatsNextView();
+ mCalendar->checkAlarmForIncidence( 0, true);
+ showMaximized();
+ raise();
+ return;
+ }
+
if ( cmsg == "-writeFile" ) {
// I made from the "-writeFile" an "-writeAlarm"
- mView->viewManager()->showWhatsNextView();
+ mView->viewManager()->showWhatsNextView();
mCalendar->checkAlarmForIncidence( 0, true);
showMaximized();
raise();
return;
-
+
}
if ( cmsg == "-writeFileSilent" ) {
// I made from the "-writeFile" an "-writeAlarm"
- // mView->viewManager()->showWhatsNextView();
+ // mView->viewManager()->showWhatsNextView();
mCalendar->checkAlarmForIncidence( 0, true);
//showMaximized();
@@ -269,5 +285,5 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
if ( cmsg == "-newCountdown" ) {
qDebug("newCountdown ");
-
+
}
QString msg ;
@@ -288,6 +304,6 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
if ( msg == "-newTodo" ) {
mView->newTodo();
-
- }
+
+ }
if ( msg == "-showWN" ) {
mView->viewManager()->showWhatsNextView();
@@ -324,9 +340,9 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
else if ( msg == "-showWNext" || msg == "nextView()" ) {
mView->viewManager()->showWhatsNextView();
- }
+ }
else if ( msg == "-showNextXView" ) {
mView->viewManager()->showNextXView();
}
-
+
}
@@ -352,5 +368,5 @@ void MainWindow::initActions()
QPopupMenu *importMenu = new QPopupMenu( this );
selectFilterMenu = new QPopupMenu( this );
- selectFilterMenu->setCheckable( true );
+ selectFilterMenu->setCheckable( true );
syncMenu = new QPopupMenu( this );
configureAgendaMenu = new QPopupMenu( this );
@@ -364,9 +380,9 @@ void MainWindow::initActions()
menuBar1->insertItem( i18n("Actions"), actionMenu );
menuBar1->insertItem( i18n("Synchronize"), syncMenu );
- menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu );
- //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
- menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
- menuBar1->insertItem( i18n("Help"), helpMenu );
- } else {
+ menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu );
+ //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
+ menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
+ menuBar1->insertItem( i18n("Help"), helpMenu );
+ } else {
QPEMenuBar *menuBar1;
menuBar1 = new QPEMenuBar( iconToolBar );
@@ -377,9 +393,9 @@ void MainWindow::initActions()
menuBar->insertItem( i18n("Actions"), actionMenu );
menuBar->insertItem( i18n("Synchronize"), syncMenu );
- menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
- menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
- menuBar->insertItem( i18n("Filter"),selectFilterMenu );
- menuBar->insertItem( i18n("Help"), helpMenu );
- //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
+ menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
+ menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
+ menuBar->insertItem( i18n("Filter"),selectFilterMenu );
+ menuBar->insertItem( i18n("Help"), helpMenu );
+ //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
menuBar1->setMaximumSize( menuBar1->sizeHint( ));
}
@@ -394,24 +410,24 @@ void MainWindow::initActions()
configureToolBarMenu->setCheckable( true );
- QString pathString = "";
+ QString pathString = "";
if ( !p->mToolBarMiniIcons ) {
- if ( QApplication::desktop()->width() < 480 )
+ if ( QApplication::desktop()->width() < 480 )
pathString += "icons16/";
} else
pathString += "iconsmini/";
configureAgendaMenu->setCheckable( true );
- configureAgendaMenu->insertItem(i18n("Toggle Allday"), 1 );
- configureAgendaMenu->insertSeparator();
- configureAgendaMenu->insertItem(i18n("Tiny"), 4 );
+ configureAgendaMenu->insertItem(i18n("Toggle Allday"), 1 );
+ configureAgendaMenu->insertSeparator();
+ configureAgendaMenu->insertItem(i18n("Tiny"), 4 );
configureAgendaMenu->insertItem(i18n("Small"), 6 );
configureAgendaMenu->insertItem(i18n("Medium"), 8 );
- configureAgendaMenu->insertItem(i18n("Normal"), 10 );
- configureAgendaMenu->insertItem(i18n("Large"), 12 );
- configureAgendaMenu->insertItem(i18n("Big"), 14 );
- configureAgendaMenu->insertItem(i18n("Bigger"), 16 );
- configureAgendaMenu->insertItem(i18n("Biggest"), 18 );
- //configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
-
- icon = loadPixmap( pathString + "configure" );
+ configureAgendaMenu->insertItem(i18n("Normal"), 10 );
+ configureAgendaMenu->insertItem(i18n("Large"), 12 );
+ configureAgendaMenu->insertItem(i18n("Big"), 14 );
+ configureAgendaMenu->insertItem(i18n("Bigger"), 16 );
+ configureAgendaMenu->insertItem(i18n("Biggest"), 18 );
+ //configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
+
+ icon = loadPixmap( pathString + "configure" );
action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this );
action->addTo( actionMenu );
@@ -419,7 +435,7 @@ void MainWindow::initActions()
mView, SLOT( edit_options() ) );
actionMenu->insertSeparator();
- icon = loadPixmap( pathString + "newevent" );
- configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
- configureToolBarMenu->insertSeparator();
+ icon = loadPixmap( pathString + "newevent" );
+ configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
+ configureToolBarMenu->insertSeparator();
configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
@@ -427,21 +443,21 @@ void MainWindow::initActions()
connect( ne_action, SIGNAL( activated() ),
mView, SLOT( newEvent() ) );
- icon = loadPixmap( pathString + "newtodo" );
- configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
+ icon = loadPixmap( pathString + "newtodo" );
+ configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
nt_action->addTo( actionMenu );
connect( nt_action, SIGNAL( activated() ),
mView, SLOT( newTodo() ) );
- icon = loadPixmap( pathString + "navi" );
+ icon = loadPixmap( pathString + "navi" );
action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
action->addTo( viewMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( toggleDateNavigatorWidget() ) );
- icon = loadPixmap( pathString + "filter" );
+ icon = loadPixmap( pathString + "filter" );
action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this );
action->addTo( viewMenu );
connect( action, SIGNAL( activated() ),
mView, SLOT( toggleFilter() ) );
-
+
viewMenu->insertSeparator();
@@ -453,6 +469,6 @@ void MainWindow::initActions()
action->addTo( iconToolBar );
viewMenu->insertSeparator();
- icon = loadPixmap( pathString + "list" );
- configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
+ icon = loadPixmap( pathString + "list" );
+ configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
showlist_action->addTo( viewMenu );
@@ -461,6 +477,6 @@ void MainWindow::initActions()
- icon = loadPixmap( pathString + "day" );
- configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
+ icon = loadPixmap( pathString + "day" );
+ configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this );
day1_action->addTo( viewMenu );
@@ -469,6 +485,6 @@ void MainWindow::initActions()
mView->viewManager(), SLOT( showDayView() ) );
- icon = loadPixmap( pathString + "workweek" );
- configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
+ icon = loadPixmap( pathString + "workweek" );
+ configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
day5_action->addTo( viewMenu );
@@ -477,5 +493,5 @@ void MainWindow::initActions()
icon = loadPixmap( pathString + "week" );
- configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
+ configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
day7_action->addTo( viewMenu );
@@ -483,6 +499,6 @@ void MainWindow::initActions()
mView->viewManager(), SLOT( showWeekView() ) );
- icon = loadPixmap( pathString + "month" );
- configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
+ icon = loadPixmap( pathString + "month" );
+ configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
month_action->addTo( viewMenu );
@@ -490,6 +506,6 @@ void MainWindow::initActions()
mView->viewManager(), SLOT( showMonthView() ) );
- icon = loadPixmap( pathString + "todo" );
- configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
+ icon = loadPixmap( pathString + "todo" );
+ configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
todoview_action->addTo( viewMenu );
@@ -497,6 +513,6 @@ void MainWindow::initActions()
mView->viewManager(), SLOT( showTodoView() ) );
- icon = loadPixmap( pathString + "journal" );
- configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
+ icon = loadPixmap( pathString + "journal" );
+ configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this );
viewjournal_action->addTo( viewMenu );
@@ -504,6 +520,6 @@ void MainWindow::initActions()
mView->viewManager(), SLOT( showJournalView() ) );
- icon = loadPixmap( pathString + "xdays" );
- configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 );
+ icon = loadPixmap( pathString + "xdays" );
+ configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 );
QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this );
xdays_action->addTo( viewMenu );
@@ -511,11 +527,11 @@ void MainWindow::initActions()
mView->viewManager(), SLOT( showNextXView() ) );
- icon = loadPixmap( pathString + "whatsnext" );
- configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 );
- QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
+ icon = loadPixmap( pathString + "whatsnext" );
+ configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 );
+ QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
whatsnext_action->addTo( viewMenu );
connect( whatsnext_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showWhatsNextView() ) );
-
+
#if 0
action = new QAction( "view_timespan", "Time Span", 0, this );
@@ -555,13 +571,13 @@ void MainWindow::initActions()
connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
- icon = loadPixmap( pathString + "search" );
+ icon = loadPixmap( pathString + "search" );
QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this );
- configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4);
+ configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4);
search_action->addTo( actionMenu );
connect( search_action, SIGNAL( activated() ),
mView->dialogManager(), SLOT( showSearchDialog() ) );
- icon = loadPixmap( pathString + "today" );
- configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130);
+ icon = loadPixmap( pathString + "today" );
+ configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130);
QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
today_action->addTo( actionMenu );
@@ -571,6 +587,6 @@ void MainWindow::initActions()
if ( KOPrefs::instance()->mShowFullMenu ) {
actionMenu->insertSeparator();
- actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
-
+ actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
+
}
// actionMenu->insertSeparator();
@@ -630,5 +646,5 @@ void MainWindow::initActions()
action->addTo( importMenu );
connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) );
-
+
action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0,
this );
@@ -636,12 +652,12 @@ void MainWindow::initActions()
connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) );
#else
- importMenu->insertSeparator();
- icon = loadPixmap( pathString + "print" );
+ importMenu->insertSeparator();
+ icon = loadPixmap( pathString + "print" );
action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
action->addTo( importMenu );
connect( action, SIGNAL( activated() ),
this, SLOT( printCal() ) );
-
- icon = loadPixmap( pathString + "print" );
+
+ icon = loadPixmap( pathString + "print" );
action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
action->addTo( importMenu );
@@ -658,32 +674,32 @@ void MainWindow::initActions()
action->addTo( importMenu );
connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
-
+
//menuBar->insertItem( "Configure",configureMenu );
//configureMenu->insertItem( "Toolbar",configureToolBarMenu );
- icon = loadPixmap( "korganizer/korganizer" );
+ icon = loadPixmap( "korganizer/korganizer" );
action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
- SLOT( keyBindings() ) );
+ SLOT( keyBindings() ) );
action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
- SLOT( features() ) );
+ SLOT( features() ) );
action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
- SLOT( aboutAutoSaving() ) );
+ SLOT( aboutAutoSaving() ) );
action = new QAction( "Problemd", i18n("Known Problems..."), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
- SLOT( aboutKnownBugs() ) );
+ SLOT( aboutKnownBugs() ) );
action = new QAction( "Translate Howto", i18n("User translation..."), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
- SLOT( usertrans() ) );
+ SLOT( usertrans() ) );
action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
- SLOT( synchowto() ) );
+ SLOT( synchowto() ) );
action = new QAction( "Whats New", i18n("What's new?"), 0,this );
action->addTo( helpMenu );
@@ -693,6 +709,6 @@ void MainWindow::initActions()
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
- SLOT( faq() ) );
-
+ SLOT( faq() ) );
+
action = new QAction( "about", i18n("About..."), 0, this );
@@ -707,8 +723,8 @@ void MainWindow::initActions()
// ******************************************************
- // menubar icons
-
-
- iconToolBar->setHorizontalStretchable (true );
+ // menubar icons
+
+
+ iconToolBar->setHorizontalStretchable (true );
//menuBar->insertItem( iconToolBar );
//xdays_action
@@ -738,5 +754,5 @@ void MainWindow::initActions()
viewjournal_action->addTo( iconToolBar );
icon = loadPixmap( pathString + "2leftarrowB" );
- configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14);
+ configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14);
if (p-> mShowIconBackFast) {
action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
@@ -746,5 +762,5 @@ void MainWindow::initActions()
}
icon = loadPixmap( pathString + "1leftarrowB" );
- configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15);
+ configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15);
if (p-> mShowIconBack) {
action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
@@ -753,8 +769,8 @@ void MainWindow::initActions()
action->addTo( iconToolBar );
}
- if (p-> mShowIconToday)
+ if (p-> mShowIconToday)
today_action->addTo( iconToolBar );
icon = loadPixmap( pathString + "1rightarrowB" );
- configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
+ configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
if (p-> mShowIconForward) {
action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this );
@@ -764,5 +780,5 @@ void MainWindow::initActions()
}
icon = loadPixmap( pathString + "2rightarrowB" );
- configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
+ configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
if (p-> mShowIconForwardFast) {
action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this );
@@ -771,7 +787,7 @@ void MainWindow::initActions()
action->addTo( iconToolBar );
}
-
-
- configureToolBarMenu->insertItem(i18n("What's This?"), 300);
+
+
+ configureToolBarMenu->insertItem(i18n("What's This?"), 300);
if (p-> mShowIconNewEvent)
@@ -795,8 +811,8 @@ void MainWindow::initActions()
if (p-> mShowIconBackFast)
configureToolBarMenu->setItemChecked( 200, true );
- if (p-> mShowIconBack)
+ if (p-> mShowIconBack)
configureToolBarMenu->setItemChecked( 210, true );
if (p-> mShowIconToday)
- configureToolBarMenu->setItemChecked( 130, true );
+ configureToolBarMenu->setItemChecked( 130, true );
if (p-> mShowIconForward)
configureToolBarMenu->setItemChecked( 220, true );
@@ -820,5 +836,5 @@ void MainWindow::initActions()
if (p-> mShowIconWhatsThis)
QWhatsThis::whatsThisButton ( iconToolBar );
- connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
+ connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
configureAgenda( p->mHourSize );
connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
@@ -851,5 +867,5 @@ void MainWindow::fillSyncMenu()
config.writeEntry("ExternSyncProfiles","Sharp_DTM");
config.sync();
- delete temp;
+ delete temp;
}
KOPrefs::instance()->mExternSyncProfiles = config.readListEntry("ExternSyncProfiles");
@@ -867,12 +883,12 @@ void MainWindow::fillSyncMenu()
}
mView->setupExternSyncProfiles();
-}
+}
int MainWindow::ringSync()
{
int syncedProfiles = 0;
- int i;
+ int i;
QTime timer;
- KConfig config ( locateLocal( "config","syncprofilesrc" ) );
+ KConfig config ( locateLocal( "config","syncprofilesrc" ) );
QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames;
KSyncProfile* temp = new KSyncProfile ();
@@ -895,5 +911,5 @@ int MainWindow::ringSync()
} else {
if ( temp->getIsLocalFileSync() ) {
- if ( syncWithFile( temp->getRemoteFileName( ), true ) )
+ if ( syncWithFile( temp->getRemoteFileName( ), true ) )
KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName();
} else {
@@ -905,5 +921,5 @@ int MainWindow::ringSync()
} else
syncRemote( temp, false );
-
+
}
}
@@ -916,5 +932,5 @@ int MainWindow::ringSync()
#endif
}
-
+
}
@@ -922,5 +938,5 @@ int MainWindow::ringSync()
delete temp;
return syncedProfiles;
-}
+}
void MainWindow::multiSync( bool askforPrefs )
@@ -928,9 +944,9 @@ void MainWindow::multiSync( bool askforPrefs )
if (mBlockSaveFlag)
return;
- mBlockSaveFlag = true;
+ mBlockSaveFlag = true;
QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!");
if ( QMessageBox::information( this, i18n("KO/Pi Sync"),
question,
- i18n("Yes"), i18n("No"),
+ i18n("Yes"), i18n("No"),
0, 0 ) != 0 ) {
mBlockSaveFlag = false;
@@ -951,5 +967,5 @@ void MainWindow::multiSync( bool askforPrefs )
mBlockSaveFlag = false;
if ( num )
- save();
+ save();
if ( num )
setCaption(i18n("%1 profiles synced. Multiple sync completed!").arg(num) );
@@ -966,9 +982,9 @@ void MainWindow::slotSyncMenu( int action )
return;
- }
- if ( action == 1 ) {
+ }
+ if ( action == 1 ) {
multiSync( true );
return;
- }
+ }
if (mBlockSaveFlag)
@@ -978,5 +994,5 @@ void MainWindow::slotSyncMenu( int action )
mView->setSyncDevice(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile] );
mView->setSyncName( KOPrefs::instance()->mLocalMachineName );
- KConfig config ( locateLocal( "config","syncprofilesrc" ) );
+ KConfig config ( locateLocal( "config","syncprofilesrc" ) );
KSyncProfile* temp = new KSyncProfile ();
temp->setName(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]);
@@ -998,5 +1014,5 @@ void MainWindow::slotSyncMenu( int action )
} else if ( action >= 1003 ) {
if ( temp->getIsLocalFileSync() ) {
- if ( syncWithFile( temp->getRemoteFileName( ), false ) )
+ if ( syncWithFile( temp->getRemoteFileName( ), false ) )
KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName();
} else {
@@ -1036,5 +1052,5 @@ void MainWindow::displayText( QString text ,QString cap )
lay->setMargin( 3 );
QTextBrowser tb ( &dia );
- lay->addWidget( &tb );
+ lay->addWidget( &tb );
tb.setText( text );
#ifdef DESKTOP_VERSION
@@ -1048,13 +1064,13 @@ void MainWindow::displayFile( QString fn, QString cap )
{
QString fileName = resourcePath() + fn;
- QString text;
+ QString text;
QFile file( fileName );
if (!file.open( IO_ReadOnly ) ) {
return ;
-
- }
+
+ }
QTextStream ts( &file );
text = ts.read();
- file.close();
+ file.close();
displayText( text, cap);
}
@@ -1079,5 +1095,5 @@ void MainWindow::synchowto()
{
#if 0
- QPtrList<Incidence> er = mCalendar->rawIncidences();
+ QPtrList<Incidence> er = mCalendar->rawIncidences();
Incidence* inR = er.first();
VCalFormat vf;
@@ -1093,5 +1109,5 @@ void MainWindow::synchowto()
#endif
displayFile( "howtoSYNC.txt",i18n("KO/Pi Synchronization HowTo") );
-}
+}
void MainWindow::faq()
{
@@ -1116,5 +1132,5 @@ void MainWindow::about()
i18n("KOrganizer/Platform-independent\n") +
"(KO/Pi) " + version + " - " +
-
+
#ifdef DESKTOP_VERSION
i18n("Desktop Edition\n") +
@@ -1176,5 +1192,5 @@ void MainWindow::keyBindings()
i18n("<p><b>White</b>: Item readonly</p>\n");
displayText( text, cap);
-
+
}
void MainWindow::aboutAutoSaving()
@@ -1188,6 +1204,6 @@ void MainWindow::aboutAutoSaving()
msg->exec();
delete msg;
-
-
+
+
}
void MainWindow::aboutKnownBugs()
@@ -1206,5 +1222,5 @@ void MainWindow::aboutKnownBugs()
msg->exec();
delete msg;
-
+
}
@@ -1218,41 +1234,41 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
if ( !incidence ) {
enableIncidenceActions( false );
-
- mNewSubTodoAction->setEnabled( false );
+
+ mNewSubTodoAction->setEnabled( false );
setCaptionToDates();
return;
-
+
}
-
+
//KGlobal::locale()->formatDateTime(nextA, true);
QString startString = "";
- if ( incidence->type() != "Todo" ) {
- if ( incidence->dtStart().date() < incidence->dtEnd().date() ) {
+ if ( incidence->type() != "Todo" ) {
+ if ( incidence->dtStart().date() < incidence->dtEnd().date() ) {
if ( incidence->doesFloat() ) {
- startString += ": "+incidence->dtStartDateStr( true );
- startString += " --- "+((Event*)incidence)->dtEndDateStr( true );
+ startString += ": "+incidence->dtStartDateStr( true );
+ startString += " --- "+((Event*)incidence)->dtEndDateStr( true );
} else {
- startString = ": "+incidence->dtStartStr(true);
+ startString = ": "+incidence->dtStartStr(true);
startString += " --- "+((Event*)incidence)->dtEndStr(true);
}
-
+
} else {
if ( incidence->dtStart().time() != incidence->dtEnd().time() )
startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+
"-"+KGlobal::locale()->formatTime(incidence->dtEnd().time());
- startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
+ startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
}
-
+
}
- else
+ else
startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed");
if ( !incidence->location().isEmpty() )
startString += " (" +incidence->location()+")";
setCaption( incidence->summary()+startString);
-
+
enableIncidenceActions( true );
-
+
if ( incidence->type() == "Event" ) {
mShowAction->setText( i18n("Show Event...") );
@@ -1293,5 +1309,5 @@ 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"),
@@ -1300,7 +1316,7 @@ void MainWindow::importBday()
if ( result == 0 ) {
mView->importBday();
-
+
}
-
+
}
@@ -1324,7 +1340,7 @@ void MainWindow::importQtopia()
0, 1 );
-#endif
+#endif
}
-
+
void MainWindow::saveOnClose()
{
@@ -1342,5 +1358,5 @@ void MainWindow::slotModifiedChanged( bool changed )
return;
int msec;
- // we store the changes after 1 minute,
+ // we store the changes after 1 minute,
// and for safety reasons after 10 minutes again
if ( !mBlockSaveFlag )
@@ -1355,5 +1371,5 @@ void MainWindow::slotModifiedChanged( bool changed )
void MainWindow::save()
{
- if ( mBlockSaveFlag )
+ if ( mBlockSaveFlag )
return;
bool store = mBlockSaveFlag;
@@ -1371,12 +1387,12 @@ void MainWindow::save()
QString savemes;
savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 );
- setCaption(savemes);
+ setCaption(savemes);
} else
- setCaption(i18n("Saving cancelled!"));
+ setCaption(i18n("Saving cancelled!"));
mCalendarModifiedFlag = false;
mBlockSaveFlag = store;
}
-void MainWindow::keyReleaseEvent ( QKeyEvent * e)
+void MainWindow::keyReleaseEvent ( QKeyEvent * e)
{
if ( !e->isAutoRepeat() ) {
@@ -1384,5 +1400,5 @@ void MainWindow::keyReleaseEvent ( QKeyEvent * e)
}
}
-void MainWindow::keyPressEvent ( QKeyEvent * e )
+void MainWindow::keyPressEvent ( QKeyEvent * e )
{
qApp->processEvents();
@@ -1419,5 +1435,5 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
case Qt::Key_Up:
mView->viewManager()->agendaView()->scrollOneHourUp();
- break;
+ break;
case Qt::Key_I:
mView->showIncidence();
@@ -1441,5 +1457,5 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
case Qt::Key_5:
case Qt::Key_6:
- case Qt::Key_7:
+ case Qt::Key_7:
case Qt::Key_8:
case Qt::Key_9:
@@ -1460,5 +1476,5 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton)
mView->newSubTodo();
- else
+ else
mView->dialogManager()->showSearchDialog();
break;
@@ -1477,36 +1493,36 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
case Qt::Key_W:
mView->viewManager()->showWhatsNextView();
- break;
+ break;
case Qt::Key_L:
mView->viewManager()->showListView();
- break;
+ break;
case Qt::Key_N:
mView->viewManager()->showNextXView();
showSelectedDates = true;
- break;
+ break;
case Qt::Key_V:
mView->viewManager()->showTodoView();
- break;
+ break;
case Qt::Key_C:
mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() );
- break;
+ break;
case Qt::Key_P:
mView->showDatePicker( );
- break;
- case Qt::Key_F:
+ break;
+ case Qt::Key_F:
if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
mView->editFilters();
else
mView->toggleFilter();
- break;
+ break;
case Qt::Key_X:
mView->toggleDateNavigatorWidget();
- break;
+ break;
case Qt::Key_Space:
mView->toggleExpand();
- break;
+ break;
case Qt::Key_A:
mView->toggleAllDaySize();
- break;
+ break;
case Qt::Key_T:
if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
@@ -1523,6 +1539,6 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
mView->editIncidenceDescription();;
break;
- // case Qt::Key_Return:
- case Qt::Key_E:
+ // case Qt::Key_Return:
+ case Qt::Key_E:
if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
mView->newEvent();
@@ -1540,5 +1556,5 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
configureAgenda( size );
break;
-
+
default:
@@ -1565,5 +1581,5 @@ void MainWindow::fillFilterMenu()
disable = true;
}
- selectFilterMenu->insertSeparator();
+ selectFilterMenu->insertSeparator();
QPtrList<CalFilter> fili = mView->filters();
CalFilter *curfilter = mView->filterView()->selectedFilter();
@@ -1605,5 +1621,5 @@ void MainWindow::configureToolBar( int item )
p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 );
p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 );
- p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 );
+ p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 );
p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 );
p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 );
@@ -1611,5 +1627,5 @@ void MainWindow::configureToolBar( int item )
p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 );
p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 );
- p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 );
+ p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 );
// initActions();
}
@@ -1622,9 +1638,9 @@ void MainWindow::setCaptionToDates()
selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true);
setCaption( i18n("Dates: ") + selDates );
-
+
}
// parameter item == 0: reinit
void MainWindow::configureAgenda( int item )
-{
+{
KOPrefs *p = KOPrefs::instance();
@@ -1650,5 +1666,5 @@ void MainWindow::configureAgenda( int item )
void MainWindow::saveCalendar()
-{
+{
QString fn = KOPrefs::instance()->mLastSaveFile;
fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this );
@@ -1660,5 +1676,5 @@ void MainWindow::saveCalendar()
QString mes;
bool createbup = true;
- if ( info. exists() ) {
+ if ( info. exists() ) {
mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ;
int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
@@ -1670,5 +1686,5 @@ void MainWindow::saveCalendar()
}
if ( createbup ) {
- mView->saveCalendar( fn );
+ mView->saveCalendar( fn );
mes = i18n("KO/Pi:Saved %1").arg(fn);
KOPrefs::instance()->mLastSaveFile = fn;
@@ -1678,8 +1694,8 @@ void MainWindow::saveCalendar()
void MainWindow::loadCalendar()
{
-
+
QString fn = KOPrefs::instance()->mLastLoadFile;
fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this );
-
+
if ( fn == "" )
return;
@@ -1727,7 +1743,7 @@ void MainWindow::importFile( QString fn, bool quick )
mess );
return;
- }
+ }
int result = 0;
- if ( !quick ) {
+ if ( !quick ) {
mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
result = QMessageBox::warning( this, "KO/Pi: Warning!",
@@ -1748,5 +1764,5 @@ void MainWindow::importFile( QString fn, bool quick )
void MainWindow::importIcal()
{
-
+
QString fn =KOPrefs::instance()->mLastImportFile;
@@ -1755,5 +1771,5 @@ void MainWindow::importIcal()
return;
importFile( fn, true );
-
+
}
@@ -1768,5 +1784,5 @@ void MainWindow::exportVCalendar()
QString mes;
bool createbup = true;
- if ( info. exists() ) {
+ if ( info. exists() ) {
mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) );
int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
@@ -1778,6 +1794,6 @@ void MainWindow::exportVCalendar()
}
if ( createbup ) {
- if ( mView->exportVCalendar( fn ) ) {
- KOPrefs::instance()->mLastVcalFile = fn;
+ if ( mView->exportVCalendar( fn ) ) {
+ KOPrefs::instance()->mLastVcalFile = fn;
if ( fn.length() > 20 )
mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ;
@@ -1789,18 +1805,18 @@ void MainWindow::exportVCalendar()
}
-#include <qpushbutton.h>
+#include <qpushbutton.h>
QString MainWindow::getPassword( )
-{
+{
QString retfile = "";
- QDialog dia ( this, "input-dialog", true );
- QLineEdit lab ( &dia );
+ QDialog dia ( this, "input-dialog", true );
+ QLineEdit lab ( &dia );
lab.setEchoMode( QLineEdit::Password );
QVBoxLayout lay( &dia );
- lay.setMargin(7);
- lay.setSpacing(7);
+ lay.setMargin(7);
+ lay.setSpacing(7);
lay.addWidget( &lab);
dia.setFixedSize( 230,50 );
dia.setCaption( i18n("Enter password") );
- QPushButton pb ( "OK", &dia);
+ QPushButton pb ( "OK", &dia);
lay.addWidget( &pb );
connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) );
@@ -1845,7 +1861,7 @@ bool MainWindow::syncWithFile( QString fn , bool quick )
mess );
return ret;
- }
+ }
int result = 0;
- if ( !quick ) {
+ if ( !quick ) {
mess = i18n("Sync with file \n...%1\nfrom:\n%2\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
@@ -1853,9 +1869,9 @@ bool MainWindow::syncWithFile( QString fn , bool quick )
i18n("Sync"), i18n("Cancel"), 0,
0, 1 );
- if ( result )
+ if ( result )
return false;
}
if ( KOPrefs::instance()->mAskForPreferences )
- mView->edit_sync_options();
+ mView->edit_sync_options();
if ( result == 0 ) {
//qDebug("Now sycing ... ");
@@ -1888,5 +1904,5 @@ void MainWindow::confSync()
fillSyncMenu();
//mView->writeSettings();
-
+
}
@@ -1898,5 +1914,5 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask)
if ( QMessageBox::information( this, i18n("KO/Pi Sync"),
question,
- i18n("Yes"), i18n("No"),
+ i18n("Yes"), i18n("No"),
0, 0 ) != 0 )
return;
@@ -1908,7 +1924,7 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask)
command = command.left( fi )+ pwd + command.mid( fi+5 );
- }
+ }
int maxlen = 30;
- if ( QApplication::desktop()->width() > 320 )
+ if ( QApplication::desktop()->width() > 320 )
maxlen += 25;
setCaption ( i18n( "Copy remote file to local machine..." ) );
@@ -1929,5 +1945,5 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask)
question,
i18n("Okay!")) ;
- setCaption ("KO/Pi");
+ setCaption ("KO/Pi");
return;
}
@@ -1940,5 +1956,5 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask)
// e->setReadOnly( true );
if ( KOPrefs::instance()->mWriteBackFile ) {
- command = prof->getPostSyncCommand();
+ command = prof->getPostSyncCommand();
setCaption ( i18n( "Writing back file ..." ) );
result = system ( command );
@@ -1955,7 +1971,7 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask)
}
void MainWindow::syncSSH()
-{
+{
// not used anymore
- QTime timer;
+ QTime timer;
timer.start();
//qDebug("MainWindow::syncssh() ");
@@ -1972,5 +1988,5 @@ void MainWindow::syncSSH()
i18n("User: " ) + remoteUser +"\n" ;
int maxlen = 30;
- if ( QApplication::desktop()->width() > 320 )
+ if ( QApplication::desktop()->width() > 320 )
maxlen += 25;
if ( remoteFile.length() > maxlen )
@@ -1982,8 +1998,8 @@ void MainWindow::syncSSH()
else
question += i18n("Local temp file:\n " ) + localFile +"\n";
-
+
if ( QMessageBox::information( this, i18n("KO/Pi Sync"),
question,
- i18n("Yes"), i18n("No"),
+ i18n("Yes"), i18n("No"),
0, 0 ) != 0 )
return;
@@ -2011,5 +2027,5 @@ void MainWindow::syncSSH()
question,
i18n("Okay!")) ;
- setCaption ("KO/Pi");
+ setCaption ("KO/Pi");
return;
}
@@ -2024,5 +2040,5 @@ void MainWindow::syncSSH()
// e->setReadOnly( true );
if ( KOPrefs::instance()->mWriteBackFile ) {
- command = "scp " + localFile +" " +remoteUser + "@" + remoteIP +":" + remoteFile ;
+ command = "scp " + localFile +" " +remoteUser + "@" + remoteIP +":" + remoteFile ;
setCaption ( i18n( "Writing back file ..." ) );
result = system ( command );
@@ -2037,5 +2053,5 @@ void MainWindow::syncSSH()
question,
i18n("Okay!")) ;
- setCaption ("KO/Pi");
+ setCaption ("KO/Pi");
return;
} else {
@@ -2052,5 +2068,5 @@ void MainWindow::syncSSH()
qDebug("MainWindow::merging) ");
mView->syncCalendar( "/home/polo/Applications/korganizer/z_sync.ics", 0 );
- while ( mBlockSaveFlag )
+ while ( mBlockSaveFlag )
qApp->processEvents();
save();
@@ -2067,5 +2083,5 @@ void MainWindow::syncSharp()
mView->syncSharp();
slotModifiedChanged( true );
-
+
}
void MainWindow::syncPhone()
@@ -2075,5 +2091,5 @@ void MainWindow::syncPhone()
mView->syncPhone();
slotModifiedChanged( true );
-
+
}