Subversion Repositories f9daq

Rev

Rev 146 | Rev 172 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 146 Rev 167
Line 1959... Line 1959...
1959
 
1959
 
1960
// File browser for opening histograms
1960
// File browser for opening histograms
1961
void TGAppMainFrame::SelectDirectory()
1961
void TGAppMainFrame::SelectDirectory()
1962
{
1962
{
1963
   int i = fileList->GetNumberOfEntries();
1963
   int i = fileList->GetNumberOfEntries();
1964
   char *cTemp;
1964
//   char *cTemp;
1965
 
1965
 
1966
   TGFileInfo file_info;
1966
   TGFileInfo file_info;
1967
   const char *filetypes[] = {"Histograms",histextall,0,0};
1967
   const char *filetypes[] = {"Histograms",histextall,0,0};
1968
   file_info.fFileTypes = filetypes;
1968
   file_info.fFileTypes = filetypes;
1969
   cTemp = new char[1024];
1969
//   cTemp = new char[1024];
1970
   sprintf(cTemp, "%s/results", rootdir);
1970
//   sprintf(cTemp, "%s/results", rootdir);
1971
   file_info.fIniDir = StrDup(cTemp);
1971
//   file_info.fIniDir = StrDup(cTemp);
-
 
1972
   file_info.fIniDir = StrDup(currentOpenDir);
1972
   file_info.fMultipleSelection = kTRUE;
1973
   file_info.fMultipleSelection = kTRUE;
1973
   new TGFileDialog(gClient->GetDefaultRoot(), fMain, kFDOpen, &file_info);
1974
   new TGFileDialog(gClient->GetDefaultRoot(), fMain, kFDOpen, &file_info);
1974
   delete[] cTemp;
1975
//   delete[] cTemp;
1975
 
1976
 
1976
   TList *files = file_info.fFileNamesList;
1977
   TList *files = file_info.fFileNamesList;
1977
   if(files)
1978
   if(files)
1978
   {
1979
   {
1979
      TSystemFile *file;
1980
      TSystemFile *file;
1980
      TString fname;
1981
      TString fname;
1981
      TIter next(files);
1982
      TIter next(files);
1982
      while(file=(TSystemFile*)next())
1983
      while(file=(TSystemFile*)next())
1983
      {
1984
      {
1984
         fname = file->GetName();
1985
         fname = file->GetName();
-
 
1986
         remove_from_last((char*)fname.Data(), '/', currentOpenDir);
1985
         fileList->AddEntry(fname.Data(), i);
1987
         fileList->AddEntry(fname.Data(), i);
1986
         i++;
1988
         i++;
1987
      }
1989
      }
1988
   }
1990
   }
1989
   fileList->Layout();
1991
   fileList->Layout();