summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/addressbook.cpp
Side-by-side diff
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
@@ -26,13 +26,17 @@
#include "addresssettings.h"
#include "addressbook.h"
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include <qpe/contact.h>
+
+#ifndef MAKE_FOR_SHARP_ROM
#include <qpe/finddialog.h>
+#endif
+
#include <qpe/global.h>
#include <qpe/resource.h>
#include <qpe/ir.h>
#include <qpe/qpemessagebox.h>
#include <qpe/qcopenvelope_qws.h>
@@ -126,18 +130,20 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
0, this, 0 );
actionTrash = a;
connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) );
a->addTo( edit );
a->addTo( listTools );
+#ifndef MAKE_FOR_SHARP_ROM
a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ),
QString::null, 0, this, 0 );
actionFind = a;
connect( a, SIGNAL(activated()), this, SLOT(slotFind()) );
a->addTo( edit );
a->addTo( listTools );
+#endif
a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "qtmail/reply" ),
QString::null, 0, this, 0 );
//a->setEnabled( FALSE ); we got support for it now :) zecke
actionMail = a;
@@ -507,22 +513,26 @@ void AddressbookWindow::slotPersonalView()
{
if (!actionPersonal->isOn()) {
// we just turned it off
setCaption( tr("Contacts") );
actionNew->setEnabled(TRUE);
actionTrash->setEnabled(TRUE);
+#ifndef MAKE_FOR_SHARP_ROM
actionFind->setEnabled(TRUE);
+#endif
slotUpdateToolbar(); // maybe some of the above could be moved there
showList();
return;
}
// XXX need to disable some QActions.
actionNew->setEnabled(FALSE);
actionTrash->setEnabled(FALSE);
+#ifndef MAKE_FOR_SHARP_ROM
actionFind->setEnabled(FALSE);
+#endif
actionMail->setEnabled(FALSE);
setCaption( tr("Contacts - My Personal Details") );
QString filename = addressbookPersonalVCardName();
Contact me;
if (QFile::exists(filename))
@@ -773,22 +783,28 @@ AbLabel *AddressbookWindow::abView()
}
return mView;
}
void AddressbookWindow::slotFind()
{
+#ifndef MAKE_FOR_SHARP_ROM
if ( centralWidget() == abView() )
showList();
+
FindDialog frmFind( "Contacts", this );
QObject::connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)), abList, SLOT(slotDoFind( const QString&,bool,bool,int)));
QObject::connect( abList, SIGNAL(signalNotFound()), &frmFind, SLOT(slotNotFound()) );
QObject::connect( abList, SIGNAL(signalWrapAround()), &frmFind, SLOT(slotWrapAround()) );
+
frmFind.exec();
+
if ( abList->numSelections() )
abList->clearSelection();
+
abList->clearFindRow();
+#endif
}
void AddressbookWindow::slotSetCategory( int c )
{
if ( c <= 0 )
return;