[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: 2003-04-23 14:39:29
[Download RAW message or body]
CVS commit by cschumac:
Better control of root of apps docs.
M +7 -2 navigator.cpp 1.56
M +10 -5 navigatorappitem.cpp 1.8
M +3 -1 navigatorappitem.h 1.7
--- kdebase/khelpcenter/navigator.cpp #1.55:1.56
@@ -197,8 +197,13 @@ class PluginTraverser : public DocEntryT
if (entry->khelpcenterSpecial() == "apps") {
+ NavigatorAppItem *appItem;
if ( mListView )
- mCurrentItem = new NavigatorAppItem( mListView, mCurrentItem );
+ appItem = new NavigatorAppItem( mListView, mCurrentItem );
else
- mCurrentItem = new NavigatorAppItem( mParentItem, mCurrentItem );
+ appItem = new NavigatorAppItem( mParentItem, mCurrentItem );
+ KConfig *cfg = kapp->config();
+ cfg->setGroup( "General" );
+ appItem->setRelpath( cfg->readEntry( "AppsRoot" ) );
+ mCurrentItem = appItem;
} else if ( entry->khelpcenterSpecial() == "scrollkeeper" ) {
if ( mParentItem ) {
--- kdebase/khelpcenter/navigatorappitem.cpp #1.7:1.8
@@ -39,5 +39,5 @@ NavigatorAppItem::NavigatorAppItem(QList
NavigatorAppItem::NavigatorAppItem (QListView* parent, const QString& text, const \
QString& miniicon, const QString& _relpath) : NavigatorItem(parent, text, miniicon)
- , relpath(_relpath)
+ , mRelpath(_relpath)
{
setExpandable(true);
@@ -46,16 +46,21 @@ NavigatorAppItem::NavigatorAppItem (QLis
NavigatorAppItem::NavigatorAppItem (QListViewItem* parent, const QString& text, \
const QString& miniicon, const QString& _relpath) : NavigatorItem(parent, text, \
miniicon)
- , relpath(_relpath)
+ , mRelpath(_relpath)
{
setExpandable(true);
}
+void NavigatorAppItem::setRelpath( const QString &relpath )
+{
+ mRelpath = relpath;
+}
+
void NavigatorAppItem::setOpen(bool open)
{
if ( open && (childCount() == 0) )
{
- kdWarning() << "NavigatorAppItem::setOpen(" << this << ", "
- << relpath << ")" << endl;
- KServiceGroup::Ptr root = KServiceGroup::group(relpath);
+ kdDebug() << "NavigatorAppItem::setOpen(" << this << ", "
+ << mRelpath << ")" << endl;
+ KServiceGroup::Ptr root = KServiceGroup::group(mRelpath);
if (!root) {
kdWarning() << "No Service groups\n";
--- kdebase/khelpcenter/navigatorappitem.h #1.6:1.7
@@ -35,4 +35,6 @@ class NavigatorAppItem : public Navigato
NavigatorAppItem (QListViewItem* parent, const QString& text, const QString& \
miniicon, const QString& relpath);
+ void setRelpath( const QString & );
+
virtual void setOpen(bool);
@@ -40,5 +42,5 @@ class NavigatorAppItem : public Navigato
QString documentationURL(KService *s);
- QString relpath;
+ QString mRelpath;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic