From 3c37907fd38287a8402cca1063ce6ba69c75e954 Mon Sep 17 00:00:00 2001 From: tux_mike Date: Mon, 08 Apr 2002 21:07:14 +0000 Subject: Fixed little bugs, added macro to disable find on sharp rom, other small feature additons. --- (limited to 'core/pim/addressbook/addressbook.cpp') 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 @@ #include #include #include + +#ifndef MAKE_FOR_SHARP_ROM #include +#endif + #include #include #include @@ -129,12 +133,14 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, 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" ), @@ -510,7 +516,9 @@ void AddressbookWindow::slotPersonalView() 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; @@ -519,7 +527,9 @@ void AddressbookWindow::slotPersonalView() // 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") ); @@ -776,16 +786,22 @@ AbLabel *AddressbookWindow::abView() 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 ) -- cgit v0.9.0.2