--=-5fW5wahKNcr6C52nd0JI Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi The attached patch isn't the complete implementation yet, but it would allow configuring the visibility of hidden directories on a per tree base. In the 3.1 branch it would need a modification in the config files for showing hidden directories, in head a configuration gui could be added. Basically it's the same you Waldo's fix, but with the ability to make it configurable. What do you think ? Kind regards Joseph Wenninger Am Fre, 2003-02-21 um 23.52 schrieb Waldo Bastian: > On Friday 21 February 2003 20:25, Maksim Orlovich wrote: > > Since I don't think it'd be backwards compatible to make > > KDirLister::setShowDotFiles context dependent, > > KDirLister is not really designed to have different settings for different > directories. It will be very hairy to add it. > > > the setting in the sidebar > > treeview should probably be fixed to the one of the view's root directory. > > The attached patch does this. However, it now becomes very obvious that the > "show hidden files" menu-option has no effect on the dirtree. I'm not sure if > there is a simple way to make it follow the other view in this regard, but > otherwise I would like to suggest to simply disable showing dotfiles in the > directory tree and be done with it. (also attached) > > Cheers, > Waldo > -- > bastian@kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian@suse.com > ---- > --=-5fW5wahKNcr6C52nd0JI Content-Disposition: attachment; filename=sidebar_trees.diff Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; name=sidebar_trees.diff; charset=ISO-8859-15 ? sidebar_trees.diff Index: konq_sidebartree.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/kde/kdebase/konqueror/sidebar/trees/konq_sidebartree.cpp,v retrieving revision 1.24 diff -u -3 -p -r1.24 konq_sidebartree.cpp --- konq_sidebartree.cpp 13 Dec 2002 22:53:51 -0000 1.24 +++ konq_sidebartree.cpp 24 Feb 2003 18:38:06 -0000 @@ -629,6 +629,8 @@ void KonqSidebarTree::loadTopLevelItem(=20 // Here's where we need to create the right module... // ### TODO: make this KTrader/KLibrary based. QString moduleName =3D cfg.readEntry( "X-KDE-TreeModule" ); + QString showHidden=3Dcfg.readEntry("X-KDE-TreeModule-ShowHidden",""); + if (moduleName.isEmpty()) moduleName=3D"Directory"; kdDebug(1201) << "##### Loading module: " << moduleName << " file: " <= < filename << endl; =20 @@ -636,7 +638,8 @@ void KonqSidebarTree::loadTopLevelItem(=20 func=3Dplugins[moduleName]; if (func!=3D0) { - module=3Dfunc(this); + kdDebug(1201)<<"showHidden: "<insert("URL",ksc2.readEntry("X-KDE-Default-URL")); map->insert("X-KDE-KonqSidebarModule","konqsidebar_tree"); map->insert("X-KDE-TreeModule",ksc2.readEntry("X-KDE-TreeModule")); + map->insert("X-KDE-TreeModule-ShowHidden",ksc2.readEntry("X-KDE-TreeMod= ule-ShowHidden")); fn->setLatin1("dirtree%1.desktop"); return true; } Index: bookmark_module/bookmark_module.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/kde/kdebase/konqueror/sidebar/trees/bookmark_module/bookmar= k_module.cpp,v retrieving revision 1.4 diff -u -3 -p -r1.4 bookmark_module.cpp --- bookmark_module/bookmark_module.cpp 4 Mar 2002 23:53:54 -0000 1.4 +++ bookmark_module/bookmark_module.cpp 24 Feb 2003 18:38:06 -0000 @@ -107,7 +107,7 @@ KonqSidebarBookmarkItem * KonqSidebarBoo =20 extern "C" { - KonqSidebarTreeModule* create_konq_sidebartree_bookmarks(KonqSidebarTre= e* par) + KonqSidebarTreeModule* create_konq_sidebartree_bookmarks(KonqSidebarTre= e* par,const bool) { return new KonqSidebarBookmarkModule(par); }=20 Index: dirtree_module/dirtree_module.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/kde/kdebase/konqueror/sidebar/trees/dirtree_module/dirtree_= module.cpp,v retrieving revision 1.21 diff -u -3 -p -r1.21 dirtree_module.cpp --- dirtree_module/dirtree_module.cpp 21 Oct 2002 04:21:08 -0000 1.21 +++ dirtree_module/dirtree_module.cpp 24 Feb 2003 18:38:06 -0000 @@ -28,8 +28,8 @@ #include =20 =20 -KonqSidebarDirTreeModule::KonqSidebarDirTreeModule( KonqSidebarTree * pare= ntTree ) - : KonqSidebarTreeModule( parentTree ), m_dirLister(0L), m_topLevelItem= (0L), m_pProps(0L) +KonqSidebarDirTreeModule::KonqSidebarDirTreeModule( KonqSidebarTree * pare= ntTree , bool showHidden) + : KonqSidebarTreeModule( parentTree, showHidden ), m_dirLister(0L), m_= topLevelItem(0L), m_pProps(0L) { // Used to be static... s_defaultViewProps =3D new KonqPropsView( @@ -207,7 +207,7 @@ void KonqSidebarDirTreeModule::listDirec // newProps returns true the first time, and any time something might // have changed. /*bool newProps =3D */m_pProps->enterDir( url ); - m_dirLister->setShowingDotFiles( m_pProps->isShowingDotFiles() ); + m_dirLister->setShowingDotFiles( showHidden()); //m_pProps->isShowingD= otFiles() ); =20 if (tree()->isOpeningFirstChild()) m_dirLister->setAutoErrorHandlingEn= abled(false,0); else m_dirLister->setAutoErrorHandlingEnabled(true,tree()); @@ -418,9 +418,9 @@ void KonqSidebarDirTreeModule::followURL =20 extern "C" { - KonqSidebarTreeModule *create_konq_sidebartree_dirtree(KonqSidebar= Tree* par) + KonqSidebarTreeModule *create_konq_sidebartree_dirtree(KonqSidebar= Tree* par,const bool showHidden) { - return new KonqSidebarDirTreeModule(par); + return new KonqSidebarDirTreeModule(par,showHidden); } } =20 Index: dirtree_module/dirtree_module.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/kde/kdebase/konqueror/sidebar/trees/dirtree_module/dirtree_= module.h,v retrieving revision 1.6 diff -u -3 -p -r1.6 dirtree_module.h --- dirtree_module/dirtree_module.h 23 Jan 2002 23:46:40 -0000 1.6 +++ dirtree_module/dirtree_module.h 24 Feb 2003 18:38:06 -0000 @@ -34,7 +34,7 @@ class KonqSidebarDirTreeModule : public=20 { Q_OBJECT public: - KonqSidebarDirTreeModule( KonqSidebarTree * parentTree ); + KonqSidebarDirTreeModule( KonqSidebarTree * parentTree, bool ); virtual ~KonqSidebarDirTreeModule(); =20 virtual void addTopLevelItem( KonqSidebarTreeTopLevelItem * item ); Index: history_module/history_module.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/kde/kdebase/konqueror/sidebar/trees/history_module/history_= module.cpp,v retrieving revision 1.16 diff -u -3 -p -r1.16 history_module.cpp --- history_module/history_module.cpp 17 Sep 2002 20:22:42 -0000 1.16 +++ history_module/history_module.cpp 24 Feb 2003 18:38:06 -0000 @@ -338,7 +338,7 @@ void KonqSidebarHistoryModule::slotClear =20 extern "C" { - KonqSidebarTreeModule* create_konq_sidebartree_history(KonqSidebarTree* p= ar) + KonqSidebarTreeModule* create_konq_sidebartree_history(KonqSidebarTree* p= ar, const bool) { return new KonqSidebarHistoryModule(par); } Index: init/dirtree_module.desktop =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/kde/kdebase/konqueror/sidebar/trees/init/dirtree_module.des= ktop,v retrieving revision 1.57 diff -u -3 -p -r1.57 dirtree_module.desktop --- init/dirtree_module.desktop 21 Jan 2003 13:33:40 -0000 1.57 +++ init/dirtree_module.desktop 24 Feb 2003 18:38:06 -0000 @@ -64,3 +64,4 @@ Open=3Dfalse X-KDE-TreeModule=3DDirectory X-KDE-TreeModule-Lib=3Dkonq_sidebartree_dirtree X-KDE-Default-URL=3Dfile:/ +X-KDE-TreeModule-ShowHidden=3Dfalse --=-5fW5wahKNcr6C52nd0JI--