Skip to content

Commit 5f17c05

Browse files
committed
[main] rootbrowse: instance a TRint instead of TApplication
This gives 2 advantages: it executes .rootlogon.C on startup (like the old rootbrowse did) and it provides an interactive prompt to the user while using rootbrowse.
1 parent 3e1597c commit 5f17c05

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main/src/rootbrowse.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "logging.hxx"
1010
#include "optparse.hxx"
1111

12-
#include <TApplication.h>
12+
#include <TRint.h>
1313
#include <TBrowser.h>
1414
#include <TError.h>
1515
#include <TFile.h>
@@ -106,7 +106,7 @@ int main(int argc, char **argv)
106106

107107
// NOTE: we need to instantiate TApplication ourselves, otherwise TBrowser
108108
// will create a batch application that cannot show graphics.
109-
TApplication app("rootbrowse", nullptr, nullptr);
109+
TRint app("rootbrowse", nullptr, nullptr);
110110

111111
if (!args.fWeb.empty())
112112
gROOT->SetWebDisplay(std::string(args.fWeb).c_str());
@@ -130,7 +130,7 @@ int main(int argc, char **argv)
130130
// For classic graphics: ensure rootbrowse quits when the window is closed
131131
if (auto imp = browser->GetBrowserImp()) {
132132
if (auto mainframe = imp->GetMainFrame()) {
133-
mainframe->Connect("CloseWindow()", "TApplication", &app, "Terminate()");
133+
mainframe->Connect("CloseWindow()", "TRint", &app, "Terminate()");
134134
}
135135
}
136136

0 commit comments

Comments
 (0)