Hi Chrisitan, now in CVS. Regards. Valeriy > Dear Valeriy > > Thank you for these answers. > If possible,could you tell me when you have put the changes in CVS > so that I can update my root code. > > Best regards > Christian > > Valeriy Onuchin wrote: > > > Hi Christian, > >this example is now incorporated into guitest.C and guitest.cxx (at CVS). > > > > > > > >>Dear Valeriy > >> > >>Finally I got your example running on my Mac. > >>In principle, this is what I would need, thank you very much. > >> > >>Here are my comments: > >>1, Duplication of directories: > >>I am not sure if this is a general case, but when I > >>double-click on a directory to open it, close it, and > >>afterwards open it again, all subdirectories are duplicated. > >>I did not have the time to check it, but it could be > >>a problem of DirListWindow::OnDoubleClick()? > >> > >> > > > >I fixed it. > > > > > > > >>2, Display root files in tree: > >>For me it is very important to show the root files in > >>the directory tree, too! Thus it would be great, if you > >>could include this possibility in TSystemDirectory. > >> > >>I have already made the necessary changes in both classes, > >>TSystemFile and TSystemDirectory, and have the files > >>attached. > >> > >>In order to see the root files in your macro DirList.C, > >>you need only to change DirListWindow::OnDoubleClick() to: > >> > >>void DirListWindow::OnDoubleClick(TGListTreeItem* item, Int_t btn) > >>{ > >> if (btn!=kButton1) return; > >> > >> TSystemDirectory dir(item->GetText(),DirName(item).Data(),kTRUE); > >>// TSystemDirectory dir(item->GetText(),DirName(item).Data()); > >> > >> TList *files = dir.GetListOfFiles(); > >> > >> if (files) { > >> TIter next(files); > >> TSystemFile *file; > >> TString fname; > >> > >> while ((file=(TSystemFile*)next())) { > >> fname = file->GetName(); > >> if (file->IsDirectory() || file->IsRootFile(fname.Data())) { > >> if ((fname!="..") && (fname!=".")) { > >> fListTree->AddItem(item,fname.Data()); > >> } > >> } > >> } > >> delete files; > >> } > >>}//OnDoubleClick > >> > >> > > > >I will add this posibility. > > > > > > > >>2a) It would be great if the root files in the tree could > >>be displayed with their own root file icons to be able to > >>distinguish them from the system directories. > >>Do you know, how I could achieve this? > >> > >> > >> > > > >It's very easy. Check: > >http://root.cern.ch/root/htmldoc/TGListTree.html#TGListTree:AddItem > >you can specify opened/closed icon. > > > > > > > > > >>3, Could you please change in class TSystemDirectory the > >>private members to protected? Then derived classes could > >>access these members. Thank you. > >> > >> > >> > > > >Be done. > > > >Thanks. Regards. Valeriy > > > > > > > > > > > > > > > > > > >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET