summaryrefslogtreecommitdiff
authordrw <drw>2004-11-16 17:38:05 (UTC)
committer drw <drw>2004-11-16 17:38:05 (UTC)
commit3ba09273d96a32263bb22bfbc32fcc6290bde6e8 (patch) (unidiff)
tree5191d954dd0769bbf47445daeec024888e523773
parent36f98a2f0438edf82e4f326660786207ee46d87d (diff)
downloadopie-3ba09273d96a32263bb22bfbc32fcc6290bde6e8.zip
opie-3ba09273d96a32263bb22bfbc32fcc6290bde6e8.tar.gz
opie-3ba09273d96a32263bb22bfbc32fcc6290bde6e8.tar.bz2
Minor UI tweak - in filter dialog, when option is enabled, set focus to widget that corresponds to that option (less tapping)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/filterdlg.cpp47
1 files changed, 26 insertions, 21 deletions
diff --git a/noncore/settings/packagemanager/filterdlg.cpp b/noncore/settings/packagemanager/filterdlg.cpp
index 70875bd..0e1ea52 100644
--- a/noncore/settings/packagemanager/filterdlg.cpp
+++ b/noncore/settings/packagemanager/filterdlg.cpp
@@ -1,32 +1,32 @@
1/* 1/*
2                This file is part of the OPIE Project 2 This file is part of the OPIE Project
3 3
4 =. Copyright (c) 2003 Dan Williams <drw@handhelds.org> 4 =. Copyright (c) 2003 Dan Williams <drw@handhelds.org>
5             .=l. 5 .=l.
6           .>+-= 6 .>+-=
7 _;:,     .>    :=|. This file is free software; you can 7_;:, .> :=|. This file is free software; you can
8.> <`_,   >  .   <= redistribute it and/or modify it under 8.> <`_, > . <= redistribute it and/or modify it under
9:`=1 )Y*s>-.--   : the terms of the GNU General Public 9:`=1 )Y*s>-.-- : the terms of the GNU General Public
10.="- .-=="i,     .._ License as published by the Free Software 10.="- .-=="i, .._ License as published by the Free Software
11 - .   .-<_>     .<> Foundation; either version 2 of the License, 11- . .-<_> .<> Foundation; either version 2 of the License,
12     ._= =}       : or (at your option) any later version. 12 ._= =} : or (at your option) any later version.
13    .%`+i>       _;_. 13 .%`+i> _;_.
14    .i_,=:_.      -<s. This file is distributed in the hope that 14 .i_,=:_. -<s. This file is distributed in the hope that
15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
16    : ..    .:,     . . . without even the implied warranty of 16 : .. .:, . . . without even the implied warranty of
17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General
19..}^=.=       =       ; Public License for more details. 19..}^=.= = ; Public License for more details.
20++=   -.     .`     .: 20++= -. .` .:
21 :     =  ...= . :.=- You should have received a copy of the GNU 21: = ...= . :.=- You should have received a copy of the GNU
22 -.   .:....=;==+<; General Public License along with this file; 22-. .:....=;==+<; General Public License along with this file;
23  -_. . .   )=.  = see the file COPYING. If not, write to the 23 -_. . . )=. = see the file COPYING. If not, write to the
24    --        :-=` Free Software Foundation, Inc., 24 -- :-=` Free Software Foundation, Inc.,
25 59 Temple Place - Suite 330, 25 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA. 26 Boston, MA 02111-1307, USA.
27 27
28*/ 28*/
29 29
30#include "filterdlg.h" 30#include "filterdlg.h"
31 31
32#include <qwhatsthis.h> 32#include <qwhatsthis.h>
@@ -137,31 +137,35 @@ void FilterDlg::initItem( QComboBox *comboBox, QCheckBox *checkBox, const QStrin
137 } 137 }
138 } 138 }
139 comboBox->setEnabled( !selection.isNull() ); 139 comboBox->setEnabled( !selection.isNull() );
140} 140}
141 141
142void FilterDlg::slotNameSelected( bool selected ) 142void FilterDlg::slotNameSelected( bool selected )
143{ 143{
144 m_name->setEnabled( selected ); 144 m_name->setEnabled( selected );
145 m_name->setFocus();
145} 146}
146 147
147void FilterDlg::slotServerSelected( bool selected ) 148void FilterDlg::slotServerSelected( bool selected )
148{ 149{
149 m_server->setEnabled( selected ); 150 m_server->setEnabled( selected );
151 m_server->setFocus();
150} 152}
151 153
152void FilterDlg::slotDestSelected( bool selected ) 154void FilterDlg::slotDestSelected( bool selected )
153{ 155{
154 m_destination->setEnabled( selected ); 156 m_destination->setEnabled( selected );
157 m_destination->setFocus();
155} 158}
156 159
157void FilterDlg::slotStatusSelected( bool selected ) 160void FilterDlg::slotStatusSelected( bool selected )
158{ 161{
159 m_status->setEnabled( selected ); 162 m_status->setEnabled( selected );
163 m_status->setFocus();
160 164
161 if ( !selected && !m_destCB->isEnabled() ) 165 if ( !selected && !m_destCB->isEnabled() )
162 { 166 {
163 // If status check box has been deselected and destination option was previously deselected 167 // If status check box has been deselected and destination option was previously deselected
164 // (because status == "Not installed"), re-enable destination option 168 // (because status == "Not installed"), re-enable destination option
165 m_destCB->setEnabled( true ); 169 m_destCB->setEnabled( true );
166 m_destination->setEnabled( true ); 170 m_destination->setEnabled( true );
167 } 171 }
@@ -181,9 +185,10 @@ void FilterDlg::slotStatusChanged( const QString &category )
181 m_destination->setEnabled( !notInstalled ); 185 m_destination->setEnabled( !notInstalled );
182 if ( notInstalled ) 186 if ( notInstalled )
183 m_destCB->setChecked( false ); 187 m_destCB->setChecked( false );
184} 188}
185 189
186void FilterDlg::slotCategorySelected( bool selected ) 190void FilterDlg::slotCategorySelected( bool selected )
187{ 191{
188 m_category->setEnabled( selected ); 192 m_category->setEnabled( selected );
193 m_category->setFocus();
189} 194}