[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r1696: Give the Tor status banner its own group; make the buttons d (in trunk: . src/gui src/gui/res src/gui/res/16x16)



Author: edmanm
Date: 2007-04-08 00:38:18 -0400 (Sun, 08 Apr 2007)
New Revision: 1696

Added:
   trunk/src/gui/res/16x16/start-tor.png
   trunk/src/gui/res/16x16/stop-tor.png
Modified:
   trunk/
   trunk/src/gui/mainwindow.cpp
   trunk/src/gui/mainwindow.h
   trunk/src/gui/mainwindow.ui
   trunk/src/gui/res/vidalia_common.qrc
Log:
 r1774@adrastea:  edmanm | 2007-04-08 00:32:30 -0400
 Give the Tor status banner its own group; make the buttons do stuff; unify
 into one function the logic that updates the UI when Tor's status changes;
 unify the "Start" and "Stop" actions on the tray menu into one option that
 changes based on whether Tor is running or not, so it looks and  behaves 
 like the button on the new "control panel" thing.



Property changes on: trunk
___________________________________________________________________
 svk:merge ticket from /vidalia/local/trunk [r1774] on 54b3572a-7227-0410-958f-53ecd705b71a

Modified: trunk/src/gui/mainwindow.cpp
===================================================================
--- trunk/src/gui/mainwindow.cpp	2007-04-02 17:39:26 UTC (rev 1695)
+++ trunk/src/gui/mainwindow.cpp	2007-04-08 04:38:18 UTC (rev 1696)
@@ -39,8 +39,6 @@
 
 
 #define IMG_APP_ICON       ":/images/16x16/tor-logo.png"
-#define IMG_START          ":/images/16x16/tor-on.png"
-#define IMG_STOP           ":/images/16x16/tor-off.png"
 #define IMG_BWGRAPH        ":/images/16x16/utilities-system-monitor.png"
 #define IMG_MESSAGELOG     ":/images/16x16/format-justify-fill.png"
 #define IMG_CONFIG         ":/images/16x16/preferences-system.png"
@@ -50,6 +48,15 @@
 #define IMG_EXIT           ":/images/16x16/emblem-unreadable.png"
 #define IMG_NETWORK        ":/images/16x16/applications-internet.png"
 
+#define IMG_START_TOR_16     ":/images/16x16/start-tor.png"
+#define IMG_STOP_TOR_16      ":/images/16x16/stop-tor.png"
+#define IMG_START_TOR_48     ":/images/48x48/start-tor.png"
+#define IMG_STOP_TOR_48      ":/images/48x48/stop-tor.png"
+#define IMG_TOR_STOPPED_48   ":/images/48x48/tor-off.png"
+#define IMG_TOR_RUNNING_48   ":/images/48x48/tor-on.png"
+#define IMG_TOR_STARTING_48  ":/images/48x48/tor-starting.png"
+#define IMG_TOR_STOPPING_48  ":/images/48x48/tor-stopping.png"
+
 /* Decide which of our four sets of tray icons to use. */
 #if defined(USE_QSYSTEMTRAYICON)
 /* QSystemTrayIcon is available */
@@ -99,17 +106,17 @@
   ui.setupUi(this);
 
   /* Create all the dialogs of which we only want one instance */
-  _aboutDialog = new AboutDialog();
   _messageLog = new MessageLog();
   _bandwidthGraph = new BandwidthGraph();
   _netViewer = new NetViewer();
-  _configDialog = new ConfigDialog();
   
   /* Create the actions that will go in the tray menu */
   createActions();
   /* Creates a tray icon with a context menu and adds it to the system's
    * notification area. */
   createTrayIcon();
+  /* Start with Tor initially stopped */
+  updateTorStatus(Stopped);
   
   /* Create a new TorControl object, used to communicate with and manipulate Tor */
   _torControl = Vidalia::torControl(); 
@@ -150,8 +157,6 @@
   delete _messageLog;
   delete _netViewer;
   delete _bandwidthGraph;
-  delete _aboutDialog;
-  delete _configDialog;
 }
 
 /** Terminate the Tor process if it is being run under Vidalia, disconnect all
@@ -198,13 +203,8 @@
 void 
 MainWindow::createActions()
 {
-  _startAct = new QAction(QIcon(IMG_START), tr("Start"), this);
-  connect(_startAct, SIGNAL(triggered()), this, SLOT(start()));
-  _startAct->setEnabled(true);
-  
-  _stopAct = new QAction(QIcon(IMG_STOP), tr("Stop"), this);
-  connect(_stopAct, SIGNAL(triggered()), this, SLOT(stop()));
-  _stopAct->setEnabled(false);
+  _startStopAct = new QAction(QIcon(IMG_START_TOR_16), tr("Start Tor"), this);
+  connect(_startStopAct, SIGNAL(triggered()), this, SLOT(toggleTor()));
 
   _exitAct = new QAction(QIcon(IMG_EXIT), tr("Exit"), this);
   connect(_exitAct, SIGNAL(triggered()), this, SLOT(close()));
@@ -212,26 +212,31 @@
   _bandwidthAct = new QAction(QIcon(IMG_BWGRAPH), tr("Bandwidth Graph"), this);
   connect(_bandwidthAct, SIGNAL(triggered()), 
           _bandwidthGraph, SLOT(showWindow()));
+  connect(ui.lblBandwidthGraph, SIGNAL(clicked()),
+          _bandwidthGraph, SLOT(showWindow()));
 
   _messageAct = new QAction(QIcon(IMG_MESSAGELOG), tr("Message Log"), this);
   connect(_messageAct, SIGNAL(triggered()),
           _messageLog, SLOT(showWindow()));
+  connect(ui.lblMessageLog, SIGNAL(clicked()),
+          _messageLog, SLOT(showWindow()));
 
   _networkAct = new QAction(QIcon(IMG_NETWORK), tr("Network Map"), this);
   connect(_networkAct, SIGNAL(triggered()), 
           _netViewer, SLOT(showWindow()));
-  
+  connect(ui.lblViewNetwork, SIGNAL(clicked()),
+          _netViewer, SLOT(showWindow()));
+
   _configAct = new QAction(QIcon(IMG_CONFIG), tr("Settings"), this);
-  connect(_configAct, SIGNAL(triggered()), 
-          _configDialog, SLOT(showWindow()));
+  connect(_configAct, SIGNAL(triggered()), this, SLOT(showConfigDialog()));
   
   _aboutAct = new QAction(QIcon(IMG_ABOUT), tr("About"), this);
-  connect(_aboutAct, SIGNAL(triggered()), 
-          _aboutDialog, SLOT(showWindow()));
+  connect(_aboutAct, SIGNAL(triggered()), this, SLOT(showAboutDialog()));
 
   _helpAct = new QAction(QIcon(IMG_HELP), tr("Help"), this);
   connect(_helpAct, SIGNAL(triggered()), vApp, SLOT(help()));
-  
+  connect(ui.lblHelpBrowser, SIGNAL(clicked()), vApp, SLOT(help()));
+
   _newIdentityAct = new QAction(QIcon(IMG_IDENTITY), tr("New Identity"), this);
   _newIdentityAct->setEnabled(false);
   connect(_newIdentityAct, SIGNAL(triggered()), this, SLOT(newIdentity()));
@@ -242,8 +247,6 @@
 void
 MainWindow::createTrayIcon()
 {
-  /* We start with an icon that says Tor is not running */
-  updateTrayIcon(IMG_TOR_STOPPED, tr("Tor is Stopped"));
   /* Create the default menu bar (Mac) */
   createMenuBar();
   /* Create a tray menu and add it to the tray icon */
