[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1288: Let the other kids play with my close window shortcuts. I ha (in trunk/src/gui: about bwgraph config help/browser log network)
Author: edmanm
Date: 2006-10-04 20:52:21 -0400 (Wed, 04 Oct 2006)
New Revision: 1288
Modified:
trunk/src/gui/about/aboutdialog.cpp
trunk/src/gui/bwgraph/bwgraph.cpp
trunk/src/gui/config/configdialog.cpp
trunk/src/gui/config/configdialog.h
trunk/src/gui/help/browser/helpbrowser.cpp
trunk/src/gui/log/messagelog.cpp
trunk/src/gui/network/netviewer.cpp
Log:
Let the other kids play with my close window shortcuts. I hate NSIS.
Modified: trunk/src/gui/about/aboutdialog.cpp
===================================================================
--- trunk/src/gui/about/aboutdialog.cpp 2006-10-04 23:39:25 UTC (rev 1287)
+++ trunk/src/gui/about/aboutdialog.cpp 2006-10-05 00:52:21 UTC (rev 1288)
@@ -34,10 +34,10 @@
: VidaliaWindow("AboutDialog", parent, flags)
{
ui.setupUi(this);
-#if defined(Q_WS_MAC)
+#if defined(Q_WS_WIN)
+ setShortcut("Esc", SLOT(close()));
+#else
setShortcut("Ctrl+W", SLOT(close()));
-#else
- setShortcut("Esc", SLOT(close()));
#endif
/* Save the TorControl object to use later */
Modified: trunk/src/gui/bwgraph/bwgraph.cpp
===================================================================
--- trunk/src/gui/bwgraph/bwgraph.cpp 2006-10-04 23:39:25 UTC (rev 1287)
+++ trunk/src/gui/bwgraph/bwgraph.cpp 2006-10-05 00:52:21 UTC (rev 1288)
@@ -50,10 +50,10 @@
{
/* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this);
-#if defined(Q_WS_MAC)
+#if defined(Q_WS_WIN)
+ setShortcut("Esc", SLOT(close()));
+#else
setShortcut("Ctrl+W", SLOT(close()));
-#else
- setShortcut("Esc", SLOT(close()));
#endif
/* Bind events to actions */
Modified: trunk/src/gui/config/configdialog.cpp
===================================================================
--- trunk/src/gui/config/configdialog.cpp 2006-10-04 23:39:25 UTC (rev 1287)
+++ trunk/src/gui/config/configdialog.cpp 2006-10-05 00:52:21 UTC (rev 1288)
@@ -81,17 +81,17 @@
/* Create and bind the Cancel button */
cancelAct = new QAction(QIcon(IMAGE_CANCEL), tr("Cancel"), ui.toolBar);
- addAction(cancelAct, SLOT(cancelChanges()));
+ addAction(cancelAct, SLOT(close()));
/* Select the first action */
grp->actions()[0]->setChecked(true);
-#if defined(Q_WS_MAC)
- helpAct->setShortcut(QString("Ctrl+?"));
- cancelAct->setShortcut(QString("Ctrl+W"));
-#else
+#if defined(Q_WS_WIN)
helpAct->setShortcut(QString("F1"));
cancelAct->setShortcut(QString("Esc"));
+#else
+ helpAct->setShortcut(QString("Ctrl+?"));
+ cancelAct->setShortcut(QString("Ctrl+W"));
#endif
}
@@ -146,15 +146,6 @@
}
}
-/** Cancels changes made to settings. */
-void
-ConfigDialog::cancelChanges()
-{
- /* Reload saved settings and exit */
- loadSettings();
- QMainWindow::close();
-}
-
/** Saves changes made to settings. */
void
ConfigDialog::saveChanges()
Modified: trunk/src/gui/config/configdialog.h
===================================================================
--- trunk/src/gui/config/configdialog.h 2006-10-04 23:39:25 UTC (rev 1287)
+++ trunk/src/gui/config/configdialog.h 2006-10-05 00:52:21 UTC (rev 1288)
@@ -63,8 +63,6 @@
void show(Page page);
private slots:
- /** Called when user clicks "Cancel" */
- void cancelChanges();
/** Called when user clicks "Save Settings" */
void saveChanges();
/** Called when user clicks "Help" */
Modified: trunk/src/gui/help/browser/helpbrowser.cpp
===================================================================
--- trunk/src/gui/help/browser/helpbrowser.cpp 2006-10-04 23:39:25 UTC (rev 1287)
+++ trunk/src/gui/help/browser/helpbrowser.cpp 2006-10-05 00:52:21 UTC (rev 1288)
@@ -59,6 +59,8 @@
ui.setupUi(this);
#if defined(Q_WS_MAC)
ui.actionHome->setShortcut(QString("Shift+Ctrl+H"));
+#endif
+#if !defined(Q_WS_WIN)
ui.actionClose->setShortcut(QString("Ctrl+W"));
#endif
Modified: trunk/src/gui/log/messagelog.cpp
===================================================================
--- trunk/src/gui/log/messagelog.cpp 2006-10-04 23:39:25 UTC (rev 1287)
+++ trunk/src/gui/log/messagelog.cpp 2006-10-05 00:52:21 UTC (rev 1288)
@@ -129,6 +129,8 @@
#if defined(Q_WS_MAC)
ui.actionHelp->setShortcut(QString("Ctrl+?"));
+#endif
+#if !defined(Q_WS_WIN)
ui.actionClose->setShortcut(QString("Ctrl+W"));
#endif
}
Modified: trunk/src/gui/network/netviewer.cpp
===================================================================
--- trunk/src/gui/network/netviewer.cpp 2006-10-04 23:39:25 UTC (rev 1287)
+++ trunk/src/gui/network/netviewer.cpp 2006-10-05 00:52:21 UTC (rev 1288)
@@ -54,6 +54,8 @@
ui.setupUi(this);
#if defined(Q_WS_MAC)
ui.actionHelp->setShortcut(QString("Ctrl+?"));
+#endif
+#if !defined(Q_WS_WIN)
ui.actionClose->setShortcut(QString("Ctrl+W"));
#endif