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

List:       kde-commits
Subject:    kdebase/khelpcenter
From:       Cornelius Schumacher <schumacher () kde ! org>
Date:       2004-07-08 8:05:30
Message-ID: 20040708080530.B583416B27 () office ! kde ! org
[Download RAW message or body]

CVS commit by cschumac: 

Fix category icons. The "contents2" icon is still missing.


  M +3 -1      navigatorappitem.cpp   1.15
  M +10 -0     navigatoritem.cpp   1.8
  M +2 -0      navigatoritem.h   1.8
  M +3 -1      plugintraverser.cpp   1.4
  M +3 -14     toc.cpp   1.14


--- kdebase/khelpcenter/navigatorappitem.cpp  #1.14:1.15
@@ -68,4 +68,6 @@ void NavigatorAppItem::setRelpath( const
 void NavigatorAppItem::setOpen(bool open)
 {
+  kdDebug() << "NavigatorAppItem::setOpen()" << endl;
+
   if ( open && (childCount() == 0) && !mPopulated )
   {
@@ -74,5 +76,5 @@ void NavigatorAppItem::setOpen(bool open
      populate();
   }
-  NavigatorItem::setOpen(open); 
+  QListViewItem::setOpen(open); 
 }
 

--- kdebase/khelpcenter/navigatoritem.cpp  #1.7:1.8
@@ -93,3 +93,13 @@ TOC *NavigatorItem::createTOC()
 }
 
+void NavigatorItem::setOpen( bool open )
+{
+  QListViewItem::setOpen( open );
+
+  if ( entry()->icon().isEmpty() || entry()->icon() == "contents2" ) {
+    if ( open && childCount() > 0 ) setPixmap( 0, SmallIcon( "contents" ) );
+    else setPixmap( 0, SmallIcon( "contents2" ) );
+  }
+}
+
 // vim:ts=2:sw=2:et

--- kdebase/khelpcenter/navigatoritem.h  #1.7:1.8
@@ -51,4 +51,6 @@ class NavigatorItem : public QListViewIt
     TOC *createTOC();
 
+    void setOpen( bool open );
+
   private:
     void init( DocEntry * );

--- kdebase/khelpcenter/plugintraverser.cpp  #1.3:1.4
@@ -98,7 +98,9 @@ void PluginTraverser::process( DocEntry 
       mNavigator->insertIOSlaveDocs( entry->khelpcenterSpecial(), mCurrentItem );
     } else if ( entry->khelpcenterSpecial() == "info" ) {
-      mCurrentItem->setPixmap( 0, SmallIcon( "contents2" ) );
       mNavigator->insertInfoDocs( mCurrentItem );
+    } else {
+      return;
     }
+    mCurrentItem->setPixmap( 0, SmallIcon( "contents2" ) );
   }
 }

--- kdebase/khelpcenter/toc.cpp  #1.13:1.14
@@ -26,4 +26,5 @@
 #include <kprocess.h>
 #include <kstandarddirs.h>
+#include <kdebug.h>
 
 #include <qdir.h>
@@ -53,6 +54,4 @@ class TOCChapterItem : public TOCItem
                 virtual QString url();
                 
-                virtual void setOpen( bool open );
-        
         private:
                 QString m_name;
@@ -247,14 +246,4 @@ TOCChapterItem::TOCChapterItem( TOC *toc
 }
 
-void TOCChapterItem::setOpen( bool open )
-{
-        TOCItem::setOpen( open );
-
-        if ( open && childCount() > 0 ) 
-                setPixmap( 0, SmallIcon( "contents" ) );
-        else
-                setPixmap( 0, SmallIcon( "contents2" ) );
-}
-
 QString TOCChapterItem::url()
 {


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

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