@@ -258,8 +261,7 @@
 MainWindow::createTrayMenu()
 {
   QMenu *menu = new QMenu(this);
-  menu->addAction(_startAct);
-  menu->addAction(_stopAct);
+  menu->addAction(_startStopAct);
   menu->addSeparator();
   menu->addAction(_bandwidthAct);
   menu->addAction(_messageAct);
@@ -289,8 +291,7 @@
   /* Mac users sure like their shortcuts. Actions NOT mentioned below
    * don't explicitly need shortcuts, since they are merged to the default
    * menubar and get the default shortcuts anyway. */
-  _startAct->setShortcut(tr("Ctrl+S"));
-  _stopAct->setShortcut(tr("Ctrl+T"));
+  _startStopAct->setShortcut(tr("Ctrl+T"));
   _bandwidthAct->setShortcut(tr("Ctrl+B"));
   _messageAct->setShortcut(tr("Ctrl+L"));
   _networkAct->setShortcut(tr("Ctrl+N"));
@@ -310,8 +311,7 @@
   fileMenu->addAction(_exitAct);
   
   QMenu *torMenu = menuBar->addMenu(tr("Tor"));
-  torMenu->addAction(_startAct);
-  torMenu->addAction(_stopAct);
+  torMenu->addAction(_startStopAct);
   torMenu->addSeparator();
   torMenu->addAction(_newIdentityAct);
 
@@ -330,20 +330,78 @@
 #endif
 }
 
