Vidalia
0.2.21
|
#include <MainWindow.h>
Public Slots | |
virtual void | setVisible (bool visible) |
![]() | |
virtual void | setVisible (bool visible) |
virtual void | showWindow () |
Public Member Functions | |
MainWindow () | |
~MainWindow () | |
![]() | |
VidaliaWindow (const QString &name, QWidget *parent=0, Qt::WFlags flags=0) | |
~VidaliaWindow () | |
void | setShortcut (const QString &shortcut, const char *slot) |
void | saveWindowState () |
void | restoreWindowState () |
QVariant | getSetting (QString name, QVariant defaultValue) |
void | saveSetting (QString name, QVariant value) |
Protected Member Functions | |
virtual void | retranslateUi () |
![]() | |
virtual void | changeEvent (QEvent *e) |
Private Types | |
enum | TorStatus { Unset, Stopping, Stopped, Starting, Started, Authenticating, Authenticated, CircuitEstablished } |
Private Slots | |
void | trayIconActivated (QSystemTrayIcon::ActivationReason reason) |
void | showHelpDialog () |
void | showHelpDialog (const QString &topic) |
void | start () |
void | restart () |
void | startFailed (QString errmsg) |
void | started () |
bool | stop () |
void | stopped (int errorCode, QProcess::ExitStatus exitStatus) |
void | connected () |
void | connectFailed (QString errmsg) |
void | disconnect () |
void | disconnected () |
void | authenticated () |
void | authenticationFailed (QString errmsg) |
void | enableNewIdentity () |
void | newIdentity () |
void | close () |
void | running () |
void | aboutToQuit () |
void | showAboutDialog () |
void | showConfigDialog (ConfigDialog::Page page=ConfigDialog::General) |
void | showServerConfigDialog () |
void | toggleShowOnStartup (bool checked) |
void | onSubprocessFinished (int exitCode, QProcess::ExitStatus exitStatus) |
void | onCheckForBrowser () |
void | onBrowserFailed (QString errmsg) |
void | onIMFailed (QString errmsg) |
void | onProxyFailed (QString errmsg) |
void | circuitEstablished () |
void | warnDangerousPort (quint16 port, bool rejected) |
void | bootstrapStatusChanged (const BootstrapStatus &bs) |
void | dangerousTorVersion (tc::TorVersionStatus reason, const QString &version, const QStringList &recommended) |
void | log (tc::Severity type, const QString &message) |
void | warnButton () |
Private Member Functions | |
void | createActions () |
void | createTrayIcon () |
QMenu * | createTrayMenu () |
void | createMenuBar () |
void | setTrayIcon (const QString &iconFile) |
TorStatus | updateTorStatus (TorStatus status) |
void | launchBrowserFromDirectory () |
void | startSubprocesses () |
void | startProxy () |
QString | toString (TorStatus status) |
bool | authenticate () |
QByteArray | loadControlCookie (QString cookiePath=QString()) |
void | checkTorVersion () |
void | displayTorVersionWarning () |
void | setStartupProgressVisible (bool visible) |
void | setStartupProgress (int percentComplete, const QString &description) |
QStringList | updateBrowserEnv () |
Private Attributes | |
TorStatus | _status |
bool | _isIntentionalExit |
bool | _delayedShutdownStarted |
bool | _isVidaliaRunningTor |
MessageLog * | _messageLog |
BandwidthGraph * | _bandwidthGraph |
NetViewer * | _netViewer |
ConfigDialog * | _configDialog |
TorControl * | _torControl |
HelperProcess * | _browserProcess |
HelperProcess * | _imProcess |
HelperProcess * | _proxyProcess |
QString | _controlPassword |
bool | _useSavedPassword |
QSystemTrayIcon | _trayIcon |
QMenuBar * | _menuBar |
QAction * | _actionShowControlPanel |
QAction * | _actionStartStopTor |
QAction * | _actionShowConfig |
QAction * | _actionShowAbout |
QAction * | _actionExit |
QAction * | _actionShowBandwidth |
QAction * | _actionShowMessageLog |
QAction * | _actionShowHelp |
QAction * | _actionShowNetworkMap |
QAction * | _actionNewIdentity |
quint16 | _autoControlPort |
QTimer * | _warnTimer |
bool | _flashToggle |
Ui::MainWindow | ui |
Additional Inherited Members | |
![]() | |
void | helpRequested (const QString &topic) |
Definition at line 45 of file MainWindow.h.
|
private |
Unset |
Tor's status has not yet been set. |
Stopping |
Tor is in the process of shutting down. |
Stopped |
Tor is not running. |
Starting |
Tor is in the process of starting. |
Started |
Tor is currently running. |
Authenticating |
Vidalia is authenticating to Tor. |
Authenticated |
Vidalia has authenticated to Tor. |
CircuitEstablished |
Tor has built a circuit. |
Definition at line 180 of file MainWindow.h.
MainWindow::MainWindow | ( | ) |
Default constructor
Default constructor. It installs an icon in the system tray area and creates the popup menu associated with that icon.
Definition at line 101 of file MainWindow.cpp.
References _bandwidthGraph, _browserProcess, _configDialog, _flashToggle, _imProcess, _isVidaliaRunningTor, _menuBar, _messageLog, _netViewer, _proxyProcess, _status, _torControl, _trayIcon, _warnTimer, aboutToQuit(), authenticated(), authenticationFailed(), bootstrapStatusChanged(), circuitEstablished(), TorEvents::ClientStatus, connected(), connectFailed(), createActions(), Vidalia::createShortcut(), createTrayIcon(), dangerousTorVersion(), disconnected(), tc::error(), TorEvents::GeneralStatus, VidaliaSettings::getIconPref(), VidaliaWindow::helpRequested(), UPNPControl::instance(), log(), onBrowserFailed(), onIMFailed(), onProxyFailed(), onSubprocessFinished(), restart(), running(), TorControl::setEvent(), VidaliaWindow::setVisible(), showHelpDialog(), VidaliaSettings::showMainWindowAtStart(), started(), startFailed(), stopped(), Stopped, Vidalia::torControl(), VidaliaSettings::Tray, ui, Unset, updateTorStatus(), vApp, warnButton(), and warnDangerousPort().
MainWindow::~MainWindow | ( | ) |
Destructor.
Definition at line 243 of file MainWindow.cpp.
References _bandwidthGraph, _configDialog, _messageLog, _netViewer, and _trayIcon.
|
privateslot |
Terminate the Tor process if it is being run under Vidalia, disconnect all TorControl signals, and exit Vidalia.
Definition at line 363 of file MainWindow.cpp.
References _browserProcess, _imProcess, _proxyProcess, _torControl, ServerSettings::cleanupPortForwarding(), VidaliaSettings::getBrowserDirectory(), VidaliaSettings::getBrowserExecutable(), TorControl::isVidaliaRunningTor(), TorControl::stop(), vNotice, and win32_end_process_by_filename().
Referenced by MainWindow().
|
private |
Authenticates Vidalia to Tor's control port.
Attempts to authenticate to Tor's control port, depending on the authentication method specified in TorSettings::getAuthenticationMethod().
Definition at line 1477 of file MainWindow.cpp.
References _controlPassword, _isVidaliaRunningTor, _torControl, _useSavedPassword, TorControl::authenticate(), Authenticating, ProtocolInfo::authMethods(), VMessageBox::Browse, VMessageBox::Cancel, TorSettings::CookieAuth, ProtocolInfo::cookieAuthFile(), disconnect(), TorSettings::getAuthenticationMethod(), TorSettings::getControlPassword(), TorSettings::getDataDirectory(), ProtocolInfo::isEmpty(), loadControlCookie(), TorSettings::NullAuth, p(), TorSettings::PasswordAuth, TorControl::protocolInfo(), VMessageBox::question(), setStartupProgress(), STARTUP_PROGRESS_AUTHENTICATING, stop(), updateTorStatus(), vNotice, and vWarn.
Referenced by connected().
|
privateslot |
Called when Vidalia has successfully authenticated to Tor.
Definition at line 1556 of file MainWindow.cpp.
References _actionNewIdentity, _torControl, Authenticated, TorControl::bootstrapStatus(), bootstrapStatusChanged(), checkTorVersion(), circuitEstablished(), TorControl::closeTorStdout(), ServerSettings::configurePortForwarding(), TorControl::getTorVersion(), TorControl::isCircuitEstablished(), BootstrapStatus::isValid(), VMessageBox::Ok, p(), TorControl::setEvents(), setStartupProgress(), STARTUP_PROGRESS_CIRCUITBUILD, ui, updateTorStatus(), and VMessageBox::warning().
Referenced by MainWindow().
|
privateslot |
Called when Vidalia fails to authenticate to Tor. The failure reason is specified in errmsg.
Definition at line 1606 of file MainWindow.cpp.
References _controlPassword, _isVidaliaRunningTor, _torControl, _useSavedPassword, ConfigDialog::Advanced, VMessageBox::Cancel, disconnect(), VidaliaWindow::helpRequested(), TorControl::isRunning(), ControlPasswordInputDialog::isSavePasswordChecked(), VMessageBox::Ok, p(), ControlPasswordInputDialog::password(), TorSettings::PasswordAuth, process_kill(), process_list(), TorSettings::setAuthenticationMethod(), TorSettings::setControlPassword(), ControlPasswordInputDialog::setResetEnabled(), TorSettings::setUseRandomPassword(), showConfigDialog(), showHelpDialog(), VMessageBox::ShowSettings, start(), stop(), vWarn, and VMessageBox::warning().
Referenced by MainWindow().
|
privateslot |
Called when Tor's bootstrapping status changes. bse represents Tor's current estimate of its bootstrapping progress.
Definition at line 824 of file MainWindow.cpp.
References BootstrapStatus::BootstrappingDone, BootstrapStatus::ConnectingToDirMirror, BootstrapStatus::ConnectingToEntryGuard, tc::ConnectionDone, tc::ConnectionIoError, tc::ConnectionRefused, tc::ConnectionTimeout, BootstrapStatus::CreatingOneHopCircuit, BootstrapStatus::description(), BootstrapStatus::EstablishingCircuit, BootstrapStatus::HandshakingWithDirMirror, BootstrapStatus::HandshakingWithEntryGuard, tc::IdentityMismatch, BootstrapStatus::LoadingAuthorityCertificates, BootstrapStatus::LoadingDescriptors, BootstrapStatus::LoadingNetworkStatus, tc::MiscellaneousReason, tc::NoRouteToHost, BootstrapStatus::percentComplete(), BootstrapStatus::reason(), BootstrapStatus::recommendedAction(), BootstrapStatus::RecommendIgnore, BootstrapStatus::RequestingDescriptors, BootstrapStatus::RequestingNetworkStatus, tc::ResourceLimitReached, setStartupProgress(), BootstrapStatus::severity(), STARTUP_PROGRESS_BOOTSTRAPPING, BootstrapStatus::status(), tc::warn(), and tc::WarnSeverity.
Referenced by authenticated(), and MainWindow().
|
private |
Checks the status of the current version of Tor to see if it's old, unrecommended, or obsolete.
Definition at line 1755 of file MainWindow.cpp.
References _torControl, displayTorVersionWarning(), TorControl::getInfo(), and VidaliaSettings::skipVersionCheck().
Referenced by authenticated().
|
privateslot |
Called when Tor has successfully established a circuit.
Definition at line 1732 of file MainWindow.cpp.
References CircuitEstablished, VidaliaSettings::isAutoUpdateEnabled(), VidaliaSettings::lastCheckedForUpdates(), setStartupProgress(), UpdateProcess::shouldCheckForUpdates(), startSubprocesses(), ui, and updateTorStatus().
Referenced by authenticated(), and MainWindow().
|
privateslot |
Called when the user exits Vidalia.
Called when the application is closing, by selecting "Exit" from the tray menu. If we're running a Tor server, then ask if we want to kill Tor now, or do a delayed shutdown.
Definition at line 411 of file MainWindow.cpp.
References _torControl, TorControl::isConnected(), ServerSettings::isServerEnabled(), TorControl::isVidaliaRunningTor(), stop(), stopped(), and vApp.
Referenced by createActions().
|
privateslot |
Called when the control socket has connected to Tor.
Called when the control socket has successfully connected to Tor.
Definition at line 1440 of file MainWindow.cpp.
References _torControl, authenticate(), err(), TorControl::isVidaliaRunningTor(), TorControl::takeOwnership(), and vWarn.
Referenced by MainWindow().
|
privateslot |
Called when the control connection fails.
Called when the connection to the control socket fails. The reason will be given in the errmsg parameter.
Definition at line 1327 of file MainWindow.cpp.
References _torControl, TorControl::connect(), TorSettings::getControlAddress(), TorSettings::getControlPort(), VMessageBox::Help, VMessageBox::Ok, p(), VMessageBox::Retry, showHelpDialog(), TorControl::stop(), and VMessageBox::warning().
Referenced by MainWindow(), and started().
|
private |
Create the actions on the tray menu or menubar
Create and bind actions to events. Setup for initial tray menu configuration.
Definition at line 431 of file MainWindow.cpp.
References _actionExit, _actionNewIdentity, _actionShowAbout, _actionShowBandwidth, _actionShowConfig, _actionShowControlPanel, _actionShowHelp, _actionShowMessageLog, _actionShowNetworkMap, _actionStartStopTor, _bandwidthGraph, _messageLog, _netViewer, _warnTimer, close(), IMG_ABOUT, IMG_BWGRAPH, IMG_CONFIG, IMG_CONTROL_PANEL, IMG_EXIT, IMG_HELP, IMG_IDENTITY, IMG_MESSAGELOG, IMG_NETWORK, IMG_START_TOR_16, newIdentity(), showAboutDialog(), showConfigDialog(), showHelpDialog(), VidaliaWindow::showWindow(), start(), stop(), and ui.
Referenced by MainWindow().
|
private |
Creates a default menubar on Mac
Creates a new menubar with no parent, so Qt will use this as the "default menubar" on Mac. This adds on to the existing actions from the createMens() method.
Definition at line 545 of file MainWindow.cpp.
References _actionExit, _actionNewIdentity, _actionShowAbout, _actionShowBandwidth, _actionShowConfig, _actionShowControlPanel, _actionShowHelp, _actionShowMessageLog, _actionShowNetworkMap, _actionStartStopTor, and _menuBar.
Referenced by createTrayIcon(), and retranslateUi().
|
private |
Creates a tray icon with a context menu and adds it to the system notification area. On Mac, we also set up an application menubar.
Definition at line 498 of file MainWindow.cpp.
References _trayIcon, createMenuBar(), createTrayMenu(), and trayIconActivated().
Referenced by MainWindow().
|
private |
Create the tray popup menu and it's submenus
Creates a QMenu object that contains QActions which compose the system tray menu.
Definition at line 517 of file MainWindow.cpp.
References _actionExit, _actionNewIdentity, _actionShowAbout, _actionShowBandwidth, _actionShowConfig, _actionShowControlPanel, _actionShowHelp, _actionShowMessageLog, _actionShowNetworkMap, and _actionStartStopTor.
Referenced by createTrayIcon().
|
privateslot |
Called when Tor thinks its version is old or unrecommended, and displays a message notifying the user.
Definition at line 1773 of file MainWindow.cpp.
References displayTorVersionWarning(), tc::ObsoleteTorVersion, and tc::UnrecommendedTorVersion.
Referenced by MainWindow().
|
privateslot |
Called when Vidalia wants to disconnect from a Tor it did not start.
Definition at line 1452 of file MainWindow.cpp.
References _torControl, and TorControl::disconnect().
Referenced by authenticate(), and authenticationFailed().
|
privateslot |
Called when the control socket has been disconnected.
Definition at line 1459 of file MainWindow.cpp.
References _actionNewIdentity, _isVidaliaRunningTor, Stopped, ui, and updateTorStatus().
Referenced by MainWindow().
|
private |
Alerts the user that their current Tor version is either obsolete or no longer recommended. If Vidalia was built with auto-update support, they will be given the option to check for available updates.
Called when Tor thinks its version is old or unrecommended, and displays a message notifying the user.
Definition at line 1788 of file MainWindow.cpp.
References VMessageBox::information(), VMessageBox::No, VMessageBox::Ok, p(), and VMessageBox::Yes.
Referenced by checkTorVersion(), and dangerousTorVersion().
|
privateslot |
Re-enables the 'New Identity' button after a delay from the previous time 'New Identity' was used.
Definition at line 1987 of file MainWindow.cpp.
References _actionNewIdentity, _torControl, TorControl::isConnected(), and ui.
Referenced by newIdentity().
|
private |
Start a web browser when given the directory containing the executable and profile
Directory for the browser
Relative path to the browser executable from the browserDirectory
Relative path to profile from the browserDirectory
Default profile to copy from
Relative path to the plugins directory from the browserDirectory
Relative path to the default plugins directory from the browserDirectory
Definition at line 623 of file MainWindow.cpp.
References _browserProcess, copy_dir(), VidaliaSettings::getBrowserDirectory(), VidaliaSettings::getBrowserExecutable(), VidaliaSettings::getDefaultPluginsDirectory(), VidaliaSettings::getDefaultProfileDirectory(), VidaliaSettings::getPluginsDirectory(), VidaliaSettings::getProfileDirectory(), HelperProcess::start(), HelperProcess::toForeground(), and updateBrowserEnv().
Referenced by startSubprocesses().
|
private |
Searches for and attempts to load the control authentication cookie. This assumes the cookie is named 'control_auth_cookie'. If cookiePath is empty, this method will search some default locations depending on the current platform. cookiePath can point to either a cookie file or a directory containing the cookie file.
Definition at line 1688 of file MainWindow.cpp.
References expand_filename(), TorSettings::getDataDirectory(), vDebug, vInfo, and vWarn.
Referenced by authenticate().
|
privateslot |
Called when torControl emits logMessage()
Definition at line 2215 of file MainWindow.cpp.
References _warnTimer, and tc::WarnSeverity.
Referenced by MainWindow().
|
privateslot |
Called when the user selects the "New Identity" action from the menu.
Definition at line 1953 of file MainWindow.cpp.
References _actionNewIdentity, _torControl, _trayIcon, enableNewIdentity(), VMessageBox::information(), MIN_NEWIDENTITY_INTERVAL, TorSignal::NewNym, VMessageBox::Ok, TorControl::signal(), ui, and VMessageBox::warning().
Referenced by createActions().
|
privateslot |
Called web the web browser failed to start
Called when the web browser failed to start, for example, because the path specified to the web browser executable didn't lead to an executable.
Definition at line 776 of file MainWindow.cpp.
References VMessageBox::Ok, and VMessageBox::warning().
Referenced by MainWindow().
|
privateslot |
Called periodically to check if the browser is running. If it is not, exit Vidalia cleanly
Definition at line 741 of file MainWindow.cpp.
References VidaliaSettings::getBrowserExecutable(), i(), vApp, and win32_process_list().
Referenced by onSubprocessFinished().
|
privateslot |
Called web the IM client failed to start
Called when the IM client failed to start, for example, because the path specified to the IM client executable didn't lead to an executable.
Definition at line 789 of file MainWindow.cpp.
References VMessageBox::Ok, and VMessageBox::warning().
Referenced by MainWindow().
|
privateslot |
Called when the proxy server fails to start
Called when the proxy server fails to start, for example, because the path specified didn't lead to an executable.
Definition at line 811 of file MainWindow.cpp.
References VMessageBox::Ok, and VMessageBox::warning().
Referenced by MainWindow().
|
privateslot |
Called when the web browser or IM client have stopped
Called when browser or IM client have exited
Definition at line 707 of file MainWindow.cpp.
References _browserProcess, _imProcess, VidaliaSettings::getBrowserDirectory(), VidaliaSettings::getBrowserExecutable(), VidaliaSettings::getIMExecutable(), HelperProcess::isDone(), onCheckForBrowser(), and vApp.
Referenced by MainWindow().
|
privateslot |
Called when the user changes a setting that needs Tor restarting
Definition at line 1210 of file MainWindow.cpp.
References _torControl, start(), and TorControl::stop().
Referenced by MainWindow().
|
protectedvirtual |
Called when the user changes the UI translation.
Reimplemented from VidaliaWindow.
Definition at line 270 of file MainWindow.cpp.
References _actionExit, _actionNewIdentity, _actionShowAbout, _actionShowBandwidth, _actionShowConfig, _actionShowControlPanel, _actionShowHelp, _actionShowMessageLog, _actionShowNetworkMap, _actionStartStopTor, _status, createMenuBar(), Starting, Stopped, ui, and updateTorStatus().
|
privateslot |
Called when the application has started and the main event loop is running.
Definition at line 305 of file MainWindow.cpp.
References _controlPassword, _torControl, _useSavedPassword, VidaliaSettings::isAutoUpdateEnabled(), TorControl::isCircuitEstablished(), VidaliaSettings::lastCheckedForUpdates(), UpdateProcess::nextCheckForUpdates(), VidaliaSettings::runProxyAtStart(), VidaliaSettings::runTorAtStart(), UpdateProcess::shouldCheckForUpdates(), start(), startProxy(), vApp, and vInfo.
Referenced by MainWindow().
|
private |
Sets the progress bar completion value to progressValue and sets the status text to description.
Definition at line 1028 of file MainWindow.cpp.
Referenced by authenticate(), authenticated(), bootstrapStatusChanged(), circuitEstablished(), started(), and updateTorStatus().
|
private |
Sets the visibility of the startup status description and progress bar to visible.
Definition at line 1006 of file MainWindow.cpp.
References ui.
Referenced by updateTorStatus().
|
private |
Sets the current tray or dock icon image to iconFile.
Definition at line 598 of file MainWindow.cpp.
References _trayIcon, VidaliaSettings::Dock, and VidaliaSettings::getIconPref().
Referenced by updateTorStatus().
|
virtualslot |
Shows or hides this window.
Definition at line 253 of file MainWindow.cpp.
References VidaliaWindow::setVisible(), and ui.
Referenced by trayIconActivated().
|
privateslot |
Creates and displays Vidalia's About dialog.
Definition at line 1912 of file MainWindow.cpp.
Referenced by createActions().
|
privateslot |
Creates and displays the Configuration dialog with the current page set to page.
Definition at line 1939 of file MainWindow.cpp.
References _configDialog, and ConfigDialog::showWindow().
Referenced by authenticationFailed(), createActions(), showServerConfigDialog(), and startFailed().
|
privateslot |
Displays the help browser and displays the most recently viewed help topic.
Displays the help browser and displays the most recently viewed help topic. Shows the help browser and displays the given help topic.
Definition at line 1921 of file MainWindow.cpp.
Referenced by authenticationFailed(), connectFailed(), createActions(), MainWindow(), startFailed(), stop(), and stopped().
|
privateslot |
Called when a child window requests the given help topic.
Definition at line 1928 of file MainWindow.cpp.
References HelpBrowser::showWindow().
|
privateslot |
Displays the Configuration dialog, set to the Server page.
Definition at line 1946 of file MainWindow.cpp.
References ConfigDialog::Server, and showConfigDialog().
|
privateslot |
Called when the user selects "Start" from the menu.
Attempts to start Tor. If Tor fails to start, then startFailed() will be called with an error message containing the reason.
Definition at line 1039 of file MainWindow.cpp.
References _controlPassword, _isIntentionalExit, _torControl, _useSavedPassword, TorSettings::autoControlPort(), TorSettings::bootstrap(), TorSettings::bootstrapFrom(), TorSettings::CookieAuth, expand_filename(), TorSettings::getAuthenticationMethod(), TorSettings::getControlAddress(), TorSettings::getControlMethod(), TorSettings::getControlPassword(), TorSettings::getControlPort(), TorSettings::getDataDirectory(), TorSettings::getExecutable(), TorSettings::getSocketPath(), TorSettings::getTorrc(), TorSettings::hashPassword(), net_test_connect(), TorSettings::PasswordAuth, ControlMethod::Port, TorSettings::randomPassword(), TorSettings::setAutoControlPort(), TorSettings::setBootstrap(), TorSettings::setDataDirectory(), TorSettings::setExecutable(), TorSettings::setTorrc(), socket_test_connect(), TorControl::start(), started(), Starting, touch_file(), updateTorStatus(), TorSettings::useRandomPassword(), vApp, vNotice, and vWarn.
Referenced by authenticationFailed(), createActions(), restart(), running(), and updateTorStatus().
|
privateslot |
Called when the Tor process has successfully started.
Slot: Called when the Tor process is started. It will connect the control socket and set the icons and tooltips accordingly.
Definition at line 1251 of file MainWindow.cpp.
References _autoControlPort, _delayedShutdownStarted, _isIntentionalExit, _isVidaliaRunningTor, _torControl, TorSettings::autoControlPort(), TorControl::connect(), connectFailed(), expand_filename(), TorSettings::getControlAddress(), TorSettings::getControlMethod(), TorSettings::getControlPort(), TorSettings::getDataDirectory(), TorSettings::getSocketPath(), TorControl::isRunning(), TorControl::isVidaliaRunningTor(), ControlMethod::Port, setStartupProgress(), Started, STARTUP_PROGRESS_CONNECTING, updateTorStatus(), and vWarn.
Referenced by MainWindow(), and start().
|
privateslot |
Called when the Tor process fails to start.
Called when the Tor process fails to start, for example, because the path specified to the Tor executable didn't lead to an executable.
Definition at line 1220 of file MainWindow.cpp.
References VMessageBox::Cancel, VMessageBox::Help, showConfigDialog(), showHelpDialog(), VMessageBox::ShowSettings, Stopped, updateTorStatus(), and VMessageBox::warning().
Referenced by MainWindow().
|
private |
Starts the proxy server, if appropriately configured
Definition at line 801 of file MainWindow.cpp.
References _proxyProcess, VidaliaSettings::getProxyExecutable(), VidaliaSettings::getProxyExecutableArguments(), and HelperProcess::start().
Referenced by running().
|
private |
Starts the web browser, if appropriately configured
Starts the web browser and IM client, if appropriately configured
Definition at line 681 of file MainWindow.cpp.
References _browserProcess, _imProcess, VidaliaSettings::getBrowserDirectory(), VidaliaSettings::getBrowserExecutable(), VidaliaSettings::getIMExecutable(), launchBrowserFromDirectory(), HelperProcess::start(), HelperProcess::toForeground(), and updateBrowserEnv().
Referenced by circuitEstablished().
|
privateslot |
Called when the user selects "Stop" form the menu.
Disconnects the control socket and stops the Tor process.
Definition at line 1352 of file MainWindow.cpp.
References _delayedShutdownStarted, _isIntentionalExit, _torControl, VMessageBox::Cancel, VMessageBox::Help, ServerSettings::isServerEnabled(), VMessageBox::No, VMessageBox::Ok, p(), VMessageBox::question(), showHelpDialog(), TorSignal::Shutdown, TorControl::signal(), TorControl::stop(), Stopping, updateTorStatus(), VMessageBox::warning(), and VMessageBox::Yes.
Referenced by authenticate(), authenticationFailed(), close(), createActions(), and updateTorStatus().
|
privateslot |
Called when the Tor process has exited, either expectedly or not.
Slot: Called when the Tor process has exited. It will adjust the tray icons and tooltips accordingly.
Definition at line 1411 of file MainWindow.cpp.
References _isIntentionalExit, _messageLog, VMessageBox::Help, VMessageBox::Ok, showHelpDialog(), VMessageBox::ShowLog, VidaliaWindow::showWindow(), Stopped, updateTorStatus(), and VMessageBox::warning().
Referenced by close(), and MainWindow().
|
privateslot |
Called when the "show on startup" checkbox is toggled.
Definition at line 997 of file MainWindow.cpp.
References VidaliaSettings::setShowMainWindowAtStart().
|
private |
Converts a TorStatus enum value to a string for debug logging purposes.
Definition at line 1997 of file MainWindow.cpp.
References Authenticated, Authenticating, CircuitEstablished, Started, Starting, Stopped, Stopping, and Unset.
Referenced by updateTorStatus().
|
privateslot |
Respond to a double-click on the tray icon by opening the Control Panel window.
Definition at line 615 of file MainWindow.cpp.
References setVisible().
Referenced by createTrayIcon().
|
private |
Adds the needed variables to the environment that the browser will need
Definition at line 2176 of file MainWindow.cpp.
References _autoControlPort, _controlPassword, _torControl, TorSettings::autoControlPort(), expand_filename(), TorSettings::getAuthenticationMethod(), TorSettings::getDataDirectory(), TorControl::getInfo(), TorSettings::PasswordAuth, and vInfo.
Referenced by launchBrowserFromDirectory(), and startSubprocesses().
|
private |
Updates the UI to reflect Tor's current status. Returns the previously set TorStatus value.
Definition at line 907 of file MainWindow.cpp.
References _actionStartStopTor, _delayedShutdownStarted, _status, _trayIcon, CircuitEstablished, IMG_START_TOR_16, IMG_START_TOR_48, IMG_STOP_TOR_16, IMG_STOP_TOR_48, IMG_TOR_RUNNING, IMG_TOR_RUNNING_48, IMG_TOR_STARTING, IMG_TOR_STARTING_48, IMG_TOR_STOPPED, IMG_TOR_STOPPED_48, IMG_TOR_STOPPING, IMG_TOR_STOPPING_48, setStartupProgress(), setStartupProgressVisible(), setTrayIcon(), start(), Started, Starting, STARTUP_PROGRESS_STARTING, stop(), Stopped, Stopping, toString(), ui, and vNotice.
Referenced by authenticate(), authenticated(), circuitEstablished(), disconnected(), MainWindow(), retranslateUi(), start(), started(), startFailed(), stop(), and stopped().
|
privateslot |
Toggles the color for the Message Log button
Definition at line 2222 of file MainWindow.cpp.
References _flashToggle, and ui.
Referenced by MainWindow().
|
privateslot |
Called when Tor thinks the user has tried to connect to a port that typically is used for unencrypted applications. Warns the user and allows them to ignore future warnings on port.
Called when Tor thinks the user has tried to connect to a port that typically is used for unencrypted applications. Warns the user and allows them to ignore future warnings on port. It is possible that Tor will produce multiple asynchronous status events warning of dangerous ports while the message box is displayed (for example, while the user is away from the keyboard), so subsequent messages will be discarded until the first message box is dismissed.
Definition at line 1829 of file MainWindow.cpp.
References TorSettings::getRejectPlaintextPorts(), TorSettings::getWarnPlaintextPorts(), p(), TorControl::setConf(), TorSettings::setRejectPlaintextPorts(), TorSettings::setWarnPlaintextPorts(), and Vidalia::torControl().
Referenced by MainWindow().
|
private |
Definition at line 289 of file MainWindow.h.
Referenced by createActions(), createMenuBar(), createTrayMenu(), and retranslateUi().
|
private |
Definition at line 294 of file MainWindow.h.
Referenced by authenticated(), createActions(), createMenuBar(), createTrayMenu(), disconnected(), enableNewIdentity(), newIdentity(), and retranslateUi().
|
private |
Definition at line 288 of file MainWindow.h.
Referenced by createActions(), createMenuBar(), createTrayMenu(), and retranslateUi().
|
private |
Definition at line 290 of file MainWindow.h.
Referenced by createActions(), createMenuBar(), createTrayMenu(), and retranslateUi().
|
private |
Definition at line 287 of file MainWindow.h.
Referenced by createActions(), createMenuBar(), createTrayMenu(), and retranslateUi().
|
private |
Defines the actions for the tray menu
Definition at line 285 of file MainWindow.h.
Referenced by createActions(), createMenuBar(), createTrayMenu(), and retranslateUi().
|
private |
Definition at line 292 of file MainWindow.h.
Referenced by createActions(), createMenuBar(), createTrayMenu(), and retranslateUi().
|
private |
Definition at line 291 of file MainWindow.h.
Referenced by createActions(), createMenuBar(), createTrayMenu(), and retranslateUi().
|
private |
Definition at line 293 of file MainWindow.h.
Referenced by createActions(), createMenuBar(), createTrayMenu(), and retranslateUi().
|
private |
Definition at line 286 of file MainWindow.h.
Referenced by createActions(), createMenuBar(), createTrayMenu(), retranslateUi(), and updateTorStatus().
|
private |
Definition at line 296 of file MainWindow.h.
Referenced by started(), and updateBrowserEnv().
|
private |
A BandwidthGraph object which handles monitoring Tor bandwidth usage
Definition at line 248 of file MainWindow.h.
Referenced by createActions(), MainWindow(), and ~MainWindow().
|
private |
A HelperProcess object that manages the web browser
Definition at line 256 of file MainWindow.h.
Referenced by aboutToQuit(), launchBrowserFromDirectory(), MainWindow(), onSubprocessFinished(), and startSubprocesses().
|
private |
A ConfigDialog object which lets the user configure Tor and Vidalia
Definition at line 252 of file MainWindow.h.
Referenced by MainWindow(), showConfigDialog(), and ~MainWindow().
|
private |
Remembers the control password between when we start Tor with a hash of the password and when we need to provide the password itself.
Definition at line 263 of file MainWindow.h.
Referenced by authenticate(), authenticationFailed(), running(), start(), and updateBrowserEnv().
|
private |
Tracks whether we started a delayed server shutdown.
Definition at line 242 of file MainWindow.h.
Referenced by started(), stop(), and updateTorStatus().
|
private |
Definition at line 300 of file MainWindow.h.
Referenced by MainWindow(), and warnButton().
|
private |
A HelperProcess object that manages the IM client
Definition at line 258 of file MainWindow.h.
Referenced by aboutToQuit(), MainWindow(), onSubprocessFinished(), and startSubprocesses().
|
private |
|
private |
Set to true if Vidalia started its own Tor process.
Definition at line 244 of file MainWindow.h.
Referenced by authenticate(), authenticationFailed(), disconnected(), MainWindow(), and started().
|
private |
The menubar (Mac OS X only).
Definition at line 282 of file MainWindow.h.
Referenced by createMenuBar(), and MainWindow().
|
private |
A MessageLog object which handles logging Tor messages
Definition at line 246 of file MainWindow.h.
Referenced by createActions(), MainWindow(), stopped(), and ~MainWindow().
|
private |
A NetViewer object which displays the Tor network graphically
Definition at line 250 of file MainWindow.h.
Referenced by createActions(), MainWindow(), and ~MainWindow().
|
private |
A HelperProcess object that manages the proxy server
Definition at line 260 of file MainWindow.h.
Referenced by aboutToQuit(), MainWindow(), and startProxy().
|
private |
The current status of Tor.
Definition at line 238 of file MainWindow.h.
Referenced by MainWindow(), retranslateUi(), and updateTorStatus().
|
private |
A TorControl object that handles communication with Tor
Definition at line 254 of file MainWindow.h.
Referenced by aboutToQuit(), authenticate(), authenticated(), authenticationFailed(), checkTorVersion(), close(), connected(), connectFailed(), disconnect(), enableNewIdentity(), MainWindow(), newIdentity(), restart(), running(), start(), started(), stop(), and updateBrowserEnv().
|
private |
The Vidalia icon that sits in the tray.
Definition at line 268 of file MainWindow.h.
Referenced by createTrayIcon(), MainWindow(), newIdentity(), setStartupProgress(), setTrayIcon(), updateTorStatus(), and ~MainWindow().
|
private |
Set to true if we should use the control password saved in TorSettings when authenticating to Tor.
Definition at line 266 of file MainWindow.h.
Referenced by authenticate(), authenticationFailed(), running(), and start().
|
private |
Timer and bool used to flash buttons with a different color
Definition at line 299 of file MainWindow.h.
Referenced by createActions(), log(), and MainWindow().
|
private |
Qt Designer generated object.
Definition at line 302 of file MainWindow.h.
Referenced by authenticated(), circuitEstablished(), createActions(), disconnected(), enableNewIdentity(), MainWindow(), newIdentity(), retranslateUi(), setStartupProgress(), setStartupProgressVisible(), setVisible(), updateTorStatus(), and warnButton().