From 8390d5fccfa667295b213a1d85616cfa8ec6a54c Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 26 May 2007 17:57:29 +0000 Subject: [PATCH] Tweak bat git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4913 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/console/console.cpp | 30 ++++++++--------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/bacula/src/qt-console/console/console.cpp b/bacula/src/qt-console/console/console.cpp index ab2ba3c6e8..5895c25f21 100644 --- a/bacula/src/qt-console/console/console.cpp +++ b/bacula/src/qt-console/console/console.cpp @@ -272,11 +272,13 @@ bool Console::sql_cmd(QString &query, QStringList &results) */ bool Console::sql_cmd(const char *query, QStringList &results) { - if (!is_connectedGui()) - return false; int stat; POOL_MEM cmd(PM_MESSAGE); + if (!is_connectedGui()) { + return false; + } + notify(false); pm_strcpy(cmd, ".sql query=\""); @@ -366,18 +368,6 @@ bool Console::get_job_defaults(struct job_defaults &job_defs) } } -#ifdef xxx - bsnprintf(cmd, sizeof(cmd), "job=%s pool=%s client=%s storage=%s where=%s\n" - "level=%s type=%s fileset=%s catalog=%s enabled=%d\n", - job_defs.job_name.toUtf8().data(), job_defs.pool_name.toUtf8().data(), - job_defs.client_name.toUtf8().data(), - job_defs.pool_name.toUtf8().data(), job_defs.messages_name.toUtf8().data(), - job_defs.store_name.toUtf8().data(), - job_defs.where.toUtf8().data(), job_defs.level.toUtf8().data(), - job_defs.type.toUtf8().data(), job_defs.fileset_name.toUtf8().data(), - job_defs.catalog_name.toUtf8().data(), job_defs.enabled); -#endif - notify(true); return true; @@ -755,7 +745,7 @@ bool Console::is_connectedGui() } else { QString message("Director "); message += " is curerntly disconnected\n Please reconnect!!"; - QMessageBox::warning(this, tr("Bat"), + QMessageBox::warning(this, "Bat", tr(message.toUtf8().data()), QMessageBox::Ok ); return false; } @@ -771,23 +761,23 @@ bool Console::preventInUseConnect() QString message("Director "); message += m_dir->name(); message += " is curerntly disconnected\n Please reconnect!!"; - QMessageBox::warning(this, tr("Bat"), + QMessageBox::warning(this, "Bat", tr(message.toUtf8().data()), QMessageBox::Ok ); return false; } else if (!m_at_main_prompt){ QString message("Director "); message += m_dir->name(); message += " is curerntly busy\n Please complete restore or other " -" operation !! This is a limitation that will be resolved before a beta" -" release. This is currently an alpha release."; - QMessageBox::warning(this, tr("Bat"), + " operation !! This is a limitation that will be resolved before a beta" + " release. This is currently an alpha release."; + QMessageBox::warning(this, "Bat", tr(message.toUtf8().data()), QMessageBox::Ok ); return false; } else if (!m_at_prompt){ QString message("Director "); message += m_dir->name(); message += " is curerntly not at a prompt\n Please try again!!"; - QMessageBox::warning(this, tr("Bat"), + QMessageBox::warning(this, "Bat", tr(message.toUtf8().data()), QMessageBox::Ok ); return false; } else { -- 2.39.5