-/** Sets the tray icon's image and tooltip. */
+/** Updates the UI to reflect Tor's current <b>status</b>. */
 void
-MainWindow::updateTrayIcon(QString iconFile, QString tooltip)
+MainWindow::updateTorStatus(TorStatus status)
 {
-  /* Set the tray icon's image */
+  QString statusText, actionText;
+  QString trayIconFile, statusIconFile;
+  
+  if (status == Stopped) {
+      statusText = tr("Tor is not running");
+      actionText = tr("Start Tor");
+      trayIconFile = IMG_TOR_STOPPED;
+      statusIconFile = IMG_TOR_STOPPED_48;
+      _startStopAct->setEnabled(true);
+      _startStopAct->setText(actionText);
+      _startStopAct->setIcon(QIcon(IMG_START_TOR_16));
+      ui.lblStartStopTor->setEnabled(true);
+      ui.lblStartStopTor->setText(actionText);
+      ui.lblStartStopTor->setPixmap(QPixmap(IMG_START_TOR_48));
+      ui.lblStartStopTor->setStatusTip(actionText);
+  } else if (status == Stopping) {
+      statusText = tr("Tor is shutting down");
+      trayIconFile = IMG_TOR_STOPPING;
+      statusIconFile = IMG_TOR_STOPPING_48;
+      ui.lblNewIdentity->setEnabled(false);
+      ui.lblStartStopTor->setStatusTip(statusText);
+  } else if (status == Running) {
+      statusText = tr("Tor is running");
+      actionText = tr("Stop Tor");
+      trayIconFile = IMG_TOR_RUNNING;
+      statusIconFile = IMG_TOR_RUNNING_48;
+      _startStopAct->setEnabled(true);
+      _startStopAct->setText(actionText);
+      _startStopAct->setIcon(QIcon(IMG_STOP_TOR_16));
+      ui.lblStartStopTor->setEnabled(true);
+      ui.lblStartStopTor->setText(actionText);
+      ui.lblStartStopTor->setPixmap(QPixmap(IMG_STOP_TOR_48));
+      ui.lblStartStopTor->setStatusTip(actionText);
+      _newIdentityAct->setEnabled(true);
+      ui.lblNewIdentity->setEnabled(true);
+  } else { /* status == Starting */
+      statusText = tr("Tor is starting up");
+      trayIconFile = IMG_TOR_STARTING;
+      statusIconFile = IMG_TOR_STARTING_48;
+      _startStopAct->setEnabled(false);
+      ui.lblStartStopTor->setEnabled(false);
+      ui.lblStartStopTor->setStatusTip(statusText);
+  }
+
+  /* Update the tray icon */
 #if defined(USE_QSYSTEMTRAYICON)
-  _trayIcon.setIcon(QIcon(iconFile));
+  _trayIcon.setIcon(QIcon(trayIconFile));
 #else
-  _trayIcon.setIcon(iconFile);
+  _trayIcon.setIcon(trayIconFile);
 #endif
-  /* Set the icon's tooltip */
-  _trayIcon.setToolTip(tooltip);
+  _trayIcon.setToolTip(statusText);
+  
+  /* Update the status banner */
+  ui.lblTorStatus->setText(statusText);
+  ui.lblTorStatusImg->setPixmap(QPixmap(statusIconFile));
 }
 
