-rw-r--r-- | bin/kdepim/SyncHowto.txt | 2 | ||||
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 10 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonapplet.cpp | 9 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 6 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 43 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 | ||||
-rw-r--r-- | microkde/kapplication.cpp | 4 |
7 files changed, 33 insertions, 42 deletions
diff --git a/bin/kdepim/SyncHowto.txt b/bin/kdepim/SyncHowto.txt index 5874fc3..6c1da16 100644 --- a/bin/kdepim/SyncHowto.txt +++ b/bin/kdepim/SyncHowto.txt | |||
@@ -1,50 +1,50 @@ | |||
1 | WARNING: | 1 | WARNING: |
2 | YOU MAY GET UNEXSPECTED (I.E. WRONG) SYNCHRONIZATION RESULTS, | 2 | YOU MAY GET UNEXPECTED (I.E. WRONG) SYNCHRONIZATION RESULTS, |
3 | IF YOU CHANGE AN EVENT ON THE FIRST DEVICE AND SYNC IMMEDIATELY FROM | 3 | IF YOU CHANGE AN EVENT ON THE FIRST DEVICE AND SYNC IMMEDIATELY FROM |
4 | THE OTHER DEVICE WITH THIS DEVICE, IF THE CLOCKS OF THE TWO DEVICES | 4 | THE OTHER DEVICE WITH THIS DEVICE, IF THE CLOCKS OF THE TWO DEVICES |
5 | HAVE TOO MUCH DIFFERENCE. | 5 | HAVE TOO MUCH DIFFERENCE. |
6 | 6 | ||
7 | In other words: Please make sure, that the clocks of the devices | 7 | In other words: Please make sure, that the clocks of the devices |
8 | you want to sync have only a difference of some seconds! | 8 | you want to sync have only a difference of some seconds! |
9 | 9 | ||
10 | 10 | ||
11 | CONTENT: | 11 | CONTENT: |
12 | 12 | ||
13 | 0) How syncing works | 13 | 0) How syncing works |
14 | 1) Qick overview of settings | 14 | 1) Qick overview of settings |
15 | 2) Sync settings in sync dialog | 15 | 2) Sync settings in sync dialog |
16 | 3) Syncing background | 16 | 3) Syncing background |
17 | 4) Sync preferences | 17 | 4) Sync preferences |
18 | 5) Details about sync profile kinds | 18 | 5) Details about sync profile kinds |
19 | 19 | ||
20 | ************************************************************************* | 20 | ************************************************************************* |
21 | 0) How syncing works | 21 | 0) How syncing works |
22 | ************************************************************************* | 22 | ************************************************************************* |
23 | 23 | ||
24 | Note: | 24 | Note: |
25 | The recommended and easiest way to syncronize two devices where | 25 | The recommended and easiest way to syncronize two devices where |
26 | KO/Pi, KA/Pi or PWM/Pi is installed, is the profile kind "Pi-Sync". | 26 | KO/Pi, KA/Pi or PWM/Pi is installed, is the profile kind "Pi-Sync". |
27 | Details about that in 5) b). | 27 | Details about that in 5) b). |
28 | 28 | ||
29 | In KDE-Pim/Pi you can synchronize ( sync ) your calendar/addressbook/ | 29 | In KDE-Pim/Pi you can synchronize ( sync ) your calendar/addressbook/ |
30 | passwordfile with another calendar/addressbook/passwordfile, | 30 | passwordfile with another calendar/addressbook/passwordfile, |
31 | by syncing your (local) calendar/addressbook/passwordfile | 31 | by syncing your (local) calendar/addressbook/passwordfile |
32 | with a (remote) file. | 32 | with a (remote) file. |
33 | This remote file may on your local filesystem | 33 | This remote file may on your local filesystem |
34 | or on another (remote) device. | 34 | or on another (remote) device. |
35 | 35 | ||
36 | If you want to sync with another remote device, you have to create | 36 | If you want to sync with another remote device, you have to create |
37 | a sync profile. | 37 | a sync profile. |
38 | You have two choices for choosing the profil kind: | 38 | You have two choices for choosing the profil kind: |
39 | I) You can choose profile kind "Remote file" and specify a | 39 | I) You can choose profile kind "Remote file" and specify a |
40 | command line download/upload command ( like scp, ftp, ...) to | 40 | command line download/upload command ( like scp, ftp, ...) to |
41 | a) download the remote file to your local machine to a temp file | 41 | a) download the remote file to your local machine to a temp file |
42 | b) sync with this temp file | 42 | b) sync with this temp file |
43 | c) upload the synced file to the remote device | 43 | c) upload the synced file to the remote device |
44 | II) If you want to sync with a device, where KO/Pi( or KA/Pi, PWM/Pi) is | 44 | II) If you want to sync with a device, where KO/Pi( or KA/Pi, PWM/Pi) is |
45 | installed, you can easily get the remote file via network | 45 | installed, you can easily get the remote file via network |
46 | with the build in file transfer feature: | 46 | with the build in file transfer feature: |
47 | Choose profile kind "Pi-Sync" and | 47 | Choose profile kind "Pi-Sync" and |
48 | a) Start KO/Pi,KA/Pi or PWM/Pi on remote device and | 48 | a) Start KO/Pi,KA/Pi or PWM/Pi on remote device and |
49 | enable "Pi-Sync" on remote device with password and port. | 49 | enable "Pi-Sync" on remote device with password and port. |
50 | b) Specify password, port and IP address in your profile. | 50 | b) Specify password, port and IP address in your profile. |
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 1a8b885..df0b2eb 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,78 +1,86 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 1.9.16 ************ | 3 | ********** VERSION 1.9.16 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | KO/Pi: |
6 | Fixed search dialog size on Z 6000 (480x640 display). | 6 | Fixed search dialog size on Z 6000 (480x640 display). |
7 | Added setting to hide/show time in agenda items. | 7 | Added setting to hide/show time in agenda items. |
8 | Added setting to hide not running todos in todo view. | 8 | Added setting to hide not running todos in todo view. |
9 | Added columns for start date/time in todo view. | 9 | Added columns for start date/time in todo view. |
10 | Replaced the solid half-hour lines in agenda view by dot lines. | 10 | Replaced the solid half-hour lines in agenda view by dot lines. |
11 | Fixed some minor problems. (Like word wrap in help text windows). | ||
12 | |||
13 | Fixed a strange problem in KO/Pi alarm applet. | ||
14 | Did not find the actual problem, | ||
15 | such that now Qtopia reboots if deinstalling the alarm applet. | ||
16 | But the alarm applet should work again. | ||
17 | |||
11 | 18 | ||
12 | ********** VERSION 1.9.15 ************ | 19 | ********** VERSION 1.9.15 ************ |
13 | 20 | ||
14 | Usebilty enhancements in KO/Pi: | 21 | Usebilty enhancements in KO/Pi: |
15 | When clicking on the date in a month view cell, the day view is shown. | 22 | When clicking on the date in a month view cell, the day view is shown. |
16 | Old behaviour was, that the "new event" dialog popped up. | 23 | Old behaviour was, that the "new event" dialog popped up. |
17 | 24 | ||
18 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). | 25 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). |
19 | That means, you can restore the latest | 26 | That means, you can restore the latest |
20 | event/todo/journal you have deleted. | 27 | event/todo/journal you have deleted. |
21 | A journal is deleted, if you clear all the text of the journal. | 28 | A journal is deleted, if you clear all the text of the journal. |
22 | 29 | ||
23 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. | 30 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. |
24 | 31 | ||
25 | KA/Pi starting in 480x640 resolution: | 32 | KA/Pi starting in 480x640 resolution: |
26 | Hide the filter action in toolbar | 33 | Hide the filter action in toolbar |
27 | and added icons for undo/delete/redo in toolbar. | 34 | and added icons for undo/delete/redo in toolbar. |
28 | 35 | ||
29 | Change in OM/Pi ViewMail dialog: | 36 | Change in OM/Pi ViewMail dialog: |
30 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). | 37 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. |
38 | But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). | ||
31 | 39 | ||
32 | Fixed a crash when deleting mail-accounts in OM/Pi. | 40 | Fixed a crash when deleting mail-accounts in OM/Pi. |
33 | 41 | ||
34 | 42 | ||
35 | ********** VERSION 1.9.14 ************ | 43 | ********** VERSION 1.9.14 ************ |
36 | 44 | ||
37 | Fixed some problems with the dialog sizes when switching | 45 | Fixed some problems with the dialog sizes when switching |
38 | portrait/landscape mode on 640x480 PDA display. | 46 | portrait/landscape mode on 640x480 PDA display. |
39 | 47 | ||
40 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. | 48 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. |
41 | 49 | ||
42 | Fixed an ugly bug in KOpieMail: | 50 | Fixed an ugly bug in KOpieMail: |
43 | KOpieMail was not able to write files (mails) to MSDOS file system, | 51 | KOpieMail was not able to write files (mails) to MSDOS file system, |
44 | like on an usual preformatted SD card. That should work now. | 52 | like on an usual preformatted SD card. That should work now. |
45 | To save your mail data on the Sd card do the following: | 53 | To save your mail data on the Sd card do the following: |
46 | Create a dir on the SD card: | 54 | Create a dir on the SD card: |
47 | mkdir /mnt/card/localmail | 55 | mkdir /mnt/card/localmail |
48 | Go to your home dir: | 56 | Go to your home dir: |
49 | cd | 57 | cd |
50 | Go to kopiemail data storage dir: | 58 | Go to kopiemail data storage dir: |
51 | cd kdepim/apps/kopiemail | 59 | cd kdepim/apps/kopiemail |
52 | Create a symlink to the SD card: | 60 | Create a symlink to the SD card: |
53 | ls -s /mnt/card/localmail | 61 | ls -s /mnt/card/localmail |
54 | Now KOpieMail will store all mails on the SD card. | 62 | Now KOpieMail will store all mails on the SD card. |
55 | 63 | ||
56 | KO/Pi Monthview: | 64 | KO/Pi Monthview: |
57 | Now "Go to Today" selects the current month from day 1-end, | 65 | Now "Go to Today" selects the current month from day 1-end, |
58 | not the current date + some days. | 66 | not the current date + some days. |
59 | I.e. "Go to Today" shows now always | 67 | I.e. "Go to Today" shows now always |
60 | the current month with first day of month in the first row. | 68 | the current month with first day of month in the first row. |
61 | 69 | ||
62 | Added missing German translation. | 70 | Added missing German translation. |
63 | 71 | ||
64 | Fixed icons of executeable on Wintendo. | 72 | Fixed icons of executeable on Wintendo. |
65 | 73 | ||
66 | Added a "Show next Mail" button to the OM/Pi | 74 | Added a "Show next Mail" button to the OM/Pi |
67 | mail viewer such that the mail below the current mail | 75 | mail viewer such that the mail below the current mail |
68 | in the mail list view of the current folder | 76 | in the mail list view of the current folder |
69 | can be read with a single click. | 77 | can be read with a single click. |
70 | 78 | ||
71 | 79 | ||
72 | ********** VERSION 1.9.13 ************ | 80 | ********** VERSION 1.9.13 ************ |
73 | 81 | ||
74 | Fixed nasty PwM/Pi file reading bug, when | 82 | Fixed nasty PwM/Pi file reading bug, when |
75 | the used hash algo of file is different then the global | 83 | the used hash algo of file is different then the global |
76 | hash algo. | 84 | hash algo. |
77 | 85 | ||
78 | Added KA/Pi support for opie mailit mailapplication. | 86 | Added KA/Pi support for opie mailit mailapplication. |
diff --git a/kalarmd/simplealarmdaemonapplet.cpp b/kalarmd/simplealarmdaemonapplet.cpp index 38a744f..3277036 100644 --- a/kalarmd/simplealarmdaemonapplet.cpp +++ b/kalarmd/simplealarmdaemonapplet.cpp | |||
@@ -1,59 +1,60 @@ | |||
1 | #include "simplealarmdaemonapplet.h" | 1 | #include "simplealarmdaemonapplet.h" |
2 | 2 | ||
3 | #include "simplealarmdaemonimpl.h" | 3 | #include "simplealarmdaemonimpl.h" |
4 | 4 | ||
5 | #include <qcopchannel_qws.h> | 5 | #include <qcopchannel_qws.h> |
6 | #include <qlabel.h> | 6 | #include <qlabel.h> |
7 | #include <qapp.h> | 7 | #include <qapp.h> |
8 | #include <qpe/resource.h> | 8 | #include <qpe/resource.h> |
9 | SimpleAlarmDaemonApplet::SimpleAlarmDaemonApplet() | 9 | SimpleAlarmDaemonApplet::SimpleAlarmDaemonApplet() |
10 | : mApplet( 0 ), ref( 0 ) | 10 | : mApplet( 0 ), ref( 0 ) |
11 | { | 11 | { |
12 | 12 | ||
13 | } | 13 | } |
14 | 14 | ||
15 | SimpleAlarmDaemonApplet::~SimpleAlarmDaemonApplet() | 15 | SimpleAlarmDaemonApplet::~SimpleAlarmDaemonApplet() |
16 | { | 16 | { |
17 | delete mApplet; | 17 | //delete mApplet; |
18 | mApplet = 0; | 18 | mApplet = 0; |
19 | } | 19 | } |
20 | 20 | ||
21 | 21 | ||
22 | QWidget *SimpleAlarmDaemonApplet::applet( QWidget *parent ) | 22 | QWidget *SimpleAlarmDaemonApplet::applet( QWidget *parent ) |
23 | { | 23 | { |
24 | if ( !mApplet ) { | 24 | if ( !mApplet ) { |
25 | mApplet = new SimpleAlarmDaemonImpl( parent ); | 25 | mApplet = new SimpleAlarmDaemonImpl( parent ); |
26 | if ( QApplication::desktop()->width() < 480 ) | 26 | if ( QApplication::desktop()->width() < 480 ) |
27 | mApplet->setPixmap( Resource::loadPixmap( "ko16" ) ); | 27 | mApplet->setPixmap( Resource::loadPixmap( "ko16" ) ); |
28 | else | 28 | else |
29 | mApplet->setPixmap( Resource::loadPixmap( "ko24" ) ); | 29 | mApplet->setPixmap( Resource::loadPixmap( "ko24" ) ); |
30 | QCopChannel* c = new QCopChannel("koalarm",mApplet , "channel" ) ; | 30 | QCopChannel* c = new QCopChannel("koalarm",mApplet , "channel" ) ; |
31 | QObject::connect( c, SIGNAL (received ( const QCString &, const QByteArray & )),mApplet, SLOT(recieve( const QCString&, const QByteArray& ))); | 31 | QObject::connect( c, SIGNAL (received ( const QCString &, const QByteArray & )),mApplet, SLOT(recieve( const QCString&, const QByteArray& ))); |
32 | mApplet->show(); | 32 | mApplet->show(); |
33 | } | 33 | } |
34 | return mApplet; | 34 | return mApplet; |
35 | } | 35 | } |
36 | 36 | ||
37 | int SimpleAlarmDaemonApplet::position() const | 37 | int SimpleAlarmDaemonApplet::position() const |
38 | { | 38 | { |
39 | return 7; | 39 | return 7; |
40 | } | 40 | } |
41 | 41 | ||
42 | QRESULT SimpleAlarmDaemonApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 42 | QRESULT SimpleAlarmDaemonApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
43 | { | 43 | { |
44 | // qDebug(" SimpleAlarmDaemonApplet::queryInterface "); | ||
44 | *iface = 0; | 45 | *iface = 0; |
45 | if ( uuid == IID_QUnknown ) | 46 | if ( uuid == IID_QUnknown ) |
46 | *iface = this; | 47 | *iface = this; |
47 | else if ( uuid == IID_TaskbarApplet ) | 48 | else if ( uuid == IID_TaskbarApplet ) |
48 | *iface = this; | 49 | *iface = this; |
50 | |||
49 | if ( *iface ) { | 51 | if ( *iface ) { |
50 | //(*iface)->addRef(); | 52 | (*iface)->addRef(); |
51 | return QS_OK; | 53 | return QS_OK; |
52 | } | 54 | } |
53 | return QE_NOCOMPONENT; | 55 | return QE_NOINTERFACE; |
54 | } | 56 | } |
55 | |||
56 | Q_EXPORT_INTERFACE() | 57 | Q_EXPORT_INTERFACE() |
57 | { | 58 | { |
58 | Q_CREATE_INSTANCE( SimpleAlarmDaemonApplet ) | 59 | Q_CREATE_INSTANCE( SimpleAlarmDaemonApplet ) |
59 | } | 60 | } |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 5d7b066..97b4a03 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -1033,97 +1033,101 @@ void KOTodoView::toggleCompleted() | |||
1033 | { | 1033 | { |
1034 | KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; | 1034 | KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; |
1035 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); | 1035 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); |
1036 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); | 1036 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); |
1037 | updateView(); | 1037 | updateView(); |
1038 | } | 1038 | } |
1039 | 1039 | ||
1040 | void KOTodoView::addQuickTodo() | 1040 | void KOTodoView::addQuickTodo() |
1041 | { | 1041 | { |
1042 | Todo *todo = new Todo(); | 1042 | Todo *todo = new Todo(); |
1043 | todo->setSummary(mQuickAdd->text()); | 1043 | todo->setSummary(mQuickAdd->text()); |
1044 | todo->setOrganizer(KOPrefs::instance()->email()); | 1044 | todo->setOrganizer(KOPrefs::instance()->email()); |
1045 | CalFilter * cf = mCalendar->filter(); | 1045 | CalFilter * cf = mCalendar->filter(); |
1046 | if ( cf ) { | 1046 | if ( cf ) { |
1047 | if ( cf->isEnabled()&& cf->showCategories()) { | 1047 | if ( cf->isEnabled()&& cf->showCategories()) { |
1048 | todo->setCategories(cf->categoryList()); | 1048 | todo->setCategories(cf->categoryList()); |
1049 | } | 1049 | } |
1050 | if ( cf->isEnabled() ) | 1050 | if ( cf->isEnabled() ) |
1051 | todo->setSecrecy( cf->getSecrecy()); | 1051 | todo->setSecrecy( cf->getSecrecy()); |
1052 | } | 1052 | } |
1053 | mCalendar->addTodo(todo); | 1053 | mCalendar->addTodo(todo); |
1054 | mQuickAdd->setText(""); | 1054 | mQuickAdd->setText(""); |
1055 | todoModified (todo, KOGlobals::EVENTADDED ); | 1055 | todoModified (todo, KOGlobals::EVENTADDED ); |
1056 | updateView(); | 1056 | updateView(); |
1057 | } | 1057 | } |
1058 | void KOTodoView::keyPressEvent ( QKeyEvent * e ) | 1058 | void KOTodoView::keyPressEvent ( QKeyEvent * e ) |
1059 | { | 1059 | { |
1060 | // e->ignore(); | 1060 | // e->ignore(); |
1061 | //return; | 1061 | //return; |
1062 | //qDebug("KOTodoView::keyPressEvent "); | 1062 | //qDebug("KOTodoView::keyPressEvent "); |
1063 | switch ( e->key() ) { | 1063 | switch ( e->key() ) { |
1064 | case Qt::Key_Down: | 1064 | case Qt::Key_Down: |
1065 | case Qt::Key_Up: | 1065 | case Qt::Key_Up: |
1066 | QWidget::keyPressEvent ( e ); | 1066 | QWidget::keyPressEvent ( e ); |
1067 | break; | 1067 | break; |
1068 | 1068 | ||
1069 | case Qt::Key_Q: | 1069 | case Qt::Key_Q: |
1070 | toggleQuickTodo(); | 1070 | toggleQuickTodo(); |
1071 | break; | 1071 | break; |
1072 | case Qt::Key_U: | 1072 | case Qt::Key_U: |
1073 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | 1073 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { |
1074 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 1074 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
1075 | unparentTodo(); | 1075 | unparentTodo(); |
1076 | e->accept(); | 1076 | e->accept(); |
1077 | } else | 1077 | } else |
1078 | e->ignore(); | 1078 | e->ignore(); |
1079 | break; | 1079 | break; |
1080 | case Qt::Key_S: | 1080 | case Qt::Key_S: |
1081 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | 1081 | if ( e->state() == Qt::ControlButton ) { |
1082 | e->ignore(); | ||
1083 | break; | ||
1084 | } | ||
1085 | if ( e->state() == Qt::ShiftButton ) { | ||
1082 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 1086 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
1083 | reparentTodo(); | 1087 | reparentTodo(); |
1084 | e->accept(); | 1088 | e->accept(); |
1085 | } else | 1089 | } else |
1086 | e->ignore(); | 1090 | e->ignore(); |
1087 | break; | 1091 | break; |
1088 | case Qt::Key_P: | 1092 | case Qt::Key_P: |
1089 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | 1093 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { |
1090 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 1094 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
1091 | if ( pendingSubtodo ) | 1095 | if ( pendingSubtodo ) |
1092 | itemClicked(mActiveItem); | 1096 | itemClicked(mActiveItem); |
1093 | e->accept(); | 1097 | e->accept(); |
1094 | } else | 1098 | } else |
1095 | e->ignore(); | 1099 | e->ignore(); |
1096 | break; | 1100 | break; |
1097 | case Qt::Key_Escape: | 1101 | case Qt::Key_Escape: |
1098 | if ( pendingSubtodo ) { | 1102 | if ( pendingSubtodo ) { |
1099 | itemClicked(0); | 1103 | itemClicked(0); |
1100 | e->accept(); | 1104 | e->accept(); |
1101 | } else | 1105 | } else |
1102 | e->ignore(); | 1106 | e->ignore(); |
1103 | break; | 1107 | break; |
1104 | default: | 1108 | default: |
1105 | e->ignore(); | 1109 | e->ignore(); |
1106 | } | 1110 | } |
1107 | 1111 | ||
1108 | if ( true ) { | 1112 | if ( true ) { |
1109 | if ( e->key() == Qt::Key_I ) { | 1113 | if ( e->key() == Qt::Key_I ) { |
1110 | KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); | 1114 | KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); |
1111 | if ( cn ) { | 1115 | if ( cn ) { |
1112 | mActiveItem = cn; | 1116 | mActiveItem = cn; |
1113 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); | 1117 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); |
1114 | if ( ci ){ | 1118 | if ( ci ){ |
1115 | showTodo(); | 1119 | showTodo(); |
1116 | cn = (KOTodoViewItem*)cn->itemBelow(); | 1120 | cn = (KOTodoViewItem*)cn->itemBelow(); |
1117 | if ( cn ) { | 1121 | if ( cn ) { |
1118 | mTodoListView->setCurrentItem ( cn ); | 1122 | mTodoListView->setCurrentItem ( cn ); |
1119 | mTodoListView->ensureItemVisible ( cn ); | 1123 | mTodoListView->ensureItemVisible ( cn ); |
1120 | } | 1124 | } |
1121 | 1125 | ||
1122 | } | 1126 | } |
1123 | } | 1127 | } |
1124 | e->accept(); | 1128 | e->accept(); |
1125 | 1129 | ||
1126 | } | 1130 | } |
1127 | 1131 | ||
1128 | } | 1132 | } |
1129 | 1133 | ||
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index a652c05..6bc5b3a 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -513,146 +513,147 @@ void MainWindow::initActions() | |||
513 | selectFilterMenu->setCheckable( true ); | 513 | selectFilterMenu->setCheckable( true ); |
514 | syncMenu = new QPopupMenu( this ); | 514 | syncMenu = new QPopupMenu( this ); |
515 | configureAgendaMenu = new QPopupMenu( this ); | 515 | configureAgendaMenu = new QPopupMenu( this ); |
516 | configureToolBarMenu = new QPopupMenu( this ); | 516 | configureToolBarMenu = new QPopupMenu( this ); |
517 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 517 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
518 | if ( KOPrefs::instance()->mShowFullMenu ) { | 518 | if ( KOPrefs::instance()->mShowFullMenu ) { |
519 | QMenuBar *menuBar1; | 519 | QMenuBar *menuBar1; |
520 | menuBar1 = menuBar(); | 520 | menuBar1 = menuBar(); |
521 | menuBar1->insertItem( i18n("File"), importMenu ); | 521 | menuBar1->insertItem( i18n("File"), importMenu ); |
522 | menuBar1->insertItem( i18n("View"), viewMenu ); | 522 | menuBar1->insertItem( i18n("View"), viewMenu ); |
523 | menuBar1->insertItem( i18n("Actions"), actionMenu ); | 523 | menuBar1->insertItem( i18n("Actions"), actionMenu ); |
524 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); | 524 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); |
525 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 525 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
526 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 526 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
527 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); | 527 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); |
528 | menuBar1->insertItem( i18n("Help"), helpMenu ); | 528 | menuBar1->insertItem( i18n("Help"), helpMenu ); |
529 | } else { | 529 | } else { |
530 | QPEMenuBar *menuBar1; | 530 | QPEMenuBar *menuBar1; |
531 | menuBar1 = new QPEMenuBar( iconToolBar ); | 531 | menuBar1 = new QPEMenuBar( iconToolBar ); |
532 | QPopupMenu *menuBar = new QPopupMenu( this ); | 532 | QPopupMenu *menuBar = new QPopupMenu( this ); |
533 | menuBar1->insertItem( i18n("ME"), menuBar); | 533 | menuBar1->insertItem( i18n("ME"), menuBar); |
534 | menuBar->insertItem( i18n("File"), importMenu ); | 534 | menuBar->insertItem( i18n("File"), importMenu ); |
535 | menuBar->insertItem( i18n("View"), viewMenu ); | 535 | menuBar->insertItem( i18n("View"), viewMenu ); |
536 | menuBar->insertItem( i18n("Actions"), actionMenu ); | 536 | menuBar->insertItem( i18n("Actions"), actionMenu ); |
537 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); | 537 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); |
538 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 538 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
539 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 539 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
540 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); | 540 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); |
541 | menuBar->insertItem( i18n("Help"), helpMenu ); | 541 | menuBar->insertItem( i18n("Help"), helpMenu ); |
542 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); | 542 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); |
543 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); | 543 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); |
544 | } | 544 | } |
545 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 545 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
546 | connect ( selectFilterMenu, SIGNAL( aboutToShow () ), this, SLOT (fillFilterMenu() ) ); | 546 | connect ( selectFilterMenu, SIGNAL( aboutToShow () ), this, SLOT (fillFilterMenu() ) ); |
547 | 547 | ||
548 | // ****************** | 548 | // ****************** |
549 | QAction *action; | 549 | QAction *action; |
550 | QIconSet icon; | 550 | QIconSet icon; |
551 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); | 551 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); |
552 | configureToolBarMenu->setCheckable( true ); | 552 | configureToolBarMenu->setCheckable( true ); |
553 | 553 | ||
554 | QString pathString = ""; | 554 | QString pathString = ""; |
555 | if ( !p->mToolBarMiniIcons ) { | 555 | if ( !p->mToolBarMiniIcons ) { |
556 | if ( QApplication::desktop()->width() < 480 ) | 556 | if ( QApplication::desktop()->width() < 480 ) |
557 | pathString += "icons16/"; | 557 | pathString += "icons16/"; |
558 | } else | 558 | } else |
559 | pathString += "iconsmini/"; | 559 | pathString += "iconsmini/"; |
560 | configureAgendaMenu->setCheckable( true ); | 560 | configureAgendaMenu->setCheckable( true ); |
561 | configureAgendaMenu->insertItem(i18n("Toggle Allday"), 1 ); | ||
562 | configureAgendaMenu->insertSeparator(); | ||
563 | configureAgendaMenu->insertItem(i18n("Tiny"), 4 ); | 561 | configureAgendaMenu->insertItem(i18n("Tiny"), 4 ); |
564 | configureAgendaMenu->insertItem(i18n("Small"), 6 ); | 562 | configureAgendaMenu->insertItem(i18n("Small"), 6 ); |
565 | configureAgendaMenu->insertItem(i18n("Medium"), 8 ); | 563 | configureAgendaMenu->insertItem(i18n("Medium"), 8 ); |
566 | configureAgendaMenu->insertItem(i18n("Normal"), 10 ); | 564 | configureAgendaMenu->insertItem(i18n("Normal"), 10 ); |
567 | configureAgendaMenu->insertItem(i18n("Large"), 12 ); | 565 | configureAgendaMenu->insertItem(i18n("Large"), 12 ); |
568 | configureAgendaMenu->insertItem(i18n("Big"), 14 ); | 566 | configureAgendaMenu->insertItem(i18n("Big"), 14 ); |
569 | configureAgendaMenu->insertItem(i18n("Bigger"), 16 ); | 567 | configureAgendaMenu->insertItem(i18n("Bigger"), 16 ); |
570 | configureAgendaMenu->insertItem(i18n("Biggest"), 18 ); | 568 | configureAgendaMenu->insertItem(i18n("Biggest"), 18 ); |
571 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); | 569 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); |
572 | 570 | ||
573 | icon = loadPixmap( pathString + "configure" ); | 571 | icon = loadPixmap( pathString + "configure" ); |
574 | action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); | 572 | action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); |
575 | action->addTo( actionMenu ); | 573 | action->addTo( actionMenu ); |
576 | connect( action, SIGNAL( activated() ), | 574 | connect( action, SIGNAL( activated() ), |
577 | mView, SLOT( edit_options() ) ); | 575 | mView, SLOT( edit_options() ) ); |
578 | actionMenu->insertSeparator(); | 576 | actionMenu->insertSeparator(); |
579 | 577 | ||
580 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); | 578 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); |
581 | action->addTo( actionMenu ); | 579 | action->addTo( actionMenu ); |
582 | connect( action, SIGNAL( activated() ), | 580 | connect( action, SIGNAL( activated() ), |
583 | mView, SLOT( undo_delete() ) ); | 581 | mView, SLOT( undo_delete() ) ); |
584 | actionMenu->insertSeparator(); | 582 | actionMenu->insertSeparator(); |
585 | 583 | ||
586 | icon = loadPixmap( pathString + "newevent" ); | 584 | icon = loadPixmap( pathString + "newevent" ); |
587 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); | 585 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); |
588 | configureToolBarMenu->insertSeparator(); | 586 | configureToolBarMenu->insertSeparator(); |
589 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); | 587 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); |
590 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); | 588 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); |
591 | ne_action->addTo( actionMenu ); | 589 | ne_action->addTo( actionMenu ); |
592 | connect( ne_action, SIGNAL( activated() ), | 590 | connect( ne_action, SIGNAL( activated() ), |
593 | mView, SLOT( newEvent() ) ); | 591 | mView, SLOT( newEvent() ) ); |
594 | icon = loadPixmap( pathString + "newtodo" ); | 592 | icon = loadPixmap( pathString + "newtodo" ); |
595 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); | 593 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); |
596 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); | 594 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); |
597 | nt_action->addTo( actionMenu ); | 595 | nt_action->addTo( actionMenu ); |
598 | connect( nt_action, SIGNAL( activated() ), | 596 | connect( nt_action, SIGNAL( activated() ), |
599 | mView, SLOT( newTodo() ) ); | 597 | mView, SLOT( newTodo() ) ); |
600 | icon = loadPixmap( pathString + "navi" ); | 598 | icon = loadPixmap( pathString + "navi" ); |
601 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); | 599 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); |
602 | action->addTo( viewMenu ); | 600 | action->addTo( viewMenu ); |
603 | connect( action, SIGNAL( activated() ), | 601 | connect( action, SIGNAL( activated() ), |
604 | mView, SLOT( toggleDateNavigatorWidget() ) ); | 602 | mView, SLOT( toggleDateNavigatorWidget() ) ); |
605 | icon = loadPixmap( pathString + "filter" ); | 603 | icon = loadPixmap( pathString + "filter" ); |
606 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); | 604 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); |
607 | action->addTo( viewMenu ); | 605 | action->addTo( viewMenu ); |
608 | connect( action, SIGNAL( activated() ), | 606 | connect( action, SIGNAL( activated() ), |
609 | mView, SLOT( toggleFilter() ) ); | 607 | mView, SLOT( toggleFilter() ) ); |
610 | 608 | action = new QAction( i18n("Toggle Allday"), i18n("Toggle Allday"), 0, this ); | |
609 | action->addTo( viewMenu ); | ||
610 | connect( action, SIGNAL( activated() ), | ||
611 | mView, SLOT( toggleAllDaySize() ) ); | ||
611 | 612 | ||
612 | viewMenu->insertSeparator(); | 613 | viewMenu->insertSeparator(); |
613 | icon = loadPixmap( pathString + "picker" ); | 614 | icon = loadPixmap( pathString + "picker" ); |
614 | action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); | 615 | action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); |
615 | action->addTo( viewMenu ); | 616 | action->addTo( viewMenu ); |
616 | connect( action, SIGNAL( activated() ), | 617 | connect( action, SIGNAL( activated() ), |
617 | mView, SLOT( showDatePicker() ) ); | 618 | mView, SLOT( showDatePicker() ) ); |
618 | action->addTo( iconToolBar ); | 619 | action->addTo( iconToolBar ); |
619 | viewMenu->insertSeparator(); | 620 | viewMenu->insertSeparator(); |
620 | icon = loadPixmap( pathString + "list" ); | 621 | icon = loadPixmap( pathString + "list" ); |
621 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); | 622 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); |
622 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); | 623 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); |
623 | showlist_action->addTo( viewMenu ); | 624 | showlist_action->addTo( viewMenu ); |
624 | connect( showlist_action, SIGNAL( activated() ), | 625 | connect( showlist_action, SIGNAL( activated() ), |
625 | mView->viewManager(), SLOT( showListView() ) ); | 626 | mView->viewManager(), SLOT( showListView() ) ); |
626 | 627 | ||
627 | 628 | ||
628 | icon = loadPixmap( pathString + "day" ); | 629 | icon = loadPixmap( pathString + "day" ); |
629 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); | 630 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); |
630 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); | 631 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); |
631 | day1_action->addTo( viewMenu ); | 632 | day1_action->addTo( viewMenu ); |
632 | // action->addTo( toolBar ); | 633 | // action->addTo( toolBar ); |
633 | connect( day1_action, SIGNAL( activated() ), | 634 | connect( day1_action, SIGNAL( activated() ), |
634 | mView->viewManager(), SLOT( showDayView() ) ); | 635 | mView->viewManager(), SLOT( showDayView() ) ); |
635 | 636 | ||
636 | icon = loadPixmap( pathString + "workweek" ); | 637 | icon = loadPixmap( pathString + "workweek" ); |
637 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); | 638 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); |
638 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); | 639 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); |
639 | day5_action->addTo( viewMenu ); | 640 | day5_action->addTo( viewMenu ); |
640 | connect( day5_action, SIGNAL( activated() ), | 641 | connect( day5_action, SIGNAL( activated() ), |
641 | mView->viewManager(), SLOT( showWorkWeekView() ) ); | 642 | mView->viewManager(), SLOT( showWorkWeekView() ) ); |
642 | 643 | ||
643 | icon = loadPixmap( pathString + "week" ); | 644 | icon = loadPixmap( pathString + "week" ); |
644 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); | 645 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); |
645 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); | 646 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); |
646 | day7_action->addTo( viewMenu ); | 647 | day7_action->addTo( viewMenu ); |
647 | connect( day7_action, SIGNAL( activated() ), | 648 | connect( day7_action, SIGNAL( activated() ), |
648 | mView->viewManager(), SLOT( showWeekView() ) ); | 649 | mView->viewManager(), SLOT( showWeekView() ) ); |
649 | 650 | ||
650 | icon = loadPixmap( pathString + "month" ); | 651 | icon = loadPixmap( pathString + "month" ); |
651 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); | 652 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); |
652 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); | 653 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); |
653 | month_action->addTo( viewMenu ); | 654 | month_action->addTo( viewMenu ); |
654 | connect( month_action, SIGNAL( activated() ), | 655 | connect( month_action, SIGNAL( activated() ), |
655 | mView->viewManager(), SLOT( showMonthView() ) ); | 656 | mView->viewManager(), SLOT( showMonthView() ) ); |
656 | 657 | ||
657 | icon = loadPixmap( pathString + "todo" ); | 658 | icon = loadPixmap( pathString + "todo" ); |
658 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); | 659 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); |
@@ -1093,232 +1094,212 @@ void MainWindow::exportToPhone( int mode ) | |||
1093 | } | 1094 | } |
1094 | incidence = delSel.next(); | 1095 | incidence = delSel.next(); |
1095 | } | 1096 | } |
1096 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, | 1097 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, |
1097 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, | 1098 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, |
1098 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1099 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1099 | 1100 | ||
1100 | setCaption( i18n("Writing to phone...")); | 1101 | setCaption( i18n("Writing to phone...")); |
1101 | if ( PhoneFormat::writeToPhone( cal ) ) | 1102 | if ( PhoneFormat::writeToPhone( cal ) ) |
1102 | setCaption( i18n("Export to phone successful!")); | 1103 | setCaption( i18n("Export to phone successful!")); |
1103 | else | 1104 | else |
1104 | setCaption( i18n("Error exporting to phone!")); | 1105 | setCaption( i18n("Error exporting to phone!")); |
1105 | delete cal; | 1106 | delete cal; |
1106 | } | 1107 | } |
1107 | 1108 | ||
1108 | 1109 | ||
1109 | void MainWindow::setDefaultPreferences() | 1110 | void MainWindow::setDefaultPreferences() |
1110 | { | 1111 | { |
1111 | KOPrefs *p = KOPrefs::instance(); | 1112 | KOPrefs *p = KOPrefs::instance(); |
1112 | 1113 | ||
1113 | p->mCompactDialogs = true; | 1114 | p->mCompactDialogs = true; |
1114 | p->mConfirm = true; | 1115 | p->mConfirm = true; |
1115 | // p->mEnableQuickTodo = false; | 1116 | // p->mEnableQuickTodo = false; |
1116 | 1117 | ||
1117 | } | 1118 | } |
1118 | 1119 | ||
1119 | QString MainWindow::resourcePath() | 1120 | QString MainWindow::resourcePath() |
1120 | { | 1121 | { |
1121 | return KGlobal::iconLoader()->iconPath(); | 1122 | return KGlobal::iconLoader()->iconPath(); |
1122 | } | 1123 | } |
1123 | 1124 | ||
1124 | void MainWindow::displayText( QString text ,QString cap ) | 1125 | void MainWindow::displayText( QString text ,QString cap ) |
1125 | { | 1126 | { |
1126 | QDialog dia( this, "name", true ); ; | 1127 | QDialog dia( this, "name", true ); ; |
1127 | dia.setCaption( cap ); | 1128 | dia.setCaption( cap ); |
1128 | QVBoxLayout* lay = new QVBoxLayout( &dia ); | 1129 | QVBoxLayout* lay = new QVBoxLayout( &dia ); |
1129 | lay->setSpacing( 3 ); | 1130 | lay->setSpacing( 3 ); |
1130 | lay->setMargin( 3 ); | 1131 | lay->setMargin( 3 ); |
1131 | QTextBrowser tb ( &dia ); | 1132 | QTextBrowser tb ( &dia ); |
1132 | lay->addWidget( &tb ); | 1133 | lay->addWidget( &tb ); |
1133 | tb.setText( text ); | 1134 | tb.setText( text ); |
1134 | #ifdef DESKTOP_VERSION | 1135 | #ifdef DESKTOP_VERSION |
1135 | dia.resize( 640, 480); | 1136 | dia.resize( 640, 480); |
1136 | #else | 1137 | #else |
1137 | dia.showMaximized(); | 1138 | dia.showMaximized(); |
1138 | #endif | 1139 | #endif |
1139 | dia.exec(); | 1140 | dia.exec(); |
1140 | } | 1141 | } |
1141 | void MainWindow::displayFile( QString fn, QString cap ) | ||
1142 | { | ||
1143 | QString fileName = resourcePath() + fn; | ||
1144 | QString text; | ||
1145 | QFile file( fileName ); | ||
1146 | if (!file.open( IO_ReadOnly ) ) { | ||
1147 | return ; | ||
1148 | 1142 | ||
1149 | } | ||
1150 | QTextStream ts( &file ); | ||
1151 | text = ts.read(); | ||
1152 | file.close(); | ||
1153 | displayText( text, cap); | ||
1154 | } | ||
1155 | void MainWindow::features() | 1143 | void MainWindow::features() |
1156 | { | 1144 | { |
1157 | 1145 | ||
1158 | displayFile( "featuresKOPI.txt",i18n("KO/Pi Features and hints") ); | 1146 | KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); |
1159 | } | 1147 | } |
1160 | 1148 | ||
1161 | void MainWindow::usertrans() | 1149 | void MainWindow::usertrans() |
1162 | { | 1150 | { |
1163 | 1151 | ||
1164 | displayFile( "usertranslationHOWTO.txt",i18n("KO/Pi User translation HowTo") ); | 1152 | KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); |
1165 | } | 1153 | } |
1166 | 1154 | ||
1167 | void MainWindow::kdesynchowto() | 1155 | void MainWindow::kdesynchowto() |
1168 | { | 1156 | { |
1169 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); | 1157 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); |
1170 | } | 1158 | } |
1171 | void MainWindow::multisynchowto() | 1159 | void MainWindow::multisynchowto() |
1172 | { | 1160 | { |
1173 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); | 1161 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); |
1174 | } | 1162 | } |
1175 | void MainWindow::synchowto() | 1163 | void MainWindow::synchowto() |
1176 | { | 1164 | { |
1177 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); | 1165 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); |
1178 | } | 1166 | } |
1179 | void MainWindow::faq() | 1167 | void MainWindow::faq() |
1180 | { | 1168 | { |
1181 | displayFile( "kopiFAQ.txt",i18n("KO/Pi FAQ") ); | 1169 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); |
1182 | 1170 | ||
1183 | } | 1171 | } |
1184 | void MainWindow::whatsNew() | 1172 | void MainWindow::whatsNew() |
1185 | { | 1173 | { |
1186 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); | 1174 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); |
1187 | 1175 | ||
1188 | } | 1176 | } |
1189 | void MainWindow::licence() | 1177 | void MainWindow::licence() |
1190 | { | 1178 | { |
1191 | KApplication::showLicence(); | 1179 | KApplication::showLicence(); |
1192 | 1180 | ||
1193 | } | 1181 | } |
1194 | void MainWindow::about() | 1182 | void MainWindow::about() |
1195 | { | 1183 | { |
1196 | QString version; | 1184 | QString version; |
1197 | #include <../version> | 1185 | #include <../version> |
1198 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), | 1186 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), |
1199 | i18n("KOrganizer/Platform-independent\n") + | 1187 | i18n("KOrganizer/Platform-independent\n") + |
1200 | "(KO/Pi) " + version + " - " + | 1188 | "(KO/Pi) " + version + " - " + |
1201 | 1189 | ||
1202 | #ifdef DESKTOP_VERSION | 1190 | #ifdef DESKTOP_VERSION |
1203 | i18n("Desktop Edition\n") + | 1191 | i18n("Desktop Edition\n") + |
1204 | #else | 1192 | #else |
1205 | i18n("PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n") + | 1193 | i18n("PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n") + |
1206 | #endif | 1194 | #endif |
1207 | i18n("(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n") ); | 1195 | i18n("(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n") ); |
1208 | } | 1196 | } |
1209 | void MainWindow::keyBindings() | 1197 | void MainWindow::keyBindings() |
1210 | { | 1198 | { |
1211 | QString cap = i18n("Key bindings KOrganizer/Pi"); | 1199 | QString cap = i18n("KO/Pi Keys + Colors"); |
1212 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + | 1200 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + |
1213 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ | 1201 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ |
1214 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + | 1202 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + |
1215 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ | 1203 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ |
1216 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ | 1204 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ |
1217 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ | 1205 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ |
1218 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ | 1206 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ |
1219 | i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ | 1207 | i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ |
1220 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ | 1208 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ |
1221 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ | 1209 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ |
1222 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ | 1210 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ |
1223 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ | 1211 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ |
1224 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ | 1212 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ |
1225 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ | 1213 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ |
1226 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ | 1214 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ |
1227 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ | 1215 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ |
1228 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ | 1216 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ |
1229 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ | 1217 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ |
1230 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ | 1218 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ |
1231 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ | 1219 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ |
1232 | i18n("<p><h3>In agenda view:</h3></p>\n") + | 1220 | i18n("<p><h3>In agenda view:</h3></p>\n") + |
1233 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ | 1221 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ |
1234 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ | 1222 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ |
1235 | i18n("<p><h3>In todo view:</h3></p>\n") + | 1223 | i18n("<p><h3>In todo view:</h3></p>\n") + |
1236 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ | 1224 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ |
1237 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ | 1225 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ |
1238 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ | 1226 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ |
1239 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ | 1227 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ |
1240 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1228 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1241 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ | 1229 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ |
1242 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ | 1230 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ |
1243 | i18n("<p><h3>In list view:</h3></p>\n") + | 1231 | i18n("<p><h3>In list view:</h3></p>\n") + |
1244 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1232 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1245 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ | 1233 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ |
1246 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ | 1234 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ |
1247 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ | 1235 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ |
1248 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ | 1236 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ |
1249 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ | 1237 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ |
1250 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + | 1238 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + |
1251 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ | 1239 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ |
1252 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ | 1240 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ |
1253 | i18n("<p><b>E</b>: Edit item</p>\n") + | 1241 | i18n("<p><b>E</b>: Edit item</p>\n") + |
1254 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + | 1242 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + |
1255 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + | 1243 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + |
1256 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ | 1244 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ |
1257 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ | 1245 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ |
1258 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ | 1246 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ |
1259 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ | 1247 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ |
1260 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ | 1248 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ |
1261 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + | 1249 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + |
1262 | i18n("<p><b>White</b>: Item readonly</p>\n"); | 1250 | i18n("<p><b>White</b>: Item readonly</p>\n"); |
1263 | displayText( text, cap); | 1251 | displayText( text, cap); |
1264 | |||
1265 | } | 1252 | } |
1266 | void MainWindow::aboutAutoSaving() | 1253 | void MainWindow::aboutAutoSaving() |
1267 | { | 1254 | { |
1268 | QMessageBox* msg; | 1255 | QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configureable) 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"); |
1269 | msg = new QMessageBox( i18n("Auto Saving in KOrganizer/Pi"), | ||
1270 | i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configureable) 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"), QMessageBox::NoIcon, | ||
1271 | QMessageBox::Ok, | ||
1272 | QMessageBox::NoButton, | ||
1273 | QMessageBox::NoButton); | ||
1274 | msg->exec(); | ||
1275 | delete msg; | ||
1276 | 1256 | ||
1257 | KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); | ||
1277 | 1258 | ||
1278 | } | 1259 | } |
1279 | void MainWindow::aboutKnownBugs() | 1260 | void MainWindow::aboutKnownBugs() |
1280 | { | 1261 | { |
1281 | QMessageBox* msg; | 1262 | QMessageBox* msg; |
1282 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), | 1263 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), |
1283 | 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")+ | 1264 | 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")+ |
1284 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ | 1265 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ |
1285 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") + | 1266 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") + |
1286 | i18n("\nor report them in the bugtracker on\n") + | 1267 | i18n("\nor report them in the bugtracker on\n") + |
1287 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), | 1268 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), |
1288 | QMessageBox::NoIcon, | 1269 | QMessageBox::NoIcon, |
1289 | QMessageBox::Ok, | 1270 | QMessageBox::Ok, |
1290 | QMessageBox::NoButton, | 1271 | QMessageBox::NoButton, |
1291 | QMessageBox::NoButton); | 1272 | QMessageBox::NoButton); |
1292 | msg->exec(); | 1273 | msg->exec(); |
1293 | delete msg; | 1274 | delete msg; |
1294 | 1275 | ||
1295 | } | 1276 | } |
1296 | 1277 | ||
1297 | QString MainWindow::defaultFileName() | 1278 | QString MainWindow::defaultFileName() |
1298 | { | 1279 | { |
1299 | return locateLocal( "data", "korganizer/mycalendar.ics" ); | 1280 | return locateLocal( "data", "korganizer/mycalendar.ics" ); |
1300 | } | 1281 | } |
1301 | QString MainWindow::syncFileName() | 1282 | QString MainWindow::syncFileName() |
1302 | { | 1283 | { |
1303 | #ifdef DESKTOP_VERSION | 1284 | #ifdef DESKTOP_VERSION |
1304 | return locateLocal( "tmp", "synccalendar.ics" ); | 1285 | return locateLocal( "tmp", "synccalendar.ics" ); |
1305 | #else | 1286 | #else |
1306 | return QString( "/tmp/synccalendar.ics" ); | 1287 | return QString( "/tmp/synccalendar.ics" ); |
1307 | #endif | 1288 | #endif |
1308 | } | 1289 | } |
1309 | 1290 | ||
1310 | void MainWindow::processIncidenceSelection( Incidence *incidence ) | 1291 | void MainWindow::processIncidenceSelection( Incidence *incidence ) |
1311 | { | 1292 | { |
1312 | if ( !incidence ) { | 1293 | if ( !incidence ) { |
1313 | enableIncidenceActions( false ); | 1294 | enableIncidenceActions( false ); |
1314 | 1295 | ||
1315 | mNewSubTodoAction->setEnabled( false ); | 1296 | mNewSubTodoAction->setEnabled( false ); |
1316 | setCaptionToDates(); | 1297 | setCaptionToDates(); |
1317 | return; | 1298 | return; |
1318 | 1299 | ||
1319 | } | 1300 | } |
1320 | 1301 | ||
1321 | //KGlobal::locale()->formatDateTime(nextA, true); | 1302 | //KGlobal::locale()->formatDateTime(nextA, true); |
1322 | QString startString = ""; | 1303 | QString startString = ""; |
1323 | if ( incidence->type() != "Todo" ) { | 1304 | if ( incidence->type() != "Todo" ) { |
1324 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { | 1305 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { |
@@ -1681,100 +1662,96 @@ void MainWindow::selectFilter( int fil ) | |||
1681 | mView->toggleFilerEnabled( ); | 1662 | mView->toggleFilerEnabled( ); |
1682 | } else { | 1663 | } else { |
1683 | mView->selectFilter( fil-1 ); | 1664 | mView->selectFilter( fil-1 ); |
1684 | } | 1665 | } |
1685 | } | 1666 | } |
1686 | void MainWindow::configureToolBar( int item ) | 1667 | void MainWindow::configureToolBar( int item ) |
1687 | { | 1668 | { |
1688 | 1669 | ||
1689 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); | 1670 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); |
1690 | KOPrefs *p = KOPrefs::instance(); | 1671 | KOPrefs *p = KOPrefs::instance(); |
1691 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); | 1672 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); |
1692 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); | 1673 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); |
1693 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); | 1674 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); |
1694 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); | 1675 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); |
1695 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); | 1676 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); |
1696 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); | 1677 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); |
1697 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); | 1678 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); |
1698 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); | 1679 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); |
1699 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); | 1680 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); |
1700 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); | 1681 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); |
1701 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); | 1682 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); |
1702 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); | 1683 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); |
1703 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); | 1684 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); |
1704 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); | 1685 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); |
1705 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); | 1686 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); |
1706 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); | 1687 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); |
1707 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); | 1688 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); |
1708 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); | 1689 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); |
1709 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); | 1690 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); |
1710 | // initActions(); | 1691 | // initActions(); |
1711 | } | 1692 | } |
1712 | 1693 | ||
1713 | void MainWindow::setCaptionToDates() | 1694 | void MainWindow::setCaptionToDates() |
1714 | { | 1695 | { |
1715 | QString selDates; | 1696 | QString selDates; |
1716 | selDates = KGlobal::locale()->formatDate(mView->startDate(), true); | 1697 | selDates = KGlobal::locale()->formatDate(mView->startDate(), true); |
1717 | if (mView->startDate() < mView->endDate() ) | 1698 | if (mView->startDate() < mView->endDate() ) |
1718 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); | 1699 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); |
1719 | setCaption( i18n("Dates: ") + selDates ); | 1700 | setCaption( i18n("Dates: ") + selDates ); |
1720 | 1701 | ||
1721 | } | 1702 | } |
1722 | // parameter item == 0: reinit | 1703 | // parameter item == 0: reinit |
1723 | void MainWindow::configureAgenda( int item ) | 1704 | void MainWindow::configureAgenda( int item ) |
1724 | { | 1705 | { |
1725 | 1706 | ||
1726 | KOPrefs *p = KOPrefs::instance(); | 1707 | KOPrefs *p = KOPrefs::instance(); |
1727 | 1708 | ||
1728 | int i; | 1709 | int i; |
1729 | if ( item == 1 ) { | ||
1730 | mView->toggleAllDaySize(); | ||
1731 | return; | ||
1732 | } | ||
1733 | // do not allow 4 for widgets higher than 480 | 1710 | // do not allow 4 for widgets higher than 480 |
1734 | // if ( QApplication::desktop()->height() > 480 ) { | 1711 | // if ( QApplication::desktop()->height() > 480 ) { |
1735 | // if ( item == 4 ) | 1712 | // if ( item == 4 ) |
1736 | // item = 6; | 1713 | // item = 6; |
1737 | // } | 1714 | // } |
1738 | for ( i = 4; i <= 18; i= i+2 ) | 1715 | for ( i = 4; i <= 18; i= i+2 ) |
1739 | configureAgendaMenu->setItemChecked( i, false ); | 1716 | configureAgendaMenu->setItemChecked( i, false ); |
1740 | configureAgendaMenu->setItemChecked( item, true ); | 1717 | configureAgendaMenu->setItemChecked( item, true ); |
1741 | if ( p->mHourSize == item ) | 1718 | if ( p->mHourSize == item ) |
1742 | return; | 1719 | return; |
1743 | p->mHourSize=item; | 1720 | p->mHourSize=item; |
1744 | mView->viewManager()->agendaView()->updateConfig(); | 1721 | mView->viewManager()->agendaView()->updateConfig(); |
1745 | } | 1722 | } |
1746 | 1723 | ||
1747 | void MainWindow::saveCalendar() | 1724 | void MainWindow::saveCalendar() |
1748 | { | 1725 | { |
1749 | QString fn = KOPrefs::instance()->mLastSaveFile; | 1726 | QString fn = KOPrefs::instance()->mLastSaveFile; |
1750 | fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this ); | 1727 | fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this ); |
1751 | 1728 | ||
1752 | if ( fn == "" ) | 1729 | if ( fn == "" ) |
1753 | return; | 1730 | return; |
1754 | QFileInfo info; | 1731 | QFileInfo info; |
1755 | info.setFile( fn ); | 1732 | info.setFile( fn ); |
1756 | QString mes; | 1733 | QString mes; |
1757 | bool createbup = true; | 1734 | bool createbup = true; |
1758 | if ( info. exists() ) { | 1735 | if ( info. exists() ) { |
1759 | mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ; | 1736 | mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ; |
1760 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 1737 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
1761 | i18n("Overwrite!"), i18n("Cancel"), 0, | 1738 | i18n("Overwrite!"), i18n("Cancel"), 0, |
1762 | 0, 1 ); | 1739 | 0, 1 ); |
1763 | if ( result != 0 ) { | 1740 | if ( result != 0 ) { |
1764 | createbup = false; | 1741 | createbup = false; |
1765 | } | 1742 | } |
1766 | } | 1743 | } |
1767 | if ( createbup ) { | 1744 | if ( createbup ) { |
1768 | mView->saveCalendar( fn ); | 1745 | mView->saveCalendar( fn ); |
1769 | mes = i18n("KO/Pi:Saved %1").arg(fn); | 1746 | mes = i18n("KO/Pi:Saved %1").arg(fn); |
1770 | KOPrefs::instance()->mLastSaveFile = fn; | 1747 | KOPrefs::instance()->mLastSaveFile = fn; |
1771 | setCaption(mes); | 1748 | setCaption(mes); |
1772 | } | 1749 | } |
1773 | } | 1750 | } |
1774 | void MainWindow::loadCalendar() | 1751 | void MainWindow::loadCalendar() |
1775 | { | 1752 | { |
1776 | 1753 | ||
1777 | QString fn = KOPrefs::instance()->mLastLoadFile; | 1754 | QString fn = KOPrefs::instance()->mLastLoadFile; |
1778 | fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); | 1755 | fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); |
1779 | 1756 | ||
1780 | if ( fn == "" ) | 1757 | if ( fn == "" ) |
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index ed65d36..96e627e 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -42,97 +42,96 @@ class MainWindow : public QMainWindow | |||
42 | virtual void showMaximized (); | 42 | virtual void showMaximized (); |
43 | void configureAgenda( int ); | 43 | void configureAgenda( int ); |
44 | void recieve( const QCString& msg, const QByteArray& data ); | 44 | void recieve( const QCString& msg, const QByteArray& data ); |
45 | static QString defaultFileName(); | 45 | static QString defaultFileName(); |
46 | static QString syncFileName(); | 46 | static QString syncFileName(); |
47 | static QString resourcePath(); | 47 | static QString resourcePath(); |
48 | protected slots: | 48 | protected slots: |
49 | void setCaptionToDates(); | 49 | void setCaptionToDates(); |
50 | void about(); | 50 | void about(); |
51 | void licence(); | 51 | void licence(); |
52 | void faq(); | 52 | void faq(); |
53 | void usertrans(); | 53 | void usertrans(); |
54 | void features(); | 54 | void features(); |
55 | void synchowto(); | 55 | void synchowto(); |
56 | void kdesynchowto(); | 56 | void kdesynchowto(); |
57 | void multisynchowto(); | 57 | void multisynchowto(); |
58 | void whatsNew(); | 58 | void whatsNew(); |
59 | void keyBindings(); | 59 | void keyBindings(); |
60 | void aboutAutoSaving();; | 60 | void aboutAutoSaving();; |
61 | void aboutKnownBugs(); | 61 | void aboutKnownBugs(); |
62 | 62 | ||
63 | void processIncidenceSelection( Incidence * ); | 63 | void processIncidenceSelection( Incidence * ); |
64 | 64 | ||
65 | void importQtopia(); | 65 | void importQtopia(); |
66 | void importBday(); | 66 | void importBday(); |
67 | void importOL(); | 67 | void importOL(); |
68 | void importIcal(); | 68 | void importIcal(); |
69 | void importFile( QString, bool ); | 69 | void importFile( QString, bool ); |
70 | void quickImportIcal(); | 70 | void quickImportIcal(); |
71 | 71 | ||
72 | void slotModifiedChanged( bool ); | 72 | void slotModifiedChanged( bool ); |
73 | 73 | ||
74 | void save(); | 74 | void save(); |
75 | void configureToolBar( int ); | 75 | void configureToolBar( int ); |
76 | void printSel(); | 76 | void printSel(); |
77 | void printCal(); | 77 | void printCal(); |
78 | void saveCalendar(); | 78 | void saveCalendar(); |
79 | void loadCalendar(); | 79 | void loadCalendar(); |
80 | void exportVCalendar(); | 80 | void exportVCalendar(); |
81 | void fillFilterMenu(); | 81 | void fillFilterMenu(); |
82 | void selectFilter( int ); | 82 | void selectFilter( int ); |
83 | void exportToPhone( int ); | 83 | void exportToPhone( int ); |
84 | void toggleBeamReceive(); | 84 | void toggleBeamReceive(); |
85 | void disableBR(bool); | 85 | void disableBR(bool); |
86 | 86 | ||
87 | 87 | ||
88 | protected: | 88 | protected: |
89 | void displayText( QString, QString); | 89 | void displayText( QString, QString); |
90 | void displayFile( QString, QString); | ||
91 | 90 | ||
92 | void enableIncidenceActions( bool ); | 91 | void enableIncidenceActions( bool ); |
93 | 92 | ||
94 | private slots: | 93 | private slots: |
95 | QSocket* piSocket; | 94 | QSocket* piSocket; |
96 | QString piFileString; | 95 | QString piFileString; |
97 | QTime piTime; | 96 | QTime piTime; |
98 | void getFile( bool ); | 97 | void getFile( bool ); |
99 | void syncFileRequest(); | 98 | void syncFileRequest(); |
100 | private: | 99 | private: |
101 | bool mBRdisabled; | 100 | bool mBRdisabled; |
102 | #ifndef DESKTOP_VERSION | 101 | #ifndef DESKTOP_VERSION |
103 | QCopChannel* infrared; | 102 | QCopChannel* infrared; |
104 | #endif | 103 | #endif |
105 | QAction* brAction; | 104 | QAction* brAction; |
106 | KSyncManager* mSyncManager; | 105 | KSyncManager* mSyncManager; |
107 | bool mClosed; | 106 | bool mClosed; |
108 | void saveOnClose(); | 107 | void saveOnClose(); |
109 | bool mFlagKeyPressed; | 108 | bool mFlagKeyPressed; |
110 | bool mBlockAtStartup; | 109 | bool mBlockAtStartup; |
111 | QPEToolBar *iconToolBar; | 110 | QPEToolBar *iconToolBar; |
112 | void initActions(); | 111 | void initActions(); |
113 | void setDefaultPreferences(); | 112 | void setDefaultPreferences(); |
114 | void keyPressEvent ( QKeyEvent * ) ; | 113 | void keyPressEvent ( QKeyEvent * ) ; |
115 | void keyReleaseEvent ( QKeyEvent * ) ; | 114 | void keyReleaseEvent ( QKeyEvent * ) ; |
116 | QPopupMenu *configureToolBarMenu; | 115 | QPopupMenu *configureToolBarMenu; |
117 | QPopupMenu *selectFilterMenu; | 116 | QPopupMenu *selectFilterMenu; |
118 | QPopupMenu *configureAgendaMenu, *syncMenu; | 117 | QPopupMenu *configureAgendaMenu, *syncMenu; |
119 | CalendarLocal *mCalendar; | 118 | CalendarLocal *mCalendar; |
120 | CalendarView *mView; | 119 | CalendarView *mView; |
121 | QAction *mNewSubTodoAction; | 120 | QAction *mNewSubTodoAction; |
122 | 121 | ||
123 | QAction *mShowAction; | 122 | QAction *mShowAction; |
124 | QAction *mEditAction; | 123 | QAction *mEditAction; |
125 | QAction *mDeleteAction; | 124 | QAction *mDeleteAction; |
126 | QAction *mCloneAction; | 125 | QAction *mCloneAction; |
127 | QAction *mMoveAction; | 126 | QAction *mMoveAction; |
128 | QAction *mBeamAction; | 127 | QAction *mBeamAction; |
129 | QAction *mCancelAction; | 128 | QAction *mCancelAction; |
130 | 129 | ||
131 | void closeEvent( QCloseEvent* ce ); | 130 | void closeEvent( QCloseEvent* ce ); |
132 | SimpleAlarmClient mAlarmClient; | 131 | SimpleAlarmClient mAlarmClient; |
133 | QTimer mSaveTimer; | 132 | QTimer mSaveTimer; |
134 | //bool mBlockSaveFlag; | 133 | //bool mBlockSaveFlag; |
135 | bool mCalendarModifiedFlag; | 134 | bool mCalendarModifiedFlag; |
136 | QPixmap loadPixmap( QString ); | 135 | QPixmap loadPixmap( QString ); |
137 | }; | 136 | }; |
138 | 137 | ||
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index d6f556d..21aa0a4 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp | |||
@@ -1,108 +1,110 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | #include <stdio.h> | 2 | #include <stdio.h> |
3 | 3 | ||
4 | #include "kapplication.h" | 4 | #include "kapplication.h" |
5 | #include "ktextedit.h" | ||
5 | #include <qapplication.h> | 6 | #include <qapplication.h> |
6 | #include <qstring.h> | 7 | #include <qstring.h> |
7 | #include <qfile.h> | 8 | #include <qfile.h> |
8 | #include <qtextstream.h> | 9 | #include <qtextstream.h> |
9 | #include <qdialog.h> | 10 | #include <qdialog.h> |
10 | #include <qlayout.h> | 11 | #include <qlayout.h> |
11 | #include <qtextbrowser.h> | 12 | #include <qtextbrowser.h> |
12 | 13 | ||
13 | int KApplication::random() | 14 | int KApplication::random() |
14 | { | 15 | { |
15 | return rand(); | 16 | return rand(); |
16 | } | 17 | } |
17 | 18 | ||
18 | //US | 19 | //US |
19 | QString KApplication::randomString(int length) | 20 | QString KApplication::randomString(int length) |
20 | { | 21 | { |
21 | if (length <=0 ) return QString::null; | 22 | if (length <=0 ) return QString::null; |
22 | 23 | ||
23 | QString str; | 24 | QString str; |
24 | while (length--) | 25 | while (length--) |
25 | { | 26 | { |
26 | int r=random() % 62; | 27 | int r=random() % 62; |
27 | r+=48; | 28 | r+=48; |
28 | if (r>57) r+=7; | 29 | if (r>57) r+=7; |
29 | if (r>90) r+=6; | 30 | if (r>90) r+=6; |
30 | str += char(r); | 31 | str += char(r); |
31 | // so what if I work backwards? | 32 | // so what if I work backwards? |
32 | } | 33 | } |
33 | return str; | 34 | return str; |
34 | } | 35 | } |
35 | int KApplication::execDialog( QDialog* d ) | 36 | int KApplication::execDialog( QDialog* d ) |
36 | { | 37 | { |
37 | if (QApplication::desktop()->width() <= 640 ) | 38 | if (QApplication::desktop()->width() <= 640 ) |
38 | d->showMaximized(); | 39 | d->showMaximized(); |
39 | else | 40 | else |
40 | ;//d->resize( 800, 600 ); | 41 | ;//d->resize( 800, 600 ); |
41 | return d->exec(); | 42 | return d->exec(); |
42 | } | 43 | } |
43 | void KApplication::showLicence() | 44 | void KApplication::showLicence() |
44 | { | 45 | { |
45 | KApplication::showFile( "KDE-Pim/Pi licence", "kdepim/licence.txt" ); | 46 | KApplication::showFile( "KDE-Pim/Pi licence", "kdepim/licence.txt" ); |
46 | } | 47 | } |
47 | 48 | ||
48 | void KApplication::showFile(QString caption, QString fn) | 49 | void KApplication::showFile(QString caption, QString fn) |
49 | { | 50 | { |
50 | QString text; | 51 | QString text; |
51 | QString fileName; | 52 | QString fileName; |
52 | #ifndef DESKTOP_VERSION | 53 | #ifndef DESKTOP_VERSION |
53 | fileName = getenv("QPEDIR"); | 54 | fileName = getenv("QPEDIR"); |
54 | fileName += "/pics/" + fn ; | 55 | fileName += "/pics/" + fn ; |
55 | #else | 56 | #else |
56 | fileName = qApp->applicationDirPath () + "/" + fn; | 57 | fileName = qApp->applicationDirPath () + "/" + fn; |
57 | #endif | 58 | #endif |
58 | QFile file( fileName ); | 59 | QFile file( fileName ); |
59 | if (!file.open( IO_ReadOnly ) ) { | 60 | if (!file.open( IO_ReadOnly ) ) { |
60 | return ; | 61 | return ; |
61 | } | 62 | } |
62 | QTextStream ts( &file ); | 63 | QTextStream ts( &file ); |
63 | text = ts.read(); | 64 | text = ts.read(); |
64 | file.close(); | 65 | file.close(); |
65 | KApplication::showText( caption, text ); | 66 | KApplication::showText( caption, text ); |
66 | 67 | ||
67 | } | 68 | } |
68 | 69 | ||
69 | bool KApplication::convert2latin1(QString fileName) | 70 | bool KApplication::convert2latin1(QString fileName) |
70 | { | 71 | { |
71 | QString text; | 72 | QString text; |
72 | QFile file( fileName ); | 73 | QFile file( fileName ); |
73 | if (!file.open( IO_ReadOnly ) ) { | 74 | if (!file.open( IO_ReadOnly ) ) { |
74 | return false; | 75 | return false; |
75 | 76 | ||
76 | } | 77 | } |
77 | QTextStream ts( &file ); | 78 | QTextStream ts( &file ); |
78 | ts.setEncoding( QTextStream::UnicodeUTF8 ); | 79 | ts.setEncoding( QTextStream::UnicodeUTF8 ); |
79 | text = ts.read(); | 80 | text = ts.read(); |
80 | file.close(); | 81 | file.close(); |
81 | if (!file.open( IO_WriteOnly ) ) { | 82 | if (!file.open( IO_WriteOnly ) ) { |
82 | return false; | 83 | return false; |
83 | } | 84 | } |
84 | QTextStream tsIn( &file ); | 85 | QTextStream tsIn( &file ); |
85 | tsIn.setEncoding( QTextStream::Latin1 ); | 86 | tsIn.setEncoding( QTextStream::Latin1 ); |
86 | tsIn << text.latin1(); | 87 | tsIn << text.latin1(); |
87 | file.close(); | 88 | file.close(); |
88 | 89 | ||
89 | 90 | ||
90 | } | 91 | } |
91 | void KApplication::showText(QString caption, QString text) | 92 | void KApplication::showText(QString caption, QString text) |
92 | { | 93 | { |
93 | QDialog dia( 0, "name", true ); ; | 94 | QDialog dia( 0, "name", true ); ; |
94 | dia.setCaption( caption ); | 95 | dia.setCaption( caption ); |
95 | QVBoxLayout* lay = new QVBoxLayout( &dia ); | 96 | QVBoxLayout* lay = new QVBoxLayout( &dia ); |
96 | lay->setSpacing( 3 ); | 97 | lay->setSpacing( 3 ); |
97 | lay->setMargin( 3 ); | 98 | lay->setMargin( 3 ); |
98 | QTextBrowser tb ( &dia ); | 99 | KTextEdit tb ( &dia ); |
100 | tb.setWordWrap( QMultiLineEdit::WidgetWidth ); | ||
99 | lay->addWidget( &tb ); | 101 | lay->addWidget( &tb ); |
100 | tb.setText( text ); | 102 | tb.setText( text ); |
101 | #ifdef DESKTOP_VERSION | 103 | #ifdef DESKTOP_VERSION |
102 | dia.resize( 640, 480); | 104 | dia.resize( 640, 480); |
103 | #else | 105 | #else |
104 | dia.showMaximized(); | 106 | dia.showMaximized(); |
105 | #endif | 107 | #endif |
106 | dia.exec(); | 108 | dia.exec(); |
107 | 109 | ||
108 | } | 110 | } |