Vidalia
0.3.1
|
#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 Member Functions | |
void | createGUI () |
void | createConnections () |
void | createActions () |
void | createTrayIcon () |
QMenu * | createTrayMenu () |
void | createMenuBar () |
void | createToolBar () |
void | setTrayIcon (const QString &iconFile) |
TorStatus | updateTorStatus (TorStatus status) |
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) |
Private Attributes | |
TorStatus | _status |
bool | _isIntentionalExit |
bool | _delayedShutdownStarted |
bool | _isVidaliaRunningTor |
TorControl * | _torControl |
QString | _controlPassword |
bool | _useSavedPassword |
QSystemTrayIcon | _trayIcon |
QAction * | _actionShowControlPanel |
QAction * | _actionStartStopTor |
QAction * | _actionRestartTor |
QAction * | _actionReloadConfig |
QAction * | _actionNewIdentity |
QAction * | _actionStatus |
QAction * | _actionNetworkMap |
QAction * | _actionMessageLog |
QAction * | _actionBandwidthGraph |
QAction * | _actionConfigure |
QAction * | _actionVidaliaHelp |
QAction * | _actionAbout |
QAction * | _actionExit |
QAction * | _actionDebugDialog |
QMenu | _reattachMenu |
QAction * | _dummy |
Ui::MainWindow | ui |
StatusTab | _statusTab |
MessageLog * | _messageLog |
NetViewer | _netViewer |
BandwidthGraph * | _graph |
PluginEngine * | _engine |
QStringList | _tabMap |
QStringList | _detachedTabMap |
bool | _startedWithPrevious |
QString | _previousControlPort |
QString | _previousSocksPort |
Additional Inherited Members | |
![]() | |
void | helpRequested (const QString &topic) |
Definition at line 45 of file MainWindow.h.
|
private |
Enumerator | |
---|---|
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 195 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 105 of file MainWindow.cpp.
References _dummy, _engine, _isVidaliaRunningTor, _startedWithPrevious, _status, _torControl, createConnections(), createGUI(), VidaliaSettings::getIconPref(), VidaliaWindow::setVisible(), Stopped, Vidalia::torControl(), VidaliaSettings::Tray, Unset, and updateTorStatus().
MainWindow::~MainWindow | ( | ) |
|
privateslot |
Terminate the Tor process if it is being run under Vidalia, disconnect all TorControl signals, and exit Vidalia.
Definition at line 543 of file MainWindow.cpp.
References _torControl, ServerSettings::cleanupPortForwarding(), disconnect(), TorControl::isVidaliaRunningTor(), TorControl::stop(), and vNotice.
Referenced by createConnections().
|
privateslot |
Adds a new tab to the MainWindow
If the tab's already open, display it and delete the instanse passed
If we are trying to open the exact same tab twice don't do anything
Exception for tabs that need to be always created
The new tab is added to the last position
Definition at line 1787 of file MainWindow.cpp.
References _graph, _messageLog, _netViewer, _statusTab, _tabMap, attachTab(), connect(), detachTab(), VidaliaTab::getTitle(), handleAttachedClose(), VidaliaWindow::helpRequested(), VAttachButton::setTab(), setVisible(), showHelpDialog(), and ui.
Referenced by attachTab(), createConnections(), createGUI(), handleAttachedClose(), showBandwidthTab(), showMessageLogTab(), showNetViewerTab(), and showStatusTab().
|
privateslot |
Attaches a tab to the tabwidget
Definition at line 1720 of file MainWindow.cpp.
References _detachedTabMap, _dummy, _reattachMenu, addTab(), VidaliaTab::getTitle(), and ui.
Referenced by addTab(), and detachTab().
|
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 1301 of file MainWindow.cpp.
References _isVidaliaRunningTor, _torControl, TorControl::authenticate(), Authenticating, ProtocolInfo::authMethods(), TorSettings::CookieAuth, disconnect(), TorSettings::getAuthenticationMethod(), ProtocolInfo::isEmpty(), TorSettings::NullAuth, TorSettings::PasswordAuth, TorControl::protocolInfo(), setStartupProgress(), STARTUP_PROGRESS_AUTHENTICATING, stop(), tryCookie(), tryHashed(), updateTorStatus(), vNotice, and vWarn.
Referenced by connected().
|
privateslot |
Called when Vidalia has successfully authenticated to Tor.
Definition at line 953 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, updateTorStatus(), and VMessageBox::warning().
Referenced by createConnections().
|
privateslot |
Called when Vidalia fails to authenticate to Tor. The failure reason is specified in errmsg.
Definition at line 1003 of file MainWindow.cpp.
References _isVidaliaRunningTor, _torControl, connect(), disconnect(), TorSettings::getControlPort(), VidaliaWindow::helpRequested(), TorControl::isRunning(), VMessageBox::Ok, p(), process_kill(), process_list(), ControlPasswordInputDialog::setResetEnabled(), showHelpDialog(), start(), stop(), vWarn, and VMessageBox::warning().
Referenced by createConnections().
|
privateslot |
Called when Tor's bootstrapping status changes. bse represents Tor's current estimate of its bootstrapping progress.
Definition at line 1106 of file MainWindow.cpp.
References BootstrapStatus::BootstrappingDone, BootstrapStatus::ConnectingToDirMirror, BootstrapStatus::ConnectingToEntryGuard, tc::ConnectionDone, tc::ConnectionIoError, tc::ConnectionRefused, tc::ConnectionTimeout, BootstrapStatus::CreatingOneHopCircuit, 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 createConnections().
|
private |
Checks the status of the current version of Tor to see if it's old, unrecommended, or obsolete.
Definition at line 1407 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 1188 of file MainWindow.cpp.
References CircuitEstablished, VidaliaSettings::isAutoUpdateEnabled(), VidaliaSettings::lastCheckedForUpdates(), setStartupProgress(), UpdateProcess::shouldCheckForUpdates(), and updateTorStatus().
Referenced by authenticated(), and createConnections().
|
privateslot |
Called when tor detects a problem with the system clock
Definition at line 273 of file MainWindow.cpp.
References _trayIcon, TorControl::getTorVersion(), TorControl::getTorVersionString(), quint32, and Vidalia::torControl().
Referenced by createConnections().
|
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 469 of file MainWindow.cpp.
References _torControl, connect(), disconnect(), TorControl::isConnected(), ServerSettings::isServerEnabled(), TorControl::isVidaliaRunningTor(), stop(), stopped(), and vApp.
Referenced by createConnections().
|
privateslot |
Called when the control socket has connected to Tor.
Called when the control socket has successfully connected to Tor.
Definition at line 892 of file MainWindow.cpp.
References _previousControlPort, _previousSocksPort, _torControl, authenticate(), TorSettings::autoControlPort(), err(), TorControl::getInfo(), TorControl::isVidaliaRunningTor(), TorControl::takeOwnership(), and vWarn.
Referenced by createConnections().
|
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 928 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 createConnections(), and started().
|
private |
Create the actions on the tray menu or menubar
Creates the actions used in toolbars and menu
Definition at line 165 of file MainWindow.cpp.
References _actionAbout, _actionBandwidthGraph, _actionConfigure, _actionDebugDialog, _actionExit, _actionMessageLog, _actionNetworkMap, _actionNewIdentity, _actionReloadConfig, _actionRestartTor, _actionShowControlPanel, _actionStartStopTor, _actionStatus, _actionVidaliaHelp, IMG_ABOUT, IMG_BWGRAPH, IMG_CONFIG, IMG_CONTROL_PANEL, IMG_EXIT, IMG_HELP, IMG_IDENTITY, IMG_MESSAGELOG, IMG_NETWORK, and IMG_START_TOR_16.
Referenced by createGUI().
|
private |
Definition at line 378 of file MainWindow.cpp.
References _actionAbout, _actionBandwidthGraph, _actionConfigure, _actionDebugDialog, _actionExit, _actionMessageLog, _actionNetworkMap, _actionNewIdentity, _actionReloadConfig, _actionRestartTor, _actionShowControlPanel, _actionStartStopTor, _actionStatus, _actionVidaliaHelp, _engine, _torControl, aboutToQuit(), addTab(), authenticated(), authenticationFailed(), bootstrapStatusChanged(), circuitEstablished(), TorEvents::ClientStatus, clockSkewed(), close(), connect(), connected(), connectFailed(), dangerousTorVersion(), disconnected(), tc::error(), TorEvents::GeneralStatus, handleCloseTab(), UPNPControl::instance(), newIdentity(), restart(), running(), TorControl::setEvent(), showAboutDialog(), showBandwidthTab(), showConfigDialog(), showDebugDialog(), showHelpDialog(), showMessageLogTab(), showNetViewerTab(), showStatusTab(), sighup(), start(), started(), startFailed(), stopped(), ui, vApp, and warnDangerousPort().
Referenced by MainWindow().
|
private |
Calls the different methods that will handle the GUI "creation". It's called once at the MainWindow creation.
Definition at line 146 of file MainWindow.cpp.
References _graph, _messageLog, _statusTab, addTab(), createActions(), createMenuBar(), createToolBar(), createTrayIcon(), and ui.
Referenced by MainWindow().
|
private |
Creates a menubar
Creates the menu bar
Definition at line 185 of file MainWindow.cpp.
References _actionAbout, _actionBandwidthGraph, _actionConfigure, _actionDebugDialog, _actionExit, _actionMessageLog, _actionNetworkMap, _actionNewIdentity, _actionReloadConfig, _actionRestartTor, _actionStartStopTor, _actionStatus, _actionVidaliaHelp, _dummy, _engine, _reattachMenu, and PluginEngine::getAllActions().
Referenced by createGUI(), and retranslateUi().
|
private |
Creates a toolbar
Creates the main toolbar
Definition at line 231 of file MainWindow.cpp.
References _actionConfigure, _actionNewIdentity, _actionStartStopTor, and ui.
Referenced by createGUI().
|
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 295 of file MainWindow.cpp.
References _statusTab, _trayIcon, StatusTab::checkShowOnStartup(), connect(), createTrayMenu(), StatusTab::isCheckedShowOnStartup(), VidaliaSettings::showMainWindowAtStart(), and trayIconActivated().
Referenced by createGUI().
|
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 245 of file MainWindow.cpp.
References _actionAbout, _actionBandwidthGraph, _actionConfigure, _actionExit, _actionMessageLog, _actionNetworkMap, _actionNewIdentity, _actionShowControlPanel, _actionStartStopTor, _actionVidaliaHelp, and _reattachMenu.
Referenced by createTrayIcon().
|
privateslot |
Called when Tor thinks its version is old or unrecommended, and displays a message notifying the user.
Definition at line 1055 of file MainWindow.cpp.
References displayTorVersionWarning(), tc::ObsoleteTorVersion, and tc::UnrecommendedTorVersion.
Referenced by createConnections().
|
privateslot |
Deletes the tab at index if it exists and it isn't the Status tab
Definition at line 1837 of file MainWindow.cpp.
References _graph, _messageLog, _netViewer, _statusTab, _tabMap, disconnect(), and ui.
Referenced by handleAttachedClose(), and handleCloseTab().
|
privateslot |
Detaches a tab from the tabwidget
Definition at line 1735 of file MainWindow.cpp.
References _detachedTabMap, _dummy, _reattachMenu, _tabMap, attachTab(), connect(), VAttachButton::getTab(), VidaliaTab::getTitle(), and ui.
Referenced by addTab().
|
privateslot |
Called when Vidalia wants to disconnect from a Tor it did not start.
Definition at line 1637 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 1644 of file MainWindow.cpp.
References _actionNewIdentity, _isVidaliaRunningTor, Stopped, and updateTorStatus().
Referenced by createConnections().
|
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 1070 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 1701 of file MainWindow.cpp.
References _actionNewIdentity, _torControl, and TorControl::isConnected().
Referenced by newIdentity().
|
privateslot |
Called when trying to close a tab that has been detached
Definition at line 1756 of file MainWindow.cpp.
References _detachedTabMap, _dummy, _reattachMenu, addTab(), delTab(), VidaliaTab::getTitle(), and ui.
Referenced by addTab().
|
privateslot |
Definition at line 1709 of file MainWindow.cpp.
References delTab().
Referenced by createConnections().
|
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 1428 of file MainWindow.cpp.
References expand_filename(), TorSettings::getDataDirectory(), vDebug, vInfo, and vWarn.
Referenced by tryCookie().
|
privateslot |
Called when the user selects the "New Identity" action from the menu.
Definition at line 1668 of file MainWindow.cpp.
References _actionNewIdentity, _torControl, _trayIcon, enableNewIdentity(), VMessageBox::information(), MIN_NEWIDENTITY_INTERVAL, TorSignal::NewNym, VMessageBox::Ok, TorControl::signal(), and VMessageBox::warning().
Referenced by createConnections().
|
privateslot |
Called when the user changes a setting that needs Tor restarting
Definition at line 1593 of file MainWindow.cpp.
References start(), and stop().
Referenced by createConnections().
|
protectedvirtual |
Called when the user changes the UI translation.
Reimplemented from VidaliaWindow.
Definition at line 343 of file MainWindow.cpp.
References _actionAbout, _actionBandwidthGraph, _actionConfigure, _actionExit, _actionMessageLog, _actionNetworkMap, _actionNewIdentity, _actionReloadConfig, _actionRestartTor, _actionShowControlPanel, _actionStartStopTor, _actionStatus, _actionVidaliaHelp, _status, createMenuBar(), Starting, Stopped, ui, and updateTorStatus().
|
privateslot |
Called when the application has started and the main event loop is running.
Definition at line 489 of file MainWindow.cpp.
References _controlPassword, _torControl, _useSavedPassword, VidaliaSettings::isAutoUpdateEnabled(), TorControl::isCircuitEstablished(), VidaliaSettings::lastCheckedForUpdates(), UpdateProcess::nextCheckForUpdates(), VidaliaSettings::runTorAtStart(), UpdateProcess::shouldCheckForUpdates(), start(), vApp, and vInfo.
Referenced by createConnections().
|
private |
Sets the progress bar completion value to progressValue and sets the status text to description.
Definition at line 1628 of file MainWindow.cpp.
References _statusTab, _trayIcon, and StatusTab::setProgress().
Referenced by authenticate(), authenticated(), bootstrapStatusChanged(), circuitEstablished(), started(), and updateTorStatus().
Sets the visibility of the startup status description and progress bar to visible.
Definition at line 1619 of file MainWindow.cpp.
References _statusTab, StatusTab::setProgressVisible(), and StatusTab::setTorStatusVisible().
Referenced by updateTorStatus().
|
private |
Sets the current tray or dock icon image to iconFile.
Definition at line 1556 of file MainWindow.cpp.
References _trayIcon, VidaliaSettings::Dock, and VidaliaSettings::getIconPref().
Referenced by updateTorStatus().
Shows or hides this window.
Definition at line 318 of file MainWindow.cpp.
References _statusTab, StatusTab::hideCheckShowOnStartup(), and VidaliaWindow::setVisible().
Referenced by addTab(), and trayIconActivated().
|
privateslot |
Creates and displays Vidalia's About dialog.
Definition at line 1876 of file MainWindow.cpp.
Referenced by createConnections().
|
privateslot |
Displays the Bandwidth graph tab
Definition at line 1869 of file MainWindow.cpp.
References _graph, and addTab().
Referenced by createConnections().
|
privateslot |
Creates and displays the Configuration dialog with the current page set to page.
Definition at line 1658 of file MainWindow.cpp.
References connect(), VidaliaWindow::helpRequested(), showHelpDialog(), and ConfigDialog::showWindow().
Referenced by createConnections(), and startFailed().
|
privateslot |
Displays the debug output dialog for plugins
Definition at line 1907 of file MainWindow.cpp.
Referenced by createConnections().
|
privateslot |
Displays the help browser and displays the most recently viewed help topic.
Referenced by addTab(), authenticationFailed(), connectFailed(), createConnections(), showConfigDialog(), startFailed(), stop(), and stopped().
|
privateslot |
Called when a child window requests the given help topic.
Definition at line 1892 of file MainWindow.cpp.
References HelpBrowser::showWindow().
|
privateslot |
Displays the Message Log tab
Definition at line 1863 of file MainWindow.cpp.
References _messageLog, and addTab().
Referenced by createConnections(), and stopped().
|
privateslot |
Displays the Network map tab
Definition at line 1901 of file MainWindow.cpp.
References _netViewer, and addTab().
Referenced by createConnections().
|
privateslot |
Displays the General Tor Status tab
Definition at line 1857 of file MainWindow.cpp.
References _statusTab, and addTab().
Referenced by createConnections().
|
privateslot |
Called when the user wants to reload Tor's config
Sends a sighup signal to Tor on platforms other than Windows
Definition at line 1602 of file MainWindow.cpp.
References _torControl, VMessageBox::Ok, p(), TorSignal::Reload, TorControl::signal(), and VMessageBox::warning().
Referenced by createConnections().
|
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 564 of file MainWindow.cpp.
References _controlPassword, _isIntentionalExit, _previousControlPort, _previousSocksPort, _startedWithPrevious, _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(), socket_test_connect(), TorControl::start(), started(), Starting, touch_file(), updateTorStatus(), TorSettings::useRandomPassword(), vApp, vNotice, and vWarn.
Referenced by authenticationFailed(), createConnections(), restart(), running(), startFailed(), 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 689 of file MainWindow.cpp.
References _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 createConnections(), 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 853 of file MainWindow.cpp.
References _previousControlPort, _previousSocksPort, _startedWithPrevious, VMessageBox::Cancel, VMessageBox::Help, showConfigDialog(), showHelpDialog(), VMessageBox::ShowSettings, start(), Stopped, updateTorStatus(), vWarn, and VMessageBox::warning().
Referenced by createConnections().
|
privateslot |
Called when the user selects "Stop" form the menu.
Disconnects the control socket and stops the Tor process.
Definition at line 759 of file MainWindow.cpp.
References _delayedShutdownStarted, _isIntentionalExit, _torControl, VMessageBox::Cancel, VMessageBox::Help, ServerSettings::isServerEnabled(), VMessageBox::No, VMessageBox::Ok, p(), VMessageBox::question(), VidaliaSettings::rememberShutdown(), SETTING_REMEMBER_SHUTDOWN, showHelpDialog(), TorSignal::Shutdown, TorControl::signal(), TorControl::stop(), Stopping, updateTorStatus(), VMessageBox::warning(), and VMessageBox::Yes.
Referenced by authenticate(), authenticationFailed(), close(), restart(), 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 823 of file MainWindow.cpp.
References _isIntentionalExit, VMessageBox::Help, VMessageBox::Ok, showHelpDialog(), VMessageBox::ShowLog, showMessageLogTab(), Stopped, updateTorStatus(), and VMessageBox::warning().
Referenced by close(), and createConnections().
|
private |
Converts a TorStatus enum value to a string for debug logging purposes.
Definition at line 1573 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 336 of file MainWindow.cpp.
References setVisible().
Referenced by createTrayIcon().
|
privateslot |
Called when authenticated() detects that you can do auth with a cookie
Definition at line 1351 of file MainWindow.cpp.
References _torControl, TorControl::authenticate(), VMessageBox::Browse, VMessageBox::Cancel, ProtocolInfo::cookieAuthFile(), TorSettings::getDataDirectory(), loadControlCookie(), p(), VMessageBox::question(), vNotice, and vWarn.
Referenced by authenticate().
|
privateslot |
Called when cookie auth fails or when it's the only method configured
Definition at line 1389 of file MainWindow.cpp.
References _controlPassword, _torControl, _useSavedPassword, TorControl::authenticate(), TorSettings::getControlPassword(), and vNotice.
Referenced by authenticate().
|
private |
Updates the UI to reflect Tor's current status. Returns the previously set TorStatus value.
Definition at line 1473 of file MainWindow.cpp.
References _actionReloadConfig, _actionRestartTor, _actionStartStopTor, _delayedShutdownStarted, _status, _statusTab, _trayIcon, CircuitEstablished, connect(), disconnect(), IMG_START_TOR_16, IMG_STOP_TOR_16, 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(), StatusTab::setTorStatus(), setTrayIcon(), start(), Started, Starting, STARTUP_PROGRESS_STARTING, stop(), Stopped, Stopping, toString(), and vNotice.
Referenced by authenticate(), authenticated(), circuitEstablished(), disconnected(), MainWindow(), retranslateUi(), start(), started(), startFailed(), stop(), and stopped().
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 1216 of file MainWindow.cpp.
References TorSettings::getRejectPlaintextPorts(), TorSettings::getWarnPlaintextPorts(), p(), TorSettings::setRejectPlaintextPorts(), TorSettings::setWarnPlaintextPorts(), and Vidalia::torControl().
Referenced by createConnections().
|
private |
Definition at line 291 of file MainWindow.h.
Referenced by createActions(), createConnections(), createMenuBar(), createTrayMenu(), and retranslateUi().
|
private |
Definition at line 288 of file MainWindow.h.
Referenced by createActions(), createConnections(), createMenuBar(), createTrayMenu(), and retranslateUi().
|
private |
Definition at line 289 of file MainWindow.h.
Referenced by createActions(), createConnections(), createMenuBar(), createToolBar(), createTrayMenu(), and retranslateUi().
|
private |
Definition at line 293 of file MainWindow.h.
Referenced by createActions(), createConnections(), and createMenuBar().
|
private |
Definition at line 292 of file MainWindow.h.
Referenced by createActions(), createConnections(), createMenuBar(), createTrayMenu(), and retranslateUi().
|
private |
Definition at line 287 of file MainWindow.h.
Referenced by createActions(), createConnections(), createMenuBar(), createTrayMenu(), and retranslateUi().
|
private |
Definition at line 286 of file MainWindow.h.
Referenced by createActions(), createConnections(), createMenuBar(), createTrayMenu(), and retranslateUi().
|
private |
Definition at line 284 of file MainWindow.h.
Referenced by authenticated(), createActions(), createConnections(), createMenuBar(), createToolBar(), createTrayMenu(), disconnected(), enableNewIdentity(), newIdentity(), and retranslateUi().
|
private |
Definition at line 283 of file MainWindow.h.
Referenced by createActions(), createConnections(), createMenuBar(), retranslateUi(), and updateTorStatus().
|
private |
Definition at line 282 of file MainWindow.h.
Referenced by createActions(), createConnections(), createMenuBar(), retranslateUi(), and updateTorStatus().
|
private |
Defines the actions for the tray menu
Definition at line 280 of file MainWindow.h.
Referenced by createActions(), createConnections(), createTrayMenu(), and retranslateUi().
|
private |
Definition at line 281 of file MainWindow.h.
Referenced by createActions(), createConnections(), createMenuBar(), createToolBar(), createTrayMenu(), retranslateUi(), and updateTorStatus().
|
private |
Definition at line 285 of file MainWindow.h.
Referenced by createActions(), createConnections(), createMenuBar(), and retranslateUi().
|
private |
Definition at line 290 of file MainWindow.h.
Referenced by createActions(), createConnections(), createMenuBar(), createTrayMenu(), and retranslateUi().
|
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 260 of file MainWindow.h.
Referenced by running(), start(), and tryHashed().
|
private |
Tracks whether we started a delayed server shutdown.
Definition at line 253 of file MainWindow.h.
Referenced by started(), stop(), and updateTorStatus().
|
private |
Map to handle detached tabs
Definition at line 307 of file MainWindow.h.
Referenced by attachTab(), detachTab(), and handleAttachedClose().
|
private |
Dummy action to display when there are no more tabs
Definition at line 296 of file MainWindow.h.
Referenced by attachTab(), createMenuBar(), detachTab(), handleAttachedClose(), and MainWindow().
|
private |
Definition at line 305 of file MainWindow.h.
Referenced by createConnections(), createMenuBar(), MainWindow(), and ~MainWindow().
|
private |
Graph that draws bandwidth usage
Definition at line 303 of file MainWindow.h.
Referenced by addTab(), createGUI(), delTab(), and showBandwidthTab().
|
private |
|
private |
Set to true if Vidalia started its own Tor process.
Definition at line 255 of file MainWindow.h.
Referenced by authenticate(), authenticationFailed(), disconnected(), MainWindow(), and started().
|
private |
Message log that displays a more detailed log from Tor
Definition at line 301 of file MainWindow.h.
Referenced by addTab(), createGUI(), delTab(), and showMessageLogTab().
|
private |
Network map that draws circuits
Definition at line 302 of file MainWindow.h.
Referenced by addTab(), delTab(), and showNetViewerTab().
|
private |
Holds the previous controlport used
Definition at line 310 of file MainWindow.h.
Referenced by connected(), start(), and startFailed().
|
private |
Holds the previous socksport used
Definition at line 311 of file MainWindow.h.
Referenced by connected(), start(), and startFailed().
|
private |
Menu used to handle tab re-attaching
Definition at line 295 of file MainWindow.h.
Referenced by attachTab(), createMenuBar(), createTrayMenu(), detachTab(), and handleAttachedClose().
|
private |
True if Vidalia tried to start Tor with the previous ports
Definition at line 309 of file MainWindow.h.
Referenced by MainWindow(), start(), and startFailed().
|
private |
The current status of Tor.
Definition at line 249 of file MainWindow.h.
Referenced by MainWindow(), retranslateUi(), and updateTorStatus().
|
private |
Status tab that displays the load progress and a short log
Definition at line 300 of file MainWindow.h.
Referenced by addTab(), createGUI(), createTrayIcon(), delTab(), setStartupProgress(), setStartupProgressVisible(), setVisible(), showStatusTab(), and updateTorStatus().
|
private |
Map to handle opened tabs
Definition at line 306 of file MainWindow.h.
Referenced by addTab(), delTab(), and detachTab().
|
private |
A TorControl object that handles communication with Tor
Definition at line 257 of file MainWindow.h.
Referenced by aboutToQuit(), authenticate(), authenticated(), authenticationFailed(), checkTorVersion(), close(), connected(), connectFailed(), createConnections(), disconnect(), enableNewIdentity(), MainWindow(), newIdentity(), running(), sighup(), start(), started(), stop(), tryCookie(), and tryHashed().
|
private |
The Vidalia icon that sits in the tray.
Definition at line 265 of file MainWindow.h.
Referenced by clockSkewed(), createTrayIcon(), newIdentity(), setStartupProgress(), setTrayIcon(), and updateTorStatus().
|
private |
Set to true if we should use the control password saved in TorSettings when authenticating to Tor.
Definition at line 263 of file MainWindow.h.
Referenced by running(), start(), and tryHashed().
|
private |
Qt Designer generated object.
Definition at line 298 of file MainWindow.h.
Referenced by addTab(), attachTab(), createConnections(), createGUI(), createToolBar(), delTab(), detachTab(), handleAttachedClose(), and retranslateUi().