summaryrefslogtreecommitdiff
authortille <tille>2003-05-14 16:20:11 (UTC)
committer tille <tille>2003-05-14 16:20:11 (UTC)
commit6bc6d8eb1051335e99416f5a8311788b40c7476a (patch) (side-by-side diff)
tree39b9afa01f5f3061617a494c526ca8b8a2610388
parentb818d340ce6a9ffe00136f2278192f46c1163ba1 (diff)
downloadopie-6bc6d8eb1051335e99416f5a8311788b40c7476a.zip
opie-6bc6d8eb1051335e99416f5a8311788b40c7476a.tar.gz
opie-6bc6d8eb1051335e99416f5a8311788b40c7476a.tar.bz2
correct focus and search group order
zecke: take this version for OPIE_BRANCH_0_99
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/mainwindow.cpp7
-rw-r--r--core/pim/osearch/olistview.cpp2
2 files changed, 5 insertions, 4 deletions
diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp
index 33a24bc..093ca54 100644
--- a/core/pim/osearch/mainwindow.cpp
+++ b/core/pim/osearch/mainwindow.cpp
@@ -68,29 +68,29 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
buttonGroupActions = new QHButtonGroup( this );
buttonGroupActions->hide();
_buttonCount = 0;
// buttonGroupActions->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
buttonLayout = new QHBoxLayout( detailsFrame );
detailsLayout->addLayout( buttonLayout );
mainLayout->addWidget( detailsFrame );
detailsFrame->hide();
- searches.append( new AdressSearch( resultsList, tr("adressbook") ) );
- searches.append( new TodoSearch( resultsList, tr("todo") ) );
- searches.append( new DatebookSearch( resultsList, tr("datebook") ) );
searches.append( new AppLnkSearch( resultsList, tr("applications") ) );
searches.append( new DocLnkSearch( resultsList, tr("documents") ) );
+ searches.append( new TodoSearch( resultsList, tr("todo") ) );
+ searches.append( new DatebookSearch( resultsList, tr("datebook") ) );
+ searches.append( new AdressSearch( resultsList, tr("adressbook") ) );
makeMenu();
setCentralWidget( mainFrame );
popupTimer = new QTimer();
searchTimer = new QTimer();
connect(popupTimer, SIGNAL(timeout()), SLOT(showPopup()));
connect(searchTimer, SIGNAL(timeout()), SLOT(searchStringChanged()));
connect(resultsList, SIGNAL(pressed(QListViewItem*)), SLOT(setCurrent(QListViewItem*)));
connect(resultsList, SIGNAL(clicked(QListViewItem*)), SLOT(stopTimer(QListViewItem*)));
connect(buttonGroupActions, SIGNAL(clicked(int)), SLOT( slotAction(int) ) );
@@ -115,24 +115,25 @@ void MainWindow::makeMenu()
//SEARCH
SearchAllAction = new QAction( tr("Search all"),QString::null, 0, this, 0 );
SearchAllAction->setIconSet( Resource::loadIconSet( "find" ) );
connect( SearchAllAction, SIGNAL(activated()), this, SLOT(searchAll()) );
SearchAllAction->addTo( searchMenu );
actionCaseSensitiv = new QAction( tr("Case sensitiv"),QString::null, 0, this, 0, true );
actionCaseSensitiv->addTo( searchMenu );
actionWildcards = new QAction( tr("Use wildcards"),QString::null, 0, this, 0, true );
actionWildcards->addTo( searchMenu );
addToolBar( searchBar, "Search", QMainWindow::Top, TRUE );
QLineEdit *searchEdit = new QLineEdit( searchBar, "seachEdit" );
+ searchEdit->setFocus();
searchBar->setHorizontalStretchable( TRUE );
searchBar->setStretchableWidget( searchEdit );
SearchAllAction->addTo( searchBar );
connect( searchEdit, SIGNAL( textChanged( const QString & ) ),
this, SLOT( setSearch( const QString & ) ) );
}
MainWindow::~MainWindow()
{
}
diff --git a/core/pim/osearch/olistview.cpp b/core/pim/osearch/olistview.cpp
index f5fe462..06392ba 100644
--- a/core/pim/osearch/olistview.cpp
+++ b/core/pim/osearch/olistview.cpp
@@ -10,25 +10,25 @@
#include "olistview.h"
#include "olistviewitem.h"
#include <qmessagebox.h>
OListView::OListView(QWidget *parent, const char *name )
: QListView(parent,name)
{
setRootIsDecorated( true );
addColumn(tr("Results"));
-
+ setSorting( -1 );
connect( this, SIGNAL(expanded(QListViewItem*)), SLOT(expand(QListViewItem*)));
}
OListView::~OListView()
{
}
void OListView::expand(QListViewItem *item)
{
((OListViewItem*)item)->expand();
}