Changeset 4446 in ntrip


Ignore:
Timestamp:
Jul 29, 2012, 2:33:45 PM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncmain.cpp

    r4346 r4446  
    6767int main(int argc, char *argv[]) {
    6868
    69   bool       GUIenabled  = true;
     69  bool       interactive  = true;
    7070  QByteArray rawFileName;
    7171  QString    confFileName;
     
    8282    }
    8383    if (QRegExp("--?nw").exactMatch(argv[ii])) {
    84       GUIenabled = false;
     84      interactive = false;
    8585    }
    8686    if (ii + 1 < argc) {
     
    8989      }
    9090      if (QRegExp("--?file").exactMatch(argv[ii])) {
    91         GUIenabled = false;
     91        interactive = false;
    9292        rawFileName = QByteArray(argv[ii+1]);
    9393      }
     
    9696
    9797#ifdef Q_OS_MAC
    98   if (argc== 3 && GUIenabled) {
     98  if (argc== 3 && interactive) {
    9999    confFileName = QString(argv[2]);
    100100  }
    101101#else
    102   if (argc == 2 && GUIenabled) {
     102  if (argc == 2 && interactive) {
    103103    confFileName = QString(argv[1]);
    104104  }
    105105#endif
    106106
    107   bncApp app(argc, argv, GUIenabled);
     107#ifdef Q_WS_X11
     108  bool useGUI = getenv("DISPLAY") != 0;
     109#else
     110  bool useGUI = true;
     111#endif
     112 
     113  bncApp app(argc, argv, useGUI);
    108114
    109115  app.setApplicationName("BNC");
     
    124130  // Interactive Mode - open the main window
    125131  // ---------------------------------------
    126   if (GUIenabled) {
     132  if (interactive) {
    127133
    128134    app.setMode(bncApp::interactive);
Note: See TracChangeset for help on using the changeset viewer.