summaryrefslogtreecommitdiff
path: root/core/launcher/documentlist.cpp
authorzecke <zecke>2004-02-21 11:32:55 (UTC)
committer zecke <zecke>2004-02-21 11:32:55 (UTC)
commitf80b38b2e348b588bf7560161d7551e6bd4939c0 (patch) (unidiff)
tree34c4359580641cb1447dab8df8731c9733e1d39f /core/launcher/documentlist.cpp
parentb38daa3f05f3a250a8c5114890158863ab02a99f (diff)
downloadopie-f80b38b2e348b588bf7560161d7551e6bd4939c0.zip
opie-f80b38b2e348b588bf7560161d7551e6bd4939c0.tar.gz
opie-f80b38b2e348b588bf7560161d7551e6bd4939c0.tar.bz2
Move to LibOpie2
remove launcher global and use OGlobal
Diffstat (limited to 'core/launcher/documentlist.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/documentlist.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp
index ece6931..440bf1e 100644
--- a/core/launcher/documentlist.cpp
+++ b/core/launcher/documentlist.cpp
@@ -10,30 +10,30 @@
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "documentlist.h" 20#include "documentlist.h"
21#include "serverinterface.h" 21#include "serverinterface.h"
22#include "launcherglobal.h" 22
23#include <opie2/oglobal.h>
23 24
24#include <qtopia/config.h> 25#include <qtopia/config.h>
25#include <qtopia/mimetype.h> 26#include <qtopia/mimetype.h>
26#include <qtopia/resource.h> 27#include <qtopia/resource.h>
27#include <qtopia/global.h>
28#include <qtopia/private/categories.h> 28#include <qtopia/private/categories.h>
29#include <qtopia/qpeapplication.h> 29#include <qtopia/qpeapplication.h>
30#include <qtopia/applnk.h> 30#include <qtopia/applnk.h>
31#include <qtopia/storage.h> 31#include <qtopia/storage.h>
32#ifdef Q_WS_QWS 32#ifdef Q_WS_QWS
33#include <qtopia/qcopenvelope_qws.h> 33#include <qtopia/qcopenvelope_qws.h>
34#endif 34#endif
35 35
36#include <qtimer.h> 36#include <qtimer.h>
37#include <qfileinfo.h> 37#include <qfileinfo.h>
38#include <qtextstream.h> 38#include <qtextstream.h>
39#include <qfile.h> 39#include <qfile.h>
@@ -81,25 +81,28 @@ public:
81 81
82 int tid; 82 int tid;
83 83
84 ServerInterface *serverGui; 84 ServerInterface *serverGui;
85 85
86 bool needToSendAllDocLinks; 86 bool needToSendAllDocLinks;
87 bool sendAppLnks; 87 bool sendAppLnks;
88 bool sendDocLnks; 88 bool sendDocLnks;
89 bool scanDocs; 89 bool scanDocs;
90}; 90};
91 91
92 92
93DocumentList::DocumentList( ServerInterface *serverGui, bool scanDocs, 93/*
94 * scandocs will be read from Config
95 */
96DocumentList::DocumentList( ServerInterface *serverGui, bool /*scanDocs*/,
94 QObject *parent, const char *name ) 97 QObject *parent, const char *name )
95 : QObject( parent, name ) 98 : QObject( parent, name )
96{ 99{
97 appLnkSet = new AppLnkSet( MimeType::appsFolderName() ); 100 appLnkSet = new AppLnkSet( MimeType::appsFolderName() );
98 d = new DocumentListPrivate( serverGui ); 101 d = new DocumentListPrivate( serverGui );
99 d->needToSendAllDocLinks = false; 102 d->needToSendAllDocLinks = false;
100 103
101 Config cfg( "Launcher" ); 104 Config cfg( "Launcher" );
102 cfg.setGroup( "DocTab" ); 105 cfg.setGroup( "DocTab" );
103 d->scanDocs = cfg.readBoolEntry( "Enable", true ); 106 d->scanDocs = cfg.readBoolEntry( "Enable", true );
104 qDebug( "DocumentList::DocumentList() : scanDocs = %d", d->scanDocs ); 107 qDebug( "DocumentList::DocumentList() : scanDocs = %d", d->scanDocs );
105 108
@@ -260,25 +263,25 @@ void DocumentList::reloadDocLnks()
260 if ( d->sendDocLnks && d->serverGui ) { 263 if ( d->sendDocLnks && d->serverGui ) {
261 d->serverGui->documentScanningProgress( 0 ); 264 d->serverGui->documentScanningProgress( 0 );
262 d->serverGui->allDocumentsRemoved(); 265 d->serverGui->allDocumentsRemoved();
263 } 266 }
264 267
265 rescan(); 268 rescan();
266} 269}
267 270
268void DocumentList::linkChanged( QString arg ) 271void DocumentList::linkChanged( QString arg )
269{ 272{
270 //qDebug( "linkchanged( %s )", arg.latin1() ); 273 //qDebug( "linkchanged( %s )", arg.latin1() );
271 274
272 if ( arg.isNull() || Opie::Global::isAppLnkFileName( arg ) ) { 275 if ( arg.isNull() || OGlobal::isAppLnkFileName( arg ) ) {
273 reloadAppLnks(); 276 reloadAppLnks();
274 } else { 277 } else {
275 278
276 const QList<DocLnk> &list = d->dls.children(); 279 const QList<DocLnk> &list = d->dls.children();
277 QListIterator<DocLnk> it( list ); 280 QListIterator<DocLnk> it( list );
278 while ( it.current() ) { 281 while ( it.current() ) {
279 DocLnk *doc = it.current(); 282 DocLnk *doc = it.current();
280 ++it; 283 ++it;
281 if ( ( doc->linkFileKnown() && doc->linkFile() == arg ) 284 if ( ( doc->linkFileKnown() && doc->linkFile() == arg )
282 || ( doc->fileKnown() && doc->file() == arg ) ) { 285 || ( doc->fileKnown() && doc->file() == arg ) ) {
283 //qDebug( "found old link" ); 286 //qDebug( "found old link" );
284 DocLnk* dl = new DocLnk( arg ); 287 DocLnk* dl = new DocLnk( arg );