From: Kern Sibbald Date: Tue, 25 Oct 2011 10:24:02 +0000 (+0200) Subject: Tweak bat console code X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5158084a1e1b73016510e22683d11936758be1b2;p=bacula%2Fbacula Tweak bat console code --- 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);