-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 5 | ||||
-rw-r--r-- | kmicromail/editaccounts.cpp | 12 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/smtpwrapper.cpp | 21 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 41 | ||||
-rw-r--r-- | korganizer/kolistview.h | 2 |
5 files changed, 66 insertions, 15 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 246ab3d..2084d0d 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -787,520 +787,523 @@ | |||
787 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, | 787 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, |
788 | { "Save backup filename","Speichere Backup Dateiname" }, | 788 | { "Save backup filename","Speichere Backup Dateiname" }, |
789 | { "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" }, | 789 | { "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" }, |
790 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, | 790 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, |
791 | { "Details of attendee","Teilnehmerdetails" }, | 791 | { "Details of attendee","Teilnehmerdetails" }, |
792 | { "Work phone:\n","Telefon Arbeit:\n" }, | 792 | { "Work phone:\n","Telefon Arbeit:\n" }, |
793 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, | 793 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, |
794 | { "Home phone:\n","Telefon privat:\n" }, | 794 | { "Home phone:\n","Telefon privat:\n" }, |
795 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, | 795 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, |
796 | { "Email:\n","Email:\n" }, | 796 | { "Email:\n","Email:\n" }, |
797 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, | 797 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, |
798 | { "Audio Al.: ","Audio Al.: " }, | 798 | { "Audio Al.: ","Audio Al.: " }, |
799 | { "Proc.Al.: ","Proz.Al.: " }, | 799 | { "Proc.Al.: ","Proz.Al.: " }, |
800 | { "No sound set","Kein Sound definiert" }, | 800 | { "No sound set","Kein Sound definiert" }, |
801 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, | 801 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, |
802 | { "No program set","Kein Programm definiert" }, | 802 | { "No program set","Kein Programm definiert" }, |
803 | { "Running '%1'","Ausführen '%1'" }, | 803 | { "Running '%1'","Ausführen '%1'" }, |
804 | { "Playing '%1'","Abspielen '%1'" }, | 804 | { "Playing '%1'","Abspielen '%1'" }, |
805 | { "Show Sync Events in WN/Agenda view","Zeige Sync Events in WN/Agenda Ansicht" }, | 805 | { "Show Sync Events in WN/Agenda view","Zeige Sync Events in WN/Agenda Ansicht" }, |
806 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, | 806 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, |
807 | { "Load!","Laden!" }, | 807 | { "Load!","Laden!" }, |
808 | { "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" }, | 808 | { "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" }, |
809 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, | 809 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, |
810 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, | 810 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, |
811 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, | 811 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, |
812 | { "Features + hints...","Eigenschaften + Tipps..." }, | 812 | { "Features + hints...","Eigenschaften + Tipps..." }, |
813 | { "User translation...","Benutzer Übersetzung..." }, | 813 | { "User translation...","Benutzer Übersetzung..." }, |
814 | { "Sync HowTo...","Synchronisation HowTo..." }, | 814 | { "Sync HowTo...","Synchronisation HowTo..." }, |
815 | { "Print calendar...","Drucke Kalender..." }, | 815 | { "Print calendar...","Drucke Kalender..." }, |
816 | { "Anniversary","Jahrestag" }, | 816 | { "Anniversary","Jahrestag" }, |
817 | { "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" }, | 817 | { "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" }, |
818 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, | 818 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, |
819 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, | 819 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, |
820 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, | 820 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, |
821 | { "<b>Access: </b>","<b>Zugriff: </b>" }, | 821 | { "<b>Access: </b>","<b>Zugriff: </b>" }, |
822 | { "(%1 min before)","(%1 min vorher)" }, | 822 | { "(%1 min before)","(%1 min vorher)" }, |
823 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, | 823 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, |
824 | { "Save Journal/Description...","Speichere Journal/Details..." }, | 824 | { "Save Journal/Description...","Speichere Journal/Details..." }, |
825 | { "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." }, | 825 | { "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." }, |
826 | { "Continue","Weitermachen" }, | 826 | { "Continue","Weitermachen" }, |
827 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, | 827 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, |
828 | { "Attendee:","Teilnehmer:" }, | 828 | { "Attendee:","Teilnehmer:" }, |
829 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, | 829 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, |
830 | { "On day ","Am Tag " }, | 830 | { "On day ","Am Tag " }, |
831 | { "%1 of ","%1 des Monats" }, | 831 | { "%1 of ","%1 des Monats" }, |
832 | { "%1 of the year","%1 des Jahres" }, | 832 | { "%1 of the year","%1 des Jahres" }, |
833 | { "Anonymous","Anonymo" }, | 833 | { "Anonymous","Anonymo" }, |
834 | { "nobody@nowhere","niemand@nirgendwo" }, | 834 | { "nobody@nowhere","niemand@nirgendwo" }, |
835 | { "calendar.html","calendar.html" }, | 835 | { "calendar.html","calendar.html" }, |
836 | { " Local Time"," Locale Zeit" }, | 836 | { " Local Time"," Locale Zeit" }, |
837 | { "Unknown Name","Unbekannter Name" }, | 837 | { "Unknown Name","Unbekannter Name" }, |
838 | { "unknown@nowhere","unbekannt@nirgendwo" }, | 838 | { "unknown@nowhere","unbekannt@nirgendwo" }, |
839 | { "Beam via IR!","Beam via IR!" }, | 839 | { "Beam via IR!","Beam via IR!" }, |
840 | { "Next Month","Nächster Monat" }, | 840 | { "Next Month","Nächster Monat" }, |
841 | { "Prio","Prio" }, | 841 | { "Prio","Prio" }, |
842 | { "Reparent Todo","Mache Sub-Todo" }, | 842 | { "Reparent Todo","Mache Sub-Todo" }, |
843 | { "tomorrow","morgen" }, | 843 | { "tomorrow","morgen" }, |
844 | { "today","heute" }, | 844 | { "today","heute" }, |
845 | { "yesterday","gestern" }, | 845 | { "yesterday","gestern" }, |
846 | { "Ok","Ok" }, | 846 | { "Ok","Ok" }, |
847 | { "Ok+Agenda","Ok+Agenda" }, | 847 | { "Ok+Agenda","Ok+Agenda" }, |
848 | { "Email","Email" }, | 848 | { "Email","Email" }, |
849 | { "RSVP","RSVP" }, | 849 | { "RSVP","RSVP" }, |
850 | { "Email:","Email:" }, | 850 | { "Email:","Email:" }, |
851 | { "Appointment Time ","Termin Zeit " }, | 851 | { "Appointment Time ","Termin Zeit " }, |
852 | { "2","2" }, | 852 | { "2","2" }, |
853 | { "3","3" }, | 853 | { "3","3" }, |
854 | { "4","4" }, | 854 | { "4","4" }, |
855 | { " 0 %"," 0 %" }, | 855 | { " 0 %"," 0 %" }, |
856 | { " 20 %"," 20 %" }, | 856 | { " 20 %"," 20 %" }, |
857 | { " 40 %"," 40 %" }, | 857 | { " 40 %"," 40 %" }, |
858 | { " 60 %"," 60 %" }, | 858 | { " 60 %"," 60 %" }, |
859 | { " 80 %"," 80 %" }, | 859 | { " 80 %"," 80 %" }, |
860 | { "100 %","100 %" }, | 860 | { "100 %","100 %" }, |
861 | { "Filter","Filter" }, | 861 | { "Filter","Filter" }, |
862 | { "Configure","Konfiguriere" }, | 862 | { "Configure","Konfiguriere" }, |
863 | { "What's Next","What's Next" }, | 863 | { "What's Next","What's Next" }, |
864 | { "Complete calendar...","Kompletten Kalender..." }, | 864 | { "Complete calendar...","Kompletten Kalender..." }, |
865 | { "Filtered calendar...","Gefilterten Kalender..." }, | 865 | { "Filtered calendar...","Gefilterten Kalender..." }, |
866 | { "Export to phone","Exportiere zum Handy" }, | 866 | { "Export to phone","Exportiere zum Handy" }, |
867 | { "Beam receive enabled","Beam Empfang an" }, | 867 | { "Beam receive enabled","Beam Empfang an" }, |
868 | { "What's new?","Was ist neu?" }, | 868 | { "What's new?","Was ist neu?" }, |
869 | { "FAQ...","FAQ..." }, | 869 | { "FAQ...","FAQ..." }, |
870 | { "Licence...","Licence..." }, | 870 | { "Licence...","Licence..." }, |
871 | { "What's This?","What's This?" }, | 871 | { "What's This?","What's This?" }, |
872 | { "&Edit...","&Editiere..." }, | 872 | { "&Edit...","&Editiere..." }, |
873 | { "Oktober","Oktober" }, | 873 | { "Oktober","Oktober" }, |
874 | { "Title","Titel" }, | 874 | { "Title","Titel" }, |
875 | { "%1 %","%1 %" }, | 875 | { "%1 %","%1 %" }, |
876 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, | 876 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, |
877 | { "Import!","Importiere!" }, | 877 | { "Import!","Importiere!" }, |
878 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, | 878 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, |
879 | { "Export to phone options","Export ans Handy Optionen" }, | 879 | { "Export to phone options","Export ans Handy Optionen" }, |
880 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, | 880 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, |
881 | { "I/O device: ","I/O device: " }, | 881 | { "I/O device: ","I/O device: " }, |
882 | { "Connection: ","Connection: " }, | 882 | { "Connection: ","Connection: " }, |
883 | { "Model(opt.): ","Model(opt.): " }, | 883 | { "Model(opt.): ","Model(opt.): " }, |
884 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, | 884 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, |
885 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, | 885 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, |
886 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nToDo/Kalender Daten auf dem Handy!" }, | 886 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nToDo/Kalender Daten auf dem Handy!" }, |
887 | { "Export to mobile phone!","Exportiere auf das Handy!" }, | 887 | { "Export to mobile phone!","Exportiere auf das Handy!" }, |
888 | { "Export complete calendar","Exportiere kompletten Kalender" }, | 888 | { "Export complete calendar","Exportiere kompletten Kalender" }, |
889 | { "Writing to phone...","Sende Daten ans Handy..." }, | 889 | { "Writing to phone...","Sende Daten ans Handy..." }, |
890 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, | 890 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, |
891 | { "Retry","Nochmal versuchen" }, | 891 | { "Retry","Nochmal versuchen" }, |
892 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, | 892 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, |
893 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, | 893 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, |
894 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, | 894 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, |
895 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, | 895 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, |
896 | { "Preferences","Vorlieben" }, | 896 | { "Preferences","Vorlieben" }, |
897 | { "Global","Global" }, | 897 | { "Global","Global" }, |
898 | { "Phone","Phone" }, | 898 | { "Phone","Phone" }, |
899 | { "SMS","SMS" }, | 899 | { "SMS","SMS" }, |
900 | { "Fax","Fax" }, | 900 | { "Fax","Fax" }, |
901 | { "Pager","Pager" }, | 901 | { "Pager","Pager" }, |
902 | { "SIP","SIP" }, | 902 | { "SIP","SIP" }, |
903 | { "Italian","Italienisch" }, | 903 | { "Italian","Italienisch" }, |
904 | { "24:00","24:00" }, | 904 | { "24:00","24:00" }, |
905 | { "12:00am","12:00am" }, | 905 | { "12:00am","12:00am" }, |
906 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, | 906 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, |
907 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, | 907 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, |
908 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, | 908 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, |
909 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, | 909 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, |
910 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, | 910 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, |
911 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, | 911 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, |
912 | { "Used Mail Client","Benutzter Mail Client" }, | 912 | { "Used Mail Client","Benutzter Mail Client" }, |
913 | { "Channel:","Channel:" }, | 913 | { "Channel:","Channel:" }, |
914 | { "Message:","Message:" }, | 914 | { "Message:","Message:" }, |
915 | { "Parameters:","Parameter:" }, | 915 | { "Parameters:","Parameter:" }, |
916 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, | 916 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, |
917 | { "extra Message:","extra Message:" }, | 917 | { "extra Message:","extra Message:" }, |
918 | { "extra Parameters:","extra Parameter:" }, | 918 | { "extra Parameters:","extra Parameter:" }, |
919 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, | 919 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, |
920 | { "External Apps.","Externe Appl." }, | 920 | { "External Apps.","Externe Appl." }, |
921 | { "24 hours","24 Std." }, | 921 | { "24 hours","24 Std." }, |
922 | { "3 hours","3 Std." }, | 922 | { "3 hours","3 Std." }, |
923 | { "1 hour","1 Std." }, | 923 | { "1 hour","1 Std." }, |
924 | { "15 minutes","15 Min." }, | 924 | { "15 minutes","15 Min." }, |
925 | { "5 minutes","5 Min." }, | 925 | { "5 minutes","5 Min." }, |
926 | { "1 minute","1 Min." }, | 926 | { "1 minute","1 Min." }, |
927 | { "23","23" }, | 927 | { "23","23" }, |
928 | { "Mon 15","Mon 15" }, | 928 | { "Mon 15","Mon 15" }, |
929 | { "Configure KO","Konfiguriere KO" }, | 929 | { "Configure KO","Konfiguriere KO" }, |
930 | { "Event text","Termin Text" }, | 930 | { "Event text","Termin Text" }, |
931 | { "ToDo","ToDo" }, | 931 | { "ToDo","ToDo" }, |
932 | { "Today","Heute" }, | 932 | { "Today","Heute" }, |
933 | { "What's Next View","What's Next Ansicht" }, | 933 | { "What's Next View","What's Next Ansicht" }, |
934 | { "Show Sync Events in \nWhat's Next/Agenda view","Zeige Sync Termine in \nWhat's Next/Agenda view" }, | 934 | { "Show Sync Events in \nWhat's Next/Agenda view","Zeige Sync Termine in \nWhat's Next/Agenda view" }, |
935 | { "Use short date in \nWhat's Next/Event view","Zeige Kurzdatum in \nWhat's Next/Event view" }, | 935 | { "Use short date in \nWhat's Next/Event view","Zeige Kurzdatum in \nWhat's Next/Event view" }, |
936 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, | 936 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, |
937 | { "Alarm","Alarm" }, | 937 | { "Alarm","Alarm" }, |
938 | { "Used %1 Client","Benutzter %1 Client" }, | 938 | { "Used %1 Client","Benutzter %1 Client" }, |
939 | { "No email client installed","Kein Email Klient installiert" }, | 939 | { "No email client installed","Kein Email Klient installiert" }, |
940 | { "Userdefined email client","Benutzerdef. Email Klient" }, | 940 | { "Userdefined email client","Benutzerdef. Email Klient" }, |
941 | { "OM/Pi email client","OM/Pi Email Klient" }, | 941 | { "OM/Pi email client","OM/Pi Email Klient" }, |
942 | { "Include in multiple ","Beziehe in multiple " }, | 942 | { "Include in multiple ","Beziehe in multiple " }, |
943 | { "calendar ","Kalender " }, | 943 | { "calendar ","Kalender " }, |
944 | { "addressbook ","Adressbuch " }, | 944 | { "addressbook ","Adressbuch " }, |
945 | { "pwmanager","PWmanager" }, | 945 | { "pwmanager","PWmanager" }, |
946 | { " sync"," Sync ein" }, | 946 | { " sync"," Sync ein" }, |
947 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, | 947 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, |
948 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, | 948 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, |
949 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, | 949 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, |
950 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, | 950 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, |
951 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, | 951 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, |
952 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, | 952 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, |
953 | { "Help...","Hilfe..." }, | 953 | { "Help...","Hilfe..." }, |
954 | { "Local file Cal:","Lokale Datei Kal:" }, | 954 | { "Local file Cal:","Lokale Datei Kal:" }, |
955 | { "Local file ABook:","Lokale Datei ABuch:" }, | 955 | { "Local file ABook:","Lokale Datei ABuch:" }, |
956 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, | 956 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, |
957 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, | 957 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, |
958 | { "Calendar:","Kalender:" }, | 958 | { "Calendar:","Kalender:" }, |
959 | { "AddressBook:","AdressBuch:" }, | 959 | { "AddressBook:","AdressBuch:" }, |
960 | { "PWManager:","PWManager:" }, | 960 | { "PWManager:","PWManager:" }, |
961 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, | 961 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, |
962 | { "ssh/scp","ssh/scp" }, | 962 | { "ssh/scp","ssh/scp" }, |
963 | { "ftp","ftp" }, | 963 | { "ftp","ftp" }, |
964 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, | 964 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, |
965 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, | 965 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, |
966 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, | 966 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, |
967 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, | 967 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, |
968 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, | 968 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, |
969 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, | 969 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, |
970 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, | 970 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, |
971 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, | 971 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, |
972 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, | 972 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, |
973 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, | 973 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, |
974 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, | 974 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, |
975 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, | 975 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, |
976 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, | 976 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, |
977 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, | 977 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, |
978 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, | 978 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, |
979 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, | 979 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, |
980 | { "KDE-Pim Sync","KDE-Pim Sync" }, | 980 | { "KDE-Pim Sync","KDE-Pim Sync" }, |
981 | { "Multiple profiles","Multi-Sync Profile" }, | 981 | { "Multiple profiles","Multi-Sync Profile" }, |
982 | { "Device: ","Gerät: " }, | 982 | { "Device: ","Gerät: " }, |
983 | { "Multiple sync started.","Multi-Sync gestartet." }, | 983 | { "Multiple sync started.","Multi-Sync gestartet." }, |
984 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, | 984 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, |
985 | { "Turn filter on","Schalte Filter an" }, | 985 | { "Turn filter on","Schalte Filter an" }, |
986 | { "Turn filter off","Schalte Filter aus" }, | 986 | { "Turn filter off","Schalte Filter aus" }, |
987 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, | 987 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, |
988 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, | 988 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, |
989 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, | 989 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, |
990 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, | 990 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, |
991 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, | 991 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, |
992 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, | 992 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, |
993 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, | 993 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, |
994 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, | 994 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, |
995 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, | 995 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, |
996 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, | 996 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, |
997 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, | 997 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, |
998 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, | 998 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, |
999 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, | 999 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, |
1000 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, | 1000 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, |
1001 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, | 1001 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, |
1002 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, | 1002 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, |
1003 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, | 1003 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, |
1004 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, | 1004 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, |
1005 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, | 1005 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, |
1006 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, | 1006 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, |
1007 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, | 1007 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, |
1008 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, | 1008 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, |
1009 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, | 1009 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, |
1010 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, | 1010 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, |
1011 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, | 1011 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, |
1012 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, | 1012 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, |
1013 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, | 1013 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, |
1014 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, | 1014 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, |
1015 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, | 1015 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, |
1016 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, | 1016 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, |
1017 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, | 1017 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, |
1018 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, | 1018 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, |
1019 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, | 1019 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, |
1020 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, | 1020 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, |
1021 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, | 1021 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, |
1022 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, | 1022 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, |
1023 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, | 1023 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, |
1024 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X</b>: Zeige/verstecke Datumsnavigator</p>\n" }, | 1024 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X</b>: Zeige/verstecke Datumsnavigator</p>\n" }, |
1025 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, | 1025 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, |
1026 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, | 1026 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, |
1027 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, | 1027 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, |
1028 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, | 1028 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, |
1029 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, | 1029 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, |
1030 | { "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, | 1030 | { "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, |
1031 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, | 1031 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, |
1032 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, | 1032 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, |
1033 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, | 1033 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, |
1034 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, | 1034 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, |
1035 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, | 1035 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, |
1036 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, | 1036 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, |
1037 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, | 1037 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, |
1038 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, | 1038 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, |
1039 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, | 1039 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, |
1040 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, | 1040 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, |
1041 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, | 1041 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, |
1042 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.net\n" }, | 1042 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.net\n" }, |
1043 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, | 1043 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, |
1044 | { "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","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, | 1044 | { "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","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, |
1045 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, | 1045 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, |
1046 | { "KO/Pi FAQ","KO/Pi FAQ" }, | 1046 | { "KO/Pi FAQ","KO/Pi FAQ" }, |
1047 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, | 1047 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, |
1048 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, | 1048 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, |
1049 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, | 1049 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, |
1050 | { "From: ","Von: " }, | 1050 | { "From: ","Von: " }, |
1051 | { "Remove sync info","Entferne Sync Info" }, | 1051 | { "Remove sync info","Entferne Sync Info" }, |
1052 | { "For all profiles","Für alle Profile" }, | 1052 | { "For all profiles","Für alle Profile" }, |
1053 | { "Hide not Running","Verstecke nicht Laufende" }, | 1053 | { "Hide not Running","Verstecke nicht Laufende" }, |
1054 | { "ME","ME" }, | 1054 | { "ME","ME" }, |
1055 | { "Toolbar","Toolbar" }, | 1055 | { "Toolbar","Toolbar" }, |
1056 | { "Undo Delete...","Löschen rückgängig machen..." }, | 1056 | { "Undo Delete...","Löschen rückgängig machen..." }, |
1057 | { "Undo Delete","Löschen rückgängig machen" }, | 1057 | { "Undo Delete","Löschen rückgängig machen" }, |
1058 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, | 1058 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, |
1059 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, | 1059 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, |
1060 | { "Januar","Januar" }, | 1060 | { "Januar","Januar" }, |
1061 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, | 1061 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, |
1062 | { "No Filter","Kein Filter" }, | 1062 | { "No Filter","Kein Filter" }, |
1063 | { "Multiple Sync options","Multi Sync Optionen" }, | 1063 | { "Multiple Sync options","Multi Sync Optionen" }, |
1064 | { "Sync algo options","Sync Ablauf Optionen" }, | 1064 | { "Sync algo options","Sync Ablauf Optionen" }, |
1065 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, | 1065 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, |
1066 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, | 1066 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, |
1067 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, | 1067 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, |
1068 | { "Write back options","Optionen zum Zurückschreiben" }, | 1068 | { "Write back options","Optionen zum Zurückschreiben" }, |
1069 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, | 1069 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, |
1070 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, | 1070 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, |
1071 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, | 1071 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, |
1072 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, | 1072 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, |
1073 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, | 1073 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, |
1074 | { "Time period","Zeitspanne" }, | 1074 | { "Time period","Zeitspanne" }, |
1075 | { "From ","Von " }, | 1075 | { "From ","Von " }, |
1076 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, | 1076 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, |
1077 | { " weeks in the future "," Wochen in der Zukunft " }, | 1077 | { " weeks in the future "," Wochen in der Zukunft " }, |
1078 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, | 1078 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, |
1079 | { "Local temp file:","Lokale temp Datei:" }, | 1079 | { "Local temp file:","Lokale temp Datei:" }, |
1080 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, | 1080 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, |
1081 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, | 1081 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, |
1082 | { "Language","Sprache" }, | 1082 | { "Language","Sprache" }, |
1083 | { "Time Format","Zeit Format" }, | 1083 | { "Time Format","Zeit Format" }, |
1084 | { "Time Zone","Zeit Zone" }, | 1084 | { "Time Zone","Zeit Zone" }, |
1085 | { "%1 groups subscribed","%1 Guppen abboniert" }, | 1085 | { "%1 groups subscribed","%1 Guppen abboniert" }, |
1086 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, | 1086 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, |
1087 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, | 1087 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, |
1088 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, | 1088 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, |
1089 | { "Save settings","Speichere Einstellungen" }, | 1089 | { "Save settings","Speichere Einstellungen" }, |
1090 | { "Save standard","Speichere Standard" }, | 1090 | { "Save standard","Speichere Standard" }, |
1091 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | 1091 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, |
1092 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, | 1092 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, |
1093 | { "Data storage path","Daten Speicherpfad" }, | 1093 | { "Data storage path","Daten Speicherpfad" }, |
1094 | { "Language","Sprache" }, | 1094 | { "Language","Sprache" }, |
1095 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, | 1095 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, |
1096 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, | 1096 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, |
1097 | { "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, | 1097 | { "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, |
1098 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, | 1098 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, |
1099 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, | 1099 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, |
1100 | { "KO/Pi","KO/Pi" }, | 1100 | { "KO/Pi","KO/Pi" }, |
1101 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, | 1101 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, |
1102 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, | 1102 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, |
1103 | { "Sound.Al.: ","Sound.Al.: " }, | 1103 | { "Sound.Al.: ","Sound.Al.: " }, |
1104 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, | 1104 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, |
1105 | { "Restore","Wiederherstellen" }, | 1105 | { "Restore","Wiederherstellen" }, |
1106 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, | 1106 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, |
1107 | { "% completed","% komplett" }, | 1107 | { "% completed","% komplett" }, |
1108 | { "%d item(s) found.","%d Item(s) gefunden." }, | 1108 | { "%d item(s) found.","%d Item(s) gefunden." }, |
1109 | { "Set complete","Setze auf erledigt" }, | 1109 | { "Set complete","Setze auf erledigt" }, |
1110 | { "(cancelled)","(gecancelt)" }, | 1110 | { "(cancelled)","(gecancelt)" }, |
1111 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, | 1111 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, |
1112 | { " Local time "," Locale Zeit " }, | 1112 | { " Local time "," Locale Zeit " }, |
1113 | { "Form2","Form2" }, | 1113 | { "Form2","Form2" }, |
1114 | { "Filter enabled","Filter angeschaltet" }, | 1114 | { "Filter enabled","Filter angeschaltet" }, |
1115 | { "Edit Filters","Ändere Filter" }, | 1115 | { "Edit Filters","Ändere Filter" }, |
1116 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, | 1116 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, |
1117 | { "Agenda","Agenda" }, | 1117 | { "Agenda","Agenda" }, |
1118 | { " ("," (" }, | 1118 | { " ("," (" }, |
1119 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, | 1119 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, |
1120 | { "Print","Print" }, | 1120 | { "Print","Print" }, |
1121 | { "&Setup Printer...","Drucker &Setup..." }, | 1121 | { "&Setup Printer...","Drucker &Setup..." }, |
1122 | { "View Type","Zeige Typ" }, | 1122 | { "View Type","Zeige Typ" }, |
1123 | { "Page &orientation:","Seiten Ausrichtung:" }, | 1123 | { "Page &orientation:","Seiten Ausrichtung:" }, |
1124 | { "Use Default of Selected Style","Default des selektierten Stils" }, | 1124 | { "Use Default of Selected Style","Default des selektierten Stils" }, |
1125 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, | 1125 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, |
1126 | { "Portrait","Portrait" }, | 1126 | { "Portrait","Portrait" }, |
1127 | { "Landscape","Landschaft" }, | 1127 | { "Landscape","Landschaft" }, |
1128 | { "Print day","Drucke Tag" }, | 1128 | { "Print day","Drucke Tag" }, |
1129 | { "CalPrintDay_Base","CalPrintDay_Base" }, | 1129 | { "CalPrintDay_Base","CalPrintDay_Base" }, |
1130 | { "Date && Time Range","Datum && Zeitspanne" }, | 1130 | { "Date && Time Range","Datum && Zeitspanne" }, |
1131 | { "&End date:","&Enddatum:" }, | 1131 | { "&End date:","&Enddatum:" }, |
1132 | { "&Start date:","&Startdatum:" }, | 1132 | { "&Start date:","&Startdatum:" }, |
1133 | { "Start &time:","Startzeit:" }, | 1133 | { "Start &time:","Startzeit:" }, |
1134 | { "End ti&me:","Endzeit:" }, | 1134 | { "End ti&me:","Endzeit:" }, |
1135 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, | 1135 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, |
1136 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, | 1136 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, |
1137 | { "Alt+D","Alt+D" }, | 1137 | { "Alt+D","Alt+D" }, |
1138 | { "&Use colors","Nutze Farben" }, | 1138 | { "&Use colors","Nutze Farben" }, |
1139 | { "Alt+U","Alt+U" }, | 1139 | { "Alt+U","Alt+U" }, |
1140 | { "Print week","Drucke Woche" }, | 1140 | { "Print week","Drucke Woche" }, |
1141 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, | 1141 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, |
1142 | { "Use &colors","Nutze Farben" }, | 1142 | { "Use &colors","Nutze Farben" }, |
1143 | { "Type of View","Typ der Ansicht" }, | 1143 | { "Type of View","Typ der Ansicht" }, |
1144 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, | 1144 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, |
1145 | { "Alt+F","Alt+F" }, | 1145 | { "Alt+F","Alt+F" }, |
1146 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, | 1146 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, |
1147 | { "Alt+T","Alt+T" }, | 1147 | { "Alt+T","Alt+T" }, |
1148 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, | 1148 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, |
1149 | { "Print month","Drucke Monat" }, | 1149 | { "Print month","Drucke Monat" }, |
1150 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, | 1150 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, |
1151 | { "&Start month:","&Startmonat:" }, | 1151 | { "&Start month:","&Startmonat:" }, |
1152 | { "&End month:","&Endmonat:" }, | 1152 | { "&End month:","&Endmonat:" }, |
1153 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, | 1153 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, |
1154 | { "Print todos","Drucke Todos" }, | 1154 | { "Print todos","Drucke Todos" }, |
1155 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, | 1155 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, |
1156 | { "Include &description of the item","Inclusive Itembeschreibung" }, | 1156 | { "Include &description of the item","Inclusive Itembeschreibung" }, |
1157 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, | 1157 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, |
1158 | { "Include &priority of the item","Inclusive Priorität des Items" }, | 1158 | { "Include &priority of the item","Inclusive Priorität des Items" }, |
1159 | { "Items to Print","Zu druckende Items" }, | 1159 | { "Items to Print","Zu druckende Items" }, |
1160 | { "&From:","Von:" }, | 1160 | { "&From:","Von:" }, |
1161 | { "&To:","Bis:" }, | 1161 | { "&To:","Bis:" }, |
1162 | { "Print &all todo items","Drucke alle Todo Items" }, | 1162 | { "Print &all todo items","Drucke alle Todo Items" }, |
1163 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, | 1163 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, |
1164 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, | 1164 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, |
1165 | { "Todo List","Todo Liste" }, | 1165 | { "Todo List","Todo Liste" }, |
1166 | { "&Title:","&Titel:" }, | 1166 | { "&Title:","&Titel:" }, |
1167 | { "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, | 1167 | { "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, |
1168 | { "Todo list","Todo Liste" }, | 1168 | { "Todo list","Todo Liste" }, |
1169 | { "&Print...","Drucke..." }, | 1169 | { "&Print...","Drucke..." }, |
1170 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1170 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1171 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1171 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1172 | { "OK","OK" }, | 1172 | { "OK","OK" }, |
1173 | { "FilterEditor","FilterEditor" }, | 1173 | { "FilterEditor","FilterEditor" }, |
1174 | { "Include","Inclusive" }, | 1174 | { "Include","Inclusive" }, |
1175 | { "Exclude","Exclusive" }, | 1175 | { "Exclude","Exclusive" }, |
1176 | { "Edit Selection...","Editiere Auswahl" }, | 1176 | { "Edit Selection...","Editiere Auswahl" }, |
1177 | { "recurring events","wiederholende Termine" }, | 1177 | { "recurring events","wiederholende Termine" }, |
1178 | { "recurr. events","wiederh.Termine" }, | 1178 | { "recurr. events","wiederh.Termine" }, |
1179 | { "completed to-dos","erledigte Todos" }, | 1179 | { "completed to-dos","erledigte Todos" }, |
1180 | { "events","Termine" }, | 1180 | { "events","Termine" }, |
1181 | { "todos","Todos" }, | 1181 | { "todos","Todos" }, |
1182 | { "journals","Journale" }, | 1182 | { "journals","Journale" }, |
1183 | { "public","öffentl." }, | 1183 | { "public","öffentl." }, |
1184 | { "private","privat" }, | 1184 | { "private","privat" }, |
1185 | { "confidential","vertraul." }, | 1185 | { "confidential","vertraul." }, |
1186 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, | 1186 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, |
1187 | { "Yesterday","Gestern" }, | 1187 | { "Yesterday","Gestern" }, |
1188 | { "Day after tomorrow","Übermorgen" }, | 1188 | { "Day after tomorrow","Übermorgen" }, |
1189 | { "Tomorrow","Morgen" }, | 1189 | { "Tomorrow","Morgen" }, |
1190 | { "Day before yesterday","Vorgestern" }, | 1190 | { "Day before yesterday","Vorgestern" }, |
1191 | { "Size %1","Größe %1" }, | 1191 | { "Size %1","Größe %1" }, |
1192 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1192 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1193 | { " (%1 y.)"," (%1 J.)" }, | 1193 | { " (%1 y.)"," (%1 J.)" }, |
1194 | { "Allday:","Ganztägig:" }, | 1194 | { "Allday:","Ganztägig:" }, |
1195 | { "compl.todos","erled.Todos" }, | 1195 | { "compl.todos","erled.Todos" }, |
1196 | { "Day view","Tagesansicht" }, | 1196 | { "Day view","Tagesansicht" }, |
1197 | { "Next days","Nächste Tage" }, | 1197 | { "Next days","Nächste Tage" }, |
1198 | { "Next week","Nächste Woche" }, | 1198 | { "Next week","Nächste Woche" }, |
1199 | { "Next two weeks","Nächste zwei Wochen" }, | 1199 | { "Next two weeks","Nächste zwei Wochen" }, |
1200 | { "Next month","Nächster Monat" }, | 1200 | { "Next month","Nächster Monat" }, |
1201 | { "Journal view","Journal" }, | 1201 | { "Journal view","Journal" }, |
1202 | { "Display all opened","Zeige alle geöffnet" }, | 1202 | { "Display all opened","Zeige alle geöffnet" }, |
1203 | { "Display all closed","Zeige alle geschlossen" }, | 1203 | { "Display all closed","Zeige alle geschlossen" }, |
1204 | { "Display all flat","Zeige alle flach" }, | 1204 | { "Display all flat","Zeige alle flach" }, |
1205 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1205 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1206 | { "Default todo done color:","Standard Todo erledigt Farbe" }, | 1206 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1207 | { "Select week %1-%2","Wähle Woche %1-%2" }, | 1207 | { "Select week %1-%2","Wähle Woche %1-%2" }, |
1208 | { "Select Week","Wähle Woche" }, | 1208 | { "Select Week","Wähle Woche" }, |
1209 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, | 1209 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, |
1210 | { "Set Alarm!","Setze Alarm!" }, | 1210 | { "Set Alarm!","Setze Alarm!" }, |
1211 | { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, | 1211 | { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, |
1212 | { " and "," und " }, | 1212 | { " and "," und " }, |
1213 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, | 1213 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, |
1214 | { "Mail to selected","Mail an Ausgewählte" }, | 1214 | { "Mail to selected","Mail an Ausgewählte" }, |
1215 | { "Mail to all","Mail an Alle" }, | 1215 | { "Mail to all","Mail an Alle" }, |
1216 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, | 1216 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, |
1217 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, | 1217 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, |
1218 | { " on"," am" }, | 1218 | { " on"," am" }, |
1219 | { " completed on "," erledigt am " }, | 1219 | { " completed on "," erledigt am " }, |
1220 | { "Save as Event template","Speichere als Vorlage" }, | 1220 | { "Save as Event template","Speichere als Vorlage" }, |
1221 | { "Load Event template","Lade Termin Vorlage" }, | 1221 | { "Load Event template","Lade Termin Vorlage" }, |
1222 | { "Save as Journal template","Speichere als Journal Vorlage" }, | 1222 | { "Save as Journal template","Speichere als Journal Vorlage" }, |
1223 | { "Insert Journal template","Füge Journal Vorlage ein" }, | 1223 | { "Insert Journal template","Füge Journal Vorlage ein" }, |
1224 | { "Sub todos:<br>","Unter Todos:<br>" }, | 1224 | { "Sub todos:<br>","Unter Todos:<br>" }, |
1225 | { "Parent todo:<br>","Über Todo:<br>" }, | 1225 | { "Parent todo:<br>","Über Todo:<br>" }, |
1226 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, | 1226 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, |
1227 | { " completed"," erledigt" }, | 1227 | { " completed"," erledigt" }, |
1228 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.net --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.net --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, | 1228 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.net --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.net --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, |
1229 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, | 1229 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, |
1230 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, | 1230 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, |
1231 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, | 1231 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, |
1232 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, | 1232 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, |
1233 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, | 1233 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, |
1234 | { "Error","Fehler" }, | 1234 | { "Error","Fehler" }, |
1235 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, | 1235 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, |
1236 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, | 1236 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, |
1237 | { "Warning","Warnung" }, | 1237 | { "Warning","Warnung" }, |
1238 | { "Select week number","Wähle Wochen Nummer" }, | 1238 | { "Select week number","Wähle Wochen Nummer" }, |
1239 | { "Februar","Februar" }, | 1239 | { "Februar","Februar" }, |
1240 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, | 1240 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, |
1241 | { "W","W" }, | 1241 | { "W","W" }, |
1242 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, | 1242 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, |
1243 | { "T: %1","T: %1" }, | 1243 | { "T: %1","T: %1" }, |
1244 | { "Start: ","Start: " }, | 1244 | { "Start: ","Start: " }, |
1245 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, | 1245 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, |
1246 | { "Password for remote access:","Passwort für fernen Zugriff:" }, | 1246 | { "Password for remote access:","Passwort für fernen Zugriff:" }, |
1247 | { "Remote IP address:","Ferne IP Adresse:" }, | 1247 | { "Remote IP address:","Ferne IP Adresse:" }, |
1248 | { "Remote port number:","Ferne Port Nummer:" }, | 1248 | { "Remote port number:","Ferne Port Nummer:" }, |
1249 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, | 1249 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, |
1250 | { "Remote from: ","Fern von: " }, | 1250 | { "Remote from: ","Fern von: " }, |
1251 | { "Local from: ","Lokal von: " }, | 1251 | { "Local from: ","Lokal von: " }, |
1252 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, | 1252 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, |
1253 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, | 1253 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, |
1254 | { "Write back","Schreibe zurück" }, | 1254 | { "Write back","Schreibe zurück" }, |
1255 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, | 1255 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, |
1256 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, | 1256 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, |
1257 | { "Received sync request","Sync Anfrage erhalten" }, | 1257 | { "Received sync request","Sync Anfrage erhalten" }, |
1258 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, | 1258 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, |
1259 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, | 1259 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, |
1260 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, | 1260 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, |
1261 | { "Sending file...","Sende Datei..." }, | 1261 | { "Sending file...","Sende Datei..." }, |
1262 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, | 1262 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, |
1263 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 1263 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
1264 | { "Received %1 bytes","%1 Bytes erhalten" }, | 1264 | { "Received %1 bytes","%1 Bytes erhalten" }, |
1265 | { "Writing file to disk...","Speichere Datei..." }, | 1265 | { "Writing file to disk...","Speichere Datei..." }, |
1266 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 1266 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
1267 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 1267 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
1268 | { "Synchronize!","Synchronisiere!" }, | 1268 | { "Synchronize!","Synchronisiere!" }, |
1269 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 1269 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
1270 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 1270 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
1271 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, | 1271 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, |
1272 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, | 1272 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, |
1273 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, | 1273 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, |
1274 | { "List week view","Listenwochenansicht" }, | 1274 | { "List week view","Listenwochenansicht" }, |
1275 | { "List week","Listenwochenansicht" }, | 1275 | { "List week","Listenwochenansicht" }, |
1276 | { "Next Week","Nächste Woche" }, | 1276 | { "Next Week","Nächste Woche" }, |
1277 | { "Previous Week","Vorherige Woche" }, | 1277 | { "Previous Week","Vorherige Woche" }, |
1278 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, | 1278 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, |
1279 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, | 1279 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, |
1280 | { "Details","Details" }, | 1280 | { "Details","Details" }, |
1281 | { "Created time","Erstellt Zeit" }, | 1281 | { "Created time","Erstellt Zeit" }, |
1282 | { "Last modified time","Geändert Zeit" }, | 1282 | { "Last modified time","Geändert Zeit" }, |
1283 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | 1283 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, |
1284 | { "View Options","Anzeige Optionen" }, | 1284 | { "View Options","Anzeige Optionen" }, |
1285 | { "<b>Created: ","<b>Erstellt am: " }, | 1285 | { "<b>Created: ","<b>Erstellt am: " }, |
1286 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | 1286 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, |
1287 | { "Journal: ","Journal: " }, | 1287 | { "Journal: ","Journal: " }, |
1288 | { "yearly","jährlich" }, | 1288 | { "yearly","jährlich" }, |
1289 | { "(%1) ","%1-" }, | 1289 | { "(%1) ","%1-" }, |
1290 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, | 1290 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, |
1291 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, | 1291 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, |
1292 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, | 1292 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, |
1293 | { "Summary/Loc.","Titel/Ort" }, | 1293 | { "Summary/Loc.","Titel/Ort" }, |
1294 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, | 1294 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, |
1295 | { "Week Number","Wochennummer" }, | 1295 | { "Week Number","Wochennummer" }, |
1296 | { "Import","Importiere" }, | 1296 | { "Import","Importiere" }, |
1297 | { "Export","Exportiere" }, | 1297 | { "Export","Exportiere" }, |
1298 | { "Beam","Beame" }, | 1298 | { "Beam","Beame" }, |
1299 | { "Export selected","Exportiere Selektierte" }, | ||
1300 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, | ||
1301 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, | ||
1302 | { "Journal/Details...","Journale/Details..." }, | ||
1299 | { "","" }, | 1303 | { "","" }, |
1300 | { "","" }, | 1304 | { "","" }, |
1301 | { "","" }, | 1305 | { "","" }, |
1302 | { "","" }, | 1306 | { "","" }, |
1303 | { "","" }, | 1307 | { "","" }, |
1304 | { "","" }, | 1308 | { "","" }, |
1305 | { "","" }, | 1309 | { "","" }, |
1306 | |||
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp index 49049f6..2c0f2d8 100644 --- a/kmicromail/editaccounts.cpp +++ b/kmicromail/editaccounts.cpp | |||
@@ -1,697 +1,703 @@ | |||
1 | 1 | ||
2 | #include <qdialog.h> | 2 | #include <qdialog.h> |
3 | #include "kapplication.h" | 3 | #include "kapplication.h" |
4 | #include "defines.h" | 4 | #include "defines.h" |
5 | #include "editaccounts.h" | 5 | #include "editaccounts.h" |
6 | /* OPIE */ | 6 | /* OPIE */ |
7 | #include <qpe/qpeapplication.h> | 7 | #include <qpe/qpeapplication.h> |
8 | 8 | ||
9 | /* QT */ | 9 | /* QT */ |
10 | #include <qstringlist.h> | 10 | #include <qstringlist.h> |
11 | 11 | ||
12 | #include <qcombobox.h> | 12 | #include <qcombobox.h> |
13 | #include <qcheckbox.h> | 13 | #include <qcheckbox.h> |
14 | #include <qmessagebox.h> | 14 | #include <qmessagebox.h> |
15 | #include <qpushbutton.h> | 15 | #include <qpushbutton.h> |
16 | #include <qlineedit.h> | 16 | #include <qlineedit.h> |
17 | #include <qlabel.h> | 17 | #include <qlabel.h> |
18 | #include <qtabwidget.h> | 18 | #include <qtabwidget.h> |
19 | #include <qlistview.h> | 19 | #include <qlistview.h> |
20 | #include <qspinbox.h> | 20 | #include <qspinbox.h> |
21 | #include <klocale.h> | 21 | #include <klocale.h> |
22 | #include <kfiledialog.h> | 22 | #include <kfiledialog.h> |
23 | 23 | ||
24 | #include <libmailwrapper/nntpwrapper.h> | 24 | #include <libmailwrapper/nntpwrapper.h> |
25 | 25 | ||
26 | using namespace Opie::Core; | 26 | using namespace Opie::Core; |
27 | 27 | ||
28 | AccountListItem::AccountListItem( QListView *parent, Account *a) | 28 | AccountListItem::AccountListItem( QListView *parent, Account *a) |
29 | : QListViewItem( parent ) | 29 | : QListViewItem( parent ) |
30 | { | 30 | { |
31 | account = a; | 31 | account = a; |
32 | setText( 0, account->getAccountName() ); | 32 | setText( 0, account->getAccountName() ); |
33 | QString ttext = ""; | 33 | QString ttext = ""; |
34 | switch (account->getType()) { | 34 | switch (account->getType()) { |
35 | case MAILLIB::A_NNTP: | 35 | case MAILLIB::A_NNTP: |
36 | ttext="NNTP"; | 36 | ttext="NNTP"; |
37 | break; | 37 | break; |
38 | case MAILLIB::A_POP3: | 38 | case MAILLIB::A_POP3: |
39 | ttext = "POP3"; | 39 | ttext = "POP3"; |
40 | break; | 40 | break; |
41 | case MAILLIB::A_IMAP: | 41 | case MAILLIB::A_IMAP: |
42 | ttext = "IMAP"; | 42 | ttext = "IMAP"; |
43 | break; | 43 | break; |
44 | case MAILLIB::A_SMTP: | 44 | case MAILLIB::A_SMTP: |
45 | ttext = "SMTP"; | 45 | ttext = "SMTP"; |
46 | break; | 46 | break; |
47 | default: | 47 | default: |
48 | ttext = "UNKNOWN"; | 48 | ttext = "UNKNOWN"; |
49 | break; | 49 | break; |
50 | } | 50 | } |
51 | setText( 1, ttext); | 51 | setText( 1, ttext); |
52 | } | 52 | } |
53 | 53 | ||
54 | EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) | 54 | EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) |
55 | : EditAccountsUI( parent, name, modal, flags ) | 55 | : EditAccountsUI( parent, name, modal, flags ) |
56 | { | 56 | { |
57 | settings = s; | 57 | settings = s; |
58 | 58 | ||
59 | mailList->addColumn( i18n( "Account" ) ); | 59 | mailList->addColumn( i18n( "Account" ) ); |
60 | mailList->addColumn( i18n( "Type" ) ); | 60 | mailList->addColumn( i18n( "Type" ) ); |
61 | 61 | ||
62 | newsList->addColumn( i18n( "Account" ) ); | 62 | newsList->addColumn( i18n( "Account" ) ); |
63 | 63 | ||
64 | connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) ); | 64 | connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) ); |
65 | connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) ); | 65 | connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) ); |
66 | connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) ); | 66 | connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) ); |
67 | connect( newNews, SIGNAL( clicked() ), SLOT( slotNewNews() ) ); | 67 | connect( newNews, SIGNAL( clicked() ), SLOT( slotNewNews() ) ); |
68 | connect( editNews, SIGNAL( clicked() ), SLOT( slotEditNews() ) ); | 68 | connect( editNews, SIGNAL( clicked() ), SLOT( slotEditNews() ) ); |
69 | connect( deleteNews, SIGNAL( clicked() ), SLOT( slotDeleteNews() ) ); | 69 | connect( deleteNews, SIGNAL( clicked() ), SLOT( slotDeleteNews() ) ); |
70 | 70 | ||
71 | slotFillLists(); | 71 | slotFillLists(); |
72 | } | 72 | } |
73 | 73 | ||
74 | void EditAccounts::slotFillLists() | 74 | void EditAccounts::slotFillLists() |
75 | { | 75 | { |
76 | mailList->clear(); | 76 | mailList->clear(); |
77 | newsList->clear(); | 77 | newsList->clear(); |
78 | 78 | ||
79 | QList<Account> accounts = settings->getAccounts(); | 79 | QList<Account> accounts = settings->getAccounts(); |
80 | Account *it; | 80 | Account *it; |
81 | for ( it = accounts.first(); it; it = accounts.next() ) | 81 | for ( it = accounts.first(); it; it = accounts.next() ) |
82 | { | 82 | { |
83 | if ( it->getType()==MAILLIB::A_NNTP ) | 83 | if ( it->getType()==MAILLIB::A_NNTP ) |
84 | { | 84 | { |
85 | (void) new AccountListItem( newsList, it ); | 85 | (void) new AccountListItem( newsList, it ); |
86 | } | 86 | } |
87 | else | 87 | else |
88 | { | 88 | { |
89 | (void) new AccountListItem( mailList, it ); | 89 | (void) new AccountListItem( mailList, it ); |
90 | } | 90 | } |
91 | } | 91 | } |
92 | } | 92 | } |
93 | 93 | ||
94 | void EditAccounts::slotNewMail() | 94 | void EditAccounts::slotNewMail() |
95 | { | 95 | { |
96 | QString *selection = new QString(); | 96 | QString *selection = new QString(); |
97 | SelectMailType selType( selection, this, 0, true ); | 97 | SelectMailType selType( selection, this, 0, true ); |
98 | selType.show(); | 98 | selType.show(); |
99 | if ( QDialog::Accepted == selType.exec() ) | 99 | if ( QDialog::Accepted == selType.exec() ) |
100 | { | 100 | { |
101 | slotNewAccount( *selection ); | 101 | slotNewAccount( *selection ); |
102 | } | 102 | } |
103 | } | 103 | } |
104 | 104 | ||
105 | void EditAccounts::slotNewAccount( const QString &type ) | 105 | void EditAccounts::slotNewAccount( const QString &type ) |
106 | { | 106 | { |
107 | if ( type.compare( i18n("IMAP") ) == 0 ) | 107 | if ( type.compare( i18n("IMAP") ) == 0 ) |
108 | { | 108 | { |
109 | IMAPaccount *account = new IMAPaccount(); | 109 | IMAPaccount *account = new IMAPaccount(); |
110 | IMAPconfig imap( account, this, 0, true ); | 110 | IMAPconfig imap( account, this, 0, true ); |
111 | 111 | ||
112 | #ifndef DESKTOP_VERSION | 112 | #ifndef DESKTOP_VERSION |
113 | imap.showMaximized(); | 113 | imap.showMaximized(); |
114 | #endif | 114 | #endif |
115 | if ( QDialog::Accepted == imap.exec() ) | 115 | if ( QDialog::Accepted == imap.exec() ) |
116 | { | 116 | { |
117 | settings->addAccount( account ); | 117 | settings->addAccount( account ); |
118 | account->save(); | 118 | account->save(); |
119 | slotFillLists(); | 119 | slotFillLists(); |
120 | } | 120 | } |
121 | else | 121 | else |
122 | { | 122 | { |
123 | account->remove(); | 123 | account->remove(); |
124 | } | 124 | } |
125 | } | 125 | } |
126 | else if ( type.compare( i18n("POP3") ) == 0 ) | 126 | else if ( type.compare( i18n("POP3") ) == 0 ) |
127 | { | 127 | { |
128 | POP3account *account = new POP3account(); | 128 | POP3account *account = new POP3account(); |
129 | POP3config pop3( account, this, 0, true, WStyle_ContextHelp ); | 129 | POP3config pop3( account, this, 0, true, WStyle_ContextHelp ); |
130 | if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) | 130 | if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) |
131 | { | 131 | { |
132 | settings->addAccount( account ); | 132 | settings->addAccount( account ); |
133 | account->save(); | 133 | account->save(); |
134 | slotFillLists(); | 134 | slotFillLists(); |
135 | } | 135 | } |
136 | else | 136 | else |
137 | { | 137 | { |
138 | account->remove(); | 138 | account->remove(); |
139 | } | 139 | } |
140 | } | 140 | } |
141 | else if ( type.compare( i18n("SMTP") ) == 0 ) | 141 | else if ( type.compare( i18n("SMTP") ) == 0 ) |
142 | { | 142 | { |
143 | SMTPaccount *account = new SMTPaccount(); | 143 | SMTPaccount *account = new SMTPaccount(); |
144 | SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp ); | 144 | SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp ); |
145 | if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) | 145 | if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) |
146 | { | 146 | { |
147 | settings->addAccount( account ); | 147 | settings->addAccount( account ); |
148 | account->save(); | 148 | account->save(); |
149 | slotFillLists(); | 149 | slotFillLists(); |
150 | 150 | ||
151 | } | 151 | } |
152 | else | 152 | else |
153 | { | 153 | { |
154 | account->remove(); | 154 | account->remove(); |
155 | } | 155 | } |
156 | } | 156 | } |
157 | else if ( type.compare( i18n("NNTP") ) == 0 ) | 157 | else if ( type.compare( i18n("NNTP") ) == 0 ) |
158 | { | 158 | { |
159 | NNTPaccount *account = new NNTPaccount(); | 159 | NNTPaccount *account = new NNTPaccount(); |
160 | NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp ); | 160 | NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp ); |
161 | if ( QDialog::Accepted == KApplication::execDialog( &nntp ) ) | 161 | if ( QDialog::Accepted == KApplication::execDialog( &nntp ) ) |
162 | { | 162 | { |
163 | settings->addAccount( account ); | 163 | settings->addAccount( account ); |
164 | account->save(); | 164 | account->save(); |
165 | slotFillLists(); | 165 | slotFillLists(); |
166 | } | 166 | } |
167 | else | 167 | else |
168 | { | 168 | { |
169 | account->remove(); | 169 | account->remove(); |
170 | } | 170 | } |
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
174 | void EditAccounts::slotEditAccount( Account *account ) | 174 | void EditAccounts::slotEditAccount( Account *account ) |
175 | { | 175 | { |
176 | if ( account->getType() == MAILLIB::A_IMAP ) | 176 | if ( account->getType() == MAILLIB::A_IMAP ) |
177 | { | 177 | { |
178 | IMAPaccount *imapAcc = static_cast<IMAPaccount *>(account); | 178 | IMAPaccount *imapAcc = static_cast<IMAPaccount *>(account); |
179 | IMAPconfig imap( imapAcc, this, 0, true, WStyle_ContextHelp ); | 179 | IMAPconfig imap( imapAcc, this, 0, true, WStyle_ContextHelp ); |
180 | if ( QDialog::Accepted == KApplication::execDialog( &imap ) ) | 180 | if ( QDialog::Accepted == KApplication::execDialog( &imap ) ) |
181 | { | 181 | { |
182 | slotFillLists(); | 182 | slotFillLists(); |
183 | } | 183 | } |
184 | } | 184 | } |
185 | else if ( account->getType()==MAILLIB::A_POP3 ) | 185 | else if ( account->getType()==MAILLIB::A_POP3 ) |
186 | { | 186 | { |
187 | POP3account *pop3Acc = static_cast<POP3account *>(account); | 187 | POP3account *pop3Acc = static_cast<POP3account *>(account); |
188 | POP3config pop3( pop3Acc, this, 0, true, WStyle_ContextHelp ); | 188 | POP3config pop3( pop3Acc, this, 0, true, WStyle_ContextHelp ); |
189 | if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) | 189 | if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) |
190 | { | 190 | { |
191 | slotFillLists(); | 191 | slotFillLists(); |
192 | } | 192 | } |
193 | } | 193 | } |
194 | else if ( account->getType()==MAILLIB::A_SMTP ) | 194 | else if ( account->getType()==MAILLIB::A_SMTP ) |
195 | { | 195 | { |
196 | SMTPaccount *smtpAcc = static_cast<SMTPaccount *>(account); | 196 | SMTPaccount *smtpAcc = static_cast<SMTPaccount *>(account); |
197 | SMTPconfig smtp( smtpAcc, this, 0, true, WStyle_ContextHelp ); | 197 | SMTPconfig smtp( smtpAcc, this, 0, true, WStyle_ContextHelp ); |
198 | if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) | 198 | if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) |
199 | { | 199 | { |
200 | slotFillLists(); | 200 | slotFillLists(); |
201 | } | 201 | } |
202 | } | 202 | } |
203 | else if ( account->getType()==MAILLIB::A_NNTP) | 203 | else if ( account->getType()==MAILLIB::A_NNTP) |
204 | { | 204 | { |
205 | NNTPaccount *nntpAcc = static_cast<NNTPaccount *>(account); | 205 | NNTPaccount *nntpAcc = static_cast<NNTPaccount *>(account); |
206 | NNTPconfig nntp( nntpAcc, this, 0, true, WStyle_ContextHelp ); | 206 | NNTPconfig nntp( nntpAcc, this, 0, true, WStyle_ContextHelp ); |
207 | if ( QDialog::Accepted == KApplication::execDialog( &nntp ) ) | 207 | if ( QDialog::Accepted == KApplication::execDialog( &nntp ) ) |
208 | { | 208 | { |
209 | slotFillLists(); | 209 | slotFillLists(); |
210 | } | 210 | } |
211 | } | 211 | } |
212 | } | 212 | } |
213 | 213 | ||
214 | void EditAccounts::slotDeleteAccount( Account *account ) | 214 | void EditAccounts::slotDeleteAccount( Account *account ) |
215 | { | 215 | { |
216 | if ( QMessageBox::information( this, i18n( "Question" ), | 216 | if ( QMessageBox::information( this, i18n( "Question" ), |
217 | i18n( "<p>Do you really want to delete the selected Account?</p>" ), | 217 | i18n( "<p>Do you really want to delete the selected Account?</p>" ), |
218 | i18n( "Yes" ), i18n( "No" ) ) == 0 ) | 218 | i18n( "Yes" ), i18n( "No" ) ) == 0 ) |
219 | { | 219 | { |
220 | settings->delAccount( account ); | 220 | settings->delAccount( account ); |
221 | slotFillLists(); | 221 | slotFillLists(); |
222 | } | 222 | } |
223 | } | 223 | } |
224 | 224 | ||
225 | void EditAccounts::slotEditMail() | 225 | void EditAccounts::slotEditMail() |
226 | { | 226 | { |
227 | if ( !mailList->currentItem() ) | 227 | if ( !mailList->currentItem() ) |
228 | { | 228 | { |
229 | QMessageBox::information( this, i18n( "Error" ), | 229 | QMessageBox::information( this, i18n( "Error" ), |
230 | i18n( "<p>Please select an account.</p>" ), | 230 | i18n( "<p>Please select an account.</p>" ), |
231 | i18n( "Ok" ) ); | 231 | i18n( "Ok" ) ); |
232 | return; | 232 | return; |
233 | } | 233 | } |
234 | 234 | ||
235 | Account *a = ((AccountListItem *) mailList->currentItem())->getAccount(); | 235 | Account *a = ((AccountListItem *) mailList->currentItem())->getAccount(); |
236 | slotEditAccount( a ); | 236 | slotEditAccount( a ); |
237 | } | 237 | } |
238 | 238 | ||
239 | void EditAccounts::slotDeleteMail() | 239 | void EditAccounts::slotDeleteMail() |
240 | { | 240 | { |
241 | if ( !mailList->currentItem() ) | 241 | if ( !mailList->currentItem() ) |
242 | { | 242 | { |
243 | QMessageBox::information( this, i18n( "Error" ), | 243 | QMessageBox::information( this, i18n( "Error" ), |
244 | i18n( "<p>Please select an account.</p>" ), | 244 | i18n( "<p>Please select an account.</p>" ), |
245 | i18n( "Ok" ) ); | 245 | i18n( "Ok" ) ); |
246 | return; | 246 | return; |
247 | } | 247 | } |
248 | 248 | ||
249 | Account *a = ((AccountListItem *) mailList->currentItem())->getAccount(); | 249 | Account *a = ((AccountListItem *) mailList->currentItem())->getAccount(); |
250 | slotDeleteAccount( a ); | 250 | slotDeleteAccount( a ); |
251 | } | 251 | } |
252 | 252 | ||
253 | void EditAccounts::slotNewNews() | 253 | void EditAccounts::slotNewNews() |
254 | { | 254 | { |
255 | slotNewAccount( "NNTP" ); | 255 | slotNewAccount( "NNTP" ); |
256 | } | 256 | } |
257 | 257 | ||
258 | void EditAccounts::slotEditNews() | 258 | void EditAccounts::slotEditNews() |
259 | { | 259 | { |
260 | if ( !newsList->currentItem() ) | 260 | if ( !newsList->currentItem() ) |
261 | { | 261 | { |
262 | QMessageBox::information( this, i18n( "Error" ), | 262 | QMessageBox::information( this, i18n( "Error" ), |
263 | i18n( "<p>Please select an account.</p>" ), | 263 | i18n( "<p>Please select an account.</p>" ), |
264 | i18n( "Ok" ) ); | 264 | i18n( "Ok" ) ); |
265 | return; | 265 | return; |
266 | } | 266 | } |
267 | 267 | ||
268 | Account *a = ((AccountListItem *) newsList->currentItem())->getAccount(); | 268 | Account *a = ((AccountListItem *) newsList->currentItem())->getAccount(); |
269 | slotEditAccount( a ); | 269 | slotEditAccount( a ); |
270 | } | 270 | } |
271 | 271 | ||
272 | void EditAccounts::slotDeleteNews() | 272 | void EditAccounts::slotDeleteNews() |
273 | { | 273 | { |
274 | if ( !newsList->currentItem() ) | 274 | if ( !newsList->currentItem() ) |
275 | { | 275 | { |
276 | QMessageBox::information( this, i18n( "Error" ), | 276 | QMessageBox::information( this, i18n( "Error" ), |
277 | i18n( "<p>Please select an account.</p>" ), | 277 | i18n( "<p>Please select an account.</p>" ), |
278 | i18n( "Ok" ) ); | 278 | i18n( "Ok" ) ); |
279 | return; | 279 | return; |
280 | } | 280 | } |
281 | 281 | ||
282 | Account *a = ((AccountListItem *) newsList->currentItem())->getAccount(); | 282 | Account *a = ((AccountListItem *) newsList->currentItem())->getAccount(); |
283 | slotDeleteAccount( a ); | 283 | slotDeleteAccount( a ); |
284 | } | 284 | } |
285 | 285 | ||
286 | void EditAccounts::slotAdjustColumns() | 286 | void EditAccounts::slotAdjustColumns() |
287 | { | 287 | { |
288 | int currPage = configTab->currentPageIndex(); | 288 | int currPage = configTab->currentPageIndex(); |
289 | 289 | ||
290 | configTab->showPage( mailTab ); | 290 | configTab->showPage( mailTab ); |
291 | mailList->setColumnWidth( 0, mailList->visibleWidth() - 50 ); | 291 | mailList->setColumnWidth( 0, mailList->visibleWidth() - 50 ); |
292 | mailList->setColumnWidth( 1, 50 ); | 292 | mailList->setColumnWidth( 1, 50 ); |
293 | 293 | ||
294 | configTab->showPage( newsTab ); | 294 | configTab->showPage( newsTab ); |
295 | newsList->setColumnWidth( 0, newsList->visibleWidth() ); | 295 | newsList->setColumnWidth( 0, newsList->visibleWidth() ); |
296 | 296 | ||
297 | configTab->setCurrentPage( currPage ); | 297 | configTab->setCurrentPage( currPage ); |
298 | } | 298 | } |
299 | 299 | ||
300 | void EditAccounts::accept() | 300 | void EditAccounts::accept() |
301 | { | 301 | { |
302 | settings->saveAccounts(); | 302 | settings->saveAccounts(); |
303 | 303 | ||
304 | QDialog::accept(); | 304 | QDialog::accept(); |
305 | } | 305 | } |
306 | 306 | ||
307 | /** | 307 | /** |
308 | * SelectMailType | 308 | * SelectMailType |
309 | */ | 309 | */ |
310 | 310 | ||
311 | SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, WFlags flags ) | 311 | SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, WFlags flags ) |
312 | : SelectMailTypeUI( parent, name, modal, flags ) | 312 | : SelectMailTypeUI( parent, name, modal, flags ) |
313 | { | 313 | { |
314 | selected = selection; | 314 | selected = selection; |
315 | selected->replace( 0, selected->length(), typeBox->currentText() ); | 315 | selected->replace( 0, selected->length(), typeBox->currentText() ); |
316 | connect( typeBox, SIGNAL( activated(const QString&) ), SLOT( slotSelection(const QString&) ) ); | 316 | connect( typeBox, SIGNAL( activated(const QString&) ), SLOT( slotSelection(const QString&) ) ); |
317 | } | 317 | } |
318 | 318 | ||
319 | void SelectMailType::slotSelection( const QString &sel ) | 319 | void SelectMailType::slotSelection( const QString &sel ) |
320 | { | 320 | { |
321 | selected->replace( 0, selected->length(), sel ); | 321 | selected->replace( 0, selected->length(), sel ); |
322 | } | 322 | } |
323 | 323 | ||
324 | /** | 324 | /** |
325 | * IMAPconfig | 325 | * IMAPconfig |
326 | */ | 326 | */ |
327 | 327 | ||
328 | IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 328 | IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
329 | : IMAPconfigUI( parent, name, modal, flags ) | 329 | : IMAPconfigUI( parent, name, modal, flags ) |
330 | { | 330 | { |
331 | data = account; | 331 | data = account; |
332 | 332 | ||
333 | //fillValues(); | 333 | //fillValues(); |
334 | 334 | ||
335 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); | 335 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); |
336 | ComboBox1->insertItem( "Only if available", 0 ); | 336 | ComboBox1->insertItem( "Only if available", 0 ); |
337 | ComboBox1->insertItem( "Always, Negotiated", 1 ); | 337 | ComboBox1->insertItem( "Always, Negotiated", 1 ); |
338 | ComboBox1->insertItem( "Connect on secure port", 2 ); | 338 | ComboBox1->insertItem( "Connect on secure port", 2 ); |
339 | ComboBox1->insertItem( "Run command instead", 3 ); | 339 | ComboBox1->insertItem( "Run command instead", 3 ); |
340 | CommandEdit->hide(); | 340 | CommandEdit->hide(); |
341 | fillValues(); | 341 | fillValues(); |
342 | // ComboBox1->setCurrentItem( data->ConnectionType() ); | 342 | // ComboBox1->setCurrentItem( data->ConnectionType() ); |
343 | } | 343 | } |
344 | 344 | ||
345 | void IMAPconfig::slotConnectionToggle( int index ) | 345 | void IMAPconfig::slotConnectionToggle( int index ) |
346 | { | 346 | { |
347 | if ( index == 2 ) | 347 | if ( index == 2 ) |
348 | { | 348 | { |
349 | portLine->setText( IMAP_SSL_PORT ); | 349 | portLine->setText( IMAP_SSL_PORT ); |
350 | CommandEdit->hide(); | ||
350 | } | 351 | } |
351 | else if ( index == 3 ) | 352 | else if ( index == 3 ) |
352 | { | 353 | { |
353 | portLine->setText( IMAP_PORT ); | 354 | portLine->setText( IMAP_PORT ); |
354 | CommandEdit->show(); | 355 | CommandEdit->show(); |
355 | } | 356 | } |
356 | else | 357 | else |
357 | { | 358 | { |
358 | portLine->setText( IMAP_PORT ); | 359 | portLine->setText( IMAP_PORT ); |
360 | CommandEdit->hide(); | ||
359 | } | 361 | } |
360 | } | 362 | } |
361 | 363 | ||
362 | void IMAPconfig::fillValues() | 364 | void IMAPconfig::fillValues() |
363 | { | 365 | { |
364 | accountLine->setText( data->getAccountName() ); | 366 | accountLine->setText( data->getAccountName() ); |
365 | serverLine->setText( data->getServer() ); | 367 | serverLine->setText( data->getServer() ); |
366 | portLine->setText( data->getPort() ); | 368 | portLine->setText( data->getPort() ); |
367 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 369 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
368 | userLine->setText( data->getUser() ); | 370 | userLine->setText( data->getUser() ); |
369 | passLine->setText( data->getPassword() ); | 371 | passLine->setText( data->getPassword() ); |
370 | prefixLine->setText(data->getPrefix()); | 372 | prefixLine->setText(data->getPrefix()); |
371 | localFolder->setText( data->getLocalFolder() ); | 373 | localFolder->setText( data->getLocalFolder() ); |
372 | int max = data->getMaxMailSize() ; | 374 | int max = data->getMaxMailSize() ; |
373 | if ( max ) { | 375 | if ( max ) { |
374 | CheckBoxDown->setChecked( true ); | 376 | CheckBoxDown->setChecked( true ); |
375 | SpinBoxDown->setValue ( max ); | 377 | SpinBoxDown->setValue ( max ); |
376 | } else { | 378 | } else { |
377 | CheckBoxDown->setChecked( false ); | 379 | CheckBoxDown->setChecked( false ); |
378 | SpinBoxDown->setValue ( 5 ); | 380 | SpinBoxDown->setValue ( 5 ); |
379 | } | 381 | } |
380 | CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() ); | 382 | CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() ); |
381 | } | 383 | } |
382 | 384 | ||
383 | void IMAPconfig::accept() | 385 | void IMAPconfig::accept() |
384 | { | 386 | { |
385 | if ( localFolder->text().contains("/") ||localFolder->text().contains("\\") ) { | 387 | if ( localFolder->text().contains("/") ||localFolder->text().contains("\\") ) { |
386 | QMessageBox::information( this, i18n( "Error" ), | 388 | QMessageBox::information( this, i18n( "Error" ), |
387 | i18n( "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically." ), | 389 | i18n( "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically." ), |
388 | i18n( "Ok" ) ); | 390 | i18n( "Ok" ) ); |
389 | return; | 391 | return; |
390 | } | 392 | } |
391 | data->setAccountName( accountLine->text() ); | 393 | data->setAccountName( accountLine->text() ); |
392 | data->setServer( serverLine->text() ); | 394 | data->setServer( serverLine->text() ); |
393 | data->setPort( portLine->text() ); | 395 | data->setPort( portLine->text() ); |
394 | data->setConnectionType( ComboBox1->currentItem() ); | 396 | data->setConnectionType( ComboBox1->currentItem() ); |
395 | data->setUser( userLine->text() ); | 397 | data->setUser( userLine->text() ); |
396 | data->setPassword( passLine->text() ); | 398 | data->setPassword( passLine->text() ); |
397 | data->setPrefix(prefixLine->text()); | 399 | data->setPrefix(prefixLine->text()); |
398 | data->setLocalFolder( localFolder->text() ); | 400 | data->setLocalFolder( localFolder->text() ); |
399 | data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; | 401 | data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; |
400 | data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); | 402 | data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); |
401 | 403 | ||
402 | QDialog::accept(); | 404 | QDialog::accept(); |
403 | } | 405 | } |
404 | 406 | ||
405 | /** | 407 | /** |
406 | * POP3config | 408 | * POP3config |
407 | */ | 409 | */ |
408 | 410 | ||
409 | POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 411 | POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
410 | : POP3configUI( parent, name, modal, flags ) | 412 | : POP3configUI( parent, name, modal, flags ) |
411 | { | 413 | { |
412 | data = account; | 414 | data = account; |
413 | //fillValues(); | 415 | //fillValues(); |
414 | 416 | ||
415 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); | 417 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); |
416 | ComboBox1->insertItem( "Only if available", 0 ); | 418 | ComboBox1->insertItem( "Only if available", 0 ); |
417 | ComboBox1->insertItem( "Always, Negotiated", 1 ); | 419 | ComboBox1->insertItem( "Always, Negotiated", 1 ); |
418 | ComboBox1->insertItem( "Connect on secure port", 2 ); | 420 | ComboBox1->insertItem( "Connect on secure port", 2 ); |
419 | ComboBox1->insertItem( "Run command instead", 3 ); | 421 | ComboBox1->insertItem( "Run command instead", 3 ); |
420 | CommandEdit->hide(); | 422 | CommandEdit->hide(); |
421 | fillValues(); | 423 | fillValues(); |
422 | //ComboBox1->setCurrentItem( data->ConnectionType() ); | 424 | //ComboBox1->setCurrentItem( data->ConnectionType() ); |
423 | } | 425 | } |
424 | 426 | ||
425 | void POP3config::slotConnectionToggle( int index ) | 427 | void POP3config::slotConnectionToggle( int index ) |
426 | { | 428 | { |
427 | // 2 is ssl connection | 429 | // 2 is ssl connection |
428 | if ( index == 2 ) | 430 | if ( index == 2 ) |
429 | { | 431 | { |
430 | portLine->setText( POP3_SSL_PORT ); | 432 | portLine->setText( POP3_SSL_PORT ); |
433 | CommandEdit->hide(); | ||
431 | } | 434 | } |
432 | else if ( index == 3 ) | 435 | else if ( index == 3 ) |
433 | { | 436 | { |
434 | portLine->setText( POP3_PORT ); | 437 | portLine->setText( POP3_PORT ); |
435 | CommandEdit->show(); | 438 | CommandEdit->show(); |
436 | } | 439 | } |
437 | else | 440 | else |
438 | { | 441 | { |
439 | portLine->setText( POP3_PORT ); | 442 | portLine->setText( POP3_PORT ); |
443 | CommandEdit->hide(); | ||
440 | } | 444 | } |
441 | } | 445 | } |
442 | 446 | ||
443 | void POP3config::fillValues() | 447 | void POP3config::fillValues() |
444 | { | 448 | { |
445 | accountLine->setText( data->getAccountName() ); | 449 | accountLine->setText( data->getAccountName() ); |
446 | serverLine->setText( data->getServer() ); | 450 | serverLine->setText( data->getServer() ); |
447 | portLine->setText( data->getPort() ); | 451 | portLine->setText( data->getPort() ); |
448 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 452 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
449 | userLine->setText( data->getUser() ); | 453 | userLine->setText( data->getUser() ); |
450 | passLine->setText( data->getPassword() ); | 454 | passLine->setText( data->getPassword() ); |
451 | localFolder->setText( data->getLocalFolder() ); | 455 | localFolder->setText( data->getLocalFolder() ); |
452 | int max = data->getMaxMailSize() ; | 456 | int max = data->getMaxMailSize() ; |
453 | if ( max ) { | 457 | if ( max ) { |
454 | CheckBoxDown->setChecked( true ); | 458 | CheckBoxDown->setChecked( true ); |
455 | SpinBoxDown->setValue ( max ); | 459 | SpinBoxDown->setValue ( max ); |
456 | } else { | 460 | } else { |
457 | CheckBoxDown->setChecked( false ); | 461 | CheckBoxDown->setChecked( false ); |
458 | SpinBoxDown->setValue ( 5 ); | 462 | SpinBoxDown->setValue ( 5 ); |
459 | } | 463 | } |
460 | CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() ); | 464 | CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() ); |
461 | } | 465 | } |
462 | 466 | ||
463 | void POP3config::accept() | 467 | void POP3config::accept() |
464 | { | 468 | { |
465 | if ( localFolder->text().contains("/") ||localFolder->text().contains("\\") ) { | 469 | if ( localFolder->text().contains("/") ||localFolder->text().contains("\\") ) { |
466 | QMessageBox::information( this, i18n( "Error" ), | 470 | QMessageBox::information( this, i18n( "Error" ), |
467 | i18n( "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically." ), | 471 | i18n( "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically." ), |
468 | i18n( "Ok" ) ); | 472 | i18n( "Ok" ) ); |
469 | return; | 473 | return; |
470 | } | 474 | } |
471 | data->setAccountName( accountLine->text() ); | 475 | data->setAccountName( accountLine->text() ); |
472 | data->setServer( serverLine->text() ); | 476 | data->setServer( serverLine->text() ); |
473 | data->setPort( portLine->text() ); | 477 | data->setPort( portLine->text() ); |
474 | data->setConnectionType( ComboBox1->currentItem() ); | 478 | data->setConnectionType( ComboBox1->currentItem() ); |
475 | data->setUser( userLine->text() ); | 479 | data->setUser( userLine->text() ); |
476 | data->setPassword( passLine->text() ); | 480 | data->setPassword( passLine->text() ); |
477 | data->setLocalFolder( localFolder->text() ); | 481 | data->setLocalFolder( localFolder->text() ); |
478 | data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; | 482 | data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; |
479 | data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); | 483 | data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); |
480 | 484 | ||
481 | QDialog::accept(); | 485 | QDialog::accept(); |
482 | } | 486 | } |
483 | 487 | ||
484 | /** | 488 | /** |
485 | * SMTPconfig | 489 | * SMTPconfig |
486 | */ | 490 | */ |
487 | 491 | ||
488 | SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 492 | SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
489 | : SMTPconfigUI( parent, name, modal, flags ) | 493 | : SMTPconfigUI( parent, name, modal, flags ) |
490 | { | 494 | { |
491 | data = account; | 495 | data = account; |
492 | 496 | ||
493 | connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); | 497 | connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); |
494 | connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); | 498 | connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); |
495 | 499 | ||
496 | // fillValues(); | 500 | // fillValues(); |
497 | QIconSet icon; | 501 | QIconSet icon; |
498 | //icon = SmallIcon("fileexport"); | 502 | //icon = SmallIcon("fileexport"); |
499 | icon = SmallIcon("fileopen"); | 503 | icon = SmallIcon("fileopen"); |
500 | SignaturButton->setText(""); | 504 | SignaturButton->setText(""); |
501 | SignaturButton->setIconSet (icon ) ; | 505 | SignaturButton->setIconSet (icon ) ; |
502 | SignaturButton->setMaximumSize ( SignaturButton->sizeHint().height()+4,SignaturButton->sizeHint().height()) ; | 506 | SignaturButton->setMaximumSize ( SignaturButton->sizeHint().height()+4,SignaturButton->sizeHint().height()) ; |
503 | connect( SignaturButton, SIGNAL( clicked() ), this, SLOT( chooseSig() ) ); | 507 | connect( SignaturButton, SIGNAL( clicked() ), this, SLOT( chooseSig() ) ); |
504 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); | 508 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); |
505 | ComboBox1->insertItem( "No secure connection, no TLS", 0 ); | 509 | ComboBox1->insertItem( "No secure connection, no TLS", 0 ); |
506 | ComboBox1->insertItem( "Only if available, try TLS", 1 ); | 510 | ComboBox1->insertItem( "Only if available, try TLS", 1 ); |
507 | ComboBox1->insertItem( "Always, use TLS", 2 ); | 511 | ComboBox1->insertItem( "Always, use TLS", 2 ); |
508 | ComboBox1->insertItem( "Connect on secure port (SSL)", 3 ); | 512 | ComboBox1->insertItem( "Connect on secure port (SSL)", 3 ); |
509 | ComboBox1->insertItem( "Run command instead", 4 ); | 513 | ComboBox1->insertItem( "Run command instead", 4 ); |
510 | CommandEdit->hide(); | 514 | CommandEdit->hide(); |
511 | fillValues(); | 515 | fillValues(); |
512 | //ComboBox1->setCurrentItem( data->ConnectionType() ); | 516 | //ComboBox1->setCurrentItem( data->ConnectionType() ); |
513 | } | 517 | } |
514 | void SMTPconfig::chooseSig() | 518 | void SMTPconfig::chooseSig() |
515 | { | 519 | { |
516 | QString lnk = KFileDialog::getOpenFileName( "", "Choose Signatur File", this ); | 520 | QString lnk = KFileDialog::getOpenFileName( "", "Choose Signatur File", this ); |
517 | if ( !lnk.isEmpty() ) { | 521 | if ( !lnk.isEmpty() ) { |
518 | SignaturEdit->setText( lnk ); | 522 | SignaturEdit->setText( lnk ); |
519 | } | 523 | } |
520 | } | 524 | } |
521 | void SMTPconfig::slotConnectionToggle( int index ) | 525 | void SMTPconfig::slotConnectionToggle( int index ) |
522 | { | 526 | { |
523 | // 2 is ssl connection | 527 | // 3 is ssl connection |
524 | if ( index == 2 ) | 528 | if ( index == 3 ) |
525 | { | 529 | { |
526 | portLine->setText( SMTP_SSL_PORT ); | 530 | portLine->setText( SMTP_SSL_PORT ); |
531 | CommandEdit->hide(); | ||
527 | } | 532 | } |
528 | else if ( index == 3 ) | 533 | else if ( index == 4 ) |
529 | { | 534 | { |
530 | portLine->setText( SMTP_PORT ); | 535 | portLine->setText( SMTP_PORT ); |
531 | CommandEdit->show(); | 536 | CommandEdit->show(); |
532 | } | 537 | } |
533 | else | 538 | else |
534 | { | 539 | { |
535 | portLine->setText( SMTP_PORT ); | 540 | portLine->setText( SMTP_PORT ); |
541 | CommandEdit->hide(); | ||
536 | } | 542 | } |
537 | } | 543 | } |
538 | 544 | ||
539 | void SMTPconfig::fillValues() | 545 | void SMTPconfig::fillValues() |
540 | { | 546 | { |
541 | accountLine->setText( data->getAccountName() ); | 547 | accountLine->setText( data->getAccountName() ); |
542 | serverLine->setText( data->getServer() ); | 548 | serverLine->setText( data->getServer() ); |
543 | portLine->setText( data->getPort() ); | 549 | portLine->setText( data->getPort() ); |
544 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 550 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
545 | loginBox->setChecked( data->getLogin() ); | 551 | loginBox->setChecked( data->getLogin() ); |
546 | userLine->setText( data->getUser() ); | 552 | userLine->setText( data->getUser() ); |
547 | passLine->setText( data->getPassword() ); | 553 | passLine->setText( data->getPassword() ); |
548 | SignaturEdit->setText( data->getSigFile() ); | 554 | SignaturEdit->setText( data->getSigFile() ); |
549 | } | 555 | } |
550 | 556 | ||
551 | void SMTPconfig::accept() | 557 | void SMTPconfig::accept() |
552 | { | 558 | { |
553 | data->setAccountName( accountLine->text() ); | 559 | data->setAccountName( accountLine->text() ); |
554 | data->setServer( serverLine->text() ); | 560 | data->setServer( serverLine->text() ); |
555 | data->setPort( portLine->text() ); | 561 | data->setPort( portLine->text() ); |
556 | data->setConnectionType( ComboBox1->currentItem() ); | 562 | data->setConnectionType( ComboBox1->currentItem() ); |
557 | data->setLogin( loginBox->isChecked() ); | 563 | data->setLogin( loginBox->isChecked() ); |
558 | data->setUser( userLine->text() ); | 564 | data->setUser( userLine->text() ); |
559 | data->setPassword( passLine->text() ); | 565 | data->setPassword( passLine->text() ); |
560 | data->setSigFile( SignaturEdit->text() ); | 566 | data->setSigFile( SignaturEdit->text() ); |
561 | 567 | ||
562 | QDialog::accept(); | 568 | QDialog::accept(); |
563 | } | 569 | } |
564 | 570 | ||
565 | /** | 571 | /** |
566 | * NNTPconfig | 572 | * NNTPconfig |
567 | */ | 573 | */ |
568 | 574 | ||
569 | NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 575 | NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
570 | : NNTPconfigUI( parent, name, modal, flags ) | 576 | : NNTPconfigUI( parent, name, modal, flags ) |
571 | { | 577 | { |
572 | data = account; | 578 | data = account; |
573 | 579 | ||
574 | connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); | 580 | connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); |
575 | connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); | 581 | connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); |
576 | connect( GetNGButton, SIGNAL( clicked() ), this, SLOT( slotGetNG() ) ); | 582 | connect( GetNGButton, SIGNAL( clicked() ), this, SLOT( slotGetNG() ) ); |
577 | connect( ShowSubcribed, SIGNAL( clicked() ), this, SLOT( slotShowSub() ) ); | 583 | connect( ShowSubcribed, SIGNAL( clicked() ), this, SLOT( slotShowSub() ) ); |
578 | connect( FilterButton, SIGNAL( clicked() ), this, SLOT( slotShowFilter() ) ); | 584 | connect( FilterButton, SIGNAL( clicked() ), this, SLOT( slotShowFilter() ) ); |
579 | fillValues(); | 585 | fillValues(); |
580 | 586 | ||
581 | connect( sslBox, SIGNAL( toggled(bool) ), SLOT( slotSSL(bool) ) ); | 587 | connect( sslBox, SIGNAL( toggled(bool) ), SLOT( slotSSL(bool) ) ); |
582 | } | 588 | } |
583 | 589 | ||
584 | void NNTPconfig::slotShowSub() | 590 | void NNTPconfig::slotShowSub() |
585 | { | 591 | { |
586 | save(); | 592 | save(); |
587 | data->save(); | 593 | data->save(); |
588 | ListViewGroups->clear(); | 594 | ListViewGroups->clear(); |
589 | for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { | 595 | for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { |
590 | QCheckListItem *item; | 596 | QCheckListItem *item; |
591 | item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); | 597 | item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); |
592 | item->setOn( true ); | 598 | item->setOn( true ); |
593 | } | 599 | } |
594 | topLevelWidget()->setCaption( i18n("%1 groups subscribed").arg( subscribedGroups.count())); | 600 | topLevelWidget()->setCaption( i18n("%1 groups subscribed").arg( subscribedGroups.count())); |
595 | } | 601 | } |
596 | void NNTPconfig::slotShowFilter() | 602 | void NNTPconfig::slotShowFilter() |
597 | { | 603 | { |
598 | save(); | 604 | save(); |
599 | data->save(); | 605 | data->save(); |
600 | ListViewGroups->clear(); | 606 | ListViewGroups->clear(); |
601 | int count = 0; | 607 | int count = 0; |
602 | for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) { | 608 | for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) { |
603 | QCheckListItem *item; | 609 | QCheckListItem *item; |
604 | if ( GroupFilter->text().isEmpty() || (*it).find( GroupFilter->text() ) >= 0 ) { | 610 | if ( GroupFilter->text().isEmpty() || (*it).find( GroupFilter->text() ) >= 0 ) { |
605 | item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); | 611 | item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); |
606 | ++count; | 612 | ++count; |
607 | if ( subscribedGroups.contains( (*it) ) >= 1 ) { | 613 | if ( subscribedGroups.contains( (*it) ) >= 1 ) { |
608 | item->setOn( true ); | 614 | item->setOn( true ); |
609 | } | 615 | } |
610 | } | 616 | } |
611 | } | 617 | } |
612 | topLevelWidget()->setCaption( i18n("Filter found %1 groups").arg( count)); | 618 | topLevelWidget()->setCaption( i18n("Filter found %1 groups").arg( count)); |
613 | } | 619 | } |
614 | void NNTPconfig::slotGetNG() { | 620 | void NNTPconfig::slotGetNG() { |
615 | save(); | 621 | save(); |
616 | data->save(); | 622 | data->save(); |
617 | topLevelWidget()->setCaption( i18n("Fetching group list...")); | 623 | topLevelWidget()->setCaption( i18n("Fetching group list...")); |
618 | qApp->processEvents(); | 624 | qApp->processEvents(); |
619 | NNTPwrapper* tmp = new NNTPwrapper( data ); | 625 | NNTPwrapper* tmp = new NNTPwrapper( data ); |
620 | allGroups = tmp->listAllNewsgroups(); | 626 | allGroups = tmp->listAllNewsgroups(); |
621 | topLevelWidget()->setCaption( i18n("Downloaded %1 group names").arg( allGroups.count())); | 627 | topLevelWidget()->setCaption( i18n("Downloaded %1 group names").arg( allGroups.count())); |
622 | 628 | ||
623 | ListViewGroups->clear(); | 629 | ListViewGroups->clear(); |
624 | 630 | ||
625 | for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) { | 631 | for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) { |
626 | QCheckListItem *item; | 632 | QCheckListItem *item; |
627 | item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); | 633 | item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); |
628 | if ( subscribedGroups.contains( (*it) ) >= 1 ) { | 634 | if ( subscribedGroups.contains( (*it) ) >= 1 ) { |
629 | item->setOn( true ); | 635 | item->setOn( true ); |
630 | 636 | ||
631 | } | 637 | } |
632 | } | 638 | } |
633 | delete tmp; | 639 | delete tmp; |
634 | } | 640 | } |
635 | 641 | ||
636 | void NNTPconfig::slotSSL( bool enabled ) | 642 | void NNTPconfig::slotSSL( bool enabled ) |
637 | { | 643 | { |
638 | if ( enabled ) | 644 | if ( enabled ) |
639 | { | 645 | { |
640 | portLine->setText( NNTP_SSL_PORT ); | 646 | portLine->setText( NNTP_SSL_PORT ); |
641 | } | 647 | } |
642 | else | 648 | else |
643 | { | 649 | { |
644 | portLine->setText( NNTP_PORT ); | 650 | portLine->setText( NNTP_PORT ); |
645 | } | 651 | } |
646 | } | 652 | } |
647 | 653 | ||
648 | void NNTPconfig::fillValues() | 654 | void NNTPconfig::fillValues() |
649 | { | 655 | { |
650 | accountLine->setText( data->getAccountName() ); | 656 | accountLine->setText( data->getAccountName() ); |
651 | serverLine->setText( data->getServer() ); | 657 | serverLine->setText( data->getServer() ); |
652 | portLine->setText( data->getPort() ); | 658 | portLine->setText( data->getPort() ); |
653 | sslBox->setChecked( data->getSSL() ); | 659 | sslBox->setChecked( data->getSSL() ); |
654 | loginBox->setChecked( data->getLogin() ); | 660 | loginBox->setChecked( data->getLogin() ); |
655 | userLine->setText( data->getUser() ); | 661 | userLine->setText( data->getUser() ); |
656 | passLine->setText( data->getPassword() ); | 662 | passLine->setText( data->getPassword() ); |
657 | subscribedGroups = data->getGroups(); | 663 | subscribedGroups = data->getGroups(); |
658 | /* don't forget that - you will overwrite values if user clicks cancel! */ | 664 | /* don't forget that - you will overwrite values if user clicks cancel! */ |
659 | for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { | 665 | for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { |
660 | QCheckListItem *item; | 666 | QCheckListItem *item; |
661 | item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); | 667 | item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); |
662 | item->setOn( true ); | 668 | item->setOn( true ); |
663 | } | 669 | } |
664 | } | 670 | } |
665 | 671 | ||
666 | void NNTPconfig::save() | 672 | void NNTPconfig::save() |
667 | { | 673 | { |
668 | data->setAccountName( accountLine->text() ); | 674 | data->setAccountName( accountLine->text() ); |
669 | data->setServer( serverLine->text() ); | 675 | data->setServer( serverLine->text() ); |
670 | data->setPort( portLine->text() ); | 676 | data->setPort( portLine->text() ); |
671 | data->setSSL( sslBox->isChecked() ); | 677 | data->setSSL( sslBox->isChecked() ); |
672 | data->setLogin( loginBox->isChecked() ); | 678 | data->setLogin( loginBox->isChecked() ); |
673 | data->setUser( userLine->text() ); | 679 | data->setUser( userLine->text() ); |
674 | data->setPassword( passLine->text() ); | 680 | data->setPassword( passLine->text() ); |
675 | 681 | ||
676 | QListViewItemIterator list_it( ListViewGroups ); | 682 | QListViewItemIterator list_it( ListViewGroups ); |
677 | 683 | ||
678 | for ( ; list_it.current(); ++list_it ) { | 684 | for ( ; list_it.current(); ++list_it ) { |
679 | 685 | ||
680 | if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { | 686 | if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { |
681 | if ( subscribedGroups.contains( list_it.current()->text(0) ) < 1 ) | 687 | if ( subscribedGroups.contains( list_it.current()->text(0) ) < 1 ) |
682 | subscribedGroups.append( list_it.current()->text(0) ); | 688 | subscribedGroups.append( list_it.current()->text(0) ); |
683 | } else { | 689 | } else { |
684 | if ( subscribedGroups.contains( list_it.current()->text(0) ) >= 1 ) | 690 | if ( subscribedGroups.contains( list_it.current()->text(0) ) >= 1 ) |
685 | subscribedGroups.remove( list_it.current()->text(0) ); | 691 | subscribedGroups.remove( list_it.current()->text(0) ); |
686 | } | 692 | } |
687 | 693 | ||
688 | } | 694 | } |
689 | data->setGroups( subscribedGroups ); | 695 | data->setGroups( subscribedGroups ); |
690 | } | 696 | } |
691 | 697 | ||
692 | void NNTPconfig::accept() | 698 | void NNTPconfig::accept() |
693 | { | 699 | { |
694 | save(); | 700 | save(); |
695 | QDialog::accept(); | 701 | QDialog::accept(); |
696 | } | 702 | } |
697 | 703 | ||
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp index 872a460..845c71c 100644 --- a/kmicromail/libmailwrapper/smtpwrapper.cpp +++ b/kmicromail/libmailwrapper/smtpwrapper.cpp | |||
@@ -1,472 +1,487 @@ | |||
1 | #include "smtpwrapper.h" | 1 | #include "smtpwrapper.h" |
2 | #include "mailwrapper.h" | 2 | #include "mailwrapper.h" |
3 | #include "abstractmail.h" | 3 | #include "abstractmail.h" |
4 | #include "logindialog.h" | 4 | #include "logindialog.h" |
5 | #include "mailtypes.h" | 5 | #include "mailtypes.h" |
6 | #include "sendmailprogress.h" | 6 | #include "sendmailprogress.h" |
7 | 7 | ||
8 | //#include <opie2/odebug.h> | 8 | //#include <opie2/odebug.h> |
9 | //#include <qt.h> | 9 | //#include <qt.h> |
10 | #include <qapplication.h> | 10 | #include <qapplication.h> |
11 | #include <qmessagebox.h> | 11 | #include <qmessagebox.h> |
12 | #include <stdlib.h> | 12 | #include <stdlib.h> |
13 | #ifndef DESKTOP_VERSION | 13 | #ifndef DESKTOP_VERSION |
14 | //#include <qpe/config.h> | 14 | //#include <qpe/config.h> |
15 | #include <qpe/qcopenvelope_qws.h> | 15 | #include <qpe/qcopenvelope_qws.h> |
16 | #endif | 16 | #endif |
17 | #include <libetpan/libetpan.h> | 17 | #include <libetpan/libetpan.h> |
18 | #include <klocale.h> | 18 | #include <klocale.h> |
19 | #include <kglobal.h> | 19 | #include <kglobal.h> |
20 | #include <kconfig.h> | 20 | #include <kconfig.h> |
21 | 21 | ||
22 | 22 | ||
23 | using namespace Opie::Core; | 23 | using namespace Opie::Core; |
24 | progressMailSend*SMTPwrapper::sendProgress = 0; | 24 | progressMailSend*SMTPwrapper::sendProgress = 0; |
25 | 25 | ||
26 | SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) | 26 | SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) |
27 | : Generatemail() | 27 | : Generatemail() |
28 | { | 28 | { |
29 | m_SmtpAccount = aSmtp; | 29 | m_SmtpAccount = aSmtp; |
30 | KConfig cfg( locateLocal("config", "kopiemailrc" ) ); | 30 | KConfig cfg( locateLocal("config", "kopiemailrc" ) ); |
31 | cfg.setGroup( "Status" ); | 31 | cfg.setGroup( "Status" ); |
32 | m_queuedMail = cfg.readNumEntry( "outgoing", 0 ); | 32 | m_queuedMail = cfg.readNumEntry( "outgoing", 0 ); |
33 | emit queuedMails( m_queuedMail ); | 33 | emit queuedMails( m_queuedMail ); |
34 | connect( this, SIGNAL( queuedMails(int) ), this, SLOT( emitQCop(int) ) ); | 34 | connect( this, SIGNAL( queuedMails(int) ), this, SLOT( emitQCop(int) ) ); |
35 | m_smtp = 0; | 35 | m_smtp = 0; |
36 | } | 36 | } |
37 | 37 | ||
38 | SMTPwrapper::~SMTPwrapper() | 38 | SMTPwrapper::~SMTPwrapper() |
39 | { | 39 | { |
40 | disc_server(); | 40 | disc_server(); |
41 | } | 41 | } |
42 | 42 | ||
43 | void SMTPwrapper::emitQCop( int queued ) { | 43 | void SMTPwrapper::emitQCop( int queued ) { |
44 | #ifndef DESKTOP_VERSION | 44 | #ifndef DESKTOP_VERSION |
45 | // LR : not used in kde-pim | 45 | // LR : not used in kde-pim |
46 | //QCopEnvelope env( "QPE/Pim", "outgoingMails(int)" ); | 46 | //QCopEnvelope env( "QPE/Pim", "outgoingMails(int)" ); |
47 | //env << queued; | 47 | //env << queued; |
48 | #endif | 48 | #endif |
49 | } | 49 | } |
50 | 50 | ||
51 | QString SMTPwrapper::mailsmtpError( int errnum ) { | 51 | QString SMTPwrapper::mailsmtpError( int errnum ) { |
52 | switch ( errnum ) { | 52 | switch ( errnum ) { |
53 | case MAILSMTP_NO_ERROR: | 53 | case MAILSMTP_NO_ERROR: |
54 | return i18n( "No error" ); | 54 | return i18n( "No error" ); |
55 | case MAILSMTP_ERROR_UNEXPECTED_CODE: | 55 | case MAILSMTP_ERROR_UNEXPECTED_CODE: |
56 | return i18n( "Unexpected error code" ); | 56 | return i18n( "Unexpected error code" ); |
57 | case MAILSMTP_ERROR_SERVICE_NOT_AVAILABLE: | 57 | case MAILSMTP_ERROR_SERVICE_NOT_AVAILABLE: |
58 | return i18n( "Service not available" ); | 58 | return i18n( "Service not available" ); |
59 | case MAILSMTP_ERROR_STREAM: | 59 | case MAILSMTP_ERROR_STREAM: |
60 | return i18n( "Stream error" ); | 60 | return i18n( "Stream error" ); |
61 | case MAILSMTP_ERROR_HOSTNAME: | 61 | case MAILSMTP_ERROR_HOSTNAME: |
62 | return i18n( "gethostname() failed" ); | 62 | return i18n( "gethostname() failed" ); |
63 | case MAILSMTP_ERROR_NOT_IMPLEMENTED: | 63 | case MAILSMTP_ERROR_NOT_IMPLEMENTED: |
64 | return i18n( "Not implemented" ); | 64 | return i18n( "Not implemented" ); |
65 | case MAILSMTP_ERROR_ACTION_NOT_TAKEN: | 65 | case MAILSMTP_ERROR_ACTION_NOT_TAKEN: |
66 | return i18n( "Error, action not taken" ); | 66 | return i18n( "Error, action not taken" ); |
67 | case MAILSMTP_ERROR_EXCEED_STORAGE_ALLOCATION: | 67 | case MAILSMTP_ERROR_EXCEED_STORAGE_ALLOCATION: |
68 | return i18n( "Data exceeds storage allocation" ); | 68 | return i18n( "Data exceeds storage allocation" ); |
69 | case MAILSMTP_ERROR_IN_PROCESSING: | 69 | case MAILSMTP_ERROR_IN_PROCESSING: |
70 | return i18n( "Error in processing" ); | 70 | return i18n( "Error in processing" ); |
71 | case MAILSMTP_ERROR_STARTTLS_NOT_SUPPORTED: | 71 | case MAILSMTP_ERROR_STARTTLS_NOT_SUPPORTED: |
72 | return i18n( "Starttls not supported" ); | 72 | return i18n( "Starttls not supported" ); |
73 | // case MAILSMTP_ERROR_INSUFFISANT_SYSTEM_STORAGE: | 73 | // case MAILSMTP_ERROR_INSUFFISANT_SYSTEM_STORAGE: |
74 | // return i18n( "Insufficient system storage" ); | 74 | // return i18n( "Insufficient system storage" ); |
75 | case MAILSMTP_ERROR_MAILBOX_UNAVAILABLE: | 75 | case MAILSMTP_ERROR_MAILBOX_UNAVAILABLE: |
76 | return i18n( "Mailbox unavailable" ); | 76 | return i18n( "Mailbox unavailable" ); |
77 | case MAILSMTP_ERROR_MAILBOX_NAME_NOT_ALLOWED: | 77 | case MAILSMTP_ERROR_MAILBOX_NAME_NOT_ALLOWED: |
78 | return i18n( "Mailbox name not allowed" ); | 78 | return i18n( "Mailbox name not allowed" ); |
79 | case MAILSMTP_ERROR_BAD_SEQUENCE_OF_COMMAND: | 79 | case MAILSMTP_ERROR_BAD_SEQUENCE_OF_COMMAND: |
80 | return i18n( "Bad command sequence" ); | 80 | return i18n( "Bad command sequence" ); |
81 | case MAILSMTP_ERROR_USER_NOT_LOCAL: | 81 | case MAILSMTP_ERROR_USER_NOT_LOCAL: |
82 | return i18n( "User not local" ); | 82 | return i18n( "User not local" ); |
83 | case MAILSMTP_ERROR_TRANSACTION_FAILED: | 83 | case MAILSMTP_ERROR_TRANSACTION_FAILED: |
84 | return i18n( "Transaction failed" ); | 84 | return i18n( "Transaction failed" ); |
85 | case MAILSMTP_ERROR_MEMORY: | 85 | case MAILSMTP_ERROR_MEMORY: |
86 | return i18n( "Memory error" ); | 86 | return i18n( "Memory error" ); |
87 | case MAILSMTP_ERROR_CONNECTION_REFUSED: | 87 | case MAILSMTP_ERROR_CONNECTION_REFUSED: |
88 | return i18n( "Connection refused" ); | 88 | return i18n( "Connection refused" ); |
89 | default: | 89 | default: |
90 | return i18n( "Unknown error code" ); | 90 | return i18n( "Unknown error code" ); |
91 | } | 91 | } |
92 | } | 92 | } |
93 | 93 | ||
94 | 94 | ||
95 | void SMTPwrapper::progress( size_t current, size_t maximum ) { | 95 | void SMTPwrapper::progress( size_t current, size_t maximum ) { |
96 | if (SMTPwrapper::sendProgress) { | 96 | if (SMTPwrapper::sendProgress) { |
97 | SMTPwrapper::sendProgress->setSingleMail(current, maximum ); | 97 | SMTPwrapper::sendProgress->setSingleMail(current, maximum ); |
98 | qApp->processEvents(); | 98 | qApp->processEvents(); |
99 | } | 99 | } |
100 | } | 100 | } |
101 | 101 | ||
102 | void SMTPwrapper::storeMail(const char*mail, size_t length, const QString&box) { | 102 | void SMTPwrapper::storeMail(const char*mail, size_t length, const QString&box) { |
103 | if (!mail) | 103 | if (!mail) |
104 | return; | 104 | return; |
105 | QString localfolders = AbstractMail::defaultLocalfolder(); | 105 | QString localfolders = AbstractMail::defaultLocalfolder(); |
106 | AbstractMail*wrap = AbstractMail::getWrapper(localfolders); | 106 | AbstractMail*wrap = AbstractMail::getWrapper(localfolders); |
107 | wrap->createMbox(box); | 107 | wrap->createMbox(box); |
108 | wrap->storeMessage(mail,length,box); | 108 | wrap->storeMessage(mail,length,box); |
109 | delete wrap; | 109 | delete wrap; |
110 | } | 110 | } |
111 | 111 | ||
112 | bool SMTPwrapper::smtpSend( mailmime *mail,bool later) { | 112 | bool SMTPwrapper::smtpSend( mailmime *mail,bool later) { |
113 | clist *rcpts = 0; | 113 | clist *rcpts = 0; |
114 | char *from, *data; | 114 | char *from, *data; |
115 | size_t size; | 115 | size_t size; |
116 | 116 | ||
117 | from = data = 0; | 117 | from = data = 0; |
118 | 118 | ||
119 | mailmessage * msg = 0; | 119 | mailmessage * msg = 0; |
120 | msg = mime_message_init(mail); | 120 | msg = mime_message_init(mail); |
121 | mime_message_set_tmpdir(msg,getenv( "HOME" )); | 121 | mime_message_set_tmpdir(msg,getenv( "HOME" )); |
122 | int r = mailmessage_fetch(msg,&data,&size); | 122 | int r = mailmessage_fetch(msg,&data,&size); |
123 | mime_message_detach_mime(msg); | 123 | mime_message_detach_mime(msg); |
124 | mailmessage_free(msg); | 124 | mailmessage_free(msg); |
125 | if (r != MAIL_NO_ERROR || !data) { | 125 | if (r != MAIL_NO_ERROR || !data) { |
126 | if (data) | 126 | if (data) |
127 | free(data); | 127 | free(data); |
128 | qDebug("Error fetching mime... "); | 128 | qDebug("Error fetching mime... "); |
129 | return false; | 129 | return false; |
130 | } | 130 | } |
131 | msg = 0; | 131 | msg = 0; |
132 | if (later) { | 132 | if (later) { |
133 | storeMail(data,size,"Outgoing"); | 133 | storeMail(data,size,"Outgoing"); |
134 | if (data) | 134 | if (data) |
135 | free( data ); | 135 | free( data ); |
136 | KConfig cfg( locateLocal("config", "kopiemailrc" ) ); | 136 | KConfig cfg( locateLocal("config", "kopiemailrc" ) ); |
137 | cfg.setGroup( "Status" ); | 137 | cfg.setGroup( "Status" ); |
138 | cfg.writeEntry( "outgoing", ++m_queuedMail ); | 138 | cfg.writeEntry( "outgoing", ++m_queuedMail ); |
139 | emit queuedMails( m_queuedMail ); | 139 | emit queuedMails( m_queuedMail ); |
140 | return true; | 140 | return true; |
141 | } | 141 | } |
142 | from = getFrom( mail ); | 142 | from = getFrom( mail ); |
143 | rcpts = createRcptList( mail->mm_data.mm_message.mm_fields ); | 143 | rcpts = createRcptList( mail->mm_data.mm_message.mm_fields ); |
144 | bool result = smtpSend(from,rcpts,data,size); | 144 | bool result = smtpSend(from,rcpts,data,size); |
145 | if (data) { | 145 | if (data) { |
146 | free(data); | 146 | free(data); |
147 | } | 147 | } |
148 | if (from) { | 148 | if (from) { |
149 | free(from); | 149 | free(from); |
150 | } | 150 | } |
151 | if (rcpts) | 151 | if (rcpts) |
152 | smtp_address_list_free( rcpts ); | 152 | smtp_address_list_free( rcpts ); |
153 | return result; | 153 | return result; |
154 | } | 154 | } |
155 | 155 | ||
156 | void SMTPwrapper::storeFailedMail(const char*data,unsigned int size, const char*failuremessage) | 156 | void SMTPwrapper::storeFailedMail(const char*data,unsigned int size, const char*failuremessage) |
157 | { | 157 | { |
158 | if (data) { | 158 | if (data) { |
159 | storeMail(data,size,"Sendfailed"); | 159 | storeMail(data,size,"Sendfailed"); |
160 | } | 160 | } |
161 | if (failuremessage) { | 161 | if (failuremessage) { |
162 | QMessageBox::critical(0,i18n("Error sending mail"), | 162 | QMessageBox::critical(0,i18n("Error sending mail"), |
163 | failuremessage); | 163 | failuremessage); |
164 | } | 164 | } |
165 | } | 165 | } |
166 | 166 | ||
167 | int SMTPwrapper::start_smtp_tls() | 167 | int SMTPwrapper::start_smtp_tls() |
168 | { | 168 | { |
169 | if (!m_smtp) { | 169 | if (!m_smtp) { |
170 | return MAILSMTP_ERROR_IN_PROCESSING; | 170 | return MAILSMTP_ERROR_IN_PROCESSING; |
171 | } | 171 | } |
172 | int err = mailesmtp_starttls(m_smtp); | 172 | int err = mailesmtp_starttls(m_smtp); |
173 | if (err != MAILSMTP_NO_ERROR) return err; | 173 | if (err != MAILSMTP_NO_ERROR) return err; |
174 | mailstream_low * low; | 174 | mailstream_low * low; |
175 | mailstream_low * new_low; | 175 | mailstream_low * new_low; |
176 | low = mailstream_get_low(m_smtp->stream); | 176 | low = mailstream_get_low(m_smtp->stream); |
177 | if (!low) { | 177 | if (!low) { |
178 | return MAILSMTP_ERROR_IN_PROCESSING; | 178 | return MAILSMTP_ERROR_IN_PROCESSING; |
179 | } | 179 | } |
180 | int fd = mailstream_low_get_fd(low); | 180 | int fd = mailstream_low_get_fd(low); |
181 | if (fd > -1 && (new_low = mailstream_low_ssl_open(fd))!=0) { | 181 | if (fd > -1 && (new_low = mailstream_low_ssl_open(fd))!=0) { |
182 | mailstream_low_free(low); | 182 | mailstream_low_free(low); |
183 | mailstream_set_low(m_smtp->stream, new_low); | 183 | mailstream_set_low(m_smtp->stream, new_low); |
184 | } else { | 184 | } else { |
185 | return MAILSMTP_ERROR_IN_PROCESSING; | 185 | return MAILSMTP_ERROR_IN_PROCESSING; |
186 | } | 186 | } |
187 | return err; | 187 | return err; |
188 | } | 188 | } |
189 | 189 | ||
190 | void SMTPwrapper::connect_server() | 190 | void SMTPwrapper::connect_server() |
191 | { | 191 | { |
192 | QString server, user, pass; | 192 | QString server, user, pass; |
193 | bool ssl; | 193 | bool ssl; |
194 | uint16_t port; | 194 | uint16_t port; |
195 | ssl = false; | 195 | ssl = false; |
196 | bool try_tls = false; | 196 | bool try_tls = false; |
197 | bool force_tls=false; | 197 | bool force_tls=false; |
198 | QString failuretext = ""; | 198 | QString failuretext = ""; |
199 | 199 | ||
200 | if (m_smtp || !m_SmtpAccount) { | 200 | if (m_smtp || !m_SmtpAccount) { |
201 | return; | 201 | return; |
202 | } | 202 | } |
203 | server = m_SmtpAccount->getServer(); | 203 | server = m_SmtpAccount->getServer(); |
204 | if ( m_SmtpAccount->ConnectionType() == 3 ) { | 204 | if ( m_SmtpAccount->ConnectionType() == 3 ) { |
205 | ssl = true; | 205 | ssl = true; |
206 | try_tls = false; | 206 | try_tls = false; |
207 | } else if (m_SmtpAccount->ConnectionType() == 2) { | 207 | } else if (m_SmtpAccount->ConnectionType() == 2) { |
208 | force_tls = true; | 208 | force_tls = true; |
209 | } else if (m_SmtpAccount->ConnectionType() == 1) { | 209 | } else if (m_SmtpAccount->ConnectionType() == 1) { |
210 | try_tls = true; | 210 | try_tls = true; |
211 | } | 211 | } |
212 | int result = 1; | 212 | int result = 1; |
213 | port = m_SmtpAccount->getPort().toUInt(); | 213 | port = m_SmtpAccount->getPort().toUInt(); |
214 | 214 | ||
215 | m_smtp = mailsmtp_new( 20, &progress ); | 215 | m_smtp = mailsmtp_new( 20, &progress ); |
216 | if ( m_smtp == NULL ) { | 216 | if ( m_smtp == NULL ) { |
217 | /* no failure message cause this happens when problems with memory - than we | 217 | /* no failure message cause this happens when problems with memory - than we |
218 | we can not display any messagebox */ | 218 | we can not display any messagebox */ |
219 | return; | 219 | return; |
220 | } | 220 | } |
221 | 221 | ||
222 | int err = MAILSMTP_NO_ERROR; | 222 | int err = MAILSMTP_NO_ERROR; |
223 | ; // odebug << "Servername " << server << " at port " << port << "" << oendl; | 223 | ; // odebug << "Servername " << server << " at port " << port << "" << oendl; |
224 | if ( ssl ) { | 224 | if ( ssl ) { |
225 | qDebug("smtp: ssl_connect "); | 225 | qDebug("smtp: ssl_connect "); |
226 | err = mailsmtp_ssl_connect( m_smtp, server.latin1(), port ); | 226 | err = mailsmtp_ssl_connect( m_smtp, server.latin1(), port ); |
227 | } else { | 227 | } else { |
228 | ; // odebug << "No SSL session" << oendl; | 228 | ; // odebug << "No SSL session" << oendl; |
229 | err = mailsmtp_socket_connect( m_smtp, server.latin1(), port ); | 229 | err = mailsmtp_socket_connect( m_smtp, server.latin1(), port ); |
230 | } | 230 | } |
231 | if ( err != MAILSMTP_NO_ERROR ) { | 231 | if ( err != MAILSMTP_NO_ERROR ) { |
232 | qDebug("Error init SMTP connection" ); | 232 | qDebug("Error init SMTP connection" ); |
233 | failuretext = i18n("Error init SMTP connection:\n%1").arg(mailsmtpError(err)); | 233 | failuretext = i18n("Error init SMTP connection:\n%1").arg(mailsmtpError(err)); |
234 | result = 0; | 234 | result = 0; |
235 | } | 235 | } |
236 | 236 | ||
237 | qDebug("SMTP connection inited "); | 237 | qDebug("SMTP connection inited "); |
238 | /* switch to tls after init 'cause there it will send the ehlo */ | 238 | /* switch to tls after init 'cause there it will send the ehlo */ |
239 | if (result) { | 239 | if (result) { |
240 | err = mailsmtp_init( m_smtp ); | 240 | err = mailsmtp_init( m_smtp ); |
241 | if (err != MAILSMTP_NO_ERROR) { | 241 | if (err != MAILSMTP_NO_ERROR) { |
242 | result = 0; | 242 | result = 0; |
243 | qDebug("Error init SMTP connection "); | 243 | qDebug("Error init SMTP connection "); |
244 | failuretext = i18n("Error init SMTP connection:\n%1").arg(mailsmtpError(err)); | 244 | failuretext = i18n("Error init SMTP connection:\n%1").arg(mailsmtpError(err)); |
245 | } | 245 | } |
246 | } | 246 | } |
247 | if (try_tls) { | 247 | if (result && try_tls) { |
248 | qDebug("Smpt: Try tls "); | 248 | qDebug("Smpt: Try tls "); |
249 | err = start_smtp_tls(); | 249 | err = start_smtp_tls(); |
250 | if (err != MAILSMTP_NO_ERROR) { | 250 | if (err != MAILSMTP_NO_ERROR) { |
251 | try_tls = false; | 251 | try_tls = false; |
252 | qDebug("no tls "); | 252 | qDebug("no tls "); |
253 | } else { | 253 | } else { |
254 | err = mailesmtp_ehlo(m_smtp); | 254 | err = mailesmtp_ehlo(m_smtp); |
255 | if ( err != MAILSMTP_NO_ERROR ) | ||
256 | result = 0; | ||
255 | } | 257 | } |
256 | } | 258 | } |
257 | //qDebug("mailesmtp_ehlo %d ",err ); | 259 | //qDebug("mailesmtp_ehlo %d ",err ); |
258 | if (!try_tls && force_tls) { | 260 | if (!try_tls && force_tls) { |
259 | result = 0; | 261 | result = 0; |
260 | failuretext = i18n("Error init SMTP tls:%1").arg(mailsmtpError(err)); | 262 | failuretext = i18n("Error init SMTP tls:%1").arg(mailsmtpError(err)); |
261 | } | 263 | } |
262 | 264 | ||
263 | if (result==1 && m_SmtpAccount->getLogin() ) { | 265 | if (result==1 && m_SmtpAccount->getLogin() ) { |
264 | ; // odebug << "smtp with auth" << oendl; | 266 | ; // odebug << "smtp with auth" << oendl; |
265 | if ( m_SmtpAccount->getUser().isEmpty() || m_SmtpAccount->getPassword().isEmpty() ) { | 267 | if ( m_SmtpAccount->getUser().isEmpty() || m_SmtpAccount->getPassword().isEmpty() ) { |
266 | // get'em | 268 | // get'em |
267 | LoginDialog login( m_SmtpAccount->getUser(), | 269 | LoginDialog login( m_SmtpAccount->getUser(), |
268 | m_SmtpAccount->getPassword(), NULL, 0, true ); | 270 | m_SmtpAccount->getPassword(), NULL, 0, true ); |
269 | login.show(); | 271 | login.show(); |
270 | if ( QDialog::Accepted == login.exec() ) { | 272 | if ( QDialog::Accepted == login.exec() ) { |
271 | // ok | 273 | // ok |
272 | user = login.getUser(); | 274 | user = login.getUser(); |
273 | pass = login.getPassword(); | 275 | pass = login.getPassword(); |
274 | } else { | 276 | } else { |
275 | result = 0; | 277 | result = 0; |
276 | failuretext=i18n("Login aborted - \nstoring mail to localfolder"); | 278 | failuretext=i18n("Login aborted - \nstoring mail to localfolder"); |
277 | } | 279 | } |
278 | } else { | 280 | } else { |
279 | user = m_SmtpAccount->getUser(); | 281 | user = m_SmtpAccount->getUser(); |
280 | pass = m_SmtpAccount->getPassword(); | 282 | pass = m_SmtpAccount->getPassword(); |
281 | } | 283 | } |
282 | ; // odebug << "session->auth: " << m_smtp->auth << "" << oendl; | 284 | ; // odebug << "session->auth: " << m_smtp->auth << "" << oendl; |
283 | if (result) { | 285 | if (result) { |
284 | err = mailsmtp_auth( m_smtp, (char*)user.latin1(), (char*)pass.latin1() ); | 286 | err = mailsmtp_auth( m_smtp, (char*)user.latin1(), (char*)pass.latin1() ); |
285 | if ( err == MAILSMTP_NO_ERROR ) { | 287 | if ( err == MAILSMTP_NO_ERROR ) { |
286 | qDebug("Smtp authentification ok "); | 288 | qDebug("Smtp authentification ok "); |
287 | } else { | 289 | } else { |
288 | failuretext = i18n("Authentification failed"); | 290 | failuretext = i18n("Authentification failed"); |
289 | result = 0; | 291 | result = 0; |
290 | } | 292 | } |
291 | } | 293 | } |
292 | } | 294 | } |
295 | if ( result == 0 ) { | ||
296 | mailsmtp_free(m_smtp); | ||
297 | m_smtp = 0; | ||
298 | } | ||
293 | } | 299 | } |
294 | 300 | ||
295 | void SMTPwrapper::disc_server() | 301 | void SMTPwrapper::disc_server() |
296 | { | 302 | { |
297 | if (m_smtp) { | 303 | if (m_smtp) { |
298 | mailsmtp_quit( m_smtp ); | 304 | mailsmtp_quit( m_smtp ); |
299 | mailsmtp_free( m_smtp ); | 305 | mailsmtp_free( m_smtp ); |
300 | m_smtp = 0; | 306 | m_smtp = 0; |
301 | } | 307 | } |
302 | } | 308 | } |
303 | 309 | ||
304 | int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size ) | 310 | int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size ) |
305 | { | 311 | { |
306 | int err,result; | 312 | int err,result; |
307 | QString failuretext = ""; | 313 | QString failuretext = ""; |
308 | 314 | ||
309 | connect_server(); | 315 | connect_server(); |
310 | 316 | ||
311 | result = 1; | 317 | result = 1; |
312 | if (m_smtp) { | 318 | if (m_smtp) { |
313 | err = mailsmtp_send( m_smtp, from, rcpts, data, size ); | 319 | err = mailsmtp_send( m_smtp, from, rcpts, data, size ); |
314 | if ( err != MAILSMTP_NO_ERROR ) { | 320 | if ( err != MAILSMTP_NO_ERROR ) { |
315 | qDebug("Error sending mail"); | 321 | qDebug("Error sending mail"); |
316 | failuretext=i18n("Error sending mail:\n%1").arg(mailsmtpError(err)); | 322 | failuretext=i18n("Error sending mail:\n%1").arg(mailsmtpError(err)); |
317 | result = 0; | 323 | result = 0; |
318 | } | 324 | } |
319 | } else { | 325 | } else { |
320 | result = 0; | 326 | result = 0; |
321 | } | 327 | } |
322 | 328 | ||
323 | if (!result) { | 329 | if (!result) { |
324 | storeFailedMail(data,size,failuretext); | 330 | storeFailedMail(data,size,failuretext); |
325 | } else { | 331 | } else { |
326 | ; // odebug << "Mail sent." << oendl; | 332 | ; // odebug << "Mail sent." << oendl; |
327 | storeMail(data,size,"Sent"); | 333 | storeMail(data,size,"Sent"); |
328 | } | 334 | } |
329 | return result; | 335 | return result; |
330 | } | 336 | } |
331 | 337 | ||
332 | bool SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later ) | 338 | bool SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later ) |
333 | { | 339 | { |
334 | mailmime * mimeMail; | 340 | mailmime * mimeMail; |
335 | bool result = true; | 341 | bool result = true; |
336 | mimeMail = createMimeMail(mail ); | 342 | mimeMail = createMimeMail(mail ); |
337 | if ( mimeMail == 0 ) { | 343 | if ( mimeMail == 0 ) { |
338 | qDebug("SMTP wrapper:Error creating mail! "); | 344 | qDebug("SMTP wrapper:Error creating mail! "); |
339 | return false; | 345 | return false; |
340 | } else { | 346 | } else { |
341 | sendProgress = new progressMailSend(); | 347 | sendProgress = new progressMailSend(); |
342 | sendProgress->show(); | 348 | sendProgress->show(); |
343 | sendProgress->setMaxMails(1); | 349 | sendProgress->setMaxMails(1); |
344 | result = smtpSend( mimeMail,later); | 350 | result = smtpSend( mimeMail,later); |
345 | ; // odebug << "Clean up done" << oendl; | 351 | ; // odebug << "Clean up done" << oendl; |
346 | sendProgress->hide(); | 352 | sendProgress->hide(); |
347 | delete sendProgress; | 353 | delete sendProgress; |
348 | sendProgress = 0; | 354 | sendProgress = 0; |
349 | mailmime_free( mimeMail ); | 355 | mailmime_free( mimeMail ); |
356 | if ( m_smtp ) { | ||
357 | mailsmtp_free(m_smtp); | ||
358 | m_smtp = 0; | ||
359 | } | ||
350 | } | 360 | } |
351 | return result; | 361 | return result; |
352 | } | 362 | } |
353 | 363 | ||
354 | int SMTPwrapper::sendQueuedMail(AbstractMail*wrap,const RecMailP&which) { | 364 | int SMTPwrapper::sendQueuedMail(AbstractMail*wrap,const RecMailP&which) { |
355 | size_t curTok = 0; | 365 | size_t curTok = 0; |
356 | mailimf_fields *fields = 0; | 366 | mailimf_fields *fields = 0; |
357 | mailimf_field*ffrom = 0; | 367 | mailimf_field*ffrom = 0; |
358 | clist *rcpts = 0; | 368 | clist *rcpts = 0; |
359 | char*from = 0; | 369 | char*from = 0; |
360 | int res = 0; | 370 | int res = 0; |
361 | 371 | ||
362 | encodedString * data = wrap->fetchRawBody(which); | 372 | encodedString * data = wrap->fetchRawBody(which); |
363 | if (!data) | 373 | if (!data) |
364 | return 0; | 374 | return 0; |
365 | int err = mailimf_fields_parse( data->Content(), data->Length(), &curTok, &fields ); | 375 | int err = mailimf_fields_parse( data->Content(), data->Length(), &curTok, &fields ); |
366 | if (err != MAILIMF_NO_ERROR) { | 376 | if (err != MAILIMF_NO_ERROR) { |
367 | delete data; | 377 | delete data; |
368 | delete wrap; | 378 | delete wrap; |
369 | return 0; | 379 | return 0; |
370 | } | 380 | } |
371 | 381 | ||
372 | rcpts = createRcptList( fields ); | 382 | rcpts = createRcptList( fields ); |
373 | ffrom = getField(fields, MAILIMF_FIELD_FROM ); | 383 | ffrom = getField(fields, MAILIMF_FIELD_FROM ); |
374 | from = getFrom(ffrom); | 384 | from = getFrom(ffrom); |
375 | 385 | ||
376 | if (rcpts && from) { | 386 | if (rcpts && from) { |
377 | res = smtpSend(from,rcpts,data->Content(),data->Length()); | 387 | res = smtpSend(from,rcpts,data->Content(),data->Length()); |
378 | } | 388 | } |
379 | if (fields) { | 389 | if (fields) { |
380 | mailimf_fields_free(fields); | 390 | mailimf_fields_free(fields); |
381 | fields = 0; | 391 | fields = 0; |
382 | } | 392 | } |
383 | if (data) { | 393 | if (data) { |
384 | delete data; | 394 | delete data; |
385 | } | 395 | } |
386 | if (from) { | 396 | if (from) { |
387 | free(from); | 397 | free(from); |
388 | } | 398 | } |
389 | if (rcpts) { | 399 | if (rcpts) { |
390 | smtp_address_list_free( rcpts ); | 400 | smtp_address_list_free( rcpts ); |
391 | } | 401 | } |
392 | return res; | 402 | return res; |
393 | } | 403 | } |
394 | 404 | ||
395 | /* this is a special fun */ | 405 | /* this is a special fun */ |
396 | bool SMTPwrapper::flushOutbox() { | 406 | bool SMTPwrapper::flushOutbox() { |
397 | bool returnValue = true; | 407 | bool returnValue = true; |
398 | 408 | ||
399 | ; // odebug << "Sending the queue" << oendl; | 409 | ; // odebug << "Sending the queue" << oendl; |
400 | if (!m_SmtpAccount) { | 410 | if (!m_SmtpAccount) { |
401 | ; // odebug << "No smtp account given" << oendl; | 411 | ; // odebug << "No smtp account given" << oendl; |
402 | return false; | 412 | return false; |
403 | } | 413 | } |
404 | 414 | ||
405 | bool reset_user_value = false; | 415 | bool reset_user_value = false; |
406 | QString localfolders = AbstractMail::defaultLocalfolder(); | 416 | QString localfolders = AbstractMail::defaultLocalfolder(); |
407 | AbstractMail*wrap = AbstractMail::getWrapper(localfolders); | 417 | AbstractMail*wrap = AbstractMail::getWrapper(localfolders); |
408 | if (!wrap) { | 418 | if (!wrap) { |
409 | ; // odebug << "memory error" << oendl; | 419 | ; // odebug << "memory error" << oendl; |
410 | return false; | 420 | return false; |
411 | } | 421 | } |
412 | QString oldPw, oldUser; | 422 | QString oldPw, oldUser; |
413 | QValueList<RecMailP> mailsToSend; | 423 | QValueList<RecMailP> mailsToSend; |
414 | QValueList<RecMailP> mailsToRemove; | 424 | QValueList<RecMailP> mailsToRemove; |
415 | QString mbox("Outgoing"); | 425 | QString mbox("Outgoing"); |
416 | wrap->listMessages(mbox,mailsToSend); | 426 | wrap->listMessages(mbox,mailsToSend); |
417 | if (mailsToSend.count()==0) { | 427 | if (mailsToSend.count()==0) { |
418 | delete wrap; | 428 | delete wrap; |
419 | ; // odebug << "No mails to send" << oendl; | 429 | ; // odebug << "No mails to send" << oendl; |
420 | return false; | 430 | return false; |
421 | } | 431 | } |
422 | 432 | ||
423 | oldPw = m_SmtpAccount->getPassword(); | 433 | oldPw = m_SmtpAccount->getPassword(); |
424 | oldUser = m_SmtpAccount->getUser(); | 434 | oldUser = m_SmtpAccount->getUser(); |
425 | if (m_SmtpAccount->getLogin() && (m_SmtpAccount->getUser().isEmpty() || m_SmtpAccount->getPassword().isEmpty()) ) { | 435 | if (m_SmtpAccount->getLogin() && (m_SmtpAccount->getUser().isEmpty() || m_SmtpAccount->getPassword().isEmpty()) ) { |
426 | // get'em | 436 | // get'em |
427 | QString user,pass; | 437 | QString user,pass; |
428 | LoginDialog login( m_SmtpAccount->getUser(), m_SmtpAccount->getPassword(), NULL, 0, true ); | 438 | LoginDialog login( m_SmtpAccount->getUser(), m_SmtpAccount->getPassword(), NULL, 0, true ); |
429 | login.show(); | 439 | login.show(); |
430 | if ( QDialog::Accepted == login.exec() ) { | 440 | if ( QDialog::Accepted == login.exec() ) { |
431 | // ok | 441 | // ok |
432 | user = login.getUser().latin1(); | 442 | user = login.getUser().latin1(); |
433 | pass = login.getPassword().latin1(); | 443 | pass = login.getPassword().latin1(); |
434 | reset_user_value = true; | 444 | reset_user_value = true; |
435 | m_SmtpAccount->setUser(user); | 445 | m_SmtpAccount->setUser(user); |
436 | m_SmtpAccount->setPassword(pass); | 446 | m_SmtpAccount->setPassword(pass); |
437 | } else { | 447 | } else { |
438 | return true; | 448 | return true; |
439 | } | 449 | } |
440 | } | 450 | } |
441 | 451 | ||
442 | 452 | ||
443 | sendProgress = new progressMailSend(); | 453 | sendProgress = new progressMailSend(); |
444 | sendProgress->show(); | 454 | sendProgress->show(); |
445 | sendProgress->setMaxMails(mailsToSend.count()); | 455 | sendProgress->setMaxMails(mailsToSend.count()); |
446 | 456 | ||
447 | while (returnValue && mailsToSend.count()>0) { | 457 | while (returnValue && mailsToSend.count()>0) { |
448 | if (sendQueuedMail(wrap, (*mailsToSend.begin()))==0) { | 458 | if (sendQueuedMail(wrap, (*mailsToSend.begin()))==0) { |
449 | QMessageBox::critical(0,i18n("Error sending mail"), | 459 | QMessageBox::critical(0,i18n("Error sending mail"), |
450 | i18n("Error sending queued mail.\nBreaking.")); | 460 | i18n("Error sending queued mail.\nBreaking.")); |
451 | returnValue = false; | 461 | returnValue = false; |
452 | } | 462 | } |
453 | mailsToRemove.append((*mailsToSend.begin())); | 463 | mailsToRemove.append((*mailsToSend.begin())); |
454 | mailsToSend.remove(mailsToSend.begin()); | 464 | mailsToSend.remove(mailsToSend.begin()); |
455 | sendProgress->setCurrentMails(mailsToRemove.count()); | 465 | sendProgress->setCurrentMails(mailsToRemove.count()); |
456 | } | 466 | } |
457 | if (reset_user_value) { | 467 | if (reset_user_value) { |
458 | m_SmtpAccount->setUser(oldUser); | 468 | m_SmtpAccount->setUser(oldUser); |
459 | m_SmtpAccount->setPassword(oldPw); | 469 | m_SmtpAccount->setPassword(oldPw); |
460 | } | 470 | } |
471 | |||
461 | KConfig cfg( locateLocal("config", "kopiemailrc" ) ); | 472 | KConfig cfg( locateLocal("config", "kopiemailrc" ) ); |
462 | cfg.setGroup( "Status" ); | 473 | cfg.setGroup( "Status" ); |
463 | m_queuedMail = mailsToSend.count(); | 474 | m_queuedMail = mailsToSend.count(); |
464 | cfg.writeEntry( "outgoing", m_queuedMail ); | 475 | cfg.writeEntry( "outgoing", m_queuedMail ); |
465 | emit queuedMails( m_queuedMail ); | 476 | emit queuedMails( m_queuedMail ); |
466 | sendProgress->hide(); | 477 | sendProgress->hide(); |
467 | delete sendProgress; | 478 | delete sendProgress; |
468 | sendProgress = 0; | 479 | sendProgress = 0; |
469 | wrap->deleteMails(mbox,mailsToRemove); | 480 | wrap->deleteMails(mbox,mailsToRemove); |
470 | delete wrap; | 481 | delete wrap; |
482 | if ( m_smtp ) { | ||
483 | mailsmtp_free(m_smtp); | ||
484 | m_smtp = 0; | ||
485 | } | ||
471 | return returnValue; | 486 | return returnValue; |
472 | } | 487 | } |
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 710a9f9..f235705 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -1,1163 +1,1188 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 1999 Preston Brown | 3 | Copyright (c) 1999 Preston Brown |
4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <qlistview.h> | 25 | #include <qlistview.h> |
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qlabel.h> | 27 | #include <qlabel.h> |
28 | #include <qpopupmenu.h> | 28 | #include <qpopupmenu.h> |
29 | #include <qprogressbar.h> | 29 | #include <qprogressbar.h> |
30 | #include <qfileinfo.h> | 30 | #include <qfileinfo.h> |
31 | #include <qmessagebox.h> | 31 | #include <qmessagebox.h> |
32 | #include <qdialog.h> | 32 | #include <qdialog.h> |
33 | #include <qtextstream.h> | 33 | #include <qtextstream.h> |
34 | #include <qdir.h> | 34 | #include <qdir.h> |
35 | #include <qwhatsthis.h> | 35 | #include <qwhatsthis.h> |
36 | #include <qregexp.h> | 36 | #include <qregexp.h> |
37 | 37 | ||
38 | #include <klocale.h> | 38 | #include <klocale.h> |
39 | #include <kdebug.h> | 39 | #include <kdebug.h> |
40 | #include <kiconloader.h> | 40 | #include <kiconloader.h> |
41 | #include <kglobal.h> | 41 | #include <kglobal.h> |
42 | 42 | ||
43 | #include <libkdepim/kpimglobalprefs.h> | 43 | #include <libkdepim/kpimglobalprefs.h> |
44 | #include <libkcal/calendar.h> | 44 | #include <libkcal/calendar.h> |
45 | #include <libkcal/calendarlocal.h> | 45 | #include <libkcal/calendarlocal.h> |
46 | #include <libkcal/icalformat.h> | 46 | #include <libkcal/icalformat.h> |
47 | #include <libkcal/vcalformat.h> | 47 | #include <libkcal/vcalformat.h> |
48 | #include <libkcal/recurrence.h> | 48 | #include <libkcal/recurrence.h> |
49 | #include <libkcal/filestorage.h> | 49 | #include <libkcal/filestorage.h> |
50 | #include <libkdepim/categoryselectdialog.h> | 50 | #include <libkdepim/categoryselectdialog.h> |
51 | #include <libkcal/kincidenceformatter.h> | 51 | #include <libkcal/kincidenceformatter.h> |
52 | #ifndef DESKTOP_VERSION | 52 | #ifndef DESKTOP_VERSION |
53 | #include <qpe/qpeapplication.h> | 53 | #include <qpe/qpeapplication.h> |
54 | #else | 54 | #else |
55 | #include <qapplication.h> | 55 | #include <qapplication.h> |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | #ifndef KORG_NOPRINTER | 58 | #ifndef KORG_NOPRINTER |
59 | #include "calprinter.h" | 59 | #include "calprinter.h" |
60 | #endif | 60 | #endif |
61 | #include "koglobals.h" | 61 | #include "koglobals.h" |
62 | #include "koprefs.h" | 62 | #include "koprefs.h" |
63 | #include "kfiledialog.h" | 63 | #include "kfiledialog.h" |
64 | 64 | ||
65 | #include "kolistview.h" | 65 | #include "kolistview.h" |
66 | 66 | ||
67 | 67 | ||
68 | 68 | ||
69 | 69 | ||
70 | class KOListViewWhatsThis :public QWhatsThis | 70 | class KOListViewWhatsThis :public QWhatsThis |
71 | { | 71 | { |
72 | public: | 72 | public: |
73 | KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; | 73 | KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; |
74 | 74 | ||
75 | protected: | 75 | protected: |
76 | virtual QString text( const QPoint& p) | 76 | virtual QString text( const QPoint& p) |
77 | { | 77 | { |
78 | return _view->getWhatsThisText(p) ; | 78 | return _view->getWhatsThisText(p) ; |
79 | } | 79 | } |
80 | private: | 80 | private: |
81 | QWidget* _wid; | 81 | QWidget* _wid; |
82 | KOListView * _view; | 82 | KOListView * _view; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | 85 | ||
86 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) | 86 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) |
87 | { | 87 | { |
88 | mItem = item; | 88 | mItem = item; |
89 | mDate = date; | 89 | mDate = date; |
90 | } | 90 | } |
91 | 91 | ||
92 | ListItemVisitor::~ListItemVisitor() | 92 | ListItemVisitor::~ListItemVisitor() |
93 | { | 93 | { |
94 | } | 94 | } |
95 | 95 | ||
96 | bool ListItemVisitor::visit(Event *e) | 96 | bool ListItemVisitor::visit(Event *e) |
97 | { | 97 | { |
98 | 98 | ||
99 | bool ok = false; | 99 | bool ok = false; |
100 | QString start, end; | 100 | QString start, end; |
101 | QDate ds, de; | 101 | QDate ds, de; |
102 | if ( e->doesRecur() ) { | 102 | if ( e->doesRecur() ) { |
103 | ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); | 103 | ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); |
104 | if ( ok ) { | 104 | if ( ok ) { |
105 | int days = e->dtStart().date().daysTo(e->dtEnd().date() ); | 105 | int days = e->dtStart().date().daysTo(e->dtEnd().date() ); |
106 | start = KGlobal::locale()->formatDate(ds,true); | 106 | start = KGlobal::locale()->formatDate(ds,true); |
107 | de = ds.addDays( days); | 107 | de = ds.addDays( days); |
108 | end = KGlobal::locale()->formatDate(de,true); | 108 | end = KGlobal::locale()->formatDate(de,true); |
109 | } | 109 | } |
110 | 110 | ||
111 | } | 111 | } |
112 | if ( ! ok ) { | 112 | if ( ! ok ) { |
113 | start =e->dtStartDateStr(); | 113 | start =e->dtStartDateStr(); |
114 | end = e->dtEndDateStr(); | 114 | end = e->dtEndDateStr(); |
115 | ds = e->dtStart().date(); | 115 | ds = e->dtStart().date(); |
116 | de = e->dtEnd().date(); | 116 | de = e->dtEnd().date(); |
117 | } | 117 | } |
118 | mItem->setText(0,e->summary()); | 118 | mItem->setText(0,e->summary()); |
119 | mItem->setText(1,start); | 119 | mItem->setText(1,start); |
120 | mItem->setText(2,e->dtStartTimeStr()); | 120 | mItem->setText(2,e->dtStartTimeStr()); |
121 | mItem->setText(3,end); | 121 | mItem->setText(3,end); |
122 | mItem->setText(4,e->dtEndTimeStr()); | 122 | mItem->setText(4,e->dtEndTimeStr()); |
123 | mItem->setText(5,e->isAlarmEnabled() ? i18n("Yes") : i18n("No")); | 123 | mItem->setText(5,e->isAlarmEnabled() ? i18n("Yes") : i18n("No")); |
124 | mItem->setText(6, e->recurrence()->recurrenceText()); | 124 | mItem->setText(6, e->recurrence()->recurrenceText()); |
125 | mItem->setText(7,"---"); | 125 | mItem->setText(7,"---"); |
126 | mItem->setText(8,"---"); | 126 | mItem->setText(8,"---"); |
127 | mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); | 127 | mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); |
128 | mItem->setText(10,e->categoriesStr()); | 128 | mItem->setText(10,e->categoriesStr()); |
129 | 129 | ||
130 | QString key; | 130 | QString key; |
131 | QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); | 131 | QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); |
132 | key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); | 132 | key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); |
133 | mItem->setSortKey(1,key); | 133 | mItem->setSortKey(1,key); |
134 | 134 | ||
135 | t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); | 135 | t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); |
136 | key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); | 136 | key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); |
137 | mItem->setSortKey(3,key); | 137 | mItem->setSortKey(3,key); |
138 | 138 | ||
139 | return true; | 139 | return true; |
140 | } | 140 | } |
141 | 141 | ||
142 | bool ListItemVisitor::visit(Todo *t) | 142 | bool ListItemVisitor::visit(Todo *t) |
143 | { | 143 | { |
144 | mItem->setText(0,i18n("Todo: %1").arg(t->summary())); | 144 | mItem->setText(0,i18n("Todo: %1").arg(t->summary())); |
145 | if (t->hasStartDate()) { | 145 | if (t->hasStartDate()) { |
146 | mItem->setText(1,t->dtStartDateStr()); | 146 | mItem->setText(1,t->dtStartDateStr()); |
147 | if (t->doesFloat()) { | 147 | if (t->doesFloat()) { |
148 | mItem->setText(2,"---"); | 148 | mItem->setText(2,"---"); |
149 | } else { | 149 | } else { |
150 | mItem->setText(2,t->dtStartTimeStr()); | 150 | mItem->setText(2,t->dtStartTimeStr()); |
151 | } | 151 | } |
152 | } else { | 152 | } else { |
153 | mItem->setText(1,"---"); | 153 | mItem->setText(1,"---"); |
154 | mItem->setText(2,"---"); | 154 | mItem->setText(2,"---"); |
155 | } | 155 | } |
156 | mItem->setText(3,"---"); | 156 | mItem->setText(3,"---"); |
157 | mItem->setText(4,"---"); | 157 | mItem->setText(4,"---"); |
158 | mItem->setText(5,t->isAlarmEnabled() ? i18n("Yes") : i18n("No")); | 158 | mItem->setText(5,t->isAlarmEnabled() ? i18n("Yes") : i18n("No")); |
159 | mItem->setText(6, t->recurrence()->recurrenceText()); | 159 | mItem->setText(6, t->recurrence()->recurrenceText()); |
160 | if (t->hasDueDate()) { | 160 | if (t->hasDueDate()) { |
161 | mItem->setText(7,t->dtDueDateStr()); | 161 | mItem->setText(7,t->dtDueDateStr()); |
162 | if (t->doesFloat()) { | 162 | if (t->doesFloat()) { |
163 | mItem->setText(8,"---"); | 163 | mItem->setText(8,"---"); |
164 | } else { | 164 | } else { |
165 | mItem->setText(8,t->dtDueTimeStr()); | 165 | mItem->setText(8,t->dtDueTimeStr()); |
166 | } | 166 | } |
167 | } else { | 167 | } else { |
168 | mItem->setText(7,"---"); | 168 | mItem->setText(7,"---"); |
169 | mItem->setText(8,"---"); | 169 | mItem->setText(8,"---"); |
170 | } | 170 | } |
171 | mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); | 171 | mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); |
172 | mItem->setText(10,t->categoriesStr()); | 172 | mItem->setText(10,t->categoriesStr()); |
173 | 173 | ||
174 | QString key; | 174 | QString key; |
175 | QDate d; | 175 | QDate d; |
176 | if (t->hasDueDate()) { | 176 | if (t->hasDueDate()) { |
177 | d = t->dtDue().date(); | 177 | d = t->dtDue().date(); |
178 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); | 178 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); |
179 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 179 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
180 | mItem->setSortKey(7,key); | 180 | mItem->setSortKey(7,key); |
181 | } | 181 | } |
182 | if ( t->hasStartDate() ) { | 182 | if ( t->hasStartDate() ) { |
183 | d = t->dtStart().date(); | 183 | d = t->dtStart().date(); |
184 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); | 184 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); |
185 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 185 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
186 | mItem->setSortKey(1,key); | 186 | mItem->setSortKey(1,key); |
187 | } | 187 | } |
188 | return true; | 188 | return true; |
189 | } | 189 | } |
190 | 190 | ||
191 | bool ListItemVisitor::visit(Journal * j) | 191 | bool ListItemVisitor::visit(Journal * j) |
192 | { | 192 | { |
193 | QString des = j->description().left(30); | 193 | QString des = j->description().left(30); |
194 | des = des.simplifyWhiteSpace (); | 194 | des = des.simplifyWhiteSpace (); |
195 | des.replace (QRegExp ("\\n"),"" ); | 195 | des.replace (QRegExp ("\\n"),"" ); |
196 | des.replace (QRegExp ("\\r"),"" ); | 196 | des.replace (QRegExp ("\\r"),"" ); |
197 | mItem->setText(0,i18n("Journal: ")+des.left(25)); | 197 | mItem->setText(0,i18n("Journal: ")+des.left(25)); |
198 | mItem->setText(1,j->dtStartDateStr()); | 198 | mItem->setText(1,j->dtStartDateStr()); |
199 | mItem->setText(2,"---"); | 199 | mItem->setText(2,"---"); |
200 | mItem->setText(3,"---"); | 200 | mItem->setText(3,"---"); |
201 | mItem->setText(4,"---"); | 201 | mItem->setText(4,"---"); |
202 | mItem->setText(5,"---"); | 202 | mItem->setText(5,"---"); |
203 | mItem->setText(6,"---"); | 203 | mItem->setText(6,"---"); |
204 | mItem->setText(7,j->dtStartDateStr()); | 204 | mItem->setText(7,j->dtStartDateStr()); |
205 | mItem->setText(8,"---"); | 205 | mItem->setText(8,"---"); |
206 | mItem->setText(9,"---"); | 206 | mItem->setText(9,"---"); |
207 | mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); | 207 | mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); |
208 | 208 | ||
209 | QString key; | 209 | QString key; |
210 | QDate d = j->dtStart().date(); | 210 | QDate d = j->dtStart().date(); |
211 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); | 211 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); |
212 | mItem->setSortKey(1,key); | 212 | mItem->setSortKey(1,key); |
213 | mItem->setSortKey(7,key); | 213 | mItem->setSortKey(7,key); |
214 | 214 | ||
215 | return true; | 215 | return true; |
216 | } | 216 | } |
217 | 217 | ||
218 | KOListView::KOListView(Calendar *calendar, QWidget *parent, | 218 | KOListView::KOListView(Calendar *calendar, QWidget *parent, |
219 | const char *name) | 219 | const char *name) |
220 | : KOEventView(calendar, parent, name) | 220 | : KOEventView(calendar, parent, name) |
221 | { | 221 | { |
222 | mActiveItem = 0; | 222 | mActiveItem = 0; |
223 | mListView = new KOListViewListView(this); | 223 | mListView = new KOListViewListView(this); |
224 | mListView->addColumn(i18n("Summary")); | 224 | mListView->addColumn(i18n("Summary")); |
225 | mListView->addColumn(i18n("Start Date")); | 225 | mListView->addColumn(i18n("Start Date")); |
226 | mListView->addColumn(i18n("Start Time")); | 226 | mListView->addColumn(i18n("Start Time")); |
227 | mListView->addColumn(i18n("End Date")); | 227 | mListView->addColumn(i18n("End Date")); |
228 | mListView->addColumn(i18n("End Time")); | 228 | mListView->addColumn(i18n("End Time")); |
229 | mListView->addColumn(i18n("Alarm")); // alarm set? | 229 | mListView->addColumn(i18n("Alarm")); // alarm set? |
230 | mListView->addColumn(i18n("Recurs")); // recurs? | 230 | mListView->addColumn(i18n("Recurs")); // recurs? |
231 | mListView->addColumn(i18n("Due Date")); | 231 | mListView->addColumn(i18n("Due Date")); |
232 | mListView->addColumn(i18n("Due Time")); | 232 | mListView->addColumn(i18n("Due Time")); |
233 | mListView->addColumn(i18n("Cancelled")); | 233 | mListView->addColumn(i18n("Cancelled")); |
234 | mListView->addColumn(i18n("Categories")); | 234 | mListView->addColumn(i18n("Categories")); |
235 | 235 | ||
236 | mListView->setColumnAlignment(0,AlignLeft); | 236 | mListView->setColumnAlignment(0,AlignLeft); |
237 | mListView->setColumnAlignment(1,AlignLeft); | 237 | mListView->setColumnAlignment(1,AlignLeft); |
238 | mListView->setColumnAlignment(2,AlignHCenter); | 238 | mListView->setColumnAlignment(2,AlignHCenter); |
239 | mListView->setColumnAlignment(3,AlignLeft); | 239 | mListView->setColumnAlignment(3,AlignLeft); |
240 | mListView->setColumnAlignment(4,AlignHCenter); | 240 | mListView->setColumnAlignment(4,AlignHCenter); |
241 | mListView->setColumnAlignment(5,AlignLeft); | 241 | mListView->setColumnAlignment(5,AlignLeft); |
242 | mListView->setColumnAlignment(6,AlignLeft); | 242 | mListView->setColumnAlignment(6,AlignLeft); |
243 | mListView->setColumnAlignment(7,AlignLeft); | 243 | mListView->setColumnAlignment(7,AlignLeft); |
244 | mListView->setColumnAlignment(8,AlignLeft); | 244 | mListView->setColumnAlignment(8,AlignLeft); |
245 | mListView->setColumnAlignment(9,AlignLeft); | 245 | mListView->setColumnAlignment(9,AlignLeft); |
246 | mListView->setColumnAlignment(10,AlignLeft); | 246 | mListView->setColumnAlignment(10,AlignLeft); |
247 | mListView->setColumnWidthMode(10, QListView::Manual); | 247 | mListView->setColumnWidthMode(10, QListView::Manual); |
248 | new KOListViewWhatsThis(mListView->viewport(),this); | 248 | new KOListViewWhatsThis(mListView->viewport(),this); |
249 | 249 | ||
250 | int iii = 0; | 250 | int iii = 0; |
251 | for ( iii = 0; iii< 10 ; ++iii ) | 251 | for ( iii = 0; iii< 10 ; ++iii ) |
252 | mListView->setColumnWidthMode( iii, QListView::Manual ); | 252 | mListView->setColumnWidthMode( iii, QListView::Manual ); |
253 | 253 | ||
254 | QBoxLayout *layoutTop = new QVBoxLayout(this); | 254 | QBoxLayout *layoutTop = new QVBoxLayout(this); |
255 | layoutTop->addWidget(mListView); | 255 | layoutTop->addWidget(mListView); |
256 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 256 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
257 | mPopupMenu = eventPopup(); | 257 | mPopupMenu = eventPopup(); |
258 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 258 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
259 | i18n("Select all"),this, | 259 | i18n("Select all"),this, |
260 | SLOT(allSelection()),true); | 260 | SLOT(allSelection()),true); |
261 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 261 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
262 | i18n("Deselect all"),this, | 262 | i18n("Deselect all"),this, |
263 | SLOT(clearSelection()),true); | 263 | SLOT(clearSelection()),true); |
264 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 264 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
265 | i18n("Delete all selected"),this, | 265 | i18n("Delete all selected"),this, |
266 | SLOT(deleteAll()),true); | 266 | SLOT(deleteAll()),true); |
267 | mPopupMenu->insertSeparator(); | 267 | mPopupMenu->insertSeparator(); |
268 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 268 | QPopupMenu * exportPO = new QPopupMenu ( this ); |
269 | i18n("Save selected to file..."),this, | 269 | mPopupMenu->insertItem( i18n("Export selected"), exportPO ); |
270 | SLOT(saveToFile()),true); | 270 | exportPO->insertItem( i18n("As iCal (ics) file..."),this, |
271 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 271 | SLOT(saveToFile())); |
272 | i18n("Save Journal/Description..."),this, | 272 | exportPO->insertItem( i18n("As vCal (vcs) file..."),this, |
273 | SLOT(saveDescriptionToFile()),true); | 273 | SLOT(saveToFileVCS())); |
274 | exportPO->insertItem( i18n("Journal/Details..."),this, | ||
275 | SLOT(saveDescriptionToFile())); | ||
274 | // mPopupMenu->insertSeparator(); | 276 | // mPopupMenu->insertSeparator(); |
275 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 277 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
276 | i18n("Add Categ. to selected..."),this, | 278 | i18n("Add Categ. to selected..."),this, |
277 | SLOT(addCat()),true); | 279 | SLOT(addCat()),true); |
278 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 280 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
279 | i18n("Set Categ. for selected..."),this, | 281 | i18n("Set Categ. for selected..."),this, |
280 | SLOT(setCat()),true); | 282 | SLOT(setCat()),true); |
281 | //mPopupMenu->insertSeparator(); | 283 | //mPopupMenu->insertSeparator(); |
282 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 284 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
283 | i18n("Set alarm for selected..."),this, | 285 | i18n("Set alarm for selected..."),this, |
284 | SLOT(setAlarm()),true); | 286 | SLOT(setAlarm()),true); |
285 | 287 | ||
286 | 288 | ||
287 | #ifndef DESKTOP_VERSION | 289 | #ifndef DESKTOP_VERSION |
288 | mPopupMenu->insertSeparator(); | 290 | mPopupMenu->insertSeparator(); |
289 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 291 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
290 | i18n("Beam selected via IR"),this, | 292 | i18n("Beam selected via IR"),this, |
291 | SLOT(beamSelected()),true); | 293 | SLOT(beamSelected()),true); |
292 | #endif | 294 | #endif |
293 | /* | 295 | /* |
294 | mPopupMenu = new QPopupMenu; | 296 | mPopupMenu = new QPopupMenu; |
295 | mPopupMenu->insertItem(i18n("Edit Event"), this, | 297 | mPopupMenu->insertItem(i18n("Edit Event"), this, |
296 | SLOT (editEvent())); | 298 | SLOT (editEvent())); |
297 | mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, | 299 | mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, |
298 | SLOT (deleteEvent())); | 300 | SLOT (deleteEvent())); |
299 | mPopupMenu->insertSeparator(); | 301 | mPopupMenu->insertSeparator(); |
300 | mPopupMenu->insertItem(i18n("Show Dates"), this, | 302 | mPopupMenu->insertItem(i18n("Show Dates"), this, |
301 | SLOT(showDates())); | 303 | SLOT(showDates())); |
302 | mPopupMenu->insertItem(i18n("Hide Dates"), this, | 304 | mPopupMenu->insertItem(i18n("Hide Dates"), this, |
303 | SLOT(hideDates())); | 305 | SLOT(hideDates())); |
304 | */ | 306 | */ |
305 | QObject::connect(mListView,SIGNAL( newEvent()), | 307 | QObject::connect(mListView,SIGNAL( newEvent()), |
306 | this,SIGNAL(signalNewEvent())); | 308 | this,SIGNAL(signalNewEvent())); |
307 | QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), | 309 | QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), |
308 | this,SLOT(defaultItemAction(QListViewItem *))); | 310 | this,SLOT(defaultItemAction(QListViewItem *))); |
309 | QObject::connect(mListView,SIGNAL(rightButtonClicked ( QListViewItem *, | 311 | QObject::connect(mListView,SIGNAL(rightButtonClicked ( QListViewItem *, |
310 | const QPoint &, int )), | 312 | const QPoint &, int )), |
311 | this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); | 313 | this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); |
312 | QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), | 314 | QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), |
313 | SLOT(processSelectionChange(QListViewItem *))); | 315 | SLOT(processSelectionChange(QListViewItem *))); |
314 | QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), | 316 | QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), |
315 | SIGNAL(showIncidenceSignal(Incidence *)) ); | 317 | SIGNAL(showIncidenceSignal(Incidence *)) ); |
316 | 318 | ||
317 | readSettings(KOGlobals::config(),"KOListView Layout"); | 319 | readSettings(KOGlobals::config(),"KOListView Layout"); |
318 | } | 320 | } |
319 | 321 | ||
320 | KOListView::~KOListView() | 322 | KOListView::~KOListView() |
321 | { | 323 | { |
322 | delete mPopupMenu; | 324 | delete mPopupMenu; |
323 | } | 325 | } |
324 | QString KOListView::getWhatsThisText(QPoint p) | 326 | QString KOListView::getWhatsThisText(QPoint p) |
325 | { | 327 | { |
326 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); | 328 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); |
327 | if ( item ) | 329 | if ( item ) |
328 | return KIncidenceFormatter::instance()->getFormattedText( item->data(), | 330 | return KIncidenceFormatter::instance()->getFormattedText( item->data(), |
329 | KOPrefs::instance()->mWTshowDetails, | 331 | KOPrefs::instance()->mWTshowDetails, |
330 | KOPrefs::instance()->mWTshowCreated, | 332 | KOPrefs::instance()->mWTshowCreated, |
331 | KOPrefs::instance()->mWTshowChanged); | 333 | KOPrefs::instance()->mWTshowChanged); |
332 | return i18n("That is the list view" ); | 334 | return i18n("That is the list view" ); |
333 | 335 | ||
334 | } | 336 | } |
335 | 337 | ||
336 | void KOListView::updateList() | 338 | void KOListView::updateList() |
337 | { | 339 | { |
338 | // qDebug(" KOListView::updateList() "); | 340 | // qDebug(" KOListView::updateList() "); |
339 | 341 | ||
340 | } | 342 | } |
341 | 343 | ||
342 | void KOListView::addCat( ) | 344 | void KOListView::addCat( ) |
343 | { | 345 | { |
344 | setCategories( false ); | 346 | setCategories( false ); |
345 | } | 347 | } |
346 | void KOListView::setCat() | 348 | void KOListView::setCat() |
347 | { | 349 | { |
348 | setCategories( true ); | 350 | setCategories( true ); |
349 | } | 351 | } |
350 | void KOListView::setAlarm() | 352 | void KOListView::setAlarm() |
351 | { | 353 | { |
352 | KOAlarmPrefs kap( this); | 354 | KOAlarmPrefs kap( this); |
353 | if ( !kap.exec() ) | 355 | if ( !kap.exec() ) |
354 | return; | 356 | return; |
355 | 357 | ||
356 | 358 | ||
357 | QStringList itemList; | 359 | QStringList itemList; |
358 | QPtrList<KOListViewItem> sel ; | 360 | QPtrList<KOListViewItem> sel ; |
359 | QListViewItem *qitem = mListView->firstChild (); | 361 | QListViewItem *qitem = mListView->firstChild (); |
360 | while ( qitem ) { | 362 | while ( qitem ) { |
361 | if ( qitem->isSelected() ) { | 363 | if ( qitem->isSelected() ) { |
362 | Incidence* inc = ((KOListViewItem *) qitem)->data(); | 364 | Incidence* inc = ((KOListViewItem *) qitem)->data(); |
363 | if ( inc->type() != "Journal" ) { | 365 | if ( inc->type() != "Journal" ) { |
364 | if ( inc->type() == "Todo" ) { | 366 | if ( inc->type() == "Todo" ) { |
365 | if ( ((Todo*)inc)->hasDueDate() ) | 367 | if ( ((Todo*)inc)->hasDueDate() ) |
366 | sel.append(((KOListViewItem *)qitem)); | 368 | sel.append(((KOListViewItem *)qitem)); |
367 | } else | 369 | } else |
368 | sel.append(((KOListViewItem *)qitem)); | 370 | sel.append(((KOListViewItem *)qitem)); |
369 | } | 371 | } |
370 | } | 372 | } |
371 | qitem = qitem->nextSibling(); | 373 | qitem = qitem->nextSibling(); |
372 | } | 374 | } |
373 | int count = 0; | 375 | int count = 0; |
374 | KOListViewItem * item, *temp; | 376 | KOListViewItem * item, *temp; |
375 | item = sel.first(); | 377 | item = sel.first(); |
376 | Incidence* inc; | 378 | Incidence* inc; |
377 | while ( item ) { | 379 | while ( item ) { |
378 | inc = item->data(); | 380 | inc = item->data(); |
379 | ++count; | 381 | ++count; |
380 | if (kap.mAlarmButton->isChecked()) { | 382 | if (kap.mAlarmButton->isChecked()) { |
381 | if (inc->alarms().count() == 0) | 383 | if (inc->alarms().count() == 0) |
382 | inc->newAlarm(); | 384 | inc->newAlarm(); |
383 | QPtrList<Alarm> alarms = inc->alarms(); | 385 | QPtrList<Alarm> alarms = inc->alarms(); |
384 | Alarm *alarm; | 386 | Alarm *alarm; |
385 | for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { | 387 | for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { |
386 | alarm->setEnabled(true); | 388 | alarm->setEnabled(true); |
387 | int j = kap.mAlarmTimeEdit->value()* -60; | 389 | int j = kap.mAlarmTimeEdit->value()* -60; |
388 | if (kap.mAlarmIncrCombo->currentItem() == 1) | 390 | if (kap.mAlarmIncrCombo->currentItem() == 1) |
389 | j = j * 60; | 391 | j = j * 60; |
390 | else if (kap.mAlarmIncrCombo->currentItem() == 2) | 392 | else if (kap.mAlarmIncrCombo->currentItem() == 2) |
391 | j = j * (60 * 24); | 393 | j = j * (60 * 24); |
392 | alarm->setStartOffset( j ); | 394 | alarm->setStartOffset( j ); |
393 | 395 | ||
394 | if (!kap.mAlarmProgram.isEmpty() && kap.mAlarmProgramButton->isOn()) { | 396 | if (!kap.mAlarmProgram.isEmpty() && kap.mAlarmProgramButton->isOn()) { |
395 | alarm->setProcedureAlarm(kap.mAlarmProgram); | 397 | alarm->setProcedureAlarm(kap.mAlarmProgram); |
396 | } | 398 | } |
397 | else if (!kap.mAlarmSound.isEmpty() && kap.mAlarmSoundButton->isOn()) | 399 | else if (!kap.mAlarmSound.isEmpty() && kap.mAlarmSoundButton->isOn()) |
398 | alarm->setAudioAlarm(kap.mAlarmSound); | 400 | alarm->setAudioAlarm(kap.mAlarmSound); |
399 | else | 401 | else |
400 | alarm->setType(Alarm::Invalid); | 402 | alarm->setType(Alarm::Invalid); |
401 | //alarm->setAudioAlarm("default"); | 403 | //alarm->setAudioAlarm("default"); |
402 | // TODO: Deal with multiple alarms | 404 | // TODO: Deal with multiple alarms |
403 | break; // For now, stop after the first alarm | 405 | break; // For now, stop after the first alarm |
404 | } | 406 | } |
405 | } else { | 407 | } else { |
406 | Alarm* alarm = inc->alarms().first(); | 408 | Alarm* alarm = inc->alarms().first(); |
407 | if ( alarm ) { | 409 | if ( alarm ) { |
408 | alarm->setEnabled(false); | 410 | alarm->setEnabled(false); |
409 | alarm->setType(Alarm::Invalid); | 411 | alarm->setType(Alarm::Invalid); |
410 | } | 412 | } |
411 | } | 413 | } |
412 | temp = item; | 414 | temp = item; |
413 | item = sel.next(); | 415 | item = sel.next(); |
414 | mUidDict.remove( inc->uid() ); | 416 | mUidDict.remove( inc->uid() ); |
415 | delete temp;; | 417 | delete temp;; |
416 | addIncidence( inc ); | 418 | addIncidence( inc ); |
417 | } | 419 | } |
418 | topLevelWidget()->setCaption( i18n("Canged alarm for %1 items").arg( count ) ); | 420 | topLevelWidget()->setCaption( i18n("Canged alarm for %1 items").arg( count ) ); |
419 | qDebug("KO: Set alarm for %d items", count); | 421 | qDebug("KO: Set alarm for %d items", count); |
420 | calendar()->reInitAlarmSettings(); | 422 | calendar()->reInitAlarmSettings(); |
421 | } | 423 | } |
422 | void KOListView::setCategories( bool removeOld ) | 424 | void KOListView::setCategories( bool removeOld ) |
423 | { | 425 | { |
424 | 426 | ||
425 | KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); | 427 | KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); |
426 | if (! csd->exec()) { | 428 | if (! csd->exec()) { |
427 | delete csd; | 429 | delete csd; |
428 | return; | 430 | return; |
429 | } | 431 | } |
430 | QStringList catList = csd->selectedCategories(); | 432 | QStringList catList = csd->selectedCategories(); |
431 | delete csd; | 433 | delete csd; |
432 | // if ( catList.count() == 0 ) | 434 | // if ( catList.count() == 0 ) |
433 | // return; | 435 | // return; |
434 | catList.sort(); | 436 | catList.sort(); |
435 | QString categoriesStr = catList.join(","); | 437 | QString categoriesStr = catList.join(","); |
436 | int i; | 438 | int i; |
437 | QStringList itemList; | 439 | QStringList itemList; |
438 | QPtrList<KOListViewItem> sel ; | 440 | QPtrList<KOListViewItem> sel ; |
439 | QListViewItem *qitem = mListView->firstChild (); | 441 | QListViewItem *qitem = mListView->firstChild (); |
440 | while ( qitem ) { | 442 | while ( qitem ) { |
441 | if ( qitem->isSelected() ) { | 443 | if ( qitem->isSelected() ) { |
442 | sel.append(((KOListViewItem *)qitem)); | 444 | sel.append(((KOListViewItem *)qitem)); |
443 | } | 445 | } |
444 | qitem = qitem->nextSibling(); | 446 | qitem = qitem->nextSibling(); |
445 | } | 447 | } |
446 | KOListViewItem * item, *temp; | 448 | KOListViewItem * item, *temp; |
447 | item = sel.first(); | 449 | item = sel.first(); |
448 | Incidence* inc; | 450 | Incidence* inc; |
449 | while ( item ) { | 451 | while ( item ) { |
450 | inc = item->data(); | 452 | inc = item->data(); |
451 | if ( removeOld ) { | 453 | if ( removeOld ) { |
452 | inc->setCategories( categoriesStr ); | 454 | inc->setCategories( categoriesStr ); |
453 | } else { | 455 | } else { |
454 | itemList = QStringList::split (",", inc->categoriesStr() ); | 456 | itemList = QStringList::split (",", inc->categoriesStr() ); |
455 | for( i = 0; i< catList.count(); ++i ) { | 457 | for( i = 0; i< catList.count(); ++i ) { |
456 | if ( !itemList.contains (catList[i])) | 458 | if ( !itemList.contains (catList[i])) |
457 | itemList.append( catList[i] ); | 459 | itemList.append( catList[i] ); |
458 | } | 460 | } |
459 | itemList.sort(); | 461 | itemList.sort(); |
460 | inc->setCategories( itemList.join(",") ); | 462 | inc->setCategories( itemList.join(",") ); |
461 | } | 463 | } |
462 | temp = item; | 464 | temp = item; |
463 | item = sel.next(); | 465 | item = sel.next(); |
464 | mUidDict.remove( inc->uid() ); | 466 | mUidDict.remove( inc->uid() ); |
465 | delete temp;; | 467 | delete temp;; |
466 | addIncidence( inc ); | 468 | addIncidence( inc ); |
467 | } | 469 | } |
468 | } | 470 | } |
469 | 471 | ||
470 | void KOListView::beamSelected() | 472 | void KOListView::beamSelected() |
471 | { | 473 | { |
472 | int icount = 0; | 474 | int icount = 0; |
473 | QPtrList<Incidence> delSel ; | 475 | QPtrList<Incidence> delSel ; |
474 | QListViewItem *item = mListView->firstChild (); | 476 | QListViewItem *item = mListView->firstChild (); |
475 | while ( item ) { | 477 | while ( item ) { |
476 | if ( item->isSelected() ) { | 478 | if ( item->isSelected() ) { |
477 | delSel.append(((KOListViewItem *)item)->data()); | 479 | delSel.append(((KOListViewItem *)item)->data()); |
478 | ++icount; | 480 | ++icount; |
479 | } | 481 | } |
480 | 482 | ||
481 | item = item->nextSibling(); | 483 | item = item->nextSibling(); |
482 | } | 484 | } |
483 | if ( icount ) { | 485 | if ( icount ) { |
484 | emit beamIncidenceList( delSel ); | 486 | emit beamIncidenceList( delSel ); |
485 | return; | 487 | return; |
486 | QString fn ; | 488 | QString fn ; |
487 | fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs"; | 489 | fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs"; |
488 | QString mes; | 490 | QString mes; |
489 | bool createbup = true; | 491 | bool createbup = true; |
490 | if ( createbup ) { | 492 | if ( createbup ) { |
491 | QString description = "\n"; | 493 | QString description = "\n"; |
492 | CalendarLocal* cal = new CalendarLocal(); | 494 | CalendarLocal* cal = new CalendarLocal(); |
493 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 495 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
494 | Incidence *incidence = delSel.first(); | 496 | Incidence *incidence = delSel.first(); |
495 | while ( incidence ) { | 497 | while ( incidence ) { |
496 | Incidence *in = incidence->clone(); | 498 | Incidence *in = incidence->clone(); |
497 | description += in->summary() + "\n"; | 499 | description += in->summary() + "\n"; |
498 | cal->addIncidence( in ); | 500 | cal->addIncidence( in ); |
499 | incidence = delSel.next(); | 501 | incidence = delSel.next(); |
500 | } | 502 | } |
501 | FileStorage storage( cal, fn, new VCalFormat ); | 503 | FileStorage storage( cal, fn, new VCalFormat ); |
502 | storage.save(); | 504 | storage.save(); |
503 | delete cal; | 505 | delete cal; |
504 | mes = i18n("KO/Pi: Ready for beaming"); | 506 | mes = i18n("KO/Pi: Ready for beaming"); |
505 | topLevelWidget()->setCaption(mes); | 507 | topLevelWidget()->setCaption(mes); |
506 | 508 | ||
507 | #ifndef DESKTOP_VERSION | 509 | #ifndef DESKTOP_VERSION |
508 | Ir *ir = new Ir( this ); | 510 | Ir *ir = new Ir( this ); |
509 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); | 511 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); |
510 | ir->send( fn, description, "text/x-vCalendar" ); | 512 | ir->send( fn, description, "text/x-vCalendar" ); |
511 | #endif | 513 | #endif |
512 | } | 514 | } |
513 | } | 515 | } |
514 | } | 516 | } |
515 | void KOListView::beamDone( Ir *ir ) | 517 | void KOListView::beamDone( Ir *ir ) |
516 | { | 518 | { |
517 | #ifndef DESKTOP_VERSION | 519 | #ifndef DESKTOP_VERSION |
518 | delete ir; | 520 | delete ir; |
519 | #endif | 521 | #endif |
520 | topLevelWidget()->setCaption(i18n("KO/Pi:Beaming done")); | 522 | topLevelWidget()->setCaption(i18n("KO/Pi:Beaming done")); |
521 | } | 523 | } |
522 | 524 | ||
523 | void KOListView::saveDescriptionToFile() | 525 | void KOListView::saveDescriptionToFile() |
524 | { | 526 | { |
525 | 527 | ||
526 | int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"), | 528 | int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"), |
527 | i18n("This saves the text/details of selected\nJournals and Events/Todos\nto a text file."), | 529 | i18n("This saves the text/details of selected\nJournals and Events/Todos\nto a text file."), |
528 | i18n("Continue"), i18n("Cancel"), 0, | 530 | i18n("Continue"), i18n("Cancel"), 0, |
529 | 0, 1 ); | 531 | 0, 1 ); |
530 | if ( result != 0 ) { | 532 | if ( result != 0 ) { |
531 | return; | 533 | return; |
532 | } | 534 | } |
533 | int icount = 0; | 535 | int icount = 0; |
534 | QPtrList<Incidence> delSel ; | 536 | QPtrList<Incidence> delSel ; |
535 | QListViewItem *item = mListView->firstChild (); | 537 | QListViewItem *item = mListView->firstChild (); |
536 | while ( item ) { | 538 | while ( item ) { |
537 | if ( item->isSelected() ) { | 539 | if ( item->isSelected() ) { |
538 | delSel.append(((KOListViewItem *)item)->data()); | 540 | delSel.append(((KOListViewItem *)item)->data()); |
539 | ++icount; | 541 | ++icount; |
540 | } | 542 | } |
541 | 543 | ||
542 | item = item->nextSibling(); | 544 | item = item->nextSibling(); |
543 | } | 545 | } |
544 | if ( icount ) { | 546 | if ( icount ) { |
545 | QString fn = KOPrefs::instance()->mLastSaveFile; | 547 | QString fn = KOPrefs::instance()->mLastSaveFile; |
546 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); | 548 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); |
547 | 549 | ||
548 | if ( fn == "" ) | 550 | if ( fn == "" ) |
549 | return; | 551 | return; |
550 | QFileInfo info; | 552 | QFileInfo info; |
551 | info.setFile( fn ); | 553 | info.setFile( fn ); |
552 | QString mes; | 554 | QString mes; |
553 | bool createbup = true; | 555 | bool createbup = true; |
554 | if ( info. exists() ) { | 556 | if ( info. exists() ) { |
555 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); | 557 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); |
556 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 558 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
557 | i18n("Overwrite!"), i18n("Cancel"), 0, | 559 | i18n("Overwrite!"), i18n("Cancel"), 0, |
558 | 0, 1 ); | 560 | 0, 1 ); |
559 | if ( result != 0 ) { | 561 | if ( result != 0 ) { |
560 | createbup = false; | 562 | createbup = false; |
561 | } | 563 | } |
562 | } | 564 | } |
563 | if ( createbup ) { | 565 | if ( createbup ) { |
564 | QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") + | 566 | QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") + |
565 | KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false); | 567 | KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false); |
566 | Incidence *incidence = delSel.first(); | 568 | Incidence *incidence = delSel.first(); |
567 | icount = 0; | 569 | icount = 0; |
568 | while ( incidence ) { | 570 | while ( incidence ) { |
569 | if ( incidence->type() == "Journal" ) { | 571 | if ( incidence->type() == "Journal" ) { |
570 | text += "\n************************************\n"; | 572 | text += "\n************************************\n"; |
571 | text += i18n("Journal from: ") +incidence->dtStartDateStr( false ); | 573 | text += i18n("Journal from: ") +incidence->dtStartDateStr( false ); |
572 | text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); | 574 | text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); |
573 | text +="\n" + i18n("Description: ") + "\n"+ incidence->description(); | 575 | text +="\n" + i18n("Description: ") + "\n"+ incidence->description(); |
574 | ++icount; | 576 | ++icount; |
575 | 577 | ||
576 | } else { | 578 | } else { |
577 | if ( !incidence->description().isEmpty() ) { | 579 | if ( !incidence->description().isEmpty() ) { |
578 | text += "\n************************************\n"; | 580 | text += "\n************************************\n"; |
579 | if ( incidence->type() == "Todo" ) | 581 | if ( incidence->type() == "Todo" ) |
580 | text += i18n("To-Do: "); | 582 | text += i18n("To-Do: "); |
581 | text += incidence->summary(); | 583 | text += incidence->summary(); |
582 | if ( incidence->hasStartDate() ) | 584 | if ( incidence->hasStartDate() ) |
583 | text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false ); | 585 | text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false ); |
584 | text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); | 586 | text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); |
585 | if ( !incidence->location().isEmpty() ) | 587 | if ( !incidence->location().isEmpty() ) |
586 | text += "\n" +i18n("Location: ") + incidence->location(); | 588 | text += "\n" +i18n("Location: ") + incidence->location(); |
587 | text += "\n" + i18n("Description: ") + "\n" + incidence->description(); | 589 | text += "\n" + i18n("Description: ") + "\n" + incidence->description(); |
588 | ++icount; | 590 | ++icount; |
589 | 591 | ||
590 | } | 592 | } |
591 | } | 593 | } |
592 | incidence = delSel.next(); | 594 | incidence = delSel.next(); |
593 | } | 595 | } |
594 | QFile file( fn ); | 596 | QFile file( fn ); |
595 | if (!file.open( IO_WriteOnly ) ) { | 597 | if (!file.open( IO_WriteOnly ) ) { |
596 | topLevelWidget()->setCaption(i18n("File open error - nothing saved!") ); | 598 | topLevelWidget()->setCaption(i18n("File open error - nothing saved!") ); |
597 | return; | 599 | return; |
598 | } | 600 | } |
599 | QTextStream ts( &file ); | 601 | QTextStream ts( &file ); |
600 | ts << text; | 602 | ts << text; |
601 | file.close(); | 603 | file.close(); |
602 | //qDebug("%s ", text.latin1()); | 604 | //qDebug("%s ", text.latin1()); |
603 | mes = i18n("KO/Pi:Saved %1 descriptions/journals").arg(icount ); | 605 | mes = i18n("KO/Pi:Saved %1 descriptions/journals").arg(icount ); |
604 | KOPrefs::instance()->mLastSaveFile = fn; | 606 | KOPrefs::instance()->mLastSaveFile = fn; |
605 | topLevelWidget()->setCaption(mes); | 607 | topLevelWidget()->setCaption(mes); |
606 | } | 608 | } |
607 | } | 609 | } |
608 | } | 610 | } |
611 | void KOListView::saveToFileVCS() | ||
612 | { | ||
613 | writeToFile( false ); | ||
614 | } | ||
609 | void KOListView::saveToFile() | 615 | void KOListView::saveToFile() |
610 | { | 616 | { |
617 | writeToFile( true ); | ||
618 | } | ||
619 | void KOListView::writeToFile( bool iCal ) | ||
620 | { | ||
611 | 621 | ||
612 | int icount = 0; | 622 | int icount = 0; |
613 | QPtrList<Incidence> delSel ; | 623 | QPtrList<Incidence> delSel ; |
614 | QListViewItem *item = mListView->firstChild (); | 624 | QListViewItem *item = mListView->firstChild (); |
615 | while ( item ) { | 625 | while ( item ) { |
616 | if ( item->isSelected() ) { | 626 | if ( item->isSelected() ) { |
617 | delSel.append(((KOListViewItem *)item)->data()); | 627 | delSel.append(((KOListViewItem *)item)->data()); |
618 | ++icount; | 628 | ++icount; |
619 | } | 629 | } |
620 | 630 | ||
621 | item = item->nextSibling(); | 631 | item = item->nextSibling(); |
622 | } | 632 | } |
623 | if ( icount ) { | 633 | if ( icount ) { |
624 | QString fn = KOPrefs::instance()->mLastSaveFile; | 634 | QString fn = KOPrefs::instance()->mLastSaveFile; |
635 | QString extension; | ||
636 | if ( iCal ) { | ||
637 | if ( fn.right( 4 ).lower() == ".vcs" ) { | ||
638 | fn = fn.left( fn.length() -3) + "ics"; | ||
639 | } | ||
640 | } else { | ||
641 | if ( fn.right( 4 ).lower() == ".ics" ) { | ||
642 | fn = fn.left( fn.length() -3) + "vcs"; | ||
643 | } | ||
644 | } | ||
625 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); | 645 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); |
626 | 646 | ||
627 | if ( fn == "" ) | 647 | if ( fn == "" ) |
628 | return; | 648 | return; |
629 | QFileInfo info; | 649 | QFileInfo info; |
630 | info.setFile( fn ); | 650 | info.setFile( fn ); |
631 | QString mes; | 651 | QString mes; |
632 | bool createbup = true; | 652 | bool createbup = true; |
633 | if ( info. exists() ) { | 653 | if ( info. exists() ) { |
634 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); | 654 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); |
635 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 655 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
636 | i18n("Overwrite!"), i18n("Cancel"), 0, | 656 | i18n("Overwrite!"), i18n("Cancel"), 0, |
637 | 0, 1 ); | 657 | 0, 1 ); |
638 | if ( result != 0 ) { | 658 | if ( result != 0 ) { |
639 | createbup = false; | 659 | createbup = false; |
640 | } | 660 | } |
641 | } | 661 | } |
642 | if ( createbup ) { | 662 | if ( createbup ) { |
643 | CalendarLocal cal; | 663 | CalendarLocal cal; |
644 | cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 664 | cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
645 | Incidence *incidence = delSel.first(); | 665 | Incidence *incidence = delSel.first(); |
646 | while ( incidence ) { | 666 | while ( incidence ) { |
647 | cal.addIncidence( incidence->clone() ); | 667 | cal.addIncidence( incidence->clone() ); |
648 | incidence = delSel.next(); | 668 | incidence = delSel.next(); |
649 | } | 669 | } |
650 | ICalFormat format; | 670 | if ( iCal ) { |
651 | format.save( &cal, fn ); | 671 | ICalFormat format; |
672 | format.save( &cal, fn ); | ||
673 | } else { | ||
674 | VCalFormat format; | ||
675 | format.save( &cal, fn ); | ||
676 | } | ||
652 | mes = i18n("KO/Pi:Saved %1").arg(fn ); | 677 | mes = i18n("KO/Pi:Saved %1").arg(fn ); |
653 | KOPrefs::instance()->mLastSaveFile = fn; | 678 | KOPrefs::instance()->mLastSaveFile = fn; |
654 | topLevelWidget()->setCaption(mes); | 679 | topLevelWidget()->setCaption(mes); |
655 | } | 680 | } |
656 | } | 681 | } |
657 | } | 682 | } |
658 | void KOListView::deleteAll() | 683 | void KOListView::deleteAll() |
659 | { | 684 | { |
660 | int icount = 0; | 685 | int icount = 0; |
661 | QPtrList<Incidence> delSel ; | 686 | QPtrList<Incidence> delSel ; |
662 | QListViewItem *item = mListView->firstChild (); | 687 | QListViewItem *item = mListView->firstChild (); |
663 | while ( item ) { | 688 | while ( item ) { |
664 | if ( item->isSelected() ) { | 689 | if ( item->isSelected() ) { |
665 | delSel.append(((KOListViewItem *)item)->data()); | 690 | delSel.append(((KOListViewItem *)item)->data()); |
666 | ++icount; | 691 | ++icount; |
667 | } | 692 | } |
668 | 693 | ||
669 | item = item->nextSibling(); | 694 | item = item->nextSibling(); |
670 | } | 695 | } |
671 | if ( icount ) { | 696 | if ( icount ) { |
672 | Incidence *incidence = delSel.first(); | 697 | Incidence *incidence = delSel.first(); |
673 | Incidence *toDelete; | 698 | Incidence *toDelete; |
674 | KOPrefs *p = KOPrefs::instance(); | 699 | KOPrefs *p = KOPrefs::instance(); |
675 | bool confirm = p->mConfirm; | 700 | bool confirm = p->mConfirm; |
676 | QString mess; | 701 | QString mess; |
677 | mess = mess.sprintf( i18n("You have %d item(s) selected.\n"), icount ); | 702 | mess = mess.sprintf( i18n("You have %d item(s) selected.\n"), icount ); |
678 | if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, mess + i18n("All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n"), i18n("KO/Pi Confirmation"),i18n("Delete")) ) { | 703 | if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, mess + i18n("All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n"), i18n("KO/Pi Confirmation"),i18n("Delete")) ) { |
679 | p->mConfirm = false; | 704 | p->mConfirm = false; |
680 | int delCounter = 0; | 705 | int delCounter = 0; |
681 | QDialog dia ( this, "p-dialog", true ); | 706 | QDialog dia ( this, "p-dialog", true ); |
682 | QLabel lab (i18n("Close dialog to abort deletion!"), &dia ); | 707 | QLabel lab (i18n("Close dialog to abort deletion!"), &dia ); |
683 | QVBoxLayout lay( &dia ); | 708 | QVBoxLayout lay( &dia ); |
684 | lay.setMargin(7); | 709 | lay.setMargin(7); |
685 | lay.setSpacing(7); | 710 | lay.setSpacing(7); |
686 | lay.addWidget( &lab); | 711 | lay.addWidget( &lab); |
687 | QProgressBar bar( icount, &dia ); | 712 | QProgressBar bar( icount, &dia ); |
688 | lay.addWidget( &bar); | 713 | lay.addWidget( &bar); |
689 | int w = 220; | 714 | int w = 220; |
690 | int h = 50; | 715 | int h = 50; |
691 | int dw = QApplication::desktop()->width(); | 716 | int dw = QApplication::desktop()->width(); |
692 | int dh = QApplication::desktop()->height(); | 717 | int dh = QApplication::desktop()->height(); |
693 | dia.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 718 | dia.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
694 | //dia.resize( 240,50 ); | 719 | //dia.resize( 240,50 ); |
695 | dia.show(); | 720 | dia.show(); |
696 | 721 | ||
697 | while ( incidence ) { | 722 | while ( incidence ) { |
698 | bar.setProgress( delCounter ); | 723 | bar.setProgress( delCounter ); |
699 | mess = mess.sprintf( i18n("Deleting item %d ..."), ++delCounter ); | 724 | mess = mess.sprintf( i18n("Deleting item %d ..."), ++delCounter ); |
700 | dia.setCaption( mess ); | 725 | dia.setCaption( mess ); |
701 | qApp->processEvents(); | 726 | qApp->processEvents(); |
702 | toDelete = (incidence); | 727 | toDelete = (incidence); |
703 | incidence = delSel.next(); | 728 | incidence = delSel.next(); |
704 | emit deleteIncidenceSignal(toDelete ); | 729 | emit deleteIncidenceSignal(toDelete ); |
705 | if ( dia.result() != 0 ) | 730 | if ( dia.result() != 0 ) |
706 | break; | 731 | break; |
707 | 732 | ||
708 | } | 733 | } |
709 | mess = mess.sprintf( i18n("%d items remaining in list."), count() ); | 734 | mess = mess.sprintf( i18n("%d items remaining in list."), count() ); |
710 | topLevelWidget ()->setCaption( mess ); | 735 | topLevelWidget ()->setCaption( mess ); |
711 | p->mConfirm = confirm; | 736 | p->mConfirm = confirm; |
712 | } | 737 | } |
713 | } | 738 | } |
714 | 739 | ||
715 | 740 | ||
716 | } | 741 | } |
717 | int KOListView::maxDatesHint() | 742 | int KOListView::maxDatesHint() |
718 | { | 743 | { |
719 | return 0; | 744 | return 0; |
720 | } | 745 | } |
721 | 746 | ||
722 | int KOListView::currentDateCount() | 747 | int KOListView::currentDateCount() |
723 | { | 748 | { |
724 | return 0; | 749 | return 0; |
725 | } | 750 | } |
726 | 751 | ||
727 | QPtrList<Incidence> KOListView::selectedIncidences() | 752 | QPtrList<Incidence> KOListView::selectedIncidences() |
728 | { | 753 | { |
729 | QPtrList<Incidence> eventList; | 754 | QPtrList<Incidence> eventList; |
730 | QListViewItem *item = mListView->firstChild (); | 755 | QListViewItem *item = mListView->firstChild (); |
731 | while ( item ) { | 756 | while ( item ) { |
732 | if ( item->isSelected() ) { | 757 | if ( item->isSelected() ) { |
733 | eventList.append(((KOListViewItem *)item)->data()); | 758 | eventList.append(((KOListViewItem *)item)->data()); |
734 | } | 759 | } |
735 | 760 | ||
736 | item = item->nextSibling(); | 761 | item = item->nextSibling(); |
737 | } | 762 | } |
738 | 763 | ||
739 | // // QListViewItem *item = mListView->selectedItem(); | 764 | // // QListViewItem *item = mListView->selectedItem(); |
740 | //if (item) eventList.append(((KOListViewItem *)item)->data()); | 765 | //if (item) eventList.append(((KOListViewItem *)item)->data()); |
741 | 766 | ||
742 | return eventList; | 767 | return eventList; |
743 | } | 768 | } |
744 | 769 | ||
745 | DateList KOListView::selectedDates() | 770 | DateList KOListView::selectedDates() |
746 | { | 771 | { |
747 | DateList eventList; | 772 | DateList eventList; |
748 | return eventList; | 773 | return eventList; |
749 | } | 774 | } |
750 | 775 | ||
751 | void KOListView::showDates(bool show) | 776 | void KOListView::showDates(bool show) |
752 | { | 777 | { |
753 | // Shouldn't we set it to a value greater 0? When showDates is called with | 778 | // Shouldn't we set it to a value greater 0? When showDates is called with |
754 | // show == true at first, then the columnwidths are set to zero. | 779 | // show == true at first, then the columnwidths are set to zero. |
755 | static int oldColWidth1 = 0; | 780 | static int oldColWidth1 = 0; |
756 | static int oldColWidth3 = 0; | 781 | static int oldColWidth3 = 0; |
757 | 782 | ||
758 | if (!show) { | 783 | if (!show) { |
759 | oldColWidth1 = mListView->columnWidth(1); | 784 | oldColWidth1 = mListView->columnWidth(1); |
760 | oldColWidth3 = mListView->columnWidth(3); | 785 | oldColWidth3 = mListView->columnWidth(3); |
761 | mListView->setColumnWidth(1, 0); | 786 | mListView->setColumnWidth(1, 0); |
762 | mListView->setColumnWidth(3, 0); | 787 | mListView->setColumnWidth(3, 0); |
763 | } else { | 788 | } else { |
764 | mListView->setColumnWidth(1, oldColWidth1); | 789 | mListView->setColumnWidth(1, oldColWidth1); |
765 | mListView->setColumnWidth(3, oldColWidth3); | 790 | mListView->setColumnWidth(3, oldColWidth3); |
766 | } | 791 | } |
767 | mListView->repaint(); | 792 | mListView->repaint(); |
768 | } | 793 | } |
769 | 794 | ||
770 | void KOListView::printPreview(CalPrinter *calPrinter, const QDate &fd, | 795 | void KOListView::printPreview(CalPrinter *calPrinter, const QDate &fd, |
771 | const QDate &td) | 796 | const QDate &td) |
772 | { | 797 | { |
773 | #ifndef KORG_NOPRINTER | 798 | #ifndef KORG_NOPRINTER |
774 | calPrinter->preview(CalPrinter::Day, fd, td); | 799 | calPrinter->preview(CalPrinter::Day, fd, td); |
775 | #endif | 800 | #endif |
776 | } | 801 | } |
777 | 802 | ||
778 | void KOListView::showDates() | 803 | void KOListView::showDates() |
779 | { | 804 | { |
780 | showDates(true); | 805 | showDates(true); |
781 | } | 806 | } |
782 | 807 | ||
783 | void KOListView::hideDates() | 808 | void KOListView::hideDates() |
784 | { | 809 | { |
785 | showDates(false); | 810 | showDates(false); |
786 | } | 811 | } |
787 | void KOListView::resetFocus() | 812 | void KOListView::resetFocus() |
788 | { | 813 | { |
789 | mListView->setFocus(); | 814 | mListView->setFocus(); |
790 | } | 815 | } |
791 | void KOListView::updateView() | 816 | void KOListView::updateView() |
792 | { | 817 | { |
793 | mListView->setFocus(); | 818 | mListView->setFocus(); |
794 | if ( mListView->firstChild () ) | 819 | if ( mListView->firstChild () ) |
795 | mListView->setCurrentItem( mListView->firstChild () ); | 820 | mListView->setCurrentItem( mListView->firstChild () ); |
796 | } | 821 | } |
797 | void KOListView::updateConfig() | 822 | void KOListView::updateConfig() |
798 | { | 823 | { |
799 | 824 | ||
800 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 825 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
801 | updateView(); | 826 | updateView(); |
802 | 827 | ||
803 | } | 828 | } |
804 | void KOListView::setStartDate(const QDate &start) | 829 | void KOListView::setStartDate(const QDate &start) |
805 | { | 830 | { |
806 | mStartDate = start; | 831 | mStartDate = start; |
807 | } | 832 | } |
808 | 833 | ||
809 | void KOListView::showDates(const QDate &start, const QDate &end) | 834 | void KOListView::showDates(const QDate &start, const QDate &end) |
810 | { | 835 | { |
811 | clear(); | 836 | clear(); |
812 | mStartDate = start; | 837 | mStartDate = start; |
813 | QDate date = start; | 838 | QDate date = start; |
814 | QPtrList<Journal> j_list; | 839 | QPtrList<Journal> j_list; |
815 | while( date <= end ) { | 840 | while( date <= end ) { |
816 | addEvents(calendar()->events(date)); | 841 | addEvents(calendar()->events(date)); |
817 | addTodos(calendar()->todos(date)); | 842 | addTodos(calendar()->todos(date)); |
818 | Journal* jo = calendar()->journal(date); | 843 | Journal* jo = calendar()->journal(date); |
819 | if ( jo ) | 844 | if ( jo ) |
820 | j_list.append( jo ); | 845 | j_list.append( jo ); |
821 | date = date.addDays( 1 ); | 846 | date = date.addDays( 1 ); |
822 | } | 847 | } |
823 | addJournals(j_list); | 848 | addJournals(j_list); |
824 | emit incidenceSelected( 0 ); | 849 | emit incidenceSelected( 0 ); |
825 | updateView(); | 850 | updateView(); |
826 | 851 | ||
827 | } | 852 | } |
828 | 853 | ||
829 | void KOListView::addEvents(QPtrList<Event> eventList) | 854 | void KOListView::addEvents(QPtrList<Event> eventList) |
830 | { | 855 | { |
831 | Event *ev; | 856 | Event *ev; |
832 | for(ev = eventList.first(); ev; ev = eventList.next()) { | 857 | for(ev = eventList.first(); ev; ev = eventList.next()) { |
833 | addIncidence(ev); | 858 | addIncidence(ev); |
834 | } | 859 | } |
835 | if ( !mListView->currentItem() ){ | 860 | if ( !mListView->currentItem() ){ |
836 | updateView(); | 861 | updateView(); |
837 | } | 862 | } |
838 | } | 863 | } |
839 | 864 | ||
840 | void KOListView::addTodos(QPtrList<Todo> eventList) | 865 | void KOListView::addTodos(QPtrList<Todo> eventList) |
841 | { | 866 | { |
842 | Todo *ev; | 867 | Todo *ev; |
843 | for(ev = eventList.first(); ev; ev = eventList.next()) { | 868 | for(ev = eventList.first(); ev; ev = eventList.next()) { |
844 | addIncidence(ev); | 869 | addIncidence(ev); |
845 | } | 870 | } |
846 | if ( !mListView->currentItem() ){ | 871 | if ( !mListView->currentItem() ){ |
847 | updateView(); | 872 | updateView(); |
848 | } | 873 | } |
849 | } | 874 | } |
850 | void KOListView::addJournals(QPtrList<Journal> eventList) | 875 | void KOListView::addJournals(QPtrList<Journal> eventList) |
851 | { | 876 | { |
852 | Journal *ev; | 877 | Journal *ev; |
853 | for(ev = eventList.first(); ev; ev = eventList.next()) { | 878 | for(ev = eventList.first(); ev; ev = eventList.next()) { |
854 | addIncidence(ev); | 879 | addIncidence(ev); |
855 | } | 880 | } |
856 | if ( !mListView->currentItem() ){ | 881 | if ( !mListView->currentItem() ){ |
857 | updateView(); | 882 | updateView(); |
858 | } | 883 | } |
859 | } | 884 | } |
860 | 885 | ||
861 | void KOListView::addIncidence(Incidence *incidence) | 886 | void KOListView::addIncidence(Incidence *incidence) |
862 | { | 887 | { |
863 | if ( mUidDict.find( incidence->uid() ) ) return; | 888 | if ( mUidDict.find( incidence->uid() ) ) return; |
864 | 889 | ||
865 | // mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 890 | // mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
866 | mUidDict.insert( incidence->uid(), incidence ); | 891 | mUidDict.insert( incidence->uid(), incidence ); |
867 | 892 | ||
868 | KOListViewItem *item = new KOListViewItem( incidence, mListView ); | 893 | KOListViewItem *item = new KOListViewItem( incidence, mListView ); |
869 | ListItemVisitor v(item, mStartDate ); | 894 | ListItemVisitor v(item, mStartDate ); |
870 | if (incidence->accept(v)) return; | 895 | if (incidence->accept(v)) return; |
871 | else delete item; | 896 | else delete item; |
872 | //qDebug("delete item "); | 897 | //qDebug("delete item "); |
873 | } | 898 | } |
874 | 899 | ||
875 | void KOListView::showEvents(QPtrList<Event> eventList) | 900 | void KOListView::showEvents(QPtrList<Event> eventList) |
876 | { | 901 | { |
877 | clear(); | 902 | clear(); |
878 | 903 | ||
879 | addEvents(eventList); | 904 | addEvents(eventList); |
880 | 905 | ||
881 | // After new creation of list view no events are selected. | 906 | // After new creation of list view no events are selected. |
882 | emit incidenceSelected( 0 ); | 907 | emit incidenceSelected( 0 ); |
883 | } | 908 | } |
884 | int KOListView::count() | 909 | int KOListView::count() |
885 | { | 910 | { |
886 | return mListView->childCount(); | 911 | return mListView->childCount(); |
887 | } | 912 | } |
888 | 913 | ||
889 | void KOListView::changeEventDisplay(Event *event, int action) | 914 | void KOListView::changeEventDisplay(Event *event, int action) |
890 | { | 915 | { |
891 | KOListViewItem *item; | 916 | KOListViewItem *item; |
892 | 917 | ||
893 | switch(action) { | 918 | switch(action) { |
894 | case KOGlobals::EVENTADDED: | 919 | case KOGlobals::EVENTADDED: |
895 | addIncidence( event ); | 920 | addIncidence( event ); |
896 | break; | 921 | break; |
897 | case KOGlobals::EVENTEDITED: | 922 | case KOGlobals::EVENTEDITED: |
898 | item = getItemForEvent(event); | 923 | item = getItemForEvent(event); |
899 | if (item) { | 924 | if (item) { |
900 | mUidDict.remove( event->uid() ); | 925 | mUidDict.remove( event->uid() ); |
901 | delete item; | 926 | delete item; |
902 | addIncidence( event ); | 927 | addIncidence( event ); |
903 | } | 928 | } |
904 | break; | 929 | break; |
905 | case KOGlobals::EVENTDELETED: | 930 | case KOGlobals::EVENTDELETED: |
906 | item = getItemForEvent(event); | 931 | item = getItemForEvent(event); |
907 | if (item) { | 932 | if (item) { |
908 | mUidDict.remove( event->uid() ); | 933 | mUidDict.remove( event->uid() ); |
909 | delete item; | 934 | delete item; |
910 | } | 935 | } |
911 | break; | 936 | break; |
912 | default: | 937 | default: |
913 | ; | 938 | ; |
914 | } | 939 | } |
915 | } | 940 | } |
916 | 941 | ||
917 | KOListViewItem *KOListView::getItemForEvent(Event *event) | 942 | KOListViewItem *KOListView::getItemForEvent(Event *event) |
918 | { | 943 | { |
919 | KOListViewItem *item = (KOListViewItem *)mListView->firstChild(); | 944 | KOListViewItem *item = (KOListViewItem *)mListView->firstChild(); |
920 | while (item) { | 945 | while (item) { |
921 | if (item->data() == event) return item; | 946 | if (item->data() == event) return item; |
922 | item = (KOListViewItem *)item->nextSibling(); | 947 | item = (KOListViewItem *)item->nextSibling(); |
923 | } | 948 | } |
924 | return 0; | 949 | return 0; |
925 | } | 950 | } |
926 | 951 | ||
927 | void KOListView::defaultItemAction(QListViewItem *i) | 952 | void KOListView::defaultItemAction(QListViewItem *i) |
928 | { | 953 | { |
929 | KOListViewItem *item = static_cast<KOListViewItem *>( i ); | 954 | KOListViewItem *item = static_cast<KOListViewItem *>( i ); |
930 | if ( item ) defaultAction( item->data() ); | 955 | if ( item ) defaultAction( item->data() ); |
931 | 956 | ||
932 | } | 957 | } |
933 | 958 | ||
934 | void KOListView::popupMenu(QListViewItem *item,const QPoint &,int) | 959 | void KOListView::popupMenu(QListViewItem *item,const QPoint &,int) |
935 | { | 960 | { |
936 | mActiveItem = (KOListViewItem *)item; | 961 | mActiveItem = (KOListViewItem *)item; |
937 | if (mActiveItem) { | 962 | if (mActiveItem) { |
938 | Incidence *incidence = mActiveItem->data(); | 963 | Incidence *incidence = mActiveItem->data(); |
939 | mPopupMenu->showIncidencePopup(incidence); | 964 | mPopupMenu->showIncidencePopup(incidence); |
940 | 965 | ||
941 | /* | 966 | /* |
942 | if ( incidence && incidence->type() == "Event" ) { | 967 | if ( incidence && incidence->type() == "Event" ) { |
943 | Event *event = static_cast<Event *>( incidence ); | 968 | Event *event = static_cast<Event *>( incidence ); |
944 | mPopupMenu->showEventPopup(event); | 969 | mPopupMenu->showEventPopup(event); |
945 | } | 970 | } |
946 | */ | 971 | */ |
947 | } | 972 | } |
948 | } | 973 | } |
949 | 974 | ||
950 | void KOListView::readSettings(KConfig *config, QString setting) | 975 | void KOListView::readSettings(KConfig *config, QString setting) |
951 | { | 976 | { |
952 | // qDebug("KOListView::readSettings "); | 977 | // qDebug("KOListView::readSettings "); |
953 | mListView->restoreLayout(config,setting); | 978 | mListView->restoreLayout(config,setting); |
954 | } | 979 | } |
955 | 980 | ||
956 | void KOListView::writeSettings(KConfig *config, QString setting) | 981 | void KOListView::writeSettings(KConfig *config, QString setting) |
957 | { | 982 | { |
958 | // qDebug("KOListView::writeSettings "); | 983 | // qDebug("KOListView::writeSettings "); |
959 | mListView->saveLayout(config, setting); | 984 | mListView->saveLayout(config, setting); |
960 | } | 985 | } |
961 | 986 | ||
962 | void KOListView::processSelectionChange(QListViewItem *) | 987 | void KOListView::processSelectionChange(QListViewItem *) |
963 | { | 988 | { |
964 | 989 | ||
965 | KOListViewItem *item = | 990 | KOListViewItem *item = |
966 | static_cast<KOListViewItem *>( mListView->currentItem() ); | 991 | static_cast<KOListViewItem *>( mListView->currentItem() ); |
967 | 992 | ||
968 | if ( !item ) { | 993 | if ( !item ) { |
969 | emit incidenceSelected( 0 ); | 994 | emit incidenceSelected( 0 ); |
970 | } else { | 995 | } else { |
971 | emit incidenceSelected( item->data() ); | 996 | emit incidenceSelected( item->data() ); |
972 | } | 997 | } |
973 | } | 998 | } |
974 | 999 | ||
975 | void KOListView::clearSelection() | 1000 | void KOListView::clearSelection() |
976 | { | 1001 | { |
977 | mListView->selectAll( false ); | 1002 | mListView->selectAll( false ); |
978 | } | 1003 | } |
979 | void KOListView::allSelection() | 1004 | void KOListView::allSelection() |
980 | { | 1005 | { |
981 | mListView->selectAll( true ); | 1006 | mListView->selectAll( true ); |
982 | } | 1007 | } |
983 | 1008 | ||
984 | void KOListView::clear() | 1009 | void KOListView::clear() |
985 | { | 1010 | { |
986 | mListView->clear(); | 1011 | mListView->clear(); |
987 | mUidDict.clear(); | 1012 | mUidDict.clear(); |
988 | } | 1013 | } |
989 | 1014 | ||
990 | Incidence* KOListView::currentItem() | 1015 | Incidence* KOListView::currentItem() |
991 | { | 1016 | { |
992 | if ( mListView->currentItem() ) | 1017 | if ( mListView->currentItem() ) |
993 | return ((KOListViewItem*) mListView->currentItem())->data(); | 1018 | return ((KOListViewItem*) mListView->currentItem())->data(); |
994 | return 0; | 1019 | return 0; |
995 | } | 1020 | } |
996 | void KOListView::keyPressEvent ( QKeyEvent *e) | 1021 | void KOListView::keyPressEvent ( QKeyEvent *e) |
997 | { | 1022 | { |
998 | 1023 | ||
999 | if ( e->key() == Qt::Key_Delete || e->key() == Qt::Key_Backspace ) { | 1024 | if ( e->key() == Qt::Key_Delete || e->key() == Qt::Key_Backspace ) { |
1000 | deleteAll(); | 1025 | deleteAll(); |
1001 | return; | 1026 | return; |
1002 | } | 1027 | } |
1003 | 1028 | ||
1004 | e->ignore(); | 1029 | e->ignore(); |
1005 | } | 1030 | } |
1006 | void KOListViewListView::keyPressEvent ( QKeyEvent *e) | 1031 | void KOListViewListView::keyPressEvent ( QKeyEvent *e) |
1007 | { | 1032 | { |
1008 | 1033 | ||
1009 | switch ( e->key() ) { | 1034 | switch ( e->key() ) { |
1010 | case Qt::Key_Down: | 1035 | case Qt::Key_Down: |
1011 | if ( e->state() == ShiftButton ) { | 1036 | if ( e->state() == ShiftButton ) { |
1012 | QListViewItem* cn = currentItem(); | 1037 | QListViewItem* cn = currentItem(); |
1013 | if ( !cn ) | 1038 | if ( !cn ) |
1014 | cn = firstChild(); | 1039 | cn = firstChild(); |
1015 | if ( !cn ) | 1040 | if ( !cn ) |
1016 | return; | 1041 | return; |
1017 | while ( cn->nextSibling() ) | 1042 | while ( cn->nextSibling() ) |
1018 | cn = cn->nextSibling(); | 1043 | cn = cn->nextSibling(); |
1019 | setCurrentItem ( cn ); | 1044 | setCurrentItem ( cn ); |
1020 | ensureItemVisible ( cn ); | 1045 | ensureItemVisible ( cn ); |
1021 | 1046 | ||
1022 | e->accept(); | 1047 | e->accept(); |
1023 | return; | 1048 | return; |
1024 | } | 1049 | } |
1025 | if ( e->state() == ControlButton ) { | 1050 | if ( e->state() == ControlButton ) { |
1026 | int count = childCount (); | 1051 | int count = childCount (); |
1027 | int jump = count / 5; | 1052 | int jump = count / 5; |
1028 | QListViewItem* cn; | 1053 | QListViewItem* cn; |
1029 | cn = currentItem(); | 1054 | cn = currentItem(); |
1030 | if ( ! cn ) | 1055 | if ( ! cn ) |
1031 | return; | 1056 | return; |
1032 | if ( jump == 0 ) | 1057 | if ( jump == 0 ) |
1033 | jump = 1; | 1058 | jump = 1; |
1034 | while ( jump && cn->nextSibling() ) { | 1059 | while ( jump && cn->nextSibling() ) { |
1035 | cn = cn->nextSibling(); | 1060 | cn = cn->nextSibling(); |
1036 | --jump; | 1061 | --jump; |
1037 | } | 1062 | } |
1038 | setCurrentItem ( cn ); | 1063 | setCurrentItem ( cn ); |
1039 | ensureItemVisible ( cn ); | 1064 | ensureItemVisible ( cn ); |
1040 | 1065 | ||
1041 | } else | 1066 | } else |
1042 | QListView::keyPressEvent ( e ) ; | 1067 | QListView::keyPressEvent ( e ) ; |
1043 | e->accept(); | 1068 | e->accept(); |
1044 | break; | 1069 | break; |
1045 | 1070 | ||
1046 | case Qt::Key_Up: | 1071 | case Qt::Key_Up: |
1047 | if ( e->state() == ShiftButton ) { | 1072 | if ( e->state() == ShiftButton ) { |
1048 | QListViewItem* cn = firstChild(); | 1073 | QListViewItem* cn = firstChild(); |
1049 | if ( cn ) { | 1074 | if ( cn ) { |
1050 | setCurrentItem ( cn ); | 1075 | setCurrentItem ( cn ); |
1051 | ensureItemVisible ( cn ); | 1076 | ensureItemVisible ( cn ); |
1052 | } | 1077 | } |
1053 | e->accept(); | 1078 | e->accept(); |
1054 | return; | 1079 | return; |
1055 | } | 1080 | } |
1056 | if ( e->state() == ControlButton ) { | 1081 | if ( e->state() == ControlButton ) { |
1057 | int count = childCount (); | 1082 | int count = childCount (); |
1058 | int jump = count / 5; | 1083 | int jump = count / 5; |
1059 | QListViewItem* cn; | 1084 | QListViewItem* cn; |
1060 | cn = currentItem(); | 1085 | cn = currentItem(); |
1061 | if ( ! cn ) | 1086 | if ( ! cn ) |
1062 | return; | 1087 | return; |
1063 | if ( jump == 0 ) | 1088 | if ( jump == 0 ) |
1064 | jump = 1; | 1089 | jump = 1; |
1065 | while ( jump && cn->itemAbove ()) { | 1090 | while ( jump && cn->itemAbove ()) { |
1066 | cn = cn->itemAbove (); | 1091 | cn = cn->itemAbove (); |
1067 | --jump; | 1092 | --jump; |
1068 | } | 1093 | } |
1069 | setCurrentItem ( cn ); | 1094 | setCurrentItem ( cn ); |
1070 | ensureItemVisible ( cn ); | 1095 | ensureItemVisible ( cn ); |
1071 | } else | 1096 | } else |
1072 | QListView::keyPressEvent ( e ) ; | 1097 | QListView::keyPressEvent ( e ) ; |
1073 | e->accept(); | 1098 | e->accept(); |
1074 | break; | 1099 | break; |
1075 | case Qt::Key_I: { | 1100 | case Qt::Key_I: { |
1076 | QListViewItem* cn; | 1101 | QListViewItem* cn; |
1077 | cn = currentItem(); | 1102 | cn = currentItem(); |
1078 | if ( cn ) { | 1103 | if ( cn ) { |
1079 | KOListViewItem* ci = (KOListViewItem*)( cn ); | 1104 | KOListViewItem* ci = (KOListViewItem*)( cn ); |
1080 | if ( ci ){ | 1105 | if ( ci ){ |
1081 | //emit showIncidence( ci->data()); | 1106 | //emit showIncidence( ci->data()); |
1082 | cn = cn->nextSibling(); | 1107 | cn = cn->nextSibling(); |
1083 | if ( cn ) { | 1108 | if ( cn ) { |
1084 | setCurrentItem ( cn ); | 1109 | setCurrentItem ( cn ); |
1085 | ensureItemVisible ( cn ); | 1110 | ensureItemVisible ( cn ); |
1086 | } | 1111 | } |
1087 | emit showIncidence( ci->data()); | 1112 | emit showIncidence( ci->data()); |
1088 | } | 1113 | } |
1089 | } | 1114 | } |
1090 | e->accept(); | 1115 | e->accept(); |
1091 | } | 1116 | } |
1092 | break; | 1117 | break; |
1093 | case Qt::Key_Return: | 1118 | case Qt::Key_Return: |
1094 | case Qt::Key_Enter: | 1119 | case Qt::Key_Enter: |
1095 | { | 1120 | { |
1096 | QListViewItem* cn; | 1121 | QListViewItem* cn; |
1097 | cn = currentItem(); | 1122 | cn = currentItem(); |
1098 | if ( cn ) { | 1123 | if ( cn ) { |
1099 | KOListViewItem* ci = (KOListViewItem*)( cn ); | 1124 | KOListViewItem* ci = (KOListViewItem*)( cn ); |
1100 | if ( ci ){ | 1125 | if ( ci ){ |
1101 | if ( e->state() == ShiftButton ) | 1126 | if ( e->state() == ShiftButton ) |
1102 | ci->setSelected( false ); | 1127 | ci->setSelected( false ); |
1103 | else | 1128 | else |
1104 | ci->setSelected( true ); | 1129 | ci->setSelected( true ); |
1105 | cn = cn->nextSibling(); | 1130 | cn = cn->nextSibling(); |
1106 | if ( cn ) { | 1131 | if ( cn ) { |
1107 | setCurrentItem ( cn ); | 1132 | setCurrentItem ( cn ); |
1108 | ensureItemVisible ( cn ); | 1133 | ensureItemVisible ( cn ); |
1109 | } | 1134 | } |
1110 | } | 1135 | } |
1111 | } | 1136 | } |
1112 | e->accept(); | 1137 | e->accept(); |
1113 | } | 1138 | } |
1114 | break; | 1139 | break; |
1115 | default: | 1140 | default: |
1116 | e->ignore(); | 1141 | e->ignore(); |
1117 | } | 1142 | } |
1118 | } | 1143 | } |
1119 | KOListViewListView::KOListViewListView(KOListView * lv ) | 1144 | KOListViewListView::KOListViewListView(KOListView * lv ) |
1120 | : KListView( lv ) | 1145 | : KListView( lv ) |
1121 | { | 1146 | { |
1122 | #ifndef DESKTOP_VERSION | 1147 | #ifndef DESKTOP_VERSION |
1123 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); | 1148 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); |
1124 | #endif | 1149 | #endif |
1125 | mYMousePos = -1000; | 1150 | mYMousePos = -1000; |
1126 | setSelectionMode( QListView::Multi ); | 1151 | setSelectionMode( QListView::Multi ); |
1127 | setMultiSelection( true); | 1152 | setMultiSelection( true); |
1128 | mAllowPopupMenu = true; | 1153 | mAllowPopupMenu = true; |
1129 | mMouseDown = false; | 1154 | mMouseDown = false; |
1130 | 1155 | ||
1131 | } | 1156 | } |
1132 | void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e) | 1157 | void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e) |
1133 | { | 1158 | { |
1134 | if (!e) return; | 1159 | if (!e) return; |
1135 | QPoint vp = contentsToViewport(e->pos()); | 1160 | QPoint vp = contentsToViewport(e->pos()); |
1136 | QListViewItem *item = itemAt(vp); | 1161 | QListViewItem *item = itemAt(vp); |
1137 | if (!item) { | 1162 | if (!item) { |
1138 | emit newEvent(); | 1163 | emit newEvent(); |
1139 | return; | 1164 | return; |
1140 | } | 1165 | } |
1141 | KListView::contentsMouseDoubleClickEvent(e); | 1166 | KListView::contentsMouseDoubleClickEvent(e); |
1142 | } | 1167 | } |
1143 | 1168 | ||
1144 | 1169 | ||
1145 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) | 1170 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) |
1146 | { | 1171 | { |
1147 | //qDebug("contentsMousePressEvent++++ "); | 1172 | //qDebug("contentsMousePressEvent++++ "); |
1148 | if (! mMouseDown ) { | 1173 | if (! mMouseDown ) { |
1149 | mAllowPopupMenu = true; | 1174 | mAllowPopupMenu = true; |
1150 | mYMousePos = mapToGlobal( (e->pos())).y(); | 1175 | mYMousePos = mapToGlobal( (e->pos())).y(); |
1151 | } | 1176 | } |
1152 | if ( e->button() == RightButton && mMouseDown ) | 1177 | if ( e->button() == RightButton && mMouseDown ) |
1153 | return; | 1178 | return; |
1154 | if ( e->button() == LeftButton ) | 1179 | if ( e->button() == LeftButton ) |
1155 | mMouseDown = true; | 1180 | mMouseDown = true; |
1156 | KListView::contentsMousePressEvent( e ); | 1181 | KListView::contentsMousePressEvent( e ); |
1157 | } | 1182 | } |
1158 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) | 1183 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) |
1159 | { | 1184 | { |
1160 | //qDebug("contentsMouseReleaseEv---- "); | 1185 | //qDebug("contentsMouseReleaseEv---- "); |
1161 | if ( ! mMouseDown ) { | 1186 | if ( ! mMouseDown ) { |
1162 | if ( e->button() == RightButton && ! mAllowPopupMenu ) | 1187 | if ( e->button() == RightButton && ! mAllowPopupMenu ) |
1163 | return; | 1188 | return; |
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h index c86449d..0d9c525 100644 --- a/korganizer/kolistview.h +++ b/korganizer/kolistview.h | |||
@@ -1,304 +1,306 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 1999 Preston Brown | 3 | Copyright (c) 1999 Preston Brown |
4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | #ifndef _KOLISTVIEW_H | 24 | #ifndef _KOLISTVIEW_H |
25 | #define _KOLISTVIEW_H | 25 | #define _KOLISTVIEW_H |
26 | 26 | ||
27 | #include <qlistview.h> | 27 | #include <qlistview.h> |
28 | #include <qmap.h> | 28 | #include <qmap.h> |
29 | #include <qdict.h> | 29 | #include <qdict.h> |
30 | 30 | ||
31 | #include <klistview.h> | 31 | #include <klistview.h> |
32 | 32 | ||
33 | #ifndef DESKTOP_VERSION | 33 | #ifndef DESKTOP_VERSION |
34 | #include <qtopia/ir.h> | 34 | #include <qtopia/ir.h> |
35 | #else | 35 | #else |
36 | #define Ir char | 36 | #define Ir char |
37 | #endif | 37 | #endif |
38 | #include <libkcal/incidence.h> | 38 | #include <libkcal/incidence.h> |
39 | 39 | ||
40 | #include "koeventview.h" | 40 | #include "koeventview.h" |
41 | #include "customlistviewitem.h" | 41 | #include "customlistviewitem.h" |
42 | 42 | ||
43 | using namespace KCal; | 43 | using namespace KCal; |
44 | 44 | ||
45 | 45 | ||
46 | 46 | ||
47 | #include <qpushbutton.h> | 47 | #include <qpushbutton.h> |
48 | #include <qlayout.h> | 48 | #include <qlayout.h> |
49 | #include <qdialog.h> | 49 | #include <qdialog.h> |
50 | #include <qcombobox.h> | 50 | #include <qcombobox.h> |
51 | #include <qspinbox.h> | 51 | #include <qspinbox.h> |
52 | #include <qtooltip.h> | 52 | #include <qtooltip.h> |
53 | #include <qcheckbox.h> | 53 | #include <qcheckbox.h> |
54 | #include <qhbox.h> | 54 | #include <qhbox.h> |
55 | #include <qlabel.h> | 55 | #include <qlabel.h> |
56 | #include <kiconloader.h> | 56 | #include <kiconloader.h> |
57 | #include "kfiledialog.h" | 57 | #include "kfiledialog.h" |
58 | #include "koprefs.h" | 58 | #include "koprefs.h" |
59 | class KOAlarmPrefs : public QDialog | 59 | class KOAlarmPrefs : public QDialog |
60 | { | 60 | { |
61 | Q_OBJECT | 61 | Q_OBJECT |
62 | public: | 62 | public: |
63 | KOAlarmPrefs( QWidget *par=0, const char *name=0 ) : | 63 | KOAlarmPrefs( QWidget *par=0, const char *name=0 ) : |
64 | QDialog( par, name, true ) | 64 | QDialog( par, name, true ) |
65 | { | 65 | { |
66 | setCaption( i18n("Alarm Options") ); | 66 | setCaption( i18n("Alarm Options") ); |
67 | QVBoxLayout* alarmLayout = new QVBoxLayout( this ); | 67 | QVBoxLayout* alarmLayout = new QVBoxLayout( this ); |
68 | alarmLayout->setSpacing( 3 ); | 68 | alarmLayout->setSpacing( 3 ); |
69 | alarmLayout->setMargin( 3 ); | 69 | alarmLayout->setMargin( 3 ); |
70 | QWidget *parent = this; | 70 | QWidget *parent = this; |
71 | mAlarmButton = new QCheckBox(i18n("Set reminder ON with offset to:"),parent); | 71 | mAlarmButton = new QCheckBox(i18n("Set reminder ON with offset to:"),parent); |
72 | alarmLayout->addWidget(mAlarmButton); | 72 | alarmLayout->addWidget(mAlarmButton); |
73 | mAlarmTimeEdit = new QSpinBox ( 0, 9999, 1, parent, "mAlarmTimeEdit " ) ; | 73 | mAlarmTimeEdit = new QSpinBox ( 0, 9999, 1, parent, "mAlarmTimeEdit " ) ; |
74 | mAlarmTimeEdit->setValue( 15 ); | 74 | mAlarmTimeEdit->setValue( 15 ); |
75 | alarmLayout->addWidget(mAlarmTimeEdit); | 75 | alarmLayout->addWidget(mAlarmTimeEdit); |
76 | mAlarmIncrCombo = new QComboBox(false, parent); | 76 | mAlarmIncrCombo = new QComboBox(false, parent); |
77 | mAlarmIncrCombo->insertItem(i18n("minute(s)")); | 77 | mAlarmIncrCombo->insertItem(i18n("minute(s)")); |
78 | mAlarmIncrCombo->insertItem(i18n("hour(s)")); | 78 | mAlarmIncrCombo->insertItem(i18n("hour(s)")); |
79 | mAlarmIncrCombo->insertItem(i18n("day(s)")); | 79 | mAlarmIncrCombo->insertItem(i18n("day(s)")); |
80 | alarmLayout->addWidget(mAlarmIncrCombo); | 80 | alarmLayout->addWidget(mAlarmIncrCombo); |
81 | QHBox * hb = new QHBox ( parent ); | 81 | QHBox * hb = new QHBox ( parent ); |
82 | alarmLayout->addWidget(hb); | 82 | alarmLayout->addWidget(hb); |
83 | mAlarmSoundButton = new QPushButton(hb); | 83 | mAlarmSoundButton = new QPushButton(hb); |
84 | mAlarmSoundButton->setPixmap(SmallIcon("playsound")); | 84 | mAlarmSoundButton->setPixmap(SmallIcon("playsound")); |
85 | mAlarmSoundButton->setToggleButton(true); | 85 | mAlarmSoundButton->setToggleButton(true); |
86 | connect(mAlarmSoundButton, SIGNAL(clicked()), SLOT(pickAlarmSound())); | 86 | connect(mAlarmSoundButton, SIGNAL(clicked()), SLOT(pickAlarmSound())); |
87 | mAlarmProgramButton = new QPushButton(hb); | 87 | mAlarmProgramButton = new QPushButton(hb); |
88 | mAlarmProgramButton->setPixmap(SmallIcon("run")); | 88 | mAlarmProgramButton->setPixmap(SmallIcon("run")); |
89 | mAlarmProgramButton->setToggleButton(true); | 89 | mAlarmProgramButton->setToggleButton(true); |
90 | connect(mAlarmProgramButton, SIGNAL(clicked()), SLOT(pickAlarmProgram())); | 90 | connect(mAlarmProgramButton, SIGNAL(clicked()), SLOT(pickAlarmProgram())); |
91 | mAlarmSoundButton->setMaximumWidth( mAlarmSoundButton->sizeHint().width() + 4 ); | 91 | mAlarmSoundButton->setMaximumWidth( mAlarmSoundButton->sizeHint().width() + 4 ); |
92 | mAlarmProgramButton->setMaximumWidth(mAlarmProgramButton->sizeHint().width() + 4 ); | 92 | mAlarmProgramButton->setMaximumWidth(mAlarmProgramButton->sizeHint().width() + 4 ); |
93 | mAlarmLabel = new QLabel( this ); | 93 | mAlarmLabel = new QLabel( this ); |
94 | alarmLayout->addWidget( mAlarmLabel ); | 94 | alarmLayout->addWidget( mAlarmLabel ); |
95 | mAlarmLabel->setText( "..."+KOPrefs::instance()->mDefaultAlarmFile.right( 30 ) ); | 95 | mAlarmLabel->setText( "..."+KOPrefs::instance()->mDefaultAlarmFile.right( 30 ) ); |
96 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; | 96 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; |
97 | mAlarmSoundButton->setOn( true ); | 97 | mAlarmSoundButton->setOn( true ); |
98 | QPushButton * ok = new QPushButton( i18n("Set Alarm!"), this ); | 98 | QPushButton * ok = new QPushButton( i18n("Set Alarm!"), this ); |
99 | alarmLayout->addWidget( ok ); | 99 | alarmLayout->addWidget( ok ); |
100 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 100 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
101 | alarmLayout->addWidget( cancel ); | 101 | alarmLayout->addWidget( cancel ); |
102 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 102 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
103 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 103 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
104 | resize( 200, 200 ); | 104 | resize( 200, 200 ); |
105 | 105 | ||
106 | } | 106 | } |
107 | 107 | ||
108 | 108 | ||
109 | 109 | ||
110 | QString mAlarmSound, mAlarmProgram ; | 110 | QString mAlarmSound, mAlarmProgram ; |
111 | QCheckBox* mAlarmButton; | 111 | QCheckBox* mAlarmButton; |
112 | QSpinBox* mAlarmTimeEdit; | 112 | QSpinBox* mAlarmTimeEdit; |
113 | QLabel* mAlarmLabel; | 113 | QLabel* mAlarmLabel; |
114 | QComboBox* mAlarmIncrCombo ; | 114 | QComboBox* mAlarmIncrCombo ; |
115 | QPushButton* mAlarmSoundButton ,*mAlarmProgramButton; | 115 | QPushButton* mAlarmSoundButton ,*mAlarmProgramButton; |
116 | private slots: | 116 | private slots: |
117 | 117 | ||
118 | void pickAlarmSound() | 118 | void pickAlarmSound() |
119 | { | 119 | { |
120 | //QString prefix = mAlarmSound; | 120 | //QString prefix = mAlarmSound; |
121 | if (!mAlarmSoundButton->isOn()) { | 121 | if (!mAlarmSoundButton->isOn()) { |
122 | //mAlarmSound = ""; | 122 | //mAlarmSound = ""; |
123 | QToolTip::remove(mAlarmSoundButton); | 123 | QToolTip::remove(mAlarmSoundButton); |
124 | QToolTip::add(mAlarmSoundButton, i18n("No sound set")); | 124 | QToolTip::add(mAlarmSoundButton, i18n("No sound set")); |
125 | mAlarmProgramButton->setOn(true); | 125 | mAlarmProgramButton->setOn(true); |
126 | mAlarmSoundButton->setOn(false); | 126 | mAlarmSoundButton->setOn(false); |
127 | } else { | 127 | } else { |
128 | QString fileName(KFileDialog::getOpenFileName(mAlarmSound, | 128 | QString fileName(KFileDialog::getOpenFileName(mAlarmSound, |
129 | i18n("*.wav|Wav Files"), 0)); | 129 | i18n("*.wav|Wav Files"), 0)); |
130 | if (!fileName.isEmpty()) { | 130 | if (!fileName.isEmpty()) { |
131 | mAlarmSound = fileName; | 131 | mAlarmSound = fileName; |
132 | mAlarmLabel->setText( "..."+fileName.right( 30 ) ); | 132 | mAlarmLabel->setText( "..."+fileName.right( 30 ) ); |
133 | QToolTip::remove(mAlarmSoundButton); | 133 | QToolTip::remove(mAlarmSoundButton); |
134 | QString dispStr = i18n("Playing '%1'").arg(fileName); | 134 | QString dispStr = i18n("Playing '%1'").arg(fileName); |
135 | QToolTip::add(mAlarmSoundButton, dispStr); | 135 | QToolTip::add(mAlarmSoundButton, dispStr); |
136 | mAlarmProgramButton->setOn(false); | 136 | mAlarmProgramButton->setOn(false); |
137 | mAlarmSoundButton->setOn(true); | 137 | mAlarmSoundButton->setOn(true); |
138 | } else { | 138 | } else { |
139 | mAlarmProgramButton->setOn(true); | 139 | mAlarmProgramButton->setOn(true); |
140 | mAlarmSoundButton->setOn(false); | 140 | mAlarmSoundButton->setOn(false); |
141 | 141 | ||
142 | } | 142 | } |
143 | } | 143 | } |
144 | }; | 144 | }; |
145 | 145 | ||
146 | void pickAlarmProgram() | 146 | void pickAlarmProgram() |
147 | { | 147 | { |
148 | if (!mAlarmProgramButton->isOn()) { | 148 | if (!mAlarmProgramButton->isOn()) { |
149 | //mAlarmProgram = ""; | 149 | //mAlarmProgram = ""; |
150 | QToolTip::remove(mAlarmProgramButton); | 150 | QToolTip::remove(mAlarmProgramButton); |
151 | QToolTip::add(mAlarmProgramButton, i18n("No program set")); | 151 | QToolTip::add(mAlarmProgramButton, i18n("No program set")); |
152 | mAlarmProgramButton->setOn(false); | 152 | mAlarmProgramButton->setOn(false); |
153 | mAlarmSoundButton->setOn(true); | 153 | mAlarmSoundButton->setOn(true); |
154 | } else { | 154 | } else { |
155 | QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0)); | 155 | QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0)); |
156 | if (!fileName.isEmpty()) { | 156 | if (!fileName.isEmpty()) { |
157 | mAlarmProgram = fileName; | 157 | mAlarmProgram = fileName; |
158 | mAlarmLabel->setText( "..."+fileName.right( 30 ) ); | 158 | mAlarmLabel->setText( "..."+fileName.right( 30 ) ); |
159 | QToolTip::remove(mAlarmProgramButton); | 159 | QToolTip::remove(mAlarmProgramButton); |
160 | QString dispStr = i18n("Running '%1'").arg(fileName); | 160 | QString dispStr = i18n("Running '%1'").arg(fileName); |
161 | QToolTip::add(mAlarmProgramButton, dispStr); | 161 | QToolTip::add(mAlarmProgramButton, dispStr); |
162 | mAlarmSoundButton->setOn(false); | 162 | mAlarmSoundButton->setOn(false); |
163 | mAlarmProgramButton->setOn(true); | 163 | mAlarmProgramButton->setOn(true); |
164 | } else { | 164 | } else { |
165 | mAlarmProgramButton->setOn(false); | 165 | mAlarmProgramButton->setOn(false); |
166 | mAlarmSoundButton->setOn(true); | 166 | mAlarmSoundButton->setOn(true); |
167 | } | 167 | } |
168 | } | 168 | } |
169 | }; | 169 | }; |
170 | 170 | ||
171 | }; | 171 | }; |
172 | 172 | ||
173 | 173 | ||
174 | 174 | ||
175 | 175 | ||
176 | 176 | ||
177 | 177 | ||
178 | 178 | ||
179 | typedef CustomListViewItem<Incidence *> KOListViewItem; | 179 | typedef CustomListViewItem<Incidence *> KOListViewItem; |
180 | 180 | ||
181 | /** | 181 | /** |
182 | This class provides the initialisation of a KOListViewItem for calendar | 182 | This class provides the initialisation of a KOListViewItem for calendar |
183 | components using the Incidence::Visitor. | 183 | components using the Incidence::Visitor. |
184 | */ | 184 | */ |
185 | class ListItemVisitor : public Incidence::Visitor | 185 | class ListItemVisitor : public Incidence::Visitor |
186 | { | 186 | { |
187 | public: | 187 | public: |
188 | ListItemVisitor(KOListViewItem *, QDate d); | 188 | ListItemVisitor(KOListViewItem *, QDate d); |
189 | ~ListItemVisitor(); | 189 | ~ListItemVisitor(); |
190 | 190 | ||
191 | bool visit(Event *); | 191 | bool visit(Event *); |
192 | bool visit(Todo *); | 192 | bool visit(Todo *); |
193 | bool visit(Journal *); | 193 | bool visit(Journal *); |
194 | 194 | ||
195 | private: | 195 | private: |
196 | KOListViewItem *mItem; | 196 | KOListViewItem *mItem; |
197 | QDate mDate; | 197 | QDate mDate; |
198 | }; | 198 | }; |
199 | 199 | ||
200 | /** | 200 | /** |
201 | This class provides a multi-column list view of events. It can | 201 | This class provides a multi-column list view of events. It can |
202 | display events from one particular day or several days, it doesn't | 202 | display events from one particular day or several days, it doesn't |
203 | matter. To use a view that only handles one day at a time, use | 203 | matter. To use a view that only handles one day at a time, use |
204 | KODayListView. | 204 | KODayListView. |
205 | 205 | ||
206 | @short multi-column list view of various events. | 206 | @short multi-column list view of various events. |
207 | @author Preston Brown <pbrown@kde.org> | 207 | @author Preston Brown <pbrown@kde.org> |
208 | @see KOBaseView, KODayListView | 208 | @see KOBaseView, KODayListView |
209 | */ | 209 | */ |
210 | class KOListView; | 210 | class KOListView; |
211 | 211 | ||
212 | class KOListViewListView : public KListView | 212 | class KOListViewListView : public KListView |
213 | { | 213 | { |
214 | Q_OBJECT | 214 | Q_OBJECT |
215 | public: | 215 | public: |
216 | KOListViewListView(KOListView * lv ); | 216 | KOListViewListView(KOListView * lv ); |
217 | signals: | 217 | signals: |
218 | void newEvent(); | 218 | void newEvent(); |
219 | void showIncidence( Incidence* ); | 219 | void showIncidence( Incidence* ); |
220 | private: | 220 | private: |
221 | void keyPressEvent ( QKeyEvent * ) ; | 221 | void keyPressEvent ( QKeyEvent * ) ; |
222 | void contentsMouseDoubleClickEvent(QMouseEvent *e); | 222 | void contentsMouseDoubleClickEvent(QMouseEvent *e); |
223 | void contentsMousePressEvent(QMouseEvent *e); | 223 | void contentsMousePressEvent(QMouseEvent *e); |
224 | void contentsMouseReleaseEvent(QMouseEvent *e); | 224 | void contentsMouseReleaseEvent(QMouseEvent *e); |
225 | void contentsMouseMoveEvent(QMouseEvent *e); | 225 | void contentsMouseMoveEvent(QMouseEvent *e); |
226 | bool mAllowPopupMenu; | 226 | bool mAllowPopupMenu; |
227 | bool mMouseDown; | 227 | bool mMouseDown; |
228 | int mYMousePos; | 228 | int mYMousePos; |
229 | }; | 229 | }; |
230 | 230 | ||
231 | class KOListView : public KOEventView | 231 | class KOListView : public KOEventView |
232 | { | 232 | { |
233 | Q_OBJECT | 233 | Q_OBJECT |
234 | public: | 234 | public: |
235 | KOListView(Calendar *calendar, QWidget *parent = 0, | 235 | KOListView(Calendar *calendar, QWidget *parent = 0, |
236 | const char *name = 0); | 236 | const char *name = 0); |
237 | ~KOListView(); | 237 | ~KOListView(); |
238 | 238 | ||
239 | virtual int maxDatesHint(); | 239 | virtual int maxDatesHint(); |
240 | virtual int currentDateCount(); | 240 | virtual int currentDateCount(); |
241 | virtual QPtrList<Incidence> selectedIncidences(); | 241 | virtual QPtrList<Incidence> selectedIncidences(); |
242 | virtual DateList selectedDates(); | 242 | virtual DateList selectedDates(); |
243 | 243 | ||
244 | void showDates(bool show); | 244 | void showDates(bool show); |
245 | Incidence* currentItem(); | 245 | Incidence* currentItem(); |
246 | void addTodos(QPtrList<Todo> eventList); | 246 | void addTodos(QPtrList<Todo> eventList); |
247 | void addJournals(QPtrList<Journal> eventList); | 247 | void addJournals(QPtrList<Journal> eventList); |
248 | virtual void printPreview(CalPrinter *calPrinter, | 248 | virtual void printPreview(CalPrinter *calPrinter, |
249 | const QDate &, const QDate &); | 249 | const QDate &, const QDate &); |
250 | 250 | ||
251 | void readSettings(KConfig *config, QString setting = "KOListView Layout"); | 251 | void readSettings(KConfig *config, QString setting = "KOListView Layout"); |
252 | void writeSettings(KConfig *config, QString setting = "KOListView Layout"); | 252 | void writeSettings(KConfig *config, QString setting = "KOListView Layout"); |
253 | void updateList(); | 253 | void updateList(); |
254 | void setStartDate(const QDate &start); | 254 | void setStartDate(const QDate &start); |
255 | int count(); | 255 | int count(); |
256 | QString getWhatsThisText(QPoint p); | 256 | QString getWhatsThisText(QPoint p); |
257 | void resetFocus(); | 257 | void resetFocus(); |
258 | signals: | 258 | signals: |
259 | void signalNewEvent(); | 259 | void signalNewEvent(); |
260 | void beamIncidenceList(QPtrList<Incidence>); | 260 | void beamIncidenceList(QPtrList<Incidence>); |
261 | 261 | ||
262 | public slots: | 262 | public slots: |
263 | virtual void updateView(); | 263 | virtual void updateView(); |
264 | virtual void showDates(const QDate &start, const QDate &end); | 264 | virtual void showDates(const QDate &start, const QDate &end); |
265 | virtual void showEvents(QPtrList<Event> eventList); | 265 | virtual void showEvents(QPtrList<Event> eventList); |
266 | void clearSelection(); | 266 | void clearSelection(); |
267 | void allSelection(); | 267 | void allSelection(); |
268 | 268 | ||
269 | void clear(); | 269 | void clear(); |
270 | void beamDone( Ir *ir ); | 270 | void beamDone( Ir *ir ); |
271 | void showDates(); | 271 | void showDates(); |
272 | void hideDates(); | 272 | void hideDates(); |
273 | void deleteAll(); | 273 | void deleteAll(); |
274 | void saveToFile(); | 274 | void saveToFile(); |
275 | void saveToFileVCS(); | ||
275 | void saveDescriptionToFile(); | 276 | void saveDescriptionToFile(); |
276 | void beamSelected(); | 277 | void beamSelected(); |
277 | void updateConfig(); | 278 | void updateConfig(); |
278 | void addCat(); | 279 | void addCat(); |
279 | void setCat(); | 280 | void setCat(); |
280 | void setAlarm(); | 281 | void setAlarm(); |
281 | void setCategories( bool removeOld ); | 282 | void setCategories( bool removeOld ); |
282 | void changeEventDisplay(Event *, int); | 283 | void changeEventDisplay(Event *, int); |
283 | 284 | ||
284 | void defaultItemAction(QListViewItem *item); | 285 | void defaultItemAction(QListViewItem *item); |
285 | void popupMenu(QListViewItem *item,const QPoint &,int); | 286 | void popupMenu(QListViewItem *item,const QPoint &,int); |
286 | 287 | ||
287 | protected slots: | 288 | protected slots: |
288 | void processSelectionChange(QListViewItem *); | 289 | void processSelectionChange(QListViewItem *); |
289 | 290 | ||
290 | protected: | 291 | protected: |
292 | void writeToFile( bool iCal ); | ||
291 | void addEvents(QPtrList<Event> eventList); | 293 | void addEvents(QPtrList<Event> eventList); |
292 | void addIncidence(Incidence *); | 294 | void addIncidence(Incidence *); |
293 | KOListViewItem *getItemForEvent(Event *event); | 295 | KOListViewItem *getItemForEvent(Event *event); |
294 | 296 | ||
295 | private: | 297 | private: |
296 | KOListViewListView *mListView; | 298 | KOListViewListView *mListView; |
297 | KOEventPopupMenu *mPopupMenu; | 299 | KOEventPopupMenu *mPopupMenu; |
298 | KOListViewItem *mActiveItem; | 300 | KOListViewItem *mActiveItem; |
299 | QDict<Incidence> mUidDict; | 301 | QDict<Incidence> mUidDict; |
300 | QDate mStartDate; | 302 | QDate mStartDate; |
301 | void keyPressEvent ( QKeyEvent * ) ; | 303 | void keyPressEvent ( QKeyEvent * ) ; |
302 | }; | 304 | }; |
303 | 305 | ||
304 | #endif | 306 | #endif |