Merge branch 'master' of https://github.com/Amebis/wxExtend into HEAD
This commit is contained in:
commit
f14e5948a5
8
build/wxExtend.props
Normal file
8
build/wxExtend.props
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup />
|
||||
<ItemGroup />
|
||||
</Project>
|
@ -20,6 +20,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\appbar.cpp" />
|
||||
<ClCompile Include="..\src\appex.cpp" />
|
||||
<ClCompile Include="..\src\stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
@ -29,6 +30,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\include\wxex\appbar.h" />
|
||||
<ClInclude Include="..\include\wxex\appex.h" />
|
||||
<ClInclude Include="..\include\wxex\common.h" />
|
||||
<ClInclude Include="..\src\stdafx.h" />
|
||||
</ItemGroup>
|
||||
@ -66,21 +68,25 @@
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\include\Win32.props" />
|
||||
<Import Project="..\..\..\include\Debug.props" />
|
||||
<Import Project="wxExtend.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\include\x64.props" />
|
||||
<Import Project="..\..\..\include\Debug.props" />
|
||||
<Import Project="wxExtend.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\include\Win32.props" />
|
||||
<Import Project="..\..\..\include\Release.props" />
|
||||
<Import Project="wxExtend.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\include\x64.props" />
|
||||
<Import Project="..\..\..\include\Release.props" />
|
||||
<Import Project="wxExtend.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
|
@ -21,6 +21,9 @@
|
||||
<ClCompile Include="..\src\appbar.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\appex.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\stdafx.h">
|
||||
@ -32,5 +35,8 @@
|
||||
<ClInclude Include="..\include\wxex\common.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\wxex\appex.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -24,6 +24,7 @@
|
||||
#include <ShlObj.h>
|
||||
|
||||
#include <wx/frame.h>
|
||||
#include <wx/string.h>
|
||||
|
||||
|
||||
#define wxABT_AUTOHIDETIMERID 1
|
||||
|
42
include/wxex/appex.h
Normal file
42
include/wxex/appex.h
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
Copyright 2016 Amebis
|
||||
|
||||
This file is part of wxExtend.
|
||||
|
||||
wxExtend 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.
|
||||
|
||||
wxExtend 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 wxExtend. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/app.h>
|
||||
#include <wx/intl.h>
|
||||
|
||||
|
||||
///
|
||||
/// Extended application
|
||||
///
|
||||
class wxAppEx : public wxApp
|
||||
{
|
||||
public:
|
||||
///
|
||||
/// Called when application initializes.
|
||||
///
|
||||
/// \returns
|
||||
/// - true if initialization succeeded
|
||||
/// - false otherwise
|
||||
virtual bool OnInit();
|
||||
|
||||
protected:
|
||||
wxLocale m_locale; ///< Current locale
|
||||
};
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright 2016 Amebis
|
||||
Based on code written by Jeffrey Richter.
|
||||
|
||||
This file is part of wxExtend.
|
||||
|
||||
|
41
src/appex.cpp
Normal file
41
src/appex.cpp
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
Copyright 2016 Amebis
|
||||
|
||||
This file is part of wxExtend.
|
||||
|
||||
wxExtend 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.
|
||||
|
||||
wxExtend 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 wxExtend. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// wxAppEx
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool wxAppEx::OnInit()
|
||||
{
|
||||
if (!wxApp::OnInit())
|
||||
return false;
|
||||
|
||||
if (wxLocale::IsAvailable(wxLANGUAGE_SLOVENIAN)) {
|
||||
wxString sPath(wxPathOnly(argv[0]));
|
||||
sPath << wxT("\\..\\locale");
|
||||
m_locale.AddCatalogLookupPathPrefix(sPath);
|
||||
wxVERIFY(m_locale.Init(wxLANGUAGE_SLOVENIAN));
|
||||
wxVERIFY(m_locale.AddCatalog(wxT("ZRCola")));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
@ -19,9 +19,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// Since including <wx/app.h> introduces wrong include order in 3.0.2,
|
||||
// include the grand <wx/wx.h> at a cost of longer pre-compilation phase.
|
||||
#include <wx/wx.h>
|
||||
|
||||
#include "../include/wxex/appbar.h"
|
||||
#include "../include/wxex/appex.h"
|
||||
|
||||
#include "../include/wxex/common.h"
|
||||
|
||||
#include <Windowsx.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user