summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/addressbook.cpp
Unidiff
Diffstat (limited to 'core/pim/addressbook/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp16
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
@@ -29,7 +29,11 @@
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>
@@ -129,12 +133,14 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
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" ),
@@ -510,7 +516,9 @@ void AddressbookWindow::slotPersonalView()
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;
@@ -519,7 +527,9 @@ void AddressbookWindow::slotPersonalView()
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") );
@@ -776,16 +786,22 @@ AbLabel *AddressbookWindow::abView()
776 786
777void AddressbookWindow::slotFind() 787void 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
791void AddressbookWindow::slotSetCategory( int c ) 807void AddressbookWindow::slotSetCategory( int c )