X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fwx-console%2Fwxbconfigpanel.cpp;h=1f57dde6ae1689cd71739436c2b65fece93a2b70;hb=3227fb78cccb8cf93511f0ee55a21aff8f372ab9;hp=1cfca94661d81dd16d0fc74edbeae8c034019094;hpb=095ae896b3fa96e6c8db2105519552b785e6b005;p=bacula%2Fbacula diff --git a/bacula/src/wx-console/wxbconfigpanel.cpp b/bacula/src/wx-console/wxbconfigpanel.cpp index 1cfca94661..1f57dde6ae 100644 --- a/bacula/src/wx-console/wxbconfigpanel.cpp +++ b/bacula/src/wx-console/wxbconfigpanel.cpp @@ -1,15 +1,7 @@ -/* - * - * Config panel, used to specify parameters (for example clients, filesets... in restore) - * - * Nicolas Boichat, April 2004 - * - * Version $Id$ - */ /* Bacula® - The Network Backup Solution - Copyright (C) 2004-2006 Free Software Foundation Europe e.V. + Copyright (C) 2004-2008 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. @@ -28,11 +20,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Bacula® is a registered trademark of John Walker. + Bacula® is a registered trademark of Kern Sibbald. The licensor of Bacula is the Free Software Foundation Europe (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, Switzerland, email:ftf@fsfeurope.org. */ +/* + * + * Config panel, used to specify parameters (for example clients, filesets... in restore) + * + * Nicolas Boichat, April 2004 + * + * Version $Id$ + */ /* Windows debug builds set _DEBUG which is used by wxWidgets to select their * debug memory allocator. Unfortunately it conflicts with Bacula's SmartAlloc. @@ -159,6 +159,14 @@ int wxbConfigParam::GetIndex() { return -1; } +int wxbConfigParam::GetCount() { + if (choicectrl) { + return choicectrl->GetCount(); + } + return -1; +} + + void wxbConfigParam::SetIndex(int ind) { if (choicectrl) { choicectrl->SetSelection(ind); @@ -289,6 +297,16 @@ int wxbConfigPanel::FindRow(const wxChar* title) { return -1; } +int wxbConfigPanel::GetRowCount(const wxChar* title) +{ + int i; + if ((i = FindRow(title)) > -1) { + return (*config)[i].GetCount(); + } + + return -1; +} + void wxbConfigPanel::EnableApply(bool enable) { cfgOk->Enable(!enable); if (cfgApply) cfgApply->Enable(enable);