Ticket #8861: 0001-Close-Exit-vidalia-by-pressing-Ctrl-Q.patch

File 0001-Close-Exit-vidalia-by-pressing-Ctrl-Q.patch, 1.4 KB (added by azat, 7 years ago)
  • src/vidalia/MainWindow.cpp

    From e4c2ff88b06003041d9b2c66e6d62943e5348480 Mon Sep 17 00:00:00 2001
    From: Azat Khuzhin <a3at.mail@gmail.com>
    Date: Fri, 10 May 2013 02:10:37 +0400
    Subject: [PATCH] Close/Exit vidalia by pressing Ctrl+Q
    
    ---
     src/vidalia/MainWindow.cpp |    6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/src/vidalia/MainWindow.cpp b/src/vidalia/MainWindow.cpp
    index fef48ec..abf6635 100644
    a b  
    3838#include <QMenuBar>
    3939#include <QTimer>
    4040#include <QTextStream>
     41#include <QKeySequence>
    4142
    4243#ifdef Q_WS_MAC
    4344#include <Carbon/Carbon.h>
    MainWindow::createActions() 
    434435  connect(_actionStartStopTor, SIGNAL(triggered()), this, SLOT(start()));
    435436
    436437  _actionExit = new QAction(tr("Exit"), this);
     438  /* This just add tip into menu bar. */
     439  _actionExit->setShortcut(tr("Ctrl+Q"));
     440  /* This install actual shortcut */
     441  setShortcut(tr("Ctrl+Q"), SLOT(close()));
    437442  connect(_actionExit, SIGNAL(triggered()), this, SLOT(close()));
    438443
    439444  _actionShowBandwidth = new QAction(tr("Bandwidth Graph"), this);
    MainWindow::createMenuBar() 
    564569  _actionShowAbout->setMenuRole(QAction::AboutRole);
    565570  _actionExit->setText("quit");
    566571  _actionExit->setMenuRole(QAction::QuitRole);
     572  _actionExit->setShortcut(tr("Ctrl+Q"));
    567573
    568574  /* The File, Help, and Configure menus will get merged into the application
    569575   * menu by Qt. */