summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 40f2cf4..be69be7 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -44,20 +44,21 @@
#include "kstandarddirs.h"
#include "koprefs.h"
#include "kfiledialog.h"
#include "koglobals.h"
#include "kglobal.h"
#include "klocale.h"
#include "kconfig.h"
#include "simplealarmclient.h"
-
using namespace KCal;
#ifndef _WIN32_
#include <unistd.h>
+#else
+#include "koimportoldialog.h"
#endif
#include "mainwindow.h"
int globalFlagBlockStartup;
MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
QMainWindow( parent, name )
{
@@ -579,16 +580,24 @@ void MainWindow::initActions()
action->addTo( importMenu );
connect( action, SIGNAL( activated() ), SLOT( importBday() ) );
#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
+#ifdef _WIN32_
+ importMenu->insertSeparator();
+ action = new QAction( "import_ol", i18n("Import from OL"), 0,
+ this );
+ action->addTo( importMenu );
+ connect( action, SIGNAL( activated() ), SLOT( importOL() ) );
+#endif
#endif
importMenu->insertSeparator();
action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0,
this );
action->addTo( importMenu );
connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) );
@@ -925,17 +934,19 @@ void MainWindow::multiSync( bool askforPrefs )
else
setCaption(i18n("Nothing synced! No profiles defined for multisync!"));
return;
}
void MainWindow::slotSyncMenu( int action )
{
//qDebug("syncaction %d ", action);
if ( action == 0 ) {
+
confSync();
+
return;
}
if ( action == 1 ) {
multiSync( true );
return;
}
if (mBlockSaveFlag)
@@ -1214,16 +1225,25 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
void MainWindow::enableIncidenceActions( bool enabled )
{
mShowAction->setEnabled( enabled );
mEditAction->setEnabled( enabled );
mDeleteAction->setEnabled( enabled );
}
+void MainWindow::importOL()
+{
+#ifdef _WIN32_
+ KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this );
+ id->exec();
+ delete id;
+ mView->updateView();
+#endif
+}
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();