summaryrefslogtreecommitdiff
path: root/core/launcher/documentlist.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/documentlist.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/documentlist.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp
index 9736e65..39dc7c9 100644
--- a/core/launcher/documentlist.cpp
+++ b/core/launcher/documentlist.cpp
@@ -1,45 +1,46 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "documentlist.h"
#include "serverinterface.h"
+#include "mediadlg.h"
#include <opie2/oglobal.h>
#include <qtopia/config.h>
#include <qtopia/mimetype.h>
#include <qtopia/resource.h>
#include <qtopia/private/categories.h>
#include <qtopia/qpeapplication.h>
#include <qtopia/applnk.h>
#include <qtopia/storage.h>
#ifdef Q_WS_QWS
#include <qtopia/qcopenvelope_qws.h>
#endif
#include <qtimer.h>
#include <qfileinfo.h>
#include <qtextstream.h>
#include <qfile.h>
#include <qdir.h>
#include <qpainter.h>
#include <qimage.h>
#include <qcopchannel_qws.h>
#include <qlistview.h>
#include <qlist.h>
@@ -413,53 +414,53 @@ DocumentListPrivate::DocumentListPrivate( ServerInterface *gui )
{
storage = new StorageInfo( this );
serverGui = gui;
if ( serverGui ) {
sendAppLnks = serverGui->requiresApplications();
sendDocLnks = serverGui->requiresDocuments();
} else {
sendAppLnks = false;
sendDocLnks = false;
}
for ( int i = 0; i < MAX_SEARCH_DEPTH; i++ ) {
listDirs[i] = 0;
lists[i] = 0;
listPositions[i] = 0;
}
initialize();
tid = 0;
}
void DocumentListPrivate::appendDocpath(FileSystem*fs)
{
QDir defPath(fs->path()+"/Documents");
QFileInfo f(fs->path()+"/.opiestorage.cf");
if (!f.exists()) {
- if (defPath.exists()) {
- docPaths+=defPath.path();
- }
+ Mediadlg dlg(fs);
+ if (QDialog::Accepted != QPEApplication::execDialog( &dlg )) {
return;
}
+ }
Config conf(f.filePath(), Config::File );
conf.setGroup("subdirs");
bool read_all = conf.readBoolEntry("wholemedia",true);
if (read_all) {
docPaths+=fs->path();
return;
}
QStringList subDirs = conf.readListEntry("subdirs",':');
if (subDirs.isEmpty()) {
if (defPath.exists()) {
docPaths+=defPath.path();
}
return;
}
for (unsigned c = 0; c < subDirs.count();++c) {
QDir docDir(QString(fs->path()+"/"+subDirs[c]));
if (docDir.exists()) {
docPaths+=docDir.path();
}
}
}
void DocumentListPrivate::initialize()
{