From 0366ad09cc26b47c66f279f1c4d69bdfe975d3a0 Mon Sep 17 00:00:00 2001 From: ketmar Date: Tue, 30 Jul 2013 19:40:28 +0300 Subject: [PATCH] hotkey to remove all popups --- data/options.txt | 3 +++ src/chatform.cpp | 6 ++++++ src/chatform.h | 1 + 3 files changed, 10 insertions(+) diff --git a/data/options.txt b/data/options.txt index e84b8e7..b12c99a 100644 --- a/data/options.txt +++ b/data/options.txt @@ -131,6 +131,9 @@ unselect text after copying gscutShowWindow:String:/app/shortcut/global/showwindow:Alt+Meta+D:nolocal show (and activate) main Dyskinesia window +gscutRemovePopups:String:/app/shortcut/global/hidepopups:Alt+Space:nolocal +remove all popups + quoteAddLine:Boolean:/editor/quote/addline:on add empty line after quote diff --git a/src/chatform.cpp b/src/chatform.cpp index 5311426..6f24291 100644 --- a/src/chatform.cpp +++ b/src/chatform.cpp @@ -405,6 +405,11 @@ void ChatForm::onGShortcutShow () { } +void ChatForm::onGShortcutHidePopups () { + mPopMan->removeAll(); +} + + ChatForm::~ChatForm () { GHotKeyMan::instance()->clear(); @@ -1120,6 +1125,7 @@ void ChatForm::setAccountShortcuts () { //qDebug() << "setting shortcuts..."; GHotKeyMan::instance()->clear(); GHotKeyMan::instance()->connect(QKeySequence(toStringOpt("/app/shortcut/global/showwindow", "Alt+Meta+D")), this, SLOT(onGShortcutShow())); + GHotKeyMan::instance()->connect(QKeySequence(toStringOpt("/app/shortcut/global/hidepopups", "Alt+Space")), this, SLOT(onGShortcutHidePopups())); //qDebug() << "shortcuts set"; } diff --git a/src/chatform.h b/src/chatform.h index 05bd275..6e4f32d 100644 --- a/src/chatform.h +++ b/src/chatform.h @@ -359,6 +359,7 @@ private slots: */ void onGShortcutShow (); + void onGShortcutHidePopups (); void onFloatyDblClicked (int x, int y, const QString &uni); -- 2.11.4.GIT