summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2004-10-18 09:08:13 (UTC)
committer zautrix <zautrix>2004-10-18 09:08:13 (UTC)
commit56990d318b15eacf7d3cc7425ab62f68da099ddf (patch) (unidiff)
treeb2f021bd75bc6a08fa8fc51a07ce1755b8e4a95e /korganizer
parent1712d92ea25b220273859d985bc7211fa7a97a39 (diff)
downloadkdepimpi-56990d318b15eacf7d3cc7425ab62f68da099ddf.zip
kdepimpi-56990d318b15eacf7d3cc7425ab62f68da099ddf.tar.gz
kdepimpi-56990d318b15eacf7d3cc7425ab62f68da099ddf.tar.bz2
fix of tmp file path for desktop version
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp5
-rw-r--r--korganizer/koprefs.cpp6
-rw-r--r--korganizer/mainwindow.cpp4
3 files changed, 6 insertions, 9 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 290c0b9..884c61a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2282,50 +2282,53 @@ void CalendarView::manageCategories()
2282} 2282}
2283 2283
2284void CalendarView::beamIncidence(Incidence * Inc) 2284void CalendarView::beamIncidence(Incidence * Inc)
2285{ 2285{
2286 QPtrList<Incidence> delSel ; 2286 QPtrList<Incidence> delSel ;
2287 delSel.append(Inc); 2287 delSel.append(Inc);
2288 beamIncidenceList( delSel ); 2288 beamIncidenceList( delSel );
2289} 2289}
2290void CalendarView::beamCalendar() 2290void CalendarView::beamCalendar()
2291{ 2291{
2292 QPtrList<Incidence> delSel = mCalendar->rawIncidences(); 2292 QPtrList<Incidence> delSel = mCalendar->rawIncidences();
2293 //qDebug("beamCalendar() "); 2293 //qDebug("beamCalendar() ");
2294 beamIncidenceList( delSel ); 2294 beamIncidenceList( delSel );
2295} 2295}
2296void CalendarView::beamFilteredCalendar() 2296void CalendarView::beamFilteredCalendar()
2297{ 2297{
2298 QPtrList<Incidence> delSel = mCalendar->incidences(); 2298 QPtrList<Incidence> delSel = mCalendar->incidences();
2299 //qDebug("beamFilteredCalendar() "); 2299 //qDebug("beamFilteredCalendar() ");
2300 beamIncidenceList( delSel ); 2300 beamIncidenceList( delSel );
2301} 2301}
2302void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) 2302void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
2303{ 2303{
2304 if ( beamDialog->exec () == QDialog::Rejected ) 2304 if ( beamDialog->exec () == QDialog::Rejected )
2305 return; 2305 return;
2306 2306#ifdef DESKTOP_VERSION
2307 QString fn = locateLocal( "tmp", "kopibeamfile" );
2308#else
2307 QString fn = "/tmp/kopibeamfile"; 2309 QString fn = "/tmp/kopibeamfile";
2310#endif
2308 QString mes; 2311 QString mes;
2309 bool createbup = true; 2312 bool createbup = true;
2310 if ( createbup ) { 2313 if ( createbup ) {
2311 QString description = "\n"; 2314 QString description = "\n";
2312 CalendarLocal* cal = new CalendarLocal(); 2315 CalendarLocal* cal = new CalendarLocal();
2313 if ( beamDialog->beamLocal() ) 2316 if ( beamDialog->beamLocal() )
2314 cal->setLocalTime(); 2317 cal->setLocalTime();
2315 else 2318 else
2316 cal->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); 2319 cal->setTimeZoneId(KOPrefs::instance()->mTimeZoneId);
2317 Incidence *incidence = delSel.first(); 2320 Incidence *incidence = delSel.first();
2318 bool addText = false; 2321 bool addText = false;
2319 if ( delSel.count() < 10 ) 2322 if ( delSel.count() < 10 )
2320 addText = true; 2323 addText = true;
2321 else { 2324 else {
2322 description.sprintf(i18n(" %d items?"),delSel.count() ); 2325 description.sprintf(i18n(" %d items?"),delSel.count() );
2323 } 2326 }
2324 while ( incidence ) { 2327 while ( incidence ) {
2325 Incidence *in = incidence->clone(); 2328 Incidence *in = incidence->clone();
2326 if ( ! in->summary().isEmpty() ) { 2329 if ( ! in->summary().isEmpty() ) {
2327 in->setDescription(""); 2330 in->setDescription("");
2328 } else { 2331 } else {
2329 in->setSummary( in->description().left(20)); 2332 in->setSummary( in->description().left(20));
2330 in->setDescription(""); 2333 in->setDescription("");
2331 } 2334 }
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 651442b..258f738 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -181,54 +181,48 @@ KOPrefs::KOPrefs() :
181 addItemFont("WhatsNextView Font",&mWhatsNextFont); 181 addItemFont("WhatsNextView Font",&mWhatsNextFont);
182 addItemFont("EventView Font",&mEventViewFont); 182 addItemFont("EventView Font",&mEventViewFont);
183 183
184// KPrefs::setCurrentGroup("SyncProfiles"); 184// KPrefs::setCurrentGroup("SyncProfiles");
185// addItemString("LocalMachineName",&mLocalMachineName, "undefined"); 185// addItemString("LocalMachineName",&mLocalMachineName, "undefined");
186// addItemStringList("SyncProfileNames",&mSyncProfileNames); 186// addItemStringList("SyncProfileNames",&mSyncProfileNames);
187// addItemStringList("ExternSyncProfiles",&mExternSyncProfileNames); 187// addItemStringList("ExternSyncProfiles",&mExternSyncProfileNames);
188 188
189 KPrefs::setCurrentGroup("RemoteSyncing"); 189 KPrefs::setCurrentGroup("RemoteSyncing");
190// addItemBool("UsePasswd",&mUsePassWd,false); 190// addItemBool("UsePasswd",&mUsePassWd,false);
191// addItemBool("WriteBackFile",&mWriteBackFile,true); 191// addItemBool("WriteBackFile",&mWriteBackFile,true);
192// addItemBool("WriteBackExistingOnly",&mWriteBackExistingOnly,false); 192// addItemBool("WriteBackExistingOnly",&mWriteBackExistingOnly,false);
193// addItemBool("AskForPreferences",&mAskForPreferences,true); 193// addItemBool("AskForPreferences",&mAskForPreferences,true);
194// addItemBool("ShowSyncSummary",&mShowSyncSummary,true); 194// addItemBool("ShowSyncSummary",&mShowSyncSummary,true);
195 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); 195 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" );
196 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); 196 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" );
197 addItemBool("ShowSyncEvents",&mShowSyncEvents,false); 197 addItemBool("ShowSyncEvents",&mShowSyncEvents,false);
198 addItemInt("LastSyncTime",&mLastSyncTime,0); 198 addItemInt("LastSyncTime",&mLastSyncTime,0);
199 199
200#ifdef _WIN32_ 200#ifdef _WIN32_
201 QString hdp= locateLocal("data","korganizer")+"\\\\"; 201 QString hdp= locateLocal("data","korganizer")+"\\\\";
202#else 202#else
203 QString hdp= locateLocal("data","korganizer")+"/"; 203 QString hdp= locateLocal("data","korganizer")+"/";
204#endif 204#endif
205// addItemString("RemoteIP",&mRemoteIP, "192.168.0.65");
206// addItemString("RemoteUser",&mRemoteUser, "zaurus");
207// addItemString("RemotePassWd",&mRemotePassWd, "");
208// addItemString("RemoteFile", &mRemoteFile, hdp+"mycalendar.ics");
209// addItemString("LocalTempFile",&mLocalTempFile, "/tmp/tempsyncfile.ics" );
210
211 205
212 KPrefs::setCurrentGroup("LoadSaveFileNames"); 206 KPrefs::setCurrentGroup("LoadSaveFileNames");
213 207
214 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); 208 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" );
215 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); 209 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" );
216 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); 210 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" );
217 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); 211 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" );
218 212
219 213
220 KPrefs::setCurrentGroup("Locale"); 214 KPrefs::setCurrentGroup("Locale");
221 addItemInt("PreferredLanguage",&mPreferredLanguage,0); 215 addItemInt("PreferredLanguage",&mPreferredLanguage,0);
222 addItemInt("PreferredTime",&mPreferredTime,0); 216 addItemInt("PreferredTime",&mPreferredTime,0);
223 addItemInt("PreferredDate",&mPreferredDate,0); 217 addItemInt("PreferredDate",&mPreferredDate,0);
224 addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false); 218 addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false);
225 addItemBool("ShortDateInViewer",&mShortDateInViewer,false); 219 addItemBool("ShortDateInViewer",&mShortDateInViewer,false);
226 addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y"); 220 addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y");
227 addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); 221 addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y");
228 222
229 223
230 KPrefs::setCurrentGroup("Colors"); 224 KPrefs::setCurrentGroup("Colors");
231 addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); 225 addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor);
232 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); 226 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor);
233 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); 227 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor);
234 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); 228 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor);
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 06470b8..c3e9f75 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1193,52 +1193,52 @@ void MainWindow::aboutAutoSaving()
1193void MainWindow::aboutKnownBugs() 1193void MainWindow::aboutKnownBugs()
1194{ 1194{
1195 QMessageBox* msg; 1195 QMessageBox* msg;
1196 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), 1196 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"),
1197 i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ 1197 i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+
1198 i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ 1198 i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+
1199 i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") + 1199 i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") +
1200 i18n("\nor report them in the bugtracker on\n") + 1200 i18n("\nor report them in the bugtracker on\n") +
1201 i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), 1201 i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"),
1202 QMessageBox::NoIcon, 1202 QMessageBox::NoIcon,
1203 QMessageBox::Ok, 1203 QMessageBox::Ok,
1204 QMessageBox::NoButton, 1204 QMessageBox::NoButton,
1205 QMessageBox::NoButton); 1205 QMessageBox::NoButton);
1206 msg->exec(); 1206 msg->exec();
1207 delete msg; 1207 delete msg;
1208 1208
1209} 1209}
1210 1210
1211QString MainWindow::defaultFileName() 1211QString MainWindow::defaultFileName()
1212{ 1212{
1213 return locateLocal( "data", "korganizer/mycalendar.ics" ); 1213 return locateLocal( "data", "korganizer/mycalendar.ics" );
1214} 1214}
1215QString MainWindow::syncFileName() 1215QString MainWindow::syncFileName()
1216{ 1216{
1217#ifdef _WIN32_ 1217#ifdef DESKTOP_VERSION
1218 return locateLocal( "tmp", "synccalendar.ics" ); 1218 return locateLocal( "tmp", "synccalendar.ics" );
1219#else 1219#else
1220 return QString( "/tmp/kopitempfile.ics" ); 1220 return QString( "/tmp/synccalendar.ics" );
1221#endif 1221#endif
1222} 1222}
1223 1223
1224void MainWindow::processIncidenceSelection( Incidence *incidence ) 1224void MainWindow::processIncidenceSelection( Incidence *incidence )
1225{ 1225{
1226 if ( !incidence ) { 1226 if ( !incidence ) {
1227 enableIncidenceActions( false ); 1227 enableIncidenceActions( false );
1228 1228
1229 mNewSubTodoAction->setEnabled( false ); 1229 mNewSubTodoAction->setEnabled( false );
1230 setCaptionToDates(); 1230 setCaptionToDates();
1231 return; 1231 return;
1232 1232
1233 } 1233 }
1234 1234
1235 //KGlobal::locale()->formatDateTime(nextA, true); 1235 //KGlobal::locale()->formatDateTime(nextA, true);
1236 QString startString = ""; 1236 QString startString = "";
1237 if ( incidence->type() != "Todo" ) { 1237 if ( incidence->type() != "Todo" ) {
1238 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { 1238 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) {
1239 if ( incidence->doesFloat() ) { 1239 if ( incidence->doesFloat() ) {
1240 startString += ": "+incidence->dtStartDateStr( true ); 1240 startString += ": "+incidence->dtStartDateStr( true );
1241 startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); 1241 startString += " --- "+((Event*)incidence)->dtEndDateStr( true );
1242 1242
1243 } else { 1243 } else {
1244 startString = ": "+incidence->dtStartStr(true); 1244 startString = ": "+incidence->dtStartStr(true);