summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp6
-rw-r--r--libkdepim/ksyncprefsdialog.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 7978b46..9e326a1 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -835,92 +835,92 @@ void MainWindow::initActions()
if (p-> mShowIconJournal)
configureToolBarMenu->setItemChecked( 90, true );
if (p-> mShowIconWhatsThis)
configureToolBarMenu->setItemChecked( 300, true );
QLabel* dummy = new QLabel( iconToolBar );
dummy->setBackgroundColor( iconToolBar->backgroundColor() );
if (!p-> mShowIconStretch)
iconToolBar->setStretchableWidget ( dummy ) ;
else
configureToolBarMenu->setItemChecked( 5, true );
if (p-> mShowIconWhatsThis)
QWhatsThis::whatsThisButton ( iconToolBar );
connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
configureAgenda( p->mHourSize );
connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
}
void MainWindow::fillSyncMenu()
{
syncMenu->clear();
syncMenu->insertItem( i18n("Configure..."), 0 );
syncMenu->insertSeparator();
syncMenu->insertItem( i18n("Multiple sync"), 1 );
syncMenu->insertSeparator();
- KConfig config ( locateLocal( "config","syncprofilesrc" ) );
+ KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
config.setGroup("General");
QStringList prof = config.readListEntry("SyncProfileNames");
KOPrefs::instance()->mLocalMachineName = config.readEntry("LocalMachineName","undefined");
if ( prof.count() < 3 ) {
prof.clear();
prof << i18n("Sharp_DTM");
prof << i18n("Local_file");
prof << i18n("Last_file");
KSyncProfile* temp = new KSyncProfile ();
temp->setName( prof[0] );
temp->writeConfig(&config);
temp->setName( prof[1] );
temp->writeConfig(&config);
temp->setName( prof[2] );
temp->writeConfig(&config);
config.setGroup("General");
config.writeEntry("SyncProfileNames",prof);
config.writeEntry("ExternSyncProfiles","Sharp_DTM");
config.sync();
delete temp;
}
KOPrefs::instance()->mExternSyncProfiles = config.readListEntry("ExternSyncProfiles");
KOPrefs::instance()->mSyncProfileNames = prof;
int i;
for ( i = 0; i < prof.count(); ++i ) {
syncMenu->insertItem( prof[i], 1000+i );
if ( i == 2 )
syncMenu->insertSeparator();
}
QDir app_dir;
if ( !app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) {
syncMenu->setItemEnabled( false , 1000 );
}
mView->setupExternSyncProfiles();
}
int MainWindow::ringSync()
{
int syncedProfiles = 0;
int i;
QTime timer;
- KConfig config ( locateLocal( "config","syncprofilesrc" ) );
+ KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames;
KSyncProfile* temp = new KSyncProfile ();
KOPrefs::instance()->mAskForPreferences = false;
for ( i = 0; i < syncProfileNames.count(); ++i ) {
mCurrentSyncProfile = i;
temp->setName(syncProfileNames[mCurrentSyncProfile]);
temp->readConfig(&config);
if ( temp->getIncludeInRingSync() && ( i < 1 || i > 2 )) {
setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... "));
++syncedProfiles;
// KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences();
KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile();
KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting();
KOPrefs::instance()->mShowSyncSummary = false;
mView->setSyncDevice(syncProfileNames[i] );
mView->setSyncName( KOPrefs::instance()->mLocalMachineName );
if ( i == 0 ) {
syncSharp();
} else {
if ( temp->getIsLocalFileSync() ) {
if ( syncWithFile( temp->getRemoteFileName( ), true ) )
KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName();
} else {
if ( temp->getIsPhoneSync() ) {
@@ -982,49 +982,49 @@ 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)
return;
mBlockSaveFlag = true;
mCurrentSyncProfile = action - 1000 ;
mView->setSyncDevice(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile] );
mView->setSyncName( KOPrefs::instance()->mLocalMachineName );
- KConfig config ( locateLocal( "config","syncprofilesrc" ) );
+ KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
KSyncProfile* temp = new KSyncProfile ();
temp->setName(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]);
temp->readConfig(&config);
KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences();
KOPrefs::instance()->mSyncAlgoPrefs = temp->getSyncPrefs();
KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile();
KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting();
KOPrefs::instance()->mShowSyncSummary = temp->getShowSummaryAfterSync();
if ( action == 1000 ) {
syncSharp();
} else if ( action == 1001 ) {
syncLocalFile();
} else if ( action == 1002 ) {
quickSyncLocalFile();
} else if ( action >= 1003 ) {
if ( temp->getIsLocalFileSync() ) {
if ( syncWithFile( temp->getRemoteFileName( ), false ) )
KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName();
} else {
if ( temp->getIsPhoneSync() ) {
KOPrefs::instance()->mPhoneDevice = temp->getPhoneDevice( ) ;
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 67a3f52..857ceac 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -521,73 +521,73 @@ void KSyncPrefsDialog::cloneProfile()
{
if ( currentSelection >= 0 )
addProfile (mSyncProfiles.at(currentSelection)->clone()) ;
else
newProfile();
}
void KSyncPrefsDialog::setLocalMachineName ( const QString& name )
{
mMyMachineName->setText( name );
}
QString KSyncPrefsDialog::getLocalMachineName ( )
{
return mMyMachineName->text();
}
QStringList KSyncPrefsDialog::getSyncProfileNames()
{
return mSyncProfileNames;
}
void KSyncPrefsDialog::usrReadConfig()
{
//KConfig *config = KOGlobals::config();
- KConfig config ( locateLocal( "config","syncprofilesrc" ) );
+ KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
config.setGroup("General");
mSyncProfileNames =config.readListEntry("SyncProfileNames");
mMyMachineName->setText(config.readEntry("LocalMachineName","undefined"));
int i;
KSyncProfile* temp ;
mSyncProfiles.clear();
for ( i = 0; i < mSyncProfileNames.count();++i ) {
temp = new KSyncProfile ();
temp->setName( mSyncProfileNames[i] );
temp->readConfig( &config );
mSyncProfiles.append( temp );
}
insertProfiles();
//mMyMachineName->setText(KOPrefs::instance()->mLocalMachineName );
}
void KSyncPrefsDialog::usrWriteConfig()
{
saveProfile();
if ( currentSelection >= 0 )
profileChanged(currentSelection);
//KConfig *config = KOGlobals::config();
- KConfig config ( locateLocal( "config","syncprofilesrc" ) );
+ KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
KSyncProfile* prof = mSyncProfiles.first();
QStringList externalSyncProfileNames;
externalSyncProfileNames.append("Sharp_DTM");;
while ( prof ) {
prof->writeConfig(&config);
if ( prof->getIsPhoneSync( ) )
externalSyncProfileNames.append(prof->getName( ) );
prof = mSyncProfiles.next();
}
//KOPrefs::instance()->mSyncProfileNames = mSyncProfileNames;
//KOPrefs::instance()->mLocalMachineName = mMyMachineName->text();
config.setGroup("General");
config.writeEntry("SyncProfileNames",mSyncProfileNames);
config.writeEntry("ExternSyncProfiles",externalSyncProfileNames);
config.writeEntry("LocalMachineName",mMyMachineName->text());
config.sync();
}
void KSyncPrefsDialog::helpDevice()
{
QString hint = i18n("Insert device where\nphone is connected. E.g.:\n");
#ifdef _WIN32_
hint += "Leave empty for Irda.\n"
"com1:\n(first serial port)\n"