From: Kern Sibbald Date: Sun, 20 May 2007 19:59:51 +0000 (+0000) Subject: Tweak tray-monitor + alphabetize bat pane selection X-Git-Tag: Release-2.2.0~433 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=30c6f43a57871accf2caafa2e08a2f282718b851;p=bacula%2Fbacula Tweak tray-monitor + alphabetize bat pane selection git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4861 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index e6e33be146..ed19851407 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -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); diff --git a/bacula/src/tray-monitor/tray_conf.c b/bacula/src/tray-monitor/tray_conf.c index 12789c8929..00022980bf 100644 --- a/bacula/src/tray-monitor/tray_conf.c +++ b/bacula/src/tray-monitor/tray_conf.c @@ -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. @@ -48,6 +25,29 @@ (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); diff --git a/bacula/src/tray-monitor/tray_conf.h b/bacula/src/tray-monitor/tray_conf.h index 9679fbafae..b72040da2c 100644 --- a/bacula/src/tray-monitor/tray_conf.h +++ b/bacula/src/tray-monitor/tray_conf.h @@ -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. @@ -34,6 +25,15 @@ (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 */