swh:1:snp:af87cd67498ef4fe47c76ed3e7caffe5b61facaf
Raw File
Tip revision: 7af9cdc262b7a0cf2679a0df6c639c93656958c0 authored by Axel Naumann on 06 November 2023, 16:45:30 UTC
[foundation] Update version file to 6.30.01: dev phase for upcoming patch release.
Tip revision: 7af9cdc
fileopen.C
// @(#)macros:$Id$
// Author: Axel Naumann, 2008-05-22
//
// This script gets executed when double-clicking a ROOT file (currently only on Windows).
// The file that got double clicked and opened is accessible as _file0.

void onBrowserClose() {
   gApplication->Terminate(0);
}

void fileopen()
{
   TBrowser *b = new TBrowser;
   // or, to only browse the file:
   // new TBrowser(_file0);

   // Quit ROOT when the browser gets closed:
   TBrowserImp *bi = b->GetBrowserImp();
   if (dynamic_cast<TRootBrowser *>(bi) || dynamic_cast<TRootBrowserLite *>(bi))
      bi->GetMainFrame()->Connect("CloseWindow()", 0, 0, "onBrowserClose()");
}
back to top