From e77f8ade7ffce5f2a085f4bd41ea420f44a3f78b Mon Sep 17 00:00:00 2001 From: ngocdh Date: Mon, 14 Jun 2021 10:08:16 +0200 Subject: [PATCH 1/3] Android - chatdlg close button - #1763 --- src/chatdlg.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/chatdlg.cpp b/src/chatdlg.cpp index e248c5c8e5..a3b69e614c 100644 --- a/src/chatdlg.cpp +++ b/src/chatdlg.cpp @@ -65,6 +65,10 @@ CChatDlg::CChatDlg ( QWidget* parent ) : CBaseDlg ( parent, Qt::Window ) // use connect ( action, SIGNAL ( triggered() ), this, SLOT ( close() ) ); #endif +#if defined( ANDROID ) || defined( Q_OS_ANDROID ) + pEditMenu->addAction ( tr ( "&Close" ), this, SLOT ( close() ), QKeySequence ( Qt::CTRL + Qt::Key_C ) ); +#endif + // Now tell the layout about the menu layout()->setMenuBar ( pMenu ); From afb7a368e449239abe37c3e2c5b4ac2a2c5605cf Mon Sep 17 00:00:00 2001 From: ngocdh Date: Mon, 14 Jun 2021 10:14:15 +0200 Subject: [PATCH 2/3] Android - clientsettingsdlg close button --- src/clientsettingsdlg.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/clientsettingsdlg.cpp b/src/clientsettingsdlg.cpp index 4faf0b1884..fb903f1011 100644 --- a/src/clientsettingsdlg.cpp +++ b/src/clientsettingsdlg.cpp @@ -42,6 +42,17 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, CClientSettings* pNSet layout()->setMenuBar ( pMenu ); #endif +#if defined( Q_OS_ANDROID ) || defined( ANDROID ) + // Android too + QMenuBar* pMenu = new QMenuBar ( this ); + QMenu* pCloseMenu = new QMenu ( tr ( "Close" ), this ); + pCloseMenu->addAction ( tr ( "Close" ), this, SLOT ( close() ) ); + pMenu->addMenu ( pCloseMenu ); + + // Now tell the layout about the menu + layout()->setMenuBar ( pMenu ); +#endif + // Add help text to controls ----------------------------------------------- // local audio input fader QString strAudFader = "" + tr ( "Local Audio Input Fader" ) + ": " + From 22dcdcbb830e6137451f34b7696acb7790b33f3b Mon Sep 17 00:00:00 2001 From: ngocdh Date: Tue, 15 Jun 2021 13:48:38 +0200 Subject: [PATCH 3/3] &Close menu and Ctrl W shortcut --- src/chatdlg.cpp | 2 +- src/clientsettingsdlg.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/chatdlg.cpp b/src/chatdlg.cpp index a3b69e614c..029e238714 100644 --- a/src/chatdlg.cpp +++ b/src/chatdlg.cpp @@ -66,7 +66,7 @@ CChatDlg::CChatDlg ( QWidget* parent ) : CBaseDlg ( parent, Qt::Window ) // use #endif #if defined( ANDROID ) || defined( Q_OS_ANDROID ) - pEditMenu->addAction ( tr ( "&Close" ), this, SLOT ( close() ), QKeySequence ( Qt::CTRL + Qt::Key_C ) ); + pEditMenu->addAction ( tr ( "&Close" ), this, SLOT ( close() ), QKeySequence ( Qt::CTRL + Qt::Key_W ) ); #endif // Now tell the layout about the menu diff --git a/src/clientsettingsdlg.cpp b/src/clientsettingsdlg.cpp index fb903f1011..ba0d79fcef 100644 --- a/src/clientsettingsdlg.cpp +++ b/src/clientsettingsdlg.cpp @@ -45,8 +45,8 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, CClientSettings* pNSet #if defined( Q_OS_ANDROID ) || defined( ANDROID ) // Android too QMenuBar* pMenu = new QMenuBar ( this ); - QMenu* pCloseMenu = new QMenu ( tr ( "Close" ), this ); - pCloseMenu->addAction ( tr ( "Close" ), this, SLOT ( close() ) ); + QMenu* pCloseMenu = new QMenu ( tr ( "&Close" ), this ); + pCloseMenu->addAction ( tr ( "&Close" ), this, SLOT ( close() ) ); pMenu->addMenu ( pCloseMenu ); // Now tell the layout about the menu