summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kolocationbox.cpp2
-rw-r--r--korganizer/kolocationbox.h2
-rw-r--r--korganizer/mainwindow.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/korganizer/kolocationbox.cpp b/korganizer/kolocationbox.cpp
index f8fee2e..35a8123 100644
--- a/korganizer/kolocationbox.cpp
+++ b/korganizer/kolocationbox.cpp
@@ -1,96 +1,96 @@
1/* 1/*
2 Copyright (c) 2004 Dirk Loesche <dirk.loesche@bigfoot.de> 2 Copyright (c) 2004 Dirk Loesche <dirk.loesche@bigfoot.de>
3 3
4 This file is part of KOrganizer/PI 4 This file is part of KOrganizer/PI
5 KOrganizer Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 5 KOrganizer Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
6 KOrganizer/PI Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.net> 6 KOrganizer/PI Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.info>
7 7
8 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or 10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version. 11 (at your option) any later version.
12 12
13 This program is distributed in the hope that it will be useful, 13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details. 16 GNU General Public License for more details.
17 17
18 You should have received a copy of the GNU General Public License 18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software 19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 21
22 As a special exception, permission is given to link this program 22 As a special exception, permission is given to link this program
23 with any edition of Qt, and distribute the resulting executable, 23 with any edition of Qt, and distribute the resulting executable,
24 without including the source code for Qt in the source distribution. 24 without including the source code for Qt in the source distribution.
25*/ 25*/
26 26
27#include "kolocationbox.h" 27#include "kolocationbox.h"
28#include <qstring.h> 28#include <qstring.h>
29#include <qlineedit.h> 29#include <qlineedit.h>
30#include <qapplication.h> 30#include <qapplication.h>
31 31
32 32
33KOLocationBox::KOLocationBox( bool rw , QWidget *parent , int _maxItems) : 33KOLocationBox::KOLocationBox( bool rw , QWidget *parent , int _maxItems) :
34 QComboBox( rw , parent ) 34 QComboBox( rw , parent )
35{ 35{
36 maxItems = _maxItems; 36 maxItems = _maxItems;
37 maxItems = 50; // sorry - hack from me to set maxitems globally to 30 37 maxItems = 50; // sorry - hack from me to set maxitems globally to 30
38 setInsertionPolicy(AtTop); 38 setInsertionPolicy(AtTop);
39 setDuplicatesEnabled( FALSE ); 39 setDuplicatesEnabled( FALSE );
40 setMaxCount( maxItems ); 40 setMaxCount( maxItems );
41 setAutoCompletion( TRUE ); 41 setAutoCompletion( TRUE );
42 42
43} 43}
44 44
45KOLocationBox::~KOLocationBox() 45KOLocationBox::~KOLocationBox()
46{ 46{
47} 47}
48 48
49void KOLocationBox::load(int what) 49void KOLocationBox::load(int what)
50{ 50{
51 clear(); 51 clear();
52 // qDebug("load %d ",what ); 52 // qDebug("load %d ",what );
53 switch(what) { 53 switch(what) {
54 case LOCATION: 54 case LOCATION:
55 insertStringList( KOPrefs::instance()->mLocationDefaults, 0 ); 55 insertStringList( KOPrefs::instance()->mLocationDefaults, 0 );
56// insertStringList( KOPrefs::instance()->mLocationUserDefaults, 0 ); 56// insertStringList( KOPrefs::instance()->mLocationUserDefaults, 0 );
57 break; // don't disable 57 break; // don't disable
58 case SUMMARYEVENT: 58 case SUMMARYEVENT:
59 insertStringList( KOPrefs::instance()->mEventSummaryUser, 0 ); 59 insertStringList( KOPrefs::instance()->mEventSummaryUser, 0 );
60 break; // don't disable 60 break; // don't disable
61 case SUMMARYTODO: 61 case SUMMARYTODO:
62 insertStringList( KOPrefs::instance()->mTodoSummaryUser, 0 ); 62 insertStringList( KOPrefs::instance()->mTodoSummaryUser, 0 );
63 break; // don't disable 63 break; // don't disable
64 } 64 }
65} 65}
66 66
67void KOLocationBox::save(int what) 67void KOLocationBox::save(int what)
68{ 68{
69 strlist.clear(); 69 strlist.clear();
70 for( int l = 0; l < count() ; l++ ) { 70 for( int l = 0; l < count() ; l++ ) {
71 strlist << text( l ); 71 strlist << text( l );
72 } 72 }
73 // strlist.sort(); 73 // strlist.sort();
74 QString currentLine = lineEdit()->text(); 74 QString currentLine = lineEdit()->text();
75 if ( !strlist.contains( currentLine ) ) 75 if ( !strlist.contains( currentLine ) )
76 strlist.prepend( currentLine ); 76 strlist.prepend( currentLine );
77 // qDebug("save %d ", what); 77 // qDebug("save %d ", what);
78 switch(what) { 78 switch(what) {
79 case LOCATION: 79 case LOCATION:
80 KOPrefs::instance()->mLocationDefaults = strlist; 80 KOPrefs::instance()->mLocationDefaults = strlist;
81// KOPrefs::instance()->mLocationUserDefaults = strlist; 81// KOPrefs::instance()->mLocationUserDefaults = strlist;
82 break; // don't disable 82 break; // don't disable
83 case SUMMARYEVENT: 83 case SUMMARYEVENT:
84 KOPrefs::instance()->mEventSummaryUser = strlist; 84 KOPrefs::instance()->mEventSummaryUser = strlist;
85 break; // don't disable 85 break; // don't disable
86 case SUMMARYTODO: 86 case SUMMARYTODO:
87 KOPrefs::instance()->mTodoSummaryUser = strlist; 87 KOPrefs::instance()->mTodoSummaryUser = strlist;
88 break; // don't disable 88 break; // don't disable
89 } 89 }
90} 90}
91 91
92void KOLocationBox::clearItems(int what) 92void KOLocationBox::clearItems(int what)
93{ 93{
94 clear(); 94 clear();
95 save(what); 95 save(what);
96} 96}
diff --git a/korganizer/kolocationbox.h b/korganizer/kolocationbox.h
index be8ea86..b604d33 100644
--- a/korganizer/kolocationbox.h
+++ b/korganizer/kolocationbox.h
@@ -1,55 +1,55 @@
1/* 1/*
2 File Copyright (c) 2004 Dirk Loesche <dirk.loesche@bigfoot.de> 2 File Copyright (c) 2004 Dirk Loesche <dirk.loesche@bigfoot.de>
3 3
4 This file is part of KOrganizer/PI 4 This file is part of KOrganizer/PI
5 KOrganizer Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 5 KOrganizer Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
6 KOrganizer/PI Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.net> 6 KOrganizer/PI Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.info>
7 7
8 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or 10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version. 11 (at your option) any later version.
12 12
13 This program is distributed in the hope that it will be useful, 13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details. 16 GNU General Public License for more details.
17 17
18 You should have received a copy of the GNU General Public License 18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software 19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 21
22 As a special exception, permission is given to link this program 22 As a special exception, permission is given to link this program
23 with any edition of Qt, and distribute the resulting executable, 23 with any edition of Qt, and distribute the resulting executable,
24 without including the source code for Qt in the source distribution. 24 without including the source code for Qt in the source distribution.
25*/ 25*/
26 26
27#ifndef KOLOCATIONBOX_H 27#ifndef KOLOCATIONBOX_H
28#define KOLOCATIONBOX_H 28#define KOLOCATIONBOX_H
29 29
30#include <qcombobox.h> 30#include <qcombobox.h>
31#include "koprefs.h" 31#include "koprefs.h"
32 32
33class KOLocationBox : public QComboBox 33class KOLocationBox : public QComboBox
34{ 34{
35 public: 35 public:
36 KOLocationBox( bool rw , QWidget *parent , int _maxItems ); 36 KOLocationBox( bool rw , QWidget *parent , int _maxItems );
37 virtual ~KOLocationBox(); 37 virtual ~KOLocationBox();
38 38
39 enum {LOCATION, SUMMARYEVENT, SUMMARYTODO}; 39 enum {LOCATION, SUMMARYEVENT, SUMMARYTODO};
40 40
41 public slots: 41 public slots:
42 void load(int); 42 void load(int);
43 void save(int); 43 void save(int);
44 void clearItems(int); // clear listbox and config rc items 44 void clearItems(int); // clear listbox and config rc items
45 45
46 protected: 46 protected:
47// void focusOutEvent( QFocusEvent * ); 47// void focusOutEvent( QFocusEvent * );
48// void timerEvent( QTimerEvent * ); 48// void timerEvent( QTimerEvent * );
49 49
50 private: 50 private:
51 int maxItems; // maximal listbox items 51 int maxItems; // maximal listbox items
52 QStringList strlist; // temporary stringlist 52 QStringList strlist; // temporary stringlist
53}; 53};
54 54
55#endif 55#endif
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 4f71788..bd9efc8 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1182,265 +1182,265 @@ void MainWindow::exportToPhone( int mode )
1182 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1182 KPimGlobalPrefs::instance()->mEx2PhoneModel );
1183 1183
1184 setCaption( i18n("Writing to phone...")); 1184 setCaption( i18n("Writing to phone..."));
1185 if ( PhoneFormat::writeToPhone( cal ) ) 1185 if ( PhoneFormat::writeToPhone( cal ) )
1186 setCaption( i18n("Export to phone successful!")); 1186 setCaption( i18n("Export to phone successful!"));
1187 else 1187 else
1188 setCaption( i18n("Error exporting to phone!")); 1188 setCaption( i18n("Error exporting to phone!"));
1189 delete cal; 1189 delete cal;
1190} 1190}
1191 1191
1192 1192
1193void MainWindow::setDefaultPreferences() 1193void MainWindow::setDefaultPreferences()
1194{ 1194{
1195 KOPrefs *p = KOPrefs::instance(); 1195 KOPrefs *p = KOPrefs::instance();
1196 1196
1197 p->mCompactDialogs = true; 1197 p->mCompactDialogs = true;
1198 p->mConfirm = true; 1198 p->mConfirm = true;
1199 // p->mEnableQuickTodo = false; 1199 // p->mEnableQuickTodo = false;
1200 1200
1201} 1201}
1202 1202
1203QString MainWindow::resourcePath() 1203QString MainWindow::resourcePath()
1204{ 1204{
1205 return KGlobal::iconLoader()->iconPath(); 1205 return KGlobal::iconLoader()->iconPath();
1206} 1206}
1207 1207
1208void MainWindow::displayText( QString text ,QString cap ) 1208void MainWindow::displayText( QString text ,QString cap )
1209{ 1209{
1210 QDialog dia( this, "name", true ); ; 1210 QDialog dia( this, "name", true ); ;
1211 dia.setCaption( cap ); 1211 dia.setCaption( cap );
1212 QVBoxLayout* lay = new QVBoxLayout( &dia ); 1212 QVBoxLayout* lay = new QVBoxLayout( &dia );
1213 lay->setSpacing( 3 ); 1213 lay->setSpacing( 3 );
1214 lay->setMargin( 3 ); 1214 lay->setMargin( 3 );
1215 QTextBrowser tb ( &dia ); 1215 QTextBrowser tb ( &dia );
1216 lay->addWidget( &tb ); 1216 lay->addWidget( &tb );
1217 tb.setText( text ); 1217 tb.setText( text );
1218#ifdef DESKTOP_VERSION 1218#ifdef DESKTOP_VERSION
1219 dia.resize( 640, 480); 1219 dia.resize( 640, 480);
1220#else 1220#else
1221 dia.showMaximized(); 1221 dia.showMaximized();
1222#endif 1222#endif
1223 dia.exec(); 1223 dia.exec();
1224} 1224}
1225 1225
1226void MainWindow::features() 1226void MainWindow::features()
1227{ 1227{
1228 1228
1229 KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); 1229 KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" );
1230} 1230}
1231 1231
1232void MainWindow::usertrans() 1232void MainWindow::usertrans()
1233{ 1233{
1234 1234
1235 KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); 1235 KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" );
1236} 1236}
1237 1237
1238void MainWindow::kdesynchowto() 1238void MainWindow::kdesynchowto()
1239{ 1239{
1240 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); 1240 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" );
1241} 1241}
1242void MainWindow::multisynchowto() 1242void MainWindow::multisynchowto()
1243{ 1243{
1244 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); 1244 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" );
1245} 1245}
1246void MainWindow::synchowto() 1246void MainWindow::synchowto()
1247{ 1247{
1248 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); 1248 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
1249} 1249}
1250void MainWindow::faq() 1250void MainWindow::faq()
1251{ 1251{
1252 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); 1252 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" );
1253 1253
1254} 1254}
1255void MainWindow::whatsNew() 1255void MainWindow::whatsNew()
1256{ 1256{
1257 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); 1257 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
1258 1258
1259} 1259}
1260void MainWindow::licence() 1260void MainWindow::licence()
1261{ 1261{
1262 KApplication::showLicence(); 1262 KApplication::showLicence();
1263 1263
1264} 1264}
1265void MainWindow::about() 1265void MainWindow::about()
1266{ 1266{
1267 QString version; 1267 QString version;
1268#include <../version> 1268#include <../version>
1269 QMessageBox::about( this, i18n("About KOrganizer/Pi"), 1269 QMessageBox::about( this, i18n("About KOrganizer/Pi"),
1270 i18n("KOrganizer/Platform-independent\n") + 1270 i18n("KOrganizer/Platform-independent\n") +
1271 "(KO/Pi) " + version + " - " + 1271 "(KO/Pi) " + version + " - " +
1272 1272
1273#ifdef DESKTOP_VERSION 1273#ifdef DESKTOP_VERSION
1274 i18n("Desktop Edition\n") + 1274 i18n("Desktop Edition\n") +
1275#else 1275#else
1276 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + 1276 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") +
1277#endif 1277#endif
1278 i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.net --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); 1278 i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") );
1279} 1279}
1280void MainWindow::keyBindings() 1280void MainWindow::keyBindings()
1281{ 1281{
1282 QString cap = i18n("KO/Pi Keys + Colors"); 1282 QString cap = i18n("KO/Pi Keys + Colors");
1283 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + 1283 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") +
1284 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ 1284 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+
1285 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + 1285 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") +
1286 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ 1286 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+
1287 i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ 1287 i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+
1288 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ 1288 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+
1289 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ 1289 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+
1290 i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ 1290 i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+
1291 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ 1291 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+
1292 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ 1292 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+
1293 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ 1293 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+
1294 i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ 1294 i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+
1295 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ 1295 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+
1296 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ 1296 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+
1297 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ 1297 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+
1298 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ 1298 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+
1299 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ 1299 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+
1300 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ 1300 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+
1301 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ 1301 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+
1302 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ 1302 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+
1303 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ 1303 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+
1304 i18n("<p><h3>In agenda view:</h3></p>\n") + 1304 i18n("<p><h3>In agenda view:</h3></p>\n") +
1305 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ 1305 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+
1306 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ 1306 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+
1307 i18n("<p><h3>In todo view:</h3></p>\n") + 1307 i18n("<p><h3>In todo view:</h3></p>\n") +
1308 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ 1308 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+
1309 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ 1309 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+
1310 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ 1310 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+
1311 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ 1311 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+
1312 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1312 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1313 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ 1313 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+
1314 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ 1314 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+
1315 i18n("<p><h3>In list view:</h3></p>\n") + 1315 i18n("<p><h3>In list view:</h3></p>\n") +
1316 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1316 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1317 i18n("<p><b>return</b>: Select item+one step down</p>\n")+ 1317 i18n("<p><b>return</b>: Select item+one step down</p>\n")+
1318 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ 1318 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+
1319 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ 1319 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+
1320 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ 1320 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+
1321 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ 1321 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+
1322 i18n("<p><h3>In event/todo viewer:</h3></p>\n") + 1322 i18n("<p><h3>In event/todo viewer:</h3></p>\n") +
1323 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ 1323 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+
1324 i18n("<p><b>A</b>: Show agenda view.</p>\n")+ 1324 i18n("<p><b>A</b>: Show agenda view.</p>\n")+
1325 i18n("<p><b>E</b>: Edit item</p>\n") + 1325 i18n("<p><b>E</b>: Edit item</p>\n") +
1326 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + 1326 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") +
1327 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + 1327 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") +
1328 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ 1328 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+
1329 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ 1329 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+
1330 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ 1330 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+
1331 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ 1331 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+
1332 i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ 1332 i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+
1333 i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + 1333 i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") +
1334 i18n("<p><b>White</b>: Item readonly</p>\n"); 1334 i18n("<p><b>White</b>: Item readonly</p>\n");
1335 displayText( text, cap); 1335 displayText( text, cap);
1336} 1336}
1337void MainWindow::aboutAutoSaving() 1337void MainWindow::aboutAutoSaving()
1338{ 1338{
1339 QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"); 1339 QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n");
1340 1340
1341 KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); 1341 KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text);
1342 1342
1343} 1343}
1344void MainWindow::aboutKnownBugs() 1344void MainWindow::aboutKnownBugs()
1345{ 1345{
1346 QMessageBox* msg; 1346 QMessageBox* msg;
1347 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), 1347 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"),
1348 i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ 1348 i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+
1349 i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ 1349 i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+
1350 i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") + 1350 i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") +
1351 i18n("\nor report them in the bugtracker on\n") + 1351 i18n("\nor report them in the bugtracker on\n") +
1352 i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), 1352 i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"),
1353 QMessageBox::NoIcon, 1353 QMessageBox::NoIcon,
1354 QMessageBox::Ok, 1354 QMessageBox::Ok,
1355 QMessageBox::NoButton, 1355 QMessageBox::NoButton,
1356 QMessageBox::NoButton); 1356 QMessageBox::NoButton);
1357 msg->exec(); 1357 msg->exec();
1358 delete msg; 1358 delete msg;
1359 1359
1360} 1360}
1361 1361
1362QString MainWindow::defaultFileName() 1362QString MainWindow::defaultFileName()
1363{ 1363{
1364 return locateLocal( "data", "korganizer/mycalendar.ics" ); 1364 return locateLocal( "data", "korganizer/mycalendar.ics" );
1365} 1365}
1366QString MainWindow::syncFileName() 1366QString MainWindow::syncFileName()
1367{ 1367{
1368#ifdef DESKTOP_VERSION 1368#ifdef DESKTOP_VERSION
1369 return locateLocal( "tmp", "synccalendar.ics" ); 1369 return locateLocal( "tmp", "synccalendar.ics" );
1370#else 1370#else
1371 return QString( "/tmp/synccalendar.ics" ); 1371 return QString( "/tmp/synccalendar.ics" );
1372#endif 1372#endif
1373} 1373}
1374void MainWindow::updateWeek(QDate seda) 1374void MainWindow::updateWeek(QDate seda)
1375{ 1375{
1376 int weekNum = 0; 1376 int weekNum = 0;
1377 QDate d = QDate ( seda.year(), 1,1); 1377 QDate d = QDate ( seda.year(), 1,1);
1378 seda = seda.addDays( 1-seda.dayOfWeek() );//we are on monday 1378 seda = seda.addDays( 1-seda.dayOfWeek() );//we are on monday
1379 if ( seda.addDays(6).year() != seda.year() ) { 1379 if ( seda.addDays(6).year() != seda.year() ) {
1380 if ( seda.year() != d.year() ) { 1380 if ( seda.year() != d.year() ) {
1381 if ( d.dayOfWeek() > 4 ) 1381 if ( d.dayOfWeek() > 4 )
1382 d = QDate ( seda.year(), 1,1); 1382 d = QDate ( seda.year(), 1,1);
1383 else 1383 else
1384 weekNum = 1; 1384 weekNum = 1;
1385 } else { 1385 } else {
1386 QDate dd( seda.year()+1, 1,1); 1386 QDate dd( seda.year()+1, 1,1);
1387 if ( dd.dayOfWeek() <= 4 ) 1387 if ( dd.dayOfWeek() <= 4 )
1388 weekNum = 1; 1388 weekNum = 1;
1389 } 1389 }
1390 } 1390 }
1391 if ( weekNum == 0 ){ 1391 if ( weekNum == 0 ){
1392 int dow = d.dayOfWeek(); 1392 int dow = d.dayOfWeek();
1393 if ( dow <= 4 ) 1393 if ( dow <= 4 )
1394 d = d.addDays( 1-dow ); 1394 d = d.addDays( 1-dow );
1395 else // 5,6,7 1395 else // 5,6,7
1396 d = d.addDays( 8-dow ); 1396 d = d.addDays( 8-dow );
1397 // we have the first week of the year.we are on monday 1397 // we have the first week of the year.we are on monday
1398 weekNum = d.daysTo( seda ) / 7 +1; 1398 weekNum = d.daysTo( seda ) / 7 +1;
1399 } 1399 }
1400 1400
1401 mWeekPixmap.fill( mWeekBgColor ); 1401 mWeekPixmap.fill( mWeekBgColor );
1402 QPainter p ( &mWeekPixmap ); 1402 QPainter p ( &mWeekPixmap );
1403 p.setFont( mWeekFont ); 1403 p.setFont( mWeekFont );
1404 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); 1404 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) );
1405 p.end(); 1405 p.end();
1406 QIconSet icon3 ( mWeekPixmap ); 1406 QIconSet icon3 ( mWeekPixmap );
1407 mWeekAction->setIconSet ( icon3 ); 1407 mWeekAction->setIconSet ( icon3 );
1408 1408
1409} 1409}
1410void MainWindow::updateWeekNum(const DateList &selectedDates) 1410void MainWindow::updateWeekNum(const DateList &selectedDates)
1411{ 1411{
1412 updateWeek( selectedDates.first() ); 1412 updateWeek( selectedDates.first() );
1413} 1413}
1414void MainWindow::processIncidenceSelection( Incidence *incidence ) 1414void MainWindow::processIncidenceSelection( Incidence *incidence )
1415{ 1415{
1416 1416
1417 if ( !incidence ) { 1417 if ( !incidence ) {
1418 enableIncidenceActions( false ); 1418 enableIncidenceActions( false );
1419 1419
1420 mNewSubTodoAction->setEnabled( false ); 1420 mNewSubTodoAction->setEnabled( false );
1421 setCaptionToDates(); 1421 setCaptionToDates();
1422 return; 1422 return;
1423 1423
1424 } 1424 }
1425 1425
1426 //KGlobal::locale()->formatDateTime(nextA, true); 1426 //KGlobal::locale()->formatDateTime(nextA, true);
1427 QString startString = ""; 1427 QString startString = "";
1428 if ( incidence->type() != "Todo" ) { 1428 if ( incidence->type() != "Todo" ) {
1429 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { 1429 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) {
1430 if ( incidence->doesFloat() ) { 1430 if ( incidence->doesFloat() ) {
1431 startString += ": "+incidence->dtStartDateStr( true ); 1431 startString += ": "+incidence->dtStartDateStr( true );
1432 startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); 1432 startString += " --- "+((Event*)incidence)->dtEndDateStr( true );
1433 1433
1434 } else { 1434 } else {
1435 startString = ": "+incidence->dtStartStr(true); 1435 startString = ": "+incidence->dtStartStr(true);
1436 startString += " --- "+((Event*)incidence)->dtEndStr(true); 1436 startString += " --- "+((Event*)incidence)->dtEndStr(true);
1437 1437
1438 } 1438 }
1439 1439
1440 } else { 1440 } else {
1441 if ( incidence->dtStart().time() != incidence->dtEnd().time() ) 1441 if ( incidence->dtStart().time() != incidence->dtEnd().time() )
1442 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ 1442 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+
1443 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); 1443 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time());
1444 if ( incidence->categories().contains( i18n("Birthday") ) || incidence->categories().contains( i18n("Anniversary") ) ) { 1444 if ( incidence->categories().contains( i18n("Birthday") ) || incidence->categories().contains( i18n("Anniversary") ) ) {
1445 bool ok; 1445 bool ok;
1446 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); 1446 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok );