summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncmanager.cpp
authorzautrix <zautrix>2004-10-24 13:35:47 (UTC)
committer zautrix <zautrix>2004-10-24 13:35:47 (UTC)
commit42f22a904fb6440a7b4071b2f4f148bee5f71cc0 (patch) (unidiff)
tree547a887b3f9136995c686763ccd30cfbb9f731c2 /libkdepim/ksyncmanager.cpp
parenta04e4d7e6495e985879390e24cc0174d8f867dbf (diff)
downloadkdepimpi-42f22a904fb6440a7b4071b2f4f148bee5f71cc0.zip
kdepimpi-42f22a904fb6440a7b4071b2f4f148bee5f71cc0.tar.gz
kdepimpi-42f22a904fb6440a7b4071b2f4f148bee5f71cc0.tar.bz2
desktop changes
Diffstat (limited to 'libkdepim/ksyncmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 554c6e5..4390a06 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -93,45 +93,47 @@ void KSyncManager::fillSyncMenu()
93 mSyncMenu->insertItem( i18n("Disable Pi-Sync"), 3 ); 93 mSyncMenu->insertItem( i18n("Disable Pi-Sync"), 3 );
94 } 94 }
95 mSyncMenu->insertSeparator(); 95 mSyncMenu->insertSeparator();
96 mSyncMenu->insertItem( i18n("Multiple sync"), 1 ); 96 mSyncMenu->insertItem( i18n("Multiple sync"), 1 );
97 mSyncMenu->insertSeparator(); 97 mSyncMenu->insertSeparator();
98 98
99 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); 99 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
100 config.setGroup("General"); 100 config.setGroup("General");
101 QStringList prof = config.readListEntry("SyncProfileNames"); 101 QStringList prof = config.readListEntry("SyncProfileNames");
102 mLocalMachineName = config.readEntry("LocalMachineName","undefined"); 102 mLocalMachineName = config.readEntry("LocalMachineName","undefined");
103 if ( prof.count() < 2 ) { 103 if ( prof.count() < 2 ) {
104 prof.clear(); 104 prof.clear();
105 QString externalName;
105#ifdef DESKTOP_VERSION 106#ifdef DESKTOP_VERSION
106#ifdef _WIN32_ 107#ifdef _WIN32_
107 prof << i18n("OutLook(not_implemented)"); 108 externalName = "OutLook(not_implemented)";
108#else 109#else
109 prof << i18n("KDE_Desktop"); 110 externalName = "KDE_Desktop";
110#endif 111#endif
111#else 112#else
112 prof << i18n("Sharp_DTM"); 113 externalName = "Sharp_DTM";
113#endif 114#endif
115 prof << externalName;
114 prof << i18n("Local_file"); 116 prof << i18n("Local_file");
115 prof << i18n("Last_file"); 117 prof << i18n("Last_file");
116 KSyncProfile* temp = new KSyncProfile (); 118 KSyncProfile* temp = new KSyncProfile ();
117 temp->setName( prof[0] ); 119 temp->setName( prof[0] );
118 temp->writeConfig(&config); 120 temp->writeConfig(&config);
119 temp->setName( prof[1] ); 121 temp->setName( prof[1] );
120 temp->writeConfig(&config); 122 temp->writeConfig(&config);
121 temp->setName( prof[2] ); 123 temp->setName( prof[2] );
122 temp->writeConfig(&config); 124 temp->writeConfig(&config);
123 config.setGroup("General"); 125 config.setGroup("General");
124 config.writeEntry("SyncProfileNames",prof); 126 config.writeEntry("SyncProfileNames",prof);
125 config.writeEntry("ExternSyncProfiles","Sharp_DTM"); 127 config.writeEntry("ExternSyncProfiles",externalName);
126 config.sync(); 128 config.sync();
127 delete temp; 129 delete temp;
128 } 130 }
129 mExternSyncProfiles = config.readListEntry("ExternSyncProfiles"); 131 mExternSyncProfiles = config.readListEntry("ExternSyncProfiles");
130 mSyncProfileNames = prof; 132 mSyncProfileNames = prof;
131 unsigned int i; 133 unsigned int i;
132 for ( i = 0; i < prof.count(); ++i ) { 134 for ( i = 0; i < prof.count(); ++i ) {
133 mSyncMenu->insertItem( prof[i], 1000+i ); 135 mSyncMenu->insertItem( prof[i], 1000+i );
134 if ( i == 2 ) 136 if ( i == 2 )
135 mSyncMenu->insertSeparator(); 137 mSyncMenu->insertSeparator();
136 } 138 }
137 QDir app_dir; 139 QDir app_dir;