* 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
// headers
// ----------------------------------------------------------------------------
+#undef _DEBUG
+
+#include "bacula.h"
+
+#undef setlocale
+#undef textdomain
+#undef bindtextdomain
+
#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; }
// '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);
}
}
- 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