]> git.sur5r.net Git - bacula/bacula/commitdiff
Apply Antibes updates
authorKern Sibbald <kern@sibbald.com>
Sat, 17 Mar 2007 17:30:59 +0000 (17:30 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 17 Mar 2007 17:30:59 +0000 (17:30 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4349 91ce42f0-d328-0410-95d8-f526ca767f89

13 files changed:
bacula/kernstodo
bacula/src/dird/verify.c
bacula/src/qt-console/Makefile
bacula/src/qt-console/bat.pro
bacula/src/qt-console/console/console.ui
bacula/src/qt-console/mainwin.cpp
bacula/src/qt-console/mainwin.h
bacula/src/qt-console/medialist/medialist.cpp [new file with mode: 0644]
bacula/src/qt-console/medialist/medialist.h [new file with mode: 0644]
bacula/src/qt-console/medialist/medialist.ui [new file with mode: 0644]
bacula/src/qt-console/restore/brestore.ui
bacula/src/stored/bacula-sd.conf.in
bacula/src/version.h

index 0bcd308589e3799e572fbd4ab086050fcfeeb27a..a6b935748a2522dcda3a2af21e1cd85f552904f8 100644 (file)
@@ -43,6 +43,8 @@ Document:
  
 
 Priority:
+- Ensure that each device in an Autochanger has a different
+  Device Index.
 - Add Catalog = to Pool resource so that pools will exist
   in only one catalog -- currently Pools are "global".
 - Look at sg_logs -a /dev/sg0 for getting soft errors.
index 674cdd8c58bc2214c5e3019916e2aac68b511577..1080bf9a280b69e4b49fe055d4c9a14ab6322e4e 100644 (file)
@@ -1,22 +1,7 @@
-/*
- *
- *   Bacula Director -- verify.c -- responsible for running file verification
- *
- *     Kern Sibbald, October MM
- *
- *  Basic tasks done here:
- *     Open DB
- *     Open connection with File daemon and pass him commands
- *       to do the verify.
- *     When the File daemon sends the attributes, compare them to
- *       what is in the DB.
- *
- *   Version $Id$
- */
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
 */
+/*
+ *
+ *   Bacula Director -- verify.c -- responsible for running file verification
+ *
+ *     Kern Sibbald, October MM
+ *
+ *  Basic tasks done here:
+ *     Open DB
+ *     Open connection with File daemon and pass him commands
+ *       to do the verify.
+ *     When the File daemon sends the attributes, compare them to
+ *       what is in the DB.
+ *
+ *   Version $Id$
+ */
 
 
 #include "bacula.h"
@@ -66,6 +66,22 @@ static int missing_handler(void *ctx, int num_fields, char **row);
  */
 bool do_verify_init(JCR *jcr) 
 {
+   return true;
+}
+
+
+/*
+ * Do a verification of the specified files against the Catlaog
+ *
+ *  Returns:  false on failure
+ *            true  on success
+ */
+bool do_verify(JCR *jcr)
+{
+   const char *level;
+   BSOCK   *fd;
+   int stat;
+   char ed1[100];
    JOB_DBR jr;
    JobId_t verify_jobid = 0;
    const char *Name;
@@ -74,12 +90,16 @@ bool do_verify_init(JCR *jcr)
 
    memset(&jcr->previous_jr, 0, sizeof(jcr->previous_jr));
 
-   Dmsg1(9, "bdird: created client %s record\n", jcr->client->hdr.name);
-
    /*
-    * Find JobId of last job that ran.  E.g.
-    *   for VERIFY_CATALOG we want the JobId of the last INIT.
-    *   for VERIFY_VOLUME_TO_CATALOG, we want the JobId of the
+    * Find JobId of last job that ran. Note, we do this when
+    *   the job actually starts running, not at schedule time,
+    *   so that we find the last job that terminated before
+    *   this job runs rather than before it is scheduled. This
+    *   permits scheduling a Backup and Verify at the same time,
+    *   but with the Verify at a lower priority.
+    *
+    *   For VERIFY_CATALOG we want the JobId of the last INIT.
+    *   For VERIFY_VOLUME_TO_CATALOG, we want the JobId of the
     *       last backup Job.
     */
    if (jcr->JobLevel == L_VERIFY_CATALOG ||
@@ -89,7 +109,7 @@ bool do_verify_init(JCR *jcr)
       if (jcr->verify_job &&
           (jcr->JobLevel == L_VERIFY_VOLUME_TO_CATALOG ||
            jcr->JobLevel == L_VERIFY_DISK_TO_CATALOG)) {
-         Name = jcr->verify_job->hdr.name;
+         Name = jcr->verify_job->name();  
       } else {
          Name = NULL;
       }
@@ -149,22 +169,6 @@ bool do_verify_init(JCR *jcr)
       jcr->fileset = jcr->verify_job->fileset;
    }
    Dmsg2(100, "ClientId=%u JobLevel=%c\n", jcr->previous_jr.ClientId, jcr->JobLevel);
-   return true;
-}
-
-
-/*
- * Do a verification of the specified files against the Catlaog
- *
- *  Returns:  false on failure
- *            true  on success
- */
-bool do_verify(JCR *jcr)
-{
-   const char *level;
-   BSOCK   *fd;
-   int stat;
-   char ed1[100];
 
    if (!db_update_job_start_record(jcr, jcr->db, &jcr->jr)) {
       Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db));
index da4fd113c9c6930a65c35ae872aa739be6a8381a..1ff7f57ecb9581927f6fdc56a0e7cd3f2dcb22f0 100644 (file)
@@ -1,6 +1,6 @@
 #############################################################################
 # Makefile for building: bat
-# Generated by qmake (2.01a) (Qt 4.2.1) on: Sun Mar 11 11:56:33 2007
+# Generated by qmake (2.01a) (Qt 4.2.1) on: Thu Mar 15 21:12:02 2007
 # Project:  bat.pro
 # Template: app
 # Command: /usr/bin/qmake -unix -o Makefile bat.pro
@@ -17,7 +17,7 @@ CFLAGS        = -pipe -g -D_REENTRANT -Wall -W  $(DEFINES)
 CXXFLAGS      = -pipe -g -D_REENTRANT -Wall -W  $(DEFINES)
 LEXFLAGS      = 
 YACCFLAGS     = -d
-INCPATH       = -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtGui -I/usr/include -I. -Iconsole -Irestore -Iselect -I.. -Imoc -I.
+INCPATH       = -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtGui -I/usr/include -I. -Iconsole -Irestore -Iselect -I.. -Imoc -Iui
 LINK          = g++
 LFLAGS        = 
 LIBS          = $(SUBLIBS)  -L/usr/lib -L../lib -lbac -lssl -lcrypto -lQtGui -L/usr/lib -L/usr/X11R6/lib -lpng -lSM -lICE -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -ldl -lpthread
@@ -57,12 +57,14 @@ SOURCES       = main.cpp \
                label/label.cpp \
                run/run.cpp \
                run/runcmd.cpp \
-               select/select.cpp moc/moc_mainwin.cpp \
+               select/select.cpp \
+               medialist/medialist.cpp moc/moc_mainwin.cpp \
                moc/moc_console.cpp \
                moc/moc_restore.cpp \
                moc/moc_label.cpp \
                moc/moc_run.cpp \
                moc/moc_select.cpp \
+               moc/moc_medialist.cpp \
                qrc_main.cpp
 OBJECTS       = obj/main.o \
                obj/bat_conf.o \
@@ -77,12 +79,14 @@ OBJECTS       = obj/main.o \
                obj/run.o \
                obj/runcmd.o \
                obj/select.o \
+               obj/medialist.o \
                obj/moc_mainwin.o \
                obj/moc_console.o \
                obj/moc_restore.o \
                obj/moc_label.o \
                obj/moc_run.o \
                obj/moc_select.o \
+               obj/moc_medialist.o \
                obj/qrc_main.o
 DIST          = /usr/share/qt4/mkspecs/common/unix.conf \
                /usr/share/qt4/mkspecs/common/g++.conf \
@@ -129,7 +133,7 @@ first: all
 
 all: Makefile $(TARGET)
 
-$(TARGET): ui_main.h ui_label.h ui_console.h ui_restore.h ui_prerestore.h ui_brestore.h ui_run.h ui_runcmd.h ui_select.h $(OBJECTS)  
+$(TARGET): ui/ui_main.h ui/ui_label.h ui/ui_console.h ui/ui_restore.h ui/ui_prerestore.h ui/ui_brestore.h ui/ui_run.h ui/ui_runcmd.h ui/ui_select.h ui/ui_medialist.h $(OBJECTS)  
        $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
 
 Makefile: bat.pro  /usr/share/qt4/mkspecs/default/qmake.conf /usr/share/qt4/mkspecs/common/unix.conf \
@@ -174,7 +178,7 @@ qmake:  FORCE
 
 dist: 
        @$(CHK_DIR_EXISTS) obj/bat1.0.0 || $(MKDIR) obj/bat1.0.0 
-       $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/bat1.0.0/ && $(COPY_FILE) --parents mainwin.h bat.h bat_conf.h qstd.h console/console.h restore/restore.h label/label.h run/run.h select/select.h obj/bat1.0.0/ && $(COPY_FILE) --parents main.qrc obj/bat1.0.0/ && $(COPY_FILE) --parents main.cpp bat_conf.cpp mainwin.cpp qstd.cpp console/authenticate.cpp console/console.cpp restore/prerestore.cpp restore/restore.cpp restore/brestore.cpp label/label.cpp run/run.cpp run/runcmd.cpp select/select.cpp obj/bat1.0.0/ && $(COPY_FILE) --parents main.ui label/label.ui console/console.ui restore/restore.ui restore/prerestore.ui restore/brestore.ui run/run.ui run/runcmd.ui select/select.ui obj/bat1.0.0/ && (cd `dirname obj/bat1.0.0` && $(TAR) bat1.0.0.tar bat1.0.0 && $(COMPRESS) bat1.0.0.tar) && $(MOVE) `dirname obj/bat1.0.0`/bat1.0.0.tar.gz . && $(DEL_FILE) -r obj/bat1.0.0
+       $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/bat1.0.0/ && $(COPY_FILE) --parents mainwin.h bat.h bat_conf.h qstd.h console/console.h restore/restore.h label/label.h run/run.h select/select.h medialist/medialist.h obj/bat1.0.0/ && $(COPY_FILE) --parents main.qrc obj/bat1.0.0/ && $(COPY_FILE) --parents main.cpp bat_conf.cpp mainwin.cpp qstd.cpp console/authenticate.cpp console/console.cpp restore/prerestore.cpp restore/restore.cpp restore/brestore.cpp label/label.cpp run/run.cpp run/runcmd.cpp select/select.cpp medialist/medialist.cpp obj/bat1.0.0/ && $(COPY_FILE) --parents main.ui label/label.ui console/console.ui restore/restore.ui restore/prerestore.ui restore/brestore.ui run/run.ui run/runcmd.ui select/select.ui medialist/medialist.ui obj/bat1.0.0/ && (cd `dirname obj/bat1.0.0` && $(TAR) bat1.0.0.tar bat1.0.0 && $(COMPRESS) bat1.0.0.tar) && $(MOVE) `dirname obj/bat1.0.0`/bat1.0.0.tar.gz . && $(DEL_FILE) -r obj/bat1.0.0
 
 
 yaccclean:
@@ -198,49 +202,58 @@ mocclean: compiler_moc_header_clean compiler_moc_source_clean
 
 mocables: compiler_moc_header_make_all compiler_moc_source_make_all
 
-compiler_moc_header_make_all: moc/moc_mainwin.cpp moc/moc_console.cpp moc/moc_restore.cpp moc/moc_label.cpp moc/moc_run.cpp moc/moc_select.cpp
+compiler_moc_header_make_all: moc/moc_mainwin.cpp moc/moc_console.cpp moc/moc_restore.cpp moc/moc_label.cpp moc/moc_run.cpp moc/moc_select.cpp moc/moc_medialist.cpp
 compiler_moc_header_clean:
-       -$(DEL_FILE) moc/moc_mainwin.cpp moc/moc_console.cpp moc/moc_restore.cpp moc/moc_label.cpp moc/moc_run.cpp moc/moc_select.cpp
-moc/moc_mainwin.cpp: ui_main.h \
+       -$(DEL_FILE) moc/moc_mainwin.cpp moc/moc_console.cpp moc/moc_restore.cpp moc/moc_label.cpp moc/moc_run.cpp moc/moc_select.cpp moc/moc_medialist.cpp
+moc/moc_mainwin.cpp: ui/ui_main.h \
                label/label.h \
-               ui_label.h \
+               ui/ui_label.h \
                run/run.h \
-               ui_run.h \
+               ui/ui_run.h \
+               ui/ui_runcmd.h \
                restore/restore.h \
-               ui_brestore.h \
-               ui_restore.h \
-               ui_prerestore.h \
+               ui/ui_brestore.h \
+               ui/ui_restore.h \
+               ui/ui_prerestore.h \
+               medialist/medialist.h \
+               ui/ui_medialist.h \
                mainwin.h \
                /usr/bin/moc
        /usr/bin/moc $(DEFINES) $(INCPATH) mainwin.h -o moc/moc_mainwin.cpp
 
-moc/moc_console.cpp: ui_console.h \
+moc/moc_console.cpp: ui/ui_console.h \
                console/console.h \
                /usr/bin/moc
        /usr/bin/moc $(DEFINES) $(INCPATH) console/console.h -o moc/moc_console.cpp
 
-moc/moc_restore.cpp: ui_brestore.h \
-               ui_restore.h \
-               ui_prerestore.h \
+moc/moc_restore.cpp: ui/ui_brestore.h \
+               ui/ui_restore.h \
+               ui/ui_prerestore.h \
                restore/restore.h \
                /usr/bin/moc
        /usr/bin/moc $(DEFINES) $(INCPATH) restore/restore.h -o moc/moc_restore.cpp
 
-moc/moc_label.cpp: ui_label.h \
+moc/moc_label.cpp: ui/ui_label.h \
                label/label.h \
                /usr/bin/moc
        /usr/bin/moc $(DEFINES) $(INCPATH) label/label.h -o moc/moc_label.cpp
 
-moc/moc_run.cpp: ui_run.h \
+moc/moc_run.cpp: ui/ui_run.h \
+               ui/ui_runcmd.h \
                run/run.h \
                /usr/bin/moc
        /usr/bin/moc $(DEFINES) $(INCPATH) run/run.h -o moc/moc_run.cpp
 
-moc/moc_select.cpp: ui_select.h \
+moc/moc_select.cpp: ui/ui_select.h \
                select/select.h \
                /usr/bin/moc
        /usr/bin/moc $(DEFINES) $(INCPATH) select/select.h -o moc/moc_select.cpp
 
+moc/moc_medialist.cpp: ui/ui_medialist.h \
+               medialist/medialist.h \
+               /usr/bin/moc
+       /usr/bin/moc $(DEFINES) $(INCPATH) medialist/medialist.h -o moc/moc_medialist.cpp
+
 compiler_rcc_make_all: qrc_main.cpp
 compiler_rcc_clean:
        -$(DEL_FILE) qrc_main.cpp
@@ -267,35 +280,38 @@ compiler_image_collection_clean:
        -$(DEL_FILE) qmake_image_collection.cpp
 compiler_moc_source_make_all:
 compiler_moc_source_clean:
-compiler_uic_make_all: ui_main.h ui_label.h ui_console.h ui_restore.h ui_prerestore.h ui_brestore.h ui_run.h ui_runcmd.h ui_select.h
+compiler_uic_make_all: ui/ui_main.h ui/ui_label.h ui/ui_console.h ui/ui_restore.h ui/ui_prerestore.h ui/ui_brestore.h ui/ui_run.h ui/ui_runcmd.h ui/ui_select.h ui/ui_medialist.h
 compiler_uic_clean:
-       -$(DEL_FILE) ui_main.h ui_label.h ui_console.h ui_restore.h ui_prerestore.h ui_brestore.h ui_run.h ui_runcmd.h ui_select.h
-ui_main.h: main.ui
-       /usr/bin/uic main.ui -o ui_main.h
+       -$(DEL_FILE) ui/ui_main.h ui/ui_label.h ui/ui_console.h ui/ui_restore.h ui/ui_prerestore.h ui/ui_brestore.h ui/ui_run.h ui/ui_runcmd.h ui/ui_select.h ui/ui_medialist.h
+ui/ui_main.h: main.ui
+       /usr/bin/uic main.ui -o ui/ui_main.h
+
+ui/ui_label.h: label/label.ui
+       /usr/bin/uic label/label.ui -o ui/ui_label.h
 
-ui_label.h: label/label.ui
-       /usr/bin/uic label/label.ui -o ui_label.h
+ui/ui_console.h: console/console.ui
+       /usr/bin/uic console/console.ui -o ui/ui_console.h
 
-ui_console.h: console/console.ui
-       /usr/bin/uic console/console.ui -o ui_console.h
+ui/ui_restore.h: restore/restore.ui
+       /usr/bin/uic restore/restore.ui -o ui/ui_restore.h
 
-ui_restore.h: restore/restore.ui
-       /usr/bin/uic restore/restore.ui -o ui_restore.h
+ui/ui_prerestore.h: restore/prerestore.ui
+       /usr/bin/uic restore/prerestore.ui -o ui/ui_prerestore.h
 
-ui_prerestore.h: restore/prerestore.ui
-       /usr/bin/uic restore/prerestore.ui -o ui_prerestore.h
+ui/ui_brestore.h: restore/brestore.ui
+       /usr/bin/uic restore/brestore.ui -o ui/ui_brestore.h
 
-ui_brestore.h: restore/brestore.ui
-       /usr/bin/uic restore/brestore.ui -o ui_brestore.h
+ui/ui_run.h: run/run.ui
+       /usr/bin/uic run/run.ui -o ui/ui_run.h
 
-ui_run.h: run/run.ui
-       /usr/bin/uic run/run.ui -o ui_run.h
+ui/ui_runcmd.h: run/runcmd.ui
+       /usr/bin/uic run/runcmd.ui -o ui/ui_runcmd.h
 
-ui_runcmd.h: run/runcmd.ui
-       /usr/bin/uic run/runcmd.ui -o ui_runcmd.h
+ui/ui_select.h: select/select.ui
+       /usr/bin/uic select/select.ui -o ui/ui_select.h
 
-ui_select.h: select/select.ui
-       /usr/bin/uic select/select.ui -o ui_select.h
+ui/ui_medialist.h: medialist/medialist.ui
+       /usr/bin/uic medialist/medialist.ui -o ui/ui_medialist.h
 
 compiler_clean: compiler_moc_header_clean compiler_rcc_clean compiler_image_collection_clean compiler_moc_source_clean compiler_uic_clean 
 
@@ -303,15 +319,18 @@ compiler_clean: compiler_moc_header_clean compiler_rcc_clean compiler_image_coll
 
 obj/main.o: main.cpp bat.h \
                mainwin.h \
-               ui_main.h \
+               ui/ui_main.h \
                label/label.h \
-               ui_label.h \
+               ui/ui_label.h \
                run/run.h \
-               ui_run.h \
+               ui/ui_run.h \
+               ui/ui_runcmd.h \
                restore/restore.h \
-               ui_brestore.h \
-               ui_restore.h \
-               ui_prerestore.h \
+               ui/ui_brestore.h \
+               ui/ui_restore.h \
+               ui/ui_prerestore.h \
+               medialist/medialist.h \
+               ui/ui_medialist.h \
                bat_conf.h \
                qstd.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/main.o main.cpp
@@ -321,15 +340,18 @@ obj/bat_conf.o: bat_conf.cpp bat_conf.h
 
 obj/mainwin.o: mainwin.cpp bat.h \
                mainwin.h \
-               ui_main.h \
+               ui/ui_main.h \
                label/label.h \
-               ui_label.h \
+               ui/ui_label.h \
                run/run.h \
-               ui_run.h \
+               ui/ui_run.h \
+               ui/ui_runcmd.h \
                restore/restore.h \
-               ui_brestore.h \
-               ui_restore.h \
-               ui_prerestore.h \
+               ui/ui_brestore.h \
+               ui/ui_restore.h \
+               ui/ui_prerestore.h \
+               medialist/medialist.h \
+               ui/ui_medialist.h \
                bat_conf.h \
                qstd.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/mainwin.o mainwin.cpp
@@ -339,143 +361,188 @@ obj/qstd.o: qstd.cpp qstd.h
 
 obj/authenticate.o: console/authenticate.cpp bat.h \
                mainwin.h \
-               ui_main.h \
+               ui/ui_main.h \
                label/label.h \
-               ui_label.h \
+               ui/ui_label.h \
                run/run.h \
-               ui_run.h \
+               ui/ui_run.h \
+               ui/ui_runcmd.h \
                restore/restore.h \
-               ui_brestore.h \
-               ui_restore.h \
-               ui_prerestore.h \
+               ui/ui_brestore.h \
+               ui/ui_restore.h \
+               ui/ui_prerestore.h \
+               medialist/medialist.h \
+               ui/ui_medialist.h \
                bat_conf.h \
                qstd.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/authenticate.o console/authenticate.cpp
 
 obj/console.o: console/console.cpp bat.h \
                mainwin.h \
-               ui_main.h \
+               ui/ui_main.h \
                label/label.h \
-               ui_label.h \
+               ui/ui_label.h \
                run/run.h \
-               ui_run.h \
+               ui/ui_run.h \
+               ui/ui_runcmd.h \
                restore/restore.h \
-               ui_brestore.h \
-               ui_restore.h \
-               ui_prerestore.h \
+               ui/ui_brestore.h \
+               ui/ui_restore.h \
+               ui/ui_prerestore.h \
+               medialist/medialist.h \
+               ui/ui_medialist.h \
                bat_conf.h \
                qstd.h \
                console/console.h \
-               ui_console.h
+               ui/ui_console.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/console.o console/console.cpp
 
 obj/prerestore.o: restore/prerestore.cpp bat.h \
                mainwin.h \
-               ui_main.h \
+               ui/ui_main.h \
                label/label.h \
-               ui_label.h \
+               ui/ui_label.h \
                run/run.h \
-               ui_run.h \
+               ui/ui_run.h \
+               ui/ui_runcmd.h \
                restore/restore.h \
-               ui_brestore.h \
-               ui_restore.h \
-               ui_prerestore.h \
+               ui/ui_brestore.h \
+               ui/ui_restore.h \
+               ui/ui_prerestore.h \
+               medialist/medialist.h \
+               ui/ui_medialist.h \
                bat_conf.h \
                qstd.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/prerestore.o restore/prerestore.cpp
 
 obj/restore.o: restore/restore.cpp bat.h \
                mainwin.h \
-               ui_main.h \
+               ui/ui_main.h \
                label/label.h \
-               ui_label.h \
+               ui/ui_label.h \
                run/run.h \
-               ui_run.h \
+               ui/ui_run.h \
+               ui/ui_runcmd.h \
                restore/restore.h \
-               ui_brestore.h \
-               ui_restore.h \
-               ui_prerestore.h \
+               ui/ui_brestore.h \
+               ui/ui_restore.h \
+               ui/ui_prerestore.h \
+               medialist/medialist.h \
+               ui/ui_medialist.h \
                bat_conf.h \
                qstd.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/restore.o restore/restore.cpp
 
 obj/brestore.o: restore/brestore.cpp bat.h \
                mainwin.h \
-               ui_main.h \
+               ui/ui_main.h \
                label/label.h \
-               ui_label.h \
+               ui/ui_label.h \
                run/run.h \
-               ui_run.h \
+               ui/ui_run.h \
+               ui/ui_runcmd.h \
                restore/restore.h \
-               ui_brestore.h \
-               ui_restore.h \
-               ui_prerestore.h \
+               ui/ui_brestore.h \
+               ui/ui_restore.h \
+               ui/ui_prerestore.h \
+               medialist/medialist.h \
+               ui/ui_medialist.h \
                bat_conf.h \
                qstd.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/brestore.o restore/brestore.cpp
 
 obj/label.o: label/label.cpp bat.h \
                mainwin.h \
-               ui_main.h \
+               ui/ui_main.h \
                label/label.h \
-               ui_label.h \
+               ui/ui_label.h \
                run/run.h \
-               ui_run.h \
+               ui/ui_run.h \
+               ui/ui_runcmd.h \
                restore/restore.h \
-               ui_brestore.h \
-               ui_restore.h \
-               ui_prerestore.h \
+               ui/ui_brestore.h \
+               ui/ui_restore.h \
+               ui/ui_prerestore.h \
+               medialist/medialist.h \
+               ui/ui_medialist.h \
                bat_conf.h \
                qstd.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/label.o label/label.cpp
 
 obj/run.o: run/run.cpp bat.h \
                mainwin.h \
-               ui_main.h \
+               ui/ui_main.h \
                label/label.h \
-               ui_label.h \
+               ui/ui_label.h \
                run/run.h \
-               ui_run.h \
+               ui/ui_run.h \
+               ui/ui_runcmd.h \
                restore/restore.h \
-               ui_brestore.h \
-               ui_restore.h \
-               ui_prerestore.h \
+               ui/ui_brestore.h \
+               ui/ui_restore.h \
+               ui/ui_prerestore.h \
+               medialist/medialist.h \
+               ui/ui_medialist.h \
                bat_conf.h \
                qstd.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/run.o run/run.cpp
 
 obj/runcmd.o: run/runcmd.cpp bat.h \
                mainwin.h \
-               ui_main.h \
+               ui/ui_main.h \
                label/label.h \
-               ui_label.h \
+               ui/ui_label.h \
                run/run.h \
-               ui_run.h \
+               ui/ui_run.h \
+               ui/ui_runcmd.h \
                restore/restore.h \
-               ui_brestore.h \
-               ui_restore.h \
-               ui_prerestore.h \
+               ui/ui_brestore.h \
+               ui/ui_restore.h \
+               ui/ui_prerestore.h \
+               medialist/medialist.h \
+               ui/ui_medialist.h \
                bat_conf.h \
                qstd.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/runcmd.o run/runcmd.cpp
 
 obj/select.o: select/select.cpp bat.h \
                mainwin.h \
-               ui_main.h \
+               ui/ui_main.h \
                label/label.h \
-               ui_label.h \
+               ui/ui_label.h \
                run/run.h \
-               ui_run.h \
+               ui/ui_run.h \
+               ui/ui_runcmd.h \
                restore/restore.h \
-               ui_brestore.h \
-               ui_restore.h \
-               ui_prerestore.h \
+               ui/ui_brestore.h \
+               ui/ui_restore.h \
+               ui/ui_prerestore.h \
+               medialist/medialist.h \
+               ui/ui_medialist.h \
                bat_conf.h \
                qstd.h \
                select/select.h \
-               ui_select.h
+               ui/ui_select.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/select.o select/select.cpp
 
+obj/medialist.o: medialist/medialist.cpp bat.h \
+               mainwin.h \
+               ui/ui_main.h \
+               label/label.h \
+               ui/ui_label.h \
+               run/run.h \
+               ui/ui_run.h \
+               ui/ui_runcmd.h \
+               restore/restore.h \
+               ui/ui_brestore.h \
+               ui/ui_restore.h \
+               ui/ui_prerestore.h \
+               medialist/medialist.h \
+               ui/ui_medialist.h \
+               bat_conf.h \
+               qstd.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/medialist.o medialist/medialist.cpp
+
 obj/moc_mainwin.o: moc/moc_mainwin.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_mainwin.o moc/moc_mainwin.cpp
 
@@ -494,6 +561,9 @@ obj/moc_run.o: moc/moc_run.cpp
 obj/moc_select.o: moc/moc_select.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_select.o moc/moc_select.cpp
 
+obj/moc_medialist.o: moc/moc_medialist.cpp 
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_medialist.o moc/moc_medialist.cpp
+
 obj/qrc_main.o: qrc_main.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/qrc_main.o qrc_main.cpp
 
index 271754f6ca78fb1e5cee9512464331564ea5465e..0092b7bd8563785dd6530621576d96cfc69fbc3e 100644 (file)
@@ -14,6 +14,7 @@ LIBS        += -lssl -lcrypto
 RESOURCES = main.qrc
 MOC_DIR = moc
 OBJECTS_DIR = obj
+UI_DIR = ui
 
 # Main window
 FORMS += main.ui
@@ -22,6 +23,7 @@ FORMS += console/console.ui
 FORMS += restore/restore.ui restore/prerestore.ui restore/brestore.ui
 FORMS += run/run.ui run/runcmd.ui
 FORMS += select/select.ui
+FORMS += medialist/medialist.ui
 
 
 HEADERS += mainwin.h bat.h bat_conf.h qstd.h
@@ -43,6 +45,10 @@ SOURCES += label/label.cpp
 HEADERS += run/run.h
 SOURCES += run/run.cpp run/runcmd.cpp
 
-# Select dialgo
+# Select dialog
 HEADERS += select/select.h
 SOURCES += select/select.cpp
+
+## Medialist
+HEADERS += medialist/medialist.h
+SOURCES += medialist/medialist.cpp
index 0f304b915587c4e2af0fdd5a765a9dde80777977..ea346108b27aa476806b806dae0580bcffca955f 100644 (file)
@@ -6,7 +6,7 @@
     <x>0</x>
     <y>0</y>
     <width>432</width>
-    <height>422</height>
+    <height>456</height>
    </rect>
   </property>
   <property name="windowTitle" >
     <number>6</number>
    </property>
    <item row="0" column="0" >
-    <widget class="QDockWidget" name="dockWidget" >
+    <widget class="QTextEdit" name="textEdit" >
+     <property name="sizePolicy" >
+      <sizepolicy>
+       <hsizetype>7</hsizetype>
+       <vsizetype>7</vsizetype>
+       <horstretch>200</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize" >
+      <size>
+       <width>0</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="sizeIncrement" >
+      <size>
+       <width>1</width>
+       <height>0</height>
+      </size>
+     </property>
      <property name="focusPolicy" >
       <enum>Qt::StrongFocus</enum>
      </property>
-     <property name="windowIcon" >
-      <iconset>../images/print.png</iconset>
+     <property name="acceptDrops" >
+      <bool>false</bool>
+     </property>
+     <property name="toolTip" >
+      <string comment="Console Window" />
+     </property>
+     <property name="statusTip" >
+      <string comment="Console Window" />
+     </property>
+     <property name="whatsThis" >
+      <string comment="Console Window" />
+     </property>
+     <property name="horizontalScrollBarPolicy" >
+      <enum>Qt::ScrollBarAsNeeded</enum>
+     </property>
+     <property name="autoFormatting" >
+      <set>QTextEdit::AutoNone</set>
+     </property>
+     <property name="tabChangesFocus" >
+      <bool>false</bool>
+     </property>
+     <property name="documentTitle" >
+      <string comment="Console Window" />
      </property>
-     <property name="features" >
-      <set>QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable|QDockWidget::NoDockWidgetFeatures</set>
+     <property name="lineWrapMode" >
+      <enum>QTextEdit::NoWrap</enum>
      </property>
-     <property name="allowedAreas" >
-      <set>Qt::NoDockWidgetArea</set>
+     <property name="readOnly" >
+      <bool>true</bool>
      </property>
-     <widget class="QWidget" name="dockWidgetContents" >
-      <property name="focusPolicy" >
-       <enum>Qt::StrongFocus</enum>
-      </property>
-      <layout class="QGridLayout" >
-       <property name="margin" >
-        <number>9</number>
-       </property>
-       <property name="spacing" >
-        <number>6</number>
-       </property>
-       <item row="0" column="0" >
-        <widget class="QTextEdit" name="textEdit" >
-         <property name="sizePolicy" >
-          <sizepolicy>
-           <hsizetype>7</hsizetype>
-           <vsizetype>7</vsizetype>
-           <horstretch>200</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="minimumSize" >
-          <size>
-           <width>0</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="sizeIncrement" >
-          <size>
-           <width>1</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="focusPolicy" >
-          <enum>Qt::StrongFocus</enum>
-         </property>
-         <property name="acceptDrops" >
-          <bool>false</bool>
-         </property>
-         <property name="toolTip" >
-          <string comment="Console Window" />
-         </property>
-         <property name="statusTip" >
-          <string comment="Console Window" />
-         </property>
-         <property name="whatsThis" >
-          <string comment="Console Window" />
-         </property>
-         <property name="horizontalScrollBarPolicy" >
-          <enum>Qt::ScrollBarAsNeeded</enum>
-         </property>
-         <property name="autoFormatting" >
-          <set>QTextEdit::AutoNone</set>
-         </property>
-         <property name="tabChangesFocus" >
-          <bool>false</bool>
-         </property>
-         <property name="documentTitle" >
-          <string comment="Console Window" />
-         </property>
-         <property name="lineWrapMode" >
-          <enum>QTextEdit::NoWrap</enum>
-         </property>
-         <property name="readOnly" >
-          <bool>true</bool>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </widget>
     </widget>
    </item>
   </layout>
index 0ffd4f1344237b7b340707b2a19e033fd88ece13..d8e8cc34bc387f268cfbbf6e1e3aa710be3f86ce 100644 (file)
  */ 
 
 #include "bat.h"
+#include "medialist/medialist.h"
 
 MainWin::MainWin(QWidget *parent) : QMainWindow(parent)
 {
 
    mainWin = this;
    setupUi(this);                     /* Setup UI defined by main.ui (designer) */
+   treeWidget->clear();
+   treeWidget->setColumnCount(1);
+   treeWidget->setHeaderLabel("Select Page");
 
-   createStackedWidgets();
+   m_pages = 0;
+   createPages();
 
    resetFocus();
 
@@ -56,8 +61,10 @@ MainWin::MainWin(QWidget *parent) : QMainWindow(parent)
    m_console->connect();
 }
 
-void MainWin::createStackedWidgets()
+void MainWin::createPages()
 {
+   DIRRES *dir;
+
    QTreeWidgetItem *item, *topItem;
    m_console = new Console(stackedWidget);
    stackedWidget->addWidget(m_console);
@@ -65,33 +72,56 @@ void MainWin::createStackedWidgets()
    bRestore *brestore = new bRestore(stackedWidget);
    stackedWidget->addWidget(brestore);
 
+   m_medialist = new MediaList(stackedWidget);
+   stackedWidget->addWidget(m_medialist);
+
    /* Just take the first Director */
    LockRes();
-   DIRRES *dir = (DIRRES *)GetNextRes(R_DIRECTOR, NULL);
+   dir = (DIRRES *)GetNextRes(R_DIRECTOR, NULL);
    m_console->setDirRes(dir);
    UnlockRes();
 
-   /* ***FIXME*** Dummy setup of treeWidget */
-   treeWidget->clear();
-   treeWidget->setColumnCount(1);
-   treeWidget->setHeaderLabel("Selection");
-   topItem = new QTreeWidgetItem(treeWidget);
-   topItem->setText(0, dir->name());
+   topItem = createTopPage(dir->name(), false);
    topItem->setIcon(0, QIcon(QString::fromUtf8("images/server.png")));
-   item = new QTreeWidgetItem(topItem);
+
+   item = createPage("Console", topItem, true);
    m_console->setTreeItem(item);
-   item->setText(0, "Console");
-   item->setText(1, "0");
    QBrush redBrush(Qt::red);
    item->setForeground(0, redBrush);
-   item = new QTreeWidgetItem(topItem);
-   item->setText(0, "brestore");
-   item->setText(1, "1");
+
+   item = createPage("brestore", topItem, true);
+   item = createPage("MediaList", topItem, true);
+
    treeWidget->expandItem(topItem);
 
    stackedWidget->setCurrentIndex(0);
 }
 
+QTreeWidgetItem *MainWin::createTopPage(char *name, bool canDisplay)
+{
+   QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget);
+   item->setText(0, name);
+   if (canDisplay) {
+      item->setData(0, Qt::UserRole, QVariant(m_pages++));
+   } else {
+      item->setData(0, Qt::UserRole, QVariant(-1));
+   }
+   return item;
+}
+
+QTreeWidgetItem *MainWin::createPage(char *name, QTreeWidgetItem *parent, bool canDisplay)
+{
+   QTreeWidgetItem *item = new QTreeWidgetItem(parent);
+   item->setText(0, name);
+   if (canDisplay) {
+      item->setData(0, Qt::UserRole, QVariant(m_pages++));
+   } else {
+      item->setData(0, Qt::UserRole, QVariant(-1));
+   }
+   return item;
+}
+
+
 /*
  * Handle up and down arrow keys for the command line
  *  history.
@@ -185,9 +215,8 @@ void MainWin::readSettings()
 
 void MainWin::treeItemClicked(QTreeWidgetItem *item, int column)
 {
-   (void)column;
-   int index = item->text(1).toInt();
-   if (index >= 0 && index < 4) {
+   int index = item->data(column, Qt::UserRole).toInt();
+   if (index >= 0) {
       stackedWidget->setCurrentIndex(index);
    }
 }
@@ -196,11 +225,12 @@ void MainWin::treeItemClicked(QTreeWidgetItem *item, int column)
  */
 void MainWin::treeItemDoubleClicked(QTreeWidgetItem *item, int column)
 {
-   (void)column;
-   int index = item->text(1).toInt();
-   /* ***FIXME**** make this automatic */
-   if (index >= 0 && index < 4) {
+   int index = item->data(column, Qt::UserRole).toInt();
+   if (index >= 0) {
       stackedWidget->setCurrentIndex(index);
+      if( index == 2 ){
+         m_medialist->DoDisplay(m_console);
+      }
    }
 }
 
index 8001e9329f4ebddd3243aa00797590cfd701be99..371f36a738345175599bdcbed86a343b2378c7ec 100644 (file)
@@ -42,6 +42,7 @@
 #include "label/label.h"
 #include "run/run.h"
 #include "restore/restore.h"
+#include "medialist/medialist.h"
 
 class Console;
 
@@ -74,13 +75,17 @@ protected:
 
 private:
    void createConnections(); 
-   void createStackedWidgets();
+   void createPages();
+   QTreeWidgetItem *createTopPage(char *name, bool canDisplay);
+   QTreeWidgetItem *createPage(char *name, QTreeWidgetItem *parent, bool canDisplay);
 
 private:
    QString m_UserInput;
    Console *m_console;
+   MediaList *m_medialist;
    QStringList m_cmd_history;
    int m_cmd_last;
+   int m_pages;
 };
 
 #endif /* _MAINWIN_H_ */
diff --git a/bacula/src/qt-console/medialist/medialist.cpp b/bacula/src/qt-console/medialist/medialist.cpp
new file mode 100644 (file)
index 0000000..6b11552
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+   Bacula® - The Network Backup Solution
+
+   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+
+   The main author of Bacula is Kern Sibbald, with contributions from
+   many others, a complete list can be found in the file AUTHORS.
+   This program is Free Software; you can redistribute it and/or
+   modify it under the terms of version two of the GNU General Public
+   License as published by the Free Software Foundation plus additions
+   that are listed in the file LICENSE.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Bacula® is a registered trademark of John Walker.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+   Switzerland, email:ftf@fsfeurope.org.
+*/
+/*
+ *   Version $Id: medialist.cpp 4230 2007-02-21 20:07:37Z kerns $
+ *
+ *  MediaList Class
+ *
+ *   Kern Sibbald, January MMVI
+ *
+ */ 
+
+#include <QAbstractEventDispatcher>
+#include "bat.h"
+#include "medialist.h"
+
+MediaList::MediaList(QStackedWidget *parent)
+{
+   setupUi(this);
+   parent->addWidget(this);
+   poollist = new QStringList();
+
+   m_treeWidget = treeWidget;   /* our medialist screen */
+}
+
+void MediaList::DoDisplay(Console *console)
+{
+   int stat;
+   QTreeWidgetItem *mediatreeitem, *treeitem, *topItem;
+
+   m_console = console;
+
+   m_treeWidget->clear();
+   m_treeWidget->setColumnCount(3);
+   topItem = new QTreeWidgetItem(m_treeWidget);
+   topItem->setText(0, "Pools");
+
+   /* Start with a list of pools */
+   poollist->clear();
+   QString *scmd = new QString(".pools\n");
+   m_console->write_dir(scmd->toUtf8().data());
+   while ((stat=m_console->read()) > 0) {
+      poollist->append(m_console->msg());
+   }
+   for ( QStringList::Iterator poolitem = poollist->begin(); poolitem != poollist->end(); ++poolitem ) {
+      treeitem = new QTreeWidgetItem(topItem);
+      m_console->setTreeItem(treeitem);
+      poolitem->replace(QRegExp("\n"), "");
+      treeitem->setText(0, poolitem->toUtf8().data());
+
+      /* iterate through the media in the pool */
+      QString *mcmd = new QString("sqlquery\n");
+      m_console->write_dir(mcmd->toUtf8().data());
+      while ((stat=m_console->read()) > 0) { }
+      QString *mcmd2 = new QString("select m.volumename, m.mediaid, m.mediatype from media m, pool p where p.name = '");
+      mcmd2->append(*poolitem);
+      mcmd2->append("';\n");
+      m_console->write_dir(mcmd2->toUtf8().data());
+      QString *mediaread = new QString();
+      while ((stat=m_console->read()) > 0) {
+        *mediaread += m_console->msg();
+      }
+      QStringList sqllinelist = mediaread->split("\n");
+      QRegExp regex("^\\|.*\\|$");
+      int recordcnter=0;
+      QStringList *headerlist = new QStringList();
+      /* Iterate through lines retuned */
+      for ( QStringList::Iterator mediareadline = sqllinelist.begin(); mediareadline != sqllinelist.end(); ++mediareadline ) {
+        if ( regex.indexIn(*mediareadline) >= 0 ){
+           QStringList recorditemlist = mediareadline->split("|");
+           int recorditemcnter=0;
+           /* Iterate through items in the record */
+           for ( QStringList::Iterator mediarecorditem = recorditemlist.begin(); mediarecorditem != recorditemlist.end(); ++mediarecorditem ) {
+              QString trimmeditem = mediarecorditem->trimmed();
+              if( trimmeditem != "" ){
+                 if ( recordcnter == 0 ){
+                    headerlist->append(trimmeditem);
+                 } else {
+                    if ( recorditemcnter == 0 ){
+                       mediatreeitem = new QTreeWidgetItem(treeitem);
+                    }
+                    mediatreeitem->setText(recorditemcnter, trimmeditem.toUtf8().data());
+                 }
+                 recorditemcnter+=1;
+              }
+           }
+           recordcnter+=1;
+        }
+      }
+      m_treeWidget->setHeaderLabels(*headerlist);
+   }
+}
diff --git a/bacula/src/qt-console/medialist/medialist.h b/bacula/src/qt-console/medialist/medialist.h
new file mode 100644 (file)
index 0000000..cc11e9f
--- /dev/null
@@ -0,0 +1,57 @@
+#ifndef _MEDIALIST_H_
+#define _MEDIALIST_H_
+/*
+   Bacula® - The Network Backup Solution
+
+   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+
+   The main author of Bacula is Kern Sibbald, with contributions from
+   many others, a complete list can be found in the file AUTHORS.
+   This program is Free Software; you can redistribute it and/or
+   modify it under the terms of version two of the GNU General Public
+   License as published by the Free Software Foundation plus additions
+   that are listed in the file LICENSE.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Bacula® is a registered trademark of John Walker.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+   Switzerland, email:ftf@fsfeurope.org.
+*/
+/*
+ *   Version $Id: medialist.h 4230 2007-02-21 20:07:37Z kerns $
+ *
+ *   Kern Sibbald, January 2007
+ */
+
+#include <QtGui>
+#include "ui_medialist.h"
+#include "console.h"
+#include <qstringlist.h>
+
+class MediaList : public QWidget, public Ui::MediaListForm
+{
+   Q_OBJECT 
+
+public:
+   MediaList(QStackedWidget *parent);
+   void DoDisplay(Console *console);
+
+public slots:
+
+private:
+   Console *m_console;
+   QTreeWidget *m_treeWidget;
+   QStringList *poollist;
+};
+
+#endif /* _MEDIALIST_H_ */
diff --git a/bacula/src/qt-console/medialist/medialist.ui b/bacula/src/qt-console/medialist/medialist.ui
new file mode 100644 (file)
index 0000000..e5ca563
--- /dev/null
@@ -0,0 +1,29 @@
+<ui version="4.0" >
+ <class>MediaListForm</class>
+ <widget class="QWidget" name="MediaListForm" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>636</width>
+    <height>357</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Console</string>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QTreeWidget" name="treeWidget" />
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
index 5c8b55b7f6908f0322f4dde15545c03f4379cd79..c61d75b97f04b4999bf0519900cda0b05235e986 100644 (file)
   <property name="windowTitle" >
    <string>brestore</string>
   </property>
-  <widget class="QWidget" name="" >
-   <layout class="QHBoxLayout" >
-    <property name="margin" >
-     <number>0</number>
-    </property>
-    <property name="spacing" >
-     <number>6</number>
-    </property>
-    <item>
-     <widget class="QComboBox" name="ClientList" />
-    </item>
-    <item>
-     <widget class="QComboBox" name="JobList" >
-      <property name="enabled" >
-       <bool>false</bool>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <spacer>
-      <property name="orientation" >
-       <enum>Qt::Horizontal</enum>
-      </property>
-      <property name="sizeType" >
-       <enum>QSizePolicy::Expanding</enum>
-      </property>
-      <property name="sizeHint" >
-       <size>
-        <width>40</width>
-        <height>20</height>
-       </size>
-      </property>
-     </spacer>
-    </item>
-    <item>
-     <widget class="QPushButton" name="pushButton_4" >
-      <property name="text" >
-       <string>Location</string>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <widget class="QLineEdit" name="lineEdit" />
-    </item>
-   </layout>
-  </widget>
-  <widget class="QSplitter" name="splitter_2" >
-   <property name="geometry" >
-    <rect>
-     <x>19</x>
-     <y>58</y>
-     <width>920</width>
-     <height>478</height>
-    </rect>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>9</number>
    </property>
-   <property name="orientation" >
-    <enum>Qt::Vertical</enum>
+   <property name="spacing" >
+    <number>6</number>
    </property>
-   <widget class="QSplitter" name="splitter" >
-    <property name="orientation" >
-     <enum>Qt::Horizontal</enum>
-    </property>
-    <widget class="QGroupBox" name="groupBox" >
-     <property name="sizePolicy" >
-      <sizepolicy>
-       <hsizetype>7</hsizetype>
-       <vsizetype>7</vsizetype>
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
+   <item row="1" column="0" >
+    <widget class="QSplitter" name="splitter_2" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
      </property>
-     <property name="title" >
-      <string>File list</string>
-     </property>
-     <layout class="QVBoxLayout" >
-      <property name="margin" >
-       <number>9</number>
-      </property>
-      <property name="spacing" >
-       <number>6</number>
+     <widget class="QSplitter" name="splitter" >
+      <property name="orientation" >
+       <enum>Qt::Horizontal</enum>
       </property>
-      <item>
-       <widget class="QTableWidget" name="FileList" >
-        <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>7</hsizetype>
-          <vsizetype>7</vsizetype>
-          <horstretch>5</horstretch>
-          <verstretch>5</verstretch>
-         </sizepolicy>
+      <widget class="QGroupBox" name="groupBox" >
+       <property name="sizePolicy" >
+        <sizepolicy>
+         <hsizetype>7</hsizetype>
+         <vsizetype>7</vsizetype>
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="title" >
+        <string>File list</string>
+       </property>
+       <layout class="QVBoxLayout" >
+        <property name="margin" >
+         <number>9</number>
         </property>
-        <column>
-         <property name="text" >
-          <string>Type</string>
-         </property>
-        </column>
-        <column>
-         <property name="text" >
-          <string>File Name</string>
-         </property>
-        </column>
-        <column>
-         <property name="text" >
-          <string>Size</string>
-         </property>
-        </column>
-        <column>
-         <property name="text" >
-          <string>Date</string>
-         </property>
-        </column>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-    <widget class="QGroupBox" name="groupBox_2" >
-     <property name="sizePolicy" >
-      <sizepolicy>
-       <hsizetype>7</hsizetype>
-       <vsizetype>7</vsizetype>
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="title" >
-      <string>File revisions</string>
-     </property>
-     <layout class="QVBoxLayout" >
-      <property name="margin" >
-       <number>9</number>
-      </property>
-      <property name="spacing" >
-       <number>6</number>
-      </property>
-      <item>
-       <widget class="QTableWidget" name="FileRevisions" >
-        <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>7</hsizetype>
-          <vsizetype>7</vsizetype>
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
+        <property name="spacing" >
+         <number>6</number>
         </property>
-        <column>
-         <property name="text" >
-          <string>InChanger</string>
-         </property>
-        </column>
-        <column>
-         <property name="text" >
-          <string>Volume</string>
-         </property>
-        </column>
-        <column>
-         <property name="text" >
-          <string>JobId</string>
-         </property>
-        </column>
-        <column>
-         <property name="text" >
-          <string>Size</string>
-         </property>
-        </column>
-        <column>
-         <property name="text" >
-          <string>Date</string>
-         </property>
-        </column>
-        <column>
-         <property name="text" >
-          <string>Chksum</string>
-         </property>
-        </column>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </widget>
-   <widget class="QWidget" name="layoutWidget_2" >
-    <layout class="QVBoxLayout" >
-     <property name="margin" >
-      <number>0</number>
-     </property>
-     <property name="spacing" >
-      <number>6</number>
-     </property>
-     <item>
-      <layout class="QHBoxLayout" >
+        <item>
+         <widget class="QTableWidget" name="FileList" >
+          <property name="sizePolicy" >
+           <sizepolicy>
+            <hsizetype>7</hsizetype>
+            <vsizetype>7</vsizetype>
+            <horstretch>5</horstretch>
+            <verstretch>5</verstretch>
+           </sizepolicy>
+          </property>
+          <column>
+           <property name="text" >
+            <string>Type</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>File Name</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>Size</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>Date</string>
+           </property>
+          </column>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QGroupBox" name="groupBox_2" >
+       <property name="sizePolicy" >
+        <sizepolicy>
+         <hsizetype>7</hsizetype>
+         <vsizetype>7</vsizetype>
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="title" >
+        <string>File revisions</string>
+       </property>
+       <layout class="QVBoxLayout" >
+        <property name="margin" >
+         <number>9</number>
+        </property>
+        <property name="spacing" >
+         <number>6</number>
+        </property>
+        <item>
+         <widget class="QTableWidget" name="FileRevisions" >
+          <property name="sizePolicy" >
+           <sizepolicy>
+            <hsizetype>7</hsizetype>
+            <vsizetype>7</vsizetype>
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <column>
+           <property name="text" >
+            <string>InChanger</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>Volume</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>JobId</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>Size</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>Date</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>Chksum</string>
+           </property>
+          </column>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+     </widget>
+     <widget class="QWidget" name="layoutWidget_2" >
+      <layout class="QVBoxLayout" >
        <property name="margin" >
         <number>0</number>
        </property>
         <number>6</number>
        </property>
        <item>
-        <widget class="QLabel" name="label" >
-         <property name="text" >
-          <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+        <layout class="QHBoxLayout" >
+         <property name="margin" >
+          <number>0</number>
+         </property>
+         <property name="spacing" >
+          <number>6</number>
+         </property>
+         <item>
+          <widget class="QLabel" name="label" >
+           <property name="text" >
+            <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
 p, li { white-space: pre-wrap; }
 &lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
 &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Restore items list&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <spacer>
-         <property name="orientation" >
-          <enum>Qt::Horizontal</enum>
-         </property>
-         <property name="sizeHint" >
-          <size>
-           <width>40</width>
-           <height>20</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-       <item>
-        <widget class="QPushButton" name="pushButton" >
-         <property name="text" >
-          <string>Clear</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QPushButton" name="pushButton_2" >
-         <property name="text" >
-          <string>Estimate</string>
-         </property>
-        </widget>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer>
+           <property name="orientation" >
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" >
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QPushButton" name="pushButton" >
+           <property name="text" >
+            <string>Clear</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="pushButton_2" >
+           <property name="text" >
+            <string>Estimate</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="pushButton_3" >
+           <property name="text" >
+            <string>Restore</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
        </item>
        <item>
-        <widget class="QPushButton" name="pushButton_3" >
-         <property name="text" >
-          <string>Restore</string>
+        <widget class="QTableWidget" name="RestoreList" >
+         <property name="acceptDrops" >
+          <bool>true</bool>
          </property>
+         <column>
+          <property name="text" >
+           <string>Type</string>
+          </property>
+         </column>
+         <column>
+          <property name="text" >
+           <string>FileName</string>
+          </property>
+         </column>
+         <column>
+          <property name="text" >
+           <string>JobId</string>
+          </property>
+         </column>
+         <column>
+          <property name="text" >
+           <string>FileIndex</string>
+          </property>
+         </column>
+         <column>
+          <property name="text" >
+           <string>Nb Files</string>
+          </property>
+         </column>
+         <column>
+          <property name="text" >
+           <string>Size</string>
+          </property>
+         </column>
         </widget>
        </item>
       </layout>
+     </widget>
+    </widget>
+   </item>
+   <item row="0" column="0" >
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QComboBox" name="ClientList" />
      </item>
      <item>
-      <widget class="QTableWidget" name="RestoreList" >
-       <property name="acceptDrops" >
-        <bool>true</bool>
+      <widget class="QComboBox" name="JobList" >
+       <property name="enabled" >
+        <bool>false</bool>
        </property>
-       <column>
-        <property name="text" >
-         <string>Type</string>
-        </property>
-       </column>
-       <column>
-        <property name="text" >
-         <string>FileName</string>
-        </property>
-       </column>
-       <column>
-        <property name="text" >
-         <string>JobId</string>
-        </property>
-       </column>
-       <column>
-        <property name="text" >
-         <string>FileIndex</string>
-        </property>
-       </column>
-       <column>
-        <property name="text" >
-         <string>Nb Files</string>
-        </property>
-       </column>
-       <column>
-        <property name="text" >
-         <string>Size</string>
-        </property>
-       </column>
       </widget>
      </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType" >
+        <enum>QSizePolicy::Expanding</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton_4" >
+       <property name="text" >
+        <string>Location</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="lineEdit" />
+     </item>
     </layout>
-   </widget>
-  </widget>
+   </item>
+  </layout>
  </widget>
  <resources/>
  <connections/>
index 38405209147f6d8cb251e443a30edc4a0d72fd9b..367951ecb4d716ffddc68765c74fa8c7af78b38d 100644 (file)
@@ -162,6 +162,7 @@ Device {
 #Device {
 #  Name = "DVD-Writer"
 #  Media Type = DVD
+#  Device Type = DVD
 #  Archive Device = /dev/hdc
 #  LabelMedia = yes;                   # lets Bacula label unlabeled media
 #  Random Access = Yes;
index b121031ab24c1997365fb92e5b1b2c201d9880cf..4c373577352fe68f7b2ea59b6aad895c407f0484 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "2.1.5"
-#define BDATE   "10 March 2007"
-#define LSMDATE "10Mar07"
+#define BDATE   "16 March 2007"
+#define LSMDATE "16Mar07"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2007"       /* year for copyright messages in progs */