summaryrefslogtreecommitdiff
authorzecke <zecke>2004-10-16 22:31:18 (UTC)
committer zecke <zecke>2004-10-16 22:31:18 (UTC)
commit4a623a9afe68f8d2d2f9562cb5ab589c0023519c (patch) (side-by-side diff)
tree63cfeb0e784db5dae6c93596cd07b04217ab4a22
parent1633552a8816eaa18b2b06da6573611b2636cee8 (diff)
downloadopie-4a623a9afe68f8d2d2f9562cb5ab589c0023519c.zip
opie-4a623a9afe68f8d2d2f9562cb5ab589c0023519c.tar.gz
opie-4a623a9afe68f8d2d2f9562cb5ab589c0023519c.tar.bz2
-Remove debug output on appMessage
-Check for Application Pages in help/lang/execname/execname.html as well. This is needed for qashmoney and could be used for the other help pages as well
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/helpbrowser/helpbrowser.cpp1
-rw-r--r--core/apps/helpbrowser/magictextbrowser.cpp11
2 files changed, 9 insertions, 3 deletions
diff --git a/core/apps/helpbrowser/helpbrowser.cpp b/core/apps/helpbrowser/helpbrowser.cpp
index cbb4059..4bd9565 100644
--- a/core/apps/helpbrowser/helpbrowser.cpp
+++ b/core/apps/helpbrowser/helpbrowser.cpp
@@ -109,25 +109,24 @@ void HelpBrowser::init( const QString& _home )
#if !defined(QT_NO_COP)
QCopChannel *addressChannel = new QCopChannel("QPE/HelpBrowser" , this );
connect (addressChannel, SIGNAL( received(const QCString&,const QByteArray&)),
this, SLOT ( appMessage(const QCString&,const QByteArray&) ) );
#endif
connect( qApp, SIGNAL(appMessage(const QCString&,const QByteArray&)),
this, SLOT(appMessage(const QCString&,const QByteArray&)) );
}
void HelpBrowser::appMessage(const QCString& msg, const QByteArray& data)
{
- odebug << "reached appMessage" << oendl;
if ( msg == "showFile(QString)" ) {
QDataStream ds(data,IO_ReadOnly);
QString fn;
ds >> fn;
setDocument( fn );
QPEApplication::setKeepRunning();
showMaximized();
setActiveWindow();
raise();
}
diff --git a/core/apps/helpbrowser/magictextbrowser.cpp b/core/apps/helpbrowser/magictextbrowser.cpp
index 80495c9..44bf19f 100644
--- a/core/apps/helpbrowser/magictextbrowser.cpp
+++ b/core/apps/helpbrowser/magictextbrowser.cpp
@@ -74,24 +74,31 @@ QString MagicTextBrowser::generateOpe(const QString& name)const {
}else
return QString::null;
}
QString MagicTextBrowser::generateQpe(const QString& name) const {
QString dir = MimeType::appsFolderName()+"/"+name[0].upper()+name.mid(1);
AppLnkSet lnkset(dir);
AppLnk* lnk;
QString r;
for (QListIterator<AppLnk> it(lnkset.children()); (lnk=it.current()); ++it) {
QString name = lnk->name();
QString icon = lnk->icon();
- QString helpFile = lnk->exec()+".html";
+ QString exec = lnk->exec();
+ QString helpFile = exec+".html";
QStringList helpPath = Global::helpPath();
bool helpExists = FALSE;
- for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !helpExists; ++it)
+ for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !helpExists; ++it) {
helpExists = QFile::exists( *it + "/" + helpFile );
+
+ if( !helpExists && QFile::exists( *it + "/" + exec + "/" + helpFile ) ) {
+ helpFile = exec + "/" + helpFile;
+ helpExists = true;
+ }
+ }
if ( helpExists ) {
r += "<h3><a href="+helpFile+"><img src="+icon+">"+name+"</a></h3>\n";
}
}
return r;
}