[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1327: Make Vidalia::help() a slot, so we don't have to have an ent (in trunk/src: . gui)
Author: edmanm
Date: 2006-10-12 19:27:14 -0400 (Thu, 12 Oct 2006)
New Revision: 1327
Modified:
trunk/src/gui/mainwindow.cpp
trunk/src/gui/mainwindow.h
trunk/src/vidalia.h
Log:
Make Vidalia::help() a slot, so we don't have to have an entire extra method
in MainWindow just to show the help dialog.
Modified: trunk/src/gui/mainwindow.cpp
===================================================================
--- trunk/src/gui/mainwindow.cpp 2006-10-12 22:04:19 UTC (rev 1326)
+++ trunk/src/gui/mainwindow.cpp 2006-10-12 23:27:14 UTC (rev 1327)
@@ -195,7 +195,7 @@
connect(_messageAct, SIGNAL(triggered()), this, SLOT(showMessageLog()));
_helpAct = new QAction(QIcon(IMG_HELP), tr("Help"), this);
- connect(_helpAct, SIGNAL(triggered()), this, SLOT(showHelp()));
+ connect(_helpAct, SIGNAL(triggered()), vApp, SLOT(help()));
_networkAct = new QAction(QIcon(IMG_NETWORK), tr("Network Map"), this);
connect(_networkAct, SIGNAL(triggered()), this, SLOT(showNetwork()));
@@ -536,14 +536,6 @@
configDialog->show();
}
-/** Shows Help Browser. If the browser is already displayed, the existing
- * instance will be brought to the foreground. */
-void
-MainWindow::showHelp()
-{
- Vidalia::help();
-}
-
/** Shows the View Network dialog. If the View Network dialog is already
* displayed, the existing instance will be brought to the foreground. */
void
Modified: trunk/src/gui/mainwindow.h
===================================================================
--- trunk/src/gui/mainwindow.h 2006-10-12 22:04:19 UTC (rev 1326)
+++ trunk/src/gui/mainwindow.h 2006-10-12 23:27:14 UTC (rev 1327)
@@ -80,8 +80,6 @@
void showBandwidthGraph();
/** Called when the user selects "Configuration" from the menu. */
void showConfig();
- /** Called when the user selects "Help" from the menu. */
- void showHelp();
/** Called when the user selects "View Network" from the menu */
void showNetwork();
/** Called when the user selects the "New Identity" action from the menu. */
Modified: trunk/src/vidalia.h
===================================================================
--- trunk/src/vidalia.h 2006-10-12 22:04:19 UTC (rev 1326)
+++ trunk/src/vidalia.h 2006-10-12 23:27:14 UTC (rev 1327)
@@ -44,7 +44,10 @@
/** Vidalia's version string */
#define VIDALIA_VERSION "0.0.9-svn"
+/** Pointer to this Vidalia application instance. */
+#define vApp ((Vidalia *)qApp)
+
class Vidalia : public QApplication
{
Q_OBJECT
@@ -66,9 +69,7 @@
static bool setLanguage(QString languageCode = QString());
/** Sets the current GUI style. */
static bool setStyle(QString styleKey = QString());
- /** Shows the specified help topic, or the default if empty. */
- static void help(QString topic = QString());
-
+
/** Returns the current language. */
static QString language() { return _language; }
/** Returns the current GUI style. */
@@ -86,7 +87,11 @@
/** Returns the location of Vidalia's pid file. */
static QString pidFile();
-
+
+public slots:
+ /** Shows the specified help topic, or the default if empty. */
+ static void help(QString topic = QString());
+
signals:
/** Signals that the application needs to shutdown now. */
void shutdown();