author | zautrix <zautrix> | 2005-06-18 12:47:08 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-18 12:47:08 (UTC) |
commit | 4ad2d49928757d72657735e088ac1cf587637fca (patch) (unidiff) | |
tree | 34373eb6925de34900f762b5ebda6077efbd1b7c | |
parent | 3c6bc55a0c7abf758df57bbb3dc0842bd6b87e6c (diff) | |
download | kdepimpi-4ad2d49928757d72657735e088ac1cf587637fca.zip kdepimpi-4ad2d49928757d72657735e088ac1cf587637fca.tar.gz kdepimpi-4ad2d49928757d72657735e088ac1cf587637fca.tar.bz2 |
fixxx
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 15 |
2 files changed, 12 insertions, 5 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index f22c177..6ddfc5f 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1411,31 +1411,31 @@ | |||
1411 | { "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, | 1411 | { "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, |
1412 | { "Global application font for all apps:","Globale Schriftart:" }, | 1412 | { "Global application font for all apps:","Globale Schriftart:" }, |
1413 | { "Application Font","Applikationsschriftart" }, | 1413 | { "Application Font","Applikationsschriftart" }, |
1414 | { "Kx/Pi","Kx/Pi" }, | 1414 | { "Kx/Pi","Kx/Pi" }, |
1415 | { "Backup","Backup" }, | 1415 | { "Backup","Backup" }, |
1416 | { "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, | 1416 | { "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, |
1417 | { "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, | 1417 | { "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, |
1418 | { "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, | 1418 | { "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, |
1419 | { "Choose Color","Wähle Farbe" }, | 1419 | { "Choose Color","Wähle Farbe" }, |
1420 | { " OK "," OK " }, | 1420 | { " OK "," OK " }, |
1421 | { " Cancel "," Abbrechen " }, | 1421 | { " Cancel "," Abbrechen " }, |
1422 | { "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, | 1422 | { "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, |
1423 | { "Matching items will be removed from list","Passende werden von der Liste entfernt" }, | 1423 | { "Matching items will be removed from list","Passende werden von der Liste entfernt" }, |
1424 | { "Search on displayed list only","Suche auf der dargestellten Liste" }, | 1424 | { "Search on displayed list only","Suche auf der dargestellten Liste" }, |
1425 | { "List will be cleared before search","Liste wird vor der Suche gelöscht" }, | 1425 | { "List will be cleared before search","Liste wird vor der Suche gelöscht" }, |
1426 | { "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, | 1426 | { "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, |
1427 | { "%1\nis running!","%1\nist am Laufen!" }, | 1427 | { "%1\nis running!","%1\nist am Laufen!" }, |
1428 | { "Additional Comment:","Zusätzlicher Kommentar:" }, | 1428 | { "Additional Comment:","Zusätzlicher Kommentar:" }, |
1429 | { "Stop and save","Stopp und Speichern" }, | 1429 | { "Stop and save","Stopp und Speichern" }, |
1430 | { "Continue running","Weiter laufen lassen" }, | 1430 | { "Continue running","Weiter laufen lassen" }, |
1431 | { "Stop - do not save","Stopp - nicht Speichern" }, | 1431 | { "Stop - do not save","Stopp - nicht Speichern" }, |
1432 | { "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, | 1432 | { "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, |
1433 | { "Time mismatch!","Zeiten stimmen nicht!" }, | 1433 | { "Time mismatch!","Zeiten stimmen nicht!" }, |
1434 | { "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, | 1434 | { "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, |
1435 | { "","" }, | 1435 | { "Yes, stop todo","Ja, stoppe Todo" }, |
1436 | { "","" }, | 1436 | { "","" }, |
1437 | { "","" }, | 1437 | { "","" }, |
1438 | { "","" }, | 1438 | { "","" }, |
1439 | { "","" }, | 1439 | { "","" }, |
1440 | { "","" }, | 1440 | { "","" }, |
1441 | { "","" }, \ No newline at end of file | 1441 | { "","" }, \ No newline at end of file |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 926a136..98c9bd9 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -50,105 +50,105 @@ | |||
50 | #include <kresources/resourceselectdialog.h> | 50 | #include <kresources/resourceselectdialog.h> |
51 | #include <libkcal/kincidenceformatter.h> | 51 | #include <libkcal/kincidenceformatter.h> |
52 | #ifndef DESKTOP_VERSION | 52 | #ifndef DESKTOP_VERSION |
53 | #include <qpe/qpeapplication.h> | 53 | #include <qpe/qpeapplication.h> |
54 | #else | 54 | #else |
55 | #include <qapplication.h> | 55 | #include <qapplication.h> |
56 | #endif | 56 | #endif |
57 | #ifndef KORG_NOPRINTER | 57 | #ifndef KORG_NOPRINTER |
58 | #include "calprinter.h" | 58 | #include "calprinter.h" |
59 | #endif | 59 | #endif |
60 | #include "docprefs.h" | 60 | #include "docprefs.h" |
61 | 61 | ||
62 | #include "kotodoview.h" | 62 | #include "kotodoview.h" |
63 | using namespace KOrg; | 63 | using namespace KOrg; |
64 | 64 | ||
65 | 65 | ||
66 | KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name ) : | 66 | KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name ) : |
67 | QDialog( parent, name, true ) | 67 | QDialog( parent, name, true ) |
68 | { | 68 | { |
69 | mTodo = todo; | 69 | mTodo = todo; |
70 | setCaption( i18n("Stop todo") ); | 70 | setCaption( i18n("Stop todo") ); |
71 | QVBoxLayout* lay = new QVBoxLayout( this ); | 71 | QVBoxLayout* lay = new QVBoxLayout( this ); |
72 | lay->setSpacing( 3 ); | 72 | lay->setSpacing( 3 ); |
73 | lay->setMargin( 3 ); | 73 | lay->setMargin( 3 ); |
74 | QLabel * lab = new QLabel( i18n("%1\nis running!").arg( todo->summary() ), this ); | 74 | QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( todo->summary() ), this ); |
75 | lay->addWidget( lab ); | 75 | lay->addWidget( lab ); |
76 | lab->setAlignment( AlignHCenter ); | 76 | lab->setAlignment( AlignHCenter ); |
77 | lab = new QLabel( i18n("Additional Comment:"), this ); | 77 | lab = new QLabel( i18n("Additional Comment:"), this ); |
78 | lay->addWidget( lab ); | 78 | lay->addWidget( lab ); |
79 | mComment = new QLineEdit( this ); | 79 | mComment = new QLineEdit( this ); |
80 | lay->addWidget( mComment ); | 80 | lay->addWidget( mComment ); |
81 | QHBox * start = new QHBox ( this ); | 81 | QHBox * start = new QHBox ( this ); |
82 | lay->addWidget( start ); | 82 | lay->addWidget( start ); |
83 | lab = new QLabel( i18n("Start:"), start ); | 83 | lab = new QLabel( i18n("Start:"), start ); |
84 | QHBox * end = new QHBox ( this ); | 84 | QHBox * end = new QHBox ( this ); |
85 | lay->addWidget( end ); | 85 | lay->addWidget( end ); |
86 | lab = new QLabel( i18n("End:"), end ); | 86 | lab = new QLabel( i18n("End:"), end ); |
87 | sde = new KDateEdit( start ); | 87 | sde = new KDateEdit( start ); |
88 | ste = new KOTimeEdit( start ); | 88 | ste = new KOTimeEdit( start ); |
89 | connect ( sde,SIGNAL(setTimeTo( QTime ) ),ste , SLOT ( setTime(QTime ) ) ); | 89 | connect ( sde,SIGNAL(setTimeTo( QTime ) ),ste , SLOT ( setTime(QTime ) ) ); |
90 | ede = new KDateEdit( end ); | 90 | ede = new KDateEdit( end ); |
91 | ete = new KOTimeEdit(end ); | 91 | ete = new KOTimeEdit(end ); |
92 | connect ( ede,SIGNAL(setTimeTo( QTime ) ),ete , SLOT ( setTime(QTime ) ) ); | 92 | connect ( ede,SIGNAL(setTimeTo( QTime ) ),ete , SLOT ( setTime(QTime ) ) ); |
93 | sde->setDate( mTodo->runStart().date() ); | 93 | sde->setDate( mTodo->runStart().date() ); |
94 | ste->setTime( mTodo->runStart().time() ); | 94 | ste->setTime( mTodo->runStart().time() ); |
95 | ede->setDate( QDate::currentDate()); | 95 | ede->setDate( QDate::currentDate()); |
96 | ete->setTime( QTime::currentTime() ); | 96 | ete->setTime( QTime::currentTime() ); |
97 | QPushButton * ok = new QPushButton( i18n("Stop and save"), this ); | 97 | QPushButton * ok = new QPushButton( i18n("Stop and save"), this ); |
98 | lay->addWidget( ok ); | 98 | lay->addWidget( ok ); |
99 | ok->setDefault( true ); | 99 | ok->setDefault( true ); |
100 | QPushButton * cancel = new QPushButton( i18n("Continue running"), this ); | 100 | QPushButton * cancel = new QPushButton( i18n("Continue running"), this ); |
101 | lay->addWidget( cancel ); | 101 | lay->addWidget( cancel ); |
102 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 102 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
103 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 103 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
104 | ok = new QPushButton( i18n("Stop - do not save"), this ); | 104 | ok = new QPushButton( i18n("Stop - do not save"), this ); |
105 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( doNotSave() ) ); | 105 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( doNotSave() ) ); |
106 | lay->addWidget( ok ); | 106 | lay->addWidget( ok ); |
107 | if (QApplication::desktop()->width() < 320 ) | 107 | if (QApplication::desktop()->width() < 320 ) |
108 | resize( 240, 200 ); | 108 | resize( 240, sizeHint().height() ); |
109 | else | 109 | else |
110 | resize( 320, 200 ); | 110 | resize( 320, sizeHint().height() ); |
111 | 111 | ||
112 | } | 112 | } |
113 | 113 | ||
114 | void KOStopTodoPrefs::accept() | 114 | void KOStopTodoPrefs::accept() |
115 | { | 115 | { |
116 | QDateTime start = QDateTime( sde->date(), ste->getTime() ); | 116 | QDateTime start = QDateTime( sde->date(), ste->getTime() ); |
117 | QDateTime stop = QDateTime( ede->date(), ete->getTime() ); | 117 | QDateTime stop = QDateTime( ede->date(), ete->getTime() ); |
118 | if ( start > stop ) { | 118 | if ( start > stop ) { |
119 | KMessageBox::sorry(this, | 119 | KMessageBox::sorry(this, |
120 | i18n("The start time is\nafter the end time!"), | 120 | i18n("The start time is\nafter the end time!"), |
121 | i18n("Time mismatch!")); | 121 | i18n("Time mismatch!")); |
122 | return; | 122 | return; |
123 | } | 123 | } |
124 | mTodo->saveRunningInfo( mComment->text(), start, stop ); | 124 | mTodo->saveRunningInfo( mComment->text(), start, stop ); |
125 | QDialog::accept(); | 125 | QDialog::accept(); |
126 | } | 126 | } |
127 | void KOStopTodoPrefs::doNotSave() | 127 | void KOStopTodoPrefs::doNotSave() |
128 | { | 128 | { |
129 | int result = KMessageBox::warningContinueCancel(this, | 129 | int result = KMessageBox::warningContinueCancel(this, |
130 | i18n("Do you really want to set\nthe state to stopped\nwithout saving the data?"),mTodo->summary() ); | 130 | i18n("Do you really want to set\nthe state to stopped\nwithout saving the data?"),mTodo->summary(),i18n("Yes, stop todo") ); |
131 | if (result != KMessageBox::Continue) return; | 131 | if (result != KMessageBox::Continue) return; |
132 | mTodo->stopRunning(); | 132 | mTodo->stopRunning(); |
133 | QDialog::accept(); | 133 | QDialog::accept(); |
134 | } | 134 | } |
135 | 135 | ||
136 | 136 | ||
137 | class KOTodoViewWhatsThis :public QWhatsThis | 137 | class KOTodoViewWhatsThis :public QWhatsThis |
138 | { | 138 | { |
139 | public: | 139 | public: |
140 | KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; | 140 | KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; |
141 | 141 | ||
142 | protected: | 142 | protected: |
143 | virtual QString text( const QPoint& p) | 143 | virtual QString text( const QPoint& p) |
144 | { | 144 | { |
145 | return _view->getWhatsThisText(p) ; | 145 | return _view->getWhatsThisText(p) ; |
146 | } | 146 | } |
147 | private: | 147 | private: |
148 | QWidget* _wid; | 148 | QWidget* _wid; |
149 | KOTodoView * _view; | 149 | KOTodoView * _view; |
150 | }; | 150 | }; |
151 | 151 | ||
152 | KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, | 152 | KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, |
153 | const char *name) : | 153 | const char *name) : |
154 | KListView(parent,name) | 154 | KListView(parent,name) |
@@ -1183,48 +1183,55 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item) | |||
1183 | if ( row == 2 || row == 1 ) { | 1183 | if ( row == 2 || row == 1 ) { |
1184 | mActiveItem = (KOTodoViewItem *) item; | 1184 | mActiveItem = (KOTodoViewItem *) item; |
1185 | newSubTodo(); | 1185 | newSubTodo(); |
1186 | return; | 1186 | return; |
1187 | } | 1187 | } |
1188 | if ( row == 5 || row == 6 ) { | 1188 | if ( row == 5 || row == 6 ) { |
1189 | mActiveItem = (KOTodoViewItem *) item; | 1189 | mActiveItem = (KOTodoViewItem *) item; |
1190 | toggleRunningItem(); | 1190 | toggleRunningItem(); |
1191 | return; | 1191 | return; |
1192 | } | 1192 | } |
1193 | } | 1193 | } |
1194 | if ( KOPrefs::instance()->mEditOnDoubleClick ) | 1194 | if ( KOPrefs::instance()->mEditOnDoubleClick ) |
1195 | editItem( item ); | 1195 | editItem( item ); |
1196 | else | 1196 | else |
1197 | showItem( item , QPoint(), 0 ); | 1197 | showItem( item , QPoint(), 0 ); |
1198 | } | 1198 | } |
1199 | void KOTodoView::toggleRunningItem() | 1199 | void KOTodoView::toggleRunningItem() |
1200 | { | 1200 | { |
1201 | // qDebug("KOTodoView::toggleRunning() "); | 1201 | // qDebug("KOTodoView::toggleRunning() "); |
1202 | if ( ! mActiveItem ) | 1202 | if ( ! mActiveItem ) |
1203 | return; | 1203 | return; |
1204 | Todo * t = mActiveItem->todo(); | 1204 | Todo * t = mActiveItem->todo(); |
1205 | if ( t->isRunning() ) { | 1205 | if ( t->isRunning() ) { |
1206 | KOStopTodoPrefs tp ( t, this ); | 1206 | KOStopTodoPrefs tp ( t, this ); |
1207 | if (QApplication::desktop()->width() < 800 ){ | ||
1208 | int wid = tp.width(); | ||
1209 | int hei = tp.height(); | ||
1210 | int xx = (QApplication::desktop()->width()-wid)/2; | ||
1211 | int yy = (QApplication::desktop()->height()-hei)/2; | ||
1212 | tp.setGeometry( xx,yy,wid,hei ); | ||
1213 | } | ||
1207 | tp.exec(); | 1214 | tp.exec(); |
1208 | mActiveItem->construct(); | 1215 | mActiveItem->construct(); |
1209 | } else { | 1216 | } else { |
1210 | int result = KMessageBox::warningContinueCancel(this, | 1217 | int result = KMessageBox::warningContinueCancel(this, |
1211 | i18n("<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>").arg(mActiveItem->text(0).left( 25 ) ),i18n("Start todo"),i18n("Start todo"),i18n("Cancel"), true); | 1218 | i18n("<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>").arg(mActiveItem->text(0).left( 25 ) ),i18n("Start todo"),i18n("Start todo"),i18n("Cancel"), true); |
1212 | if (result != KMessageBox::Continue) return; | 1219 | if (result != KMessageBox::Continue) return; |
1213 | t->setRunning( true ); | 1220 | t->setRunning( true ); |
1214 | mActiveItem->construct(); | 1221 | mActiveItem->construct(); |
1215 | } | 1222 | } |
1216 | } | 1223 | } |
1217 | 1224 | ||
1218 | void KOTodoView::itemClicked(QListViewItem *item) | 1225 | void KOTodoView::itemClicked(QListViewItem *item) |
1219 | { | 1226 | { |
1220 | //qDebug("KOTodoView::itemClicked %d", item); | 1227 | //qDebug("KOTodoView::itemClicked %d", item); |
1221 | if (!item) { | 1228 | if (!item) { |
1222 | if ( pendingSubtodo != 0 ) { | 1229 | if ( pendingSubtodo != 0 ) { |
1223 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 1230 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
1224 | } | 1231 | } |
1225 | pendingSubtodo = 0; | 1232 | pendingSubtodo = 0; |
1226 | return; | 1233 | return; |
1227 | } | 1234 | } |
1228 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 1235 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
1229 | if ( pendingSubtodo != 0 ) { | 1236 | if ( pendingSubtodo != 0 ) { |
1230 | bool allowReparent = true; | 1237 | bool allowReparent = true; |