From 5158084a1e1b73016510e22683d11936758be1b2 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 25 Oct 2011 12:24:02 +0200 Subject: [PATCH] Tweak bat console code --- bacula/src/qt-console/bcomm/dircomm.cpp | 4 ++-- bacula/src/qt-console/console/console.cpp | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bacula/src/qt-console/bcomm/dircomm.cpp b/bacula/src/qt-console/bcomm/dircomm.cpp index 0514936718..a74f579dbc 100644 --- a/bacula/src/qt-console/bcomm/dircomm.cpp +++ b/bacula/src/qt-console/bcomm/dircomm.cpp @@ -307,8 +307,8 @@ int DirComm::read() app->processEvents(); if (m_api_set && m_console->is_messagesPending() && is_notify_enabled() && m_console->hasFocus()) { if (mainWin->m_commDebug) Pmsg1(000, "conn %i process_events\n", m_conn); - m_console->write_dir(m_conn, ".messages", false); m_console->messagesPending(false); + m_console->write_dir(m_conn, ".messages", false); } } if (!m_sock) { @@ -327,10 +327,10 @@ int DirComm::read() switch (m_sock->msglen) { case BNET_MSGS_PENDING : if (is_notify_enabled() && m_console->hasFocus()) { + m_console->messagesPending(false); if (mainWin->m_commDebug) Pmsg1(000, "conn %i MSGS PENDING\n", m_conn); m_console->write_dir(m_conn, ".messages", false); m_console->displayToPrompt(m_conn); - m_console->messagesPending(false); continue; } m_console->messagesPending(true); diff --git a/bacula/src/qt-console/console/console.cpp b/bacula/src/qt-console/console/console.cpp index 2c5d2e0f07..a7a29eb394 100644 --- a/bacula/src/qt-console/console/console.cpp +++ b/bacula/src/qt-console/console/console.cpp @@ -78,7 +78,7 @@ void Console::startTimer() { m_timer = new QTimer(this); QWidget::connect(m_timer, SIGNAL(timeout()), this, SLOT(poll_messages())); - m_timer->start(mainWin->m_checkMessagesInterval*1000); + m_timer->start(mainWin->m_checkMessagesInterval*30000); } void Console::stopTimer() @@ -112,7 +112,6 @@ void Console::poll_messages() DirComm *dircomm = m_dircommHash.value(conn); if (mainWin->m_checkMessages && dircomm->m_at_main_prompt && hasFocus() && !mainWin->getWaitState()){ - messagesPending(true); dircomm->write(".messages"); displayToPrompt(conn); messagesPending(false); -- 2.39.5