[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 50005] New: Icons broken on glossary page
From:       Stefan Asserhall <stefan.asserhall () telia ! com>
Date:       2002-10-31 18:11:04
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
     
http://bugs.kde.org/show_bug.cgi?id=50005     
           Summary: Icons broken on glossary page
           Product: khelpcenter
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: schumacher@kde.org
        ReportedBy: stefan.asserhall@telia.com


Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 2.96 

Icons broken on glossary page, when looking up a word.The icons are OK for English, \
but not for other languages. The bug occurs in langLookup, which returns files that \
do not exist, I think. Here is a patch that seems to work:RCS file: \
/home/kde/kdebase/khelpcenter/view.cpp,vretrieving revision 1.7diff -u -3 -p -r1.7 \
view.cpp--- view.cpp    13 Aug 2002 09:31:45 -0000      1.7+++ view.cpp    26 Oct \
2002 19:35:06 -0000@@ -20,7 +20,7 @@ View::View( QWidget *parentWidget, const     \
connect( this, SIGNAL( setWindowCaption( const QString & ) ),              this, \
SLOT( setTitle( const QString & ) ) );              -    QString css = \
langLookup("common/kde-default.css");+    QString css = \
langLookup("common/kde-default.css", false);     if (!css.isEmpty())     {        \
QFile css_file(css);@@ -95,14 +95,14 @@ void View::showGlossaryEntry( const Glos     \
QString htmlSrc = htmlStream.read()                       .arg( i18n( "KDE Glossary" \
) )                       .arg( entry.term() )-                      .arg( \
langLookup( "khelpcenter/konq.css" ) )-                      .arg( langLookup( \
"khelpcenter/pointers.png" ) )-                      .arg( langLookup( \
"khelpcenter/khelpcenter.png" ) )-                      .arg( langLookup( \
"khelpcenter/lines.png" ) )+                      .arg( langLookup( \
"khelpcenter/konq.css", false) )+                      .arg( langLookup( \
"khelpcenter/pointers.png", false ) )+                      .arg( langLookup( \
"khelpcenter/khelpcenter.png", false ) )+                      .arg( langLookup( \
"khelpcenter/lines.png", false ) )                       .arg(entry.term())           \
.arg(entry.definition())                       .arg(seeAlso)-                      \
.arg( langLookup( "khelpcenter/kdelogo2.png" ) );+                      .arg( \
langLookup( "khelpcenter/kdelogo2.png", false ) );      \
begin("help:/khelpcenter/glossary" );     write(htmlSrc);@@ -130,11 +130,11 @@ void \
View::showAboutPage()     QString res = t.read();      res = res.arg( i18n("Conquer \
your Desktop!") )-          .arg( langLookup( "khelpcenter/konq.css" ) )-          \
.arg( langLookup( "khelpcenter/pointers.png" ) )-          .arg( langLookup( \
"khelpcenter/khelpcenter.png" ) )+          .arg( langLookup( "khelpcenter/konq.css", \
false ) )+          .arg( langLookup( "khelpcenter/pointers.png", false ) )+          \
.arg( langLookup( "khelpcenter/khelpcenter.png", false ) )           .arg( i18n("Help \
Center") )-          .arg( langLookup( "khelpcenter/lines.png" ) )+          .arg( \
langLookup( "khelpcenter/lines.png", false ) )           .arg( i18n( "Welcome to the \
K Desktop Environment" ) )           .arg( i18n( "The KDE team welcomes you to \
user-friendly UNIX computing" ) )           .arg( i18n( "KDE is a powerful graphical \
desktop environment for UNIX workstations. A\n"@@ -154,14 +154,14 @@ void \
View::showAboutPage()           .arg( i18n( "The Kicker Desktop Panel" ) )           \
.arg( i18n( "The KDE Control Center" ) )           .arg( i18n( "The Konqueror File \
manager and Web Browser" ) )-          .arg( langLookup( "khelpcenter/kdelogo2.png" ) \
);+          .arg( langLookup( "khelpcenter/kdelogo2.png", false ) );     begin( \
"about:khelpcenter" );     write( res );     end();     emit completed(); } -QString \
View::langLookup( const QString &fname )+QString View::langLookup( const QString \
&fname, bool docbook ) {     QStringList search; @@ -186,11 +186,13 @@ QString \
View::langLookup( const QString          QFileInfo info(*it);         if \
(info.exists() && info.isFile() && info.isReadable())             return *it;-        \
++        if (docbook) {                QString file = (*it).left((*it).findRev('/')) \
+ "/index.docbook";                info.setFile(file);                if \
(info.exists() && info.isFile() && info.isReadable())                        return \
*it;+        }     }      return QString::null;Index: \
view.h===================================================================RCS file: \
/home/kde/kdebase/khelpcenter/view.h,vretrieving revision 1.6diff -u -3 -p -r1.6 \
view.h--- view.h      11 Aug 2002 09:02:38 -0000      1.6+++ view.h      26 Oct 2002 \
19:35:06 -0000@@ -25,7 +25,7 @@ class View : public KHTMLPart     int state() const { \
return mState; }     QString title() const { return mTitle; } -    static QString \
langLookup( const QString &fname );+    static QString langLookup( const QString \
&fname, bool docbook = true );      void beginSearchResult();     void \
writeSearchResult( const QString & );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic