Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
042cf7d3
Commit
042cf7d3
authored
Dec 30, 2010
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some ifdefs around the vc9 fixes so that mse still compiles with msvc7 and wxWidget 2.6
parent
77983048
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
7 deletions
+30
-7
src/gui/icon_menu.cpp
src/gui/icon_menu.cpp
+2
-1
src/gui/util.cpp
src/gui/util.cpp
+8
-1
src/main.cpp
src/main.cpp
+2
-2
src/mse.vc71.vcproj
src/mse.vc71.vcproj
+5
-1
src/util/error.cpp
src/util/error.cpp
+1
-1
src/util/prec.hpp
src/util/prec.hpp
+12
-1
No files found.
src/gui/icon_menu.cpp
View file @
042cf7d3
...
...
@@ -48,9 +48,10 @@ Image generateDisabledImage(const Image& imgIn) {
// ----------------------------------------------------------------------------- : set_menu_item_image
void
set_menu_item_image
(
wxMenuItem
*
item
,
const
String
&
resource
)
{
if
(
item
->
GetId
()
!=
wxID_NEW
)
return
;
//@@@
// load bitmap
Bitmap
bitmap
=
load_resource_tool_image
(
resource
);
#if
def __WXMSW__
#if
defined(__WXMSW__)
// make greyed bitmap
bitmap
=
bitmap
.
GetSubBitmap
(
wxRect
(
0
,
0
,
16
,
16
));
Image
disabledImage
=
generateDisabledImage
(
bitmap
.
ConvertToImage
());
...
...
src/gui/util.cpp
View file @
042cf7d3
...
...
@@ -266,7 +266,7 @@ void draw_control_box(Window* win, DC& dc, const wxRect& rect, bool focused, boo
}
void
draw_button
(
Window
*
win
,
DC
&
dc
,
const
wxRect
&
rect
,
bool
focused
,
bool
down
,
bool
enabled
)
{
#if
1
#if
wxVERSION >= 2700
wxRendererNative
&
rn
=
wxRendererNative
::
GetDefault
();
rn
.
DrawPushButton
(
win
,
dc
,
rect
,
(
focused
?
wxCONTROL_FOCUSED
:
0
)
|
(
down
?
wxCONTROL_PRESSED
:
0
)
|
(
enabled
?
0
:
wxCONTROL_DISABLED
));
#else
...
...
@@ -341,6 +341,13 @@ void draw_radiobox(Window* win, DC& dc, const wxRect& rect, bool checked, bool e
void
draw_selection_rectangle
(
Window
*
win
,
DC
&
dc
,
const
wxRect
&
rect
,
bool
selected
,
bool
focused
,
bool
hot
)
{
#if wxUSE_UXTHEME && defined(__WXMSW__)
#if WINVER <= 0x0500
#define LISS_NORMAL LIS_NORMAL
#define LISS_SELECTED LIS_SELECTED
#define LISS_SELECTEDNOTFOCUS LIS_SELECTEDNOTFOCUS
#define LISS_HOT LISS_NORMAL
#define LISS_HOTSELECTED LISS_SELECTED
#endif
wxUxThemeEngine
*
themeEngine
=
wxUxThemeEngine
::
Get
();
if
(
themeEngine
&&
themeEngine
->
IsAppThemed
())
{
wxUxThemeHandle
hTheme
(
win
,
L"LISTVIEW"
);
...
...
src/main.cpp
View file @
042cf7d3
...
...
@@ -51,7 +51,7 @@ class MSE : public wxApp {
/// Hack around some wxWidget idiocies
int
FilterEvent
(
wxEvent
&
ev
);
/// Fancier assert
#if defined(_MSC_VER) && defined(_DEBUG)
#if defined(_MSC_VER) && defined(_DEBUG)
&& defined(_CRT_WIDE)
void
OnAssert
(
const
wxChar
*
file
,
int
line
,
const
wxChar
*
cond
,
const
wxChar
*
msg
);
#endif
};
...
...
@@ -275,7 +275,7 @@ void MSE::HandleEvent(wxEvtHandler *handler, wxEventFunction func, wxEvent& even
}
CATCH_ALL_ERRORS
(
true
);
}
#if defined(_MSC_VER) && defined(_DEBUG)
#if defined(_MSC_VER) && defined(_DEBUG)
&& defined(_CRT_WIDE)
// Print assert failures to debug output
void
MSE
::
OnAssert
(
const
wxChar
*
file
,
int
line
,
const
wxChar
*
cond
,
const
wxChar
*
msg
)
{
#ifdef UNICODE
...
...
src/mse.vc71.vcproj
View file @
042cf7d3
...
...
@@ -38,7 +38,8 @@
WarningLevel=
"4"
WarnAsError=
"TRUE"
Detect64BitPortabilityProblems=
"TRUE"
DebugInformationFormat=
"4"
/>
DebugInformationFormat=
"4"
DisableSpecificWarnings=
"4671;4673"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
...
...
@@ -1034,6 +1035,9 @@
<File
RelativePath=
".\gui\print_window.hpp"
>
</File>
<File
RelativePath=
".\gui\profiler_window.cpp"
>
</File>
<File
RelativePath=
".\gui\thumbnail_thread.cpp"
>
</File>
...
...
src/util/error.cpp
View file @
042cf7d3
...
...
@@ -18,7 +18,7 @@ DECLARE_TYPEOF_COLLECTION(ScriptParseError);
// ----------------------------------------------------------------------------- : Debug utilities
#if defined(_MSC_VER) && defined(_DEBUG)
#if defined(_MSC_VER) && defined(_DEBUG)
&& defined(_CRT_WIDE)
void
msvc_assert
(
const
wchar_t
*
msg
,
const
wchar_t
*
expr
,
const
wchar_t
*
file
,
unsigned
line
)
{
if
(
IsDebuggerPresent
())
{
wchar_t
buffer
[
1024
];
...
...
src/util/prec.hpp
View file @
042cf7d3
...
...
@@ -18,6 +18,7 @@
# pragma warning (disable: 4100) // unreferenced formal parameter
# pragma warning (disable: 4355) // 'this' : used in base member initializer list
# pragma warning (disable: 4800) // 'int' : forcing value to bool 'true' or 'false' (performance warning)
# pragma warning (disable: 4675) // resolved overload was found by argument-dependent lookup (occurs in some boost header)
#endif
// ----------------------------------------------------------------------------- : Includes
...
...
@@ -64,6 +65,16 @@ typedef wxOutputStream OutputStream;
// wx >= 2.9 requires the use of HandleWindowEvent on windows, instead of ProcessEvent
#define HandleWindowEvent ProcessEvent
#endif
#if wxVERSION_NUMBER < 2700
// is it worth it to still support wx2.6?
#define wxFD_SAVE wxSAVE
#define wxFD_OPEN wxOPEN
#define wxFD_OVERWRITE_PROMPT wxOVERWRITE_PROMPT
#define SetDeviceClippingRegion SetClippingRegion
typedef
wxEvent
wxMouseCaptureLostEvent
;
#define EVT_MOUSE_CAPTURE_LOST(handler) // ignore
#define wxEVT_MOUSE_CAPTURE_LOST 12345678 // not an actual event type
#endif
// ----------------------------------------------------------------------------- : Other aliasses
...
...
@@ -101,7 +112,7 @@ class FileName : public wxString {
#define for if(false);else for
#endif
#if
def _DEBUG
#if
defined(_DEBUG) && defined(_CRT_WIDE)
// Use OutputDebugString/DebugBreak for assertions if in debug mode
void
msvc_assert
(
const
wchar_t
*
,
const
wchar_t
*
,
const
wchar_t
*
,
unsigned
);
#undef assert
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment