author | zautrix <zautrix> | 2005-07-06 19:14:52 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-06 19:14:52 (UTC) |
commit | c79a8a4950c098fa6f5a7ae8396feb4dd3a91577 (patch) (unidiff) | |
tree | 7c6e03165f85a4bb42c8a20f6090fc533f3133f0 | |
parent | 2038f7363c31e1a0ab139a1184cbed10086e1862 (diff) | |
download | kdepimpi-c79a8a4950c098fa6f5a7ae8396feb4dd3a91577.zip kdepimpi-c79a8a4950c098fa6f5a7ae8396feb4dd3a91577.tar.gz kdepimpi-c79a8a4950c098fa6f5a7ae8396feb4dd3a91577.tar.bz2 |
fixes
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 9 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 5 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 12 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 3 |
4 files changed, 25 insertions, 4 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index bc5cbb7..a5e2597 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1397,100 +1397,109 @@ | |||
1397 | { " Calendar \n Resource "," Kalender \n Resource " }, | 1397 | { " Calendar \n Resource "," Kalender \n Resource " }, |
1398 | { " Color "," Farbe " }, | 1398 | { " Color "," Farbe " }, |
1399 | { "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" }, | 1399 | { "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" }, |
1400 | { "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, | 1400 | { "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, |
1401 | { "Add new Calendar","Füge Kalender hinzu" }, | 1401 | { "Add new Calendar","Füge Kalender hinzu" }, |
1402 | { "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, | 1402 | { "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, |
1403 | { "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" }, | 1403 | { "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" }, |
1404 | { "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, | 1404 | { "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, |
1405 | { "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, | 1405 | { "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, |
1406 | { "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, | 1406 | { "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, |
1407 | { "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, | 1407 | { "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, |
1408 | { "Global application font for all apps:","Globale Schriftart:" }, | 1408 | { "Global application font for all apps:","Globale Schriftart:" }, |
1409 | { "Application Font","Applikationsschriftart" }, | 1409 | { "Application Font","Applikationsschriftart" }, |
1410 | { "Kx/Pi","Kx/Pi" }, | 1410 | { "Kx/Pi","Kx/Pi" }, |
1411 | { "Backup","Backup" }, | 1411 | { "Backup","Backup" }, |
1412 | { "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, | 1412 | { "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, |
1413 | { "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, | 1413 | { "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, |
1414 | { "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, | 1414 | { "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, |
1415 | { "Choose Color","Wähle Farbe" }, | 1415 | { "Choose Color","Wähle Farbe" }, |
1416 | { " OK "," OK " }, | 1416 | { " OK "," OK " }, |
1417 | { " Cancel "," Abbrechen " }, | 1417 | { " Cancel "," Abbrechen " }, |
1418 | { "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, | 1418 | { "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, |
1419 | { "Matching items will be removed from list","Passende werden von der Liste entfernt" }, | 1419 | { "Matching items will be removed from list","Passende werden von der Liste entfernt" }, |
1420 | { "Search on displayed list only","Suche auf der dargestellten Liste" }, | 1420 | { "Search on displayed list only","Suche auf der dargestellten Liste" }, |
1421 | { "List will be cleared before search","Liste wird vor der Suche gelöscht" }, | 1421 | { "List will be cleared before search","Liste wird vor der Suche gelöscht" }, |
1422 | { "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, | 1422 | { "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, |
1423 | { "%1\nis running!","%1\nist am Laufen!" }, | 1423 | { "%1\nis running!","%1\nist am Laufen!" }, |
1424 | { "Additional Comment:","Zusätzlicher Kommentar:" }, | 1424 | { "Additional Comment:","Zusätzlicher Kommentar:" }, |
1425 | { "Stop and save","Stopp und Speichern" }, | 1425 | { "Stop and save","Stopp und Speichern" }, |
1426 | { "Continue running","Weiter laufen lassen" }, | 1426 | { "Continue running","Weiter laufen lassen" }, |
1427 | { "Stop - do not save","Stopp - nicht Speichern" }, | 1427 | { "Stop - do not save","Stopp - nicht Speichern" }, |
1428 | { "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, | 1428 | { "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, |
1429 | { "Time mismatch!","Zeiten stimmen nicht!" }, | 1429 | { "Time mismatch!","Zeiten stimmen nicht!" }, |
1430 | { "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, | 1430 | { "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, |
1431 | { "Yes, stop todo","Ja, stoppe Todo" }, | 1431 | { "Yes, stop todo","Ja, stoppe Todo" }, |
1432 | { "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, | 1432 | { "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, |
1433 | { "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, | 1433 | { "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, |
1434 | { "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." }, | 1434 | { "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." }, |
1435 | { "Spouse","Ehegatte" }, | 1435 | { "Spouse","Ehegatte" }, |
1436 | { "Notes","Notizen" }, | 1436 | { "Notes","Notizen" }, |
1437 | { "Messanger","Messanger" }, | 1437 | { "Messanger","Messanger" }, |
1438 | { "Assistant","Assistent" }, | 1438 | { "Assistant","Assistent" }, |
1439 | { "Manager","Manager" }, | 1439 | { "Manager","Manager" }, |
1440 | { "Secrecy","Sichtbar" }, | 1440 | { "Secrecy","Sichtbar" }, |
1441 | { "male","männlich" }, | 1441 | { "male","männlich" }, |
1442 | { "female","weiblich" }, | 1442 | { "female","weiblich" }, |
1443 | { "Hide!","Verbergen!" }, | 1443 | { "Hide!","Verbergen!" }, |
1444 | { "Show!","Anzeigen!" }, | 1444 | { "Show!","Anzeigen!" }, |
1445 | { "Details","Details" }, | 1445 | { "Details","Details" }, |
1446 | { "Profession","Beruf" }, | 1446 | { "Profession","Beruf" }, |
1447 | { "Children","Kinder" }, | 1447 | { "Children","Kinder" }, |
1448 | { "Department","Abteilung" }, | 1448 | { "Department","Abteilung" }, |
1449 | { "Backup cancelled","Backup abgebrochen" }, | 1449 | { "Backup cancelled","Backup abgebrochen" }, |
1450 | { "Backup globally disabled","Backup global abgeschaltet" }, | 1450 | { "Backup globally disabled","Backup global abgeschaltet" }, |
1451 | { "Backup succesfully finished","Backup erfolgreich beendet" }, | 1451 | { "Backup succesfully finished","Backup erfolgreich beendet" }, |
1452 | { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, | 1452 | { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, |
1453 | { "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, | 1453 | { "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, |
1454 | { "Birthdays","Geburtstage" }, | 1454 | { "Birthdays","Geburtstage" }, |
1455 | { "KO/Pi import information!","KO/Pi Import Information!" }, | 1455 | { "KO/Pi import information!","KO/Pi Import Information!" }, |
1456 | { "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, | 1456 | { "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, |
1457 | { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, | 1457 | { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, |
1458 | { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, | 1458 | { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, |
1459 | { "Reload","Neu laden" }, | 1459 | { "Reload","Neu laden" }, |
1460 | { "Timezone settings","Zeitzoneneinstellung" }, | 1460 | { "Timezone settings","Zeitzoneneinstellung" }, |
1461 | { "Title: ","Titel: " }, | 1461 | { "Title: ","Titel: " }, |
1462 | { "Journal from: ","Journal vom: " }, | 1462 | { "Journal from: ","Journal vom: " }, |
1463 | { "Journal: %1 from ","Journal: %1 vom " }, | 1463 | { "Journal: %1 from ","Journal: %1 vom " }, |
1464 | { "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, | 1464 | { "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, |
1465 | { "Selected Item","Ausgewähltes Item" }, | 1465 | { "Selected Item","Ausgewähltes Item" }, |
1466 | { "Select Date...","Wähle Datum..." }, | 1466 | { "Select Date...","Wähle Datum..." }, |
1467 | { "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, | 1467 | { "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, |
1468 | { "Change category list now!","Ändere Kategorieliste jetzt!" }, | 1468 | { "Change category list now!","Ändere Kategorieliste jetzt!" }, |
1469 | { "Edit category list...","Ändere Kategorieliste..." }, | 1469 | { "Edit category list...","Ändere Kategorieliste..." }, |
1470 | { "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, | 1470 | { "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, |
1471 | { "Filepath: ","Dateipfad: " }, | 1471 | { "Filepath: ","Dateipfad: " }, |
1472 | { "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" }, | 1472 | { "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" }, |
1473 | { "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" }, | 1473 | { "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" }, |
1474 | { "Pending Suspend Alarm","Laufender Suspend Alarm" }, | 1474 | { "Pending Suspend Alarm","Laufender Suspend Alarm" }, |
1475 | { "Error loading calendar %1","Fehler beim Laden von Kalender %1" }, | 1475 | { "Error loading calendar %1","Fehler beim Laden von Kalender %1" }, |
1476 | { "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" }, | 1476 | { "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" }, |
1477 | { "Loding of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, | 1477 | { "Loding of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, |
1478 | { "Alarm Options","Alarm Einstellungen" }, | 1478 | { "Alarm Options","Alarm Einstellungen" }, |
1479 | { "Delete selected...","Lösche Ausgewählte..." }, | 1479 | { "Delete selected...","Lösche Ausgewählte..." }, |
1480 | { "None","Nichts" }, | 1480 | { "None","Nichts" }, |
1481 | { "Selection","Auswahl" }, | 1481 | { "Selection","Auswahl" }, |
1482 | { "Set categories","Setze Kategorien" }, | 1482 | { "Set categories","Setze Kategorien" }, |
1483 | { "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" }, | 1483 | { "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" }, |
1484 | { "Reset","Neu setzen" }, | 1484 | { "Reset","Neu setzen" }, |
1485 | { "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" }, | 1485 | { "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" }, |
1486 | { "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" }, | 1486 | { "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" }, |
1487 | { "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" }, | 1487 | { "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" }, |
1488 | { "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" }, | 1488 | { "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" }, |
1489 | { "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, | 1489 | { "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, |
1490 | { "Edit","Edit" }, | 1490 | { "Edit","Edit" }, |
1491 | { "Last Modified","Zuletzt geändert" }, | 1491 | { "Last Modified","Zuletzt geändert" }, |
1492 | { "Journal viewer","Journal Anzeige" }, | 1492 | { "Journal viewer","Journal Anzeige" }, |
1493 | { "Configure Calendar Files...","Konfiguriere Kalenderdateien..." }, | ||
1494 | { "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." }, | ||
1495 | { "","" }, | ||
1496 | { "","" }, | ||
1497 | { "","" }, | ||
1498 | { "","" }, | ||
1499 | { "","" }, | ||
1500 | { "","" }, | ||
1501 | { "","" }, | ||
1493 | { "","" }, | 1502 | { "","" }, |
1494 | { "","" }, | 1503 | { "","" }, |
1495 | { "","" }, | 1504 | { "","" }, |
1496 | { "","" }, | 1505 | { "","" }, |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index ef5c4dd..131a345 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -743,193 +743,196 @@ void KOAgendaView::createDayLabels() | |||
743 | while ( fontPoint > 4 ) { | 743 | while ( fontPoint > 4 ) { |
744 | --fontPoint; | 744 | --fontPoint; |
745 | dlf.setPointSize( fontPoint ); | 745 | dlf.setPointSize( fontPoint ); |
746 | QFontMetrics f( dlf ); | 746 | QFontMetrics f( dlf ); |
747 | wid = f.width( "30" ); | 747 | wid = f.width( "30" ); |
748 | needWid = wid * selCount; | 748 | needWid = wid * selCount; |
749 | if ( needWid < maxWid ) | 749 | if ( needWid < maxWid ) |
750 | break; | 750 | break; |
751 | } | 751 | } |
752 | maxLen = 2; | 752 | maxLen = 2; |
753 | } | 753 | } |
754 | //qDebug("Max len %d ", dayTest.length() ); | 754 | //qDebug("Max len %d ", dayTest.length() ); |
755 | if ( !KOPrefs::instance()->mTimeLabelsFont.bold() ) | 755 | if ( !KOPrefs::instance()->mTimeLabelsFont.bold() ) |
756 | dlf.setBold( false ); | 756 | dlf.setBold( false ); |
757 | QFontMetrics tempF( dlf ); | 757 | QFontMetrics tempF( dlf ); |
758 | newHight = tempF.height(); | 758 | newHight = tempF.height(); |
759 | mDayLabels->setFont( dlf ); | 759 | mDayLabels->setFont( dlf ); |
760 | // mLayoutDayLabels = new QHBoxLayout(mDayLabels);; | 760 | // mLayoutDayLabels = new QHBoxLayout(mDayLabels);; |
761 | // mLayoutDayLabels->addSpacing(mTimeLabels->width()); | 761 | // mLayoutDayLabels->addSpacing(mTimeLabels->width()); |
762 | //mLayoutDayLabels->addSpacing( 2 ); | 762 | //mLayoutDayLabels->addSpacing( 2 ); |
763 | // QFont lFont = dlf; | 763 | // QFont lFont = dlf; |
764 | bool appendLabels = false; | 764 | bool appendLabels = false; |
765 | KOAgendaButton *dayLabel; | 765 | KOAgendaButton *dayLabel; |
766 | dayLabel = mDayLabelsList.first(); | 766 | dayLabel = mDayLabelsList.first(); |
767 | if ( !dayLabel ) { | 767 | if ( !dayLabel ) { |
768 | appendLabels = true; | 768 | appendLabels = true; |
769 | dayLabel = getNewDaylabel(); | 769 | dayLabel = getNewDaylabel(); |
770 | } | 770 | } |
771 | dayLabel->setFixedWidth( mTimeLabels->width()+mAgenda->frameWidth() ); | 771 | dayLabel->setFixedWidth( mTimeLabels->width()+mAgenda->frameWidth() ); |
772 | dayLabel->setFont( dlf ); | 772 | dayLabel->setFont( dlf ); |
773 | dayLabel->setNum( -1 ); | 773 | dayLabel->setNum( -1 ); |
774 | //dayLabel->setAlignment(QLabel::AlignHCenter); | 774 | //dayLabel->setAlignment(QLabel::AlignHCenter); |
775 | 775 | ||
776 | dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); | 776 | dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); |
777 | dayLabel->show(); | 777 | dayLabel->show(); |
778 | DateList::ConstIterator dit; | 778 | DateList::ConstIterator dit; |
779 | bool oneday = (mSelectedDates.first() == mSelectedDates.last() ); | 779 | bool oneday = (mSelectedDates.first() == mSelectedDates.last() ); |
780 | int counter = -1; | 780 | int counter = -1; |
781 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { | 781 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { |
782 | ++counter; | 782 | ++counter; |
783 | QDate date = *dit; | 783 | QDate date = *dit; |
784 | // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels); | 784 | // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels); |
785 | if ( ! appendLabels ) { | 785 | if ( ! appendLabels ) { |
786 | dayLabel = mDayLabelsList.next(); | 786 | dayLabel = mDayLabelsList.next(); |
787 | if ( !dayLabel ) | 787 | if ( !dayLabel ) |
788 | appendLabels = true; | 788 | appendLabels = true; |
789 | } | 789 | } |
790 | if ( appendLabels ) { | 790 | if ( appendLabels ) { |
791 | dayLabel = getNewDaylabel(); | 791 | dayLabel = getNewDaylabel(); |
792 | } | 792 | } |
793 | dayLabel->setMinimumWidth( 1 ); | 793 | dayLabel->setMinimumWidth( 1 ); |
794 | dayLabel->setMaximumWidth( 10240 ); | 794 | dayLabel->setMaximumWidth( 10240 ); |
795 | dayLabel->setFont( dlf ); | 795 | dayLabel->setFont( dlf ); |
796 | dayLabel->show(); | 796 | dayLabel->show(); |
797 | dayLabel->setAutoRepeat( false ); | 797 | dayLabel->setAutoRepeat( false ); |
798 | dayLabel->setNum( counter ); | 798 | dayLabel->setNum( counter ); |
799 | QString str; | 799 | QString str; |
800 | int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date); | 800 | int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date); |
801 | QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true ); | 801 | QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true ); |
802 | switch ( maxLen ) { | 802 | switch ( maxLen ) { |
803 | case 2: | 803 | case 2: |
804 | str = QString::number( date.day() ); | 804 | str = QString::number( date.day() ); |
805 | break; | 805 | break; |
806 | 806 | ||
807 | case 3: | 807 | case 3: |
808 | str = dayName.left( 1 ) +QString::number( date.day()); | 808 | str = dayName.left( 1 ) +QString::number( date.day()); |
809 | 809 | ||
810 | break; | 810 | break; |
811 | case 4: | 811 | case 4: |
812 | str = dayName.left( 1 ) + " " +QString::number( date.day()); | 812 | str = dayName.left( 1 ) + " " +QString::number( date.day()); |
813 | 813 | ||
814 | break; | 814 | break; |
815 | case 5: | 815 | case 5: |
816 | str = dayName.left( 2 ) + " " +QString::number( date.day()); | 816 | str = dayName.left( 2 ) + " " +QString::number( date.day()); |
817 | 817 | ||
818 | break; | 818 | break; |
819 | case 6: | 819 | case 6: |
820 | str = dayName.left( 3 ) + " " +QString::number( date.day()); | 820 | str = dayName.left( 3 ) + " " +QString::number( date.day()); |
821 | break; | 821 | break; |
822 | 822 | ||
823 | default: | 823 | default: |
824 | break; | 824 | break; |
825 | } | 825 | } |
826 | if ( oneday ) { | 826 | if ( oneday ) { |
827 | QString addString; | 827 | QString addString; |
828 | if ( mSelectedDates.first() == QDateTime::currentDateTime().date() ) | 828 | if ( mSelectedDates.first() == QDateTime::currentDateTime().date() ) |
829 | addString = i18n("Today"); | 829 | addString = i18n("Today"); |
830 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(1) ) | 830 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(1) ) |
831 | addString = i18n("Tomorrow"); | 831 | addString = i18n("Tomorrow"); |
832 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) ) | 832 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) ) |
833 | addString = i18n("Yesterday"); | 833 | addString = i18n("Yesterday"); |
834 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) ) | 834 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) ) |
835 | addString = i18n("Day before yesterday"); | 835 | addString = i18n("Day before yesterday"); |
836 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) ) | 836 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) ) |
837 | addString = i18n("Day after tomorrow"); | 837 | addString = i18n("Day after tomorrow"); |
838 | if ( !addString.isEmpty() ) { | 838 | if ( !addString.isEmpty() ) { |
839 | str = addString+", " + str; | 839 | if ( QApplication::desktop()->width() < 640 ) |
840 | str = addString+", " + str; | ||
841 | else | ||
842 | str = addString+", "+ KGlobal::locale()->formatDate( date, false); | ||
840 | } else { | 843 | } else { |
841 | str = KGlobal::locale()->formatDate( date, KOPrefs::instance()->mShortDateInViewer); | 844 | str = KGlobal::locale()->formatDate( date, KOPrefs::instance()->mShortDateInViewer); |
842 | } | 845 | } |
843 | } | 846 | } |
844 | dayLabel->setText(str); | 847 | dayLabel->setText(str); |
845 | //dayLabel->setAlignment(QLabel::AlignHCenter); | 848 | //dayLabel->setAlignment(QLabel::AlignHCenter); |
846 | if (date == QDate::currentDate()) { | 849 | if (date == QDate::currentDate()) { |
847 | QFont bFont = dlf; | 850 | QFont bFont = dlf; |
848 | bFont.setBold( true ); | 851 | bFont.setBold( true ); |
849 | dayLabel->setFont(bFont); | 852 | dayLabel->setFont(bFont); |
850 | } | 853 | } |
851 | //dayLayout->addWidget(dayLabel); | 854 | //dayLayout->addWidget(dayLabel); |
852 | 855 | ||
853 | #ifndef KORG_NOPLUGINS | 856 | #ifndef KORG_NOPLUGINS |
854 | CalendarDecoration::List cds = KOCore::self()->calendarDecorations(); | 857 | CalendarDecoration::List cds = KOCore::self()->calendarDecorations(); |
855 | CalendarDecoration *it; | 858 | CalendarDecoration *it; |
856 | for(it = cds.first(); it; it = cds.next()) { | 859 | for(it = cds.first(); it; it = cds.next()) { |
857 | QString text = it->shortText( date ); | 860 | QString text = it->shortText( date ); |
858 | if ( !text.isEmpty() ) { | 861 | if ( !text.isEmpty() ) { |
859 | QLabel *label = new QLabel(text,mDayLabels); | 862 | QLabel *label = new QLabel(text,mDayLabels); |
860 | label->setAlignment(AlignCenter); | 863 | label->setAlignment(AlignCenter); |
861 | dayLayout->addWidget(label); | 864 | dayLayout->addWidget(label); |
862 | } | 865 | } |
863 | } | 866 | } |
864 | 867 | ||
865 | for(it = cds.first(); it; it = cds.next()) { | 868 | for(it = cds.first(); it; it = cds.next()) { |
866 | QWidget *wid = it->smallWidget(mDayLabels,date); | 869 | QWidget *wid = it->smallWidget(mDayLabels,date); |
867 | if ( wid ) { | 870 | if ( wid ) { |
868 | // wid->setHeight(20); | 871 | // wid->setHeight(20); |
869 | dayLayout->addWidget(wid); | 872 | dayLayout->addWidget(wid); |
870 | } | 873 | } |
871 | } | 874 | } |
872 | #endif | 875 | #endif |
873 | } | 876 | } |
874 | if ( ! appendLabels ) { | 877 | if ( ! appendLabels ) { |
875 | dayLabel = mDayLabelsList.next(); | 878 | dayLabel = mDayLabelsList.next(); |
876 | if ( !dayLabel ) | 879 | if ( !dayLabel ) |
877 | appendLabels = true; | 880 | appendLabels = true; |
878 | } | 881 | } |
879 | if ( appendLabels ) { | 882 | if ( appendLabels ) { |
880 | dayLabel = getNewDaylabel(); | 883 | dayLabel = getNewDaylabel(); |
881 | } | 884 | } |
882 | //dayLabel->hide();//test only | 885 | //dayLabel->hide();//test only |
883 | 886 | ||
884 | dayLabel->setText(">"); | 887 | dayLabel->setText(">"); |
885 | dayLabel->setFont( dlf ); | 888 | dayLabel->setFont( dlf ); |
886 | dayLabel->setAutoRepeat( true ); | 889 | dayLabel->setAutoRepeat( true ); |
887 | dayLabel->show(); | 890 | dayLabel->show(); |
888 | dayLabel->setNum( -2 ); | 891 | dayLabel->setNum( -2 ); |
889 | dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ widModulo ); | 892 | dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ widModulo ); |
890 | 893 | ||
891 | //mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2); | 894 | //mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2); |
892 | if ( !appendLabels ) { | 895 | if ( !appendLabels ) { |
893 | dayLabel = mDayLabelsList.next(); | 896 | dayLabel = mDayLabelsList.next(); |
894 | while ( dayLabel ) { | 897 | while ( dayLabel ) { |
895 | //qDebug("!dayLabel %d",dayLabel ); | 898 | //qDebug("!dayLabel %d",dayLabel ); |
896 | dayLabel->hide(); | 899 | dayLabel->hide(); |
897 | dayLabel = mDayLabelsList.next(); | 900 | dayLabel = mDayLabelsList.next(); |
898 | } | 901 | } |
899 | } | 902 | } |
900 | 903 | ||
901 | mDayLabelsFrame->setFixedHeight( newHight + 4 ); | 904 | mDayLabelsFrame->setFixedHeight( newHight + 4 ); |
902 | } | 905 | } |
903 | 906 | ||
904 | int KOAgendaView::maxDatesHint() | 907 | int KOAgendaView::maxDatesHint() |
905 | { | 908 | { |
906 | // Not sure about the max number of events, so return 0 for now. | 909 | // Not sure about the max number of events, so return 0 for now. |
907 | return 0; | 910 | return 0; |
908 | } | 911 | } |
909 | 912 | ||
910 | int KOAgendaView::currentDateCount() | 913 | int KOAgendaView::currentDateCount() |
911 | { | 914 | { |
912 | return mSelectedDates.count(); | 915 | return mSelectedDates.count(); |
913 | } | 916 | } |
914 | 917 | ||
915 | QPtrList<Incidence> KOAgendaView::selectedIncidences() | 918 | QPtrList<Incidence> KOAgendaView::selectedIncidences() |
916 | { | 919 | { |
917 | QPtrList<Incidence> selected; | 920 | QPtrList<Incidence> selected; |
918 | Incidence *incidence; | 921 | Incidence *incidence; |
919 | 922 | ||
920 | incidence = mAgenda->selectedIncidence(); | 923 | incidence = mAgenda->selectedIncidence(); |
921 | if (incidence) selected.append(incidence); | 924 | if (incidence) selected.append(incidence); |
922 | 925 | ||
923 | incidence = mAllDayAgenda->selectedIncidence(); | 926 | incidence = mAllDayAgenda->selectedIncidence(); |
924 | if (incidence) selected.append(incidence); | 927 | if (incidence) selected.append(incidence); |
925 | 928 | ||
926 | return selected; | 929 | return selected; |
927 | } | 930 | } |
928 | 931 | ||
929 | DateList KOAgendaView::selectedDates() | 932 | DateList KOAgendaView::selectedDates() |
930 | { | 933 | { |
931 | DateList selected; | 934 | DateList selected; |
932 | QDate qd; | 935 | QDate qd; |
933 | 936 | ||
934 | qd = mAgenda->selectedIncidenceDate(); | 937 | qd = mAgenda->selectedIncidenceDate(); |
935 | if (qd.isValid()) selected.append(qd); | 938 | if (qd.isValid()) selected.append(qd); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index cbf6096..e960424 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -926,193 +926,196 @@ void MainWindow::initActions() | |||
926 | mView->viewManager(), SLOT( showJournalView() ) ); | 926 | mView->viewManager(), SLOT( showJournalView() ) ); |
927 | 927 | ||
928 | 928 | ||
929 | icon = loadPixmap( pathString + "day" ); | 929 | icon = loadPixmap( pathString + "day" ); |
930 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); | 930 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); |
931 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); | 931 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); |
932 | day1_action->addTo( viewMenu ); | 932 | day1_action->addTo( viewMenu ); |
933 | // action->addTo( toolBar ); | 933 | // action->addTo( toolBar ); |
934 | connect( day1_action, SIGNAL( activated() ), | 934 | connect( day1_action, SIGNAL( activated() ), |
935 | mView->viewManager(), SLOT( showDayView() ) ); | 935 | mView->viewManager(), SLOT( showDayView() ) ); |
936 | 936 | ||
937 | icon = loadPixmap( pathString + "workweek" ); | 937 | icon = loadPixmap( pathString + "workweek" ); |
938 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); | 938 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); |
939 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); | 939 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); |
940 | day5_action->addTo( viewMenu ); | 940 | day5_action->addTo( viewMenu ); |
941 | connect( day5_action, SIGNAL( activated() ), | 941 | connect( day5_action, SIGNAL( activated() ), |
942 | mView->viewManager(), SLOT( showWorkWeekView() ) ); | 942 | mView->viewManager(), SLOT( showWorkWeekView() ) ); |
943 | 943 | ||
944 | icon = loadPixmap( pathString + "week" ); | 944 | icon = loadPixmap( pathString + "week" ); |
945 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); | 945 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); |
946 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); | 946 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); |
947 | day7_action->addTo( viewMenu ); | 947 | day7_action->addTo( viewMenu ); |
948 | connect( day7_action, SIGNAL( activated() ), | 948 | connect( day7_action, SIGNAL( activated() ), |
949 | mView->viewManager(), SLOT( showWeekView() ) ); | 949 | mView->viewManager(), SLOT( showWeekView() ) ); |
950 | 950 | ||
951 | icon = loadPixmap( pathString + "workweek2" ); | 951 | icon = loadPixmap( pathString + "workweek2" ); |
952 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); | 952 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); |
953 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); | 953 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); |
954 | day6_action->addTo( viewMenu ); | 954 | day6_action->addTo( viewMenu ); |
955 | connect( day6_action, SIGNAL( activated() ), | 955 | connect( day6_action, SIGNAL( activated() ), |
956 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); | 956 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); |
957 | 957 | ||
958 | icon = loadPixmap( pathString + "month" ); | 958 | icon = loadPixmap( pathString + "month" ); |
959 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); | 959 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); |
960 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); | 960 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); |
961 | month_action->addTo( viewMenu ); | 961 | month_action->addTo( viewMenu ); |
962 | connect( month_action, SIGNAL( activated() ), | 962 | connect( month_action, SIGNAL( activated() ), |
963 | mView->viewManager(), SLOT( showMonthView() ) ); | 963 | mView->viewManager(), SLOT( showMonthView() ) ); |
964 | 964 | ||
965 | icon = loadPixmap( pathString + "list" ); | 965 | icon = loadPixmap( pathString + "list" ); |
966 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); | 966 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); |
967 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); | 967 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); |
968 | showlist_action->addTo( viewMenu ); | 968 | showlist_action->addTo( viewMenu ); |
969 | connect( showlist_action, SIGNAL( activated() ), | 969 | connect( showlist_action, SIGNAL( activated() ), |
970 | mView->viewManager(), SLOT( showListView() ) ); | 970 | mView->viewManager(), SLOT( showListView() ) ); |
971 | 971 | ||
972 | icon = loadPixmap( pathString + "todo" ); | 972 | icon = loadPixmap( pathString + "todo" ); |
973 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); | 973 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); |
974 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); | 974 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); |
975 | todoview_action->addTo( viewMenu ); | 975 | todoview_action->addTo( viewMenu ); |
976 | connect( todoview_action, SIGNAL( activated() ), | 976 | connect( todoview_action, SIGNAL( activated() ), |
977 | mView->viewManager(), SLOT( showTodoView() ) ); | 977 | mView->viewManager(), SLOT( showTodoView() ) ); |
978 | 978 | ||
979 | 979 | ||
980 | 980 | ||
981 | #if 0 | 981 | #if 0 |
982 | action = new QAction( "view_timespan", "Time Span", 0, this ); | 982 | action = new QAction( "view_timespan", "Time Span", 0, this ); |
983 | action->addTo( viewMenu ); | 983 | action->addTo( viewMenu ); |
984 | connect( action, SIGNAL( activated() ), | 984 | connect( action, SIGNAL( activated() ), |
985 | mView->viewManager(), SLOT( showTimeSpanView() ) ); | 985 | mView->viewManager(), SLOT( showTimeSpanView() ) ); |
986 | #endif | 986 | #endif |
987 | 987 | ||
988 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, | 988 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, |
989 | this ); | 989 | this ); |
990 | mNewSubTodoAction->addTo( actionMenu ); | 990 | mNewSubTodoAction->addTo( actionMenu ); |
991 | connect( mNewSubTodoAction, SIGNAL( activated() ), | 991 | connect( mNewSubTodoAction, SIGNAL( activated() ), |
992 | mView, SLOT( newSubTodo() ) ); | 992 | mView, SLOT( newSubTodo() ) ); |
993 | 993 | ||
994 | action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, | 994 | action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, |
995 | this ); | 995 | this ); |
996 | action->addTo( actionMenu ); | 996 | action->addTo( actionMenu ); |
997 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); | 997 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); |
998 | 998 | ||
999 | 999 | ||
1000 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); | 1000 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); |
1001 | 1001 | ||
1002 | 1002 | ||
1003 | 1003 | ||
1004 | actionMenu->insertSeparator(); | 1004 | actionMenu->insertSeparator(); |
1005 | action = new QAction( "manage cat", i18n("Edit category list..."), 0, | 1005 | action = new QAction( "manage cat", i18n("Edit category list..."), 0, |
1006 | this ); | 1006 | this ); |
1007 | action->addTo( actionMenu ); | 1007 | action->addTo( actionMenu ); |
1008 | connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); | 1008 | connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); |
1009 | 1009 | ||
1010 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, | 1010 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, |
1011 | this ); | 1011 | this ); |
1012 | action->addTo( actionMenu ); | 1012 | action->addTo( actionMenu ); |
1013 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); | 1013 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); |
1014 | 1014 | ||
1015 | 1015 | ||
1016 | actionMenu->insertSeparator(); | 1016 | actionMenu->insertSeparator(); |
1017 | icon = loadPixmap( pathString + "configure" ); | 1017 | icon = loadPixmap( pathString + "configure" ); |
1018 | action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); | 1018 | action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); |
1019 | action->addTo( actionMenu ); | 1019 | action->addTo( actionMenu ); |
1020 | connect( action, SIGNAL( activated() ), | 1020 | connect( action, SIGNAL( activated() ), |
1021 | mView, SLOT( edit_options() ) ); | 1021 | mView, SLOT( edit_options() ) ); |
1022 | icon = loadPixmap( pathString + "configure" ); | 1022 | action = new QAction( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this ); |
1023 | action->addTo( actionMenu ); | ||
1024 | connect( action, SIGNAL( activated() ), | ||
1025 | this, SLOT( calHint() ) ); | ||
1023 | action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); | 1026 | action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); |
1024 | action->addTo( actionMenu ); | 1027 | action->addTo( actionMenu ); |
1025 | connect( action, SIGNAL( activated() ), | 1028 | connect( action, SIGNAL( activated() ), |
1026 | mView, SLOT( edit_global_options() ) ); | 1029 | mView, SLOT( edit_global_options() ) ); |
1027 | if ( KOPrefs::instance()->mShowFullMenu ) { | 1030 | if ( KOPrefs::instance()->mShowFullMenu ) { |
1028 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); | 1031 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); |
1029 | 1032 | ||
1030 | } | 1033 | } |
1031 | // actionMenu->insertSeparator(); | 1034 | // actionMenu->insertSeparator(); |
1032 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, | 1035 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, |
1033 | this ); | 1036 | this ); |
1034 | action->addTo( importMenu_X ); | 1037 | action->addTo( importMenu_X ); |
1035 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); | 1038 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); |
1036 | action = new QAction( "import_quick", i18n("Import last file"), 0, | 1039 | action = new QAction( "import_quick", i18n("Import last file"), 0, |
1037 | this ); | 1040 | this ); |
1038 | action->addTo( importMenu_X ); | 1041 | action->addTo( importMenu_X ); |
1039 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); | 1042 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); |
1040 | importMenu_X->insertSeparator(); | 1043 | importMenu_X->insertSeparator(); |
1041 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, | 1044 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, |
1042 | this ); | 1045 | this ); |
1043 | action->addTo( importMenu_X ); | 1046 | action->addTo( importMenu_X ); |
1044 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); | 1047 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); |
1045 | //#ifndef DESKTOP_VERSION | 1048 | //#ifndef DESKTOP_VERSION |
1046 | importMenu_X->insertSeparator(); | 1049 | importMenu_X->insertSeparator(); |
1047 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, | 1050 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, |
1048 | this ); | 1051 | this ); |
1049 | action->addTo( importMenu_X ); | 1052 | action->addTo( importMenu_X ); |
1050 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); | 1053 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); |
1051 | //#else | 1054 | //#else |
1052 | #ifdef _OL_IMPORT_ | 1055 | #ifdef _OL_IMPORT_ |
1053 | importMenu_X->insertSeparator(); | 1056 | importMenu_X->insertSeparator(); |
1054 | action = new QAction( "import_ol", i18n("Import from OL"), 0, | 1057 | action = new QAction( "import_ol", i18n("Import from OL"), 0, |
1055 | this ); | 1058 | this ); |
1056 | action->addTo( importMenu_X ); | 1059 | action->addTo( importMenu_X ); |
1057 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); | 1060 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); |
1058 | #endif | 1061 | #endif |
1059 | //#endif | 1062 | //#endif |
1060 | 1063 | ||
1061 | //importMenu->insertSeparator(); | 1064 | //importMenu->insertSeparator(); |
1062 | #if 0 | 1065 | #if 0 |
1063 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, | 1066 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, |
1064 | this ); | 1067 | this ); |
1065 | action->addTo( importMenu ); | 1068 | action->addTo( importMenu ); |
1066 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); | 1069 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); |
1067 | #endif | 1070 | #endif |
1068 | action = new QAction( "save_cal", i18n("Save Backup..."), 0, | 1071 | action = new QAction( "save_cal", i18n("Save Backup..."), 0, |
1069 | this ); | 1072 | this ); |
1070 | action->addTo( importMenu ); | 1073 | action->addTo( importMenu ); |
1071 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); | 1074 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); |
1072 | importMenu->insertSeparator(); | 1075 | importMenu->insertSeparator(); |
1073 | importMenu->insertItem( i18n("Import"), importMenu_X ); | 1076 | importMenu->insertItem( i18n("Import"), importMenu_X ); |
1074 | //importMenu->insertSeparator(); | 1077 | //importMenu->insertSeparator(); |
1075 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, | 1078 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, |
1076 | this ); | 1079 | this ); |
1077 | action->addTo( exportMenu_X ); | 1080 | action->addTo( exportMenu_X ); |
1078 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); | 1081 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); |
1079 | 1082 | ||
1080 | 1083 | ||
1081 | //LR | 1084 | //LR |
1082 | QPopupMenu *ex2phone = new QPopupMenu( this ); | 1085 | QPopupMenu *ex2phone = new QPopupMenu( this ); |
1083 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 1086 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
1084 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 1087 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
1085 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); | 1088 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); |
1086 | exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); | 1089 | exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); |
1087 | 1090 | ||
1088 | importMenu->insertItem( i18n("Export"), exportMenu_X ); | 1091 | importMenu->insertItem( i18n("Export"), exportMenu_X ); |
1089 | #ifndef DESKTOP_VERSION | 1092 | #ifndef DESKTOP_VERSION |
1090 | //importMenu->insertSeparator(); | 1093 | //importMenu->insertSeparator(); |
1091 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, | 1094 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, |
1092 | this ); | 1095 | this ); |
1093 | brAction->addTo( beamMenu_X ); | 1096 | brAction->addTo( beamMenu_X ); |
1094 | brAction->setToggleAction (true ) ; | 1097 | brAction->setToggleAction (true ) ; |
1095 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); | 1098 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); |
1096 | 1099 | ||
1097 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, | 1100 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, |
1098 | this ); | 1101 | this ); |
1099 | action->addTo( beamMenu_X ); | 1102 | action->addTo( beamMenu_X ); |
1100 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); | 1103 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); |
1101 | 1104 | ||
1102 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, | 1105 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, |
1103 | this ); | 1106 | this ); |
1104 | action->addTo( beamMenu_X ); | 1107 | action->addTo( beamMenu_X ); |
1105 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); | 1108 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); |
1106 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); | 1109 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); |
1107 | #else | 1110 | #else |
1108 | //importMenu->insertSeparator(); | 1111 | //importMenu->insertSeparator(); |
1109 | icon = loadPixmap( pathString + "print" ); | 1112 | icon = loadPixmap( pathString + "print" ); |
1110 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); | 1113 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); |
1111 | action->addTo( beamMenu_X ); | 1114 | action->addTo( beamMenu_X ); |
1112 | connect( action, SIGNAL( activated() ), | 1115 | connect( action, SIGNAL( activated() ), |
1113 | this, SLOT( printCal() ) ); | 1116 | this, SLOT( printCal() ) ); |
1114 | 1117 | ||
1115 | icon = loadPixmap( pathString + "print" ); | 1118 | icon = loadPixmap( pathString + "print" ); |
1116 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); | 1119 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); |
1117 | action->addTo( beamMenu_X ); | 1120 | action->addTo( beamMenu_X ); |
1118 | connect( action, SIGNAL( activated() ), | 1121 | connect( action, SIGNAL( activated() ), |
@@ -1267,193 +1270,198 @@ void MainWindow::initActions() | |||
1267 | today_action->addTo( navigatorToolBar ); | 1270 | today_action->addTo( navigatorToolBar ); |
1268 | icon = loadPixmap( pathString + "1rightarrowB" ); | 1271 | icon = loadPixmap( pathString + "1rightarrowB" ); |
1269 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); | 1272 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); |
1270 | if (p-> mShowIconForward) { | 1273 | if (p-> mShowIconForward) { |
1271 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); | 1274 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); |
1272 | connect( action, SIGNAL( activated() ), | 1275 | connect( action, SIGNAL( activated() ), |
1273 | mView, SLOT( goNext() ) ); | 1276 | mView, SLOT( goNext() ) ); |
1274 | action->addTo( navigatorToolBar ); | 1277 | action->addTo( navigatorToolBar ); |
1275 | } | 1278 | } |
1276 | icon = loadPixmap( pathString + "2rightarrowB" ); | 1279 | icon = loadPixmap( pathString + "2rightarrowB" ); |
1277 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); | 1280 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); |
1278 | if (p-> mShowIconForwardFast) { | 1281 | if (p-> mShowIconForwardFast) { |
1279 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); | 1282 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); |
1280 | connect( action, SIGNAL( activated() ), | 1283 | connect( action, SIGNAL( activated() ), |
1281 | mView, SLOT( goNextMonth() ) ); | 1284 | mView, SLOT( goNextMonth() ) ); |
1282 | action->addTo( navigatorToolBar ); | 1285 | action->addTo( navigatorToolBar ); |
1283 | } | 1286 | } |
1284 | 1287 | ||
1285 | 1288 | ||
1286 | configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); | 1289 | configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); |
1287 | 1290 | ||
1288 | 1291 | ||
1289 | if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); | 1292 | if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); |
1290 | if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); | 1293 | if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); |
1291 | if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); | 1294 | if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); |
1292 | if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); | 1295 | if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); |
1293 | 1296 | ||
1294 | if (p-> mShowIconNewEvent) | 1297 | if (p-> mShowIconNewEvent) |
1295 | configureToolBarMenu->setItemChecked( 10, true ); | 1298 | configureToolBarMenu->setItemChecked( 10, true ); |
1296 | if (p->mShowIconNewTodo ) | 1299 | if (p->mShowIconNewTodo ) |
1297 | configureToolBarMenu->setItemChecked( 20, true ); | 1300 | configureToolBarMenu->setItemChecked( 20, true ); |
1298 | if (p-> mShowIconSearch) | 1301 | if (p-> mShowIconSearch) |
1299 | configureToolBarMenu->setItemChecked( 120, true ); | 1302 | configureToolBarMenu->setItemChecked( 120, true ); |
1300 | if (p-> mShowIconList) | 1303 | if (p-> mShowIconList) |
1301 | configureToolBarMenu->setItemChecked( 30, true ); | 1304 | configureToolBarMenu->setItemChecked( 30, true ); |
1302 | if (p-> mShowIconDay1) | 1305 | if (p-> mShowIconDay1) |
1303 | configureToolBarMenu->setItemChecked( 40, true ); | 1306 | configureToolBarMenu->setItemChecked( 40, true ); |
1304 | if (p-> mShowIconDay5) | 1307 | if (p-> mShowIconDay5) |
1305 | configureToolBarMenu->setItemChecked( 50, true ); | 1308 | configureToolBarMenu->setItemChecked( 50, true ); |
1306 | if (p-> mShowIconDay6) | 1309 | if (p-> mShowIconDay6) |
1307 | configureToolBarMenu->setItemChecked( 75, true ); | 1310 | configureToolBarMenu->setItemChecked( 75, true ); |
1308 | if (p-> mShowIconDay7) | 1311 | if (p-> mShowIconDay7) |
1309 | configureToolBarMenu->setItemChecked( 60, true ); | 1312 | configureToolBarMenu->setItemChecked( 60, true ); |
1310 | if (p-> mShowIconMonth) | 1313 | if (p-> mShowIconMonth) |
1311 | configureToolBarMenu->setItemChecked( 70, true ); | 1314 | configureToolBarMenu->setItemChecked( 70, true ); |
1312 | if (p-> mShowIconTodoview) | 1315 | if (p-> mShowIconTodoview) |
1313 | configureToolBarMenu->setItemChecked( 80, true ); | 1316 | configureToolBarMenu->setItemChecked( 80, true ); |
1314 | if (p-> mShowIconBackFast) | 1317 | if (p-> mShowIconBackFast) |
1315 | configureToolBarMenu->setItemChecked( 200, true ); | 1318 | configureToolBarMenu->setItemChecked( 200, true ); |
1316 | if (p-> mShowIconBack) | 1319 | if (p-> mShowIconBack) |
1317 | configureToolBarMenu->setItemChecked( 210, true ); | 1320 | configureToolBarMenu->setItemChecked( 210, true ); |
1318 | if (p-> mShowIconToday) | 1321 | if (p-> mShowIconToday) |
1319 | configureToolBarMenu->setItemChecked( 130, true ); | 1322 | configureToolBarMenu->setItemChecked( 130, true ); |
1320 | if (p-> mShowIconForward) | 1323 | if (p-> mShowIconForward) |
1321 | configureToolBarMenu->setItemChecked( 220, true ); | 1324 | configureToolBarMenu->setItemChecked( 220, true ); |
1322 | if (p-> mShowIconForwardFast) | 1325 | if (p-> mShowIconForwardFast) |
1323 | configureToolBarMenu->setItemChecked( 230, true ); | 1326 | configureToolBarMenu->setItemChecked( 230, true ); |
1324 | if (p-> mShowIconNextDays) | 1327 | if (p-> mShowIconNextDays) |
1325 | configureToolBarMenu->setItemChecked( 100, true ); | 1328 | configureToolBarMenu->setItemChecked( 100, true ); |
1326 | if (p-> mShowIconNext) | 1329 | if (p-> mShowIconNext) |
1327 | configureToolBarMenu->setItemChecked( 110, true ); | 1330 | configureToolBarMenu->setItemChecked( 110, true ); |
1328 | if (p-> mShowIconJournal) | 1331 | if (p-> mShowIconJournal) |
1329 | configureToolBarMenu->setItemChecked( 90, true ); | 1332 | configureToolBarMenu->setItemChecked( 90, true ); |
1330 | if (p-> mShowIconWhatsThis) | 1333 | if (p-> mShowIconWhatsThis) |
1331 | configureToolBarMenu->setItemChecked( 300, true ); | 1334 | configureToolBarMenu->setItemChecked( 300, true ); |
1332 | if (p-> mShowIconWeekNum) | 1335 | if (p-> mShowIconWeekNum) |
1333 | configureToolBarMenu->setItemChecked( 400, true ); | 1336 | configureToolBarMenu->setItemChecked( 400, true ); |
1334 | if (!p-> mShowIconStretch) { | 1337 | if (!p-> mShowIconStretch) { |
1335 | QLabel* dummy = new QLabel( iconToolBar ); | 1338 | QLabel* dummy = new QLabel( iconToolBar ); |
1336 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); | 1339 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); |
1337 | dummy->setMinimumWidth( 0 ); | 1340 | dummy->setMinimumWidth( 0 ); |
1338 | iconToolBar->setStretchableWidget ( dummy ) ; | 1341 | iconToolBar->setStretchableWidget ( dummy ) ; |
1339 | } | 1342 | } |
1340 | else { | 1343 | else { |
1341 | iconToolBar->setHorizontalStretchable (true ); | 1344 | iconToolBar->setHorizontalStretchable (true ); |
1342 | viewToolBar->setHorizontalStretchable (true ); | 1345 | viewToolBar->setHorizontalStretchable (true ); |
1343 | navigatorToolBar->setHorizontalStretchable (true ); | 1346 | navigatorToolBar->setHorizontalStretchable (true ); |
1344 | iconToolBar->setVerticalStretchable (true ); | 1347 | iconToolBar->setVerticalStretchable (true ); |
1345 | viewToolBar->setVerticalStretchable (true ); | 1348 | viewToolBar->setVerticalStretchable (true ); |
1346 | navigatorToolBar->setVerticalStretchable (true ); | 1349 | navigatorToolBar->setVerticalStretchable (true ); |
1347 | configureToolBarMenu->setItemChecked( 5, true ); | 1350 | configureToolBarMenu->setItemChecked( 5, true ); |
1348 | } | 1351 | } |
1349 | if (p-> mShowIconFilter) | 1352 | if (p-> mShowIconFilter) |
1350 | configureToolBarMenu->setItemChecked( 7, true ); | 1353 | configureToolBarMenu->setItemChecked( 7, true ); |
1351 | if (p-> mShowIconOnetoolbar) | 1354 | if (p-> mShowIconOnetoolbar) |
1352 | configureToolBarMenu->setItemChecked( 6, true ); | 1355 | configureToolBarMenu->setItemChecked( 6, true ); |
1353 | 1356 | ||
1354 | 1357 | ||
1355 | if ( filterMenubar ) { | 1358 | if ( filterMenubar ) { |
1356 | filterMenubar->reparent(filterToolBar,0,QPoint(0,0) ); | 1359 | filterMenubar->reparent(filterToolBar,0,QPoint(0,0) ); |
1357 | connect( mView, SIGNAL( filtersUpdated() ), SLOT( updateFilterToolbar() ) ); | 1360 | connect( mView, SIGNAL( filtersUpdated() ), SLOT( updateFilterToolbar() ) ); |
1358 | } | 1361 | } |
1359 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); | 1362 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); |
1360 | configureAgenda( p->mHourSize ); | 1363 | configureAgenda( p->mHourSize ); |
1361 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); | 1364 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); |
1362 | } | 1365 | } |
1363 | 1366 | void MainWindow::calHint() | |
1367 | { | ||
1368 | QString message = i18n("You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>."); | ||
1369 | |||
1370 | KMessageBox::information( this, message); | ||
1371 | } | ||
1364 | void MainWindow::exportToPhone( int mode ) | 1372 | void MainWindow::exportToPhone( int mode ) |
1365 | { | 1373 | { |
1366 | 1374 | ||
1367 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 1375 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
1368 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 1376 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
1369 | KOex2phonePrefs ex2phone; | 1377 | KOex2phonePrefs ex2phone; |
1370 | 1378 | ||
1371 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); | 1379 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); |
1372 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); | 1380 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); |
1373 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1381 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1374 | if ( mode == 1 ) | 1382 | if ( mode == 1 ) |
1375 | ex2phone.setCaption(i18n("Export complete calendar")); | 1383 | ex2phone.setCaption(i18n("Export complete calendar")); |
1376 | if ( mode == 2 ) | 1384 | if ( mode == 2 ) |
1377 | ex2phone.setCaption(i18n("Export filtered calendar")); | 1385 | ex2phone.setCaption(i18n("Export filtered calendar")); |
1378 | 1386 | ||
1379 | if ( !ex2phone.exec() ) { | 1387 | if ( !ex2phone.exec() ) { |
1380 | return; | 1388 | return; |
1381 | } | 1389 | } |
1382 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); | 1390 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); |
1383 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); | 1391 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); |
1384 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); | 1392 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); |
1385 | 1393 | ||
1386 | int inFuture = 0; | 1394 | int inFuture = 0; |
1387 | if ( ex2phone.mWriteBackFuture->isChecked() ) | 1395 | if ( ex2phone.mWriteBackFuture->isChecked() ) |
1388 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); | 1396 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); |
1389 | QPtrList<Incidence> delSel; | 1397 | QPtrList<Incidence> delSel; |
1390 | if ( mode == 1 ) | 1398 | if ( mode == 1 ) |
1391 | delSel = mCalendar->rawIncidences(); | 1399 | delSel = mCalendar->rawIncidences(); |
1392 | if ( mode == 2 ) | 1400 | if ( mode == 2 ) |
1393 | delSel = mCalendar->incidences(); | 1401 | delSel = mCalendar->incidences(); |
1394 | CalendarLocal* cal = new CalendarLocal(); | 1402 | CalendarLocal* cal = new CalendarLocal(); |
1395 | cal->setLocalTime(); | 1403 | cal->setLocalTime(); |
1396 | Incidence *incidence = delSel.first(); | 1404 | Incidence *incidence = delSel.first(); |
1397 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); | 1405 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); |
1398 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); | 1406 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); |
1399 | while ( incidence ) { | 1407 | while ( incidence ) { |
1400 | if ( incidence->typeID() != journalID ) { | 1408 | if ( incidence->typeID() != journalID ) { |
1401 | bool add = true; | 1409 | bool add = true; |
1402 | if ( inFuture ) { | 1410 | if ( inFuture ) { |
1403 | QDateTime dt; | 1411 | QDateTime dt; |
1404 | if ( incidence->typeID() == todoID ) { | 1412 | if ( incidence->typeID() == todoID ) { |
1405 | Todo * t = (Todo*)incidence; | 1413 | Todo * t = (Todo*)incidence; |
1406 | if ( t->hasDueDate() ) | 1414 | if ( t->hasDueDate() ) |
1407 | dt = t->dtDue(); | 1415 | dt = t->dtDue(); |
1408 | else | 1416 | else |
1409 | dt = cur.addSecs( 62 ); | 1417 | dt = cur.addSecs( 62 ); |
1410 | } | 1418 | } |
1411 | else { | 1419 | else { |
1412 | bool ok; | 1420 | bool ok; |
1413 | dt = incidence->getNextOccurence( cur, &ok ); | 1421 | dt = incidence->getNextOccurence( cur, &ok ); |
1414 | if ( !ok ) | 1422 | if ( !ok ) |
1415 | dt = cur.addSecs( -62 ); | 1423 | dt = cur.addSecs( -62 ); |
1416 | } | 1424 | } |
1417 | if ( dt < cur || dt > end ) { | 1425 | if ( dt < cur || dt > end ) { |
1418 | add = false; | 1426 | add = false; |
1419 | } | 1427 | } |
1420 | } | 1428 | } |
1421 | if ( add ) { | 1429 | if ( add ) { |
1422 | Incidence *in = incidence->clone(); | 1430 | Incidence *in = incidence->clone(); |
1423 | cal->addIncidence( in ); | 1431 | cal->addIncidence( in ); |
1424 | } | 1432 | } |
1425 | } | 1433 | } |
1426 | incidence = delSel.next(); | 1434 | incidence = delSel.next(); |
1427 | } | 1435 | } |
1428 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, | 1436 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, |
1429 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, | 1437 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, |
1430 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1438 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1431 | 1439 | ||
1432 | setCaption( i18n("Writing to phone...")); | 1440 | setCaption( i18n("Writing to phone...")); |
1433 | if ( PhoneFormat::writeToPhone( cal ) ) | 1441 | if ( PhoneFormat::writeToPhone( cal ) ) |
1434 | setCaption( i18n("Export to phone successful!")); | 1442 | setCaption( i18n("Export to phone successful!")); |
1435 | else | 1443 | else |
1436 | setCaption( i18n("Error exporting to phone!")); | 1444 | setCaption( i18n("Error exporting to phone!")); |
1437 | delete cal; | 1445 | delete cal; |
1438 | } | 1446 | } |
1439 | 1447 | ||
1440 | 1448 | ||
1441 | void MainWindow::setDefaultPreferences() | 1449 | void MainWindow::setDefaultPreferences() |
1442 | { | 1450 | { |
1443 | KOPrefs *p = KOPrefs::instance(); | 1451 | KOPrefs *p = KOPrefs::instance(); |
1444 | 1452 | ||
1445 | p->mCompactDialogs = true; | 1453 | p->mCompactDialogs = true; |
1446 | p->mConfirm = true; | 1454 | p->mConfirm = true; |
1447 | // p->mEnableQuickTodo = false; | 1455 | // p->mEnableQuickTodo = false; |
1448 | 1456 | ||
1449 | } | 1457 | } |
1450 | 1458 | ||
1451 | QString MainWindow::resourcePath() | 1459 | QString MainWindow::resourcePath() |
1452 | { | 1460 | { |
1453 | return KGlobal::iconLoader()->iconPath(); | 1461 | return KGlobal::iconLoader()->iconPath(); |
1454 | } | 1462 | } |
1455 | 1463 | ||
1456 | void MainWindow::displayText( QString text ,QString cap ) | 1464 | void MainWindow::displayText( QString text ,QString cap ) |
1457 | { | 1465 | { |
1458 | QDialog dia( this, "name", true ); ; | 1466 | QDialog dia( this, "name", true ); ; |
1459 | dia.setCaption( cap ); | 1467 | dia.setCaption( cap ); |
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index a948a52..adab95d 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -1,150 +1,151 @@ | |||
1 | #ifndef KORGE_MAINWINDOW_H | 1 | #ifndef KORGE_MAINWINDOW_H |
2 | #define KORGE_MAINWINDOW_H | 2 | #define KORGE_MAINWINDOW_H |
3 | 3 | ||
4 | #include <qmainwindow.h> | 4 | #include <qmainwindow.h> |
5 | #include <qtimer.h> | 5 | #include <qtimer.h> |
6 | #include <qdict.h> | 6 | #include <qdict.h> |
7 | #include <qfile.h> | 7 | #include <qfile.h> |
8 | #include <qmenubar.h> | 8 | #include <qmenubar.h> |
9 | #include <qtextstream.h> | 9 | #include <qtextstream.h> |
10 | #include <qregexp.h> | 10 | #include <qregexp.h> |
11 | 11 | ||
12 | #include <libkcal/incidence.h> | 12 | #include <libkcal/incidence.h> |
13 | #include <ksyncmanager.h> | 13 | #include <ksyncmanager.h> |
14 | #ifndef DESKTOP_VERSION | 14 | #ifndef DESKTOP_VERSION |
15 | #include <qcopchannel_qws.h> | 15 | #include <qcopchannel_qws.h> |
16 | #endif | 16 | #endif |
17 | class QAction; | 17 | class QAction; |
18 | class CalendarView; | 18 | class CalendarView; |
19 | class KSyncProfile; | 19 | class KSyncProfile; |
20 | #ifdef DESKTOP_VERSION | 20 | #ifdef DESKTOP_VERSION |
21 | 21 | ||
22 | #define QPEToolBar QToolBar | 22 | #define QPEToolBar QToolBar |
23 | #define QPEMenuBar QMenuBar | 23 | #define QPEMenuBar QMenuBar |
24 | #endif | 24 | #endif |
25 | class QPEToolBar; | 25 | class QPEToolBar; |
26 | class QPEMenuBar; | 26 | class QPEMenuBar; |
27 | 27 | ||
28 | 28 | ||
29 | namespace KCal { | 29 | namespace KCal { |
30 | class CalendarLocal; | 30 | class CalendarLocal; |
31 | } | 31 | } |
32 | 32 | ||
33 | using namespace KCal; | 33 | using namespace KCal; |
34 | 34 | ||
35 | class MainWindow : public QMainWindow | 35 | class MainWindow : public QMainWindow |
36 | { | 36 | { |
37 | Q_OBJECT | 37 | Q_OBJECT |
38 | public: | 38 | public: |
39 | MainWindow( QWidget *parent = 0, const char *name = 0 ); | 39 | MainWindow( QWidget *parent = 0, const char *name = 0 ); |
40 | ~MainWindow(); | 40 | ~MainWindow(); |
41 | bool beamReceiveEnabled(); | 41 | bool beamReceiveEnabled(); |
42 | static QString defaultFileName(); | 42 | static QString defaultFileName(); |
43 | static QString syncFileName(); | 43 | static QString syncFileName(); |
44 | static QString resourcePath(); | 44 | static QString resourcePath(); |
45 | public slots: | 45 | public slots: |
46 | void setUsesBigPixmaps ( bool ); | 46 | void setUsesBigPixmaps ( bool ); |
47 | void setCaption ( const QString & ); | 47 | void setCaption ( const QString & ); |
48 | void updateWeekNum(const KCal::DateList &); | 48 | void updateWeekNum(const KCal::DateList &); |
49 | void updateWeek(QDate); | 49 | void updateWeek(QDate); |
50 | void updateFilterToolbar(); | 50 | void updateFilterToolbar(); |
51 | virtual void showMaximized (); | 51 | virtual void showMaximized (); |
52 | void configureAgenda( int ); | 52 | void configureAgenda( int ); |
53 | void recieve( const QCString& msg, const QByteArray& data ); | 53 | void recieve( const QCString& msg, const QByteArray& data ); |
54 | protected slots: | 54 | protected slots: |
55 | void calHint(); | ||
55 | void startMultiSync(); | 56 | void startMultiSync(); |
56 | void setCaptionToDates(); | 57 | void setCaptionToDates(); |
57 | void weekAction(); | 58 | void weekAction(); |
58 | void about(); | 59 | void about(); |
59 | void licence(); | 60 | void licence(); |
60 | void faq(); | 61 | void faq(); |
61 | void usertrans(); | 62 | void usertrans(); |
62 | void features(); | 63 | void features(); |
63 | void synchowto(); | 64 | void synchowto(); |
64 | void storagehowto(); | 65 | void storagehowto(); |
65 | void timetrackinghowto(); | 66 | void timetrackinghowto(); |
66 | void kdesynchowto(); | 67 | void kdesynchowto(); |
67 | void multisynchowto(); | 68 | void multisynchowto(); |
68 | void whatsNew(); | 69 | void whatsNew(); |
69 | void keyBindings(); | 70 | void keyBindings(); |
70 | void aboutAutoSaving();; | 71 | void aboutAutoSaving();; |
71 | void aboutKnownBugs(); | 72 | void aboutKnownBugs(); |
72 | 73 | ||
73 | void processIncidenceSelection( Incidence * ); | 74 | void processIncidenceSelection( Incidence * ); |
74 | 75 | ||
75 | void importQtopia(); | 76 | void importQtopia(); |
76 | void importBday(); | 77 | void importBday(); |
77 | void importOL(); | 78 | void importOL(); |
78 | void importIcal(); | 79 | void importIcal(); |
79 | void importFile( QString, bool ); | 80 | void importFile( QString, bool ); |
80 | void quickImportIcal(); | 81 | void quickImportIcal(); |
81 | 82 | ||
82 | void slotModifiedChanged( bool ); | 83 | void slotModifiedChanged( bool ); |
83 | 84 | ||
84 | void save(); | 85 | void save(); |
85 | void backupAllFiles(); | 86 | void backupAllFiles(); |
86 | void saveStopTimer(); | 87 | void saveStopTimer(); |
87 | void configureToolBar( int ); | 88 | void configureToolBar( int ); |
88 | void printSel(); | 89 | void printSel(); |
89 | void printCal(); | 90 | void printCal(); |
90 | void printListView(); | 91 | void printListView(); |
91 | void saveCalendar(); | 92 | void saveCalendar(); |
92 | void loadCalendar(); | 93 | void loadCalendar(); |
93 | void exportVCalendar(); | 94 | void exportVCalendar(); |
94 | void fillFilterMenu(); | 95 | void fillFilterMenu(); |
95 | void fillFilterMenuTB(); | 96 | void fillFilterMenuTB(); |
96 | void selectFilter( int ); | 97 | void selectFilter( int ); |
97 | void fillFilterMenuPopup(); | 98 | void fillFilterMenuPopup(); |
98 | void selectFilterPopup( int ); | 99 | void selectFilterPopup( int ); |
99 | void exportToPhone( int ); | 100 | void exportToPhone( int ); |
100 | void toggleBeamReceive(); | 101 | void toggleBeamReceive(); |
101 | void disableBR(bool); | 102 | void disableBR(bool); |
102 | signals: | 103 | signals: |
103 | void selectWeek ( int ); | 104 | void selectWeek ( int ); |
104 | private slots: | 105 | private slots: |
105 | void showConfigureAgenda(); | 106 | void showConfigureAgenda(); |
106 | void getFile( bool ); | 107 | void getFile( bool ); |
107 | void syncFileRequest(); | 108 | void syncFileRequest(); |
108 | 109 | ||
109 | protected: | 110 | protected: |
110 | void hideEvent ( QHideEvent * ); | 111 | void hideEvent ( QHideEvent * ); |
111 | QString sentSyncFile(); | 112 | QString sentSyncFile(); |
112 | void displayText( QString, QString); | 113 | void displayText( QString, QString); |
113 | void enableIncidenceActions( bool ); | 114 | void enableIncidenceActions( bool ); |
114 | 115 | ||
115 | private: | 116 | private: |
116 | bool mBRdisabled; | 117 | bool mBRdisabled; |
117 | #ifndef DESKTOP_VERSION | 118 | #ifndef DESKTOP_VERSION |
118 | QCopChannel* infrared; | 119 | QCopChannel* infrared; |
119 | #endif | 120 | #endif |
120 | QAction* brAction; | 121 | QAction* brAction; |
121 | KSyncManager* mSyncManager; | 122 | KSyncManager* mSyncManager; |
122 | bool mClosed; | 123 | bool mClosed; |
123 | void saveOnClose(); | 124 | void saveOnClose(); |
124 | bool mFlagKeyPressed; | 125 | bool mFlagKeyPressed; |
125 | bool mBlockAtStartup; | 126 | bool mBlockAtStartup; |
126 | QPEToolBar *iconToolBar; | 127 | QPEToolBar *iconToolBar; |
127 | QPEToolBar *viewToolBar; | 128 | QPEToolBar *viewToolBar; |
128 | QPEToolBar *navigatorToolBar; | 129 | QPEToolBar *navigatorToolBar; |
129 | QPEToolBar *filterToolBar; | 130 | QPEToolBar *filterToolBar; |
130 | QMenuBar *filterMenubar; | 131 | QMenuBar *filterMenubar; |
131 | QPopupMenu * filterPopupMenu; | 132 | QPopupMenu * filterPopupMenu; |
132 | QPopupMenu * mCurrentItemMenu; | 133 | QPopupMenu * mCurrentItemMenu; |
133 | void initActions(); | 134 | void initActions(); |
134 | void setDefaultPreferences(); | 135 | void setDefaultPreferences(); |
135 | void resizeEvent( QResizeEvent* e); | 136 | void resizeEvent( QResizeEvent* e); |
136 | void keyPressEvent ( QKeyEvent * ) ; | 137 | void keyPressEvent ( QKeyEvent * ) ; |
137 | void keyReleaseEvent ( QKeyEvent * ) ; | 138 | void keyReleaseEvent ( QKeyEvent * ) ; |
138 | QPopupMenu *configureToolBarMenu; | 139 | QPopupMenu *configureToolBarMenu; |
139 | QPopupMenu *selectFilterMenu; | 140 | QPopupMenu *selectFilterMenu; |
140 | QPopupMenu *selectFilterMenuTB; | 141 | QPopupMenu *selectFilterMenuTB; |
141 | QPopupMenu *configureAgendaMenu, *syncMenu; | 142 | QPopupMenu *configureAgendaMenu, *syncMenu; |
142 | CalendarLocal *mCalendar; | 143 | CalendarLocal *mCalendar; |
143 | CalendarView *mView; | 144 | CalendarView *mView; |
144 | QAction *mNewSubTodoAction; | 145 | QAction *mNewSubTodoAction; |
145 | QAction *mWeekAction; | 146 | QAction *mWeekAction; |
146 | QFont mWeekFont; | 147 | QFont mWeekFont; |
147 | QPixmap mWeekPixmap; | 148 | QPixmap mWeekPixmap; |
148 | QColor mWeekBgColor; | 149 | QColor mWeekBgColor; |
149 | 150 | ||
150 | QAction *mShowAction; | 151 | QAction *mShowAction; |