From de56068e9c16e9f09bed0ebe754e0b5949a0752a Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sat, 27 Mar 2010 13:33:25 +0000 Subject: fixed bug in the global shortcut editor git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1652 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/hotkey/hotkeydialog.cpp | 6 ++++-- src/plugins/General/hotkey/hotkeydialog.ui | 12 ++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/General/hotkey/hotkeydialog.cpp b/src/plugins/General/hotkey/hotkeydialog.cpp index 75672347e..d32d5d2d8 100644 --- a/src/plugins/General/hotkey/hotkeydialog.cpp +++ b/src/plugins/General/hotkey/hotkeydialog.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009 by Ilya Kotov * + * Copyright (C) 2009-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -29,10 +29,12 @@ HotkeyDialog::HotkeyDialog(quint32 key, quint32 mod, QWidget *parent) m_key = key; m_modifiers = mod; ui.keyLineEdit->setText(HotkeyManager::getKeyString(m_key, m_modifiers)); + grabKeyboard(); } HotkeyDialog::~HotkeyDialog() { + releaseKeyboard(); } void HotkeyDialog::keyPressEvent (QKeyEvent *event) @@ -40,7 +42,7 @@ void HotkeyDialog::keyPressEvent (QKeyEvent *event) m_key = HotkeyManager::keycodeToKeysym(event->nativeScanCode ()); m_modifiers = event->nativeModifiers (); foreach(long mask_mod, HotkeyManager::ignModifiersList()) - m_modifiers &= ~mask_mod; //remove ignoried modifiers (num lock, caps lock, etc) + m_modifiers &= ~mask_mod; //remove ignoried modifiers (num lock, caps lock, etc) ui.keyLineEdit->setText(HotkeyManager::getKeyString(m_key, m_modifiers)); QWidget::keyPressEvent(event); diff --git a/src/plugins/General/hotkey/hotkeydialog.ui b/src/plugins/General/hotkey/hotkeydialog.ui index fff3429bd..9789be32e 100644 --- a/src/plugins/General/hotkey/hotkeydialog.ui +++ b/src/plugins/General/hotkey/hotkeydialog.ui @@ -25,6 +25,9 @@ + + Qt::NoContextMenu + Press the key combination you want to assign @@ -32,6 +35,9 @@ + + Qt::NoFocus + true @@ -39,6 +45,9 @@ + + Qt::NoFocus + Clear @@ -59,6 +68,9 @@ + + Qt::NoFocus + QDialogButtonBox::Cancel|QDialogButtonBox::Ok -- cgit v1.2.3-13-gbd6f