+/** Starts Tor if it is not currently running, or stops Tor if it is already
+ * running. */
+void
+MainWindow::toggleTor()
+{
+  if (_torControl->isRunning())
+    stop();
+  else
+    start();
+}
+
 /** Attempts to start Tor. If Tor fails to start, then startFailed() will be
  * called with an error message containing the reason. */
 void 
@@ -356,8 +414,7 @@
   _isIntentionalExit = true;
   /* Kick off the Tor process */
   _torControl->start();
-  /* Don't let the user start Tor twice. That would be silly. */
-  _startAct->setEnabled(false);
+  updateTorStatus(Starting);
 }
 
 /** Called when the Tor process fails to start, for example, because the path
@@ -369,7 +426,9 @@
    * that Qt gives us in this instance is almost always "Unknown Error". That
    * will make users sad. */
   Q_UNUSED(errmsg);
-  
+ 
+  updateTorStatus(Stopped);
+
   /* Display an error message and see if the user wants some help */
   int response = VMessageBox::warning(this, tr("Error Starting Tor"),
                    tr("Vidalia was unable to start Tor. Check your settings "
@@ -380,13 +439,11 @@
   if (response == VMessageBox::ShowSettings) {
     /* Show the settings dialog so the user can make sure they're pointing to
      * the correct Tor. */
-     ConfigDialog* configDialog = new ConfigDialog(this);
-     configDialog->showWindow(ConfigDialog::General);
+     showConfigDialog();
   } else if (response == VMessageBox::Help) {
     /* Show troubleshooting information about starting Tor */
     Vidalia::help("troubleshooting.start");
   }
-  _startAct->setEnabled(true);
 }
 
 /** Slot: Called when the Tor process is started. It will connect the control
@@ -399,11 +456,6 @@
   _isIntentionalExit = false;
   /* We haven't started a delayed shutdown yet. */
   _delayedShutdownStarted = false;
-  /* Set correct tray icon and tooltip */
-  updateTrayIcon(IMG_TOR_STARTING, tr("Tor is starting"));
-  /* Set menu actions appropriately */
-  _stopAct->setEnabled(true);
-  _startAct->setEnabled(false);
   /* Try to connect to Tor's control port */
   _torControl->connect();
 }
@@ -425,9 +477,8 @@
     _torControl->connect();
   } else {
     /* Show the help browser (if requested) */
-    if (response == VMessageBox::Help) {
+    if (response == VMessageBox::Help)
       Vidalia::help("troubleshooting.connect");
-    }
     /* Since Vidalia can't connect, we can't really do much, so stop Tor. */
     _torControl->stop();
   }
@@ -467,13 +518,12 @@
   } else {
     /* We want Tor to stop now, regardless of whether we're a server. */
     _isIntentionalExit = true;
-    if ((rc = _torControl->stop(&errmsg)) == true)
-      _stopAct->setEnabled(false);
+    rc = _torControl->stop(&errmsg);
   }
   
   if (rc) {
     /* Indicate that Tor is about to shut down */
-    updateTrayIcon(IMG_TOR_STOPPING, tr("Tor is stopping"));
+    updateTorStatus(Stopping);
   } else {
     /* We couldn't tell Tor to stop, for some reason. */
     int response = VMessageBox::warning(this, tr("Error Stopping Tor"),
@@ -496,15 +546,11 @@
 void 
 MainWindow::stopped(int exitCode, QProcess::ExitStatus exitStatus)
 {
-  /* Set correct tray icon and tooltip */
-  updateTrayIcon(IMG_TOR_STOPPED, tr("Tor is stopped"));
-  /* Set menu actions appropriately */
-  _startAct->setEnabled(true);
+  updateTorStatus(Stopped);
 
   /* If we didn't intentionally close Tor, then check to see if it crashed or
    * if it closed itself and returned an error code. */
   if (!_isIntentionalExit) {
-    _stopAct->setEnabled(false);
     /* A quick overview of Tor's code tells me that if it catches a SIGTERM or
      * SIGINT, Tor will exit(0). We might need to change this warning message
      * if this turns out to not be the case. */
@@ -514,11 +560,10 @@
                      "Please check the message log for indicators "
                      "about what happened to Tor before it exited."),
                   VMessageBox::Ok, VMessageBox::ShowLog, VMessageBox::Help);
-      if (ret == VMessageBox::ShowLog) {
+      if (ret == VMessageBox::ShowLog)
         _messageLog->showWindow();  
-      } else if (ret == VMessageBox::Help) {
+      else if (ret == VMessageBox::Help)
         Vidalia::help("troubleshooting.torexited");
-      }
     }
   }
 }
