Diffstat (limited to 'core/pim/osearch/doclnksearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/doclnksearch.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/pim/osearch/doclnksearch.cpp b/core/pim/osearch/doclnksearch.cpp index 3d91c1f..9d165be 100644 --- a/core/pim/osearch/doclnksearch.cpp +++ b/core/pim/osearch/doclnksearch.cpp | |||
@@ -1,59 +1,58 @@ | |||
1 | // | 1 | // |
2 | // | 2 | // |
3 | // C++ Implementation: $MODULE$ | 3 | // C++ Implementation: $MODULE$ |
4 | // | 4 | // |
5 | // Description: | 5 | // Description: |
6 | // | 6 | // |
7 | // | 7 | // |
8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 | 8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 |
9 | // | 9 | // |
10 | // Copyright: See COPYING file that comes with this distribution | 10 | // Copyright: See COPYING file that comes with this distribution |
11 | // | 11 | // |
12 | // | 12 | // |
13 | 13 | ||
14 | 14 | ||
15 | #include "doclnkitem.h" | 15 | #include "doclnkitem.h" |
16 | #include "doclnksearch.h" | 16 | #include "doclnksearch.h" |
17 | 17 | ||
18 | #include <opie2/oresource.h> | ||
18 | #include <opie2/owait.h> | 19 | #include <opie2/owait.h> |
19 | 20 | ||
20 | #include <qpe/applnk.h> | 21 | #include <qpe/applnk.h> |
21 | #include <qpe/config.h> | 22 | #include <qpe/config.h> |
22 | #include <qpe/resource.h> | ||
23 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
24 | 24 | ||
25 | #include <qaction.h> | 25 | #include <qaction.h> |
26 | #include <qfile.h> | 26 | #include <qfile.h> |
27 | #include <qpopupmenu.h> | 27 | #include <qpopupmenu.h> |
28 | #include <qtextstream.h> | 28 | #include <qtextstream.h> |
29 | 29 | ||
30 | 30 | ||
31 | DocLnkSearch::DocLnkSearch(QListView* parent, QString name) | 31 | DocLnkSearch::DocLnkSearch(QListView* parent, QString name) |
32 | : AppLnkSearch(parent, name), _popupMenu(0) | 32 | : AppLnkSearch(parent, name), _popupMenu(0) |
33 | { | 33 | { |
34 | QIconSet is = Resource::loadIconSet( "osearch/documents" ); | 34 | setPixmap( 0, Opie::Core::OResource::loadPixmap( "osearch/documents", Opie::Core::OResource::SmallIcon ) ); |
35 | setPixmap( 0, is.pixmap( QIconSet::Large, true ) ); | ||
36 | 35 | ||
37 | actionSearchInFiles = new QAction( QObject::tr("Search content"),QString::null, 0, 0, 0, true ); | 36 | actionSearchInFiles = new QAction( QObject::tr("Search content"),QString::null, 0, 0, 0, true ); |
38 | Config cfg( "osearch", Config::User ); | 37 | Config cfg( "osearch", Config::User ); |
39 | cfg.setGroup( "doclnk_settings" ); | 38 | cfg.setGroup( "doclnk_settings" ); |
40 | actionSearchInFiles->setOn( cfg.readBoolEntry( "search_content", false ) ); | 39 | actionSearchInFiles->setOn( cfg.readBoolEntry( "search_content", false ) ); |
41 | } | 40 | } |
42 | 41 | ||
43 | 42 | ||
44 | DocLnkSearch::~DocLnkSearch() | 43 | DocLnkSearch::~DocLnkSearch() |
45 | { | 44 | { |
46 | Config cfg( "osearch", Config::User ); | 45 | Config cfg( "osearch", Config::User ); |
47 | cfg.setGroup( "doclnk_settings" ); | 46 | cfg.setGroup( "doclnk_settings" ); |
48 | cfg.writeEntry( "search_content", actionSearchInFiles->isOn() ); | 47 | cfg.writeEntry( "search_content", actionSearchInFiles->isOn() ); |
49 | } | 48 | } |
50 | 49 | ||
51 | void DocLnkSearch::load() | 50 | void DocLnkSearch::load() |
52 | { | 51 | { |
53 | _apps = new DocLnkSet(QPEApplication::documentDir()); | 52 | _apps = new DocLnkSet(QPEApplication::documentDir()); |
54 | } | 53 | } |
55 | 54 | ||
56 | bool DocLnkSearch::searchFile( AppLnk *app ) | 55 | bool DocLnkSearch::searchFile( AppLnk *app ) |
57 | { | 56 | { |
58 | if (!actionSearchInFiles->isOn()) return false; | 57 | if (!actionSearchInFiles->isOn()) return false; |
59 | DocLnk *doc = (DocLnk*)app; | 58 | DocLnk *doc = (DocLnk*)app; |