Update of /cvsroot/bacula/bacula/src/wx-console In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20830/src/wx-console Modified Files: console_conf.c console_conf.h console_thread.cpp csprint.h main.cpp wxbconfigfileeditor.cpp wxbconfigfileeditor.h wxbconfigpanel.cpp wxbconfigpanel.h wxbhistorytextctrl.cpp wxbhistorytextctrl.h wxblistctrl.cpp wxblistctrl.h wxbmainframe.cpp wxbmainframe.h wxbrestorepanel.cpp wxbrestorepanel.h wxbtableparser.cpp wxbtableparser.h wxbtreectrl.cpp wxbtreectrl.h wxbutils.cpp wxbutils.h Log Message: kes wx-console crashes because of differences between Bacula and wxWidgets malloc()/free(). Tweek wx-console to use bmalloc()/bfree() for Bacula calls. kes correct improper indenting in wx-console/console_conf.c kes update wx-console header copyrights kes Fix bug #658 where wx-console mangles file/directory names containing commas. Index: main.cpp =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/main.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- main.cpp 1 Aug 2006 08:20:29 -0000 1.20 +++ main.cpp 25 Aug 2006 12:35:45 -0000 1.21 @@ -38,11 +38,10 @@ #include <wx/wxprec.h> #include <wx/config.h> #include <wx/intl.h> - #include "wxbmainframe.h" - #include "csprint.h" + /* Dummy functions */ int generate_daemon_event(JCR *jcr, const char *event) { return 1; } int generate_job_event(JCR *jcr, const char *event) { return 1; } Index: wxbmainframe.h =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbmainframe.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- wxbmainframe.h 21 Dec 2004 16:19:00 -0000 1.16 +++ wxbmainframe.h 25 Aug 2006 12:35:45 -0000 1.17 @@ -7,21 +7,18 @@ * Version $Id$ */ /* - Copyright (C) 2004 Kern Sibbald and John Walker + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + version 2 as amended with additional clauses defined in the + file LICENSE in the main source directory. 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. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + the file LICENSE for additional 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef WXBMAINFRAME_H @@ -62,13 +59,13 @@ wxString str; int status; wxbPrintObject(wxString str, int status): wxObject() { - this->str = str; - this->status = status; + this->str = str; + this->status = status; } wxbPrintObject(const wxbPrintObject& pe) { - this->str = pe.str; - this->status = pe.status; + this->str = pe.str; + this->status = pe.status; } }; Index: wxblistctrl.cpp =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxblistctrl.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- wxblistctrl.cpp 3 Jul 2006 07:51:06 -0000 1.8 +++ wxblistctrl.cpp 25 Aug 2006 12:35:45 -0000 1.9 @@ -8,7 +8,7 @@ * Version $Id$ */ /* - Copyright (C) 2004-2005 Kern Sibbald + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -25,7 +25,6 @@ #include "bacula.h" #include "wxblistctrl.h" - #include "csprint.h" #include "wxbmainframe.h" Index: wxblistctrl.h =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxblistctrl.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- wxblistctrl.h 21 Dec 2004 16:19:00 -0000 1.4 +++ wxblistctrl.h 25 Aug 2006 12:35:45 -0000 1.5 @@ -8,21 +8,18 @@ * Version $Id$ */ /* - Copyright (C) 2004 Kern Sibbald and John Walker + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + version 2 as amended with additional clauses defined in the + file LICENSE in the main source directory. 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. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + the file LICENSE for additional 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef WXBLISTCTRL_H @@ -54,9 +51,9 @@ #define EVT_LIST_MARKED_EVENT(id, fn) \ DECLARE_EVENT_TABLE_ENTRY( \ - wxbLIST_MARKED_EVENT, id, wxID_ANY, \ - (wxObjectEventFunction)(wxEventFunction)(wxListMarkedEventFunction)&fn, \ - (wxObject *) NULL \ + wxbLIST_MARKED_EVENT, id, wxID_ANY, \ + (wxObjectEventFunction)(wxEventFunction)(wxListMarkedEventFunction)&fn, \ + (wxObject *) NULL \ ), /* Customized list, which transmit double clicks on images */ Index: csprint.h =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/csprint.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- csprint.h 18 Oct 2005 16:30:36 -0000 1.8 +++ csprint.h 25 Aug 2006 12:35:44 -0000 1.9 @@ -7,22 +7,17 @@ * Version $Id$ */ /* - Copyright (C) 2004 Kern Sibbald and John Walker + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. + modify it under the terms of the GNU General Public License + version 2 as amended with additional clauses defined in the + file LICENSE in the main source directory. 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., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + the file LICENSE for additional details. */ Index: console_conf.c =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/console_conf.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- console_conf.c 3 Jul 2006 07:51:06 -0000 1.19 +++ console_conf.c 25 Aug 2006 12:35:42 -0000 1.20 @@ -37,11 +37,13 @@ /* _("...") macro returns a wxChar*, so if we need a char*, we need to convert it with: * wxString(_("...")).mb_str(*wxConvCurrent) */ -#include "bacula.h" +#include "bacula.h" #include "console_conf.h" #include <wx/intl.h> + + /* Define the first and last resource ID record * types. Note, these should be unique for each * daemon though not a requirement. @@ -132,16 +134,16 @@ recurse = 0; } switch (type) { - case R_CONSOLE: - printf(wxString(_("Console: name=%s rcfile=%s histfile=%s\n")).mb_str(*wxConvCurrent), reshdr->name, - res->res_cons.rc_file, res->res_cons.hist_file); - break; - case R_DIRECTOR: - printf(wxString(_("Director: name=%s address=%s DIRport=%d\n")).mb_str(*wxConvCurrent), reshdr->name, - res->res_dir.address, res->res_dir.DIRport); - break; - default: - printf(wxString(_("Unknown resource type %d\n")).mb_str(*wxConvCurrent), type); + case R_CONSOLE: + printf(wxString(_("Console: name=%s rcfile=%s histfile=%s\n")).mb_str(*wxConvCurrent), reshdr->name, + res->res_cons.rc_file, res->res_cons.hist_file); + break; + case R_DIRECTOR: + printf(wxString(_("Director: name=%s address=%s DIRport=%d\n")).mb_str(*wxConvCurrent), reshdr->name, + res->res_dir.address, res->res_dir.DIRport); + break; + default: + printf(wxString(_("Unknown resource type %d\n")).mb_str(*wxConvCurrent), type); } if (recurse && res->res_dir.hdr.next) { dump_resource(type, res->res_dir.hdr.next, sendit, sock); @@ -166,60 +168,60 @@ /* common stuff -- free the resource name */ nres = (RES *)res->res_dir.hdr.next; if (res->res_dir.hdr.name) { - free(res->res_dir.hdr.name); + bfree(res->res_dir.hdr.name); } if (res->res_dir.hdr.desc) { - free(res->res_dir.hdr.desc); + bfree(res->res_dir.hdr.desc); } switch (type) { case R_CONSOLE: if (res->res_cons.rc_file) { - free(res->res_cons.rc_file); + bfree(res->res_cons.rc_file); } if (res->res_cons.hist_file) { - free(res->res_cons.hist_file); + bfree(res->res_cons.hist_file); } if (res->res_cons.tls_ctx) { free_tls_context(res->res_cons.tls_ctx); } if (res->res_cons.tls_ca_certfile) { - free(res->res_cons.tls_ca_certfile); + bfree(res->res_cons.tls_ca_certfile); } if (res->res_cons.tls_ca_certdir) { - free(res->res_cons.tls_ca_certdir); + bfree(res->res_cons.tls_ca_certdir); } if (res->res_cons.tls_certfile) { - free(res->res_cons.tls_certfile); + bfree(res->res_cons.tls_certfile); } if (res->res_cons.tls_keyfile) { - free(res->res_cons.tls_keyfile); + bfree(res->res_cons.tls_keyfile); } case R_DIRECTOR: if (res->res_dir.address) { - free(res->res_dir.address); + bfree(res->res_dir.address); } if (res->res_dir.tls_ctx) { free_tls_context(res->res_dir.tls_ctx); } if (res->res_dir.tls_ca_certfile) { - free(res->res_dir.tls_ca_certfile); + bfree(res->res_dir.tls_ca_certfile); } if (res->res_dir.tls_ca_certdir) { - free(res->res_dir.tls_ca_certdir); + bfree(res->res_dir.tls_ca_certdir); } if (res->res_dir.tls_certfile) { - free(res->res_dir.tls_certfile); + bfree(res->res_dir.tls_certfile); } if (res->res_dir.tls_keyfile) { - free(res->res_dir.tls_keyfile); + bfree(res->res_dir.tls_keyfile); } break; default: printf(wxString(_("Unknown resource type %d\n")).mb_str(*wxConvCurrent), type); } /* Common stuff again -- free the resource, recurse to next one */ - free(res); + bfree(res); if (nres) { free_resource(nres, type); } @@ -255,62 +257,62 @@ */ if (pass == 2) { switch (type) { - /* Resources not containing a resource */ - case R_CONSOLE: - case R_DIRECTOR: - break; + /* Resources not containing a resource */ + case R_CONSOLE: + case R_DIRECTOR: + break; - default: - Emsg1(M_ERROR, 0, wxString(_("Unknown resource type %d\n")).mb_str(*wxConvCurrent), type); - error = 1; - break; + default: + Emsg1(M_ERROR, 0, wxString(_("Unknown resource type %d\n")).mb_str(*wxConvCurrent), type); + error = 1; + break; } /* Note, the resoure name was already saved during pass 1, * so here, we can just release it. */ if (res_all.res_dir.hdr.name) { - free(res_all.res_dir.hdr.name); - res_all.res_dir.hdr.name = NULL; + bfree(res_all.res_dir.hdr.name); + res_all.res_dir.hdr.name = NULL; } if (res_all.res_dir.hdr.desc) { - free(res_all.res_dir.hdr.desc); - res_all.res_dir.hdr.desc = NULL; + bfree(res_all.res_dir.hdr.desc); + res_all.res_dir.hdr.desc = NULL; } return; } /* The following code is only executed during pass 1 */ switch (type) { - case R_CONSOLE: - size = sizeof(CONRES); - break; - case R_DIRECTOR: - size = sizeof(DIRRES); - break; - default: - printf(wxString(_("Unknown resource type %d\n")).mb_str(*wxConvCurrent), type); - error = 1; - size = 1; - break; + case R_CONSOLE: + size = sizeof(CONRES); + break; + case R_DIRECTOR: + size = sizeof(DIRRES); + break; + default: + printf(wxString(_("Unknown resource type %d\n")).mb_str(*wxConvCurrent), type); + error = 1; + size = 1; + break; } /* Common */ if (!error) { - res = (URES *)malloc(size); + res = (URES *)bmalloc(size); memcpy(res, &res_all, size); if (!res_head[rindex]) { - res_head[rindex] = (RES *)res; /* store first entry */ + res_head[rindex] = (RES *)res; /* store first entry */ } else { - RES *next; - for (next=res_head[rindex]; next->next; next=next->next) { - if (strcmp(next->name, res->res_dir.hdr.name) == 0) { - Emsg2(M_ERROR_TERM, 0, - wxString(_("Attempt to define second %s resource named \"%s\" is not permitted.\n")).mb_str(*wxConvCurrent), - resources[rindex].name, res->res_dir.hdr.name); - } - } - next->next = (RES *)res; - Dmsg2(90, "Inserting %s res: %s\n", res_to_str(type), - res->res_dir.hdr.name); + RES *next; + for (next=res_head[rindex]; next->next; next=next->next) { + if (strcmp(next->name, res->res_dir.hdr.name) == 0) { + Emsg2(M_ERROR_TERM, 0, + wxString(_("Attempt to define second %s resource named \"%s\" is not permitted.\n")).mb_str(*wxConvCurrent), + resources[rindex].name, res->res_dir.hdr.name); + } + } + next->next = (RES *)res; + Dmsg2(90, "Inserting %s res: %s\n", res_to_str(type), + res->res_dir.hdr.name); } } } Index: wxbutils.h =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbutils.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- wxbutils.h 5 May 2005 13:50:31 -0000 1.8 +++ wxbutils.h 25 Aug 2006 12:35:45 -0000 1.9 @@ -8,21 +8,18 @@ * Version $Id$ */ /* - Copyright (C) 2004 Kern Sibbald and John Walker + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + version 2 as amended with additional clauses defined in the + file LICENSE in the main source directory. 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. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + the file LICENSE for additional 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef WXBUTILS_H Index: wxbtreectrl.h =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbtreectrl.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- wxbtreectrl.h 27 Jul 2006 01:58:50 -0000 1.6 +++ wxbtreectrl.h 25 Aug 2006 12:35:45 -0000 1.7 @@ -8,21 +8,18 @@ * Version $Id$ */ /* - Copyright (C) 2004 Kern Sibbald and John Walker + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + version 2 as amended with additional clauses defined in the + file LICENSE in the main source directory. 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. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + the file LICENSE for additional 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef WXBTREECTRL_H @@ -57,9 +54,9 @@ #define EVT_TREE_MARKED_EVENT(id, fn) \ DECLARE_EVENT_TABLE_ENTRY( \ - wxbTREE_MARKED_EVENT, id, wxID_ANY, \ - (wxObjectEventFunction)(wxEventFunction)(wxTreeMarkedEventFunction)&fn, \ - (wxObject *) NULL \ + wxbTREE_MARKED_EVENT, id, wxID_ANY, \ + (wxObjectEventFunction)(wxEventFunction)(wxTreeMarkedEventFunction)&fn, \ + (wxObject *) NULL \ ), /* Customized tree, which transmit double clicks on images */ Index: wxbtableparser.h =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbtableparser.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- wxbtableparser.h 21 Dec 2004 16:19:00 -0000 1.7 +++ wxbtableparser.h 25 Aug 2006 12:35:45 -0000 1.8 @@ -14,21 +14,18 @@ * Version $Id$ */ /* - Copyright (C) 2004 Kern Sibbald and John Walker + Copyright (C) 2000-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + version 2 as amended with additional clauses defined in the + file LICENSE in the main source directory. 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. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + the file LICENSE for additional 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef WXBTABLEPARSER_H Index: wxbmainframe.cpp =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbmainframe.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- wxbmainframe.cpp 3 Jul 2006 07:51:06 -0000 1.53 +++ wxbmainframe.cpp 25 Aug 2006 12:35:45 -0000 1.54 @@ -7,7 +7,7 @@ * Version $Id$ */ /* - Copyright (C) 2004-2005 Kern Sibbald + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Index: wxbrestorepanel.h =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbrestorepanel.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- wxbrestorepanel.h 28 Oct 2005 07:40:04 -0000 1.23 +++ wxbrestorepanel.h 25 Aug 2006 12:35:45 -0000 1.24 @@ -7,7 +7,7 @@ * Version $Id$ */ /* - Copyright (C) 2004-2005 Kern Sibbald + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Index: console_thread.cpp =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/console_thread.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- console_thread.cpp 3 Jul 2006 07:51:06 -0000 1.43 +++ console_thread.cpp 25 Aug 2006 12:35:44 -0000 1.44 @@ -7,7 +7,7 @@ * Version $Id$ */ /* - Copyright (C) 2004-2005 Kern Sibbald + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -143,7 +143,8 @@ } } -void console_thread::InitLib() { +void console_thread::InitLib() +{ if (WSA_Init() != 0) { csprint(_("Error while initializing windows sockets...\n")); inited = false; @@ -157,7 +158,8 @@ inited = true; } -void console_thread::FreeLib() { +void console_thread::FreeLib() +{ if (inited) { if (WSACleanup() != 0) { csprint(_("Error while cleaning up windows sockets...\n")); @@ -194,7 +196,8 @@ errmsg << err; } -wxString console_thread::LoadConfig(wxString configfile) { +wxString console_thread::LoadConfig(wxString configfile) +{ if (!inited) { InitLib(); if (!inited) @@ -203,7 +206,7 @@ free_config_resources(); - MSGS* msgs = (MSGS *)malloc(sizeof(MSGS)); + MSGS* msgs = (MSGS *)bmalloc(sizeof(MSGS)); memset(msgs, 0, sizeof(MSGS)); for (int i=1; i<=M_MAX; i++) { #ifndef HAVE_WIN32 Index: wxbhistorytextctrl.h =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbhistorytextctrl.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- wxbhistorytextctrl.h 13 May 2005 14:38:17 -0000 1.6 +++ wxbhistorytextctrl.h 25 Aug 2006 12:35:45 -0000 1.7 @@ -7,21 +7,18 @@ * Version $Id$ */ /* - Copyright (C) 2004 Kern Sibbald and John Walker + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + version 2 as amended with additional clauses defined in the + file LICENSE in the main source directory. 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. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + the file LICENSE for additional 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef WXBHISTORYTEXTCTRL @@ -41,10 +38,10 @@ class wxbHistoryTextCtrl: public wxTextCtrl { public: wxbHistoryTextCtrl(wxStaticText* help, wxWindow* parent, wxWindowID id, - const wxString& value = wxT(""), const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr); + const wxString& value = wxT(""), const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTextCtrlNameStr); void HistoryAdd(wxString cmd); Index: wxbutils.cpp =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbutils.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- wxbutils.cpp 3 Jul 2006 07:51:06 -0000 1.18 +++ wxbutils.cpp 25 Aug 2006 12:35:45 -0000 1.19 @@ -7,7 +7,7 @@ * Version $Id$ */ /* - Copyright (C) 2004-2005 Kern Sibbald + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Index: wxbhistorytextctrl.cpp =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbhistorytextctrl.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- wxbhistorytextctrl.cpp 3 Jul 2006 07:51:06 -0000 1.11 +++ wxbhistorytextctrl.cpp 25 Aug 2006 12:35:45 -0000 1.12 @@ -7,7 +7,7 @@ * Version $Id$ */ /* - Copyright (C) 2004-2005 Kern Sibbald + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -22,7 +22,6 @@ */ #include "bacula.h" - #include "wxbhistorytextctrl.h" BEGIN_EVENT_TABLE(wxbHistoryTextCtrl, wxTextCtrl) Index: wxbconfigpanel.h =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbconfigpanel.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- wxbconfigpanel.h 13 May 2005 14:38:17 -0000 1.5 +++ wxbconfigpanel.h 25 Aug 2006 12:35:45 -0000 1.6 @@ -7,21 +7,18 @@ * Version $Id$ */ /* - Copyright (C) 2004 Kern Sibbald and John Walker + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + version 2 as amended with additional clauses defined in the + file LICENSE in the main source directory. 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. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + the file LICENSE for additional 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef WXBCONFIGPANEL_H @@ -82,8 +79,8 @@ class wxbConfigPanel : public wxPanel { public: /* Creates a new config panel, config must be allocated with new */ - wxbConfigPanel(wxWindow* parent, wxbConfig* config, wxString title, wxWindowID ok, wxWindowID cancel, wxWindowID apply = -1); - ~wxbConfigPanel(); + wxbConfigPanel(wxWindow* parent, wxbConfig* config, wxString title, wxWindowID ok, wxWindowID cancel, wxWindowID apply = -1); + ~wxbConfigPanel(); void SetRowString(const wxChar* title, wxString value); wxString GetRowString(const wxChar* title); Index: wxbrestorepanel.cpp =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbrestorepanel.cpp,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- wxbrestorepanel.cpp 3 Jul 2006 07:51:06 -0000 1.65 +++ wxbrestorepanel.cpp 25 Aug 2006 12:35:45 -0000 1.66 @@ -7,7 +7,7 @@ * Version $Id$ */ /* - Copyright (C) 2004-2005 Kern Sibbald + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -50,22 +50,15 @@ */ #include "bacula.h" - #include "wxbrestorepanel.h" - #include "wxbmainframe.h" - #include "csprint.h" - #include <wx/choice.h> #include <wx/datetime.h> - #include <wx/timer.h> - #include "unmarked.xpm" #include "marked.xpm" #include "partmarked.xpm" - #include <wx/listimpl.cpp> /* A macro named Yield is defined under MinGW */ @@ -196,7 +189,8 @@ /* * wxbRestorePanel constructor */ -wxbRestorePanel::wxbRestorePanel(wxWindow* parent): wxbPanel(parent) { +wxbRestorePanel::wxbRestorePanel(wxWindow* parent): wxbPanel(parent) +{ //pendingEvents = new wxbEventList(); //EVTQUEUE //processing = false; //EVTQUEUE SetWorking(false); @@ -374,7 +368,8 @@ /* * wxbRestorePanel destructor */ -wxbRestorePanel::~wxbRestorePanel() { +wxbRestorePanel::~wxbRestorePanel() +{ delete imagelist; } @@ -382,17 +377,18 @@ wxbPanel overloadings ----------------------------------------------------------------------------*/ -wxString wxbRestorePanel::GetTitle() { +wxString wxbRestorePanel::GetTitle() +{ return _("Restore"); } -void wxbRestorePanel::EnablePanel(bool enable) { +void wxbRestorePanel::EnablePanel(bool enable) +{ if (enable) { if (status == disabled) { SetStatus(activable); } - } - else { + } else { SetStatus(disabled); } } @@ -402,7 +398,8 @@ ----------------------------------------------------------------------------*/ /* The main button has been clicked */ -void wxbRestorePanel::CmdStart() { +void wxbRestorePanel::CmdStart() +{ unsigned int i; if (status == activable) { wxbMainFrame::GetInstance()->SetStatusText(_("Getting parameters list.")); @@ -1399,7 +1396,8 @@ ----------------------------------------------------------------------------*/ /* Run a dir command, and waits until result is fully received. */ -void wxbRestorePanel::UpdateTreeItem(wxTreeItemId item, bool updatelist, bool recurse) { +void wxbRestorePanel::UpdateTreeItem(wxTreeItemId item, bool updatelist, bool recurse) +{ // this->updatelist = updatelist; wxbDataTokenizer* dt; @@ -1491,7 +1489,8 @@ } /* Parse .dir command results, returns true if the result has been stored in entry, false otherwise. */ -int wxbRestorePanel::ParseList(wxString line, wxbDirEntry* entry) { +int wxbRestorePanel::ParseList(wxString line, wxbDirEntry* entry) +{ /* See ls_output in dird/ua_tree.c */ //-rw-r-----,1,root,root,41575,2005-10-18 18:21:36, ,/usr/var/bacula/working/bacula.sql @@ -1536,7 +1535,7 @@ if (!tkz.HasMoreTokens()) return false; - entry->fullname = tkz.GetNextToken(); + entry->fullname = tkz.GetString(); /* Get only the filename (cut path by finding the last '/') */ if (entry->fullname.GetChar(entry->fullname.Length()-1) == '/') { @@ -1552,7 +1551,8 @@ } /* Sets a list item state, and update its parents and children if it is a directory */ -void wxbRestorePanel::SetListItemState(long listitem, int newstate) { +void wxbRestorePanel::SetListItemState(long listitem, int newstate) +{ wxbTreeItemData* itemdata = (wxbTreeItemData*)list->GetItemData(listitem); wxTreeItemId treeitem; Index: wxbtableparser.cpp =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbtableparser.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- wxbtableparser.cpp 3 Jul 2006 07:51:06 -0000 1.10 +++ wxbtableparser.cpp 25 Aug 2006 12:35:45 -0000 1.11 @@ -14,7 +14,7 @@ * Version $Id$ */ /* - Copyright (C) 2004-2005 Kern Sibbald + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Index: wxbconfigpanel.cpp =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbconfigpanel.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- wxbconfigpanel.cpp 3 Jul 2006 07:51:06 -0000 1.13 +++ wxbconfigpanel.cpp 25 Aug 2006 12:35:45 -0000 1.14 @@ -7,7 +7,7 @@ * Version $Id$ */ /* - Copyright (C) 2004-2005 Kern Sibbald + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -22,11 +22,10 @@ */ #include "bacula.h" - #include "wxbconfigpanel.h" - #include <wx/arrimpl.cpp> + WX_DEFINE_OBJARRAY(wxbConfig); /* Create a new config parameter */ Index: wxbconfigfileeditor.cpp =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbconfigfileeditor.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- wxbconfigfileeditor.cpp 3 Jul 2006 07:51:06 -0000 1.11 +++ wxbconfigfileeditor.cpp 25 Aug 2006 12:35:45 -0000 1.12 @@ -7,7 +7,7 @@ * Version $Id$ */ /* - Copyright (C) 2004-2005 Kern Sibbald + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -22,12 +22,11 @@ */ #include "bacula.h" - #include "wxbconfigfileeditor.h" - #include <wx/file.h> #include <wx/filename.h> + enum { Save = 1, Index: wxbtreectrl.cpp =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbtreectrl.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- wxbtreectrl.cpp 27 Jul 2006 01:58:49 -0000 1.10 +++ wxbtreectrl.cpp 25 Aug 2006 12:35:45 -0000 1.11 @@ -8,7 +8,7 @@ * Version $Id$ */ /* - Copyright (C) 2004-2005 Kern Sibbald + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Index: console_conf.h =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/console_conf.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- console_conf.h 9 Jul 2005 13:55:34 -0000 1.7 +++ console_conf.h 25 Aug 2006 12:35:42 -0000 1.8 @@ -2,7 +2,7 @@ * Version $Id$ */ /* - Copyright (C) 2000-2005 Kern Sibbald + Copyright (C) 2000-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Index: wxbconfigfileeditor.h =================================================================== RCS file: /cvsroot/bacula/bacula/src/wx-console/wxbconfigfileeditor.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- wxbconfigfileeditor.h 27 Aug 2005 14:33:39 -0000 1.5 +++ wxbconfigfileeditor.h 25 Aug 2006 12:35:45 -0000 1.6 @@ -7,21 +7,18 @@ * Version $Id$ */ /* - Copyright (C) 2004 Kern Sibbald and John Walker + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + version 2 as amended with additional clauses defined in the + file LICENSE in the main source directory. 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. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + the file LICENSE for additional 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "wx/wxprec.h" @@ -32,8 +29,8 @@ class wxbConfigFileEditor : public wxDialog { public: - wxbConfigFileEditor(wxWindow* parent, wxString filename); - virtual ~wxbConfigFileEditor(); + wxbConfigFileEditor(wxWindow* parent, wxString filename); + virtual ~wxbConfigFileEditor(); private: wxString filename; |