X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=bacula%2Fsrc%2Fwx-console%2Fmain.cpp;h=90522cdddc587c628a3d870ab5962d640f3ed35e;hb=9cc60416baa0166420327c7f15f6ede12b4d06e8;hp=0e6e5eca942d825a27abca8417978a2036d701b3;hpb=fce6a648a27ee86f6941a5085ec7909f6d43e725;p=bacula%2Fbacula diff --git a/bacula/src/wx-console/main.cpp b/bacula/src/wx-console/main.cpp index 0e6e5eca94..90522cdddc 100644 --- a/bacula/src/wx-console/main.cpp +++ b/bacula/src/wx-console/main.cpp @@ -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 @@ -29,14 +29,20 @@ // headers // ---------------------------------------------------------------------------- +#undef _DEBUG + +#include "bacula.h" + +#undef setlocale +#undef textdomain +#undef bindtextdomain + #include #include - +#include #include "wxbmainframe.h" - #include "csprint.h" -void InitWinAPIWrapper(); /* Dummy functions */ int generate_daemon_event(JCR *jcr, const char *event) { return 1; } @@ -66,13 +72,15 @@ IMPLEMENT_APP(MyApp) // 'Main program' equivalent: the program execution "starts" here bool MyApp::OnInit() { - setlocale(LC_ALL, ""); - bindtextdomain("bacula", LOCALEDIR); - textdomain("bacula"); + /* wxWidgets internationalisation */ + wxLocale m_locale; + m_locale.Init(); + m_locale.AddCatalog(wxT("bacula")); + wxLocale::AddCatalogLookupPathPrefix(wxT(LOCALEDIR)); 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); @@ -93,18 +101,14 @@ bool MyApp::OnInit() } } - wxbMainFrame *frame = wxbMainFrame::CreateInstance(wxT(_("Bacula wx-console")), + wxbMainFrame *frame = wxbMainFrame::CreateInstance(_("Bacula wx-console"), wxPoint(posx, posy), wxSize(sizex, sizey)); frame->Show(TRUE); - frame->Print(wxString::Format(wxT(_("Welcome to bacula wx-console %s (%s)!\n")), wxT(VERSION), wxT(BDATE)), CS_DEBUG); + frame->Print(wxString::Format(_("Welcome to bacula wx-console %s (%s)!\n"), wxT(VERSION), wxT(BDATE)), CS_DEBUG); frame->StartConsoleThread(wxT("")); return TRUE; } - -#ifndef HAVE_WIN32 -void InitWinAPIWrapper() { }; -#endif