summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp28
1 files changed, 3 insertions, 25 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index b543eca..c75d10e 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -227,25 +227,24 @@ CalendarView::CalendarView( Calendar *calendar,
void CalendarView::init()
{
beamDialog = new KOBeamPrefs();
mDatePickerMode = 0;
mCurrentSyncDevice = "";
writeLocale();
mViewManager = new KOViewManager( this );
mDialogManager = new KODialogManager( this );
mEventViewerDialog = 0;
mModified = false;
mReadOnly = false;
mSelectedIncidence = 0;
- mSyncProfiles.setAutoDelete(true);
mCalPrinter = 0;
mFilters.setAutoDelete(true);
mCalendar->registerObserver( this );
// TODO: Make sure that view is updated, when calendar is changed.
mStorage = new FileStorage( mCalendar );
mNavigator = new DateNavigator( this, "datevav", mViewManager );
QBoxLayout *topLayout = (QBoxLayout*)layout();
#ifndef KORG_NOSPLITTER
// create the main layout frames.
@@ -681,32 +680,34 @@ void CalendarView::createPrinter()
mCalPrinter = new CalPrinter(this, mCalendar);
connect(this, SIGNAL(configChanged()), mCalPrinter, SLOT(updateConfig()));
}
#endif
}
void CalendarView::confSync()
{
static KOSyncPrefsDialog* sp = 0;
if ( ! sp ) {
sp = new KOSyncPrefsDialog( this, "syncprefs", true );
}
+ sp->setLocalMachineName ( KOPrefs::instance()->mLocalMachineName );
sp->usrReadConfig();
#ifndef DESKTOP_VERSION
sp->showMaximized();
#else
sp->show();
#endif
sp->exec();
-
+ KOPrefs::instance()->mSyncProfileNames = sp->getSyncProfileNames();
+ KOPrefs::instance()->mLocalMachineName = sp->getLocalMachineName ();
}
//KOPrefs::instance()->mWriteBackFile
//KOPrefs::instance()->mWriteBackExistingOnly
// 0 syncPrefsGroup->addRadio(i18n("Take local entry on conflict"));
// 1 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict"));
// 2 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict"));
// 3 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict"));
// 4 syncPrefsGroup->addRadio(i18n("Force take local entry always"));
// 5 syncPrefsGroup->addRadio(i18n("Force take remote entry always"));
@@ -1554,47 +1555,24 @@ void CalendarView::readSettings()
}
list = config->readListEntry("ViewerLayout");
if ( ! list.isEmpty() ) {
x = list[0].toInt();
y = list[1].toInt();
w = list[2].toInt();
h = list[3].toInt();
getEventViewerDialog()->setGeometry(x,y,w,h);
}
#endif
-
- // pending read sync settings;
- mSyncProfileNames.clear();
- mSyncProfileNames << "Profile_1";
- mSyncProfileNames << "Profile_2";
- mSyncProfileNames << "Profile_3";
- mSyncProfileNames << "Profile_4";
- mSyncProfileNames << "Profile_5";
- KSyncProfile* temp = new KSyncProfile ();
- temp->setName("Profile_1" );
- mSyncProfiles.append( temp );
- temp = new KSyncProfile ();
- temp->setName("Profile_2" );
- mSyncProfiles.append( temp );
- temp = new KSyncProfile ();
- temp->setName("Profile_3" );
- mSyncProfiles.append( temp );
- temp = new KSyncProfile ();
- temp->setName("Profile_4" );
- mSyncProfiles.append( temp );
- temp = new KSyncProfile ();
- temp->setName("Profile_5" );
- mSyncProfiles.append( temp );
}
void CalendarView::writeSettings()
{
// kdDebug() << "CalendarView::writeSettings" << endl;
KConfig *config = KOGlobals::config();
#ifndef KORG_NOSPLITTER
config->setGroup("KOrganizer Geometry");