1) Fixed pgAdmin hang issue when the user clicks on 'View Log' menu option.

2) Fixed some code smell in runtime code.
This commit is contained in:
Akshay Joshi
2020-07-29 15:31:38 +05:30
parent f715373218
commit 510dd5c047
15 changed files with 92 additions and 85 deletions

View File

@@ -78,11 +78,11 @@ void TrayIcon::createActions()
connect(m_copyUrlAction, SIGNAL(triggered()), m_menuActions, SLOT(onCopyUrl()));
m_configAction = new QAction(tr("&Configure..."), this);
m_configAction->setEnabled(true);
m_configAction->setEnabled(false);
connect(m_configAction, SIGNAL(triggered()), m_menuActions, SLOT(onConfig()));
m_logAction = new QAction(tr("&View log..."), this);
m_logAction->setEnabled(true);
m_logAction->setEnabled(false);
connect(m_logAction, SIGNAL(triggered()), m_menuActions, SLOT(onLog()));
m_quitAction = new QAction(tr("&Shut down server"), this);
@@ -109,6 +109,21 @@ void TrayIcon::enablePostStartOptions()
m_quitAction->setEnabled(true);
}
// Enable the View Log option
void TrayIcon::enableViewLogOption()
{
if (m_logAction != Q_NULLPTR)
m_logAction->setEnabled(true);
}
// Disable the View Log option
void TrayIcon::disableViewLogOption()
{
if (m_logAction != Q_NULLPTR)
m_logAction->setEnabled(false);
}
void TrayIcon::setMenuActions(MenuActions * menuActions)
{
m_menuActions = menuActions;