summaryrefslogtreecommitdiff
path: root/library/global.cpp
authoreilers <eilers>2003-08-08 14:45:49 (UTC)
committer eilers <eilers>2003-08-08 14:45:49 (UTC)
commit14d394e6c107b037a09a31a92605034fe50f7813 (patch) (side-by-side diff)
tree800699cf4dc9681c3eb023340634dd6a15fd04c8 /library/global.cpp
parentdbc6ea35f5535a1f69deb7ebbafc0f721721dbf2 (diff)
downloadopie-14d394e6c107b037a09a31a92605034fe50f7813.zip
opie-14d394e6c107b037a09a31a92605034fe50f7813.tar.gz
opie-14d394e6c107b037a09a31a92605034fe50f7813.tar.bz2
Merged branches from BRANCH_1_0
Diffstat (limited to 'library/global.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/global.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/library/global.cpp b/library/global.cpp
index ce39751..189b830 100644
--- a/library/global.cpp
+++ b/library/global.cpp
@@ -541,57 +541,62 @@ void Global::terminate( const AppLnk* app )
}
#endif
}
/*!
Low-level function to run command \a c.
\warning Do not use this function. Use execute instead.
\sa execute()
*/
void Global::invoke(const QString &c)
{
// Convert the command line in to a list of arguments
QStringList list = QStringList::split(QRegExp(" *"),c);
#if !defined(QT_NO_COP)
QString ap=list[0];
// see if the application is already running
// XXX should lock file /tmp/qcop-msg-ap
if ( QCopChannel::isRegistered( ("QPE/Application/" + ap).latin1() ) ) {
// If the channel is already register, the app is already running, so show it.
{ QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); }
- QCopEnvelope e("QPE/System", "notBusy(QString)" );
- e << ap;
+ //QCopEnvelope e("QPE/System", "notBusy(QString)" );
+ //e << ap;
return;
}
// XXX should unlock file /tmp/qcop-msg-ap
//see if it is being started
if ( StartingAppList::isStarting( ap ) ) {
- QCopEnvelope e("QPE/System", "notBusy(QString)" );
- e << ap;
+ // FIXME take it out for now, since it leads to a much to short showing of wait if
+ // some entry is clicked.
+ // Real cause is that ::execute is called twice for document tab. But it would need some larger changes
+ // to fix that, and with future syncs with qtopia 1.6 it will change anyway big time since somebody there
+ // had the idea that an apploader belongs to the launcher ...
+ //QCopEnvelope e("QPE/System", "notBusy(QString)" );
+ //e << ap;
return;
}
#endif
#ifdef QT_NO_QWS_MULTIPROCESS
QMessageBox::warning( 0, "Error", "Could not find the application " + c, "Ok", 0, 0, 0, 1 );
#else
QStrList slist;
unsigned int j;
for ( j = 0; j < list.count(); j++ )
slist.append( list[j].utf8() );
const char **args = new (const char *)[slist.count() + 1];
for ( j = 0; j < slist.count(); j++ )
args[j] = slist.at(j);
args[j] = NULL;
#if !defined(QT_NO_COP)
// an attempt to show a wait...
// more logic should be used, but this will be fine for the moment...
QCopEnvelope ( "QPE/System", "busy()" );
#endif
@@ -809,41 +814,44 @@ void Global::findDocuments(DocLnkSet* folder, const QString &mimefilter)
} else if ( (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs" ) {
QString path = (*it)->path() + "/Documents";
DocLnkSet ide( path, mimefilter );
folder->appendFrom(ide);
}
}
}
QStringList Global::languageList()
{
QString lang = getenv("LANG");
QStringList langs;
langs.append(lang);
int i = lang.find(".");
if ( i > 0 )
lang = lang.left( i );
i = lang.find( "_" );
if ( i > 0 )
langs.append(lang.left(i));
return langs;
}
QStringList Global::helpPath()
{
+ QString qpeDir = QPEApplication::qpeDir();
QStringList path;
QStringList langs = Global::languageList();
for (QStringList::ConstIterator it = langs.fromLast(); it!=langs.end(); --it) {
QString lang = *it;
if ( !lang.isEmpty() )
- path += QPEApplication::qpeDir() + "/help/" + lang + "/html";
+ path += qpeDir + "/help/" + lang + "/html";
}
- path += QPEApplication::qpeDir() + "/pics";
- path += QPEApplication::qpeDir() + "/help/html";
- path += QPEApplication::qpeDir() + "/docs";
+ path += qpeDir + "/pics";
+ path += qpeDir + "/help/html";
+ /* we even put english into the en dir so try it as fallback as well for opie */
+ path += qpeDir + "/help/en/html";
+ path += qpeDir + "/docs";
return path;
}
#include "global.moc"