diff --git a/ZRCola.sln b/ZRCola.sln index b04cfa0..458522a 100644 --- a/ZRCola.sln +++ b/ZRCola.sln @@ -3,6 +3,10 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZRCola", "ZRCola\ZRCola.vcxproj", "{CD9E4170-92DD-440E-980C-D15F62032249}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{6D85AD6A-69D6-40EB-BF0C-7495479DDCE5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxExtend", "lib\wxExtend\build\wxExtend.vcxproj", "{A3A36689-AC35-4026-93DA-A3BA0C0E767C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -19,8 +23,19 @@ Global {CD9E4170-92DD-440E-980C-D15F62032249}.Release|Win32.Build.0 = Release|Win32 {CD9E4170-92DD-440E-980C-D15F62032249}.Release|x64.ActiveCfg = Release|x64 {CD9E4170-92DD-440E-980C-D15F62032249}.Release|x64.Build.0 = Release|x64 + {A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Debug|Win32.ActiveCfg = Debug|Win32 + {A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Debug|Win32.Build.0 = Debug|Win32 + {A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Debug|x64.ActiveCfg = Debug|x64 + {A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Debug|x64.Build.0 = Debug|x64 + {A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Release|Win32.ActiveCfg = Release|Win32 + {A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Release|Win32.Build.0 = Release|Win32 + {A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Release|x64.ActiveCfg = Release|x64 + {A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {A3A36689-AC35-4026-93DA-A3BA0C0E767C} = {6D85AD6A-69D6-40EB-BF0C-7495479DDCE5} + EndGlobalSection EndGlobal diff --git a/ZRCola/ZRCola.props b/ZRCola/ZRCola.props new file mode 100644 index 0000000..a4c723a --- /dev/null +++ b/ZRCola/ZRCola.props @@ -0,0 +1,14 @@ + + + + + + ..\output\$(Platform).$(Configuration)\ + + + + ..\lib\wxExtend\include + + + + \ No newline at end of file diff --git a/ZRCola/ZRCola.vcxproj b/ZRCola/ZRCola.vcxproj index 3acf46c..7fd2f83 100644 --- a/ZRCola/ZRCola.vcxproj +++ b/ZRCola/ZRCola.vcxproj @@ -52,39 +52,27 @@ + + + + - - - ..\output\$(Platform).$(Configuration)\ - - - - ..\output\$(Platform).$(Configuration)\ - - - - ..\output\$(Platform).$(Configuration)\ - - - - ..\output\$(Platform).$(Configuration)\ - @@ -93,13 +81,19 @@ Create Create - - + + - + + + + + + {a3a36689-ac35-4026-93da-a3ba0c0e767c} + diff --git a/ZRCola/ZRCola.vcxproj.filters b/ZRCola/ZRCola.vcxproj.filters index 866e3c3..cfe83aa 100644 --- a/ZRCola/ZRCola.vcxproj.filters +++ b/ZRCola/ZRCola.vcxproj.filters @@ -21,10 +21,10 @@ Source Files - + Source Files - + Source Files @@ -35,7 +35,10 @@ Header Files - + + Header Files + + Header Files diff --git a/ZRCola/stdafx.h b/ZRCola/stdafx.h index c73fb2d..467c392 100644 --- a/ZRCola/stdafx.h +++ b/ZRCola/stdafx.h @@ -20,4 +20,9 @@ #pragma once #include "../include/ZRCola.h" -#include "ZRCola.h" +#include "zrcolaapp.h" +#include "zrcolaframe.h" + +#include +#include +#include diff --git a/ZRCola/ZRColaApp.cpp b/ZRCola/zrcolaapp.cpp similarity index 89% rename from ZRCola/ZRColaApp.cpp rename to ZRCola/zrcolaapp.cpp index d33cec2..dc8412b 100644 --- a/ZRCola/ZRColaApp.cpp +++ b/ZRCola/zrcolaapp.cpp @@ -33,8 +33,8 @@ bool ZRColaApp::OnInit() wxString sPath(wxPathOnly(argv[0])); sPath << wxT("\\..\\locale"); m_locale.AddCatalogLookupPathPrefix(sPath); - averify(m_locale.Init(wxLANGUAGE_SLOVENIAN)); - averify(m_locale.AddCatalog(wxT("ZRCola"))); + wxVERIFY(m_locale.Init(wxLANGUAGE_SLOVENIAN)); + wxVERIFY(m_locale.AddCatalog(wxT("ZRCola"))); } ZRColaFrame *frame = new ZRColaFrame(_("Hello World"), wxPoint(50, 50), wxSize(450, 340)); diff --git a/ZRCola/zrcolaapp.h b/ZRCola/zrcolaapp.h new file mode 100644 index 0000000..e4ef2e1 --- /dev/null +++ b/ZRCola/zrcolaapp.h @@ -0,0 +1,35 @@ +/* + Copyright 2016 Amebis + + This file is part of ZRCola. + + ZRCola 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 3 of the License, or + (at your option) any later version. + + ZRCola 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 ZRCola. If not, see . +*/ + +#pragma once + +#include + + +/// +/// ZRCola application +/// +class ZRColaApp: public wxApp +{ +public: + virtual bool OnInit(); + +protected: + wxLocale m_locale; +}; diff --git a/ZRCola/ZRColaFrame.cpp b/ZRCola/zrcolaframe.cpp similarity index 73% rename from ZRCola/ZRColaFrame.cpp rename to ZRCola/zrcolaframe.cpp index 0f7d8d2..0ed2eb5 100644 --- a/ZRCola/ZRColaFrame.cpp +++ b/ZRCola/zrcolaframe.cpp @@ -24,17 +24,17 @@ // ZRColaFrame ////////////////////////////////////////////////////////////////////////// -wxBEGIN_EVENT_TABLE(ZRColaFrame, wxFrame) +wxBEGIN_EVENT_TABLE(ZRColaFrame, wxAppBar) EVT_MENU(ZRColaFrame::ID_Hello, ZRColaFrame::OnHello) - EVT_MENU(wxID_EXIT, ZRColaFrame::OnExit) - EVT_MENU(wxID_ABOUT, ZRColaFrame::OnAbout) + EVT_MENU(wxID_EXIT, ZRColaFrame::OnExit) + EVT_MENU(wxID_ABOUT, ZRColaFrame::OnAbout) wxEND_EVENT_TABLE() -ZRColaFrame::ZRColaFrame(const wxString& title, const wxPoint& pos, const wxSize& size) : wxFrame(NULL, wxID_ANY, title, pos, size) +ZRColaFrame::ZRColaFrame(const wxString& title, const wxPoint& pos, const wxSize& size) : wxAppBar(NULL, wxID_ANY, title, wxSTATE_FLOAT, wxFLAG_ALLOWFLOAT | wxFLAG_ALLOWDOCKHORIZONTAL | wxFLAG_ALLOWSIZING | wxFLAG_HIDETASKBARTABWHENDOCKED, pos, size) { wxMenu *menuFile = new wxMenu; - menuFile->Append(ZRColaFrame::ID_Hello, _("&Hello...\tShift+H"), _("Help string shown in status bar for this menu item")); + menuFile->Append(ZRColaFrame::ID_Hello, _("&Hello...\tCtrl+H"), _("Help string shown in status bar for this menu item")); menuFile->AppendSeparator(); menuFile->Append(wxID_EXIT); @@ -46,8 +46,8 @@ ZRColaFrame::ZRColaFrame(const wxString& title, const wxPoint& pos, const wxSize menuBar->Append(menuHelp, _("&Help")); SetMenuBar(menuBar); - CreateStatusBar(); - SetStatusText(_("Welcome to wxWidgets!")); + //CreateStatusBar(); + //SetStatusText(_("Welcome to wxWidgets!")); } diff --git a/ZRCola/ZRCola.h b/ZRCola/zrcolaframe.h similarity index 64% rename from ZRCola/ZRCola.h rename to ZRCola/zrcolaframe.h index 55887bd..9a950cf 100644 --- a/ZRCola/ZRCola.h +++ b/ZRCola/zrcolaframe.h @@ -19,14 +19,13 @@ #pragma once -#include +#include -////////////////////////////////////////////////////////////////////////// -// ZRColaFrame -////////////////////////////////////////////////////////////////////////// - -class ZRColaFrame : public wxFrame +/// +/// ZRCola main frame +/// +class ZRColaFrame : public wxAppBar { public: ZRColaFrame(const wxString& title, const wxPoint& pos, const wxSize& size); @@ -41,17 +40,3 @@ protected: void OnAbout(wxCommandEvent& event); wxDECLARE_EVENT_TABLE(); }; - - -////////////////////////////////////////////////////////////////////////// -// ZRColaApp -////////////////////////////////////////////////////////////////////////// - -class ZRColaApp: public wxApp -{ -public: - virtual bool OnInit(); - -protected: - wxLocale m_locale; -}; diff --git a/include/ZRCola.h b/include/ZRCola.h index e5405f9..1ffa0d6 100644 --- a/include/ZRCola.h +++ b/include/ZRCola.h @@ -18,33 +18,3 @@ */ #pragma once - -#include - -////////////////////////////////////////////////////////////////////////// -// _L(), __L() -////////////////////////////////////////////////////////////////////////// - -#define __L(x) L ## x -#define _L(x) __L(x) - - -////////////////////////////////////////////////////////////////////////// -// aassert(), averify() -////////////////////////////////////////////////////////////////////////// - -#ifdef __cplusplus -extern "C" { -#endif -_CRTIMP void __cdecl _wassert(_In_z_ const wchar_t * _Message, _In_z_ const wchar_t *_File, _In_ unsigned _Line); -#ifdef __cplusplus -} -#endif - -#if defined(NDEBUG) // aassert() and averify() are defined according to NDEBUG for consistent experience with assert(). -#define aassert(expr) ((void)0) -#define averify(expr) ((void)(expr)) -#else -#define aassert(expr) ((void)((expr) || (_wassert(_L(#expr), _L(__FILE__), __LINE__), 0))) -#define averify(expr) aassert(expr) -#endif diff --git a/output/locale/sl_SI/ZRCola.mo b/output/locale/sl_SI/ZRCola.mo index 9290522..6700933 100644 Binary files a/output/locale/sl_SI/ZRCola.mo and b/output/locale/sl_SI/ZRCola.mo differ diff --git a/output/locale/sl_SI/ZRCola.po b/output/locale/sl_SI/ZRCola.po index cab1b38..512a9b6 100644 --- a/output/locale/sl_SI/ZRCola.po +++ b/output/locale/sl_SI/ZRCola.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: ZRCola\n" -"POT-Creation-Date: 2016-02-02 15:49+0100\n" -"PO-Revision-Date: 2016-02-02 16:35+0100\n" +"POT-Creation-Date: 2016-02-04 12:19+0100\n" +"PO-Revision-Date: 2016-02-04 12:19+0100\n" "Last-Translator: Simon Rozman \n" "Language-Team: Amebis, d. o. o., Kamnik \n" "Language: sl_SI\n" @@ -17,38 +17,37 @@ msgstr "" "X-Poedit-KeywordsList: _\n" "X-Poedit-SearchPath-0: .\n" -#: main.cpp:48 -msgid "&Hello...\tShift+H" -msgstr "&Pozdrav ...\t⇧+H" +#: zrcolaapp.cpp:40 +msgid "Hello World" +msgstr "Zdravo svet" -#: main.cpp:48 +#: zrcolaframe.cpp:37 +msgid "&Hello...\tCtrl+H" +msgstr "&Pozdrav ...\tCtrl+H" + +#: zrcolaframe.cpp:37 msgid "Help string shown in status bar for this menu item" msgstr "Niz s pomočjo prikazan v statusni vrstici za to točko menija" -#: main.cpp:56 +#: zrcolaframe.cpp:45 msgid "&File" msgstr "&Datoteka" -#: main.cpp:57 +#: zrcolaframe.cpp:46 msgid "&Help" msgstr "&Pomoč" -#: main.cpp:61 -msgid "Welcome to wxWidgets!" -msgstr "Dobrodošli v wxWidgets!" - -#: main.cpp:71 +#: zrcolaframe.cpp:62 msgid "This is a wxWidgets' Hello world sample" msgstr "To je primer Zdravo svet v wxWidgets" -#: main.cpp:71 +#: zrcolaframe.cpp:62 msgid "About Hello World" msgstr "O Zdravo svet" -#: main.cpp:76 +#: zrcolaframe.cpp:68 msgid "Hello world from wxWidgets!" msgstr "Zdravo svet iz wxWidgets!" -#: main.cpp:99 -msgid "Hello World" -msgstr "Zdravo svet" +#~ msgid "Welcome to wxWidgets!" +#~ msgstr "Dobrodošli v wxWidgets!"