Changeset 81

Show
Ignore:
Timestamp:
01/13/06 02:43:50 (3 years ago)
Author:
edmanm
Message:

Make Vidalia's name appear properly-cased on Mac;
Let Vidalia have a menu in the menubar on Mac.

Location:
trunk/src
Files:
1 added
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/main.cpp

    r68 r81  
    5151   
    5252  MainWindow mainWin;  
    53  
    5453  return app.exec(); 
    5554} 
  • trunk/src/gui/mainwindow.cpp

    r74 r81  
    3333  createActions(); 
    3434  createMenus(); 
    35   
     35   
    3636  /* Create a new TorControl object, used to communicate with and manipulate Tor */ 
    3737  _torControl = new TorControl(); 
     
    9696  _toolsMenu->addAction(_bandwidthAct); 
    9797  _toolsMenu->addAction(_messageAct); 
     98 
     99#if defined(Q_WS_MAC) 
     100  /* The File, Help, and Configure menus will get merged into the application 
     101   * menu by Qt. */ 
     102  _menuBar = new QMenuBar(); 
     103  _fileMenu = _menuBar->addMenu(tr("File")); 
     104  _fileMenu->addAction(_exitAct); 
     105  _torMenu = _menuBar->addMenu(tr("Tor")); 
     106  _torMenu->addAction(_startAct); 
     107  _torMenu->addAction(_stopAct); 
     108  _torMenu->addAction(_configAct); 
     109  _menuBar->addMenu(_toolsMenu); 
     110  _helpMenu = _menuBar->addMenu(tr("Help")); 
     111  _helpMenu->addAction(_aboutAct); 
     112#endif 
    98113} 
    99114 
  • trunk/src/gui/mainwindow.h

    r74 r81  
    4848  void createMenus(); 
    4949  void createActions(); 
     50  void createMenuBar(); 
    5051 
    5152  TorControl* _torControl; 
     
    5556  QMenu* _trayMenu; 
    5657  QMenu* _toolsMenu; 
    57   
     58 
    5859  QAction* _startAct; 
    5960  QAction* _stopAct; 
     
    6364  QAction* _bandwidthAct; 
    6465  QAction* _messageAct; 
     66 
     67/* GUI elements unique on Mac so we can use the system menubar */ 
     68#if defined(Q_WS_MAC) 
     69  QMenuBar* _menuBar; 
     70  QMenu* _fileMenu; 
     71  QMenu* _torMenu; 
     72  QMenu* _helpMenu; 
     73#endif 
    6574}; 
    6675