]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/wx-console/main.cpp
bacula-web: Changed header.tpl design and links
[bacula/bacula] / bacula / src / wx-console / main.cpp
index 5dae9b5d8365695392529d4526aa3d9c52052b66..04045e2ac4a801db097fe28aaf3e7fa26e6a5f28 100644 (file)
@@ -1,25 +1,39 @@
+/*
+   Bacula® - The Network Backup Solution
+
+   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.
+   This program is Free Software; you can redistribute it and/or
+   modify it under the terms of version three of the GNU Affero General Public
+   License as published by the Free Software Foundation and included
+   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 Affero 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 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.
+*/
 /*
  *
- *    Bacula wx-console application
+ *    Bacula bwx-console application
  *
  *    Nicolas Boichat, April 2004
  *
  *    Version $Id$
  */
-/*
-   Copyright (C) 2004-2005 Kern Sibbald
-
-   This program is free software; you can redistribute it and/or
-   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 
-   the file LICENSE for additional details.
-
- */
 
 // ============================================================================
 // declarations
 // headers
 // ----------------------------------------------------------------------------
 
-#include "config.h"
+/*  Windows debug builds set _DEBUG which is used by wxWidgets to select their
+ *  debug memory allocator.  Unfortunately it conflicts with Bacula's SmartAlloc.
+ * So we turn _DEBUG off since we aren't interested in things it enables.
+ */
+
+#undef _DEBUG
+
+#include "bacula.h"
 
 #include <wx/wxprec.h>
 #include <wx/config.h>
 #include <wx/intl.h>
-
 #include "wxbmainframe.h"
-
 #include "csprint.h"
 
-void InitWinAPIWrapper();
 
 /* Dummy functions */
 int generate_daemon_event(JCR *jcr, const char *event) { return 1; }
@@ -77,7 +95,7 @@ bool MyApp::OnInit()
 
    long posx, posy, sizex, sizey;
    int displayx, displayy;
-   InitWinAPIWrapper();
+   OSDependentInit();
    wxConfig::Get()->Read(wxT("/Position/X"), &posx, 50);
    wxConfig::Get()->Read(wxT("/Position/Y"), &posy, 50);
    wxConfig::Get()->Read(wxT("/Size/Width"), &sizex, 780);
@@ -98,18 +116,14 @@ bool MyApp::OnInit()
       }
    }
 
-   wxbMainFrame *frame = wxbMainFrame::CreateInstance(_("Bacula wx-console"),
+   wxbMainFrame *frame = wxbMainFrame::CreateInstance(_("Bacula bwx-console"),
                          wxPoint(posx, posy), wxSize(sizex, sizey));
 
    frame->Show(TRUE);
 
-   frame->Print(wxString::Format(_("Welcome to bacula wx-console %s (%s)!\n"), wxT(VERSION), wxT(BDATE)), CS_DEBUG);
+   frame->Print(wxString::Format(_("Welcome to bacula bwx-console %s (%s)!\n"), wxT(VERSION), wxT(BDATE)), CS_DEBUG);
 
    frame->StartConsoleThread(wxT(""));
    
    return TRUE;
 }
-
-#ifndef HAVE_WIN32
-void InitWinAPIWrapper() { };
-#endif