]> git.sur5r.net Git - bacula/bacula/commitdiff
Tweak tray-monitor + alphabetize bat pane selection
authorKern Sibbald <kern@sibbald.com>
Sun, 20 May 2007 19:59:51 +0000 (19:59 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 20 May 2007 19:59:51 +0000 (19:59 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4861 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/mainwin.cpp
bacula/src/tray-monitor/tray_conf.c
bacula/src/tray-monitor/tray_conf.h

index e6e33be1469f171fc84142a072cf181de30b1846..ed1985140710def990339e9348de716db9559b85 100644 (file)
@@ -97,7 +97,7 @@ void MainWin::createPages()
       /* The top tree item representing the director */
       topItem = createTopPage(dir->name());
       topItem->setIcon(0, QIcon(":images/server.png"));
-      /* Set background to grey for ease of identification of inactive dirfector */
+      /* Set background to grey for ease of identification of inactive Director */
       QBrush greyBrush(Qt::lightGray);
       topItem->setBackground(0, greyBrush);
       m_currentConsole->setDirectorTreeItem(topItem);
@@ -117,15 +117,17 @@ void MainWin::createPages()
       item->setForeground(0, redBrush);
       m_currentConsole->dockPage();
 
-      /* create instances of the rest of the classes that will by default exist
-      * under each director */
+      /*
+       * Create instances in alphabetic order of the rest 
+       *  of the classes that will by default exist under each Director.  
+       */
 //    createPagebRestore();
-      createPageMediaList();
+      createPageClients();
+      createPageFileSet();
       QString emptymedia(""), emptyclient("");
       createPageJobList(emptymedia, emptyclient, NULL);
-      createPageClients();
+      createPageMediaList();
       createPageStorage();
-      createPageFileSet();
 
       treeWidget->expandItem(topItem);
       stackedWidget->setCurrentWidget(m_currentConsole);
index 12789c89297c9b2909c707010f1d215877c967c7..00022980bf46d760b41be1bcfef63f2da8ff0fbd 100644 (file)
@@ -1,30 +1,7 @@
-/*
-*   Main configuration file parser for Bacula Tray Monitor.
-*
-*   Adapted from dird_conf.c
-*
-*   Note, the configuration file parser consists of three parts
-*
-*   1. The generic lexical scanner in lib/lex.c and lib/lex.h
-*
-*   2. The generic config  scanner in lib/parse_config.c and
-*       lib/parse_config.h.
-*       These files contain the parser code, some utility
-*       routines, and the common store routines (name, int,
-*       string).
-*
-*   3. The daemon specific file, which contains the Resource
-*       definitions as well as any specific store routines
-*       for the resource records.
-*
-*     Nicolas Boichat, August MMIV
-*
-*     Version $Id$
-*/
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2004-2006 Free Software Foundation Europe e.V.
+   Copyright (C) 2004-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.
 */
+/*
+*   Main configuration file parser for Bacula Tray Monitor.
+*
+*   Adapted from dird_conf.c
+*
+*   Note, the configuration file parser consists of three parts
+*
+*   1. The generic lexical scanner in lib/lex.c and lib/lex.h
+*
+*   2. The generic config  scanner in lib/parse_config.c and
+*       lib/parse_config.h.
+*       These files contain the parser code, some utility
+*       routines, and the common store routines (name, int,
+*       string).
+*
+*   3. The daemon specific file, which contains the Resource
+*       definitions as well as any specific store routines
+*       for the resource records.
+*
+*     Nicolas Boichat, August MMIV
+*
+*     Version $Id$
+*/
 
 #include "bacula.h"
 #include "tray_conf.h"
@@ -174,10 +174,10 @@ void dump_resource(int type, RES *reshdr, void sendit(void *sock, const char *fm
    }
    switch (type) {
    case R_MONITOR:
-      sendit(sock, _("Monitor: name=%s FDtimeout=%s SDtimeout=%s\n"),
-   reshdr->name,
-   edit_uint64(res->res_monitor.FDConnectTimeout, ed1),
-   edit_uint64(res->res_monitor.SDConnectTimeout, ed2));
+      sendit(sock, _("Monitor: name=%s FDtimeout=%s SDtimeout=%s\n"), 
+             reshdr->name,
+             edit_uint64(res->res_monitor.FDConnectTimeout, ed1),
+             edit_uint64(res->res_monitor.SDConnectTimeout, ed2));
       break;
    case R_DIRECTOR:
       sendit(sock, _("Director: name=%s address=%s FDport=%d\n"),
@@ -234,18 +234,18 @@ void free_resource(RES *sres, int type)
       break;
    case R_CLIENT:
       if (res->res_client.address) {
-   free(res->res_client.address);
+         free(res->res_client.address);
       }
       if (res->res_client.password) {
-   free(res->res_client.password);
+         free(res->res_client.password);
       }
       break;
    case R_STORAGE:
       if (res->res_store.address) {
-   free(res->res_store.address);
+         free(res->res_store.address);
       }
       if (res->res_store.password) {
-   free(res->res_store.password);
+         free(res->res_store.password);
       }
       break;
    case R_CONSOLE_FONT:
@@ -256,6 +256,7 @@ void free_resource(RES *sres, int type)
    default:
       printf(_("Unknown resource type %d in free_resource.\n"), type);
    }
+
    /* Common stuff again -- free the resource, recurse to next one */
    if (res) {
       free(res);
index 9679fbafaecce19ba500a0fa737ba036d43ab714..b72040da2c6d84f758d12464fa43788c4a2c290c 100644 (file)
@@ -1,16 +1,7 @@
-/*
- * Tray Monitor specific configuration and defines
- *
- *   Adapted from dird_conf.c
- *
- *     Nicolas Boichat, August MMIV
- *
- *    Version $Id$
- */
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2004-2006 Free Software Foundation Europe e.V.
+   Copyright (C) 2004-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.
 */
+/*
+ * Tray Monitor specific configuration and defines
+ *
+ *   Adapted from dird_conf.c
+ *
+ *     Nicolas Boichat, August MMIV
+ *
+ *    Version $Id$
+ */
 
 /* NOTE:  #includes at the end of this file */