-rw-r--r-- | bin/kdepim/kaddressbook/germantranslation.txt | 4 | ||||
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 17 |
3 files changed, 19 insertions, 4 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt index 7879194..e54e140 100644 --- a/bin/kdepim/kaddressbook/germantranslation.txt +++ b/bin/kdepim/kaddressbook/germantranslation.txt | |||
@@ -562,197 +562,201 @@ | |||
562 | { "Edit Email Addresses","Editiere Email Adressen" }, | 562 | { "Edit Email Addresses","Editiere Email Adressen" }, |
563 | { "Email address:","Email Adresse:" }, | 563 | { "Email address:","Email Adresse:" }, |
564 | { "Change","Ändere" }, | 564 | { "Change","Ändere" }, |
565 | { "Set Standard","Setze Standard" }, | 565 | { "Set Standard","Setze Standard" }, |
566 | { "New Contact","Neuer Contact" }, | 566 | { "New Contact","Neuer Contact" }, |
567 | { "Undo %1","Rückgängig %1" }, | 567 | { "Undo %1","Rückgängig %1" }, |
568 | { "Redo","Wiederholen" }, | 568 | { "Redo","Wiederholen" }, |
569 | { "Saving ... please wait! ","Am Speichern ... bitte warten! " }, | 569 | { "Saving ... please wait! ","Am Speichern ... bitte warten! " }, |
570 | { "CSV Import Dialog","CSV Import Dialog" }, | 570 | { "CSV Import Dialog","CSV Import Dialog" }, |
571 | { "File to import:","Datei zum Import:" }, | 571 | { "File to import:","Datei zum Import:" }, |
572 | { "Delimiter","Trennzeichen" }, | 572 | { "Delimiter","Trennzeichen" }, |
573 | { "Comma","Komma" }, | 573 | { "Comma","Komma" }, |
574 | { "Semicolon","Semikolon" }, | 574 | { "Semicolon","Semikolon" }, |
575 | { "Tabulator","Tabulator" }, | 575 | { "Tabulator","Tabulator" }, |
576 | { "Space","Leerzeichen" }, | 576 | { "Space","Leerzeichen" }, |
577 | { "1","1" }, | 577 | { "1","1" }, |
578 | { """,""" }, | 578 | { """,""" }, |
579 | { "'","'" }, | 579 | { "'","'" }, |
580 | { "Start at line:","Beginne mit Zeile:" }, | 580 | { "Start at line:","Beginne mit Zeile:" }, |
581 | { "Textquote:","Textquote:" }, | 581 | { "Textquote:","Textquote:" }, |
582 | { "Ignore duplicate delimiters","Ignoriere doppelte Trennzeichen" }, | 582 | { "Ignore duplicate delimiters","Ignoriere doppelte Trennzeichen" }, |
583 | { "Import KDE 2 Addressbook","Importiere KDE 2 Addressbook" }, | 583 | { "Import KDE 2 Addressbook","Importiere KDE 2 Addressbook" }, |
584 | { "Override previously imported entries?","Überschreibe bereits importierte Einträge?" }, | 584 | { "Override previously imported entries?","Überschreibe bereits importierte Einträge?" }, |
585 | { "Select vCard to Import","Selektiere zu importierende vCard" }, | 585 | { "Select vCard to Import","Selektiere zu importierende vCard" }, |
586 | { "Information","Information" }, | 586 | { "Information","Information" }, |
587 | { "contacts successfully imported.","Kontakte erfolgreich importiert." }, | 587 | { "contacts successfully imported.","Kontakte erfolgreich importiert." }, |
588 | { "Import xml file","Importiere xml Datei" }, | 588 | { "Import xml file","Importiere xml Datei" }, |
589 | { "Choose contact selection","Wähle Kontakt Auswahl" }, | 589 | { "Choose contact selection","Wähle Kontakt Auswahl" }, |
590 | { "Select the entire address book","Wähle das ganze Adressbuch" }, | 590 | { "Select the entire address book","Wähle das ganze Adressbuch" }, |
591 | { "Only contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","Nur in KA/Pi selektierte Kontate.\nDiese Option ist nicht verfügbar\nwhen keine Kontakte selektiert sind." }, | 591 | { "Only contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","Nur in KA/Pi selektierte Kontate.\nDiese Option ist nicht verfügbar\nwhen keine Kontakte selektiert sind." }, |
592 | { "Only contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","Nur Kontakte die auf den Filter zutreffen.\nDiese Option ist nicht verfügbar, wenn keine Filter definiert sind." }, | 592 | { "Only contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","Nur Kontakte die auf den Filter zutreffen.\nDiese Option ist nicht verfügbar, wenn keine Filter definiert sind." }, |
593 | { "Only contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","Nur Kontakte die Mitglieder der Kategirien sind,\die links selektiert sind.\nDiese Option ist nicht verfügbar, wenn es keine Kategirien gibt." }, | 593 | { "Only contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","Nur Kontakte die Mitglieder der Kategirien sind,\die links selektiert sind.\nDiese Option ist nicht verfügbar, wenn es keine Kategirien gibt." }, |
594 | { "Select a filter to decide which contacts to select.","Selektiere einen Filter um festzulegen welche Kontakte ausgewählt werden sollen." }, | 594 | { "Select a filter to decide which contacts to select.","Selektiere einen Filter um festzulegen welche Kontakte ausgewählt werden sollen." }, |
595 | { "Check the categories whose members you want to select.","Setzte die Kategorien, dessen Mitglieder Sie auswählen möchten." }, | 595 | { "Check the categories whose members you want to select.","Setzte die Kategorien, dessen Mitglieder Sie auswählen möchten." }, |
596 | { "I/O device: ","I/O device: " }, | 596 | { "I/O device: ","I/O device: " }, |
597 | { "Connection: ","Connection: " }, | 597 | { "Connection: ","Connection: " }, |
598 | { "Model(opt.): ","Model(opt.): " }, | 598 | { "Model(opt.): ","Model(opt.): " }, |
599 | { "Exporting to phone...","Exportiere aufs Handy..." }, | 599 | { "Exporting to phone...","Exportiere aufs Handy..." }, |
600 | { "Error exporting to phone","Fehler beim Export aufs Handy" }, | 600 | { "Error exporting to phone","Fehler beim Export aufs Handy" }, |
601 | { "contacts successfully exported.","Kontakte erfolgreich exportiert." }, | 601 | { "contacts successfully exported.","Kontakte erfolgreich exportiert." }, |
602 | { "Do you want to remove<br>all existing entries from<br>%1<br>before exporting.?","Wollen Sie<br>alle existieren Einträge von<br>%1<br>vor dem Export entfernen?" }, | 602 | { "Do you want to remove<br>all existing entries from<br>%1<br>before exporting.?","Wollen Sie<br>alle existieren Einträge von<br>%1<br>vor dem Export entfernen?" }, |
603 | { "Set formatted name","Setze formatierten Namen" }, | 603 | { "Set formatted name","Setze formatierten Namen" }, |
604 | { "You can set the formatted name\nfor a list of contacts in one go.","Sie können den formatierten Namen für\nein Liste von Kontakten auf einmal setzen." }, | 604 | { "You can set the formatted name\nfor a list of contacts in one go.","Sie können den formatierten Namen für\nein Liste von Kontakten auf einmal setzen." }, |
605 | { "Set formatted name to:","Setze formatierten Name auf:" }, | 605 | { "Set formatted name to:","Setze formatierten Name auf:" }, |
606 | { "Simple: James Bond","Einfach: James Bond" }, | 606 | { "Simple: James Bond","Einfach: James Bond" }, |
607 | { "Full: Mr. James 007 Bond I","Voll: Mr. James 007 Bond I" }, | 607 | { "Full: Mr. James 007 Bond I","Voll: Mr. James 007 Bond I" }, |
608 | { "Reverse: Bond, James","Umgekehrt: Bond, James" }, | 608 | { "Reverse: Bond, James","Umgekehrt: Bond, James" }, |
609 | { "Organization: MI6","Organisation: MI6" }, | 609 | { "Organization: MI6","Organisation: MI6" }, |
610 | { "Set formatted name to\norganization, if name empty","Setze formatierten Namen auf\nOrganisation, wenn Name leer ist." }, | 610 | { "Set formatted name to\norganization, if name empty","Setze formatierten Namen auf\nOrganisation, wenn Name leer ist." }, |
611 | { "Select contact list","Selektiere Kontakt Liste" }, | 611 | { "Select contact list","Selektiere Kontakt Liste" }, |
612 | { "Changing contact #%1","Ändere Kontakt #%1" }, | 612 | { "Changing contact #%1","Ändere Kontakt #%1" }, |
613 | { "Refreshing view...","Lade Ansicht neu..." }, | 613 | { "Refreshing view...","Lade Ansicht neu..." }, |
614 | { "Setting formatted name completed!","Setzen vom formatierten Namen beendet!" }, | 614 | { "Setting formatted name completed!","Setzen vom formatierten Namen beendet!" }, |
615 | { "Removing voice...","Entferne voice..." }, | 615 | { "Removing voice...","Entferne voice..." }, |
616 | { "Remove voice completed!","Entferne voice beendet!" }, | 616 | { "Remove voice completed!","Entferne voice beendet!" }, |
617 | { "Merge with existing categories?","Zu bestehenden\nKategorien hinzufügen?" }, | 617 | { "Merge with existing categories?","Zu bestehenden\nKategorien hinzufügen?" }, |
618 | { "Setting categories ... please wait!","Setze Kategorien ... bitte warten!" }, | 618 | { "Setting categories ... please wait!","Setze Kategorien ... bitte warten!" }, |
619 | { "Setting categories completed!","Setzen der Kategorien beendet!" }, | 619 | { "Setting categories completed!","Setzen der Kategorien beendet!" }, |
620 | { "OK","OK" }, | 620 | { "OK","OK" }, |
621 | { "Please wait, processing categories...","Bitte warten, bearbeite Kategorien..." }, | 621 | { "Please wait, processing categories...","Bitte warten, bearbeite Kategorien..." }, |
622 | { "Processing contact #%1","Bearbeite Kontakt #%1" }, | 622 | { "Processing contact #%1","Bearbeite Kontakt #%1" }, |
623 | { " categories added to list! "," Kategorien zur Liste hinzugefügt! " }, | 623 | { " categories added to list! "," Kategorien zur Liste hinzugefügt! " }, |
624 | { "%1: %2","%1: %2" }, | 624 | { "%1: %2","%1: %2" }, |
625 | { "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n","Ihr persönlicher Kontakt ist\nnicht gesetzt! Bitte selektieren Sie\nihn und setzen ihn mit Menu:\nKonfiguration - Setze wer bin ich\n" }, | 625 | { "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n","Ihr persönlicher Kontakt ist\nnicht gesetzt! Bitte selektieren Sie\nihn und setzen ihn mit Menu:\nKonfiguration - Setze wer bin ich\n" }, |
626 | { "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>","<qt>Wollen Sie wirklich<br><b>%1</b><br>als persönlichen Kontakt setzent?</qt>" }, | 626 | { "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>","<qt>Wollen Sie wirklich<br><b>%1</b><br>als persönlichen Kontakt setzent?</qt>" }, |
627 | { "Cut","Ausschneiden" }, | 627 | { "Cut","Ausschneiden" }, |
628 | { "Paste","Einfügen" }, | 628 | { "Paste","Einfügen" }, |
629 | { "Delete","Löschen" }, | 629 | { "Delete","Löschen" }, |
630 | { "Choose...","Wähle..." }, | 630 | { "Choose...","Wähle..." }, |
631 | { "Add View","Ansicht hinzufügen" }, | 631 | { "Add View","Ansicht hinzufügen" }, |
632 | { "View name:","Ansicht Name:" }, | 632 | { "View name:","Ansicht Name:" }, |
633 | { "View Type","Ainsicht Typ" }, | 633 | { "View Type","Ainsicht Typ" }, |
634 | { "Icons represent contacts. Very simple view.","Icons repräsentieren Kontakte. Sehr einfache Ansicht." }, | 634 | { "Icons represent contacts. Very simple view.","Icons repräsentieren Kontakte. Sehr einfache Ansicht." }, |
635 | { "A listing of contacts in a table. Each cell of the table holds a field of the contact.","Eine Kontaktliste in einer Tabelle." }, | 635 | { "A listing of contacts in a table. Each cell of the table holds a field of the contact.","Eine Kontaktliste in einer Tabelle." }, |
636 | { "Rolodex style cards represent contacts.","Rolodex Stil Karten repräsentieren Kontakte." }, | 636 | { "Rolodex style cards represent contacts.","Rolodex Stil Karten repräsentieren Kontakte." }, |
637 | { "Draw &separators","Zeichne &Trennlinie" }, | 637 | { "Draw &separators","Zeichne &Trennlinie" }, |
638 | { "Separator &width:","Trennlinien &Breite:" }, | 638 | { "Separator &width:","Trennlinien &Breite:" }, |
639 | { "&Padding:","Füllung:" }, | 639 | { "&Padding:","Füllung:" }, |
640 | { "Cards","Karten" }, | 640 | { "Cards","Karten" }, |
641 | { "&Margin:","&Rand:" }, | 641 | { "&Margin:","&Rand:" }, |
642 | { "Draw &borders","Zeichne Ränder" }, | 642 | { "Draw &borders","Zeichne Ränder" }, |
643 | { "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data.","The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data." }, | 643 | { "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data.","The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data." }, |
644 | { "The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators.","The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators." }, | 644 | { "The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators.","The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators." }, |
645 | { "Sets the width of column separators","Sets the width of column separators" }, | 645 | { "Sets the width of column separators","Sets the width of column separators" }, |
646 | { "&Layout","&Layout" }, | 646 | { "&Layout","&Layout" }, |
647 | { "Show &empty fields","Zeige leere Felder" }, | 647 | { "Show &empty fields","Zeige leere Felder" }, |
648 | { "Show field &labels","Zeige Feld Label" }, | 648 | { "Show field &labels","Zeige Feld Label" }, |
649 | { "Be&havior","Ver&halten" }, | 649 | { "Be&havior","Ver&halten" }, |
650 | { "Header, Border and Separator Color","Kopf, Rand und Trennlinien Farbe" }, | 650 | { "Header, Border and Separator Color","Kopf, Rand und Trennlinien Farbe" }, |
651 | { "<qt>Are you sure that you want to delete the view <b>%1</b>?</qt>","<qt>Sind Sie sicher, dass Sie die Ansicht <b>%1</b> löschen möchten?</qt>" }, | 651 | { "<qt>Are you sure that you want to delete the view <b>%1</b>?</qt>","<qt>Sind Sie sicher, dass Sie die Ansicht <b>%1</b> löschen möchten?</qt>" }, |
652 | { "Confirm Delete","Bestätige Löschen" }, | 652 | { "Confirm Delete","Bestätige Löschen" }, |
653 | { "Edit Address Book Filter","Editiere Adressbuch Filter" }, | 653 | { "Edit Address Book Filter","Editiere Adressbuch Filter" }, |
654 | { "Category rule","Kategorie Regel" }, | 654 | { "Category rule","Kategorie Regel" }, |
655 | { "Include categories","Inklusive" }, | 655 | { "Include categories","Inklusive" }, |
656 | { "Exclude categories","Exclusive" }, | 656 | { "Exclude categories","Exclusive" }, |
657 | { "Include contacts, that are:","Schließe folgende Kontakte ein:" }, | 657 | { "Include contacts, that are:","Schließe folgende Kontakte ein:" }, |
658 | { "public","Öffentlich" }, | 658 | { "public","Öffentlich" }, |
659 | { "private","Privat" }, | 659 | { "private","Privat" }, |
660 | { "confidential","Vertraulich" }, | 660 | { "confidential","Vertraulich" }, |
661 | { "Configure Resources","Konfiguriere Resourcen" }, | 661 | { "Configure Resources","Konfiguriere Resourcen" }, |
662 | { "Resource Configuration","Resource Konfiguration" }, | 662 | { "Resource Configuration","Resource Konfiguration" }, |
663 | { "Resources","Resourcen" }, | 663 | { "Resources","Resourcen" }, |
664 | { "Standard","Standard" }, | 664 | { "Standard","Standard" }, |
665 | { "&Use as Standard","Setze als Standard" }, | 665 | { "&Use as Standard","Setze als Standard" }, |
666 | { "Select type of the new resource:","Selektiere Typ der neuen Resource:" }, | 666 | { "Select type of the new resource:","Selektiere Typ der neuen Resource:" }, |
667 | { "General Settings","Allgemeine Einstellungen" }, | 667 | { "General Settings","Allgemeine Einstellungen" }, |
668 | { "Read-only","Nur-Lesen" }, | 668 | { "Read-only","Nur-Lesen" }, |
669 | { "Include in sync","Schließe in Sync mit ein" }, | 669 | { "Include in sync","Schließe in Sync mit ein" }, |
670 | { "%1 Resource Settings","%1 Resource Einstellungen" }, | 670 | { "%1 Resource Settings","%1 Resource Einstellungen" }, |
671 | { "Format:","Format:" }, | 671 | { "Format:","Format:" }, |
672 | { "Location:","Ort:" }, | 672 | { "Location:","Ort:" }, |
673 | { "Full Menu bar (restart)","Volle Menu Leiste (Neustart!)" }, | 673 | { "Full Menu bar (restart)","Volle Menu Leiste (Neustart!)" }, |
674 | { "Language","Sprache" }, | 674 | { "Language","Sprache" }, |
675 | { "Time Format","Zeit Format" }, | 675 | { "Time Format","Zeit Format" }, |
676 | { "Time Zone","Zeit Zone" }, | 676 | { "Time Zone","Zeit Zone" }, |
677 | { "Data storage path","Daten Speicherpfad" }, | 677 | { "Data storage path","Daten Speicherpfad" }, |
678 | { "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" }, | 678 | { "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" }, |
679 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, | 679 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, |
680 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, | 680 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, |
681 | { "Save settings","Speichere Einstellungen" }, | 681 | { "Save settings","Speichere Einstellungen" }, |
682 | { "Save standard","Speichere Standard" }, | 682 | { "Save standard","Speichere Standard" }, |
683 | { "Save","Speichern" }, | 683 | { "Save","Speichern" }, |
684 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | 684 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, |
685 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, | 685 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, |
686 | { "Multiple Sync options","Multi Sync Optionen" }, | 686 | { "Multiple Sync options","Multi Sync Optionen" }, |
687 | { "Sync algo options","Sync Ablauf Optionen" }, | 687 | { "Sync algo options","Sync Ablauf Optionen" }, |
688 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, | 688 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, |
689 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, | 689 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, |
690 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, | 690 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, |
691 | { "Write back options","Optionen zum Zurückschreiben" }, | 691 | { "Write back options","Optionen zum Zurückschreiben" }, |
692 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, | 692 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, |
693 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, | 693 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, |
694 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, | 694 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, |
695 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, | 695 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, |
696 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, | 696 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, |
697 | { "Time period","Zeitspanne" }, | 697 | { "Time period","Zeitspanne" }, |
698 | { "From ","Von " }, | 698 | { "From ","Von " }, |
699 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, | 699 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, |
700 | { " weeks in the future "," Wochen in der Zukunft " }, | 700 | { " weeks in the future "," Wochen in der Zukunft " }, |
701 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, | 701 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, |
702 | { "Local temp file:","Lokale temp Datei:" }, | 702 | { "Local temp file:","Lokale temp Datei:" }, |
703 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, | 703 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, |
704 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, | 704 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, |
705 | { "You cannot remove your standard resource!\n Please select a new standard resource first.","Standard Resource kann\nnicht entfernt werden!\nBitte eine andere Resource\nals Standard setzen." }, | 705 | { "You cannot remove your standard resource!\n Please select a new standard resource first.","Standard Resource kann\nnicht entfernt werden!\nBitte eine andere Resource\nals Standard setzen." }, |
706 | { "Sorry","Tut mir leid" }, | 706 | { "Sorry","Tut mir leid" }, |
707 | { "You cannot use a read-only<br> resource as standard!","Man kann nicht eine read-only<br> Resource als Standard setzen!" }, | 707 | { "You cannot use a read-only<br> resource as standard!","Man kann nicht eine read-only<br> Resource als Standard setzen!" }, |
708 | { "Please restart to get the \nchanged resources (re)loaded!\n","Bitte starten Sie jetzt\ndas Programm neu, um die geänderten\nResourcen neu zu laden!\n" }, | 708 | { "Please restart to get the \nchanged resources (re)loaded!\n","Bitte starten Sie jetzt\ndas Programm neu, um die geänderten\nResourcen neu zu laden!\n" }, |
709 | { "The selected file does not\ninclude a valid vCard.\nPlease check the file and try again.\n","Die gewählte Datei enthält\nkeine gültige vCard.\nBitte prüfen Sie die Datei\nund versuchen es erneut.\n" }, | 709 | { "The selected file does not\ninclude a valid vCard.\nPlease check the file and try again.\n","Die gewählte Datei enthält\nkeine gültige vCard.\nBitte prüfen Sie die Datei\nund versuchen es erneut.\n" }, |
710 | { "Unable to load resource '%1'","Resource kann nicht geladen werden: '%1'" }, | 710 | { "Unable to load resource '%1'","Resource kann nicht geladen werden: '%1'" }, |
711 | { "Some changes are only\neffective after a restart!\n","Einige Änderungen werden erst\nnach einem Neustart übernommen!\n" }, | 711 | { "Some changes are only\neffective after a restart!\n","Einige Änderungen werden erst\nnach einem Neustart übernommen!\n" }, |
712 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, | 712 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, |
713 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, | 713 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, |
714 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, | 714 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, |
715 | { "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?" }, | 715 | { "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?" }, |
716 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, | 716 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, |
717 | { "Error","Fehler" }, | 717 | { "Error","Fehler" }, |
718 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, | 718 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, |
719 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, | 719 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, |
720 | { "Warning","Warnung" }, | 720 | { "Warning","Warnung" }, |
721 | { "Select week number","Wähle Wochen Nummer" }, | 721 | { "Select week number","Wähle Wochen Nummer" }, |
722 | { "Februar","Februar" }, | 722 | { "Februar","Februar" }, |
723 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, | 723 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, |
724 | { "Password for remote access:","Passwort für fernen Zugriff:" }, | 724 | { "Password for remote access:","Passwort für fernen Zugriff:" }, |
725 | { "Remote IP address:","Ferne IP Adresse:" }, | 725 | { "Remote IP address:","Ferne IP Adresse:" }, |
726 | { "Remote port number:","Ferne Port Nummer:" }, | 726 | { "Remote port number:","Ferne Port Nummer:" }, |
727 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, | 727 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, |
728 | { "Remote from: ","Fern von: " }, | 728 | { "Remote from: ","Fern von: " }, |
729 | { "Local from: ","Lokal von: " }, | 729 | { "Local from: ","Lokal von: " }, |
730 | { "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" }, | 730 | { "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" }, |
731 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, | 731 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, |
732 | { "Write back","Schreibe zurück" }, | 732 | { "Write back","Schreibe zurück" }, |
733 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, | 733 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, |
734 | { "Received sync request","Sync Anfrage erhalten" }, | 734 | { "Received sync request","Sync Anfrage erhalten" }, |
735 | { "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." }, | 735 | { "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." }, |
736 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, | 736 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, |
737 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, | 737 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, |
738 | { "Sending file...","Sende Datei..." }, | 738 | { "Sending file...","Sende Datei..." }, |
739 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, | 739 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, |
740 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 740 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
741 | { "Received %1 bytes","%1 Bytes erhalten" }, | 741 | { "Received %1 bytes","%1 Bytes erhalten" }, |
742 | { "Writing file to disk...","Speichere Datei..." }, | 742 | { "Writing file to disk...","Speichere Datei..." }, |
743 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 743 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
744 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 744 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
745 | { "Synchronize!","Synchronisiere!" }, | 745 | { "Synchronize!","Synchronisiere!" }, |
746 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 746 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
747 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 747 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
748 | { "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!" }, | 748 | { "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!" }, |
749 | { "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" }, | 749 | { "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" }, |
750 | { "Search with '*' prefix (wildcard)","Suche mit '*' Prefix (Wildcard)" }, | 750 | { "Search with '*' prefix (wildcard)","Suche mit '*' Prefix (Wildcard)" }, |
751 | { "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" }, | 751 | { "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" }, |
752 | { "Edit new contact","Bearbeite neuen Kontakt" }, | 752 | { "Edit new contact","Bearbeite neuen Kontakt" }, |
753 | { "Edit ","Bearbeite " }, | 753 | { "Edit ","Bearbeite " }, |
754 | { "No contact changed!","Kein Kontakt verändert" }, | ||
755 | { "%1 contacts changed!","%1 Kontakte geändert!" }, | ||
756 | { "","" }, | ||
757 | { "","" }, | ||
754 | { "","" }, | 758 | { "","" }, |
755 | { "","" }, | 759 | { "","" }, |
756 | { "","" }, | 760 | { "","" }, |
757 | { "","" }, | 761 | { "","" }, |
758 | { "","" }, \ No newline at end of file | 762 | { "","" }, \ No newline at end of file |
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index af76558..2bd9e71 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp | |||
@@ -12,385 +12,385 @@ | |||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | /* | 21 | /* |
22 | Enhanced Version of the file for platform independent KDE tools. | 22 | Enhanced Version of the file for platform independent KDE tools. |
23 | Copyright (c) 2004 Ulf Schenk | 23 | Copyright (c) 2004 Ulf Schenk |
24 | 24 | ||
25 | $Id$ | 25 | $Id$ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <sys/types.h> | 28 | #include <sys/types.h> |
29 | #include <sys/stat.h> | 29 | #include <sys/stat.h> |
30 | #ifndef _WIN32_ | 30 | #ifndef _WIN32_ |
31 | #include <unistd.h> | 31 | #include <unistd.h> |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #include <qfile.h> | 34 | #include <qfile.h> |
35 | #include <qfileinfo.h> | 35 | #include <qfileinfo.h> |
36 | #include <qregexp.h> | 36 | #include <qregexp.h> |
37 | #include <qtimer.h> | 37 | #include <qtimer.h> |
38 | 38 | ||
39 | #include <kapplication.h> | 39 | #include <kapplication.h> |
40 | #include <kconfig.h> | 40 | #include <kconfig.h> |
41 | #include <kdebug.h> | 41 | #include <kdebug.h> |
42 | #include <klocale.h> | 42 | #include <klocale.h> |
43 | //US #include <ksavefile.h> | 43 | //US #include <ksavefile.h> |
44 | #include <kstandarddirs.h> | 44 | #include <kstandarddirs.h> |
45 | #include <kmessagebox.h> | 45 | #include <kmessagebox.h> |
46 | 46 | ||
47 | #include "formatfactory.h" | 47 | #include "formatfactory.h" |
48 | 48 | ||
49 | #include "resource.h" | 49 | #include "resource.h" |
50 | #include "resourcefileconfig.h" | 50 | #include "resourcefileconfig.h" |
51 | #include "stdaddressbook.h" | 51 | #include "stdaddressbook.h" |
52 | #define NO_DIRWATCH | 52 | #define NO_DIRWATCH |
53 | #include "resourcefile.h" | 53 | #include "resourcefile.h" |
54 | 54 | ||
55 | //#define ALLOW_LOCKING | 55 | //#define ALLOW_LOCKING |
56 | 56 | ||
57 | 57 | ||
58 | using namespace KABC; | 58 | using namespace KABC; |
59 | 59 | ||
60 | extern "C" | 60 | extern "C" |
61 | #ifdef _WIN32_ | 61 | #ifdef _WIN32_ |
62 | __declspec(dllexport) | 62 | __declspec(dllexport) |
63 | #else | 63 | #else |
64 | { | 64 | { |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | //US void *init_kabc_file() | 67 | //US void *init_kabc_file() |
68 | void *init_microkabc_file() | 68 | void *init_microkabc_file() |
69 | { | 69 | { |
70 | return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>(); | 70 | return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>(); |
71 | } | 71 | } |
72 | #ifndef _WIN32_ | 72 | #ifndef _WIN32_ |
73 | } | 73 | } |
74 | #endif | 74 | #endif |
75 | 75 | ||
76 | ResourceFile::ResourceFile( const KConfig *config ) | 76 | ResourceFile::ResourceFile( const KConfig *config ) |
77 | : Resource( config ) , mFormat( 0 ) | 77 | : Resource( config ) , mFormat( 0 ) |
78 | { | 78 | { |
79 | QString fileName, formatName, default_fileName; | 79 | QString fileName, formatName, default_fileName; |
80 | 80 | ||
81 | default_fileName = StdAddressBook::fileName(); | 81 | default_fileName = StdAddressBook::fileName(); |
82 | 82 | ||
83 | KConfig *cfg = (KConfig *)config; | 83 | KConfig *cfg = (KConfig *)config; |
84 | if ( cfg ) { | 84 | if ( cfg ) { |
85 | fileName = cfg->readEntry( "FileName", default_fileName ); | 85 | fileName = cfg->readEntry( "FileName", default_fileName ); |
86 | formatName = cfg->readEntry( "FileFormat", "vcard" ); | 86 | formatName = cfg->readEntry( "FileFormat", "vcard" ); |
87 | mFamily = cfg->readEntry( "ResourceName", "std" ); | 87 | mFamily = cfg->readEntry( "ResourceName", "std" ); |
88 | } else { | 88 | } else { |
89 | fileName = default_fileName; | 89 | fileName = default_fileName; |
90 | formatName = "vcard"; | 90 | formatName = "vcard"; |
91 | } | 91 | } |
92 | 92 | ||
93 | init( fileName, formatName ); | 93 | init( fileName, formatName ); |
94 | } | 94 | } |
95 | 95 | ||
96 | ResourceFile::ResourceFile( const QString &fileName , | 96 | ResourceFile::ResourceFile( const QString &fileName , |
97 | const QString &formatName ) | 97 | const QString &formatName ) |
98 | : Resource( 0 ) | 98 | : Resource( 0 ) |
99 | { | 99 | { |
100 | // qDebug("ResourceFile::ResourceFile : 3 %s, %s", fileName.latin1(), formatName.latin1()); | 100 | // qDebug("ResourceFile::ResourceFile : 3 %s, %s", fileName.latin1(), formatName.latin1()); |
101 | 101 | ||
102 | 102 | ||
103 | 103 | ||
104 | init( fileName, formatName ); | 104 | init( fileName, formatName ); |
105 | } | 105 | } |
106 | 106 | ||
107 | void ResourceFile::init( const QString &fileName, const QString &formatName ) | 107 | void ResourceFile::init( const QString &fileName, const QString &formatName ) |
108 | { | 108 | { |
109 | mFormatName = formatName; | 109 | mFormatName = formatName; |
110 | 110 | ||
111 | FormatFactory *factory = FormatFactory::self(); | 111 | FormatFactory *factory = FormatFactory::self(); |
112 | mFormat = factory->format( mFormatName ); | 112 | mFormat = factory->format( mFormatName ); |
113 | 113 | ||
114 | if ( !mFormat ) { | 114 | if ( !mFormat ) { |
115 | mFormatName = "vcard"; | 115 | mFormatName = "vcard"; |
116 | mFormat = factory->format( mFormatName ); | 116 | mFormat = factory->format( mFormatName ); |
117 | } | 117 | } |
118 | 118 | ||
119 | #ifndef NO_DIRWATCH | 119 | #ifndef NO_DIRWATCH |
120 | connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) ); | 120 | connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) ); |
121 | connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) ); | 121 | connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) ); |
122 | connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) ); | 122 | connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) ); |
123 | #endif | 123 | #endif |
124 | 124 | ||
125 | QString localKdeDir; | 125 | QString localKdeDir; |
126 | localKdeDir = readEnvPath("LOCALMICROKDEHOME"); | 126 | localKdeDir = readEnvPath("LOCALMICROKDEHOME"); |
127 | if ( ! localKdeDir.isEmpty() ) { | 127 | if ( ! localKdeDir.isEmpty() ) { |
128 | qDebug("LOCALMICROKDEHOME is set to: %s",localKdeDir.latin1() ); | 128 | qDebug("LOCALMICROKDEHOME is set to: %s",localKdeDir.latin1() ); |
129 | QFileInfo fi ( fileName ); | 129 | QFileInfo fi ( fileName ); |
130 | QString localname = localKdeDir + "/apps/kabc/" + fi.fileName (); | 130 | QString localname = localKdeDir + "/apps/kabc/" + fi.fileName (); |
131 | QFileInfo fi2 ( localname ); | 131 | QFileInfo fi2 ( localname ); |
132 | if ( ! fi2.exists() || mFamily == "sync_res" ) { | 132 | if ( ! fi2.exists() || mFamily == "sync_res" ) { |
133 | if ( fi.exists() && mFamily == "sync_res") { | 133 | if ( fi.exists() && mFamily == "sync_res") { |
134 | qDebug("LOCAL mode SYNC mode using absolute file path "); | 134 | qDebug("LOCAL mode SYNC mode using absolute file path "); |
135 | setFileName( fileName ); | 135 | setFileName( fileName ); |
136 | return; | 136 | return; |
137 | } else { | 137 | } else { |
138 | KMessageBox::error(0,i18n("Addressbook resource file not found:\n '%1'.\nIn LOCAL mode only resource files in\n'%2'\nare supported.\n(i.e. in the dir ./apps/kabc/ relative to the kapi(.exe) binary.)\n\nIf you are starting KA/Pi for the very first time\nyou will get this error message as well.\nIt will create the missing file automatically for you.").arg(localname).arg(localKdeDir+"/apps/kabc/") ); | 138 | KMessageBox::error(0,i18n("Addressbook resource file not found:\n '%1'.\nIn LOCAL mode only resource files in\n'%2'\nare supported.\n(i.e. in the dir ./apps/kabc/ relative to the kapi(.exe) binary.)\n\nIf you are starting KA/Pi for the very first time\nyou will get this error message as well.\nIt will create the missing file automatically for you.").arg(localname).arg(localKdeDir+"/apps/kabc/") ); |
139 | setFileName( localname ); | 139 | setFileName( localname ); |
140 | return; | 140 | return; |
141 | } | 141 | } |
142 | 142 | ||
143 | } else { | 143 | } else { |
144 | qDebug("Local resource file found. Changing filename to: %s",localname.latin1() ); | 144 | qDebug("Local resource file found. Changing filename to: %s",localname.latin1() ); |
145 | setFileName( localname ); | 145 | setFileName( localname ); |
146 | return; | 146 | return; |
147 | } | 147 | } |
148 | 148 | ||
149 | } | 149 | } |
150 | setFileName( fileName ); | 150 | setFileName( fileName ); |
151 | } | 151 | } |
152 | 152 | ||
153 | ResourceFile::~ResourceFile() | 153 | ResourceFile::~ResourceFile() |
154 | { | 154 | { |
155 | delete mFormat; | 155 | delete mFormat; |
156 | mFormat = 0; | 156 | mFormat = 0; |
157 | } | 157 | } |
158 | 158 | ||
159 | void ResourceFile::writeConfig( KConfig *config ) | 159 | void ResourceFile::writeConfig( KConfig *config ) |
160 | { | 160 | { |
161 | 161 | ||
162 | config->setGroup( "Resource_" + identifier() ); | 162 | config->setGroup( "Resource_" + identifier() ); |
163 | Resource::writeConfig( config ); | 163 | Resource::writeConfig( config ); |
164 | 164 | ||
165 | config->writeEntry( "FileName", fileName() ); | 165 | config->writeEntry( "FileName", fileName() ); |
166 | config->writeEntry( "FileFormat", mFormatName ); | 166 | config->writeEntry( "FileFormat", mFormatName ); |
167 | 167 | ||
168 | // qDebug("ResourceFile::writeConfig format %s, %s", mFileName.latin1(), mFormatName.latin1()); | 168 | // qDebug("ResourceFile::writeConfig format %s, %s", mFileName.latin1(), mFormatName.latin1()); |
169 | 169 | ||
170 | } | 170 | } |
171 | 171 | ||
172 | Ticket *ResourceFile::requestSaveTicket() | 172 | Ticket *ResourceFile::requestSaveTicket() |
173 | { | 173 | { |
174 | kdDebug(5700) << "ResourceFile::requestSaveTicket()" << endl; | 174 | kdDebug(5700) << "ResourceFile::requestSaveTicket()" << endl; |
175 | 175 | ||
176 | if ( !addressBook() ) return 0; | 176 | if ( !addressBook() ) return 0; |
177 | 177 | ||
178 | #ifdef ALLOW_LOCKING | 178 | #ifdef ALLOW_LOCKING |
179 | if ( !lock( mFileName ) ) { | 179 | if ( !lock( mFileName ) ) { |
180 | qDebug("unablt to lock file "); | 180 | qDebug("unablt to lock file "); |
181 | return 0; | 181 | return 0; |
182 | } | 182 | } |
183 | #endif | 183 | #endif |
184 | return createTicket( this ); | 184 | return createTicket( this ); |
185 | } | 185 | } |
186 | 186 | ||
187 | 187 | ||
188 | bool ResourceFile::doOpen() | 188 | bool ResourceFile::doOpen() |
189 | { | 189 | { |
190 | QFile file( fileName() ); | 190 | QFile file( fileName() ); |
191 | qDebug("ResourceFile::openfile %s ", fileName().latin1()); | 191 | qDebug("ResourceFile::openfile %s ", fileName().latin1()); |
192 | 192 | ||
193 | if ( !file.exists() ) { | 193 | if ( !file.exists() ) { |
194 | // try to create the file | 194 | // try to create the file |
195 | bool ok = file.open( IO_WriteOnly ); | 195 | bool ok = file.open( IO_WriteOnly ); |
196 | if ( ok ) | 196 | if ( ok ) |
197 | file.close(); | 197 | file.close(); |
198 | 198 | ||
199 | return ok; | 199 | return ok; |
200 | } else { | 200 | } else { |
201 | if ( !file.open( IO_ReadWrite ) ) | 201 | if ( !file.open( IO_ReadWrite ) ) |
202 | return false; | 202 | return false; |
203 | 203 | ||
204 | if ( file.size() == 0 ) { | 204 | if ( file.size() < 10 ) { |
205 | file.close(); | 205 | file.close(); |
206 | return true; | 206 | return true; |
207 | } | 207 | } |
208 | 208 | ||
209 | bool ok = mFormat->checkFormat( &file ); | 209 | bool ok = mFormat->checkFormat( &file ); |
210 | file.close(); | 210 | file.close(); |
211 | 211 | ||
212 | return ok; | 212 | return ok; |
213 | } | 213 | } |
214 | } | 214 | } |
215 | 215 | ||
216 | void ResourceFile::doClose() | 216 | void ResourceFile::doClose() |
217 | { | 217 | { |
218 | } | 218 | } |
219 | 219 | ||
220 | bool ResourceFile::load() | 220 | bool ResourceFile::load() |
221 | { | 221 | { |
222 | 222 | ||
223 | QFile file( fileName() ); | 223 | QFile file( fileName() ); |
224 | if ( !file.open( IO_ReadOnly ) ) { | 224 | if ( !file.open( IO_ReadOnly ) ) { |
225 | addressBook()->error( i18n( "Unable to open file '%1'." ).arg( fileName() ) ); | 225 | addressBook()->error( i18n( "Unable to open file '%1'." ).arg( fileName() ) ); |
226 | return false; | 226 | return false; |
227 | } | 227 | } |
228 | 228 | ||
229 | // qDebug("ResourceFile::load format %s, %s", mFileName.latin1(), mFormatName.latin1()); | 229 | // qDebug("ResourceFile::load format %s, %s", mFileName.latin1(), mFormatName.latin1()); |
230 | 230 | ||
231 | return mFormat->loadAll( addressBook(), this, &file ); | 231 | return mFormat->loadAll( addressBook(), this, &file ); |
232 | } | 232 | } |
233 | 233 | ||
234 | bool ResourceFile::save( Ticket *ticket ) | 234 | bool ResourceFile::save( Ticket *ticket ) |
235 | { | 235 | { |
236 | // qDebug("ResourceFile::save format %s, %s", mFileName.latin1(), mFormatName.latin1()); | 236 | // qDebug("ResourceFile::save format %s, %s", mFileName.latin1(), mFormatName.latin1()); |
237 | 237 | ||
238 | 238 | ||
239 | // create backup file | 239 | // create backup file |
240 | QString extension = "_" + QString::number( QDate::currentDate().dayOfWeek() ); | 240 | QString extension = "_" + QString::number( QDate::currentDate().dayOfWeek() ); |
241 | 241 | ||
242 | /*US we use a simpler method to create a backupfile | 242 | /*US we use a simpler method to create a backupfile |
243 | 243 | ||
244 | (void) KSaveFile::backupFile( mFileName, QString::null | 244 | (void) KSaveFile::backupFile( mFileName, QString::null |
245 | ,extension ); | 245 | ,extension ); |
246 | 246 | ||
247 | KSaveFile saveFile( mFileName ); | 247 | KSaveFile saveFile( mFileName ); |
248 | bool ok = false; | 248 | bool ok = false; |
249 | if ( saveFile.status() == 0 && saveFile.file() ) | 249 | if ( saveFile.status() == 0 && saveFile.file() ) |
250 | { | 250 | { |
251 | mFormat->saveAll( addressBook(), this, saveFile.file() ); | 251 | mFormat->saveAll( addressBook(), this, saveFile.file() ); |
252 | ok = saveFile.close(); | 252 | ok = saveFile.close(); |
253 | } | 253 | } |
254 | */ | 254 | */ |
255 | 255 | ||
256 | //US ToDo: write backupfile | 256 | //US ToDo: write backupfile |
257 | #ifndef NO_DIRWATCH | 257 | #ifndef NO_DIRWATCH |
258 | mDirWatch.stopScan(); | 258 | mDirWatch.stopScan(); |
259 | #endif | 259 | #endif |
260 | QFile info; | 260 | QFile info; |
261 | info.setName( fileName() ); | 261 | info.setName( fileName() ); |
262 | bool ok = info.open( IO_WriteOnly ); | 262 | bool ok = info.open( IO_WriteOnly ); |
263 | if ( ok ) { | 263 | if ( ok ) { |
264 | mFormat->saveAll( addressBook(), this, &info ); | 264 | mFormat->saveAll( addressBook(), this, &info ); |
265 | 265 | ||
266 | info.close(); | 266 | info.close(); |
267 | ok = true; | 267 | ok = true; |
268 | } | 268 | } |
269 | else { | 269 | else { |
270 | 270 | ||
271 | } | 271 | } |
272 | 272 | ||
273 | if ( !ok ) | 273 | if ( !ok ) |
274 | addressBook()->error( i18n( "Unable to save file '%1'." ).arg( fileName() ) ); | 274 | addressBook()->error( i18n( "Unable to save file '%1'." ).arg( fileName() ) ); |
275 | #ifndef NO_DIRWATCH | 275 | #ifndef NO_DIRWATCH |
276 | mDirWatch.startScan(); | 276 | mDirWatch.startScan(); |
277 | #endif | 277 | #endif |
278 | delete ticket; | 278 | delete ticket; |
279 | #ifdef ALLOW_LOCKING | 279 | #ifdef ALLOW_LOCKING |
280 | unlock( mFileName ); | 280 | unlock( mFileName ); |
281 | #endif | 281 | #endif |
282 | 282 | ||
283 | return ok; | 283 | return ok; |
284 | } | 284 | } |
285 | 285 | ||
286 | bool ResourceFile::lock( const QString &fileName ) | 286 | bool ResourceFile::lock( const QString &fileName ) |
287 | { | 287 | { |
288 | #ifdef ALLOW_LOCKING | 288 | #ifdef ALLOW_LOCKING |
289 | 289 | ||
290 | 290 | ||
291 | QString fn = fileName; | 291 | QString fn = fileName; |
292 | 292 | ||
293 | //US change the implementation how the lockfilename is getting created | 293 | //US change the implementation how the lockfilename is getting created |
294 | //US fn.replace( QRegExp("/"), "_" ); | 294 | //US fn.replace( QRegExp("/"), "_" ); |
295 | //US QString lockName = locateLocal( "data", "kabc/lock/" + fn + ".lock" ); | 295 | //US QString lockName = locateLocal( "data", "kabc/lock/" + fn + ".lock" ); |
296 | 296 | ||
297 | KURL url(fn); | 297 | KURL url(fn); |
298 | QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" ); | 298 | QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" ); |
299 | 299 | ||
300 | 300 | ||
301 | 301 | ||
302 | if (QFile::exists( lockName )) return false; | 302 | if (QFile::exists( lockName )) return false; |
303 | 303 | ||
304 | QString lockUniqueName; | 304 | QString lockUniqueName; |
305 | lockUniqueName = fn + KApplication::randomString( 8 ); | 305 | lockUniqueName = fn + KApplication::randomString( 8 ); |
306 | 306 | ||
307 | url = lockUniqueName; | 307 | url = lockUniqueName; |
308 | //US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName ); | 308 | //US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName ); |
309 | mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() ); | 309 | mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() ); |
310 | kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl; | 310 | kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl; |
311 | 311 | ||
312 | // Create unique file | 312 | // Create unique file |
313 | QFile file( mLockUniqueName ); | 313 | QFile file( mLockUniqueName ); |
314 | file.open( IO_WriteOnly ); | 314 | file.open( IO_WriteOnly ); |
315 | file.close(); | 315 | file.close(); |
316 | 316 | ||
317 | // Create lock file | 317 | // Create lock file |
318 | int result = 0; | 318 | int result = 0; |
319 | #ifndef _WIN32_ | 319 | #ifndef _WIN32_ |
320 | result = ::link( QFile::encodeName( mLockUniqueName ), | 320 | result = ::link( QFile::encodeName( mLockUniqueName ), |
321 | QFile::encodeName( lockName ) ); | 321 | QFile::encodeName( lockName ) ); |
322 | #endif | 322 | #endif |
323 | if ( result == 0 ) { | 323 | if ( result == 0 ) { |
324 | addressBook()->emitAddressBookLocked(); | 324 | addressBook()->emitAddressBookLocked(); |
325 | return true; | 325 | return true; |
326 | } | 326 | } |
327 | 327 | ||
328 | // TODO: check stat | 328 | // TODO: check stat |
329 | 329 | ||
330 | return false; | 330 | return false; |
331 | #else | 331 | #else |
332 | return true; | 332 | return true; |
333 | #endif | 333 | #endif |
334 | } | 334 | } |
335 | 335 | ||
336 | void ResourceFile::unlock( const QString &fileName ) | 336 | void ResourceFile::unlock( const QString &fileName ) |
337 | { | 337 | { |
338 | #ifdef ALLOW_LOCKING | 338 | #ifdef ALLOW_LOCKING |
339 | QString fn = fileName; | 339 | QString fn = fileName; |
340 | //US change the implementation how the lockfilename is getting created | 340 | //US change the implementation how the lockfilename is getting created |
341 | //US fn.replace( QRegExp( "/" ), "_" ); | 341 | //US fn.replace( QRegExp( "/" ), "_" ); |
342 | //US QString lockName = locateLocal( "data", "kabc/lock/" + fn + ".lock" ); | 342 | //US QString lockName = locateLocal( "data", "kabc/lock/" + fn + ".lock" ); |
343 | //US QString lockName = fn + ".lock"; | 343 | //US QString lockName = fn + ".lock"; |
344 | KURL url(fn); | 344 | KURL url(fn); |
345 | QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" ); | 345 | QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" ); |
346 | 346 | ||
347 | QFile::remove( lockName ); | 347 | QFile::remove( lockName ); |
348 | QFile::remove( mLockUniqueName ); | 348 | QFile::remove( mLockUniqueName ); |
349 | addressBook()->emitAddressBookUnlocked(); | 349 | addressBook()->emitAddressBookUnlocked(); |
350 | #else | 350 | #else |
351 | return; | 351 | return; |
352 | #endif | 352 | #endif |
353 | } | 353 | } |
354 | 354 | ||
355 | void ResourceFile::setFileName( const QString &fileName ) | 355 | void ResourceFile::setFileName( const QString &fileName ) |
356 | { | 356 | { |
357 | #ifndef NO_DIRWATCH | 357 | #ifndef NO_DIRWATCH |
358 | mDirWatch.stopScan(); | 358 | mDirWatch.stopScan(); |
359 | mDirWatch.removeFile( mFileName ); | 359 | mDirWatch.removeFile( mFileName ); |
360 | mFileName = fileName; | 360 | mFileName = fileName; |
361 | 361 | ||
362 | 362 | ||
363 | mDirWatch.addFile( mFileName ); | 363 | mDirWatch.addFile( mFileName ); |
364 | mDirWatch.startScan(); | 364 | mDirWatch.startScan(); |
365 | #else | 365 | #else |
366 | mFileName2 = fileName; | 366 | mFileName2 = fileName; |
367 | #endif | 367 | #endif |
368 | 368 | ||
369 | //US simulate KDirWatch event | 369 | //US simulate KDirWatch event |
370 | //US fileChanged(); | 370 | //US fileChanged(); |
371 | } | 371 | } |
372 | 372 | ||
373 | QString ResourceFile::fileName() const | 373 | QString ResourceFile::fileName() const |
374 | { | 374 | { |
375 | return mFileName2; | 375 | return mFileName2; |
376 | } | 376 | } |
377 | 377 | ||
378 | void ResourceFile::setFormat( const QString &format ) | 378 | void ResourceFile::setFormat( const QString &format ) |
379 | { | 379 | { |
380 | mFormatName = format; | 380 | mFormatName = format; |
381 | delete mFormat; | 381 | delete mFormat; |
382 | 382 | ||
383 | FormatFactory *factory = FormatFactory::self(); | 383 | FormatFactory *factory = FormatFactory::self(); |
384 | mFormat = factory->format( mFormatName ); | 384 | mFormat = factory->format( mFormatName ); |
385 | /*US | 385 | /*US |
386 | //qDebug("ResourceFile::setFormat initialized with format %s ", format.latin1()); | 386 | //qDebug("ResourceFile::setFormat initialized with format %s ", format.latin1()); |
387 | if (mFormatName == "vcard") { | 387 | if (mFormatName == "vcard") { |
388 | mFormat = new VCardFormatPlugin2(); | 388 | mFormat = new VCardFormatPlugin2(); |
389 | // qDebug("ResourceFile::setFormat format %s", mFormatName.latin1()); | 389 | // qDebug("ResourceFile::setFormat format %s", mFormatName.latin1()); |
390 | } | 390 | } |
391 | else if (mFormatName == "binary") { | 391 | else if (mFormatName == "binary") { |
392 | mFormat = new BinaryFormat(); | 392 | mFormat = new BinaryFormat(); |
393 | // qDebug("ResourceFile::setFormat format %s", mFormatName.latin1()); | 393 | // qDebug("ResourceFile::setFormat format %s", mFormatName.latin1()); |
394 | } | 394 | } |
395 | else | 395 | else |
396 | qDebug("ResourceFile::setFormat format unknown !!! %s ", format.latin1()); | 396 | qDebug("ResourceFile::setFormat format unknown !!! %s ", format.latin1()); |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 20b107e..fa9f130 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2250,411 +2250,422 @@ void KABCore::addActionsManually() | |||
2250 | settingsMenu->insertSeparator(2); | 2250 | settingsMenu->insertSeparator(2); |
2251 | 2251 | ||
2252 | if ( mIsPart ) { | 2252 | if ( mIsPart ) { |
2253 | //US not implemented yet | 2253 | //US not implemented yet |
2254 | //mActionConfigShortcuts->plug( settingsMenu ); | 2254 | //mActionConfigShortcuts->plug( settingsMenu ); |
2255 | //mActionConfigureToolbars->plug( settingsMenu ); | 2255 | //mActionConfigureToolbars->plug( settingsMenu ); |
2256 | 2256 | ||
2257 | } else { | 2257 | } else { |
2258 | //US not implemented yet | 2258 | //US not implemented yet |
2259 | //mActionKeyBindings->plug( settingsMenu ); | 2259 | //mActionKeyBindings->plug( settingsMenu ); |
2260 | } | 2260 | } |
2261 | 2261 | ||
2262 | mActionEditCategories->plug( settingsMenu ); | 2262 | mActionEditCategories->plug( settingsMenu ); |
2263 | mActionManageCategories->plug( settingsMenu ); | 2263 | mActionManageCategories->plug( settingsMenu ); |
2264 | mActionJumpBar->plug( viewMenu,0 ); | 2264 | mActionJumpBar->plug( viewMenu,0 ); |
2265 | mActionDetails->plug( viewMenu,0 ); | 2265 | mActionDetails->plug( viewMenu,0 ); |
2266 | //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) | 2266 | //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) |
2267 | mActionDetails->plug( tb ); | 2267 | mActionDetails->plug( tb ); |
2268 | settingsMenu->insertSeparator(); | 2268 | settingsMenu->insertSeparator(); |
2269 | #ifndef DESKTOP_VERSION | 2269 | #ifndef DESKTOP_VERSION |
2270 | if ( Ir::supported() ) mActionBR->plug(settingsMenu ); | 2270 | if ( Ir::supported() ) mActionBR->plug(settingsMenu ); |
2271 | settingsMenu->insertSeparator(); | 2271 | settingsMenu->insertSeparator(); |
2272 | #endif | 2272 | #endif |
2273 | 2273 | ||
2274 | mActionWhoAmI->plug( settingsMenu ); | 2274 | mActionWhoAmI->plug( settingsMenu ); |
2275 | //mActionEditCategories->plug( changeMenu ); | 2275 | //mActionEditCategories->plug( changeMenu ); |
2276 | mActionCategories->plug( changeMenu ); | 2276 | mActionCategories->plug( changeMenu ); |
2277 | //mActionManageCategories->plug( changeMenu ); | 2277 | //mActionManageCategories->plug( changeMenu ); |
2278 | 2278 | ||
2279 | //mActionCategories->plug( settingsMenu ); | 2279 | //mActionCategories->plug( settingsMenu ); |
2280 | 2280 | ||
2281 | 2281 | ||
2282 | mActionWN->plug( helpMenu ); | 2282 | mActionWN->plug( helpMenu ); |
2283 | mActionStorageHowto->plug( helpMenu ); | 2283 | mActionStorageHowto->plug( helpMenu ); |
2284 | mActionSyncHowto->plug( helpMenu ); | 2284 | mActionSyncHowto->plug( helpMenu ); |
2285 | mActionKdeSyncHowto->plug( helpMenu ); | 2285 | mActionKdeSyncHowto->plug( helpMenu ); |
2286 | mActionMultiSyncHowto->plug( helpMenu ); | 2286 | mActionMultiSyncHowto->plug( helpMenu ); |
2287 | mActionFaq->plug( helpMenu ); | 2287 | mActionFaq->plug( helpMenu ); |
2288 | mActionLicence->plug( helpMenu ); | 2288 | mActionLicence->plug( helpMenu ); |
2289 | mActionAboutKAddressbook->plug( helpMenu ); | 2289 | mActionAboutKAddressbook->plug( helpMenu ); |
2290 | 2290 | ||
2291 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { | 2291 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { |
2292 | 2292 | ||
2293 | mActionSave->plug( tb ); | 2293 | mActionSave->plug( tb ); |
2294 | mViewManager->getFilterAction()->plug ( tb); | 2294 | mViewManager->getFilterAction()->plug ( tb); |
2295 | //LR hide filteraction on started in 480x640 | 2295 | //LR hide filteraction on started in 480x640 |
2296 | if (QApplication::desktop()->width() == 480 ) { | 2296 | if (QApplication::desktop()->width() == 480 ) { |
2297 | mViewManager->getFilterAction()->setComboWidth( 0 ); | 2297 | mViewManager->getFilterAction()->setComboWidth( 0 ); |
2298 | } | 2298 | } |
2299 | mActionUndo->plug( tb ); | 2299 | mActionUndo->plug( tb ); |
2300 | mActionDelete->plug( tb ); | 2300 | mActionDelete->plug( tb ); |
2301 | mActionRedo->plug( tb ); | 2301 | mActionRedo->plug( tb ); |
2302 | } else { | 2302 | } else { |
2303 | mActionSave->plug( tb ); | 2303 | mActionSave->plug( tb ); |
2304 | tb->enableMoving(false); | 2304 | tb->enableMoving(false); |
2305 | } | 2305 | } |
2306 | //mActionQuit->plug ( tb ); | 2306 | //mActionQuit->plug ( tb ); |
2307 | //tb->insertWidget(-1, 0, mIncSearchWidget, 6); | 2307 | //tb->insertWidget(-1, 0, mIncSearchWidget, 6); |
2308 | 2308 | ||
2309 | //US link the searchwidget first to this. | 2309 | //US link the searchwidget first to this. |
2310 | // The real linkage to the toolbar happens later. | 2310 | // The real linkage to the toolbar happens later. |
2311 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); | 2311 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); |
2312 | //US tb->insertItem( mIncSearchWidget ); | 2312 | //US tb->insertItem( mIncSearchWidget ); |
2313 | /*US | 2313 | /*US |
2314 | mIncSearchWidget = new IncSearchWidget( tb ); | 2314 | mIncSearchWidget = new IncSearchWidget( tb ); |
2315 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 2315 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
2316 | SLOT( incrementalSearch( const QString& ) ) ); | 2316 | SLOT( incrementalSearch( const QString& ) ) ); |
2317 | 2317 | ||
2318 | mJumpButtonBar = new JumpButtonBar( this, this ); | 2318 | mJumpButtonBar = new JumpButtonBar( this, this ); |
2319 | 2319 | ||
2320 | //US topLayout->addWidget( mJumpButtonBar ); | 2320 | //US topLayout->addWidget( mJumpButtonBar ); |
2321 | this->layout()->add( mJumpButtonBar ); | 2321 | this->layout()->add( mJumpButtonBar ); |
2322 | */ | 2322 | */ |
2323 | 2323 | ||
2324 | #endif //KAB_EMBEDDED | 2324 | #endif //KAB_EMBEDDED |
2325 | 2325 | ||
2326 | mActionExport2phone->plug( ExportMenu ); | 2326 | mActionExport2phone->plug( ExportMenu ); |
2327 | connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); | 2327 | connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); |
2328 | syncManager->fillSyncMenu(); | 2328 | syncManager->fillSyncMenu(); |
2329 | 2329 | ||
2330 | } | 2330 | } |
2331 | void KABCore::showLicence() | 2331 | void KABCore::showLicence() |
2332 | { | 2332 | { |
2333 | KApplication::showLicence(); | 2333 | KApplication::showLicence(); |
2334 | } | 2334 | } |
2335 | 2335 | ||
2336 | void KABCore::manageCategories( ) | 2336 | void KABCore::manageCategories( ) |
2337 | { | 2337 | { |
2338 | KABCatPrefs* cp = new KABCatPrefs(); | 2338 | KABCatPrefs* cp = new KABCatPrefs(); |
2339 | cp->show(); | 2339 | cp->show(); |
2340 | int w =cp->sizeHint().width() ; | 2340 | int w =cp->sizeHint().width() ; |
2341 | int h = cp->sizeHint().height() ; | 2341 | int h = cp->sizeHint().height() ; |
2342 | int dw = QApplication::desktop()->width(); | 2342 | int dw = QApplication::desktop()->width(); |
2343 | int dh = QApplication::desktop()->height(); | 2343 | int dh = QApplication::desktop()->height(); |
2344 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2344 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2345 | if ( !cp->exec() ) { | 2345 | if ( !cp->exec() ) { |
2346 | delete cp; | 2346 | delete cp; |
2347 | return; | 2347 | return; |
2348 | } | 2348 | } |
2349 | int count = 0; | 2349 | int count = 0; |
2350 | int cc = 0; | 2350 | int cc = 0; |
2351 | message( i18n("Please wait, processing categories...")); | 2351 | message( i18n("Please wait, processing categories...")); |
2352 | if ( cp->addCat() ) { | 2352 | if ( cp->addCat() ) { |
2353 | KABC::AddressBook::Iterator it; | 2353 | KABC::AddressBook::Iterator it; |
2354 | QStringList catList = KABPrefs::instance()->mCustomCategories; | 2354 | QStringList catList = KABPrefs::instance()->mCustomCategories; |
2355 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2355 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2356 | ++cc; | 2356 | ++cc; |
2357 | if ( cc %10 == 0) | 2357 | if ( cc %10 == 0) |
2358 | message(i18n("Processing contact #%1").arg(cc)); | 2358 | message(i18n("Processing contact #%1").arg(cc)); |
2359 | QStringList catIncList = (*it).categories(); | 2359 | QStringList catIncList = (*it).categories(); |
2360 | int i; | 2360 | int i; |
2361 | for( i = 0; i< catIncList.count(); ++i ) { | 2361 | for( i = 0; i< catIncList.count(); ++i ) { |
2362 | if ( !catList.contains (catIncList[i])) { | 2362 | if ( !catList.contains (catIncList[i])) { |
2363 | catList.append( catIncList[i] ); | 2363 | catList.append( catIncList[i] ); |
2364 | //qDebug("add cat %s ", catIncList[i].latin1()); | 2364 | //qDebug("add cat %s ", catIncList[i].latin1()); |
2365 | ++count; | 2365 | ++count; |
2366 | } | 2366 | } |
2367 | } | 2367 | } |
2368 | } | 2368 | } |
2369 | catList.sort(); | 2369 | catList.sort(); |
2370 | KABPrefs::instance()->mCustomCategories = catList; | 2370 | KABPrefs::instance()->mCustomCategories = catList; |
2371 | KABPrefs::instance()->writeConfig(); | 2371 | KABPrefs::instance()->writeConfig(); |
2372 | message(QString::number( count )+ i18n(" categories added to list! ")); | 2372 | message(QString::number( count )+ i18n(" categories added to list! ")); |
2373 | } else { | 2373 | } else { |
2374 | QStringList catList = KABPrefs::instance()->mCustomCategories; | 2374 | QStringList catList = KABPrefs::instance()->mCustomCategories; |
2375 | QStringList catIncList; | 2375 | QStringList catIncList; |
2376 | QStringList newCatList; | 2376 | QStringList newCatList; |
2377 | KABC::AddressBook::Iterator it; | 2377 | KABC::AddressBook::Iterator it; |
2378 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2378 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2379 | ++cc; | 2379 | ++cc; |
2380 | if ( cc %10 == 0) | 2380 | if ( cc %10 == 0) |
2381 | message(i18n("Processing contact #%1").arg(cc)); | 2381 | message(i18n("Processing contact #%1").arg(cc)); |
2382 | QStringList catIncList = (*it).categories(); | 2382 | QStringList catIncList = (*it).categories(); |
2383 | int i; | 2383 | int i; |
2384 | if ( catIncList.count() ) { | 2384 | if ( catIncList.count() ) { |
2385 | newCatList.clear(); | 2385 | newCatList.clear(); |
2386 | for( i = 0; i< catIncList.count(); ++i ) { | 2386 | for( i = 0; i< catIncList.count(); ++i ) { |
2387 | if ( catList.contains (catIncList[i])) { | 2387 | if ( catList.contains (catIncList[i])) { |
2388 | newCatList.append( catIncList[i] ); | 2388 | newCatList.append( catIncList[i] ); |
2389 | } | 2389 | } |
2390 | } | 2390 | } |
2391 | newCatList.sort(); | 2391 | newCatList.sort(); |
2392 | (*it).setCategories( newCatList ); | 2392 | (*it).setCategories( newCatList ); |
2393 | mAddressBook->insertAddressee( (*it) ); | 2393 | mAddressBook->insertAddressee( (*it) ); |
2394 | } | 2394 | } |
2395 | } | 2395 | } |
2396 | setModified( true ); | 2396 | setModified( true ); |
2397 | mViewManager->refreshView(); | 2397 | mViewManager->refreshView(); |
2398 | message( i18n("Removing categories done!")); | 2398 | message( i18n("Removing categories done!")); |
2399 | } | 2399 | } |
2400 | delete cp; | 2400 | delete cp; |
2401 | } | 2401 | } |
2402 | void KABCore::removeVoice() | 2402 | void KABCore::removeVoice() |
2403 | { | 2403 | { |
2404 | if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No ) | 2404 | if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No ) |
2405 | return; | 2405 | return; |
2406 | XXPortSelectDialog dlg( this, false, this ); | 2406 | XXPortSelectDialog dlg( this, false, this ); |
2407 | if ( !dlg.exec() ) | 2407 | if ( !dlg.exec() ) |
2408 | return; | 2408 | return; |
2409 | mAddressBook->setUntagged(); | 2409 | mAddressBook->setUntagged(); |
2410 | dlg.tagSelected(); | 2410 | dlg.tagSelected(); |
2411 | message(i18n("Removing voice..."), false ); | 2411 | message(i18n("Removing voice..."), false ); |
2412 | KABC::AddressBook::Iterator it; | 2412 | KABC::AddressBook::Iterator it; |
2413 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2413 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2414 | if ( (*it).tagged() ) { | 2414 | if ( (*it).tagged() ) { |
2415 | (*it).removeVoice(); | 2415 | (*it).removeVoice(); |
2416 | } | 2416 | } |
2417 | } | 2417 | } |
2418 | message(i18n("Refreshing view...") ); | 2418 | message(i18n("Refreshing view...") ); |
2419 | qApp->processEvents(); | 2419 | qApp->processEvents(); |
2420 | mViewManager->refreshView( "" ); | 2420 | mViewManager->refreshView( "" ); |
2421 | Addressee add; | 2421 | Addressee add; |
2422 | mDetails->setAddressee( add ); | 2422 | mDetails->setAddressee( add ); |
2423 | message(i18n("Remove voice completed!") ); | 2423 | message(i18n("Remove voice completed!") ); |
2424 | 2424 | ||
2425 | 2425 | ||
2426 | 2426 | ||
2427 | } | 2427 | } |
2428 | 2428 | ||
2429 | void KABCore::setFormattedName() | 2429 | void KABCore::setFormattedName() |
2430 | { | 2430 | { |
2431 | KABFormatPrefs setpref; | 2431 | KABFormatPrefs setpref; |
2432 | if ( !setpref.exec() ) { | 2432 | if ( !setpref.exec() ) { |
2433 | return; | 2433 | return; |
2434 | } | 2434 | } |
2435 | XXPortSelectDialog dlg( this, false, this ); | 2435 | XXPortSelectDialog dlg( this, false, this ); |
2436 | if ( !dlg.exec() ) | 2436 | if ( !dlg.exec() ) |
2437 | return; | 2437 | return; |
2438 | mAddressBook->setUntagged(); | 2438 | mAddressBook->setUntagged(); |
2439 | dlg.tagSelected(); | 2439 | dlg.tagSelected(); |
2440 | int count = 0; | 2440 | int count = 0; |
2441 | KABC::AddressBook::Iterator it; | 2441 | KABC::AddressBook::Iterator it; |
2442 | bool modified = false; | ||
2442 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2443 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2443 | if ( (*it).tagged() ) { | 2444 | if ( (*it).tagged() ) { |
2445 | if ( (*it).uid().left( 2 ) == "la" ) | ||
2446 | if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) | ||
2447 | continue; | ||
2444 | ++count; | 2448 | ++count; |
2445 | if ( count %10 == 0 ) | 2449 | if ( count %10 == 0 ) |
2446 | message(i18n("Changing contact #%1").arg( count ) ); | 2450 | message(i18n("Changing contact #%1").arg( count ) ); |
2447 | qApp->processEvents(); | 2451 | qApp->processEvents(); |
2448 | QString fName; | 2452 | QString fName; |
2449 | if ( setpref.simple->isChecked() ) | 2453 | if ( setpref.simple->isChecked() ) |
2450 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); | 2454 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); |
2451 | else if ( setpref.full->isChecked() ) | 2455 | else if ( setpref.full->isChecked() ) |
2452 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); | 2456 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); |
2453 | else if ( setpref.reverse->isChecked() ) | 2457 | else if ( setpref.reverse->isChecked() ) |
2454 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); | 2458 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); |
2455 | else | 2459 | else |
2456 | fName = (*it).organization(); | 2460 | fName = (*it).organization(); |
2457 | if ( setpref.setCompany->isChecked() ) | 2461 | if ( setpref.setCompany->isChecked() ) |
2458 | if ( fName.isEmpty() || fName =="," ) | 2462 | if ( fName.isEmpty() || fName =="," ) |
2459 | fName = (*it).organization(); | 2463 | fName = (*it).organization(); |
2460 | (*it).setFormattedName( fName ); | 2464 | (*it).setFormattedName( fName ); |
2465 | (*it).setChanged( true ); | ||
2466 | modified = true; | ||
2467 | (*it).setRevision( QDateTime::currentDateTime() ); | ||
2461 | } | 2468 | } |
2462 | } | 2469 | } |
2463 | message(i18n("Refreshing view...") ); | 2470 | message(i18n("Refreshing view...") ); |
2464 | qApp->processEvents(); | 2471 | qApp->processEvents(); |
2465 | mViewManager->refreshView( "" ); | 2472 | if ( modified ) |
2473 | setModified( true ); | ||
2466 | Addressee add; | 2474 | Addressee add; |
2467 | mDetails->setAddressee( add ); | 2475 | mDetails->setAddressee( add ); |
2468 | message(i18n("Setting formatted name completed!") ); | 2476 | if ( count == 0 ) |
2477 | message(i18n("No contact changed!") ); | ||
2478 | else | ||
2479 | message(i18n("%1 contacts changed!").arg( count ) ); | ||
2469 | } | 2480 | } |
2470 | 2481 | ||
2471 | void KABCore::clipboardDataChanged() | 2482 | void KABCore::clipboardDataChanged() |
2472 | { | 2483 | { |
2473 | 2484 | ||
2474 | if ( mReadWrite ) | 2485 | if ( mReadWrite ) |
2475 | mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); | 2486 | mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); |
2476 | 2487 | ||
2477 | } | 2488 | } |
2478 | 2489 | ||
2479 | void KABCore::updateActionMenu() | 2490 | void KABCore::updateActionMenu() |
2480 | { | 2491 | { |
2481 | UndoStack *undo = UndoStack::instance(); | 2492 | UndoStack *undo = UndoStack::instance(); |
2482 | RedoStack *redo = RedoStack::instance(); | 2493 | RedoStack *redo = RedoStack::instance(); |
2483 | 2494 | ||
2484 | if ( undo->isEmpty() ) | 2495 | if ( undo->isEmpty() ) |
2485 | mActionUndo->setText( i18n( "Undo" ) ); | 2496 | mActionUndo->setText( i18n( "Undo" ) ); |
2486 | else | 2497 | else |
2487 | mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) ); | 2498 | mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) ); |
2488 | 2499 | ||
2489 | mActionUndo->setEnabled( !undo->isEmpty() ); | 2500 | mActionUndo->setEnabled( !undo->isEmpty() ); |
2490 | 2501 | ||
2491 | if ( !redo->top() ) | 2502 | if ( !redo->top() ) |
2492 | mActionRedo->setText( i18n( "Redo" ) ); | 2503 | mActionRedo->setText( i18n( "Redo" ) ); |
2493 | else | 2504 | else |
2494 | mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); | 2505 | mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); |
2495 | 2506 | ||
2496 | mActionRedo->setEnabled( !redo->isEmpty() ); | 2507 | mActionRedo->setEnabled( !redo->isEmpty() ); |
2497 | } | 2508 | } |
2498 | 2509 | ||
2499 | void KABCore::configureKeyBindings() | 2510 | void KABCore::configureKeyBindings() |
2500 | { | 2511 | { |
2501 | #ifndef KAB_EMBEDDED | 2512 | #ifndef KAB_EMBEDDED |
2502 | KKeyDialog::configure( actionCollection(), true ); | 2513 | KKeyDialog::configure( actionCollection(), true ); |
2503 | #else //KAB_EMBEDDED | 2514 | #else //KAB_EMBEDDED |
2504 | qDebug("KABCore::configureKeyBindings() not implemented"); | 2515 | qDebug("KABCore::configureKeyBindings() not implemented"); |
2505 | #endif //KAB_EMBEDDED | 2516 | #endif //KAB_EMBEDDED |
2506 | } | 2517 | } |
2507 | 2518 | ||
2508 | #ifdef KAB_EMBEDDED | 2519 | #ifdef KAB_EMBEDDED |
2509 | void KABCore::configureResources() | 2520 | void KABCore::configureResources() |
2510 | { | 2521 | { |
2511 | KRES::KCMKResources dlg( this, "" , 0 ); | 2522 | KRES::KCMKResources dlg( this, "" , 0 ); |
2512 | 2523 | ||
2513 | if ( !dlg.exec() ) | 2524 | if ( !dlg.exec() ) |
2514 | return; | 2525 | return; |
2515 | KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); | 2526 | KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); |
2516 | } | 2527 | } |
2517 | #endif //KAB_EMBEDDED | 2528 | #endif //KAB_EMBEDDED |
2518 | 2529 | ||
2519 | 2530 | ||
2520 | /* this method will be called through the QCop interface from Ko/Pi to select addresses | 2531 | /* this method will be called through the QCop interface from Ko/Pi to select addresses |
2521 | * for the attendees list of an event. | 2532 | * for the attendees list of an event. |
2522 | */ | 2533 | */ |
2523 | void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) | 2534 | void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) |
2524 | { | 2535 | { |
2525 | 2536 | ||
2526 | bool ok = false; | 2537 | bool ok = false; |
2527 | mEmailSourceChannel = sourceChannel; | 2538 | mEmailSourceChannel = sourceChannel; |
2528 | mEmailSourceUID = uid; | 2539 | mEmailSourceUID = uid; |
2529 | callContactdialog(); | 2540 | callContactdialog(); |
2530 | #if 0 | 2541 | #if 0 |
2531 | int wid = uid.toInt( &ok ); | 2542 | int wid = uid.toInt( &ok ); |
2532 | qDebug("UID %s ", uid.latin1()); | 2543 | qDebug("UID %s ", uid.latin1()); |
2533 | if ( ok ) { | 2544 | if ( ok ) { |
2534 | if ( wid != QApplication::desktop()->width() ) { | 2545 | if ( wid != QApplication::desktop()->width() ) { |
2535 | qDebug("KA/Pi: Request from different desktop geometry. Resizing ..."); | 2546 | qDebug("KA/Pi: Request from different desktop geometry. Resizing ..."); |
2536 | message( i18n("Resizing, please wait...") ); | 2547 | message( i18n("Resizing, please wait...") ); |
2537 | mMainWindow->showMinimized(); | 2548 | mMainWindow->showMinimized(); |
2538 | /* | 2549 | /* |
2539 | { | 2550 | { |
2540 | QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); | 2551 | QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); |
2541 | } | 2552 | } |
2542 | */ | 2553 | */ |
2543 | QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) ); | 2554 | QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) ); |
2544 | return; | 2555 | return; |
2545 | } | 2556 | } |
2546 | 2557 | ||
2547 | } else { | 2558 | } else { |
2548 | qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid "); | 2559 | qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid "); |
2549 | } | 2560 | } |
2550 | callContactdialog(); | 2561 | callContactdialog(); |
2551 | //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); | 2562 | //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); |
2552 | #endif | 2563 | #endif |
2553 | } | 2564 | } |
2554 | void KABCore::resizeAndCallContactdialog() | 2565 | void KABCore::resizeAndCallContactdialog() |
2555 | { | 2566 | { |
2556 | updateMainWindow(); | 2567 | updateMainWindow(); |
2557 | QTimer::singleShot( 100,this, SLOT ( callContactdialog() ) ); | 2568 | QTimer::singleShot( 100,this, SLOT ( callContactdialog() ) ); |
2558 | } | 2569 | } |
2559 | 2570 | ||
2560 | void KABCore::callContactdialog() | 2571 | void KABCore::callContactdialog() |
2561 | { | 2572 | { |
2562 | QStringList nameList; | 2573 | QStringList nameList; |
2563 | QStringList emailList; | 2574 | QStringList emailList; |
2564 | QStringList uidList; | 2575 | QStringList uidList; |
2565 | qDebug(" KABCore::callContactdialog:DESKTOP WIDTH %d ", QApplication::desktop()->width() ); | 2576 | qDebug(" KABCore::callContactdialog:DESKTOP WIDTH %d ", QApplication::desktop()->width() ); |
2566 | KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); | 2577 | KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); |
2567 | uint i=0; | 2578 | uint i=0; |
2568 | for (i=0; i < list.count(); i++) | 2579 | for (i=0; i < list.count(); i++) |
2569 | { | 2580 | { |
2570 | nameList.append(list[i].realName()); | 2581 | nameList.append(list[i].realName()); |
2571 | emailList.append(list[i].preferredEmail()); | 2582 | emailList.append(list[i].preferredEmail()); |
2572 | uidList.append(list[i].uid()); | 2583 | uidList.append(list[i].uid()); |
2573 | } | 2584 | } |
2574 | QString uid = mEmailSourceUID; | 2585 | QString uid = mEmailSourceUID; |
2575 | //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); | 2586 | //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); |
2576 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList); | 2587 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList); |
2577 | 2588 | ||
2578 | } | 2589 | } |
2579 | /* this method will be called through the QCop interface from Ko/Pi to select birthdays | 2590 | /* this method will be called through the QCop interface from Ko/Pi to select birthdays |
2580 | * to put them into the calendar. | 2591 | * to put them into the calendar. |
2581 | */ | 2592 | */ |
2582 | void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) | 2593 | void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) |
2583 | { | 2594 | { |
2584 | // qDebug("KABCore::requestForBirthdayList"); | 2595 | // qDebug("KABCore::requestForBirthdayList"); |
2585 | QStringList birthdayList; | 2596 | QStringList birthdayList; |
2586 | QStringList anniversaryList; | 2597 | QStringList anniversaryList; |
2587 | QStringList realNameList; | 2598 | QStringList realNameList; |
2588 | QStringList preferredEmailList; | 2599 | QStringList preferredEmailList; |
2589 | QStringList assembledNameList; | 2600 | QStringList assembledNameList; |
2590 | QStringList uidList; | 2601 | QStringList uidList; |
2591 | 2602 | ||
2592 | KABC::AddressBook::Iterator it; | 2603 | KABC::AddressBook::Iterator it; |
2593 | 2604 | ||
2594 | int count = 0; | 2605 | int count = 0; |
2595 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2606 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2596 | ++count; | 2607 | ++count; |
2597 | } | 2608 | } |
2598 | QProgressBar bar(count,0 ); | 2609 | QProgressBar bar(count,0 ); |
2599 | int w = 300; | 2610 | int w = 300; |
2600 | if ( QApplication::desktop()->width() < 320 ) | 2611 | if ( QApplication::desktop()->width() < 320 ) |
2601 | w = 220; | 2612 | w = 220; |
2602 | int h = bar.sizeHint().height() ; | 2613 | int h = bar.sizeHint().height() ; |
2603 | int dw = QApplication::desktop()->width(); | 2614 | int dw = QApplication::desktop()->width(); |
2604 | int dh = QApplication::desktop()->height(); | 2615 | int dh = QApplication::desktop()->height(); |
2605 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2616 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2606 | bar.show(); | 2617 | bar.show(); |
2607 | bar.setCaption (i18n("Collecting birthdays - close to abort!") ); | 2618 | bar.setCaption (i18n("Collecting birthdays - close to abort!") ); |
2608 | qApp->processEvents(); | 2619 | qApp->processEvents(); |
2609 | 2620 | ||
2610 | QDate bday; | 2621 | QDate bday; |
2611 | QString anni; | 2622 | QString anni; |
2612 | QString formattedbday; | 2623 | QString formattedbday; |
2613 | 2624 | ||
2614 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) | 2625 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) |
2615 | { | 2626 | { |
2616 | if ( ! bar.isVisible() ) | 2627 | if ( ! bar.isVisible() ) |
2617 | return; | 2628 | return; |
2618 | bar.setProgress( count++ ); | 2629 | bar.setProgress( count++ ); |
2619 | qApp->processEvents(); | 2630 | qApp->processEvents(); |
2620 | bday = (*it).birthday().date(); | 2631 | bday = (*it).birthday().date(); |
2621 | anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" ); | 2632 | anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" ); |
2622 | 2633 | ||
2623 | if ( bday.isValid() || !anni.isEmpty()) | 2634 | if ( bday.isValid() || !anni.isEmpty()) |
2624 | { | 2635 | { |
2625 | if (bday.isValid()) | 2636 | if (bday.isValid()) |
2626 | formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate); | 2637 | formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate); |
2627 | else | 2638 | else |
2628 | formattedbday = "NOTVALID"; | 2639 | formattedbday = "NOTVALID"; |
2629 | if (anni.isEmpty()) | 2640 | if (anni.isEmpty()) |
2630 | anni = "INVALID"; | 2641 | anni = "INVALID"; |
2631 | 2642 | ||
2632 | birthdayList.append(formattedbday); | 2643 | birthdayList.append(formattedbday); |
2633 | anniversaryList.append(anni); //should be ISODate | 2644 | anniversaryList.append(anni); //should be ISODate |
2634 | realNameList.append((*it).realName()); | 2645 | realNameList.append((*it).realName()); |
2635 | preferredEmailList.append((*it).preferredEmail()); | 2646 | preferredEmailList.append((*it).preferredEmail()); |
2636 | assembledNameList.append((*it).assembledName()); | 2647 | assembledNameList.append((*it).assembledName()); |
2637 | uidList.append((*it).uid()); | 2648 | uidList.append((*it).uid()); |
2638 | 2649 | ||
2639 | //qDebug("found birthday in KA/Pi: %s,%s,%s,%s: %s, %s", (*it).realName().latin1(), (*it).preferredEmail().latin1(), (*it).assembledName().latin1(), (*it).uid().latin1(), formattedbday.latin1(), anni.latin1() ); | 2650 | //qDebug("found birthday in KA/Pi: %s,%s,%s,%s: %s, %s", (*it).realName().latin1(), (*it).preferredEmail().latin1(), (*it).assembledName().latin1(), (*it).uid().latin1(), formattedbday.latin1(), anni.latin1() ); |
2640 | } | 2651 | } |
2641 | } | 2652 | } |
2642 | 2653 | ||
2643 | bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList); | 2654 | bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList); |
2644 | 2655 | ||
2645 | } | 2656 | } |
2646 | 2657 | ||
2647 | /* this method will be called through the QCop interface from other apps to show details of a contact. | 2658 | /* this method will be called through the QCop interface from other apps to show details of a contact. |
2648 | */ | 2659 | */ |
2649 | void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) | 2660 | void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) |
2650 | { | 2661 | { |
2651 | //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); | 2662 | //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); |
2652 | 2663 | ||
2653 | QString foundUid = QString::null; | 2664 | QString foundUid = QString::null; |
2654 | if ( ! uid.isEmpty() ) { | 2665 | if ( ! uid.isEmpty() ) { |
2655 | Addressee adrr = mAddressBook->findByUid( uid ); | 2666 | Addressee adrr = mAddressBook->findByUid( uid ); |
2656 | if ( !adrr.isEmpty() ) { | 2667 | if ( !adrr.isEmpty() ) { |
2657 | foundUid = uid; | 2668 | foundUid = uid; |
2658 | } | 2669 | } |
2659 | if ( email == "sendbacklist" ) { | 2670 | if ( email == "sendbacklist" ) { |
2660 | //qDebug("ssssssssssssssssssssssend "); | 2671 | //qDebug("ssssssssssssssssssssssend "); |