Diffstat (limited to 'core/pim/addressbook/addressbook.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index e8fa37c..5a8038b 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -26,13 +26,17 @@ | |||
26 | #include "addresssettings.h" | 26 | #include "addresssettings.h" |
27 | #include "addressbook.h" | 27 | #include "addressbook.h" |
28 | 28 | ||
29 | #include <qpe/qpeapplication.h> | 29 | #include <qpe/qpeapplication.h> |
30 | #include <qpe/config.h> | 30 | #include <qpe/config.h> |
31 | #include <qpe/contact.h> | 31 | #include <qpe/contact.h> |
32 | |||
33 | #ifndef MAKE_FOR_SHARP_ROM | ||
32 | #include <qpe/finddialog.h> | 34 | #include <qpe/finddialog.h> |
35 | #endif | ||
36 | |||
33 | #include <qpe/global.h> | 37 | #include <qpe/global.h> |
34 | #include <qpe/resource.h> | 38 | #include <qpe/resource.h> |
35 | #include <qpe/ir.h> | 39 | #include <qpe/ir.h> |
36 | #include <qpe/qpemessagebox.h> | 40 | #include <qpe/qpemessagebox.h> |
37 | #include <qpe/qcopenvelope_qws.h> | 41 | #include <qpe/qcopenvelope_qws.h> |
38 | 42 | ||
@@ -126,18 +130,20 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, | |||
126 | 0, this, 0 ); | 130 | 0, this, 0 ); |
127 | actionTrash = a; | 131 | actionTrash = a; |
128 | connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) ); | 132 | connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) ); |
129 | a->addTo( edit ); | 133 | a->addTo( edit ); |
130 | a->addTo( listTools ); | 134 | a->addTo( listTools ); |
131 | 135 | ||
136 | #ifndef MAKE_FOR_SHARP_ROM | ||
132 | a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), | 137 | a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), |
133 | QString::null, 0, this, 0 ); | 138 | QString::null, 0, this, 0 ); |
134 | actionFind = a; | 139 | actionFind = a; |
135 | connect( a, SIGNAL(activated()), this, SLOT(slotFind()) ); | 140 | connect( a, SIGNAL(activated()), this, SLOT(slotFind()) ); |
136 | a->addTo( edit ); | 141 | a->addTo( edit ); |
137 | a->addTo( listTools ); | 142 | a->addTo( listTools ); |
143 | #endif | ||
138 | 144 | ||
139 | 145 | ||
140 | a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "qtmail/reply" ), | 146 | a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "qtmail/reply" ), |
141 | QString::null, 0, this, 0 ); | 147 | QString::null, 0, this, 0 ); |
142 | //a->setEnabled( FALSE ); we got support for it now :) zecke | 148 | //a->setEnabled( FALSE ); we got support for it now :) zecke |
143 | actionMail = a; | 149 | actionMail = a; |
@@ -507,22 +513,26 @@ void AddressbookWindow::slotPersonalView() | |||
507 | { | 513 | { |
508 | if (!actionPersonal->isOn()) { | 514 | if (!actionPersonal->isOn()) { |
509 | // we just turned it off | 515 | // we just turned it off |
510 | setCaption( tr("Contacts") ); | 516 | setCaption( tr("Contacts") ); |
511 | actionNew->setEnabled(TRUE); | 517 | actionNew->setEnabled(TRUE); |
512 | actionTrash->setEnabled(TRUE); | 518 | actionTrash->setEnabled(TRUE); |
519 | #ifndef MAKE_FOR_SHARP_ROM | ||
513 | actionFind->setEnabled(TRUE); | 520 | actionFind->setEnabled(TRUE); |
521 | #endif | ||
514 | slotUpdateToolbar(); // maybe some of the above could be moved there | 522 | slotUpdateToolbar(); // maybe some of the above could be moved there |
515 | showList(); | 523 | showList(); |
516 | return; | 524 | return; |
517 | } | 525 | } |
518 | 526 | ||
519 | // XXX need to disable some QActions. | 527 | // XXX need to disable some QActions. |
520 | actionNew->setEnabled(FALSE); | 528 | actionNew->setEnabled(FALSE); |
521 | actionTrash->setEnabled(FALSE); | 529 | actionTrash->setEnabled(FALSE); |
530 | #ifndef MAKE_FOR_SHARP_ROM | ||
522 | actionFind->setEnabled(FALSE); | 531 | actionFind->setEnabled(FALSE); |
532 | #endif | ||
523 | actionMail->setEnabled(FALSE); | 533 | actionMail->setEnabled(FALSE); |
524 | 534 | ||
525 | setCaption( tr("Contacts - My Personal Details") ); | 535 | setCaption( tr("Contacts - My Personal Details") ); |
526 | QString filename = addressbookPersonalVCardName(); | 536 | QString filename = addressbookPersonalVCardName(); |
527 | Contact me; | 537 | Contact me; |
528 | if (QFile::exists(filename)) | 538 | if (QFile::exists(filename)) |
@@ -773,22 +783,28 @@ AbLabel *AddressbookWindow::abView() | |||
773 | } | 783 | } |
774 | return mView; | 784 | return mView; |
775 | } | 785 | } |
776 | 786 | ||
777 | void AddressbookWindow::slotFind() | 787 | void AddressbookWindow::slotFind() |
778 | { | 788 | { |
789 | #ifndef MAKE_FOR_SHARP_ROM | ||
779 | if ( centralWidget() == abView() ) | 790 | if ( centralWidget() == abView() ) |
780 | showList(); | 791 | showList(); |
792 | |||
781 | FindDialog frmFind( "Contacts", this ); | 793 | FindDialog frmFind( "Contacts", this ); |
782 | QObject::connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)), abList, SLOT(slotDoFind( const QString&,bool,bool,int))); | 794 | QObject::connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)), abList, SLOT(slotDoFind( const QString&,bool,bool,int))); |
783 | QObject::connect( abList, SIGNAL(signalNotFound()), &frmFind, SLOT(slotNotFound()) ); | 795 | QObject::connect( abList, SIGNAL(signalNotFound()), &frmFind, SLOT(slotNotFound()) ); |
784 | QObject::connect( abList, SIGNAL(signalWrapAround()), &frmFind, SLOT(slotWrapAround()) ); | 796 | QObject::connect( abList, SIGNAL(signalWrapAround()), &frmFind, SLOT(slotWrapAround()) ); |
797 | |||
785 | frmFind.exec(); | 798 | frmFind.exec(); |
799 | |||
786 | if ( abList->numSelections() ) | 800 | if ( abList->numSelections() ) |
787 | abList->clearSelection(); | 801 | abList->clearSelection(); |
802 | |||
788 | abList->clearFindRow(); | 803 | abList->clearFindRow(); |
804 | #endif | ||
789 | } | 805 | } |
790 | 806 | ||
791 | void AddressbookWindow::slotSetCategory( int c ) | 807 | void AddressbookWindow::slotSetCategory( int c ) |
792 | { | 808 | { |
793 | if ( c <= 0 ) | 809 | if ( c <= 0 ) |
794 | return; | 810 | return; |