@@ -531,9 +576,8 @@
   QString errmsg;
 
   /* Update our tray status icon */
-  updateTrayIcon(IMG_TOR_RUNNING, tr("Tor is running"));
-  _newIdentityAct->setEnabled(true);
-
+  updateTorStatus(Running);
+  
   /* If the user changed some of the server's settings while Tor wasn't 
    * running, then we better let Tor know about the changes now. */
   if (serverSettings.changedSinceLastApply()) {
@@ -546,7 +590,7 @@
 
       if (ret == VMessageBox::ShowSettings) {
         /* Show the config dialog with the server page already shown. */
-        _configDialog->showWindow(ConfigDialog::Server);
+        showConfigDialog(ConfigDialog::Server);
       } else if (ret == VMessageBox::ShowLog) {
         /* Show the message log. */
         _messageLog->showWindow(); 
@@ -560,8 +604,37 @@
 MainWindow::disconnected()
 {
   _newIdentityAct->setEnabled(false);
+  ui.lblNewIdentity->setEnabled(false);
 }
 
+/** Creates and displays Vidalia's About dialog. */
+void
+MainWindow::showAboutDialog()
+{
+  static AboutDialog *aboutDialog = 0;
+  if (!aboutDialog)
+    aboutDialog = new AboutDialog(this);
+  aboutDialog->showWindow();
+}
+
+/** Creates and displays the Configuration dialog with the current page set to
+ * <b>page</b>. */
+void
+MainWindow::showConfigDialog(ConfigDialog::Page page)
+{
+  static ConfigDialog *configDialog = 0;
+  if (!configDialog)
+    configDialog = new ConfigDialog(this);
+  configDialog->showWindow(page);
+}
+
+/** Displays the Configuration dialog, set to the Server page. */
+void
+MainWindow::showServerConfigDialog()
+{
+  showConfigDialog(ConfigDialog::Server);
+}
+
 /** Called when the user selects the "New Identity" action from the menu. */
 void
 MainWindow::newIdentity()
@@ -580,15 +653,15 @@
 
     /* Disable the New Identity button for MIN_NEWIDENTITY_INTERVAL */
     _newIdentityAct->setEnabled(false);
+    ui.lblNewIdentity->setEnabled(false);
     QTimer::singleShot(MIN_NEWIDENTITY_INTERVAL, 
                        this, SLOT(enableNewIdentity()));
     
 #if defined(USE_QSYSTEMTRAYICON)
-    if (QSystemTrayIcon::supportsMessages()) {
+    if (QSystemTrayIcon::supportsMessages())
       _trayIcon.showMessage(title, message, QSystemTrayIcon::Information);
-    } else {
+    else
       VMessageBox::information(this, title, message, VMessageBox::Ok);
-    }
 #else
     VMessageBox::information(this, title, message, VMessageBox::Ok);
 #endif
@@ -604,7 +677,9 @@
 void
 MainWindow::enableNewIdentity()
 {
-  if (_torControl->isConnected())
+  if (_torControl->isConnected()) {
     _newIdentityAct->setEnabled(true);
+    ui.lblNewIdentity->setEnabled(true);
+  }
 }
 

Modified: trunk/src/gui/mainwindow.h
===================================================================
--- trunk/src/gui/mainwindow.h	2007-04-02 17:39:26 UTC (rev 1695)
+++ trunk/src/gui/mainwindow.h	2007-04-08 04:38:18 UTC (rev 1696)
@@ -66,6 +66,9 @@
   ~MainWindow();
 
 private slots:
+  /** Starts Tor if it is not currently running, or stops Tor if it is already
+   * running. */
+  void toggleTor();
   /** Called when the user selects "Start" from the menu. */
   void start();
   /** Called when the Tor process fails to start. */
@@ -92,8 +95,21 @@
   /** Terminate the Tor process if it is being run under Vidalia, disconnect
    * all TorControl signals, and exit Vidalia. */
   void shutdown();
-
+  /** Creates and displays Vidalia's About dialog. */
+  void showAboutDialog();
+  /** Creates and displays the Configuration dialog with the current page set
+   * to <b>page</b>. */
+  void showConfigDialog(ConfigDialog::Page page = ConfigDialog::General);
+  /** Displays the Configuration dialog, set to the Server page. */
+  void showServerConfigDialog();
+  
 private:
+  enum TorStatus {
+    Stopped,  /**< Tor is not running. */
+    Starting, /**< Tor is in the process of starting. */
+    Running,  /**< Tor is currently running. */
+    Stopping  /**< Tor is in the process of shutting down. */
+  };
   /** Create the actions on the tray menu or menubar */
   void createActions();
   /** Creates a tray icon with a context menu and adds it to the system
@@ -103,25 +119,20 @@
   QMenu* createTrayMenu();
   /** Creates a default menubar on Mac */
   void createMenuBar();
-  /** Sets the tray icon's image and tooltip. */
-  void updateTrayIcon(QString iconFile, QString tooltip = QString());
+  
+  /** Updates the UI to reflect Tor's current <b>status</b>. */
+  void updateTorStatus(TorStatus status);
 
   /* Used to determine if the Tor process exiting was intentional or not */
   bool _isIntentionalExit;
   /** Tracks whether we started a delayed server shutdown. */
   bool _delayedShutdownStarted;
- 
-  /** An AboutDialog object, used to display version information. */
-  AboutDialog* _aboutDialog;
   /** A MessageLog object which handles logging Tor messages */
   MessageLog* _messageLog;
   /** A BandwidthGraph object which handles monitoring Tor bandwidth usage */
   BandwidthGraph* _bandwidthGraph;
   /** A NetViewer object which displays the Tor network graphically */
   NetViewer* _netViewer;
-  /** A ConfigDialog object used to configure Tor and Vidalia's settings. */
-  ConfigDialog* _configDialog;
-  
   /** A TorControl object that handles communication with Tor */
   TorControl* _torControl;
 
@@ -133,8 +144,7 @@
 #endif
   
   /** Defines the actions for the tray menu */
-  QAction* _startAct;
-  QAction* _stopAct;
+  QAction* _startStopAct;
   QAction* _configAct;
   QAction* _aboutAct;
   QAction* _exitAct;

Modified: trunk/src/gui/mainwindow.ui
===================================================================
--- trunk/src/gui/mainwindow.ui	2007-04-02 17:39:26 UTC (rev 1695)
+++ trunk/src/gui/mainwindow.ui	2007-04-08 04:38:18 UTC (rev 1696)
@@ -6,7 +6,7 @@
     <x>0</x>
     <y>0</y>
     <width>445</width>
-    <height>375</height>
+    <height>405</height>
    </rect>
   </property>
   <property name="sizePolicy" >
@@ -20,20 +20,20 @@
   <property name="minimumSize" >
    <size>
     <width>445</width>
-    <height>375</height>
+    <height>405</height>
    </size>
   </property>
   <property name="maximumSize" >
    <size>
     <width>445</width>
-    <height>375</height>
+    <height>405</height>
    </size>
   </property>
   <property name="windowTitle" >
    <string>Vidalia Control Panel</string>
   </property>
   <property name="windowIcon" >
-   <iconset resource="res/vidalia_common.qrc" >:/images/128x128/tor-logo.png</iconset>
+   <iconset resource="res/vidalia_common.qrc" >:/images/16x16/tor-logo.png</iconset>
   </property>
   <widget class="QWidget" name="centralwidget" >
    <layout class="QVBoxLayout" >
@@ -44,6 +44,24 @@
      <number>6</number>
     </property>
     <item>
+     <widget class="QGroupBox" name="grpStatus" >
+      <property name="geometry" >
+       <rect>
+        <x>20</x>
+        <y>10</y>
+        <width>400</width>
+        <height>40</height>
+       </rect>
+      </property>
+      <property name="minimumSize" >
+       <size>
+        <width>400</width>
+        <height>40</height>
+       </size>
+      </property>
+      <property name="title" >
+       <string>Tor Status</string>
+      </property>
      <layout class="QHBoxLayout" >
       <property name="margin" >
        <number>0</number>
@@ -74,7 +92,7 @@
       <item>
        <widget class="QLabel" name="lblTorStatus" >
         <property name="text" >
-         <string>No, none of the buttons on this dialog do anything yet. Stop yelling at me.</string>
+         <string>Tor is not running</string>
         </property>
         <property name="wordWrap" >
          <bool>true</bool>
@@ -95,6 +113,7 @@
        </spacer>
       </item>
      </layout>
+     </widget>
     </item>
     <item>
      <widget class="QGroupBox" name="grpShortcuts" >
@@ -172,6 +191,9 @@
         </item>
         <item row="1" column="2" colspan="2" >
          <widget class="VClickLabel" native="1" name="lblNewIdentity" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
           <property name="text" >
            <string>Use a New Identity</string>
           </property>
@@ -465,5 +487,48 @@
  <resources>
   <include location="res/vidalia_common.qrc" />
  </resources>
- <connections/>
+ <connections>
+  <connection>
+   <sender>lblStartStopTor</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>toggleTor()</slot>
+  </connection>
+  <connection>
+   <sender>lblNewIdentity</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>newIdentity()</slot>
+  </connection>
+  <connection>
+   <sender>lblSetupRelaying</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>showServerConfigDialog()</slot>
+  </connection>
+  <connection>
+   <sender>lblSettings</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>showConfigDialog()</slot>
+  </connection>
+  <connection>
+   <sender>lblAboutVidalia</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>showAboutDialog()</slot>
+  </connection>
+  <connection>
+   <sender>lblExit</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+  </connection>
+  <connection>
+   <sender>btnHide</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>hide()</slot>
+  </connection>
+ </connections>
 </ui>

Added: trunk/src/gui/res/16x16/start-tor.png
===================================================================
(Binary files differ)


Property changes on: trunk/src/gui/res/16x16/start-tor.png
___________________________________________________________________
Name: svn:mime-type
   + image/x-png

Added: trunk/src/gui/res/16x16/stop-tor.png
===================================================================
(Binary files differ)


Property changes on: trunk/src/gui/res/16x16/stop-tor.png
___________________________________________________________________
Name: svn:mime-type
   + image/x-png

Modified: trunk/src/gui/res/vidalia_common.qrc
===================================================================
--- trunk/src/gui/res/vidalia_common.qrc	2007-04-02 17:39:26 UTC (rev 1695)
+++ trunk/src/gui/res/vidalia_common.qrc	2007-04-08 04:38:18 UTC (rev 1696)
@@ -21,6 +21,8 @@
         <file>16x16/msg-warn.png</file>
         <file>16x16/network-offline.png</file>
         <file>16x16/preferences-system.png</file>
+        <file>16x16/start-tor.png</file>
+        <file>16x16/stop-tor.png</file>
         <file>16x16/system-users.png</file>
         <file>16x16/tor-logo.png</file>
         <file>16x16/tor-off.png</file>
@@ -72,6 +74,8 @@
         <file>48x48/system-users.png</file>
         <file>48x48/tor-off.png</file>
         <file>48x48/tor-on.png</file>
+        <file>48x48/tor-starting.png</file>
+        <file>48x48/tor-stopping.png</file>
     </qresource>
     <qresource prefix="/images">
         <file>128x128/qt-logo.png</file>