summaryrefslogtreecommitdiff
path: root/core/pim
Unidiff
Diffstat (limited to 'core/pim') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abeditor.cpp3
-rw-r--r--core/pim/addressbook/addressbook.cpp8
-rw-r--r--core/pim/addressbook/contacteditor.cpp6
-rw-r--r--core/pim/datebook/datebook.cpp27
-rw-r--r--core/pim/datebook/dateentryimpl.cpp10
-rw-r--r--core/pim/datebook2/mainwindow.cpp9
-rw-r--r--core/pim/todo/mainwindow.cpp3
-rw-r--r--core/pim/todo/todoeditor.cpp9
8 files changed, 20 insertions, 55 deletions
diff --git a/core/pim/addressbook/abeditor.cpp b/core/pim/addressbook/abeditor.cpp
index 91e8722..75e7ede 100644
--- a/core/pim/addressbook/abeditor.cpp
+++ b/core/pim/addressbook/abeditor.cpp
@@ -527,14 +527,13 @@ void AbEditor::saveEntry()
527 if ( !str.isNull() ) 527 if ( !str.isNull() )
528 ent.setNotes( str ); 528 ent.setNotes( str );
529} 529}
530 530
531void AbEditor::slotNote() 531void AbEditor::slotNote()
532{ 532{
533 dlgNote->showMaximized(); 533 if ( ! QPEApplication::execDialog( &dlgNote ) ) {
534 if ( !dlgNote->exec() ) {
535 // reset the note... 534 // reset the note...
536 txtNote->setText( ent.notes() ); 535 txtNote->setText( ent.notes() );
537 } 536 }
538} 537}
539 538
540void AbEditor::setNameFocus() 539void AbEditor::setNameFocus()
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 00cd2a6..1c7ddd4 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -279,14 +279,13 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
279 279
280 280
281void AddressbookWindow::slotConfig() 281void AddressbookWindow::slotConfig()
282{ 282{
283 ConfigDlg* dlg = new ConfigDlg( this, "Config" ); 283 ConfigDlg* dlg = new ConfigDlg( this, "Config" );
284 dlg -> setConfig( m_config ); 284 dlg -> setConfig( m_config );
285 dlg -> showMaximized(); 285 if ( QPEApplication::execDialog( dlg ) ) {
286 if ( dlg -> exec() ) {
287 qWarning ("Config Dialog accepted!"); 286 qWarning ("Config Dialog accepted!");
288 m_config = dlg -> getConfig(); 287 m_config = dlg -> getConfig();
289 if ( m_curFontSize != m_config.fontSize() ){ 288 if ( m_curFontSize != m_config.fontSize() ){
290 qWarning("Font was changed!"); 289 qWarning("Font was changed!");
291 m_curFontSize = m_config.fontSize(); 290 m_curFontSize = m_config.fontSize();
292 emit slotSetFont( m_curFontSize ); 291 emit slotSetFont( m_curFontSize );
@@ -747,18 +746,15 @@ void AddressbookWindow::editEntry( EntryMode entryMode )
747 abEditor->setEntry( m_abView -> currentEntry() ); 746 abEditor->setEntry( m_abView -> currentEntry() );
748 else if ( entryMode == NewEntry ) 747 else if ( entryMode == NewEntry )
749 abEditor->setEntry( entry ); 748 abEditor->setEntry( entry );
750 // other things may change the caption. 749 // other things may change the caption.
751 abEditor->setCaption( tr("Edit Address") ); 750 abEditor->setCaption( tr("Edit Address") );
752 751
753#if defined(Q_WS_QWS) || defined(_WS_QWS_)
754 abEditor->showMaximized();
755#endif
756 // fix the foxus... 752 // fix the foxus...
757 abEditor->setNameFocus(); 753 abEditor->setNameFocus();
758 if ( abEditor->exec() ) { 754 if ( QPEApplication::execDialog( abEditor ) ) {
759 setFocus(); 755 setFocus();
760 if ( entryMode == NewEntry ) { 756 if ( entryMode == NewEntry ) {
761 OContact insertEntry = abEditor->entry(); 757 OContact insertEntry = abEditor->entry();
762 insertEntry.assignUid(); 758 insertEntry.assignUid();
763 m_abView -> addEntry( insertEntry ); 759 m_abView -> addEntry( insertEntry );
764 m_abView -> setCurrentUid( insertEntry.uid() ); 760 m_abView -> setCurrentUid( insertEntry.uid() );
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index 8fbd065..7932781 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -1080,14 +1080,13 @@ void ContactEditor::accept() {
1080 } 1080 }
1081 1081
1082} 1082}
1083 1083
1084void ContactEditor::slotNote() { 1084void ContactEditor::slotNote() {
1085 1085
1086 dlgNote->showMaximized(); 1086 if ( ! QPEApplication::execDialog( dlgNote ) ) {
1087 if ( !dlgNote->exec() ) {
1088 txtNote->setText( ent.notes() ); 1087 txtNote->setText( ent.notes() );
1089 } 1088 }
1090} 1089}
1091 1090
1092void ContactEditor::slotName() { 1091void ContactEditor::slotName() {
1093 1092
@@ -1095,14 +1094,13 @@ void ContactEditor::slotName() {
1095 1094
1096 txtFirstName->setText( parseName(txtFullName->text(), NAME_F) ); 1095 txtFirstName->setText( parseName(txtFullName->text(), NAME_F) );
1097 txtMiddleName->setText( parseName(txtFullName->text(), NAME_M) ); 1096 txtMiddleName->setText( parseName(txtFullName->text(), NAME_M) );
1098 txtLastName->setText( parseName(txtFullName->text(), NAME_L) ); 1097 txtLastName->setText( parseName(txtFullName->text(), NAME_L) );
1099 // txtSuffix->setText( parseName(txtFullName->text(), NAME_S) ); 1098 // txtSuffix->setText( parseName(txtFullName->text(), NAME_S) );
1100 1099
1101 dlgName->showMaximized(); 1100 if ( QPEApplication::execDialog( dlgName ) ) {
1102 if ( dlgName->exec() ) {
1103 if ( txtLastName->text().contains( ' ', TRUE ) ) 1101 if ( txtLastName->text().contains( ' ', TRUE ) )
1104 tmpName = txtLastName->text() + ", " + txtFirstName->text() + " " + txtMiddleName->text(); 1102 tmpName = txtLastName->text() + ", " + txtFirstName->text() + " " + txtMiddleName->text();
1105 else 1103 else
1106 tmpName = txtFirstName->text() + " " + txtMiddleName->text() + " " + txtLastName->text(); 1104 tmpName = txtFirstName->text() + " " + txtMiddleName->text() + " " + txtLastName->text();
1107 1105
1108 txtFullName->setText( tmpName.simplifyWhiteSpace() ); 1106 txtFullName->setText( tmpName.simplifyWhiteSpace() );
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 44f1515..706cc08 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -262,18 +262,13 @@ void DateBook::slotSettings()
262 if(!found) { 262 if(!found) {
263 frmSettings.comboLocation->insertItem(defaultLocation); 263 frmSettings.comboLocation->insertItem(defaultLocation);
264 frmSettings.comboLocation->setCurrentItem(frmSettings.comboLocation->count()-1); 264 frmSettings.comboLocation->setCurrentItem(frmSettings.comboLocation->count()-1);
265 } 265 }
266 frmSettings.comboCategory->setCategories(defaultCategories,"Calendar", tr("Calendar")); 266 frmSettings.comboCategory->setCategories(defaultCategories,"Calendar", tr("Calendar"));
267 267
268#if defined (Q_WS_QWS) || defined(_WS_QWS_) 268 if ( QPEApplication::execDialog( &frmSettings ) ) {
269 frmSettings.showMaximized();
270#endif
271
272 if ( frmSettings.exec() ) {
273
274 aPreset = frmSettings.alarmPreset(); 269 aPreset = frmSettings.alarmPreset();
275 presetTime = frmSettings.presetTime(); 270 presetTime = frmSettings.presetTime();
276 startTime = frmSettings.startTime(); 271 startTime = frmSettings.startTime();
277 bJumpToCurTime = frmSettings.jumpToCurTime(); 272 bJumpToCurTime = frmSettings.jumpToCurTime();
278 rowStyle = frmSettings.rowStyle(); 273 rowStyle = frmSettings.rowStyle();
279 defaultView=frmSettings.comboDefaultView->currentItem()+1; 274 defaultView=frmSettings.comboDefaultView->currentItem()+1;
@@ -434,16 +429,13 @@ void DateBook::duplicateEvent( const Event &e )
434 sv->setHScrollBarMode( QScrollView::AlwaysOff ); 429 sv->setHScrollBarMode( QScrollView::AlwaysOff );
435 vb->addWidget( sv ); 430 vb->addWidget( sv );
436 entry = new DateEntry( onMonday, dupevent, ampm, &editDlg, "editor" ); 431 entry = new DateEntry( onMonday, dupevent, ampm, &editDlg, "editor" );
437 entry->timezone->setEnabled( FALSE ); 432 entry->timezone->setEnabled( FALSE );
438 sv->addChild( entry ); 433 sv->addChild( entry );
439 434
440#if defined(Q_WS_QWS) || defined(_WS_QWS_) 435 while ( QPEApplication::execDialog( &editDlg ) ) {
441 editDlg.showMaximized();
442#endif
443 while (editDlg.exec() ) {
444 Event newEv = entry->event(); 436 Event newEv = entry->event();
445 QString error = checkEvent(newEv); 437 QString error = checkEvent(newEv);
446 if (!error.isNull()) { 438 if (!error.isNull()) {
447 if (QMessageBox::warning(this, tr("error box"), error, tr("Fix it"), tr("Continue"), 0, 0, 1) == 0) 439 if (QMessageBox::warning(this, tr("error box"), error, tr("Fix it"), tr("Continue"), 0, 0, 1) == 0)
448 continue; 440 continue;
449 } 441 }
@@ -483,16 +475,13 @@ void DateBook::editEvent( const Event &e )
483 sv->setHScrollBarMode( QScrollView::AlwaysOff ); 475 sv->setHScrollBarMode( QScrollView::AlwaysOff );
484 vb->addWidget( sv ); 476 vb->addWidget( sv );
485 entry = new DateEntry( onMonday, e, ampm, &editDlg, "editor" ); 477 entry = new DateEntry( onMonday, e, ampm, &editDlg, "editor" );
486 entry->timezone->setEnabled( FALSE ); 478 entry->timezone->setEnabled( FALSE );
487 sv->addChild( entry ); 479 sv->addChild( entry );
488 480
489#if defined(Q_WS_QWS) || defined(_WS_QWS_) 481 while ( QPEApplication::execDialog( &editDlg ) ) {
490 editDlg.showMaximized();
491#endif
492 while (editDlg.exec() ) {
493 Event newEv = entry->event(); 482 Event newEv = entry->event();
494 if(newEv.description().isEmpty() && newEv.notes().isEmpty() ) 483 if(newEv.description().isEmpty() && newEv.notes().isEmpty() )
495 break; 484 break;
496 newEv.setUid(e.uid()); // FIXME: Hack not to clear uid 485 newEv.setUid(e.uid()); // FIXME: Hack not to clear uid
497 QString error = checkEvent(newEv); 486 QString error = checkEvent(newEv);
498 if (!error.isNull()) { 487 if (!error.isNull()) {
@@ -704,16 +693,13 @@ void DateBook::appMessage(const QCString& msg, const QByteArray& data)
704 QLabel *lblMsg = new QLabel( msg, &dlg ); 693 QLabel *lblMsg = new QLabel( msg, &dlg );
705 view->addChild( lblMsg ); 694 view->addChild( lblMsg );
706 QPushButton *cmdOk = new QPushButton( tr("OK"), &dlg ); 695 QPushButton *cmdOk = new QPushButton( tr("OK"), &dlg );
707 connect( cmdOk, SIGNAL(clicked()), &dlg, SLOT(accept()) ); 696 connect( cmdOk, SIGNAL(clicked()), &dlg, SLOT(accept()) );
708 vb->addWidget( cmdOk ); 697 vb->addWidget( cmdOk );
709 698
710#if defined(Q_WS_QWS) || defined(_WS_QWS_) 699 needShow = QPEApplication::execDialog( &dlg );
711 dlg.showMaximized();
712#endif
713 needShow = dlg.exec();
714 700
715 if ( bSound ) 701 if ( bSound )
716 killTimer( stopTimer ); 702 killTimer( stopTimer );
717 } 703 }
718 } 704 }
719 } else if ( msg == "nextView()" ) { 705 } else if ( msg == "nextView()" ) {
@@ -899,16 +885,13 @@ void DateBook::slotNewEntry(const QDateTime &start, const QDateTime &end, const
899 ev.setStart( start ); 885 ev.setStart( start );
900 ev.setEnd( end ); 886 ev.setEnd( end );
901 887
902 e = new DateEntry( onMonday, ev, ampm, &newDlg ); 888 e = new DateEntry( onMonday, ev, ampm, &newDlg );
903 e->setAlarmEnabled( aPreset, presetTime, Event::Loud ); 889 e->setAlarmEnabled( aPreset, presetTime, Event::Loud );
904 sv->addChild( e ); 890 sv->addChild( e );
905#if defined(Q_WS_QWS) || defined(_WS_QWS_) 891 while ( QPEApplication::execDialog( &newDlg ) ) {
906 newDlg.showMaximized();
907#endif
908 while (newDlg.exec()) {
909 ev = e->event(); 892 ev = e->event();
910 ev.assignUid(); 893 ev.assignUid();
911 QString error = checkEvent( ev ); 894 QString error = checkEvent( ev );
912 if ( !error.isNull() ) { 895 if ( !error.isNull() ) {
913 if ( QMessageBox::warning( this, tr("Error!"), error, tr("Fix it"), tr("Continue"), 0, 0, 1 ) == 0 ) 896 if ( QMessageBox::warning( this, tr("Error!"), error, tr("Fix it"), tr("Continue"), 0, 0, 1 ) == 0 )
914 continue; 897 continue;
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp
index d9e5225..856837c 100644
--- a/core/pim/datebook/dateentryimpl.cpp
+++ b/core/pim/datebook/dateentryimpl.cpp
@@ -246,16 +246,13 @@ void DateEntry::slotEditNote() {
246 QString s; 246 QString s;
247 s = "<B>"+ TimeString::longDateString( startDate ) + "</B>"; 247 s = "<B>"+ TimeString::longDateString( startDate ) + "</B>";
248// s.sprintf("<B>%d/%d</B> ", startDate.day(), startDate.month()); 248// s.sprintf("<B>%d/%d</B> ", startDate.day(), startDate.month());
249 NoteEntry noteDlg(s+comboDescription->currentText(), noteStr, 249 NoteEntry noteDlg(s+comboDescription->currentText(), noteStr,
250 this,0,TRUE); 250 this,0,TRUE);
251 251
252#if defined(Q_WS_QWS) || defined(_WS_QWS_) 252 if ( QPEApplication::execDialog( &noteDlg ) ) {
253 noteDlg.showMaximized();
254#endif
255 if (noteDlg.exec() ) {
256 noteStr=noteDlg.note->text(); 253 noteStr=noteDlg.note->text();
257 } 254 }
258 255
259} 256}
260 257
261void DateEntry::endDateChanged( int y, int m, int d ) 258void DateEntry::endDateChanged( int y, int m, int d )
@@ -392,16 +389,13 @@ void DateEntry::slotRepeat()
392 // since, this dialog doesn't need to keep track of it... 389 // since, this dialog doesn't need to keep track of it...
393 if ( rp.type != Event::NoRepeat ) 390 if ( rp.type != Event::NoRepeat )
394 e = new RepeatEntry( startWeekOnMonday, rp, startDate, this); 391 e = new RepeatEntry( startWeekOnMonday, rp, startDate, this);
395 else 392 else
396 e = new RepeatEntry( startWeekOnMonday, startDate, this ); 393 e = new RepeatEntry( startWeekOnMonday, startDate, this );
397 394
398#if defined(Q_WS_QWS) || defined(_WS_QWS_) 395 if ( QPEApplication::execDialog( e ) ) {
399 e->showMaximized();
400#endif
401 if ( e->exec() ) {
402 rp = e->repeatPattern(); 396 rp = e->repeatPattern();
403 setRepeatLabel(); 397 setRepeatLabel();
404 } 398 }
405 // deleting sounds like a nice idea... 399 // deleting sounds like a nice idea...
406 delete e; 400 delete e;
407} 401}
diff --git a/core/pim/datebook2/mainwindow.cpp b/core/pim/datebook2/mainwindow.cpp
index be30415..7ff2204 100644
--- a/core/pim/datebook2/mainwindow.cpp
+++ b/core/pim/datebook2/mainwindow.cpp
@@ -226,30 +226,27 @@ Show* MainWindow::eventShow() {
226void MainWindow::slotAction( QAction* act ) { 226void MainWindow::slotAction( QAction* act ) {
227 227
228} 228}
229void MainWindow::slotConfigureLocs() { 229void MainWindow::slotConfigureLocs() {
230 LocationManagerDialog dlg( locationManager() ); 230 LocationManagerDialog dlg( locationManager() );
231 dlg.setCaption( tr("Configure Locations") ); 231 dlg.setCaption( tr("Configure Locations") );
232 dlg.showMaximized(); 232 if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) {
233 if (dlg.exec() == QDialog::Accepted ) {
234 setLocationManager( dlg.manager() ); 233 setLocationManager( dlg.manager() );
235 } 234 }
236} 235}
237void MainWindow::slotConfigureDesc() { 236void MainWindow::slotConfigureDesc() {
238 DescriptionManagerDialog dlg( descriptionManager() ); 237 DescriptionManagerDialog dlg( descriptionManager() );
239 dlg.setCaption( tr("Configure Descriptions") ); 238 dlg.setCaption( tr("Configure Descriptions") );
240 dlg.showMaximized(); 239 if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) {
241 if (dlg.exec() == QDialog::Accepted ) {
242 setDescriptionManager( dlg.manager() ); 240 setDescriptionManager( dlg.manager() );
243 } 241 }
244} 242}
245void MainWindow::slotConfigureTemp() { 243void MainWindow::slotConfigureTemp() {
246 TemplateDialog dlg( templateManager(), editor() ); 244 TemplateDialog dlg( templateManager(), editor() );
247 dlg.setCaption( tr("Configure Templates") ); 245 dlg.setCaption( tr("Configure Templates") );
248 dlg.showMaximized(); 246 if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) {
249 if ( dlg.exec() == QDialog::Accepted ) {
250 m_tempMan = dlg.manager(); 247 m_tempMan = dlg.manager();
251 setTemplateMenu(); 248 setTemplateMenu();
252 } 249 }
253} 250}
254void MainWindow::hideShow() { 251void MainWindow::hideShow() {
255 252
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp
index d06a405..fc189bd 100644
--- a/core/pim/todo/mainwindow.cpp
+++ b/core/pim/todo/mainwindow.cpp
@@ -1025,14 +1025,13 @@ void MainWindow::doAlarm( const QDateTime& dt, int uid ) {
1025 lay->addWidget( btnOk ); 1025 lay->addWidget( btnOk );
1026 1026
1027 QString text = tr("<h1>Alarm at %1</h1><br>").arg( TimeString::dateString( dt ) ); 1027 QString text = tr("<h1>Alarm at %1</h1><br>").arg( TimeString::dateString( dt ) );
1028 text += todo.toRichText(); 1028 text += todo.toRichText();
1029 view->setText( text ); 1029 view->setText( text );
1030 1030
1031 dlg.showMaximized(); 1031 bool needToStay = QPEApplication::execDialog( &dlg );
1032 bool needToStay = dlg.exec();
1033 1032
1034 if (loud) 1033 if (loud)
1035 killAlarm(); 1034 killAlarm();
1036 1035
1037 if (needToStay) { 1036 if (needToStay) {
1038// showMaximized(); 1037// showMaximized();
diff --git a/core/pim/todo/todoeditor.cpp b/core/pim/todo/todoeditor.cpp
index c204325..78aedd6 100644
--- a/core/pim/todo/todoeditor.cpp
+++ b/core/pim/todo/todoeditor.cpp
@@ -1,7 +1,9 @@
1 1
2#include <qpe/qpeapplication.h>
3
2#include "otaskeditor.h" 4#include "otaskeditor.h"
3#include "todoeditor.h" 5#include "todoeditor.h"
4 6
5using namespace Todo; 7using namespace Todo;
6 8
7Editor::Editor() { 9Editor::Editor() {
@@ -16,16 +18,14 @@ OTodo Editor::newTodo( int cur,
16 QWidget*) { 18 QWidget*) {
17 19
18 OTaskEditor *e = self(); 20 OTaskEditor *e = self();
19 e->setCaption( QObject::tr("Enter Task") ); 21 e->setCaption( QObject::tr("Enter Task") );
20 e->init( cur ); 22 e->init( cur );
21 23
24 int ret = QPEApplication::execDialog( e );
22 25
23 e->showMaximized();
24
25 int ret = e->exec();
26 if ( QDialog::Accepted == ret ) { 26 if ( QDialog::Accepted == ret ) {
27 m_accepted = true; 27 m_accepted = true;
28 }else 28 }else
29 m_accepted = false; 29 m_accepted = false;
30 30
31 OTodo ev = e->todo(); 31 OTodo ev = e->todo();
@@ -38,14 +38,13 @@ OTodo Editor::newTodo( int cur,
38OTodo Editor::edit( QWidget *, 38OTodo Editor::edit( QWidget *,
39 const OTodo& todo ) { 39 const OTodo& todo ) {
40 OTaskEditor *e = self(); 40 OTaskEditor *e = self();
41 e->init( todo ); 41 e->init( todo );
42 e->setCaption( QObject::tr( "Edit Task" ) ); 42 e->setCaption( QObject::tr( "Edit Task" ) );
43 43
44 e->showMaximized(); 44 int ret = QPEApplication::execDialog( e );
45 int ret = e->exec();
46 45
47 OTodo ev = e->todo(); 46 OTodo ev = e->todo();
48 if ( ret == QDialog::Accepted ) 47 if ( ret == QDialog::Accepted )
49 m_accepted = true; 48 m_accepted = true;
50 else 49 else
51 m_accepted = false; 50 m_accepted = false;