From 76cb5bb5129a938ca961139d3ffc40aed92e6285 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 13 May 2008 06:49:45 +0000 Subject: [PATCH] kes Implement --without-qwt kes Fix layout of restore tree dialog git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@6962 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/autoconf/configure.in | 6 +- bacula/configure | 6 +- bacula/src/qt-console/bat.h | 1 + bacula/src/qt-console/jobgraphs/jobplot.cpp | 4 +- bacula/src/qt-console/jobgraphs/jobplot.h | 4 + bacula/src/qt-console/joblist/joblist.cpp | 2 +- bacula/src/qt-console/restore/restore.ui | 424 +++++++++----------- bacula/technotes-2.1 | 2 + 8 files changed, 202 insertions(+), 247 deletions(-) diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 4b004db182..ab963790ad 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -274,6 +274,7 @@ QWT_INC= QWT_LDFLAGS= QWT_LIB= QWT= +no_qwt=no if test x$support_bat = xyes; then AC_MSG_CHECKING(for qwt support) AC_ARG_WITH(qwt, @@ -281,6 +282,7 @@ if test x$support_bat = xyes; then [ case "$with_qwt" in no) + no_qwt=yes ;; yes|*) if test -f ${with_qwt}/include/qwt.h; then @@ -296,7 +298,8 @@ if test x$support_bat = xyes; then # # Search in standard places, or --with-qwt not specified # - if test x$QWT_INC = x; then + if test $no_qwt = no; then + if test x$QWT_INC = x; then for root in /usr /usr/local; do for ver in qwt qwt5 qwt-qt4; do if test -f ${root}/include/${ver}/qwt.h; then @@ -313,6 +316,7 @@ if test x$support_bat = xyes; then fi done done + fi fi if test x$QWT_INC = x; then AC_MSG_RESULT(no) diff --git a/bacula/configure b/bacula/configure index ce0bed17a1..d47ff3fa72 100755 --- a/bacula/configure +++ b/bacula/configure @@ -13516,6 +13516,7 @@ QWT_INC= QWT_LDFLAGS= QWT_LIB= QWT= +no_qwt=no if test x$support_bat = xyes; then { echo "$as_me:$LINENO: checking for qwt support" >&5 echo $ECHO_N "checking for qwt support... $ECHO_C" >&6; } @@ -13525,6 +13526,7 @@ if test "${with_qwt+set}" = set; then withval=$with_qwt; case "$with_qwt" in no) + no_qwt=yes ;; yes|*) if test -f ${with_qwt}/include/qwt.h; then @@ -13542,7 +13544,8 @@ fi # # Search in standard places, or --with-qwt not specified # - if test x$QWT_INC = x; then + if test $no_qwt = no; then + if test x$QWT_INC = x; then for root in /usr /usr/local; do for ver in qwt qwt5 qwt-qt4; do if test -f ${root}/include/${ver}/qwt.h; then @@ -13559,6 +13562,7 @@ fi fi done done + fi fi if test x$QWT_INC = x; then { echo "$as_me:$LINENO: result: no" >&5 diff --git a/bacula/src/qt-console/bat.h b/bacula/src/qt-console/bat.h index 308f1e05cb..61fdfdaffd 100644 --- a/bacula/src/qt-console/bat.h +++ b/bacula/src/qt-console/bat.h @@ -35,6 +35,7 @@ */ #include "config.h" + #include #include #include "mainwin.h" diff --git a/bacula/src/qt-console/jobgraphs/jobplot.cpp b/bacula/src/qt-console/jobgraphs/jobplot.cpp index 2dc2493f6b..ca65bd66a7 100644 --- a/bacula/src/qt-console/jobgraphs/jobplot.cpp +++ b/bacula/src/qt-console/jobgraphs/jobplot.cpp @@ -37,6 +37,7 @@ #include #include "bat.h" +#ifdef HAVE_QWT #include "jobgraphs/jobplot.h" @@ -234,7 +235,7 @@ void JobPlot::runQuery() int volumeIndex = controls->volumeComboBox->currentIndex(); if ((volumeIndex != -1) && (controls->volumeComboBox->itemText(volumeIndex) != "Any")) { query += " LEFT OUTER JOIN JobMedia ON (JobMedia.JobId=Job.JobId)" - " LEFT OUTER JOIN Media ON (JobMedia.MediaId=Media.MediaId)"; + " LEFT OUTER JOIN Media ON (JobMedia.MediaId=Media.MediaId)"; conditions.append("Media.VolumeName='" + controls->volumeComboBox->itemText(volumeIndex) + "'"); } int fileSetIndex = controls->fileSetComboBox->currentIndex(); @@ -582,3 +583,4 @@ void JobPlot::readSplitterSettings() m_splitter->restoreState(settings.value("m_splitterSizes").toByteArray()); settings.endGroup(); } +#endif /* HAVE_QWT */ diff --git a/bacula/src/qt-console/jobgraphs/jobplot.h b/bacula/src/qt-console/jobgraphs/jobplot.h index 423bf57acd..f1db38b412 100644 --- a/bacula/src/qt-console/jobgraphs/jobplot.h +++ b/bacula/src/qt-console/jobgraphs/jobplot.h @@ -33,6 +33,8 @@ * Dirk Bartley, March 2007 */ +#include "bat.h" +#ifdef HAVE_QWT #include #include "pages.h" #include "ui_jobplotcontrols.h" @@ -148,4 +150,6 @@ private: QwtPlot *m_jobPlot; }; +#endif /* HAVE_QWT */ + #endif /* _JOBPLOT_H_ */ diff --git a/bacula/src/qt-console/joblist/joblist.cpp b/bacula/src/qt-console/joblist/joblist.cpp index d04f01d91c..c83cbbdf15 100644 --- a/bacula/src/qt-console/joblist/joblist.cpp +++ b/bacula/src/qt-console/joblist/joblist.cpp @@ -31,9 +31,9 @@ * Dirk Bartley, March 2007 */ +#include "bat.h" #include #include -#include "bat.h" #include "joblist.h" #include "restore.h" #include "joblog/joblog.h" diff --git a/bacula/src/qt-console/restore/restore.ui b/bacula/src/qt-console/restore/restore.ui index 0429324889..968e9e8ce3 100644 --- a/bacula/src/qt-console/restore/restore.ui +++ b/bacula/src/qt-console/restore/restore.ui @@ -6,29 +6,174 @@ 0 0 796 - 582 + 597 Form - - 9 - - - 6 - - + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 81 + 20 + + + + + + + + + 16777215 + 41 + + + + <h3>Restore Select</h3> + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 51 + 21 + + + + + + + + + 0 + 0 + + + + + 35 + 0 + + + + Up + + + :/images/up.png + + + + + + + + 0 + 0 + + + + + 35 + 0 + + + + Mark + + + :/images/check.png + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + Unmark + + + :/images/unchecked.png + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 81 + 21 + + + + + + + + <h2>Files</h2> + + + + + + + Qt::Horizontal + + + + 71 + 21 + + + + + + + + 0 + 0 + + Qt::Horizontal - - 5 - 7 + 1 1 @@ -57,6 +202,9 @@ 0 + + Select a Directory + true @@ -65,15 +213,13 @@ - 1 + Directories - - 7 - 5 + 144 1 @@ -143,221 +289,28 @@ - + - - 0 - - - 6 - - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 50 - 30 - - - - - - - <h2>Directories</h2> - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 16 - 30 - - - - - - - - - 16777215 - 15 - - - - <h3>Restore Select</h3> - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 16 - 20 - - - - - - - - - 5 - 0 - 0 - 0 - - - - - 35 - 0 - - - - Up - - - :/images/up.png - - - - - - - - 5 - 0 - 0 - 0 - - - - - 35 - 0 - - - - Mark - - - :/images/check.png - - - - - + - - 5 - 0 + 0 0 - - - 50 - 0 - - - - Unmark - - - :/images/unchecked.png - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 61 - 20 - - - - - - - <h2>Files</h2> - - - - - - - Qt::Horizontal - - - - 100 - 30 - - - - - - - - - - 0 - - - 6 - - - - - - 0 - 0 - 0 - 0 - + Current Dir: - - Status: + + lineEdit - - 5 - 0 + 0 0 @@ -367,34 +320,6 @@ - - - - - - 0 - - - 6 - - - - - - 0 - 5 - 0 - 0 - - - - Current Dir: - - - lineEdit - - - @@ -437,6 +362,19 @@ + + + + + 0 + 0 + + + + Status: + + + diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index 071125d9a8..7cf92556ac 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -3,6 +3,8 @@ General: 12May08 +kes Implement --without-qwt +kes Fix layout of restore tree dialog kes Add configure bat QWT libraries, so that bat can be built with or without the QWT libaries. 11May08 -- 2.39.5