-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | kaddressbook/kaimportoldialog.cpp | 7 | ||||
-rw-r--r-- | korganizer/koimportoldialog.cpp | 8 |
3 files changed, 10 insertions, 7 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 792cb91..5e2180f 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -734,193 +734,193 @@ | |||
734 | { "Tentative","Vorläufig" }, | 734 | { "Tentative","Vorläufig" }, |
735 | { "Delegated","Beauftragt" }, | 735 | { "Delegated","Beauftragt" }, |
736 | { "Completed","Vollständig" }, | 736 | { "Completed","Vollständig" }, |
737 | { "In Process","In Bearbeitung" }, | 737 | { "In Process","In Bearbeitung" }, |
738 | { "Participant","Teilnehmer" }, | 738 | { "Participant","Teilnehmer" }, |
739 | { "Optional Participant","Möglicher Teilnehmer" }, | 739 | { "Optional Participant","Möglicher Teilnehmer" }, |
740 | { "Observer","Beobachter" }, | 740 | { "Observer","Beobachter" }, |
741 | { "Chair","Vorsitzender" }, | 741 | { "Chair","Vorsitzender" }, |
742 | { "Not supported \non desktop!\n","" }, | 742 | { "Not supported \non desktop!\n","" }, |
743 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, | 743 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, |
744 | { "Date range: ","Datums Zeitspanne: " }, | 744 | { "Date range: ","Datums Zeitspanne: " }, |
745 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, | 745 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, |
746 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, | 746 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, |
747 | { "Add / remove events","Add./entferne Termine" }, | 747 | { "Add / remove events","Add./entferne Termine" }, |
748 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, | 748 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, |
749 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, | 749 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, |
750 | { "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, | 750 | { "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, |
751 | { "Overwrite","Überschreiben" }, | 751 | { "Overwrite","Überschreiben" }, |
752 | { "Sync+save","Syncen+speichern" }, | 752 | { "Sync+save","Syncen+speichern" }, |
753 | { "Default","Standard" }, | 753 | { "Default","Standard" }, |
754 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, | 754 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, |
755 | { " %d items?"," %d Einträge?" }, | 755 | { " %d items?"," %d Einträge?" }, |
756 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, | 756 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, |
757 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, | 757 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, |
758 | { "Current","Aktuelle" }, | 758 | { "Current","Aktuelle" }, |
759 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, | 759 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, |
760 | { "All","Alle" }, | 760 | { "All","Alle" }, |
761 | { "Data Loss Warning","Datenverlust Warnung" }, | 761 | { "Data Loss Warning","Datenverlust Warnung" }, |
762 | { "Proceed","Weitermachen" }, | 762 | { "Proceed","Weitermachen" }, |
763 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, | 763 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, |
764 | { "Filter disabled ","Filter abgeschaltet" }, | 764 | { "Filter disabled ","Filter abgeschaltet" }, |
765 | { "Filter selected: ","Gewählter Filter: " }, | 765 | { "Filter selected: ","Gewählter Filter: " }, |
766 | { "Toggle Cancel","Gecancelt ändern" }, | 766 | { "Toggle Cancel","Gecancelt ändern" }, |
767 | { "&Toggle Cancel","Gecancel&t ändern" }, | 767 | { "&Toggle Cancel","Gecancel&t ändern" }, |
768 | { "Configure Toolbar","Konfiguriere Toolbar" }, | 768 | { "Configure Toolbar","Konfiguriere Toolbar" }, |
769 | { "Stretched TB","Gedehnte TB" }, | 769 | { "Stretched TB","Gedehnte TB" }, |
770 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, | 770 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, |
771 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, | 771 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, |
772 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, | 772 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, |
773 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, | 773 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, |
774 | { "Imported file successfully","Datei erfolgreich importiert" }, | 774 | { "Imported file successfully","Datei erfolgreich importiert" }, |
775 | { "Error importing file","Fehler beim Importieren der Datei" }, | 775 | { "Error importing file","Fehler beim Importieren der Datei" }, |
776 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, | 776 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, |
777 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, | 777 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, |
778 | { "Overwrite!","Überschreiben!" }, | 778 | { "Overwrite!","Überschreiben!" }, |
779 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, | 779 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, |
780 | { "Load backup filename","Lade Backup Dateiname" }, | 780 | { "Load backup filename","Lade Backup Dateiname" }, |
781 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, | 781 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, |
782 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, | 782 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, |
783 | { "Save backup filename","Speichere Backup Dateiname" }, | 783 | { "Save backup filename","Speichere Backup Dateiname" }, |
784 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, | 784 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, |
785 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, | 785 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, |
786 | { "Details of attendee","Teilnehmerdetails" }, | 786 | { "Details of attendee","Teilnehmerdetails" }, |
787 | { "Work phone:\n","Telefon Arbeit:\n" }, | 787 | { "Work phone:\n","Telefon Arbeit:\n" }, |
788 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, | 788 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, |
789 | { "Home phone:\n","Telefon privat:\n" }, | 789 | { "Home phone:\n","Telefon privat:\n" }, |
790 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, | 790 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, |
791 | { "Email:\n","Email:\n" }, | 791 | { "Email:\n","Email:\n" }, |
792 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, | 792 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, |
793 | { "Audio Al.: ","Audio Al.: " }, | 793 | { "Audio Al.: ","Audio Al.: " }, |
794 | { "Proc.Al.: ","Proz.Al.: " }, | 794 | { "Proc.Al.: ","Proz.Al.: " }, |
795 | { "No sound set","Kein Sound definiert" }, | 795 | { "No sound set","Kein Sound definiert" }, |
796 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, | 796 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, |
797 | { "No program set","Kein Programm definiert" }, | 797 | { "No program set","Kein Programm definiert" }, |
798 | { "Running '%1'","Ausführen '%1'" }, | 798 | { "Running '%1'","Ausführen '%1'" }, |
799 | { "Playing '%1'","Abspielen '%1'" }, | 799 | { "Playing '%1'","Abspielen '%1'" }, |
800 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, | 800 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, |
801 | { "Load!","Laden!" }, | 801 | { "Load!","Laden!" }, |
802 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, | 802 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, |
803 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, | 803 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, |
804 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, | 804 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, |
805 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, | 805 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, |
806 | { "Features + hints...","Eigenschaften + Tipps..." }, | 806 | { "Features + hints...","Eigenschaften + Tipps..." }, |
807 | { "User translation...","Benutzer Übersetzung..." }, | 807 | { "User translation...","Benutzer Übersetzung..." }, |
808 | { "Sync HowTo...","Synchronisation HowTo..." }, | 808 | { "Sync HowTo...","Synchronisation HowTo..." }, |
809 | { "Print calendar...","Drucke Kalender..." }, | 809 | { "Print calendar...","Drucke Kalender..." }, |
810 | { "Anniversary","Jahrestag" }, | 810 | { "Anniversary","Jahrestag" }, |
811 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, | 811 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, |
812 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, | 812 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, |
813 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, | 813 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, |
814 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, | 814 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, |
815 | { "<b>Access: </b>","<b>Zugriff: </b>" }, | 815 | { "<b>Access: </b>","<b>Zugriff: </b>" }, |
816 | { "(%1 min before)","(%1 min vorher)" }, | 816 | { "(%1 min before)","(%1 min vorher)" }, |
817 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, | 817 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, |
818 | { "Save Journal/Description...","Speichere Journal/Details..." }, | 818 | { "Save Journal/Description...","Speichere Journal/Details..." }, |
819 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, | 819 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, |
820 | { "Continue","Weitermachen" }, | 820 | { "Continue","Weitermachen" }, |
821 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, | 821 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, |
822 | { "Attendee:","Teilnehmer:" }, | 822 | { "Attendee:","Teilnehmer:" }, |
823 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, | 823 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, |
824 | { "On day ","Am Tag " }, | 824 | { "On day ","Am Tag " }, |
825 | { "%1 of ","%1 des Monats" }, | 825 | { "%1 of ","%1 des Monats" }, |
826 | { "%1 of the year","%1 des Jahres" }, | 826 | { "%1 of the year","%1 des Jahres" }, |
827 | { "Anonymous","Anonymo" }, | 827 | { "Anonymous","Anonymo" }, |
828 | { "nobody@nowhere","niemand@nirgendwo" }, | 828 | { "nobody@nowhere","niemand@nirgendwo" }, |
829 | { "calendar.html","calendar.html" }, | 829 | { "calendar.html","calendar.html" }, |
830 | { " Local Time"," Locale Zeit" }, | 830 | { " Local Time"," Lokale Zeit" }, |
831 | { "Unknown Name","Unbekannter Name" }, | 831 | { "Unknown Name","Unbekannter Name" }, |
832 | { "unknown@nowhere","unbekannt@nirgendwo" }, | 832 | { "unknown@nowhere","unbekannt@nirgendwo" }, |
833 | { "Beam via IR!","Beam via IR!" }, | 833 | { "Beam via IR!","Beam via IR!" }, |
834 | { "Next Month","Nächster Monat" }, | 834 | { "Next Month","Nächster Monat" }, |
835 | { "Prio","Prio" }, | 835 | { "Prio","Prio" }, |
836 | { "Reparent Todo","Mache Sub-Todo" }, | 836 | { "Reparent Todo","Mache Sub-Todo" }, |
837 | { "tomorrow","morgen" }, | 837 | { "tomorrow","morgen" }, |
838 | { "today","heute" }, | 838 | { "today","heute" }, |
839 | { "yesterday","gestern" }, | 839 | { "yesterday","gestern" }, |
840 | { "Ok","Ok" }, | 840 | { "Ok","Ok" }, |
841 | { "Ok+Agenda","Ok+Agenda" }, | 841 | { "Ok+Agenda","Ok+Agenda" }, |
842 | { "Email","Email" }, | 842 | { "Email","Email" }, |
843 | { "RSVP","RSVP" }, | 843 | { "RSVP","RSVP" }, |
844 | { "Email:","Email:" }, | 844 | { "Email:","Email:" }, |
845 | { "Appointment Time ","Termin Zeit " }, | 845 | { "Appointment Time ","Termin Zeit " }, |
846 | { "2","2" }, | 846 | { "2","2" }, |
847 | { "3","3" }, | 847 | { "3","3" }, |
848 | { "4","4" }, | 848 | { "4","4" }, |
849 | { " 0 %"," 0 %" }, | 849 | { " 0 %"," 0 %" }, |
850 | { " 20 %"," 20 %" }, | 850 | { " 20 %"," 20 %" }, |
851 | { " 40 %"," 40 %" }, | 851 | { " 40 %"," 40 %" }, |
852 | { " 60 %"," 60 %" }, | 852 | { " 60 %"," 60 %" }, |
853 | { " 80 %"," 80 %" }, | 853 | { " 80 %"," 80 %" }, |
854 | { "100 %","100 %" }, | 854 | { "100 %","100 %" }, |
855 | { "Filter","Filter" }, | 855 | { "Filter","Filter" }, |
856 | { "Configure","Konfiguriere" }, | 856 | { "Configure","Konfiguriere" }, |
857 | { "What's Next","What's Next" }, | 857 | { "What's Next","What's Next" }, |
858 | { "Complete calendar...","Kompletten Kalender..." }, | 858 | { "Complete calendar...","Kompletten Kalender..." }, |
859 | { "Filtered calendar...","Gefilterten Kalender..." }, | 859 | { "Filtered calendar...","Gefilterten Kalender..." }, |
860 | { "Export to phone","Exportiere zum Handy" }, | 860 | { "Export to phone","Exportiere zum Handy" }, |
861 | { "Beam receive enabled","Beam Empfang an" }, | 861 | { "Beam receive enabled","Beam Empfang an" }, |
862 | { "What's new?","Was ist neu?" }, | 862 | { "What's new?","Was ist neu?" }, |
863 | { "FAQ...","FAQ..." }, | 863 | { "FAQ...","FAQ..." }, |
864 | { "Licence...","Licence..." }, | 864 | { "Licence...","Licence..." }, |
865 | { "What's This?","What's This?" }, | 865 | { "What's This?","What's This?" }, |
866 | { "&Edit...","&Editiere..." }, | 866 | { "&Edit...","&Editiere..." }, |
867 | { "Oktober","Oktober" }, | 867 | { "Oktober","Oktober" }, |
868 | { "Title","Titel" }, | 868 | { "Title","Titel" }, |
869 | { "%1 %","%1 %" }, | 869 | { "%1 %","%1 %" }, |
870 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, | 870 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, |
871 | { "Import!","Importiere!" }, | 871 | { "Import!","Importiere!" }, |
872 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, | 872 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, |
873 | { "Export to phone options","Export ans Handy Optionen" }, | 873 | { "Export to phone options","Export ans Handy Optionen" }, |
874 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, | 874 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, |
875 | { "I/O device: ","I/O device: " }, | 875 | { "I/O device: ","I/O device: " }, |
876 | { "Connection: ","Connection: " }, | 876 | { "Connection: ","Connection: " }, |
877 | { "Model(opt.): ","Model(opt.): " }, | 877 | { "Model(opt.): ","Model(opt.): " }, |
878 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, | 878 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, |
879 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, | 879 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, |
880 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, | 880 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, |
881 | { "Export to mobile phone!","Exportiere auf das Handy!" }, | 881 | { "Export to mobile phone!","Exportiere auf das Handy!" }, |
882 | { "Export complete calendar","Exportiere kompletten Kalender" }, | 882 | { "Export complete calendar","Exportiere kompletten Kalender" }, |
883 | { "Writing to phone...","Sende Daten ans Handy..." }, | 883 | { "Writing to phone...","Sende Daten ans Handy..." }, |
884 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, | 884 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, |
885 | { "Retry","Nochmal versuchen" }, | 885 | { "Retry","Nochmal versuchen" }, |
886 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, | 886 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, |
887 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, | 887 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, |
888 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, | 888 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, |
889 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, | 889 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, |
890 | { "Preferences","Vorlieben" }, | 890 | { "Preferences","Vorlieben" }, |
891 | { "Global","Global" }, | 891 | { "Global","Global" }, |
892 | { "Phone","Phone" }, | 892 | { "Phone","Phone" }, |
893 | { "SMS","SMS" }, | 893 | { "SMS","SMS" }, |
894 | { "Fax","Fax" }, | 894 | { "Fax","Fax" }, |
895 | { "Pager","Pager" }, | 895 | { "Pager","Pager" }, |
896 | { "SIP","SIP" }, | 896 | { "SIP","SIP" }, |
897 | { "Italian","Italienisch" }, | 897 | { "Italian","Italienisch" }, |
898 | { "24:00","24:00" }, | 898 | { "24:00","24:00" }, |
899 | { "12:00am","12:00am" }, | 899 | { "12:00am","12:00am" }, |
900 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, | 900 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, |
901 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, | 901 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, |
902 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, | 902 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, |
903 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, | 903 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, |
904 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, | 904 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, |
905 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, | 905 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, |
906 | { "Used Mail Client","Benutzter Mail Client" }, | 906 | { "Used Mail Client","Benutzter Mail Client" }, |
907 | { "Channel:","Channel:" }, | 907 | { "Channel:","Channel:" }, |
908 | { "Message:","Message:" }, | 908 | { "Message:","Message:" }, |
909 | { "Parameters:","Parameter:" }, | 909 | { "Parameters:","Parameter:" }, |
910 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, | 910 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, |
911 | { "extra Message:","extra Message:" }, | 911 | { "extra Message:","extra Message:" }, |
912 | { "extra Parameters:","extra Parameter:" }, | 912 | { "extra Parameters:","extra Parameter:" }, |
913 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, | 913 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, |
914 | { "External Apps.","Externe Appl." }, | 914 | { "External Apps.","Externe Appl." }, |
915 | { "24 hours","24 Std." }, | 915 | { "24 hours","24 Std." }, |
916 | { "3 hours","3 Std." }, | 916 | { "3 hours","3 Std." }, |
917 | { "1 hour","1 Std." }, | 917 | { "1 hour","1 Std." }, |
918 | { "15 minutes","15 Min." }, | 918 | { "15 minutes","15 Min." }, |
919 | { "5 minutes","5 Min." }, | 919 | { "5 minutes","5 Min." }, |
920 | { "1 minute","1 Min." }, | 920 | { "1 minute","1 Min." }, |
921 | { "23","23" }, | 921 | { "23","23" }, |
922 | { "Mon 15","Mon 15" }, | 922 | { "Mon 15","Mon 15" }, |
923 | { "Configure KO","Konfiguriere KO" }, | 923 | { "Configure KO","Konfiguriere KO" }, |
924 | { "Event text","Termin Text" }, | 924 | { "Event text","Termin Text" }, |
925 | { "ToDo","Todo" }, | 925 | { "ToDo","Todo" }, |
926 | { "Today","Heute" }, | 926 | { "Today","Heute" }, |
diff --git a/kaddressbook/kaimportoldialog.cpp b/kaddressbook/kaimportoldialog.cpp index 7bb8bd8..2f794d6 100644 --- a/kaddressbook/kaimportoldialog.cpp +++ b/kaddressbook/kaimportoldialog.cpp | |||
@@ -1,323 +1,324 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KAddressbook/Pi. | 2 | This file is part of KAddressbook/Pi. |
3 | Copyright (c) 2004 Lutz Rogowski <rogowski@kde.org> | 3 | Copyright (c) 2004 Lutz Rogowski <rogowski@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qtooltip.h> | 24 | #include <qtooltip.h> |
25 | #include <qframe.h> | 25 | #include <qframe.h> |
26 | #include <qpixmap.h> | 26 | #include <qpixmap.h> |
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | #include <qprogressbar.h> | 28 | #include <qprogressbar.h> |
29 | #include <qprogressdialog.h> | ||
29 | #include <qwidgetstack.h> | 30 | #include <qwidgetstack.h> |
30 | #include <qdatetime.h> | 31 | #include <qdatetime.h> |
31 | #include <qdir.h> | 32 | #include <qdir.h> |
32 | #include <qregexp.h> | 33 | #include <qregexp.h> |
33 | #include <qapplication.h> | 34 | #include <qapplication.h> |
34 | #include <qhbox.h> | 35 | #include <qhbox.h> |
35 | #include <qheader.h> | 36 | #include <qheader.h> |
36 | #include <qdatetime.h> | 37 | #include <qdatetime.h> |
37 | #include <qlistview.h> | 38 | #include <qlistview.h> |
38 | 39 | ||
39 | #include <kdebug.h> | 40 | #include <kdebug.h> |
40 | #include <klocale.h> | 41 | #include <klocale.h> |
41 | #include <kstandarddirs.h> | 42 | #include <kstandarddirs.h> |
42 | #include <kmessagebox.h> | 43 | #include <kmessagebox.h> |
43 | #include <kfiledialog.h> | 44 | #include <kfiledialog.h> |
44 | 45 | ||
45 | #include <libkdepim/categoryselectdialog.h> | 46 | #include <libkdepim/categoryselectdialog.h> |
46 | #include <libkdepim/kinputdialog.h> | 47 | #include <libkdepim/kinputdialog.h> |
47 | 48 | ||
48 | #include <libkcal/calendarlocal.h> | 49 | #include <libkcal/calendarlocal.h> |
49 | #include <libkcal/icalformat.h> | 50 | #include <libkcal/icalformat.h> |
50 | 51 | ||
51 | #include <kabc/addresseelist.h> | 52 | #include <kabc/addresseelist.h> |
52 | #include <kabc/phonenumber.h> | 53 | #include <kabc/phonenumber.h> |
53 | 54 | ||
54 | #include "kaimportoldialog.h" | 55 | #include "kaimportoldialog.h" |
55 | 56 | ||
56 | #include "../outport/msoutl9.h" | 57 | #include "../outport/msoutl9.h" |
57 | #include <ole2.h> | 58 | #include <ole2.h> |
58 | #include <comutil.h> | 59 | #include <comutil.h> |
59 | _Application gOlAppAB; | 60 | _Application gOlAppAB; |
60 | 61 | ||
61 | QDateTime mDdate2Qdtr( DATE dt) | 62 | QDateTime mDdate2Qdtr( DATE dt) |
62 | { | 63 | { |
63 | COleDateTime odt; | 64 | COleDateTime odt; |
64 | SYSTEMTIME st; | 65 | SYSTEMTIME st; |
65 | odt = dt; | 66 | odt = dt; |
66 | if ( odt.GetStatus() != 0 ) | 67 | if ( odt.GetStatus() != 0 ) |
67 | return QDateTime(); | 68 | return QDateTime(); |
68 | odt.GetAsSystemTime(st); | 69 | odt.GetAsSystemTime(st); |
69 | if ( st.wYear > 4000 ) // this program as a year 4000 bug! | 70 | if ( st.wYear > 4000 ) // this program as a year 4000 bug! |
70 | return QDateTime(); | 71 | return QDateTime(); |
71 | // it seems so, that 1.1.4501 indicates: DATE invalid | 72 | // it seems so, that 1.1.4501 indicates: DATE invalid |
72 | QDateTime qdt (QDate(st.wYear, st.wMonth,st.wDay ),QTime( st.wHour, st.wMinute,st.wSecond ) ); | 73 | QDateTime qdt (QDate(st.wYear, st.wMonth,st.wDay ),QTime( st.wHour, st.wMinute,st.wSecond ) ); |
73 | return qdt; | 74 | return qdt; |
74 | } | 75 | } |
75 | 76 | ||
76 | class OLEListViewItem : public QCheckListItem | 77 | class OLEListViewItem : public QCheckListItem |
77 | { | 78 | { |
78 | public: | 79 | public: |
79 | OLEListViewItem( QListView *parent, QString text ) : | 80 | OLEListViewItem( QListView *parent, QString text ) : |
80 | QCheckListItem( parent, text, QCheckListItem::CheckBox ) { ; }; | 81 | QCheckListItem( parent, text, QCheckListItem::CheckBox ) { ; }; |
81 | OLEListViewItem( QListViewItem *after, QString text ) : | 82 | OLEListViewItem( QListViewItem *after, QString text ) : |
82 | QCheckListItem( after, text, QCheckListItem::CheckBox ) { ; }; | 83 | QCheckListItem( after, text, QCheckListItem::CheckBox ) { ; }; |
83 | ~OLEListViewItem() {}; | 84 | ~OLEListViewItem() {}; |
84 | void setData( DWORD data ) {mData= data; }; | 85 | void setData( DWORD data ) {mData= data; }; |
85 | DWORD data() { return mData ;}; | 86 | DWORD data() { return mData ;}; |
86 | private: | 87 | private: |
87 | DWORD mData; | 88 | DWORD mData; |
88 | }; | 89 | }; |
89 | 90 | ||
90 | KAImportOLdialog::KAImportOLdialog( const QString &caption, | 91 | KAImportOLdialog::KAImportOLdialog( const QString &caption, |
91 | KABC::AddressBook * aBook, QWidget *parent ) : | 92 | KABC::AddressBook * aBook, QWidget *parent ) : |
92 | KDialogBase( Plain, caption, User1 | Close, Ok, | 93 | KDialogBase( Plain, caption, User1 | Close, Ok, |
93 | parent, caption, true, false, i18n("Import!") ) | 94 | parent, caption, true, false, i18n("Import!") ) |
94 | { | 95 | { |
95 | QHBox * mw = new QHBox( this ); | 96 | QHBox * mw = new QHBox( this ); |
96 | setMainWidget( mw ); | 97 | setMainWidget( mw ); |
97 | mListView = new QListView( mw ); | 98 | mListView = new QListView( mw ); |
98 | mListView->addColumn(i18n("Select Folder to import")); | 99 | mListView->addColumn(i18n("Select Folder to import")); |
99 | mListView->addColumn(i18n("Content Type")); | 100 | mListView->addColumn(i18n("Content Type")); |
100 | mABook = aBook; | 101 | mABook = aBook; |
101 | connect( this, SIGNAL( user1Clicked() ),SLOT ( slotApply())); | 102 | connect( this, SIGNAL( user1Clicked() ),SLOT ( slotApply())); |
102 | setupFolderView(); | 103 | setupFolderView(); |
103 | resize( sizeHint().width()+50, sizeHint().height()+50 ); | 104 | resize( sizeHint().width()+50, sizeHint().height()+50 ); |
104 | } | 105 | } |
105 | 106 | ||
106 | KAImportOLdialog::~KAImportOLdialog() | 107 | KAImportOLdialog::~KAImportOLdialog() |
107 | { | 108 | { |
108 | 109 | ||
109 | } | 110 | } |
110 | 111 | ||
111 | KABC::Addressee::List KAImportOLdialog::getAddressList() | 112 | KABC::Addressee::List KAImportOLdialog::getAddressList() |
112 | { | 113 | { |
113 | return mAList; | 114 | return mAList; |
114 | } | 115 | } |
115 | void KAImportOLdialog::setupFolderView() | 116 | void KAImportOLdialog::setupFolderView() |
116 | { | 117 | { |
117 | SCODE sc = ::OleInitialize(NULL); | 118 | SCODE sc = ::OleInitialize(NULL); |
118 | if ( FAILED ( sc ) ) { | 119 | if ( FAILED ( sc ) ) { |
119 | KMessageBox::information(this,"OLE initialisation failed"); | 120 | KMessageBox::information(this,"OLE initialisation failed"); |
120 | return; | 121 | return; |
121 | } | 122 | } |
122 | 123 | ||
123 | if(!gOlAppAB.CreateDispatch(_T("Outlook.Application"),NULL)){ | 124 | if(!gOlAppAB.CreateDispatch(_T("Outlook.Application"),NULL)){ |
124 | KMessageBox::information(this,"Sorry, cannot access Outlook"); | 125 | KMessageBox::information(this,"Sorry, cannot access Outlook"); |
125 | return ; | 126 | return ; |
126 | } | 127 | } |
127 | MAPIFolder mfInbox; | 128 | MAPIFolder mfInbox; |
128 | MAPIFolder mfRoot; | 129 | MAPIFolder mfRoot; |
129 | CString szName; | 130 | CString szName; |
130 | _NameSpace olNS; | 131 | _NameSpace olNS; |
131 | olNS = gOlAppAB.GetNamespace(_T("MAPI")); | 132 | olNS = gOlAppAB.GetNamespace(_T("MAPI")); |
132 | mfInbox = olNS.GetDefaultFolder(6); | 133 | mfInbox = olNS.GetDefaultFolder(6); |
133 | mfRoot = mfInbox.GetParent(); | 134 | mfRoot = mfInbox.GetParent(); |
134 | szName = mfRoot.GetName(); | 135 | szName = mfRoot.GetName(); |
135 | long iType = mfRoot.GetDefaultItemType(); | 136 | long iType = mfRoot.GetDefaultItemType(); |
136 | QString mes; | 137 | QString mes; |
137 | mes = QString::fromUcs2( szName.GetBuffer() ); | 138 | mes = QString::fromUcs2( szName.GetBuffer() ); |
138 | OLEListViewItem * root = new OLEListViewItem( mListView, mes ); | 139 | OLEListViewItem * root = new OLEListViewItem( mListView, mes ); |
139 | mfRoot.m_lpDispatch->AddRef(); | 140 | mfRoot.m_lpDispatch->AddRef(); |
140 | addFolder( root, mfRoot.m_lpDispatch ); | 141 | addFolder( root, mfRoot.m_lpDispatch ); |
141 | root->setOpen( true ); | 142 | root->setOpen( true ); |
142 | mListView->setSortColumn( 0 ); | 143 | mListView->setSortColumn( 0 ); |
143 | mListView->sort( ); | 144 | mListView->sort( ); |
144 | } | 145 | } |
145 | 146 | ||
146 | 147 | ||
147 | void KAImportOLdialog::addFolder(OLEListViewItem* iParent, LPDISPATCH dispParent) | 148 | void KAImportOLdialog::addFolder(OLEListViewItem* iParent, LPDISPATCH dispParent) |
148 | { | 149 | { |
149 | MAPIFolder mfParent(dispParent), mfChild; | 150 | MAPIFolder mfParent(dispParent), mfChild; |
150 | _Folders folders; | 151 | _Folders folders; |
151 | _variant_t fndx((long)0); | 152 | _variant_t fndx((long)0); |
152 | CString szName; | 153 | CString szName; |
153 | long iType; | 154 | long iType; |
154 | OLEListViewItem* hChild; | 155 | OLEListViewItem* hChild; |
155 | 156 | ||
156 | folders = mfParent.GetFolders(); | 157 | folders = mfParent.GetFolders(); |
157 | for(int i=1; i <= folders.GetCount(); ++i) | 158 | for(int i=1; i <= folders.GetCount(); ++i) |
158 | { | 159 | { |
159 | fndx = (long)i; | 160 | fndx = (long)i; |
160 | mfChild = folders.Item(fndx.Detach()); | 161 | mfChild = folders.Item(fndx.Detach()); |
161 | mfChild.m_lpDispatch->AddRef(); | 162 | mfChild.m_lpDispatch->AddRef(); |
162 | szName = mfChild.GetName(); | 163 | szName = mfChild.GetName(); |
163 | iType = mfChild.GetDefaultItemType(); | 164 | iType = mfChild.GetDefaultItemType(); |
164 | hChild = new OLEListViewItem( iParent , QString::fromUcs2( szName.GetBuffer() ) ); | 165 | hChild = new OLEListViewItem( iParent , QString::fromUcs2( szName.GetBuffer() ) ); |
165 | if ( iType != 2) | 166 | if ( iType != 2) |
166 | hChild->setEnabled( false ); | 167 | hChild->setEnabled( false ); |
167 | QString ts; | 168 | QString ts; |
168 | switch( iType ) { | 169 | switch( iType ) { |
169 | case 0: | 170 | case 0: |
170 | ts = i18n("Mail"); | 171 | ts = i18n("Mail"); |
171 | break; | 172 | break; |
172 | case 1: | 173 | case 1: |
173 | ts = i18n("Calendar"); | 174 | ts = i18n("Calendar"); |
174 | break; | 175 | break; |
175 | case 2: | 176 | case 2: |
176 | ts = i18n("Contacts"); | 177 | ts = i18n("Contacts"); |
177 | break; | 178 | break; |
178 | case 3: | 179 | case 3: |
179 | ts = i18n("Todos"); | 180 | ts = i18n("Todos"); |
180 | break; | 181 | break; |
181 | case 4: | 182 | case 4: |
182 | ts = i18n("Journals"); | 183 | ts = i18n("Journals"); |
183 | break; | 184 | break; |
184 | case 5: | 185 | case 5: |
185 | ts = i18n("Notes"); | 186 | ts = i18n("Notes"); |
186 | break; | 187 | break; |
187 | default: | 188 | default: |
188 | ts = i18n("Unknown"); | 189 | ts = i18n("Unknown"); |
189 | } | 190 | } |
190 | hChild->setText( 1,ts); | 191 | hChild->setText( 1,ts); |
191 | hChild->setData( (DWORD) mfChild.m_lpDispatch ); | 192 | hChild->setData( (DWORD) mfChild.m_lpDispatch ); |
192 | mfChild.m_lpDispatch->AddRef(); | 193 | mfChild.m_lpDispatch->AddRef(); |
193 | addFolder(hChild, mfChild.m_lpDispatch); | 194 | addFolder(hChild, mfChild.m_lpDispatch); |
194 | } | 195 | } |
195 | } | 196 | } |
196 | 197 | ||
197 | void KAImportOLdialog::slotApply() | 198 | void KAImportOLdialog::slotApply() |
198 | { | 199 | { |
199 | importedItems = 0; | 200 | importedItems = 0; |
200 | OLEListViewItem* child = (OLEListViewItem*) mListView->firstChild(); | 201 | OLEListViewItem* child = (OLEListViewItem*) mListView->firstChild(); |
201 | while ( child ) { | 202 | while ( child ) { |
202 | if ( child->isOn() ) | 203 | if ( child->isOn() ) |
203 | readContactData( child->data() ); | 204 | readContactData( child->data() ); |
204 | child = (OLEListViewItem*) child->itemBelow(); | 205 | child = (OLEListViewItem*) child->itemBelow(); |
205 | } | 206 | } |
206 | QString mes = i18n("Importing complete.\n\n%1 items imported.").arg( importedItems); | 207 | QString mes = i18n("Importing complete.\n\n%1 items imported.").arg( importedItems); |
207 | KMessageBox::information(this,mes); | 208 | KMessageBox::information(this,mes); |
208 | } | 209 | } |
209 | void KAImportOLdialog::readContactData( DWORD folder ) | 210 | void KAImportOLdialog::readContactData( DWORD folder ) |
210 | { | 211 | { |
211 | 212 | ||
212 | LPDISPATCH dispItem = (LPDISPATCH)folder; | 213 | LPDISPATCH dispItem = (LPDISPATCH)folder; |
213 | dispItem->AddRef(); | 214 | dispItem->AddRef(); |
214 | MAPIFolder mf(dispItem); | 215 | MAPIFolder mf(dispItem); |
215 | mf.m_lpDispatch->AddRef(); | 216 | mf.m_lpDispatch->AddRef(); |
216 | _Items folderItems; | 217 | _Items folderItems; |
217 | _variant_t indx((long)0); | 218 | _variant_t indx((long)0); |
218 | LPDISPATCH itm; | 219 | LPDISPATCH itm; |
219 | int i; | 220 | int i; |
220 | folderItems = mf.GetItems(); | 221 | folderItems = mf.GetItems(); |
221 | QProgressBar bar( folderItems.GetCount(),0 ); | 222 | QProgressDialog bar( i18n("Importing contact data"),i18n("Abort"), folderItems.GetCount(),this); |
222 | bar.setCaption (i18n("Importing - close to abort!") ); | 223 | bar.setCaption (i18n("Importing!") ); |
223 | int h = bar.sizeHint().height() ; | 224 | int h = bar.sizeHint().height() ; |
224 | int w = 300; | 225 | int w = 300; |
225 | int dw = QApplication::desktop()->width(); | 226 | int dw = QApplication::desktop()->width(); |
226 | int dh = QApplication::desktop()->height(); | 227 | int dh = QApplication::desktop()->height(); |
227 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 228 | //bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
228 | bar.show(); | 229 | bar.show(); |
229 | for(i=1; i <= folderItems.GetCount(); ++i) | 230 | for(i=1; i <= folderItems.GetCount(); ++i) |
230 | { | 231 | { |
231 | qApp->processEvents(); | 232 | qApp->processEvents(); |
232 | if ( ! bar.isVisible() ) | 233 | if ( ! bar.isVisible() ) |
233 | return ; | 234 | return ; |
234 | bar.setProgress( i ); | 235 | bar.setProgress( i ); |
235 | indx = (long)i; | 236 | indx = (long)i; |
236 | itm = folderItems.Item(indx.Detach()); | 237 | itm = folderItems.Item(indx.Detach()); |
237 | _ContactItem * pItem = (_ContactItem *)&itm; | 238 | _ContactItem * pItem = (_ContactItem *)&itm; |
238 | ol2kapiContact( pItem ); | 239 | ol2kapiContact( pItem ); |
239 | itm->Release(); | 240 | itm->Release(); |
240 | } | 241 | } |
241 | } | 242 | } |
242 | void KAImportOLdialog::slotOk() | 243 | void KAImportOLdialog::slotOk() |
243 | { | 244 | { |
244 | QDialog::accept(); | 245 | QDialog::accept(); |
245 | } | 246 | } |
246 | 247 | ||
247 | void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) | 248 | void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem ) |
248 | { | 249 | { |
249 | KABC::Addressee addressee; | 250 | KABC::Addressee addressee; |
250 | 251 | ||
251 | addressee.setUid( QString::fromUcs2(aItem->GetEntryID().GetBuffer())); | 252 | addressee.setUid( QString::fromUcs2(aItem->GetEntryID().GetBuffer())); |
252 | //GetLastModificationTime() | 253 | //GetLastModificationTime() |
253 | //addressee.setName( const QString &name ); | 254 | //addressee.setName( const QString &name ); |
254 | //addressee.setFormattedName( const QString &formattedName ); | 255 | //addressee.setFormattedName( const QString &formattedName ); |
255 | addressee.setFamilyName( QString::fromUcs2(aItem->GetLastName().GetBuffer()) ); | 256 | addressee.setFamilyName( QString::fromUcs2(aItem->GetLastName().GetBuffer()) ); |
256 | addressee.setGivenName( QString::fromUcs2(aItem->GetFirstName().GetBuffer()) ); | 257 | addressee.setGivenName( QString::fromUcs2(aItem->GetFirstName().GetBuffer()) ); |
257 | addressee.setAdditionalName( QString::fromUcs2(aItem->GetMiddleName().GetBuffer()) ); | 258 | addressee.setAdditionalName( QString::fromUcs2(aItem->GetMiddleName().GetBuffer()) ); |
258 | addressee.setPrefix(QString::fromUcs2(aItem->GetTitle().GetBuffer()) ); | 259 | addressee.setPrefix(QString::fromUcs2(aItem->GetTitle().GetBuffer()) ); |
259 | addressee.setSuffix( QString::fromUcs2(aItem->GetSuffix().GetBuffer()) ); | 260 | addressee.setSuffix( QString::fromUcs2(aItem->GetSuffix().GetBuffer()) ); |
260 | addressee.setNickName( QString::fromUcs2(aItem->GetNickName().GetBuffer()) ); | 261 | addressee.setNickName( QString::fromUcs2(aItem->GetNickName().GetBuffer()) ); |
261 | QDateTime dtb = mDdate2Qdtr(aItem->GetBirthday()); | 262 | QDateTime dtb = mDdate2Qdtr(aItem->GetBirthday()); |
262 | if ( dtb.isValid() ) | 263 | if ( dtb.isValid() ) |
263 | addressee.setBirthday( mDdate2Qdtr(aItem->GetBirthday())); | 264 | addressee.setBirthday( mDdate2Qdtr(aItem->GetBirthday())); |
264 | 265 | ||
265 | //QString::fromUcs2(aItem->.GetBuffer()) | 266 | //QString::fromUcs2(aItem->.GetBuffer()) |
266 | //addressee.setMailer( const QString &mailer ); | 267 | //addressee.setMailer( const QString &mailer ); |
267 | //addressee.setTimeZone( const TimeZone &timeZone ); | 268 | //addressee.setTimeZone( const TimeZone &timeZone ); |
268 | //addressee.setGeo( const Geo &geo ); | 269 | //addressee.setGeo( const Geo &geo ); |
269 | //addressee.setTitle( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) );// titel is the prefix | 270 | //addressee.setTitle( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) );// titel is the prefix |
270 | addressee.setRole( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) ); | 271 | addressee.setRole( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) ); |
271 | addressee.setOrganization( QString::fromUcs2(aItem->GetCompanyName().GetBuffer()).replace( QRegExp("\\r"), "") ); | 272 | addressee.setOrganization( QString::fromUcs2(aItem->GetCompanyName().GetBuffer()).replace( QRegExp("\\r"), "") ); |
272 | QString notesStr = QString::fromUcs2(aItem->GetBody().GetBuffer()); | 273 | QString notesStr = QString::fromUcs2(aItem->GetBody().GetBuffer()); |
273 | notesStr.replace( QRegExp("\\r"), ""); | 274 | notesStr.replace( QRegExp("\\r"), ""); |
274 | 275 | ||
275 | addressee.setProductId( QString::fromUcs2(aItem->GetCustomerID().GetBuffer()) ); | 276 | addressee.setProductId( QString::fromUcs2(aItem->GetCustomerID().GetBuffer()) ); |
276 | //addressee.setRevision( const QDateTime &revision ); | 277 | //addressee.setRevision( const QDateTime &revision ); |
277 | // addressee.setSortString( const QString &sortString ); | 278 | // addressee.setSortString( const QString &sortString ); |
278 | addressee.setUrl( QString::fromUcs2(aItem->GetWebPage().GetBuffer()) ); | 279 | addressee.setUrl( QString::fromUcs2(aItem->GetWebPage().GetBuffer()) ); |
279 | 280 | ||
280 | QString tempS; | 281 | QString tempS; |
281 | tempS = QString::fromUcs2(aItem->GetNetMeetingAlias().GetBuffer())+" AT SERVER: " +QString::fromUcs2(aItem->GetNetMeetingServer().GetBuffer()); | 282 | tempS = QString::fromUcs2(aItem->GetNetMeetingAlias().GetBuffer())+" AT SERVER: " +QString::fromUcs2(aItem->GetNetMeetingServer().GetBuffer()); |
282 | if ( tempS.length() > 12 ) | 283 | if ( tempS.length() > 12 ) |
283 | addressee.insertCustom( "KADDRESSBOOK", "X-IMAddress", tempS ); | 284 | addressee.insertCustom( "KADDRESSBOOK", "X-IMAddress", tempS ); |
284 | tempS = QString::fromUcs2(aItem->GetSpouse().GetBuffer()); | 285 | tempS = QString::fromUcs2(aItem->GetSpouse().GetBuffer()); |
285 | if ( !tempS.isEmpty() ) | 286 | if ( !tempS.isEmpty() ) |
286 | addressee.insertCustom( "KADDRESSBOOK", "X-SpousesName", tempS ); | 287 | addressee.insertCustom( "KADDRESSBOOK", "X-SpousesName", tempS ); |
287 | tempS = QString::fromUcs2(aItem->GetManagerName().GetBuffer()); | 288 | tempS = QString::fromUcs2(aItem->GetManagerName().GetBuffer()); |
288 | if ( !tempS.isEmpty() ) | 289 | if ( !tempS.isEmpty() ) |
289 | addressee.insertCustom( "KADDRESSBOOK", "X-ManagersName", tempS ); | 290 | addressee.insertCustom( "KADDRESSBOOK", "X-ManagersName", tempS ); |
290 | tempS = QString::fromUcs2(aItem->GetAssistantName().GetBuffer()); | 291 | tempS = QString::fromUcs2(aItem->GetAssistantName().GetBuffer()); |
291 | if ( !tempS.isEmpty() ) | 292 | if ( !tempS.isEmpty() ) |
292 | addressee.insertCustom( "KADDRESSBOOK", "X-AssistantsName", tempS ); | 293 | addressee.insertCustom( "KADDRESSBOOK", "X-AssistantsName", tempS ); |
293 | tempS = QString::fromUcs2(aItem->GetDepartment().GetBuffer()); | 294 | tempS = QString::fromUcs2(aItem->GetDepartment().GetBuffer()); |
294 | if ( !tempS.isEmpty() ) | 295 | if ( !tempS.isEmpty() ) |
295 | addressee.insertCustom( "KADDRESSBOOK", "X-Department", tempS ); | 296 | addressee.insertCustom( "KADDRESSBOOK", "X-Department", tempS ); |
296 | tempS = QString::fromUcs2(aItem->GetOfficeLocation().GetBuffer()).replace( QRegExp("\\r"), ""); | 297 | tempS = QString::fromUcs2(aItem->GetOfficeLocation().GetBuffer()).replace( QRegExp("\\r"), ""); |
297 | if ( !tempS.isEmpty() ) | 298 | if ( !tempS.isEmpty() ) |
298 | addressee.insertCustom( "KADDRESSBOOK", "X-Office",tempS ); | 299 | addressee.insertCustom( "KADDRESSBOOK", "X-Office",tempS ); |
299 | tempS = QString::fromUcs2(aItem->GetProfession().GetBuffer()); | 300 | tempS = QString::fromUcs2(aItem->GetProfession().GetBuffer()); |
300 | if ( !tempS.isEmpty() ) | 301 | if ( !tempS.isEmpty() ) |
301 | addressee.insertCustom( "KADDRESSBOOK", "X-Profession", tempS ); | 302 | addressee.insertCustom( "KADDRESSBOOK", "X-Profession", tempS ); |
302 | dtb = mDdate2Qdtr(aItem->GetAnniversary()); | 303 | dtb = mDdate2Qdtr(aItem->GetAnniversary()); |
303 | if (dtb.isValid() ) { | 304 | if (dtb.isValid() ) { |
304 | QString dt = KGlobal::locale()->formatDate( dtb.date() , true, KLocale::ISODate); | 305 | QString dt = KGlobal::locale()->formatDate( dtb.date() , true, KLocale::ISODate); |
305 | addressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt); | 306 | addressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt); |
306 | } | 307 | } |
307 | int sec = aItem->GetSensitivity() ; | 308 | int sec = aItem->GetSensitivity() ; |
308 | if ( sec > 1 )// mapping pers -> private | 309 | if ( sec > 1 )// mapping pers -> private |
309 | --sec; | 310 | --sec; |
310 | addressee.setSecrecy( sec ); | 311 | addressee.setSecrecy( sec ); |
311 | //addressee.setLogo( const Picture &logo ); | 312 | //addressee.setLogo( const Picture &logo ); |
312 | //addressee.setPhoto( const Picture &photo ); | 313 | //addressee.setPhoto( const Picture &photo ); |
313 | //addressee.setSound( const Sound &sound ); | 314 | //addressee.setSound( const Sound &sound ); |
314 | //addressee.setAgent( const Agent &agent ); | 315 | //addressee.setAgent( const Agent &agent ); |
315 | QString cat = QString::fromUcs2( aItem->GetCategories().GetBuffer()).replace( QRegExp("\\r"), ""); | 316 | QString cat = QString::fromUcs2( aItem->GetCategories().GetBuffer()).replace( QRegExp("\\r"), ""); |
316 | cat = cat.replace( QRegExp("; "), ";"); | 317 | cat = cat.replace( QRegExp("; "), ";"); |
317 | addressee.setCategories( QStringList::split( ";", cat )); | 318 | addressee.setCategories( QStringList::split( ";", cat )); |
318 | 319 | ||
319 | QString phoneS; | 320 | QString phoneS; |
320 | 321 | ||
321 | phoneS = QString::fromUcs2( aItem->GetAssistantTelephoneNumber().GetBuffer()); | 322 | phoneS = QString::fromUcs2( aItem->GetAssistantTelephoneNumber().GetBuffer()); |
322 | if ( ! phoneS.isEmpty()) | 323 | if ( ! phoneS.isEmpty()) |
323 | addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work + KABC::PhoneNumber::Voice ) ); | 324 | addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work + KABC::PhoneNumber::Voice ) ); |
diff --git a/korganizer/koimportoldialog.cpp b/korganizer/koimportoldialog.cpp index 7aa6076..2af436c 100644 --- a/korganizer/koimportoldialog.cpp +++ b/korganizer/koimportoldialog.cpp | |||
@@ -1,323 +1,325 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qtooltip.h> | 24 | #include <qtooltip.h> |
25 | #include <qframe.h> | 25 | #include <qframe.h> |
26 | #include <qpixmap.h> | 26 | #include <qpixmap.h> |
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | #include <qprogressbar.h> | 28 | #include <qprogressbar.h> |
29 | #include <qprogressdialog.h> | ||
29 | #include <qwidgetstack.h> | 30 | #include <qwidgetstack.h> |
30 | #include <qdatetime.h> | 31 | #include <qdatetime.h> |
31 | #include <qdir.h> | 32 | #include <qdir.h> |
32 | #include <qapplication.h> | 33 | #include <qapplication.h> |
33 | #include <qhbox.h> | 34 | #include <qhbox.h> |
34 | #include <qregexp.h> | 35 | #include <qregexp.h> |
35 | #include <qheader.h> | 36 | #include <qheader.h> |
36 | #include <qdatetime.h> | 37 | #include <qdatetime.h> |
37 | #include <qlistview.h> | 38 | #include <qlistview.h> |
38 | 39 | ||
39 | #include <kdebug.h> | 40 | #include <kdebug.h> |
40 | #include <klocale.h> | 41 | #include <klocale.h> |
41 | #include <kstandarddirs.h> | 42 | #include <kstandarddirs.h> |
42 | #include <kmessagebox.h> | 43 | #include <kmessagebox.h> |
43 | #include <kfiledialog.h> | 44 | #include <kfiledialog.h> |
44 | 45 | ||
45 | #include <libkdepim/categoryselectdialog.h> | 46 | #include <libkdepim/categoryselectdialog.h> |
46 | #include <libkdepim/kinputdialog.h> | 47 | #include <libkdepim/kinputdialog.h> |
47 | 48 | ||
48 | #include <libkcal/calendarlocal.h> | 49 | #include <libkcal/calendarlocal.h> |
49 | #include <libkcal/icalformat.h> | 50 | #include <libkcal/icalformat.h> |
50 | #include <kabc/stdaddressbook.h> | 51 | #include <kabc/stdaddressbook.h> |
51 | 52 | ||
52 | #include "koprefs.h" | 53 | #include "koprefs.h" |
53 | #include "koglobals.h" | 54 | #include "koglobals.h" |
54 | 55 | ||
55 | #include "koimportoldialog.h" | 56 | #include "koimportoldialog.h" |
56 | 57 | ||
57 | #include "../outport/msoutl9.h" | 58 | #include "../outport/msoutl9.h" |
58 | #include <ole2.h> | 59 | #include <ole2.h> |
59 | #include <comutil.h> | 60 | #include <comutil.h> |
60 | _Application gOlApp; | 61 | _Application gOlApp; |
61 | 62 | ||
62 | QDateTime mDdate2Qdtr( DATE dt) | 63 | QDateTime mDdate2Qdtr( DATE dt) |
63 | { | 64 | { |
64 | COleDateTime odt; | 65 | COleDateTime odt; |
65 | SYSTEMTIME st; | 66 | SYSTEMTIME st; |
66 | odt = dt; | 67 | odt = dt; |
67 | odt.GetAsSystemTime(st); | 68 | odt.GetAsSystemTime(st); |
68 | QDateTime qdt (QDate(st.wYear, st.wMonth,st.wDay ),QTime( st.wHour, st.wMinute,st.wSecond ) ); | 69 | QDateTime qdt (QDate(st.wYear, st.wMonth,st.wDay ),QTime( st.wHour, st.wMinute,st.wSecond ) ); |
69 | return qdt; | 70 | return qdt; |
70 | } | 71 | } |
71 | 72 | ||
72 | class OLEListViewItem : public QCheckListItem | 73 | class OLEListViewItem : public QCheckListItem |
73 | { | 74 | { |
74 | public: | 75 | public: |
75 | OLEListViewItem( QListView *parent, QString text ) : | 76 | OLEListViewItem( QListView *parent, QString text ) : |
76 | QCheckListItem( parent, text, QCheckListItem::CheckBox ) { mData = 0; }; | 77 | QCheckListItem( parent, text, QCheckListItem::CheckBox ) { mData = 0; }; |
77 | OLEListViewItem( QListViewItem *after, QString text ) : | 78 | OLEListViewItem( QListViewItem *after, QString text ) : |
78 | QCheckListItem( after, text, QCheckListItem::CheckBox ) { mData = 0; }; | 79 | QCheckListItem( after, text, QCheckListItem::CheckBox ) { mData = 0; }; |
79 | ~OLEListViewItem() {}; | 80 | ~OLEListViewItem() {}; |
80 | void setData( DWORD data ) {mData= data; }; | 81 | void setData( DWORD data ) {mData= data; }; |
81 | DWORD data() { return mData ;}; | 82 | DWORD data() { return mData ;}; |
82 | private: | 83 | private: |
83 | DWORD mData; | 84 | DWORD mData; |
84 | }; | 85 | }; |
85 | 86 | ||
86 | KOImportOLdialog::KOImportOLdialog( const QString &caption, | 87 | KOImportOLdialog::KOImportOLdialog( const QString &caption, |
87 | Calendar *calendar, QWidget *parent ) : | 88 | Calendar *calendar, QWidget *parent ) : |
88 | KDialogBase( Plain, caption, User1 | Close, Ok, | 89 | KDialogBase( Plain, caption, User1 | Close, Ok, |
89 | parent, caption, true, false, i18n("Import!") ) | 90 | parent, caption, true, false, i18n("Import!") ) |
90 | { | 91 | { |
91 | QHBox * mw = new QHBox( this ); | 92 | QHBox * mw = new QHBox( this ); |
92 | setMainWidget( mw ); | 93 | setMainWidget( mw ); |
93 | mListView = new QListView( mw ); | 94 | mListView = new QListView( mw ); |
94 | mListView->addColumn(i18n("Select Folder to import")); | 95 | mListView->addColumn(i18n("Select Folder to import")); |
95 | mListView->addColumn(i18n("Content Type")); | 96 | mListView->addColumn(i18n("Content Type")); |
96 | mCalendar = calendar; | 97 | mCalendar = calendar; |
97 | connect( this, SIGNAL( user1Clicked() ),SLOT ( slotApply())); | 98 | connect( this, SIGNAL( user1Clicked() ),SLOT ( slotApply())); |
98 | setupFolderView(); | 99 | setupFolderView(); |
99 | resize( sizeHint().width()+50, sizeHint().height()+50 ); | 100 | resize( sizeHint().width()+50, sizeHint().height()+50 ); |
100 | } | 101 | } |
101 | 102 | ||
102 | KOImportOLdialog::~KOImportOLdialog() | 103 | KOImportOLdialog::~KOImportOLdialog() |
103 | { | 104 | { |
104 | 105 | ||
105 | } | 106 | } |
106 | 107 | ||
107 | 108 | ||
108 | void KOImportOLdialog::setupFolderView() | 109 | void KOImportOLdialog::setupFolderView() |
109 | { | 110 | { |
110 | SCODE sc = ::OleInitialize(NULL); | 111 | SCODE sc = ::OleInitialize(NULL); |
111 | if ( FAILED ( sc ) ) { | 112 | if ( FAILED ( sc ) ) { |
112 | KMessageBox::information(this,"OLE initialisation failed"); | 113 | KMessageBox::information(this,"OLE initialisation failed"); |
113 | return; | 114 | return; |
114 | } | 115 | } |
115 | 116 | ||
116 | if(!gOlApp.CreateDispatch(_T("Outlook.Application"),NULL)){ | 117 | if(!gOlApp.CreateDispatch(_T("Outlook.Application"),NULL)){ |
117 | KMessageBox::information(this,"Sorry, cannot access Outlook"); | 118 | KMessageBox::information(this,"Sorry, cannot access Outlook"); |
118 | return ; | 119 | return ; |
119 | } | 120 | } |
120 | MAPIFolder mfInbox; | 121 | MAPIFolder mfInbox; |
121 | MAPIFolder mfRoot; | 122 | MAPIFolder mfRoot; |
122 | CString szName; | 123 | CString szName; |
123 | _NameSpace olNS; | 124 | _NameSpace olNS; |
124 | olNS = gOlApp.GetNamespace(_T("MAPI")); | 125 | olNS = gOlApp.GetNamespace(_T("MAPI")); |
125 | mfInbox = olNS.GetDefaultFolder(6); | 126 | mfInbox = olNS.GetDefaultFolder(6); |
126 | mfRoot = mfInbox.GetParent(); | 127 | mfRoot = mfInbox.GetParent(); |
127 | szName = mfRoot.GetName(); | 128 | szName = mfRoot.GetName(); |
128 | long iType = mfRoot.GetDefaultItemType(); | 129 | long iType = mfRoot.GetDefaultItemType(); |
129 | QString mes; | 130 | QString mes; |
130 | mes = QString::fromUcs2( szName.GetBuffer() ); | 131 | mes = QString::fromUcs2( szName.GetBuffer() ); |
131 | OLEListViewItem * root = new OLEListViewItem( mListView, mes ); | 132 | OLEListViewItem * root = new OLEListViewItem( mListView, mes ); |
132 | mfRoot.m_lpDispatch->AddRef(); | 133 | mfRoot.m_lpDispatch->AddRef(); |
133 | addFolder( root, mfRoot.m_lpDispatch ); | 134 | addFolder( root, mfRoot.m_lpDispatch ); |
134 | root->setOpen( true ); | 135 | root->setOpen( true ); |
135 | mListView->setSortColumn( 0 ); | 136 | mListView->setSortColumn( 0 ); |
136 | mListView->sort( ); | 137 | mListView->sort( ); |
137 | } | 138 | } |
138 | 139 | ||
139 | 140 | ||
140 | void KOImportOLdialog::addFolder(OLEListViewItem* iParent, LPDISPATCH dispParent) | 141 | void KOImportOLdialog::addFolder(OLEListViewItem* iParent, LPDISPATCH dispParent) |
141 | { | 142 | { |
142 | MAPIFolder mfParent(dispParent), mfChild; | 143 | MAPIFolder mfParent(dispParent), mfChild; |
143 | _Folders folders; | 144 | _Folders folders; |
144 | _variant_t fndx((long)0); | 145 | _variant_t fndx((long)0); |
145 | CString szName; | 146 | CString szName; |
146 | long iType; | 147 | long iType; |
147 | OLEListViewItem* hChild; | 148 | OLEListViewItem* hChild; |
148 | 149 | ||
149 | folders = mfParent.GetFolders(); | 150 | folders = mfParent.GetFolders(); |
150 | for(int i=1; i <= folders.GetCount(); ++i) | 151 | for(int i=1; i <= folders.GetCount(); ++i) |
151 | { | 152 | { |
152 | fndx = (long)i; | 153 | fndx = (long)i; |
153 | mfChild = folders.Item(fndx.Detach()); | 154 | mfChild = folders.Item(fndx.Detach()); |
154 | mfChild.m_lpDispatch->AddRef(); | 155 | mfChild.m_lpDispatch->AddRef(); |
155 | szName = mfChild.GetName(); | 156 | szName = mfChild.GetName(); |
156 | iType = mfChild.GetDefaultItemType(); | 157 | iType = mfChild.GetDefaultItemType(); |
157 | hChild = new OLEListViewItem( iParent , QString::fromUcs2( szName.GetBuffer() ) ); | 158 | hChild = new OLEListViewItem( iParent , QString::fromUcs2( szName.GetBuffer() ) ); |
158 | if ( iType != 1) | 159 | if ( iType != 1) |
159 | hChild->setEnabled( false ); | 160 | hChild->setEnabled( false ); |
160 | QString ts; | 161 | QString ts; |
161 | switch( iType ) { | 162 | switch( iType ) { |
162 | case 0: | 163 | case 0: |
163 | ts = i18n("Mail"); | 164 | ts = i18n("Mail"); |
164 | break; | 165 | break; |
165 | case 1: | 166 | case 1: |
166 | ts = i18n("Calendar"); | 167 | ts = i18n("Calendar"); |
167 | break; | 168 | break; |
168 | case 2: | 169 | case 2: |
169 | ts = i18n("Contacts"); | 170 | ts = i18n("Contacts"); |
170 | break; | 171 | break; |
171 | case 3: | 172 | case 3: |
172 | ts = i18n("Todos"); | 173 | ts = i18n("Todos"); |
173 | break; | 174 | break; |
174 | case 4: | 175 | case 4: |
175 | ts = i18n("Journals"); | 176 | ts = i18n("Journals"); |
176 | break; | 177 | break; |
177 | case 5: | 178 | case 5: |
178 | ts = i18n("Notes"); | 179 | ts = i18n("Notes"); |
179 | break; | 180 | break; |
180 | default: | 181 | default: |
181 | ts = i18n("Unknown"); | 182 | ts = i18n("Unknown"); |
182 | } | 183 | } |
183 | hChild->setText( 1,ts); | 184 | hChild->setText( 1,ts); |
184 | hChild->setData( (DWORD) mfChild.m_lpDispatch ); | 185 | hChild->setData( (DWORD) mfChild.m_lpDispatch ); |
185 | mfChild.m_lpDispatch->AddRef(); | 186 | mfChild.m_lpDispatch->AddRef(); |
186 | addFolder(hChild, mfChild.m_lpDispatch); | 187 | addFolder(hChild, mfChild.m_lpDispatch); |
187 | } | 188 | } |
188 | } | 189 | } |
189 | 190 | ||
190 | void KOImportOLdialog::slotApply() | 191 | void KOImportOLdialog::slotApply() |
191 | { | 192 | { |
192 | importedItems = 0; | 193 | importedItems = 0; |
193 | OLEListViewItem* child = (OLEListViewItem*) mListView->firstChild(); | 194 | OLEListViewItem* child = (OLEListViewItem*) mListView->firstChild(); |
194 | while ( child ) { | 195 | while ( child ) { |
195 | if ( child->isOn()&& child->data() ) | 196 | if ( child->isOn()&& child->data() ) |
196 | readCalendarData( child->data() ); | 197 | readCalendarData( child->data() ); |
197 | child = (OLEListViewItem*) child->itemBelow(); | 198 | child = (OLEListViewItem*) child->itemBelow(); |
198 | } | 199 | } |
199 | QString mes = i18n("Importing complete.\n\n%1 items imported.").arg( importedItems); | 200 | QString mes = i18n("Importing complete.\n\n%1 items imported.").arg( importedItems); |
200 | KMessageBox::information(this,mes); | 201 | KMessageBox::information(this,mes); |
201 | } | 202 | } |
202 | void KOImportOLdialog::readCalendarData( DWORD folder ) | 203 | void KOImportOLdialog::readCalendarData( DWORD folder ) |
203 | { | 204 | { |
204 | 205 | ||
205 | LPDISPATCH dispItem = (LPDISPATCH)folder; | 206 | LPDISPATCH dispItem = (LPDISPATCH)folder; |
206 | dispItem->AddRef(); | 207 | dispItem->AddRef(); |
207 | MAPIFolder mf(dispItem); | 208 | MAPIFolder mf(dispItem); |
208 | mf.m_lpDispatch->AddRef(); | 209 | mf.m_lpDispatch->AddRef(); |
209 | _Items folderItems; | 210 | _Items folderItems; |
210 | _variant_t indx((long)0); | 211 | _variant_t indx((long)0); |
211 | LPDISPATCH itm; | 212 | LPDISPATCH itm; |
212 | int i; | 213 | int i; |
213 | folderItems = mf.GetItems(); | 214 | folderItems = mf.GetItems(); |
214 | QProgressBar bar( folderItems.GetCount(),0 ); | 215 | QProgressDialog bar( i18n("Importing calendar data"),i18n("Abort"), folderItems.GetCount(),this ); |
215 | bar.setCaption (i18n("Importing - close to abort!") ); | 216 | bar.setCaption (i18n("Importing!") ); |
216 | int h = bar.sizeHint().height() ; | 217 | int h = bar.sizeHint().height() ; |
217 | int w = 300; | 218 | int w = 300; |
218 | int dw = QApplication::desktop()->width(); | 219 | int dw = QApplication::desktop()->width(); |
219 | int dh = QApplication::desktop()->height(); | 220 | int dh = QApplication::desktop()->height(); |
220 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 221 | //bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
221 | bar.show(); | 222 | bar.show(); |
222 | for(i=1; i <= folderItems.GetCount(); ++i) | 223 | for(i=1; i <= folderItems.GetCount(); ++i) |
223 | { | 224 | { |
224 | qApp->processEvents(); | 225 | qApp->processEvents(); |
225 | if ( ! bar.isVisible() ) | 226 | if ( ! bar.isVisible() ) |
226 | return ; | 227 | return ; |
227 | bar.setProgress( i ); | 228 | bar.setProgress( i ); |
229 | bar.raise(); | ||
228 | indx = (long)i; | 230 | indx = (long)i; |
229 | itm = folderItems.Item(indx.Detach()); | 231 | itm = folderItems.Item(indx.Detach()); |
230 | _AppointmentItem * pItem = (_AppointmentItem *)&itm; | 232 | _AppointmentItem * pItem = (_AppointmentItem *)&itm; |
231 | ol2kopiCalendar( pItem ); | 233 | ol2kopiCalendar( pItem ); |
232 | itm->Release(); | 234 | itm->Release(); |
233 | } | 235 | } |
234 | } | 236 | } |
235 | void KOImportOLdialog::slotOk() | 237 | void KOImportOLdialog::slotOk() |
236 | { | 238 | { |
237 | QDialog::accept(); | 239 | QDialog::accept(); |
238 | } | 240 | } |
239 | 241 | ||
240 | void KOImportOLdialog::ol2kopiCalendar( _AppointmentItem * aItem, bool computeRecurrence ) | 242 | void KOImportOLdialog::ol2kopiCalendar( _AppointmentItem * aItem, bool computeRecurrence ) |
241 | { | 243 | { |
242 | KCal::Event* event = new KCal::Event(); | 244 | KCal::Event* event = new KCal::Event(); |
243 | if ( aItem->GetAllDayEvent() ){ | 245 | if ( aItem->GetAllDayEvent() ){ |
244 | event->setDtStart( QDateTime( mDdate2Qdtr( aItem->GetStart()).date(),QTime(0,0,0 ) )); | 246 | event->setDtStart( QDateTime( mDdate2Qdtr( aItem->GetStart()).date(),QTime(0,0,0 ) )); |
245 | event->setDtEnd( QDateTime( mDdate2Qdtr( aItem->GetEnd()) .date(),QTime(0,0,0 )).addDays(-1)); | 247 | event->setDtEnd( QDateTime( mDdate2Qdtr( aItem->GetEnd()) .date(),QTime(0,0,0 )).addDays(-1)); |
246 | event->setFloats( true ); | 248 | event->setFloats( true ); |
247 | } else { | 249 | } else { |
248 | event->setDtStart( mDdate2Qdtr( aItem->GetStart()) ); | 250 | event->setDtStart( mDdate2Qdtr( aItem->GetStart()) ); |
249 | event->setDtEnd( mDdate2Qdtr( aItem->GetEnd()) ); | 251 | event->setDtEnd( mDdate2Qdtr( aItem->GetEnd()) ); |
250 | event->setFloats( false ); | 252 | event->setFloats( false ); |
251 | } | 253 | } |
252 | event->setSummary( QString::fromUcs2( aItem->GetSubject().GetBuffer()) ); | 254 | event->setSummary( QString::fromUcs2( aItem->GetSubject().GetBuffer()) ); |
253 | event->setLocation( QString::fromUcs2( aItem->GetLocation().GetBuffer()) ); | 255 | event->setLocation( QString::fromUcs2( aItem->GetLocation().GetBuffer()) ); |
254 | event->setDescription( QString::fromUcs2( aItem->GetBody().GetBuffer()).replace( QRegExp("\\r"), "") ); | 256 | event->setDescription( QString::fromUcs2( aItem->GetBody().GetBuffer()).replace( QRegExp("\\r"), "") ); |
255 | QString cat = QString::fromUcs2( aItem->GetCategories().GetBuffer()).replace( QRegExp("; "), ";"); | 257 | QString cat = QString::fromUcs2( aItem->GetCategories().GetBuffer()).replace( QRegExp("; "), ";"); |
256 | event->setCategories( QStringList::split( ";", cat ) ); | 258 | event->setCategories( QStringList::split( ";", cat ) ); |
257 | if ( aItem->GetReminderSet() ) { | 259 | if ( aItem->GetReminderSet() ) { |
258 | event->clearAlarms(); | 260 | event->clearAlarms(); |
259 | Alarm* alarm = event->newAlarm(); | 261 | Alarm* alarm = event->newAlarm(); |
260 | alarm->setStartOffset( -aItem->GetReminderMinutesBeforeStart()*60 ); | 262 | alarm->setStartOffset( -aItem->GetReminderMinutesBeforeStart()*60 ); |
261 | alarm->setEnabled( true ); | 263 | alarm->setEnabled( true ); |
262 | if ( aItem->GetReminderPlaySound() ) { | 264 | if ( aItem->GetReminderPlaySound() ) { |
263 | alarm->setType( Alarm::Audio ); | 265 | alarm->setType( Alarm::Audio ); |
264 | alarm->setAudioFile( QString::fromUcs2( aItem->GetReminderSoundFile().GetBuffer())); | 266 | alarm->setAudioFile( QString::fromUcs2( aItem->GetReminderSoundFile().GetBuffer())); |
265 | } | 267 | } |
266 | else | 268 | else |
267 | alarm->setType( Alarm::Display ); | 269 | alarm->setType( Alarm::Display ); |
268 | alarm->setRepeatCount( aItem->GetReplyTime() ); | 270 | alarm->setRepeatCount( aItem->GetReplyTime() ); |
269 | } | 271 | } |
270 | // OL :pub 0 - pers 1 - priv 2 - conf 3 | 272 | // OL :pub 0 - pers 1 - priv 2 - conf 3 |
271 | // KO : pub 0 - priv 1 - conf 2 | 273 | // KO : pub 0 - priv 1 - conf 2 |
272 | int sec = aItem->GetSensitivity() ; | 274 | int sec = aItem->GetSensitivity() ; |
273 | if ( sec > 1 )// mapping pers -> private | 275 | if ( sec > 1 )// mapping pers -> private |
274 | --sec; | 276 | --sec; |
275 | event->setSecrecy( sec ); | 277 | event->setSecrecy( sec ); |
276 | if ( aItem->GetBusyStatus() == 0 ) | 278 | if ( aItem->GetBusyStatus() == 0 ) |
277 | event->setTransparency( Event::Transparent);// OL free | 279 | event->setTransparency( Event::Transparent);// OL free |
278 | else | 280 | else |
279 | event->setTransparency( Event::Opaque);//OL all other | 281 | event->setTransparency( Event::Opaque);//OL all other |
280 | 282 | ||
281 | if ( aItem->GetIsRecurring() && computeRecurrence ) { //recur | 283 | if ( aItem->GetIsRecurring() && computeRecurrence ) { //recur |
282 | 284 | ||
283 | RecurrencePattern recpat = aItem->GetRecurrencePattern(); | 285 | RecurrencePattern recpat = aItem->GetRecurrencePattern(); |
284 | 286 | ||
285 | QDate startDate = mDdate2Qdtr(recpat.GetPatternStartDate()).date(); | 287 | QDate startDate = mDdate2Qdtr(recpat.GetPatternStartDate()).date(); |
286 | int freq = recpat.GetInterval(); | 288 | int freq = recpat.GetInterval(); |
287 | 289 | ||
288 | bool hasEndDate = !recpat.GetNoEndDate(); | 290 | bool hasEndDate = !recpat.GetNoEndDate(); |
289 | QDate endDate = mDdate2Qdtr(recpat.GetPatternEndDate()).date(); | 291 | QDate endDate = mDdate2Qdtr(recpat.GetPatternEndDate()).date(); |
290 | QBitArray weekDays( 7 ); | 292 | QBitArray weekDays( 7 ); |
291 | weekDays.fill(false ); | 293 | weekDays.fill(false ); |
292 | uint weekDaysNum = recpat.GetDayOfWeekMask(); | 294 | uint weekDaysNum = recpat.GetDayOfWeekMask(); |
293 | int i; | 295 | int i; |
294 | int bb = 2; | 296 | int bb = 2; |
295 | for( i = 1; i <= 6; ++i ) { | 297 | for( i = 1; i <= 6; ++i ) { |
296 | weekDays.setBit( i - 1, ( bb & weekDaysNum )); | 298 | weekDays.setBit( i - 1, ( bb & weekDaysNum )); |
297 | bb = 4 << (i-1); | 299 | bb = 4 << (i-1); |
298 | //qDebug(" %d bit %d ",i-1,weekDays.at(i-1) ); | 300 | //qDebug(" %d bit %d ",i-1,weekDays.at(i-1) ); |
299 | } | 301 | } |
300 | if ( 1 & weekDaysNum) | 302 | if ( 1 & weekDaysNum) |
301 | weekDays.setBit( 6 ); | 303 | weekDays.setBit( 6 ); |
302 | // int pos = 1;// pending | 304 | // int pos = 1;// pending |
303 | 305 | ||
304 | Recurrence *r = event->recurrence(); | 306 | Recurrence *r = event->recurrence(); |
305 | int rtype = recpat.GetRecurrenceType(); | 307 | int rtype = recpat.GetRecurrenceType(); |
306 | //recurrence types are: | 308 | //recurrence types are: |
307 | /* | 309 | /* |
308 | olRecursDaily(0) | 310 | olRecursDaily(0) |
309 | olRecursWeekly(1) | 311 | olRecursWeekly(1) |
310 | olRecursMonthly(2) | 312 | olRecursMonthly(2) |
311 | olRecursMonthNth(3) | 313 | olRecursMonthNth(3) |
312 | olRecursYearly(5) | 314 | olRecursYearly(5) |
313 | olRecursYearNth(6) | 315 | olRecursYearNth(6) |
314 | */ | 316 | */ |
315 | 317 | ||
316 | int duration = recpat.GetOccurrences(); | 318 | int duration = recpat.GetOccurrences(); |
317 | if ( !hasEndDate ) | 319 | if ( !hasEndDate ) |
318 | duration = -1; | 320 | duration = -1; |
319 | 321 | ||
320 | //LPDISPATCH RecurrencePattern::GetExceptions() | 322 | //LPDISPATCH RecurrencePattern::GetExceptions() |
321 | //long RecurrencePattern::GetMonthOfYear() | 323 | //long RecurrencePattern::GetMonthOfYear() |
322 | if ( rtype == 0 ) { | 324 | if ( rtype == 0 ) { |
323 | if ( hasEndDate ) r->setDaily( freq, endDate ); | 325 | if ( hasEndDate ) r->setDaily( freq, endDate ); |