summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-29 18:35:10 (UTC)
committer zautrix <zautrix>2005-03-29 18:35:10 (UTC)
commitb70d9695bb6a2d567b75965c0530792ad90c84a3 (patch) (unidiff)
treebc27647d044cf4a8d9c75acd19d9a2d078fe00b2
parenta7c827aa0e555206b60dec3bc07f7afab4352883 (diff)
downloadkdepimpi-b70d9695bb6a2d567b75965c0530792ad90c84a3.zip
kdepimpi-b70d9695bb6a2d567b75965c0530792ad90c84a3.tar.gz
kdepimpi-b70d9695bb6a2d567b75965c0530792ad90c84a3.tar.bz2
icons
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt4
-rw-r--r--bin/kdepim/kaddressbook/icons16/ic_family.pngbin0 -> 7865 bytes
-rw-r--r--bin/kdepim/kaddressbook/icons16/ic_female.pngbin0 -> 5745 bytes
-rw-r--r--bin/kdepim/kaddressbook/icons16/ic_kids.pngbin0 -> 9039 bytes
-rw-r--r--bin/kdepim/kaddressbook/icons16/ic_male.pngbin0 -> 6440 bytes
-rw-r--r--bin/kdepim/kaddressbook/icons16/ic_penguin.pngbin0 -> 5343 bytes
-rw-r--r--bin/kdepim/kaddressbook/icons16/package_toys.pngbin16139 -> 0 bytes
-rw-r--r--bin/kdepim/kaddressbook/icons22/ic_family.pngbin0 -> 7865 bytes
-rw-r--r--bin/kdepim/kaddressbook/icons22/ic_female.pngbin0 -> 5745 bytes
-rw-r--r--bin/kdepim/kaddressbook/icons22/ic_kids.pngbin0 -> 9039 bytes
-rw-r--r--bin/kdepim/kaddressbook/icons22/ic_male.pngbin0 -> 6440 bytes
-rw-r--r--bin/kdepim/kaddressbook/icons22/ic_penguin.pngbin0 -> 5343 bytes
-rw-r--r--bin/kdepim/kaddressbook/icons22/package_toys.pngbin16139 -> 0 bytes
-rw-r--r--kabc/addresseeview.cpp10
-rw-r--r--kaddressbook/addresseeeditordialog.cpp2
-rw-r--r--kaddressbook/kabcore.cpp1
-rw-r--r--korganizer/koviewmanager.cpp2
17 files changed, 13 insertions, 6 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index 6721d5f..30b4168 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -560,199 +560,199 @@
560{ "Multi Sync HowTo","Multi Sync HowTo" }, 560{ "Multi Sync HowTo","Multi Sync HowTo" },
561{ "&Beam","&Beame" }, 561{ "&Beam","&Beame" },
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{ "","" }, 752{ "Edit new contact","Bearbeite neuen Kontakt" },
753{ "","" }, 753{ "Edit ","Bearbeite " },
754{ "","" }, 754{ "","" },
755{ "","" }, 755{ "","" },
756{ "","" }, 756{ "","" },
757{ "","" }, 757{ "","" },
758{ "","" }, \ No newline at end of file 758{ "","" }, \ No newline at end of file
diff --git a/bin/kdepim/kaddressbook/icons16/ic_family.png b/bin/kdepim/kaddressbook/icons16/ic_family.png
new file mode 100644
index 0000000..6b0dec6
--- a/dev/null
+++ b/bin/kdepim/kaddressbook/icons16/ic_family.png
Binary files differ
diff --git a/bin/kdepim/kaddressbook/icons16/ic_female.png b/bin/kdepim/kaddressbook/icons16/ic_female.png
new file mode 100644
index 0000000..c427605
--- a/dev/null
+++ b/bin/kdepim/kaddressbook/icons16/ic_female.png
Binary files differ
diff --git a/bin/kdepim/kaddressbook/icons16/ic_kids.png b/bin/kdepim/kaddressbook/icons16/ic_kids.png
new file mode 100644
index 0000000..fdbdabc
--- a/dev/null
+++ b/bin/kdepim/kaddressbook/icons16/ic_kids.png
Binary files differ
diff --git a/bin/kdepim/kaddressbook/icons16/ic_male.png b/bin/kdepim/kaddressbook/icons16/ic_male.png
new file mode 100644
index 0000000..f22eaab
--- a/dev/null
+++ b/bin/kdepim/kaddressbook/icons16/ic_male.png
Binary files differ
diff --git a/bin/kdepim/kaddressbook/icons16/ic_penguin.png b/bin/kdepim/kaddressbook/icons16/ic_penguin.png
new file mode 100644
index 0000000..a78da37
--- a/dev/null
+++ b/bin/kdepim/kaddressbook/icons16/ic_penguin.png
Binary files differ
diff --git a/bin/kdepim/kaddressbook/icons16/package_toys.png b/bin/kdepim/kaddressbook/icons16/package_toys.png
deleted file mode 100644
index eea4fc7..0000000
--- a/bin/kdepim/kaddressbook/icons16/package_toys.png
+++ b/dev/null
Binary files differ
diff --git a/bin/kdepim/kaddressbook/icons22/ic_family.png b/bin/kdepim/kaddressbook/icons22/ic_family.png
new file mode 100644
index 0000000..6b0dec6
--- a/dev/null
+++ b/bin/kdepim/kaddressbook/icons22/ic_family.png
Binary files differ
diff --git a/bin/kdepim/kaddressbook/icons22/ic_female.png b/bin/kdepim/kaddressbook/icons22/ic_female.png
new file mode 100644
index 0000000..c427605
--- a/dev/null
+++ b/bin/kdepim/kaddressbook/icons22/ic_female.png
Binary files differ
diff --git a/bin/kdepim/kaddressbook/icons22/ic_kids.png b/bin/kdepim/kaddressbook/icons22/ic_kids.png
new file mode 100644
index 0000000..fdbdabc
--- a/dev/null
+++ b/bin/kdepim/kaddressbook/icons22/ic_kids.png
Binary files differ
diff --git a/bin/kdepim/kaddressbook/icons22/ic_male.png b/bin/kdepim/kaddressbook/icons22/ic_male.png
new file mode 100644
index 0000000..f22eaab
--- a/dev/null
+++ b/bin/kdepim/kaddressbook/icons22/ic_male.png
Binary files differ
diff --git a/bin/kdepim/kaddressbook/icons22/ic_penguin.png b/bin/kdepim/kaddressbook/icons22/ic_penguin.png
new file mode 100644
index 0000000..a78da37
--- a/dev/null
+++ b/bin/kdepim/kaddressbook/icons22/ic_penguin.png
Binary files differ
diff --git a/bin/kdepim/kaddressbook/icons22/package_toys.png b/bin/kdepim/kaddressbook/icons22/package_toys.png
deleted file mode 100644
index eea4fc7..0000000
--- a/bin/kdepim/kaddressbook/icons22/package_toys.png
+++ b/dev/null
Binary files differ
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp
index e85991e..8f104e0 100644
--- a/kabc/addresseeview.cpp
+++ b/kabc/addresseeview.cpp
@@ -63,394 +63,400 @@ AddresseeView::AddresseeView( QWidget *parent, const char *name )
63{ 63{
64//US setWrapPolicy( QTextEdit::AtWordBoundary ); 64//US setWrapPolicy( QTextEdit::AtWordBoundary );
65 setLinkUnderline( false ); 65 setLinkUnderline( false );
66 // setVScrollBarMode( QScrollView::AlwaysOff ); 66 // setVScrollBarMode( QScrollView::AlwaysOff );
67 //setHScrollBarMode( QScrollView::AlwaysOff ); 67 //setHScrollBarMode( QScrollView::AlwaysOff );
68 68
69//US QStyleSheet *sheet = styleSheet(); 69//US QStyleSheet *sheet = styleSheet();
70//US QStyleSheetItem *link = sheet->item( "a" ); 70//US QStyleSheetItem *link = sheet->item( "a" );
71//US link->setColor( KGlobalSettings::linkColor() ); 71//US link->setColor( KGlobalSettings::linkColor() );
72 72
73} 73}
74void AddresseeView::printMe() 74void AddresseeView::printMe()
75{ 75{
76#ifdef DESKTOP_VERSION 76#ifdef DESKTOP_VERSION
77 QPrinter printer; 77 QPrinter printer;
78 if (!printer.setup() ) 78 if (!printer.setup() )
79 return; 79 return;
80 QPainter p; 80 QPainter p;
81 p.begin ( &printer ); 81 p.begin ( &printer );
82 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 82 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
83 float dx, dy; 83 float dx, dy;
84 int wid = (m.width() * 9)/10; 84 int wid = (m.width() * 9)/10;
85 dx = (float) wid/(float)contentsWidth (); 85 dx = (float) wid/(float)contentsWidth ();
86 dy = (float)(m.height()) / (float)contentsHeight (); 86 dy = (float)(m.height()) / (float)contentsHeight ();
87 float scale; 87 float scale;
88 // scale to fit the width or height of the paper 88 // scale to fit the width or height of the paper
89 if ( dx < dy ) 89 if ( dx < dy )
90 scale = dx; 90 scale = dx;
91 else 91 else
92 scale = dy; 92 scale = dy;
93 p.translate( m.width()/10,0 ); 93 p.translate( m.width()/10,0 );
94 p.scale( scale, scale ); 94 p.scale( scale, scale );
95 drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); 95 drawContents ( &p, 0,0, contentsWidth (), contentsHeight () );
96 p.end(); 96 p.end();
97#endif 97#endif
98} 98}
99void AddresseeView::setSource(const QString& n) 99void AddresseeView::setSource(const QString& n)
100{ 100{
101 //qDebug("********AddresseeView::setSource %s", n.latin1()); 101 //qDebug("********AddresseeView::setSource %s", n.latin1());
102 102
103 if ( n.left( 6 ) == "mailto" ) 103 if ( n.left( 6 ) == "mailto" )
104 ExternalAppHandler::instance()->mailToOneContact( n.mid(7) ); 104 ExternalAppHandler::instance()->mailToOneContact( n.mid(7) );
105 else if ( n.left( 7 ) == "phoneto" ) 105 else if ( n.left( 7 ) == "phoneto" )
106 ExternalAppHandler::instance()->callByPhone( n.mid(8) ); 106 ExternalAppHandler::instance()->callByPhone( n.mid(8) );
107 else if ( n.left( 5 ) == "faxto" ) 107 else if ( n.left( 5 ) == "faxto" )
108 ExternalAppHandler::instance()->callByFax( n.mid(6) ); 108 ExternalAppHandler::instance()->callByFax( n.mid(6) );
109 else if ( n.left( 5 ) == "smsto" ) 109 else if ( n.left( 5 ) == "smsto" )
110 ExternalAppHandler::instance()->callBySMS( n.mid(6) ); 110 ExternalAppHandler::instance()->callBySMS( n.mid(6) );
111 else if ( n.left( 7 ) == "pagerto" ) 111 else if ( n.left( 7 ) == "pagerto" )
112 ExternalAppHandler::instance()->callByPager( n.mid(8) ); 112 ExternalAppHandler::instance()->callByPager( n.mid(8) );
113 else if ( n.left( 5 ) == "sipto" ) 113 else if ( n.left( 5 ) == "sipto" )
114 ExternalAppHandler::instance()->callBySIP( n.mid(6) ); 114 ExternalAppHandler::instance()->callBySIP( n.mid(6) );
115 115
116} 116}
117void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) 117void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
118{ 118{
119 bool kemailAvail = ExternalAppHandler::instance()->isEmailAppAvailable(); 119 bool kemailAvail = ExternalAppHandler::instance()->isEmailAppAvailable();
120 // mAddressee = addr; 120 // mAddressee = addr;
121 // clear view 121 // clear view
122 //setText( QString::null ); 122 //setText( QString::null );
123 123
124 if ( mAddressee.isEmpty() ) { 124 if ( mAddressee.isEmpty() ) {
125 setText( QString::null); 125 setText( QString::null);
126 return; 126 return;
127 } 127 }
128 QString name = ( mAddressee.assembledName().isEmpty() ? 128 QString name = ( mAddressee.assembledName().isEmpty() ?
129 mAddressee.formattedName() : mAddressee.assembledName() ); 129 mAddressee.formattedName() : mAddressee.assembledName() );
130 130
131 QString dynamicPart; 131 QString dynamicPart;
132 132
133 dynamicPart += getPhoneNumbers( mAddressee.phoneNumbers(),true ); 133 dynamicPart += getPhoneNumbers( mAddressee.phoneNumbers(),true );
134 QStringList emails = mAddressee.emails(); 134 QStringList emails = mAddressee.emails();
135 QStringList::ConstIterator emailIt; 135 QStringList::ConstIterator emailIt;
136 QString type = i18n( "Email" ); 136 QString type = i18n( "Email" );
137 emailIt = emails.begin(); 137 emailIt = emails.begin();
138 if ( emailIt != emails.end() ) { 138 if ( emailIt != emails.end() ) {
139 if ( kemailAvail ) { 139 if ( kemailAvail ) {
140 dynamicPart += QString( 140 dynamicPart += QString(
141 "<tr><td align=\"right\"><b>%1</b></td>" 141 "<tr><td align=\"right\"><b>%1</b></td>"
142 "<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" ) 142 "<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" )
143 .arg( type ) 143 .arg( type )
144 .arg( name ) 144 .arg( name )
145 .arg( *emailIt ) 145 .arg( *emailIt )
146 .arg( *emailIt ); 146 .arg( *emailIt );
147 ++emailIt; 147 ++emailIt;
148 } else { 148 } else {
149 dynamicPart += QString( 149 dynamicPart += QString(
150 "<tr><td align=\"right\"><b>%1</b></td>" 150 "<tr><td align=\"right\"><b>%1</b></td>"
151 "<td align=\"left\">%2</td></tr>" ) 151 "<td align=\"left\">%2</td></tr>" )
152 .arg( type ) 152 .arg( type )
153 .arg( *emailIt ); 153 .arg( *emailIt );
154 ++emailIt; 154 ++emailIt;
155 } 155 }
156 } 156 }
157 if ( mAddressee.birthday().date().isValid() ) { 157 if ( mAddressee.birthday().date().isValid() ) {
158 dynamicPart += QString( 158 dynamicPart += QString(
159 "<tr><td align=\"right\"><b>%1</b></td>" 159 "<tr><td align=\"right\"><b>%1</b></td>"
160 "<td align=\"left\">%2</td></tr>" ) 160 "<td align=\"left\">%2</td></tr>" )
161 .arg( i18n ("Birthday") ) 161 .arg( i18n ("Birthday") )
162 .arg( KGlobal::locale()->formatDate( mAddressee.birthday().date() ,true) ); 162 .arg( KGlobal::locale()->formatDate( mAddressee.birthday().date() ,true) );
163 } 163 }
164 dynamicPart += getPhoneNumbers( mAddressee.phoneNumbers(), false ); 164 dynamicPart += getPhoneNumbers( mAddressee.phoneNumbers(), false );
165 165
166 for ( ; emailIt != emails.end(); ++emailIt ) { 166 for ( ; emailIt != emails.end(); ++emailIt ) {
167 if ( kemailAvail ) { 167 if ( kemailAvail ) {
168 dynamicPart += QString( 168 dynamicPart += QString(
169 "<tr><td align=\"right\"><b>%1</b></td>" 169 "<tr><td align=\"right\"><b>%1</b></td>"
170 "<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" ) 170 "<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" )
171 .arg( type ) 171 .arg( type )
172 .arg( name ) 172 .arg( name )
173 .arg( *emailIt ) 173 .arg( *emailIt )
174 .arg( *emailIt ); 174 .arg( *emailIt );
175 } else { 175 } else {
176 dynamicPart += QString( 176 dynamicPart += QString(
177 "<tr><td align=\"right\"><b>%1</b></td>" 177 "<tr><td align=\"right\"><b>%1</b></td>"
178 "<td align=\"left\">%2</td></tr>" ) 178 "<td align=\"left\">%2</td></tr>" )
179 .arg( type ) 179 .arg( type )
180 .arg( *emailIt ); 180 .arg( *emailIt );
181 } 181 }
182 } 182 }
183 183
184 if ( !mAddressee.url().url().isEmpty() ) { 184 if ( !mAddressee.url().url().isEmpty() ) {
185 dynamicPart += QString( 185 dynamicPart += QString(
186 "<tr><td align=\"right\"><b>%1</b></td>" 186 "<tr><td align=\"right\"><b>%1</b></td>"
187 "<td align=\"left\">%2</td></tr>" ) 187 "<td align=\"left\">%2</td></tr>" )
188 .arg( i18n( "Homepage" ) ) 188 .arg( i18n( "Homepage" ) )
189//US .arg( KStringHandler::tagURLs( mAddressee.url().url() ) ); 189//US .arg( KStringHandler::tagURLs( mAddressee.url().url() ) );
190 .arg( mAddressee.url().url() ); 190 .arg( mAddressee.url().url() );
191 //qDebug("AddresseeView::setAddressee has to be verified."); 191 //qDebug("AddresseeView::setAddressee has to be verified.");
192 } 192 }
193 193
194 KABC::Address::List addresses = mAddressee.addresses(); 194 KABC::Address::List addresses = mAddressee.addresses();
195 KABC::Address::List::ConstIterator addrIt; 195 KABC::Address::List::ConstIterator addrIt;
196 for ( addrIt = addresses.begin(); addrIt != addresses.end(); ++addrIt ) { 196 for ( addrIt = addresses.begin(); addrIt != addresses.end(); ++addrIt ) {
197 if ( true /*(*addrIt).label().isEmpty()*/ ) { 197 if ( true /*(*addrIt).label().isEmpty()*/ ) {
198 QString formattedAddress = (*addrIt).formattedAddress().stripWhiteSpace(); 198 QString formattedAddress = (*addrIt).formattedAddress().stripWhiteSpace();
199//US formattedAddress = formattedAddress.replace( '\n', "<br>" ); 199//US formattedAddress = formattedAddress.replace( '\n', "<br>" );
200 //qDebug("adresss %s ",formattedAddress.latin1() ); 200 //qDebug("adresss %s ",formattedAddress.latin1() );
201 formattedAddress = formattedAddress.replace( QRegExp("\n"), "<br>" ); 201 formattedAddress = formattedAddress.replace( QRegExp("\n"), "<br>" );
202 //qDebug("AddresseeView::setAddressee has to be verified."); 202 //qDebug("AddresseeView::setAddressee has to be verified.");
203 203
204 dynamicPart += QString( 204 dynamicPart += QString(
205 "<tr><td align=\"right\"><b>%1</b></td>" 205 "<tr><td align=\"right\"><b>%1</b></td>"
206 "<td align=\"left\">%2</td></tr>" ) 206 "<td align=\"left\">%2</td></tr>" )
207 .arg( KABC::Address::typeLabel( (*addrIt).type() ) ) 207 .arg( KABC::Address::typeLabel( (*addrIt).type() ) )
208 .arg( formattedAddress ); 208 .arg( formattedAddress );
209 } else { 209 } else {
210 210
211 dynamicPart += QString( 211 dynamicPart += QString(
212 "<tr><td align=\"right\"><b>%1</b></td>" 212 "<tr><td align=\"right\"><b>%1</b></td>"
213 "<td align=\"left\">%2</td></tr>" ) 213 "<td align=\"left\">%2</td></tr>" )
214 .arg( KABC::Address::typeLabel( (*addrIt).type() ) ) 214 .arg( KABC::Address::typeLabel( (*addrIt).type() ) )
215//US .arg( (*addrIt).label().replace( '\n', "<br>" ) ); 215//US .arg( (*addrIt).label().replace( '\n', "<br>" ) );
216 .arg( (*addrIt).label() /*replace( QRegExp("\n"), "<br>" )*/ ); 216 .arg( (*addrIt).label() /*replace( QRegExp("\n"), "<br>" )*/ );
217 217
218 } 218 }
219 } 219 }
220 220
221 QString notes; 221 QString notes;
222 if ( !mAddressee.note().isEmpty() ) { 222 if ( !mAddressee.note().isEmpty() ) {
223 notes = QString( 223 notes = QString(
224 "<tr>" 224 "<tr>"
225 "<td align=\"right\" valign=\"top\"><b>%1</b></td>" // note label 225 "<td align=\"right\" valign=\"top\"><b>%1</b></td>" // note label
226 "<td align=\"left\">%2</td>" // note 226 "<td align=\"left\">%2</td>" // note
227 "</tr>" ).arg( i18n( "Notes" ) ) 227 "</tr>" ).arg( i18n( "Notes" ) )
228//US .arg( mAddressee.note().replace( '\n', "<br>" ) ); 228//US .arg( mAddressee.note().replace( '\n', "<br>" ) );
229 .arg( mAddressee.note().replace( QRegExp("\n"), "<br>" ) ); 229 .arg( mAddressee.note().replace( QRegExp("\n"), "<br>" ) );
230 //qDebug("AddresseeView::setAddressee has to be verified."); 230 //qDebug("AddresseeView::setAddressee has to be verified.");
231 } 231 }
232 232
233 QString aRole = ""; 233 QString aRole = "";
234 QString aOrga = ""; 234 QString aOrga = "";
235 if ( true /*!mAddressee.role().isEmpty()*/ ) { 235 if ( true /*!mAddressee.role().isEmpty()*/ ) {
236 aRole = "<tr>" 236 aRole = "<tr>"
237 "<td align=\"left\">" + mAddressee.role() + "</td>" 237 "<td align=\"left\">" + mAddressee.role() + "</td>"
238 "</tr>"; 238 "</tr>";
239 } 239 }
240 if ( true /*!mAddressee.organization().isEmpty()*/ ) { 240 if ( true /*!mAddressee.organization().isEmpty()*/ ) {
241 aOrga = "<tr>" 241 aOrga = "<tr>"
242 "<td align=\"left\">" + mAddressee.organization() + "</td>" 242 "<td align=\"left\">" + mAddressee.organization() + "</td>"
243 "</tr>"; 243 "</tr>";
244 } 244 }
245 mText = ""; 245 mText = "";
246 QString picString = ""; 246 QString picString = "";
247 KABC::Picture picture = mAddressee.photo(); 247 KABC::Picture picture = mAddressee.photo();
248 bool picAvailintern = false; 248 bool picAvailintern = false;
249 bool picAvailUrl = false; 249 bool picAvailUrl = false;
250 if (! picture.undefined() ) { 250 if (! picture.undefined() ) {
251 picAvailintern = (picture.isIntern() && !picture.data().isNull()); 251 picAvailintern = (picture.isIntern() && !picture.data().isNull());
252 picAvailUrl = !picture.isIntern() && QFile::exists(picture.url() ); 252 picAvailUrl = !picture.isIntern() && QFile::exists(picture.url() );
253 } 253 }
254 if ( picAvailUrl || picAvailintern || QApplication::desktop()->width() > 320 ) { 254 if ( picAvailUrl || picAvailintern || QApplication::desktop()->width() > 320 ) {
255 picString = "<img src=\"myimage\" width=\"50\" height=\"70\">";
255 if ( picAvailintern ) { 256 if ( picAvailintern ) {
256 QMimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() ); 257 QMimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() );
257 } else { 258 } else {
258 if ( picAvailUrl ) { 259 if ( picAvailUrl ) {
259 QMimeSourceFactory::defaultFactory()->setPixmap( "myimage", QPixmap( picture.url() )); 260 QMimeSourceFactory::defaultFactory()->setPixmap( "myimage", QPixmap( picture.url() ));
260 } else { 261 } else {
261 QMimeSourceFactory::defaultFactory()->setPixmap( "myimage", KGlobal::iconLoader()->loadIcon( "package_toys", KIcon::Desktop, 128 ) ); 262 static bool setDefaultImage = false;
263 if ( !setDefaultImage ) {
264 qDebug("Setting default pixmap ");
265 QMimeSourceFactory::defaultFactory()->setPixmap( "defaultPenguin", KGlobal::iconLoader()->loadIcon( "package_toys", KIcon::Desktop, 128 ) );
266 setDefaultImage = true;
267 }
268 picString = "<img src=\"defaultPenguin\" width=\"64\" height=\"64\">";
262 } 269 }
263 } 270 }
264 picString = "<img src=\"myimage\" width=\"50\" height=\"70\">";
265 mText = QString::fromLatin1( 271 mText = QString::fromLatin1(
266 "<html>" 272 "<html>"
267 "<body text=\"%1\" bgcolor=\"%2\">" // text and background color 273 "<body text=\"%1\" bgcolor=\"%2\">" // text and background color
268 "<table>" 274 "<table>"
269 "<tr>" 275 "<tr>"
270 "<td rowspan=\"3\" align=\"right\" valign=\"top\">" 276 "<td rowspan=\"3\" align=\"right\" valign=\"top\">"
271 "%3" 277 "%3"
272 "</td>" 278 "</td>"
273 "<td align=\"left\"><font size=\"+2\"><b>%4</b></font></td>" // name 279 "<td align=\"left\"><font size=\"+2\"><b>%4</b></font></td>" // name
274 "</tr>" 280 "</tr>"
275 "%5" // role 281 "%5" // role
276 "%6" // organization 282 "%6" // organization
277 "<td colspan=\"2\">&nbsp;</td>" 283 "<td colspan=\"2\">&nbsp;</td>"
278 "%7" // dynamic part 284 "%7" // dynamic part
279 "%8" // notes 285 "%8" // notes
280 "</table>" 286 "</table>"
281 "</body>" 287 "</body>"
282 "</html>") 288 "</html>")
283//US 289//US
284 .arg( /*KGlobalSettings::textColor().name()*/ "black" ) 290 .arg( /*KGlobalSettings::textColor().name()*/ "black" )
285//US 291//US
286 .arg( /*KGlobalSettings::baseColor().name()*/ "white" ) 292 .arg( /*KGlobalSettings::baseColor().name()*/ "white" )
287 .arg( picString ) 293 .arg( picString )
288 .arg( name ) 294 .arg( name )
289 .arg( aRole ) 295 .arg( aRole )
290 .arg( aOrga ) 296 .arg( aOrga )
291 .arg( dynamicPart ) 297 .arg( dynamicPart )
292 .arg( notes ); 298 .arg( notes );
293 299
294 } else { // no picture! 300 } else { // no picture!
295 301
296mText = "<table width=\"100%\">\n"; 302mText = "<table width=\"100%\">\n";
297 //mText += "<tr bgcolor=\"#3679AD\"><td><h2>"; 303 //mText += "<tr bgcolor=\"#3679AD\"><td><h2>";
298#ifdef DESKTOP_VERSION 304#ifdef DESKTOP_VERSION
299 mText += "<tr bgcolor=\"#5699CD\"><td align=\"left\"><h1>"; 305 mText += "<tr bgcolor=\"#5699CD\"><td align=\"left\"><h1>";
300 mText += "<font color=\"#FFFFFF\">" + name +"</font></h1>"; 306 mText += "<font color=\"#FFFFFF\">" + name +"</font></h1>";
301#else 307#else
302 mText += "<tr bgcolor=\"#5699CD\"><td align=\"left\"><h3>"; 308 mText += "<tr bgcolor=\"#5699CD\"><td align=\"left\"><h3>";
303 mText += "<font color=\"#FFFFFF\"> " + name +"</font></h3>"; 309 mText += "<font color=\"#FFFFFF\"> " + name +"</font></h3>";
304#endif 310#endif
305 311
306 mText += "</td></tr>\n<tr bgcolor=\"#EAF8FA\"><td>"; 312 mText += "</td></tr>\n<tr bgcolor=\"#EAF8FA\"><td>";
307 313
308 mText += "<table><td colspan=\"2\">&nbsp;</td>"; 314 mText += "<table><td colspan=\"2\">&nbsp;</td>";
309 /* 315 /*
310 mText += QString("<tr><td align=\"right\"><b2>%1</b2></td>" 316 mText += QString("<tr><td align=\"right\"><b2>%1</b2></td>"
311 "<td align=\"left\"><b>%2</b></td></tr>" ) 317 "<td align=\"left\"><b>%2</b></td></tr>" )
312 .arg( i18n(" ") ) 318 .arg( i18n(" ") )
313 .arg( name ); 319 .arg( name );
314 */ 320 */
315 if ( ! mAddressee.role().isEmpty() ) 321 if ( ! mAddressee.role().isEmpty() )
316 mText += QString("<tr><td align=\"right\"><b>%1</b></td>" 322 mText += QString("<tr><td align=\"right\"><b>%1</b></td>"
317 "<td align=\"left\">%2</td></tr>" ) 323 "<td align=\"left\">%2</td></tr>" )
318 .arg( i18n(" ") ) 324 .arg( i18n(" ") )
319 .arg( mAddressee.role()); 325 .arg( mAddressee.role());
320 if ( ! mAddressee.organization().isEmpty() ) 326 if ( ! mAddressee.organization().isEmpty() )
321 mText += QString("<tr><td align=\"right\"><b>%1</b></td>" 327 mText += QString("<tr><td align=\"right\"><b>%1</b></td>"
322 "<td align=\"left\">%2</td></tr>" ) 328 "<td align=\"left\">%2</td></tr>" )
323 .arg( i18n(" ") ) 329 .arg( i18n(" ") )
324 .arg( mAddressee.organization()); 330 .arg( mAddressee.organization());
325 mText += dynamicPart; 331 mText += dynamicPart;
326 mText += notes; 332 mText += notes;
327 mText += "</table>"; 333 mText += "</table>";
328 334
329 } 335 }
330 336
331 // at last display it... 337 // at last display it...
332 setText( mText ); 338 setText( mText );
333 339
334} 340}
335 341
336QString AddresseeView::getPhoneNumbers( KABC::PhoneNumber::List phones ,bool preferred ) 342QString AddresseeView::getPhoneNumbers( KABC::PhoneNumber::List phones ,bool preferred )
337{ 343{
338 ExternalAppHandler* eah = ExternalAppHandler::instance(); 344 ExternalAppHandler* eah = ExternalAppHandler::instance();
339 bool kphoneAvail = eah->isPhoneAppAvailable(); 345 bool kphoneAvail = eah->isPhoneAppAvailable();
340 bool kfaxAvail = eah->isFaxAppAvailable(); 346 bool kfaxAvail = eah->isFaxAppAvailable();
341 bool ksmsAvail = eah->isSMSAppAvailable(); 347 bool ksmsAvail = eah->isSMSAppAvailable();
342 bool kpagerAvail = eah->isPagerAppAvailable(); 348 bool kpagerAvail = eah->isPagerAppAvailable();
343 bool ksipAvail = eah->isSIPAppAvailable(); 349 bool ksipAvail = eah->isSIPAppAvailable();
344 QString dynamicPart; 350 QString dynamicPart;
345 KABC::PhoneNumber::List::ConstIterator phoneIt; 351 KABC::PhoneNumber::List::ConstIterator phoneIt;
346 QString extension; 352 QString extension;
347 int phonetype; 353 int phonetype;
348 QString sms; 354 QString sms;
349 for ( phoneIt = phones.begin(); phoneIt != phones.end(); ++phoneIt ) { 355 for ( phoneIt = phones.begin(); phoneIt != phones.end(); ++phoneIt ) {
350 phonetype = (*phoneIt).type(); 356 phonetype = (*phoneIt).type();
351 if ( ((phonetype & KABC::PhoneNumber::Pref) == 0 ) == preferred ) 357 if ( ((phonetype & KABC::PhoneNumber::Pref) == 0 ) == preferred )
352 continue; 358 continue;
353 if (ksmsAvail && 359 if (ksmsAvail &&
354 ( 360 (
355 ((phonetype & KABC::PhoneNumber::Car) == KABC::PhoneNumber::Car) || 361 ((phonetype & KABC::PhoneNumber::Car) == KABC::PhoneNumber::Car) ||
356 ((phonetype & KABC::PhoneNumber::Cell) == KABC::PhoneNumber::Cell) 362 ((phonetype & KABC::PhoneNumber::Cell) == KABC::PhoneNumber::Cell)
357 ) 363 )
358 ) 364 )
359 { 365 {
360 sms = QString("<a href=\"smsto:%1 \">(sms)</a>" ) 366 sms = QString("<a href=\"smsto:%1 \">(sms)</a>" )
361 .arg( (*phoneIt).number() ); 367 .arg( (*phoneIt).number() );
362 368
363 } 369 }
364 else 370 else
365 sms = ""; 371 sms = "";
366 372
367 extension = QString::null; 373 extension = QString::null;
368 if ((phonetype & KABC::PhoneNumber::Fax) == KABC::PhoneNumber::Fax) { 374 if ((phonetype & KABC::PhoneNumber::Fax) == KABC::PhoneNumber::Fax) {
369 if (kfaxAvail) extension = "faxto:"; 375 if (kfaxAvail) extension = "faxto:";
370 } 376 }
371 else if ((phonetype & KABC::PhoneNumber::Pager) == KABC::PhoneNumber::Pager) { 377 else if ((phonetype & KABC::PhoneNumber::Pager) == KABC::PhoneNumber::Pager) {
372 if (kpagerAvail) extension = "pagerto:"; 378 if (kpagerAvail) extension = "pagerto:";
373 } 379 }
374 else if ((phonetype & KABC::PhoneNumber::Sip) == KABC::PhoneNumber::Sip) { 380 else if ((phonetype & KABC::PhoneNumber::Sip) == KABC::PhoneNumber::Sip) {
375 if (ksipAvail) extension = "sipto:"; 381 if (ksipAvail) extension = "sipto:";
376 } 382 }
377 else if (kphoneAvail) { 383 else if (kphoneAvail) {
378 extension = "phoneto:"; 384 extension = "phoneto:";
379 } 385 }
380 else 386 else
381 extension = QString::null; 387 extension = QString::null;
382 388
383 if ( !extension.isEmpty() ) { 389 if ( !extension.isEmpty() ) {
384 dynamicPart += QString( 390 dynamicPart += QString(
385 "<tr><td align=\"right\"><b>%1</b></td>" 391 "<tr><td align=\"right\"><b>%1</b></td>"
386 "<td align=\"left\"><a href=\"%2%3 \">%4</a> %5</td></tr>" ) 392 "<td align=\"left\"><a href=\"%2%3 \">%4</a> %5</td></tr>" )
387 .arg( KABC::PhoneNumber::typeLabel( phonetype ) ) 393 .arg( KABC::PhoneNumber::typeLabel( phonetype ) )
388 .arg( extension ) 394 .arg( extension )
389 .arg( (*phoneIt).number() ) 395 .arg( (*phoneIt).number() )
390 .arg( (*phoneIt).number() ) 396 .arg( (*phoneIt).number() )
391 .arg( sms ); 397 .arg( sms );
392 398
393 } else { 399 } else {
394 dynamicPart += QString( 400 dynamicPart += QString(
395 "<tr><td align=\"right\"><b>%1</b></td>" 401 "<tr><td align=\"right\"><b>%1</b></td>"
396 "<td align=\"left\">%2 %3</td></tr>" ) 402 "<td align=\"left\">%2 %3</td></tr>" )
397 .arg( KABC::PhoneNumber::typeLabel( phonetype ) ) 403 .arg( KABC::PhoneNumber::typeLabel( phonetype ) )
398 .arg( (*phoneIt).number() ) 404 .arg( (*phoneIt).number() )
399 .arg( sms ); 405 .arg( sms );
400 } 406 }
401 } 407 }
402 return dynamicPart; 408 return dynamicPart;
403} 409}
404/* 410/*
405KABC::Addressee AddresseeView::addressee() const 411KABC::Addressee AddresseeView::addressee() const
406{ 412{
407 return mAddressee; 413 return mAddressee;
408} 414}
409*/ 415*/
410void AddresseeView::addTag(const QString & tag,const QString & text) 416void AddresseeView::addTag(const QString & tag,const QString & text)
411{ 417{
412 if ( text.isEmpty() ) 418 if ( text.isEmpty() )
413 return; 419 return;
414 int number=text.contains("\n"); 420 int number=text.contains("\n");
415 QString str = "<" + tag + ">"; 421 QString str = "<" + tag + ">";
416 QString tmpText=text; 422 QString tmpText=text;
417 QString tmpStr=str; 423 QString tmpStr=str;
418 if(number !=-1) 424 if(number !=-1)
419 { 425 {
420 if (number > 0) { 426 if (number > 0) {
421 int pos=0; 427 int pos=0;
422 QString tmp; 428 QString tmp;
423 for(int i=0;i<=number;i++) { 429 for(int i=0;i<=number;i++) {
424 pos=tmpText.find("\n"); 430 pos=tmpText.find("\n");
425 tmp=tmpText.left(pos); 431 tmp=tmpText.left(pos);
426 tmpText=tmpText.right(tmpText.length()-pos-1); 432 tmpText=tmpText.right(tmpText.length()-pos-1);
427 tmpStr+=tmp+"<br>"; 433 tmpStr+=tmp+"<br>";
428 } 434 }
429 } 435 }
430 else tmpStr += tmpText; 436 else tmpStr += tmpText;
431 tmpStr+="</" + tag + ">"; 437 tmpStr+="</" + tag + ">";
432 mText.append(tmpStr); 438 mText.append(tmpStr);
433 } 439 }
434 else 440 else
435 { 441 {
436 str += text + "</" + tag + ">"; 442 str += text + "</" + tag + ">";
437 mText.append(str); 443 mText.append(str);
438 } 444 }
439} 445}
440 446
441AddresseeChooser::AddresseeChooser( KABC::Addressee loc, KABC::Addressee rem, bool takeloc, QWidget *parent, const char *name ) : KDialogBase(parent,name, 447AddresseeChooser::AddresseeChooser( KABC::Addressee loc, KABC::Addressee rem, bool takeloc, QWidget *parent, const char *name ) : KDialogBase(parent,name,
442 true ,i18n("Conflict! Please choose Adressee!"),Ok|User1|Close,Close, false) 448 true ,i18n("Conflict! Please choose Adressee!"),Ok|User1|Close,Close, false)
443{ 449{
444 findButton( Close )->setText( i18n("Cancel Sync")); 450 findButton( Close )->setText( i18n("Cancel Sync"));
445 findButton( Ok )->setText( i18n("Remote")); 451 findButton( Ok )->setText( i18n("Remote"));
446 findButton( User1 )->setText( i18n("Local")); 452 findButton( User1 )->setText( i18n("Local"));
447 QWidget* topframe = new QWidget( this ); 453 QWidget* topframe = new QWidget( this );
448 setMainWidget( topframe ); 454 setMainWidget( topframe );
449 QBoxLayout* bl; 455 QBoxLayout* bl;
450 if ( QApplication::desktop()->width() < 640 ) { 456 if ( QApplication::desktop()->width() < 640 ) {
451 bl = new QVBoxLayout( topframe ); 457 bl = new QVBoxLayout( topframe );
452 } else { 458 } else {
453 bl = new QHBoxLayout( topframe ); 459 bl = new QHBoxLayout( topframe );
454 } 460 }
455 QVBox* subframe = new QVBox( topframe ); 461 QVBox* subframe = new QVBox( topframe );
456 bl->addWidget(subframe ); 462 bl->addWidget(subframe );
diff --git a/kaddressbook/addresseeeditordialog.cpp b/kaddressbook/addresseeeditordialog.cpp
index a84fc61..b5a60f2 100644
--- a/kaddressbook/addresseeeditordialog.cpp
+++ b/kaddressbook/addresseeeditordialog.cpp
@@ -1,123 +1,123 @@
1/* 1/*
2 This file is part of KAddressBook. 2 This file is part of KAddressBook.
3 Copyright (c) 2002 Mike Pilone <mpilone@slac.com> 3 Copyright (c) 2002 Mike Pilone <mpilone@slac.com>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qapplication.h> 25#include <qapplication.h>
26 26
27#include <kdebug.h> 27#include <kdebug.h>
28#include <klocale.h> 28#include <klocale.h>
29#include <kglobal.h> 29#include <kglobal.h>
30 30
31#include "addresseeeditorwidget.h" 31#include "addresseeeditorwidget.h"
32#include "kabcore.h" 32#include "kabcore.h"
33 33
34#include "addresseeeditordialog.h" 34#include "addresseeeditordialog.h"
35 35
36AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent, 36AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent,
37 const char *name ) 37 const char *name )
38 : KDialogBase( KDialogBase::Plain, i18n( "Edit Contact" ), 38 : KDialogBase( KDialogBase::Plain, i18n( "Edit Contact" ),
39 KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Apply, 39 KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Apply,
40 KDialogBase::Ok, parent, name, true ) 40 KDialogBase::Ok, parent, name, true )
41{ 41{
42 42
43 43
44 QWidget *page = plainPage(); 44 QWidget *page = plainPage();
45 45
46 QVBoxLayout *layout = new QVBoxLayout( page ); 46 QVBoxLayout *layout = new QVBoxLayout( page );
47 47
48 mEditorWidget = new AddresseeEditorWidget( core, false, page ); 48 mEditorWidget = new AddresseeEditorWidget( core, false, page );
49 connect( mEditorWidget, SIGNAL( modified( const KABC::Addressee::List& ) ), 49 connect( mEditorWidget, SIGNAL( modified( const KABC::Addressee::List& ) ),
50 SLOT( widgetModified() ) ); 50 SLOT( widgetModified() ) );
51 layout->addWidget( mEditorWidget ); 51 layout->addWidget( mEditorWidget );
52 52
53 enableButton( KDialogBase::Apply, false ); 53 enableButton( KDialogBase::Apply, false );
54 if ( QApplication::desktop()->width() < 480 ) { 54 if ( QApplication::desktop()->width() < 480 ) {
55 hideButtons(); 55 hideButtons();
56 } 56 }
57} 57}
58 58
59AddresseeEditorDialog::~AddresseeEditorDialog() 59AddresseeEditorDialog::~AddresseeEditorDialog()
60{ 60{
61 //emit editorDestroyed( mEditorWidget->addressee().uid() ); 61 //emit editorDestroyed( mEditorWidget->addressee().uid() );
62} 62}
63 63
64void AddresseeEditorDialog::setAddressee( const KABC::Addressee &addr ) 64void AddresseeEditorDialog::setAddressee( const KABC::Addressee &addr )
65{ 65{
66 enableButton( KDialogBase::Apply, false ); 66 enableButton( KDialogBase::Apply, false );
67 67
68 mEditorWidget->setAddressee( addr ); 68 mEditorWidget->setAddressee( addr );
69 69
70 this->setCaption("Edit " + addr.formattedName()); 70 this->setCaption(i18n ("Edit ") + addr.formattedName());
71} 71}
72 72
73KABC::Addressee AddresseeEditorDialog::addressee() 73KABC::Addressee AddresseeEditorDialog::addressee()
74{ 74{
75 return mEditorWidget->addressee(); 75 return mEditorWidget->addressee();
76} 76}
77 77
78bool AddresseeEditorDialog::dirty() 78bool AddresseeEditorDialog::dirty()
79{ 79{
80 return mEditorWidget->dirty(); 80 return mEditorWidget->dirty();
81} 81}
82 82
83void AddresseeEditorDialog::slotApply() 83void AddresseeEditorDialog::slotApply()
84{ 84{
85 if ( mEditorWidget->dirty() ) { 85 if ( mEditorWidget->dirty() ) {
86 mEditorWidget->save(); 86 mEditorWidget->save();
87 emit contactModified( mEditorWidget->addressee() ); 87 emit contactModified( mEditorWidget->addressee() );
88 } 88 }
89 89
90 enableButton( KDialogBase::Apply, false ); 90 enableButton( KDialogBase::Apply, false );
91 91
92 KDialogBase::slotApply(); 92 KDialogBase::slotApply();
93} 93}
94 94
95void AddresseeEditorDialog:: accept () 95void AddresseeEditorDialog:: accept ()
96{ 96{
97 slotOk(); 97 slotOk();
98 98
99} 99}
100void AddresseeEditorDialog::slotOk() 100void AddresseeEditorDialog::slotOk()
101{ 101{
102 slotApply(); 102 slotApply();
103 103
104 //KDialogBase::slotOk(); 104 //KDialogBase::slotOk();
105 emit okClicked(); 105 emit okClicked();
106 QDialog::accept(); 106 QDialog::accept();
107} 107}
108 108
109void AddresseeEditorDialog::widgetModified() 109void AddresseeEditorDialog::widgetModified()
110{ 110{
111 enableButton( KDialogBase::Apply, true ); 111 enableButton( KDialogBase::Apply, true );
112} 112}
113 113
114void AddresseeEditorDialog::slotCancel() 114void AddresseeEditorDialog::slotCancel()
115{ 115{
116 KDialogBase::slotCancel(); 116 KDialogBase::slotCancel();
117 117
118 118
119} 119}
120 120
121#ifndef KAB_EMBEDDED 121#ifndef KAB_EMBEDDED
122#include "addresseeeditordialog.moc" 122#include "addresseeeditordialog.moc"
123#endif //KAB_EMBEDDED 123#endif //KAB_EMBEDDED
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 3f9b546..e1a490d 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1071,384 +1071,385 @@ void KABCore::pasteContacts()
1071 1071
1072 KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() ); 1072 KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() );
1073 1073
1074 pasteContacts( list ); 1074 pasteContacts( list );
1075} 1075}
1076 1076
1077void KABCore::pasteContacts( KABC::Addressee::List &list ) 1077void KABCore::pasteContacts( KABC::Addressee::List &list )
1078{ 1078{
1079 KABC::Resource *resource = requestResource( this ); 1079 KABC::Resource *resource = requestResource( this );
1080 KABC::Addressee::List::Iterator it; 1080 KABC::Addressee::List::Iterator it;
1081 for ( it = list.begin(); it != list.end(); ++it ) 1081 for ( it = list.begin(); it != list.end(); ++it )
1082 (*it).setResource( resource ); 1082 (*it).setResource( resource );
1083 1083
1084 PwPasteCommand *command = new PwPasteCommand( this, list ); 1084 PwPasteCommand *command = new PwPasteCommand( this, list );
1085 UndoStack::instance()->push( command ); 1085 UndoStack::instance()->push( command );
1086 RedoStack::instance()->clear(); 1086 RedoStack::instance()->clear();
1087 1087
1088 setModified( true ); 1088 setModified( true );
1089} 1089}
1090 1090
1091void KABCore::setWhoAmI() 1091void KABCore::setWhoAmI()
1092{ 1092{
1093 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1093 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1094 1094
1095 if ( addrList.count() > 1 ) { 1095 if ( addrList.count() > 1 ) {
1096 KMessageBox::sorry( this, i18n( "Please select only one contact." ) ); 1096 KMessageBox::sorry( this, i18n( "Please select only one contact." ) );
1097 return; 1097 return;
1098 } 1098 }
1099 1099
1100 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); 1100 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) );
1101 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes ) 1101 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes )
1102 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); 1102 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] );
1103} 1103}
1104void KABCore::editCategories() 1104void KABCore::editCategories()
1105{ 1105{
1106 KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true ); 1106 KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true );
1107 dlg.exec(); 1107 dlg.exec();
1108} 1108}
1109void KABCore::setCategories() 1109void KABCore::setCategories()
1110{ 1110{
1111 1111
1112 QStringList uids; 1112 QStringList uids;
1113 XXPortSelectDialog dlgx( this, false, this ); 1113 XXPortSelectDialog dlgx( this, false, this );
1114 if ( dlgx.exec() ) 1114 if ( dlgx.exec() )
1115 uids = dlgx.uids(); 1115 uids = dlgx.uids();
1116 else 1116 else
1117 return; 1117 return;
1118 if ( uids.isEmpty() ) 1118 if ( uids.isEmpty() )
1119 return; 1119 return;
1120 // qDebug("count %d ", uids.count()); 1120 // qDebug("count %d ", uids.count());
1121 1121
1122 1122
1123 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true ); 1123 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true );
1124 if ( !dlg.exec() ) { 1124 if ( !dlg.exec() ) {
1125 message( i18n("Setting categories cancelled") ); 1125 message( i18n("Setting categories cancelled") );
1126 return; 1126 return;
1127 } 1127 }
1128 bool merge = false; 1128 bool merge = false;
1129 QString msg = i18n( "Merge with existing categories?" ); 1129 QString msg = i18n( "Merge with existing categories?" );
1130 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes ) 1130 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes )
1131 merge = true; 1131 merge = true;
1132 1132
1133 message( i18n("Setting categories ... please wait!") ); 1133 message( i18n("Setting categories ... please wait!") );
1134 QStringList categories = dlg.selectedCategories(); 1134 QStringList categories = dlg.selectedCategories();
1135 1135
1136 //QStringList uids = mViewManager->selectedUids(); 1136 //QStringList uids = mViewManager->selectedUids();
1137 QStringList::Iterator it; 1137 QStringList::Iterator it;
1138 for ( it = uids.begin(); it != uids.end(); ++it ) { 1138 for ( it = uids.begin(); it != uids.end(); ++it ) {
1139 KABC::Addressee addr = mAddressBook->findByUid( *it ); 1139 KABC::Addressee addr = mAddressBook->findByUid( *it );
1140 if ( !addr.isEmpty() ) { 1140 if ( !addr.isEmpty() ) {
1141 if ( !merge ) 1141 if ( !merge )
1142 addr.setCategories( categories ); 1142 addr.setCategories( categories );
1143 else { 1143 else {
1144 QStringList addrCategories = addr.categories(); 1144 QStringList addrCategories = addr.categories();
1145 QStringList::Iterator catIt; 1145 QStringList::Iterator catIt;
1146 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { 1146 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
1147 if ( !addrCategories.contains( *catIt ) ) 1147 if ( !addrCategories.contains( *catIt ) )
1148 addrCategories.append( *catIt ); 1148 addrCategories.append( *catIt );
1149 } 1149 }
1150 addr.setCategories( addrCategories ); 1150 addr.setCategories( addrCategories );
1151 } 1151 }
1152 mAddressBook->insertAddressee( addr ); 1152 mAddressBook->insertAddressee( addr );
1153 } 1153 }
1154 } 1154 }
1155 1155
1156 if ( uids.count() > 0 ) 1156 if ( uids.count() > 0 )
1157 setModified( true ); 1157 setModified( true );
1158 message( i18n("Setting categories completed!") ); 1158 message( i18n("Setting categories completed!") );
1159} 1159}
1160 1160
1161void KABCore::setSearchFields( const KABC::Field::List &fields ) 1161void KABCore::setSearchFields( const KABC::Field::List &fields )
1162{ 1162{
1163 mIncSearchWidget->setFields( fields ); 1163 mIncSearchWidget->setFields( fields );
1164} 1164}
1165 1165
1166void KABCore::incrementalSearch( const QString& text ) 1166void KABCore::incrementalSearch( const QString& text )
1167{ 1167{
1168 QString stext; 1168 QString stext;
1169 if ( KABPrefs::instance()->mAutoSearchWithWildcard ) { 1169 if ( KABPrefs::instance()->mAutoSearchWithWildcard ) {
1170 stext = "*" + text; 1170 stext = "*" + text;
1171 } else { 1171 } else {
1172 stext = text; 1172 stext = text;
1173 } 1173 }
1174 mViewManager->doSearch( stext, mIncSearchWidget->currentField() ); 1174 mViewManager->doSearch( stext, mIncSearchWidget->currentField() );
1175} 1175}
1176 1176
1177void KABCore::setModified() 1177void KABCore::setModified()
1178{ 1178{
1179 setModified( true ); 1179 setModified( true );
1180} 1180}
1181 1181
1182void KABCore::setModifiedWOrefresh() 1182void KABCore::setModifiedWOrefresh()
1183{ 1183{
1184 // qDebug("KABCore::setModifiedWOrefresh() "); 1184 // qDebug("KABCore::setModifiedWOrefresh() ");
1185 mModified = true; 1185 mModified = true;
1186 mActionSave->setEnabled( mModified ); 1186 mActionSave->setEnabled( mModified );
1187 1187
1188 1188
1189} 1189}
1190void KABCore::setModified( bool modified ) 1190void KABCore::setModified( bool modified )
1191{ 1191{
1192 mModified = modified; 1192 mModified = modified;
1193 mActionSave->setEnabled( mModified ); 1193 mActionSave->setEnabled( mModified );
1194 1194
1195 if ( modified ) 1195 if ( modified )
1196 mJumpButtonBar->recreateButtons(); 1196 mJumpButtonBar->recreateButtons();
1197 1197
1198 mViewManager->refreshView(); 1198 mViewManager->refreshView();
1199 1199
1200} 1200}
1201 1201
1202bool KABCore::modified() const 1202bool KABCore::modified() const
1203{ 1203{
1204 return mModified; 1204 return mModified;
1205} 1205}
1206 1206
1207void KABCore::contactModified( const KABC::Addressee &addr ) 1207void KABCore::contactModified( const KABC::Addressee &addr )
1208{ 1208{
1209 addrModified( addr ); 1209 addrModified( addr );
1210#if 0 // debug only 1210#if 0 // debug only
1211 KABC::Addressee ad = addr; 1211 KABC::Addressee ad = addr;
1212 ad.computeCsum( "123"); 1212 ad.computeCsum( "123");
1213#endif 1213#endif
1214} 1214}
1215 1215
1216void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails ) 1216void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails )
1217{ 1217{
1218 1218
1219 Command *command = 0; 1219 Command *command = 0;
1220 QString uid; 1220 QString uid;
1221 1221
1222 // check if it exists already 1222 // check if it exists already
1223 KABC::Addressee origAddr = mAddressBook->findByUid( addr.uid() ); 1223 KABC::Addressee origAddr = mAddressBook->findByUid( addr.uid() );
1224 if ( origAddr.isEmpty() ) 1224 if ( origAddr.isEmpty() )
1225 command = new PwNewCommand( mAddressBook, addr ); 1225 command = new PwNewCommand( mAddressBook, addr );
1226 else { 1226 else {
1227 command = new PwEditCommand( mAddressBook, origAddr, addr ); 1227 command = new PwEditCommand( mAddressBook, origAddr, addr );
1228 uid = addr.uid(); 1228 uid = addr.uid();
1229 } 1229 }
1230 1230
1231 UndoStack::instance()->push( command ); 1231 UndoStack::instance()->push( command );
1232 RedoStack::instance()->clear(); 1232 RedoStack::instance()->clear();
1233 if ( updateDetails ) 1233 if ( updateDetails )
1234 mDetails->setAddressee( addr ); 1234 mDetails->setAddressee( addr );
1235 setModified( true ); 1235 setModified( true );
1236} 1236}
1237 1237
1238void KABCore::newContact() 1238void KABCore::newContact()
1239{ 1239{
1240 1240
1241 1241
1242 QPtrList<KABC::Resource> kabcResources = mAddressBook->resources(); 1242 QPtrList<KABC::Resource> kabcResources = mAddressBook->resources();
1243 1243
1244 QPtrList<KRES::Resource> kresResources; 1244 QPtrList<KRES::Resource> kresResources;
1245 QPtrListIterator<KABC::Resource> it( kabcResources ); 1245 QPtrListIterator<KABC::Resource> it( kabcResources );
1246 KABC::Resource *resource; 1246 KABC::Resource *resource;
1247 while ( ( resource = it.current() ) != 0 ) { 1247 while ( ( resource = it.current() ) != 0 ) {
1248 ++it; 1248 ++it;
1249 if ( !resource->readOnly() ) { 1249 if ( !resource->readOnly() ) {
1250 KRES::Resource *res = static_cast<KRES::Resource*>( resource ); 1250 KRES::Resource *res = static_cast<KRES::Resource*>( resource );
1251 if ( res ) 1251 if ( res )
1252 kresResources.append( res ); 1252 kresResources.append( res );
1253 } 1253 }
1254 } 1254 }
1255 1255
1256 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, this ); 1256 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, this );
1257 resource = static_cast<KABC::Resource*>( res ); 1257 resource = static_cast<KABC::Resource*>( res );
1258 1258
1259 if ( resource ) { 1259 if ( resource ) {
1260 KABC::Addressee addr; 1260 KABC::Addressee addr;
1261 addr.setResource( resource ); 1261 addr.setResource( resource );
1262 mEditorDialog->setAddressee( addr ); 1262 mEditorDialog->setAddressee( addr );
1263 mEditorDialog->setCaption( i18n("Edit new contact"));
1263 KApplication::execDialog ( mEditorDialog ); 1264 KApplication::execDialog ( mEditorDialog );
1264 1265
1265 } else 1266 } else
1266 return; 1267 return;
1267 1268
1268 // mEditorDict.insert( dialog->addressee().uid(), dialog ); 1269 // mEditorDict.insert( dialog->addressee().uid(), dialog );
1269 1270
1270 1271
1271} 1272}
1272 1273
1273void KABCore::addEmail( QString aStr ) 1274void KABCore::addEmail( QString aStr )
1274{ 1275{
1275#ifndef KAB_EMBEDDED 1276#ifndef KAB_EMBEDDED
1276 QString fullName, email; 1277 QString fullName, email;
1277 1278
1278 KABC::Addressee::parseEmailAddress( aStr, fullName, email ); 1279 KABC::Addressee::parseEmailAddress( aStr, fullName, email );
1279 1280
1280 // Try to lookup the addressee matching the email address 1281 // Try to lookup the addressee matching the email address
1281 bool found = false; 1282 bool found = false;
1282 QStringList emailList; 1283 QStringList emailList;
1283 KABC::AddressBook::Iterator it; 1284 KABC::AddressBook::Iterator it;
1284 for ( it = mAddressBook->begin(); !found && (it != mAddressBook->end()); ++it ) { 1285 for ( it = mAddressBook->begin(); !found && (it != mAddressBook->end()); ++it ) {
1285 emailList = (*it).emails(); 1286 emailList = (*it).emails();
1286 if ( emailList.contains( email ) > 0 ) { 1287 if ( emailList.contains( email ) > 0 ) {
1287 found = true; 1288 found = true;
1288 (*it).setNameFromString( fullName ); 1289 (*it).setNameFromString( fullName );
1289 editContact( (*it).uid() ); 1290 editContact( (*it).uid() );
1290 } 1291 }
1291 } 1292 }
1292 1293
1293 if ( !found ) { 1294 if ( !found ) {
1294 KABC::Addressee addr; 1295 KABC::Addressee addr;
1295 addr.setNameFromString( fullName ); 1296 addr.setNameFromString( fullName );
1296 addr.insertEmail( email, true ); 1297 addr.insertEmail( email, true );
1297 1298
1298 mAddressBook->insertAddressee( addr ); 1299 mAddressBook->insertAddressee( addr );
1299 mViewManager->refreshView( addr.uid() ); 1300 mViewManager->refreshView( addr.uid() );
1300 editContact( addr.uid() ); 1301 editContact( addr.uid() );
1301 } 1302 }
1302#else //KAB_EMBEDDED 1303#else //KAB_EMBEDDED
1303 qDebug("KABCore::addEmail finsih method"); 1304 qDebug("KABCore::addEmail finsih method");
1304#endif //KAB_EMBEDDED 1305#endif //KAB_EMBEDDED
1305} 1306}
1306 1307
1307void KABCore::importVCard( const KURL &url, bool showPreview ) 1308void KABCore::importVCard( const KURL &url, bool showPreview )
1308{ 1309{
1309 mXXPortManager->importVCard( url, showPreview ); 1310 mXXPortManager->importVCard( url, showPreview );
1310} 1311}
1311void KABCore::importFromOL() 1312void KABCore::importFromOL()
1312{ 1313{
1313#ifdef _OL_IMPORT_ 1314#ifdef _OL_IMPORT_
1314 KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this ); 1315 KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this );
1315 idgl->exec(); 1316 idgl->exec();
1316 KABC::Addressee::List list = idgl->getAddressList(); 1317 KABC::Addressee::List list = idgl->getAddressList();
1317 if ( list.count() > 0 ) { 1318 if ( list.count() > 0 ) {
1318 KABC::Addressee::List listNew; 1319 KABC::Addressee::List listNew;
1319 KABC::Addressee::List listExisting; 1320 KABC::Addressee::List listExisting;
1320 KABC::Addressee::List::Iterator it; 1321 KABC::Addressee::List::Iterator it;
1321 KABC::AddressBook::Iterator iter; 1322 KABC::AddressBook::Iterator iter;
1322 for ( it = list.begin(); it != list.end(); ++it ) { 1323 for ( it = list.begin(); it != list.end(); ++it ) {
1323 if ( mAddressBook->findByUid((*it).uid() ).isEmpty()) 1324 if ( mAddressBook->findByUid((*it).uid() ).isEmpty())
1324 listNew.append( (*it) ); 1325 listNew.append( (*it) );
1325 else 1326 else
1326 listExisting.append( (*it) ); 1327 listExisting.append( (*it) );
1327 } 1328 }
1328 if ( listExisting.count() > 0 ) 1329 if ( listExisting.count() > 0 )
1329 KMessageBox::information( this, i18n("%1 contacts not added to addressbook\nbecause they were already in the addressbook!").arg( listExisting.count() )); 1330 KMessageBox::information( this, i18n("%1 contacts not added to addressbook\nbecause they were already in the addressbook!").arg( listExisting.count() ));
1330 if ( listNew.count() > 0 ) { 1331 if ( listNew.count() > 0 ) {
1331 pasteWithNewUid = false; 1332 pasteWithNewUid = false;
1332 pasteContacts( listNew ); 1333 pasteContacts( listNew );
1333 pasteWithNewUid = true; 1334 pasteWithNewUid = true;
1334 } 1335 }
1335 } 1336 }
1336 delete idgl; 1337 delete idgl;
1337#endif 1338#endif
1338} 1339}
1339 1340
1340void KABCore::importVCard( const QString &vCard, bool showPreview ) 1341void KABCore::importVCard( const QString &vCard, bool showPreview )
1341{ 1342{
1342 mXXPortManager->importVCard( vCard, showPreview ); 1343 mXXPortManager->importVCard( vCard, showPreview );
1343} 1344}
1344 1345
1345//US added a second method without defaultparameter 1346//US added a second method without defaultparameter
1346void KABCore::editContact2() { 1347void KABCore::editContact2() {
1347 editContact( QString::null ); 1348 editContact( QString::null );
1348} 1349}
1349 1350
1350void KABCore::editContact( const QString &uid ) 1351void KABCore::editContact( const QString &uid )
1351{ 1352{
1352 1353
1353 if ( mExtensionManager->isQuickEditVisible() ) 1354 if ( mExtensionManager->isQuickEditVisible() )
1354 return; 1355 return;
1355 1356
1356 // First, locate the contact entry 1357 // First, locate the contact entry
1357 QString localUID = uid; 1358 QString localUID = uid;
1358 if ( localUID.isNull() ) { 1359 if ( localUID.isNull() ) {
1359 QStringList uidList = mViewManager->selectedUids(); 1360 QStringList uidList = mViewManager->selectedUids();
1360 if ( uidList.count() > 0 ) 1361 if ( uidList.count() > 0 )
1361 localUID = *( uidList.at( 0 ) ); 1362 localUID = *( uidList.at( 0 ) );
1362 } 1363 }
1363 1364
1364 KABC::Addressee addr = mAddressBook->findByUid( localUID ); 1365 KABC::Addressee addr = mAddressBook->findByUid( localUID );
1365 if ( !addr.isEmpty() ) { 1366 if ( !addr.isEmpty() ) {
1366 mEditorDialog->setAddressee( addr ); 1367 mEditorDialog->setAddressee( addr );
1367 KApplication::execDialog ( mEditorDialog ); 1368 KApplication::execDialog ( mEditorDialog );
1368 } 1369 }
1369} 1370}
1370 1371
1371/** 1372/**
1372 Shows or edits the detail view for the given uid. If the uid is QString::null, 1373 Shows or edits the detail view for the given uid. If the uid is QString::null,
1373 the method will try to find a selected addressee in the view. 1374 the method will try to find a selected addressee in the view.
1374 */ 1375 */
1375void KABCore::executeContact( const QString &uid /*US = QString::null*/ ) 1376void KABCore::executeContact( const QString &uid /*US = QString::null*/ )
1376{ 1377{
1377 if ( mMultipleViewsAtOnce ) 1378 if ( mMultipleViewsAtOnce )
1378 { 1379 {
1379 editContact( uid ); 1380 editContact( uid );
1380 } 1381 }
1381 else 1382 else
1382 { 1383 {
1383 setDetailsVisible( true ); 1384 setDetailsVisible( true );
1384 mActionDetails->setChecked(true); 1385 mActionDetails->setChecked(true);
1385 } 1386 }
1386 1387
1387} 1388}
1388 1389
1389void KABCore::save() 1390void KABCore::save()
1390{ 1391{
1391 if (syncManager->blockSave()) 1392 if (syncManager->blockSave())
1392 return; 1393 return;
1393 if ( !mModified ) 1394 if ( !mModified )
1394 return; 1395 return;
1395 1396
1396 syncManager->setBlockSave(true); 1397 syncManager->setBlockSave(true);
1397 QString text = i18n( "There was an error while attempting to save\n the " 1398 QString text = i18n( "There was an error while attempting to save\n the "
1398 "address book. Please check that some \nother application is " 1399 "address book. Please check that some \nother application is "
1399 "not using it. " ); 1400 "not using it. " );
1400 message(i18n("Saving ... please wait! "), false); 1401 message(i18n("Saving ... please wait! "), false);
1401 //qApp->processEvents(); 1402 //qApp->processEvents();
1402#ifndef KAB_EMBEDDED 1403#ifndef KAB_EMBEDDED
1403 KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); 1404 KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook );
1404 if ( !b || !b->save() ) { 1405 if ( !b || !b->save() ) {
1405 KMessageBox::error( this, text, i18n( "Unable to Save" ) ); 1406 KMessageBox::error( this, text, i18n( "Unable to Save" ) );
1406 } 1407 }
1407#else //KAB_EMBEDDED 1408#else //KAB_EMBEDDED
1408 KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook ); 1409 KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook );
1409 if ( !b || !b->save() ) { 1410 if ( !b || !b->save() ) {
1410 QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok")); 1411 QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok"));
1411 } 1412 }
1412#endif //KAB_EMBEDDED 1413#endif //KAB_EMBEDDED
1413 1414
1414 message(i18n("Addressbook saved!")); 1415 message(i18n("Addressbook saved!"));
1415 setModified( false ); 1416 setModified( false );
1416 syncManager->setBlockSave(false); 1417 syncManager->setBlockSave(false);
1417} 1418}
1418 1419
1419 1420
1420void KABCore::undo() 1421void KABCore::undo()
1421{ 1422{
1422 UndoStack::instance()->undo(); 1423 UndoStack::instance()->undo();
1423 1424
1424 // Refresh the view 1425 // Refresh the view
1425 mViewManager->refreshView(); 1426 mViewManager->refreshView();
1426} 1427}
1427 1428
1428void KABCore::redo() 1429void KABCore::redo()
1429{ 1430{
1430 RedoStack::instance()->redo(); 1431 RedoStack::instance()->redo();
1431 1432
1432 // Refresh the view 1433 // Refresh the view
1433 mViewManager->refreshView(); 1434 mViewManager->refreshView();
1434} 1435}
1435void KABCore::setJumpButtonBar( bool visible ) 1436void KABCore::setJumpButtonBar( bool visible )
1436{ 1437{
1437 setJumpButtonBarVisible(visible ); 1438 setJumpButtonBarVisible(visible );
1438 saveSettings(); 1439 saveSettings();
1439} 1440}
1440void KABCore::setJumpButtonBarVisible( bool visible ) 1441void KABCore::setJumpButtonBarVisible( bool visible )
1441{ 1442{
1442 if (mMultipleViewsAtOnce) 1443 if (mMultipleViewsAtOnce)
1443 { 1444 {
1444 if ( visible ) 1445 if ( visible )
1445 mJumpButtonBar->show(); 1446 mJumpButtonBar->show();
1446 else 1447 else
1447 mJumpButtonBar->hide(); 1448 mJumpButtonBar->hide();
1448 } 1449 }
1449 else 1450 else
1450 { 1451 {
1451 // show the jumpbar only if "the details are hidden" == "viewmanager are shown" 1452 // show the jumpbar only if "the details are hidden" == "viewmanager are shown"
1452 if (mViewManager->isVisible()) 1453 if (mViewManager->isVisible())
1453 { 1454 {
1454 if ( visible ) 1455 if ( visible )
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 8752636..53cd011 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -71,385 +71,385 @@ KOViewManager::KOViewManager( CalendarView *mainView ) :
71 mTimeSpanView = 0; 71 mTimeSpanView = 0;
72 mCurrentAgendaView = 0 ; 72 mCurrentAgendaView = 0 ;
73 mFlagShowNextxDays = false; 73 mFlagShowNextxDays = false;
74} 74}
75 75
76KOViewManager::~KOViewManager() 76KOViewManager::~KOViewManager()
77{ 77{
78} 78}
79 79
80 80
81KOrg::BaseView *KOViewManager::currentView() 81KOrg::BaseView *KOViewManager::currentView()
82{ 82{
83 return mCurrentView; 83 return mCurrentView;
84} 84}
85 85
86void KOViewManager::readSettings(KConfig *config) 86void KOViewManager::readSettings(KConfig *config)
87{ 87{
88 config->setGroup("General"); 88 config->setGroup("General");
89 QString view = config->readEntry("Current View"); 89 QString view = config->readEntry("Current View");
90 if (view == "WhatsNext") showWhatsNextView(); 90 if (view == "WhatsNext") showWhatsNextView();
91 else if (view == "Month") { 91 else if (view == "Month") {
92 if ( !KOPrefs::instance()->mMonthViewWeek ) 92 if ( !KOPrefs::instance()->mMonthViewWeek )
93 showMonthView(); 93 showMonthView();
94 else 94 else
95 showMonthViewWeek(); 95 showMonthViewWeek();
96 } 96 }
97 else if (view == "List") showListView(); 97 else if (view == "List") showListView();
98 else if (view == "Journal") showJournalView(); 98 else if (view == "Journal") showJournalView();
99 else if (view == "TimeSpan") showTimeSpanView(); 99 else if (view == "TimeSpan") showTimeSpanView();
100 else if (view == "Todo") showTodoView(); 100 else if (view == "Todo") showTodoView();
101 else { 101 else {
102 config->setGroup( "Views" ); 102 config->setGroup( "Views" );
103 int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); 103 int dateCount = config->readNumEntry( "ShownDatesCount", 7 );
104 mCurrentAgendaView = dateCount; 104 mCurrentAgendaView = dateCount;
105 showAgendaView(); 105 showAgendaView();
106 mCurrentAgendaView = dateCount; 106 mCurrentAgendaView = dateCount;
107#ifdef DESKTOP_VERSION 107#ifdef DESKTOP_VERSION
108 QTimer::singleShot( 1000, mAgendaView, SLOT ( setInitStartHour() ) ); 108 QTimer::singleShot( 1000, mAgendaView, SLOT ( setInitStartHour() ) );
109#endif 109#endif
110 } 110 }
111} 111}
112 112
113void KOViewManager::showDateView( int view, QDate date) 113void KOViewManager::showDateView( int view, QDate date)
114{ 114{
115 static int lastMode = 0; 115 static int lastMode = 0;
116 static int lastCount = 0; 116 static int lastCount = 0;
117 static bool lastNDMode = false; 117 static bool lastNDMode = false;
118 static QDate lastDate; 118 static QDate lastDate;
119 //qDebug("date %d %s", view, date.toString().latin1()); 119 //qDebug("date %d %s", view, date.toString().latin1());
120 120
121 if (view != 9) 121 if (view != 9)
122 lastMode = 0; 122 lastMode = 0;
123 //qDebug("%d %d ", lastNDMode, mFlagShowNextxDays ); 123 //qDebug("%d %d ", lastNDMode, mFlagShowNextxDays );
124 bool savemFlagShowNextxDays = mFlagShowNextxDays; 124 bool savemFlagShowNextxDays = mFlagShowNextxDays;
125 mFlagShowNextxDays = false; 125 mFlagShowNextxDays = false;
126 if ( view == 3 ) { 126 if ( view == 3 ) {
127 //mCurrentAgendaView = 1 ; 127 //mCurrentAgendaView = 1 ;
128 lastDate = mMainView->dateNavigator()->selectedDates().first(); 128 lastDate = mMainView->dateNavigator()->selectedDates().first();
129 lastCount = mMainView->dateNavigator()->selectedDates().count(); 129 lastCount = mMainView->dateNavigator()->selectedDates().count();
130 lastNDMode = savemFlagShowNextxDays; 130 lastNDMode = savemFlagShowNextxDays;
131 mMainView->dateNavigator()->selectDate( date ); 131 mMainView->dateNavigator()->selectDate( date );
132 lastMode = 1; 132 lastMode = 1;
133 mCurrentAgendaView = 1 ; 133 mCurrentAgendaView = 1 ;
134 } else if (view == 4 ) { 134 } else if (view == 4 ) {
135 mCurrentAgendaView = 7 ; 135 mCurrentAgendaView = 7 ;
136 mMainView->dateNavigator()->selectDates( date, 7 ); 136 mMainView->dateNavigator()->selectDates( date, 7 );
137 } else if (view == 5 ) { 137 } else if (view == 5 ) {
138 mCurrentAgendaView = 14 ; 138 mCurrentAgendaView = 14 ;
139 mMainView->dateNavigator()->selectDates( date, 14); 139 mMainView->dateNavigator()->selectDates( date, 14);
140 } else if (view == 6 ) { 140 } else if (view == 6 ) {
141 //mMainView->dateNavigator()->selectDates( date, 7 ); 141 //mMainView->dateNavigator()->selectDates( date, 7 );
142 showMonthView(); 142 showMonthView();
143 } else if (view == 7 ) { 143 } else if (view == 7 ) {
144 mMainView->dateNavigator()->selectDate( date ); 144 mMainView->dateNavigator()->selectDate( date );
145 showJournalView(); 145 showJournalView();
146 } else if (view == 8 ) { 146 } else if (view == 8 ) {
147 globalFlagBlockAgenda = 1; 147 globalFlagBlockAgenda = 1;
148 if ( mCurrentAgendaView != 3 ) 148 if ( mCurrentAgendaView != 3 )
149 mCurrentAgendaView = -1; 149 mCurrentAgendaView = -1;
150 showAgendaView(KOPrefs::instance()->mFullViewMonth); 150 showAgendaView(KOPrefs::instance()->mFullViewMonth);
151 globalFlagBlockAgenda = 2; 151 globalFlagBlockAgenda = 2;
152 mMainView->dateNavigator()->selectDates( date , 152 mMainView->dateNavigator()->selectDates( date ,
153 KOPrefs::instance()->mNextXDays ); 153 KOPrefs::instance()->mNextXDays );
154 mFlagShowNextxDays = true; 154 mFlagShowNextxDays = true;
155 mCurrentAgendaView = 3 ; 155 mCurrentAgendaView = 3 ;
156 } if (view == 9) { // return behaviour, for getting back from mode == 3 (single day mode ) 156 } if (view == 9) { // return behaviour, for getting back from mode == 3 (single day mode )
157 if ( lastMode ) { 157 if ( lastMode ) {
158 mCurrentAgendaView = lastCount ; 158 mCurrentAgendaView = lastCount ;
159 mMainView->dateNavigator()->selectDates( lastDate, lastCount); 159 mMainView->dateNavigator()->selectDates( lastDate, lastCount);
160 mFlagShowNextxDays = lastNDMode; 160 mFlagShowNextxDays = lastNDMode;
161 if ( mFlagShowNextxDays ) { 161 if ( mFlagShowNextxDays ) {
162 mCurrentAgendaView = 3 ; 162 mCurrentAgendaView = 3 ;
163 } 163 }
164 } else 164 } else
165 showWeekView(); 165 showWeekView();
166 } else if (view == 10) { 166 } else if (view == 10) {
167 mMainView->dateNavigator()->selectDates( date,mMainView->dateNavigator()->selectedDates().count() ); 167 mMainView->dateNavigator()->selectDates( date,mMainView->dateNavigator()->selectedDates().count() );
168 } 168 }
169} 169}
170 170
171 171
172 172
173void KOViewManager::writeSettings(KConfig *config) 173void KOViewManager::writeSettings(KConfig *config)
174{ 174{
175 config->setGroup("General"); 175 config->setGroup("General");
176 176
177 QString view; 177 QString view;
178 if (mCurrentView == mWhatsNextView) view = "WhatsNext"; 178 if (mCurrentView == mWhatsNextView) view = "WhatsNext";
179 else if (mCurrentView == mMonthView) view = "Month"; 179 else if (mCurrentView == mMonthView) view = "Month";
180 else if (mCurrentView == mListView) view = "List"; 180 else if (mCurrentView == mListView) view = "List";
181 else if (mCurrentView == mJournalView) view = "Journal"; 181 else if (mCurrentView == mJournalView) view = "Journal";
182 else if (mCurrentView == mTimeSpanView) view = "TimeSpan"; 182 else if (mCurrentView == mTimeSpanView) view = "TimeSpan";
183 else if (mCurrentView == mTodoView) view = "Todo"; 183 else if (mCurrentView == mTodoView) view = "Todo";
184 else view = "Agenda"; 184 else view = "Agenda";
185 185
186 config->writeEntry("Current View",view); 186 config->writeEntry("Current View",view);
187 187
188 if (mAgendaView) { 188 if (mAgendaView) {
189 mAgendaView->writeSettings(config); 189 mAgendaView->writeSettings(config);
190 } 190 }
191 if (mTimeSpanView) { 191 if (mTimeSpanView) {
192 mTimeSpanView->writeSettings(config); 192 mTimeSpanView->writeSettings(config);
193 } 193 }
194 if (mListView) { 194 if (mListView) {
195 mListView->writeSettings(config); 195 mListView->writeSettings(config);
196 } 196 }
197 if (mTodoView) { 197 if (mTodoView) {
198 mTodoView->saveLayout(config,"Todo View"); 198 mTodoView->saveLayout(config,"Todo View");
199 } 199 }
200} 200}
201void KOViewManager::showNextView() 201void KOViewManager::showNextView()
202{ 202{
203 if (mCurrentView == mWhatsNextView) goto NEXT_X; 203 if (mCurrentView == mWhatsNextView) goto NEXT_X;
204 204
205 if (mCurrentView == mAgendaView && mFlagShowNextxDays) goto JOURNAL; 205 if (mCurrentView == mAgendaView && mFlagShowNextxDays) goto JOURNAL;
206 206
207 if (mCurrentView == mJournalView ) goto DAY_1; 207 if (mCurrentView == mJournalView ) goto DAY_1;
208 208
209 if (mCurrentView == mAgendaView && mCurrentAgendaView == 1 ) goto DAY_5; 209 if (mCurrentView == mAgendaView && mCurrentAgendaView == 1 ) goto DAY_5;
210 210
211 if (mCurrentView == mAgendaView && mCurrentAgendaView == 5 ) goto DAY_7; 211 if (mCurrentView == mAgendaView && mCurrentAgendaView == 5 ) goto DAY_7;
212 212
213 if (mCurrentView == mAgendaView ) goto DAY_6; 213 if (mCurrentView == mAgendaView ) goto DAY_6;
214 214
215 if (mCurrentView == mMonthView && KOPrefs::instance()->mMonthViewWeek) goto MONTH; 215 if (mCurrentView == mMonthView && KOPrefs::instance()->mMonthViewWeek) goto MONTH;
216 216
217 if (mCurrentView == mMonthView ) goto LIST; 217 if (mCurrentView == mMonthView ) goto LIST;
218 218
219 if (mCurrentView == mListView ) goto TODO; 219 if (mCurrentView == mListView ) goto TODO;
220 220
221 // if (mCurrentView == mTodoView ) goto LIST; 221 // if (mCurrentView == mTodoView ) goto LIST;
222 222
223 223
224 NEXT: 224 NEXT:
225 if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();return ;} 225 if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();return ;}
226 NEXT_X: 226 NEXT_X:
227 if ( KOPrefs::instance()->mShowIconNextDays ) { showNextXView() ;return ;} 227 if ( KOPrefs::instance()->mShowIconNextDays ) { showNextXView() ;return ;}
228 JOURNAL: 228 JOURNAL:
229 if ( KOPrefs::instance()->mShowIconJournal ) { showJournalView() ;return ;} 229 if ( KOPrefs::instance()->mShowIconJournal ) { showJournalView() ;return ;}
230 DAY_1: 230 DAY_1:
231 if ( KOPrefs::instance()->mShowIconDay1 ) { showDayView() ;return ;} 231 if ( KOPrefs::instance()->mShowIconDay1 ) { showDayView() ;return ;}
232 DAY_5: 232 DAY_5:
233 if ( KOPrefs::instance()->mShowIconDay5 ) { showWorkWeekView() ;return ;} 233 if ( KOPrefs::instance()->mShowIconDay5 ) { showWorkWeekView() ;return ;}
234 DAY_7: 234 DAY_7:
235 if ( KOPrefs::instance()->mShowIconDay7 ) { showWeekView();return ;} 235 if ( KOPrefs::instance()->mShowIconDay7 ) { showWeekView();return ;}
236 DAY_6: 236 DAY_6:
237 if ( KOPrefs::instance()->mShowIconDay6 ) { showMonthViewWeek();return ;} 237 if ( KOPrefs::instance()->mShowIconDay6 ) { showMonthViewWeek();return ;}
238 MONTH: 238 MONTH:
239 if ( KOPrefs::instance()->mShowIconMonth ) { showMonthView();return ;} 239 if ( KOPrefs::instance()->mShowIconMonth ) { showMonthView();return ;}
240 LIST: 240 LIST:
241 if ( KOPrefs::instance()->mShowIconList ) { showListView() ;return ;} 241 if ( KOPrefs::instance()->mShowIconList ) { showListView() ;return ;}
242 TODO: 242 TODO:
243 if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;} 243 if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;}
244 244
245 if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();return ;} 245 if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();return ;}
246 246
247 if ( KOPrefs::instance()->mShowIconNextDays ) { showNextXView() ;return ;} 247 if ( KOPrefs::instance()->mShowIconNextDays ) { showNextXView() ;return ;}
248 248
249 if ( KOPrefs::instance()->mShowIconJournal ) { showJournalView() ;return ;} 249 if ( KOPrefs::instance()->mShowIconJournal ) { showJournalView() ;return ;}
250 250
251 if ( KOPrefs::instance()->mShowIconDay1 ) { showDayView() ;return ;} 251 if ( KOPrefs::instance()->mShowIconDay1 ) { showDayView() ;return ;}
252 252
253 if ( KOPrefs::instance()->mShowIconDay5 ) { showWorkWeekView() ;return ;} 253 if ( KOPrefs::instance()->mShowIconDay5 ) { showWorkWeekView() ;return ;}
254 254
255 if ( KOPrefs::instance()->mShowIconDay7 ) { showWeekView();return ;} 255 if ( KOPrefs::instance()->mShowIconDay7 ) { showWeekView();return ;}
256 256
257 if ( KOPrefs::instance()->mShowIconDay6 ) { showMonthViewWeek();return ;} 257 if ( KOPrefs::instance()->mShowIconDay6 ) { showMonthViewWeek();return ;}
258 258
259 if ( KOPrefs::instance()->mShowIconMonth ) { showMonthView();return ;} 259 if ( KOPrefs::instance()->mShowIconMonth ) { showMonthView();return ;}
260 260
261 if ( KOPrefs::instance()->mShowIconList ) { showListView() ;return ;} 261 if ( KOPrefs::instance()->mShowIconList ) { showListView() ;return ;}
262 262
263 if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;} 263 //if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;}
264 264
265 265
266 266
267} 267}
268void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) 268void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
269{ 269{
270 270
271 //mFlagShowNextxDays = false; 271 //mFlagShowNextxDays = false;
272 //if(view == mCurrentView) return; 272 //if(view == mCurrentView) return;
273 if ( view == 0 ) { 273 if ( view == 0 ) {
274 view = mCurrentView; 274 view = mCurrentView;
275 if ( view == 0 ) 275 if ( view == 0 )
276 return; 276 return;
277 } 277 }
278 bool callupdate = !(view == mCurrentView); 278 bool callupdate = !(view == mCurrentView);
279 bool full = fullScreen; 279 bool full = fullScreen;
280 if(view == mCurrentView && view != mWhatsNextView ) { 280 if(view == mCurrentView && view != mWhatsNextView ) {
281 if ( mCurrentAgendaView < 0 ) 281 if ( mCurrentAgendaView < 0 )
282 return; 282 return;
283 if ( view != mMonthView ) 283 if ( view != mMonthView )
284 full = mMainView->leftFrame()->isVisible(); 284 full = mMainView->leftFrame()->isVisible();
285 } else { 285 } else {
286 if ( view == mMonthView && mMonthView) 286 if ( view == mMonthView && mMonthView)
287 ;//mMonthView->skipResize = true ; 287 ;//mMonthView->skipResize = true ;
288 mCurrentView = view; 288 mCurrentView = view;
289 // bool full = fullScreen; 289 // bool full = fullScreen;
290 bool isFull = !mMainView->leftFrame()->isVisible(); 290 bool isFull = !mMainView->leftFrame()->isVisible();
291 if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) 291 if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen )
292 full = true; 292 full = true;
293 if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) 293 if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen )
294 full = false; 294 full = false;
295 } 295 }
296 if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); 296 if ( mAgendaView ) mAgendaView->deleteSelectedDateTime();
297 //raiseCurrentView( full ); 297 //raiseCurrentView( full );
298 mMainView->processIncidenceSelection( 0 ); 298 mMainView->processIncidenceSelection( 0 );
299 //mMainView->updateView(); 299 //mMainView->updateView();
300 raiseCurrentView( full, callupdate ); 300 raiseCurrentView( full, callupdate );
301 mMainView->adaptNavigationUnits(); 301 mMainView->adaptNavigationUnits();
302} 302}
303 303
304void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) 304void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView )
305{ 305{
306 mCurrentAgendaView = 0; 306 mCurrentAgendaView = 0;
307 if ( fullScreen ) { 307 if ( fullScreen ) {
308 mMainView->leftFrame()->hide(); 308 mMainView->leftFrame()->hide();
309 } else { 309 } else {
310 mMainView->leftFrame()->show(); 310 mMainView->leftFrame()->show();
311 } 311 }
312 //if ( mCurrentView == mMonthView ) qApp->processEvents(); 312 //if ( mCurrentView == mMonthView ) qApp->processEvents();
313 emit signalFullScreen( !fullScreen ); 313 emit signalFullScreen( !fullScreen );
314 if ( callUpdateView ) 314 if ( callUpdateView )
315 mMainView->updateView(); 315 mMainView->updateView();
316 316
317 if ( globalFlagBlockAgenda == 5 ) { 317 if ( globalFlagBlockAgenda == 5 ) {
318 globalFlagBlockAgenda = 4; 318 globalFlagBlockAgenda = 4;
319 globalFlagBlockAgendaItemPaint = 1; 319 globalFlagBlockAgendaItemPaint = 1;
320 } 320 }
321 mMainView->viewStack()->raiseWidget(mCurrentView); 321 mMainView->viewStack()->raiseWidget(mCurrentView);
322 if ( globalFlagBlockAgenda == 4 ) { 322 if ( globalFlagBlockAgenda == 4 ) {
323 if ( mCurrentView == mAgendaView ) { 323 if ( mCurrentView == mAgendaView ) {
324 //globalFlagBlockAgenda =1 ; 324 //globalFlagBlockAgenda =1 ;
325 if ( KOPrefs::instance()->mSetTimeToDayStartAt ) 325 if ( KOPrefs::instance()->mSetTimeToDayStartAt )
326 mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins ); 326 mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins );
327 else if ( KOPrefs::instance()->mCenterOnCurrentTime ) 327 else if ( KOPrefs::instance()->mCenterOnCurrentTime )
328 mAgendaView->setStartHour( QTime::currentTime ().hour() ); 328 mAgendaView->setStartHour( QTime::currentTime ().hour() );
329 qApp->processEvents(); 329 qApp->processEvents();
330 //qDebug("qApp->processEvents() "); 330 //qDebug("qApp->processEvents() ");
331 globalFlagBlockAgenda = 0; 331 globalFlagBlockAgenda = 0;
332 mAgendaView->repaintAgenda(); 332 mAgendaView->repaintAgenda();
333 333
334 } 334 }
335 globalFlagBlockAgenda = 0; 335 globalFlagBlockAgenda = 0;
336 } 336 }
337 emit signalAgendaView( mCurrentView == mAgendaView ); 337 emit signalAgendaView( mCurrentView == mAgendaView );
338 //qDebug("raiseCurrentView ende "); 338 //qDebug("raiseCurrentView ende ");
339 339
340} 340}
341 341
342void KOViewManager::updateView() 342void KOViewManager::updateView()
343{ 343{
344 // qDebug("KOViewManager::updateView() "); 344 // qDebug("KOViewManager::updateView() ");
345 // if we are updating mTodoView, we get endless recursion 345 // if we are updating mTodoView, we get endless recursion
346 if ( mTodoView == mCurrentView ) 346 if ( mTodoView == mCurrentView )
347 return; 347 return;
348 if ( mCurrentView ) mCurrentView->updateView(); 348 if ( mCurrentView ) mCurrentView->updateView();
349 349
350} 350}
351 351
352void KOViewManager::updateView(const QDate &start, const QDate &end) 352void KOViewManager::updateView(const QDate &start, const QDate &end)
353{ 353{
354 // kdDebug() << "KOViewManager::updateView()" << endl; 354 // kdDebug() << "KOViewManager::updateView()" << endl;
355 355
356 if (mCurrentView) mCurrentView->showDates(start, end); 356 if (mCurrentView) mCurrentView->showDates(start, end);
357 357
358 if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView(); 358 if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView();
359} 359}
360 360
361 361
362void KOViewManager::updateWNview() 362void KOViewManager::updateWNview()
363{ 363{
364 if ( mCurrentView == mWhatsNextView && mWhatsNextView ) 364 if ( mCurrentView == mWhatsNextView && mWhatsNextView )
365 mWhatsNextView->updateView(); 365 mWhatsNextView->updateView();
366 366
367} 367}
368void KOViewManager::showWhatsNextView() 368void KOViewManager::showWhatsNextView()
369{ 369{
370 if (!mWhatsNextView) { 370 if (!mWhatsNextView) {
371 mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(), 371 mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(),
372 "KOViewManager::WhatsNextView"); 372 "KOViewManager::WhatsNextView");
373 mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog()); 373 mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog());
374 connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); 374 connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig()));
375 addView(mWhatsNextView); 375 addView(mWhatsNextView);
376 connect(this, SIGNAL( printWNV() ), 376 connect(this, SIGNAL( printWNV() ),
377 mWhatsNextView, SLOT( printMe() ) ); 377 mWhatsNextView, SLOT( printMe() ) );
378 } 378 }
379 globalFlagBlockAgenda = 1; 379 globalFlagBlockAgenda = 1;
380 showView(mWhatsNextView, true ); 380 showView(mWhatsNextView, true );
381 //mWhatsNextView->updateView(); 381 //mWhatsNextView->updateView();
382 382
383} 383}
384 384
385void KOViewManager::slotprintWNV() 385void KOViewManager::slotprintWNV()
386{ 386{
387 if (!mWhatsNextView) 387 if (!mWhatsNextView)
388 showWhatsNextView(); 388 showWhatsNextView();
389 emit printWNV(); 389 emit printWNV();
390 390
391} 391}
392void KOViewManager::showListView() 392void KOViewManager::showListView()
393{ 393{
394 if (!mListView) { 394 if (!mListView) {
395 mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView"); 395 mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView");
396 addView(mListView); 396 addView(mListView);
397 397
398 connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)), 398 connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)),
399 mMainView, SLOT(showIncidence(Incidence *))); 399 mMainView, SLOT(showIncidence(Incidence *)));
400 connect(mListView, SIGNAL(editIncidenceSignal(Incidence *)), 400 connect(mListView, SIGNAL(editIncidenceSignal(Incidence *)),
401 mMainView, SLOT(editIncidence(Incidence *))); 401 mMainView, SLOT(editIncidence(Incidence *)));
402 connect(mListView, SIGNAL(deleteIncidenceSignal(Incidence *)), 402 connect(mListView, SIGNAL(deleteIncidenceSignal(Incidence *)),
403 mMainView, SLOT(deleteIncidence(Incidence *))); 403 mMainView, SLOT(deleteIncidence(Incidence *)));
404 connect( mListView, SIGNAL( incidenceSelected( Incidence * ) ), 404 connect( mListView, SIGNAL( incidenceSelected( Incidence * ) ),
405 mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); 405 mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
406 connect( mListView, SIGNAL( signalNewEvent() ), 406 connect( mListView, SIGNAL( signalNewEvent() ),
407 mMainView, SLOT( newEvent() ) ); 407 mMainView, SLOT( newEvent() ) );
408 connect(mMainView, SIGNAL(configChanged()), mListView, SLOT(updateConfig())); 408 connect(mMainView, SIGNAL(configChanged()), mListView, SLOT(updateConfig()));
409 connect( mListView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), 409 connect( mListView, SIGNAL( cloneIncidenceSignal( Incidence * ) ),
410 mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); 410 mMainView, SLOT ( cloneIncidence( Incidence * ) ) );
411 connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), 411 connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ),
412 mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); 412 mMainView, SLOT ( cancelIncidence( Incidence * ) ) );
413 connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ), 413 connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ),
414 mMainView, SLOT ( moveIncidence( Incidence * ) ) ); 414 mMainView, SLOT ( moveIncidence( Incidence * ) ) );
415 connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ), 415 connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
416 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 416 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
417 } 417 }
418 // bool temp = mFlagShowNextxDays; 418 // bool temp = mFlagShowNextxDays;
419 //globalFlagBlockPainting = true; 419 //globalFlagBlockPainting = true;
420 globalFlagBlockAgenda = 1; 420 globalFlagBlockAgenda = 1;
421 if ( KOPrefs::instance()->mListViewMonthTimespan ) { 421 if ( KOPrefs::instance()->mListViewMonthTimespan ) {
422 mMainView->setBlockShowDates( true ); 422 mMainView->setBlockShowDates( true );
423 mMainView->dateNavigator()->selectMonth(); 423 mMainView->dateNavigator()->selectMonth();
424 mMainView->setBlockShowDates( false ); 424 mMainView->setBlockShowDates( false );
425 } 425 }
426 showView(mListView, KOPrefs::instance()->mFullViewTodo); 426 showView(mListView, KOPrefs::instance()->mFullViewTodo);
427 //mFlagShowNextxDays = temp; 427 //mFlagShowNextxDays = temp;
428} 428}
429 429
430void KOViewManager::showAgendaView( bool fullScreen ) 430void KOViewManager::showAgendaView( bool fullScreen )
431{ 431{
432 432
433 mMainView->dialogManager()->hideSearchDialog(); 433 mMainView->dialogManager()->hideSearchDialog();
434 // qDebug("KOViewManager::showAgendaView "); 434 // qDebug("KOViewManager::showAgendaView ");
435 bool full; 435 bool full;
436 full = fullScreen; 436 full = fullScreen;
437 if (!mAgendaView) { 437 if (!mAgendaView) {
438 full = false; 438 full = false;
439 mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView"); 439 mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView");
440 addView(mAgendaView); 440 addView(mAgendaView);
441#ifndef DESKTOP_VERSION 441#ifndef DESKTOP_VERSION
442 QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold ); 442 QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold );
443#endif 443#endif
444 connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )), 444 connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )),
445 mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) )); 445 mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) ));
446 446
447 // SIGNALS/SLOTS FOR DAY/WEEK VIEW 447 // SIGNALS/SLOTS FOR DAY/WEEK VIEW
448 448
449 connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate ))); 449 connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate )));
450 450
451 connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)), 451 connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)),
452 mMainView, SLOT(newTodoDateTime(QDateTime,bool))); 452 mMainView, SLOT(newTodoDateTime(QDateTime,bool)));
453 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)), 453 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)),
454 mMainView, SLOT(newEvent(QDateTime))); 454 mMainView, SLOT(newEvent(QDateTime)));
455 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)), 455 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)),