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.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 7b07a2e..26ea1e2 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -45,50 +45,52 @@
#include "calendarview.h"
#include "koviewmanager.h"
#include "datenavigator.h"
#include "koagendaview.h"
#include "koagenda.h"
#include "kodialogmanager.h"
#include "kdialogbase.h"
#include "kapplication.h"
#include "kofilterview.h"
#include "kstandarddirs.h"
#include "koprefs.h"
#include "kfiledialog.h"
#include "koglobals.h"
#include "kglobal.h"
#include "klocale.h"
#include "kconfig.h"
#include "simplealarmclient.h"
#include "externalapphandler.h"
using namespace KCal;
#ifndef _WIN32_
#include <unistd.h>
#else
+#ifdef _OL_IMPORT_
#include "koimportoldialog.h"
#endif
+#endif
#include "mainwindow.h"
class KOex2phonePrefs : public QDialog
{
public:
KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) :
QDialog( parent, name, true )
{
setCaption( i18n("Export to phone options") );
QVBoxLayout* lay = new QVBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
QLabel *lab;
lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
lab->setAlignment (AlignHCenter );
QHBox* temphb;
temphb = new QHBox( this );
new QLabel( i18n("I/O device: "), temphb );
mPhoneDevice = new QLineEdit( temphb);
lay->addWidget( temphb );
temphb = new QHBox( this );
new QLabel( i18n("Connection: "), temphb );
mPhoneConnection = new QLineEdit( temphb);
lay->addWidget( temphb );
@@ -757,49 +759,49 @@ void MainWindow::initActions()
actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
}
// 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
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_
+#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
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() ) );
@@ -1346,50 +1348,50 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
mNewSubTodoAction->setEnabled( true );
} else {
mShowAction->setText( i18n("Show...") );
mShowAction->setText( i18n("Edit...") );
mShowAction->setText( i18n("Delete...") );
mNewSubTodoAction->setEnabled( false );
}
}
void MainWindow::enableIncidenceActions( bool enabled )
{
mShowAction->setEnabled( enabled );
mEditAction->setEnabled( enabled );
mDeleteAction->setEnabled( enabled );
mCloneAction->setEnabled( enabled );
mMoveAction->setEnabled( enabled );
mBeamAction->setEnabled( enabled );
mCancelAction->setEnabled( enabled );
}
void MainWindow::importOL()
-{
-#ifdef _WIN32_
+{
+#ifdef _OL_IMPORT_
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();
}
}
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"),