summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-18 09:08:13 (UTC)
committer zautrix <zautrix>2004-10-18 09:08:13 (UTC)
commit56990d318b15eacf7d3cc7425ab62f68da099ddf (patch) (unidiff)
treeb2f021bd75bc6a08fa8fc51a07ce1755b8e4a95e
parent1712d92ea25b220273859d985bc7211fa7a97a39 (diff)
downloadkdepimpi-56990d318b15eacf7d3cc7425ab62f68da099ddf.zip
kdepimpi-56990d318b15eacf7d3cc7425ab62f68da099ddf.tar.gz
kdepimpi-56990d318b15eacf7d3cc7425ab62f68da099ddf.tar.bz2
fix of tmp file path for desktop version
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp57
-rw-r--r--kmicromail/viewmail.cpp4
-rw-r--r--korganizer/calendarview.cpp5
-rw-r--r--korganizer/koprefs.cpp6
-rw-r--r--korganizer/mainwindow.cpp4
-rw-r--r--libkcal/phoneformat.cpp4
-rw-r--r--version2
7 files changed, 22 insertions, 60 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 2e408b7..11eeabc 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -687,121 +687,82 @@ void KABCore::export2phone()
687 } 687 }
688 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 688 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
689 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 689 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
690 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 690 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
691 691
692 692
693 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, 693 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice,
694 KPimGlobalPrefs::instance()->mEx2PhoneConnection, 694 KPimGlobalPrefs::instance()->mEx2PhoneConnection,
695 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 695 KPimGlobalPrefs::instance()->mEx2PhoneModel );
696 696
697 QStringList uids = mViewManager->selectedUids(); 697 QStringList uids = mViewManager->selectedUids();
698 if ( uids.isEmpty() ) 698 if ( uids.isEmpty() )
699 return; 699 return;
700 700
701 QString fileName = getPhoneFile(); 701 QString fileName = getPhoneFile();
702 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) ) 702 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) )
703 return; 703 return;
704 704
705 message(i18n("Exporting to phone...")); 705 message(i18n("Exporting to phone..."));
706 QTimer::singleShot( 1, this , SLOT ( writeToPhone())); 706 QTimer::singleShot( 1, this , SLOT ( writeToPhone()));
707 707
708} 708}
709QString KABCore::getPhoneFile() 709QString KABCore::getPhoneFile()
710{ 710{
711#ifdef _WIN32_ 711#ifdef DESKTOP_VERSION
712 return locateLocal("tmp", "phonefile.vcf"); 712 return locateLocal("tmp", "phonefile.vcf");
713#else 713#else
714 return "/tmp/phonefile.vcf"; 714 return "/tmp/phonefile.vcf";
715#endif 715#endif
716 716
717} 717}
718void KABCore::writeToPhone( ) 718void KABCore::writeToPhone( )
719{ 719{
720 if ( PhoneAccess::writeToPhone( getPhoneFile() ) ) 720 if ( PhoneAccess::writeToPhone( getPhoneFile() ) )
721 message(i18n("Export to phone finished!")); 721 message(i18n("Export to phone finished!"));
722 else 722 else
723 qDebug(i18n("Error exporting to phone")); 723 qDebug(i18n("Error exporting to phone"));
724} 724}
725void KABCore::beamVCard() 725void KABCore::beamVCard()
726{ 726{
727 QStringList uids = mViewManager->selectedUids(); 727 QStringList uids = mViewManager->selectedUids();
728 if ( !uids.isEmpty() ) 728 if ( !uids.isEmpty() )
729 beamVCard( uids ); 729 beamVCard( uids );
730} 730}
731 731
732 732
733void KABCore::beamVCard(const QStringList& uids) 733void KABCore::beamVCard(const QStringList& uids)
734{ 734{
735/*US
736 QString beamFilename;
737 Opie::OPimContact c;
738 if ( actionPersonal->isOn() ) {
739 beamFilename = addressbookPersonalVCardName();
740 if ( !QFile::exists( beamFilename ) )
741 return; // can't beam a non-existent file
742 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null,
743 beamFilename );
744 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true );
745 Opie::OPimContactAccess::List allList = access->allRecords();
746 Opie::OPimContactAccess::List::Iterator it = allList.begin(); // Just take first
747 c = *it;
748
749 delete access;
750 } else {
751 unlink( beamfile ); // delete if exists
752 mkdir("/tmp/obex/", 0755);
753 c = m_abView -> currentEntry();
754 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null,
755 beamfile );
756 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true );
757 access->add( c );
758 access->save();
759 delete access;
760
761 beamFilename = beamfile;
762 }
763
764 owarn << "Beaming: " << beamFilename << oendl;
765*/
766
767#if 0
768 QString tmpdir = locateLocal("tmp", KGlobal::getAppName());
769
770 QString dirName = tmpdir + "/" + KApplication::randomString( 8 );
771
772 QString name = "contact.vcf";
773 735
774 QString fileName = dirName + "/" + name; 736 // LR: we should use the /tmp dir on the Zaurus,
775#endif 737 // because: /tmp = RAM, (HOME)/kdepim = flash memory
776 // LR: we should use the /tmp dir, because: /tmp = RAM, (HOME)/kdepim = flash memory 738
777 // 739#ifdef DESKTOP_VERSION
740 QString fileName = locateLocal("tmp", "kapibeamfile.vcf");
741#else
778 QString fileName = "/tmp/kapibeamfile.vcf"; 742 QString fileName = "/tmp/kapibeamfile.vcf";
743#endif
779 744
780
781 //QDir().mkdir( dirName, true );
782
783
784 KABC::VCardConverter converter; 745 KABC::VCardConverter converter;
785 QString description; 746 QString description;
786 QString datastream; 747 QString datastream;
787 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { 748 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
788 KABC::Addressee a = mAddressBook->findByUid( *it ); 749 KABC::Addressee a = mAddressBook->findByUid( *it );
789 750
790 if ( a.isEmpty() ) 751 if ( a.isEmpty() )
791 continue; 752 continue;
792 753
793 if (description.isEmpty()) 754 if (description.isEmpty())
794 description = a.formattedName(); 755 description = a.formattedName();
795 756
796 QString vcard; 757 QString vcard;
797 converter.addresseeToVCard( a, vcard ); 758 converter.addresseeToVCard( a, vcard );
798 int start = 0; 759 int start = 0;
799 int next; 760 int next;
800 while ( (next = vcard.find("TYPE=", start) )>= 0 ) { 761 while ( (next = vcard.find("TYPE=", start) )>= 0 ) {
801 int semi = vcard.find(";", next); 762 int semi = vcard.find(";", next);
802 int dopp = vcard.find(":", next); 763 int dopp = vcard.find(":", next);
803 int sep; 764 int sep;
804 if ( semi < dopp && semi >= 0 ) 765 if ( semi < dopp && semi >= 0 )
805 sep = semi ; 766 sep = semi ;
806 else 767 else
807 sep = dopp; 768 sep = dopp;
@@ -2841,36 +2802,36 @@ bool KABCore::syncPhone()
2841 } 2802 }
2842 } 2803 }
2843 setModified(); 2804 setModified();
2844 } 2805 }
2845 if ( syncOK ) 2806 if ( syncOK )
2846 mViewManager->refreshView(); 2807 mViewManager->refreshView();
2847 return syncOK; 2808 return syncOK;
2848} 2809}
2849void KABCore::getFile( bool success ) 2810void KABCore::getFile( bool success )
2850{ 2811{
2851 if ( ! success ) { 2812 if ( ! success ) {
2852 message( i18n("Error receiving file. Nothing changed!") ); 2813 message( i18n("Error receiving file. Nothing changed!") );
2853 return; 2814 return;
2854 } 2815 }
2855 mAddressBook->importFromFile( sentSyncFile() , false, true ); 2816 mAddressBook->importFromFile( sentSyncFile() , false, true );
2856 message( i18n("Pi-Sync successful!") ); 2817 message( i18n("Pi-Sync successful!") );
2857 mViewManager->refreshView(); 2818 mViewManager->refreshView();
2858} 2819}
2859void KABCore::syncFileRequest() 2820void KABCore::syncFileRequest()
2860{ 2821{
2861 mAddressBook->export2File( sentSyncFile() ); 2822 mAddressBook->export2File( sentSyncFile() );
2862} 2823}
2863QString KABCore::sentSyncFile() 2824QString KABCore::sentSyncFile()
2864{ 2825{
2865#ifdef _WIN32_ 2826#ifdef DESKTOP_VERSION
2866 return locateLocal( "tmp", "copysyncab.vcf" ); 2827 return locateLocal( "tmp", "copysyncab.vcf" );
2867#else 2828#else
2868 return QString( "/tmp/copysyncab.vcf" ); 2829 return QString( "/tmp/copysyncab.vcf" );
2869#endif 2830#endif
2870} 2831}
2871 2832
2872void KABCore::setCaptionBack() 2833void KABCore::setCaptionBack()
2873{ 2834{
2874 mMessageTimer->stop(); 2835 mMessageTimer->stop();
2875 topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); 2836 topLevelWidget()->setCaption( i18n("KAddressbook/Pi") );
2876} 2837}
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 6e560d7..32a3b7c 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -232,49 +232,53 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
232 { 232 {
233 case 0: 233 case 0:
234 { 234 {
235 //MimeTypes types; 235 //MimeTypes types;
236 //types.insert( "all", "*" ); 236 //types.insert( "all", "*" );
237 QString str = KFileDialog::getSaveFileName( "/", item->text( 2 ), this ); 237 QString str = KFileDialog::getSaveFileName( "/", item->text( 2 ), this );
238 238
239 if( !str.isEmpty() ) 239 if( !str.isEmpty() )
240 { 240 {
241 encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] ); 241 encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] );
242 if (content) 242 if (content)
243 { 243 {
244 QFile output(str); 244 QFile output(str);
245 output.open(IO_WriteOnly); 245 output.open(IO_WriteOnly);
246 output.writeBlock(content->Content(),content->Length()); 246 output.writeBlock(content->Content(),content->Length());
247 output.close(); 247 output.close();
248 delete content; 248 delete content;
249 } 249 }
250 } 250 }
251 } 251 }
252 break ; 252 break ;
253 253
254 case 2: 254 case 2:
255 { 255 {
256#ifdef DESKTOP_VERSION
257 QString tmpfile = locateLocal( "tmp", "opiemail-image");
258#else
256 QString tmpfile = "/tmp/opiemail-image"; 259 QString tmpfile = "/tmp/opiemail-image";
260#endif
257 encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] ); 261 encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] );
258 if (content) { 262 if (content) {
259 QFile output(tmpfile); 263 QFile output(tmpfile);
260 output.open(IO_WriteOnly); 264 output.open(IO_WriteOnly);
261 output.writeBlock(content->Content(),content->Length()); 265 output.writeBlock(content->Content(),content->Length());
262 output.close(); 266 output.close();
263 delete content; 267 delete content;
264 MailImageDlg iview(""); 268 MailImageDlg iview("");
265 iview.setName(tmpfile); 269 iview.setName(tmpfile);
266 KApplication::execDialog(&iview); 270 KApplication::execDialog(&iview);
267 output.remove(); 271 output.remove();
268 } 272 }
269 } 273 }
270 break; 274 break;
271 case 1: 275 case 1:
272 if ( ( ( AttachItem* )item )->Partnumber() == -1 ) 276 if ( ( ( AttachItem* )item )->Partnumber() == -1 )
273 { 277 {
274 setText(); 278 setText();
275 } 279 }
276 else 280 else
277 { 281 {
278 if ( m_recMail->Wrapper() != 0l ) 282 if ( m_recMail->Wrapper() != 0l )
279 { // make sure that there is a wrapper , even after delete or simular actions 283 { // make sure that there is a wrapper , even after delete or simular actions
280 browser->setText( m_recMail->Wrapper()->fetchTextPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] ) ); 284 browser->setText( m_recMail->Wrapper()->fetchTextPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] ) );
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);
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp
index 101db57..900fc04 100644
--- a/libkcal/phoneformat.cpp
+++ b/libkcal/phoneformat.cpp
@@ -269,49 +269,49 @@ ulong PhoneFormat::getCsum( const QStringList & attList)
269 int mul = k +1; 269 int mul = k +1;
270 add = s[k].unicode (); 270 add = s[k].unicode ();
271 if ( k < 16 ) 271 if ( k < 16 )
272 mul = mul * mul; 272 mul = mul * mul;
273 int ii = i+1; 273 int ii = i+1;
274 add = add * mul *ii*ii*ii; 274 add = add * mul *ii*ii*ii;
275 cSum += add; 275 cSum += add;
276 } 276 }
277 } 277 }
278 278
279 } 279 }
280 //QString dump = attList.join(","); 280 //QString dump = attList.join(",");
281 //qDebug("csum: %d %s", cSum,dump.latin1()); 281 //qDebug("csum: %d %s", cSum,dump.latin1());
282 282
283 return cSum; 283 return cSum;
284 284
285} 285}
286//extern "C" GSM_Error GSM_InitConnection(GSM_StateMachine *s, int ReplyNum); 286//extern "C" GSM_Error GSM_InitConnection(GSM_StateMachine *s, int ReplyNum);
287#include <stdlib.h> 287#include <stdlib.h>
288#define DEBUGMODE false 288#define DEBUGMODE false
289bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) 289bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal)
290{ 290{
291 291
292 QString fileName; 292 QString fileName;
293#ifdef _WIN32_ 293#ifdef DESKTOP_VERSION
294 fileName = locateLocal("tmp", "phonefile.vcs"); 294 fileName = locateLocal("tmp", "phonefile.vcs");
295#else 295#else
296 fileName = "/tmp/phonefile.vcs"; 296 fileName = "/tmp/phonefile.vcs";
297#endif 297#endif
298 QString command; 298 QString command;
299 if ( ! PhoneAccess::readFromPhone( fileName )) { 299 if ( ! PhoneAccess::readFromPhone( fileName )) {
300 return false; 300 return false;
301 } 301 }
302 VCalFormat vfload; 302 VCalFormat vfload;
303 vfload.setLocalTime ( true ); 303 vfload.setLocalTime ( true );
304 qDebug("loading file ..."); 304 qDebug("loading file ...");
305 305
306 if ( ! vfload.load( calendar, fileName ) ) 306 if ( ! vfload.load( calendar, fileName ) )
307 return false; 307 return false;
308 QPtrList<Event> er = calendar->rawEvents(); 308 QPtrList<Event> er = calendar->rawEvents();
309 Event* ev = er.first(); 309 Event* ev = er.first();
310 qDebug("reading events... "); 310 qDebug("reading events... ");
311 while ( ev ) { 311 while ( ev ) {
312 QStringList cat = ev->categories(); 312 QStringList cat = ev->categories();
313 if ( cat.contains( "MeetingDEF" )) { 313 if ( cat.contains( "MeetingDEF" )) {
314 ev->setCategories( QStringList() ); 314 ev->setCategories( QStringList() );
315 } else 315 } else
316 if ( cat.contains( "Birthday" )) { 316 if ( cat.contains( "Birthday" )) {
317 ev->setFloats( true ); 317 ev->setFloats( true );
@@ -456,49 +456,49 @@ void PhoneFormat::copyTodo( Todo* to, Todo* from )
456 // set percentcomplete only, if to->isCompleted() 456 // set percentcomplete only, if to->isCompleted()
457 if ( to->isCompleted() ) 457 if ( to->isCompleted() )
458 to->setPercentComplete(from->percentComplete()); 458 to->setPercentComplete(from->percentComplete());
459 } 459 }
460 if( to->priority() == 2 && from->priority() == 1 ) 460 if( to->priority() == 2 && from->priority() == 1 )
461 ; //skip 461 ; //skip
462 else if (to->priority() == 4 && from->priority() == 5 ) 462 else if (to->priority() == 4 && from->priority() == 5 )
463 ; 463 ;
464 else 464 else
465 to->setPriority(from->priority()); 465 to->setPriority(from->priority());
466 466
467} 467}
468#include <qcstring.h> 468#include <qcstring.h>
469 469
470void PhoneFormat::afterSave( Incidence* inc,const QString& id ,const QString& csum) 470void PhoneFormat::afterSave( Incidence* inc,const QString& id ,const QString& csum)
471{ 471{
472 inc->setID( mProfileName, id ); 472 inc->setID( mProfileName, id );
473 inc->setCsum( mProfileName, csum); 473 inc->setCsum( mProfileName, csum);
474 inc->setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); 474 inc->setTempSyncStat( SYNC_TEMPSTATE_NEW_ID );
475 475
476} 476}
477 477
478bool PhoneFormat::writeToPhone( Calendar * calendar) 478bool PhoneFormat::writeToPhone( Calendar * calendar)
479{ 479{
480#ifdef _WIN32_ 480#ifdef DESKTOP_VERSION
481 QString fileName = locateLocal("tmp", "phonefile.vcs"); 481 QString fileName = locateLocal("tmp", "phonefile.vcs");
482#else 482#else
483 QString fileName = "/tmp/phonefile.vcs"; 483 QString fileName = "/tmp/phonefile.vcs";
484#endif 484#endif
485 485
486 VCalFormat vfsave; 486 VCalFormat vfsave;
487 vfsave.setLocalTime ( true ); 487 vfsave.setLocalTime ( true );
488 QString id = calendar->timeZoneId(); 488 QString id = calendar->timeZoneId();
489 calendar->setLocalTime(); 489 calendar->setLocalTime();
490 if ( ! vfsave.save( calendar, fileName ) ) 490 if ( ! vfsave.save( calendar, fileName ) )
491 return false; 491 return false;
492 calendar->setTimeZoneId( id ); 492 calendar->setTimeZoneId( id );
493 return PhoneAccess::writeToPhone( fileName ); 493 return PhoneAccess::writeToPhone( fileName );
494} 494}
495bool PhoneFormat::save( Calendar *calendar) 495bool PhoneFormat::save( Calendar *calendar)
496{ 496{
497 497
498 498
499 // 1 remove events which should be deleted 499 // 1 remove events which should be deleted
500 QPtrList<Event> er = calendar->rawEvents(); 500 QPtrList<Event> er = calendar->rawEvents();
501 Event* ev = er.first(); 501 Event* ev = er.first();
502 while ( ev ) { 502 while ( ev ) {
503 if ( ev->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { 503 if ( ev->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) {
504 calendar->deleteEvent( ev ); 504 calendar->deleteEvent( ev );
diff --git a/version b/version
index de8a794..0c43deb 100644
--- a/version
+++ b/version
@@ -1 +1 @@
version = "1.9.8"; version = "1.9.9";