diff options
author | Dan Gudmundsson <[email protected]> | 2014-05-13 17:23:18 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2014-05-13 17:23:18 +0200 |
commit | b7bd7d3104bf7672eed5bfbd148d1c75820683e5 (patch) | |
tree | 7989d60b4a49ce093407bb161b81a31b501e37e3 | |
parent | 616e03903645ee3f1fef1a4226f2b18051b968c9 (diff) | |
download | otp-b7bd7d3104bf7672eed5bfbd148d1c75820683e5.tar.gz otp-b7bd7d3104bf7672eed5bfbd148d1c75820683e5.tar.bz2 otp-b7bd7d3104bf7672eed5bfbd148d1c75820683e5.zip |
wx: Fix non constant define (wxSL_LABELS)
wxSL_LABELS have changed constant value in 3.0, make version agnostic
by doing a lookup during runtime instead of constant.
Thanks Enrique Fernández (efcasado)
-rw-r--r-- | lib/wx/api_gen/wxapi.conf | 3 | ||||
-rw-r--r-- | lib/wx/c_src/gen/wxe_init.cpp | 6 | ||||
-rw-r--r-- | lib/wx/include/wx.hrl | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/lib/wx/api_gen/wxapi.conf b/lib/wx/api_gen/wxapi.conf index afe59a1496..7e71e75909 100644 --- a/lib/wx/api_gen/wxapi.conf +++ b/lib/wx/api_gen/wxapi.conf @@ -31,7 +31,8 @@ %% wxALWAYS_NATIVE_DOUBLE_BUFFER, wxGAUGE_EMULATE_INDETERMINATE_MODE, - wxTR_DEFAULT_STYLE + wxTR_DEFAULT_STYLE, + wxSL_LABELS ]}. {gvars, diff --git a/lib/wx/c_src/gen/wxe_init.cpp b/lib/wx/c_src/gen/wxe_init.cpp index a75298392b..3a4bced790 100644 --- a/lib/wx/c_src/gen/wxe_init.cpp +++ b/lib/wx/c_src/gen/wxe_init.cpp @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2008-2011. All Rights Reserved. + * Copyright Ericsson AB 2008-2014. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -36,6 +36,8 @@ void WxeApp::init_nonconsts(wxeMemEnv *memenv, ErlDrvTermData caller) { rt.addTupleCount(2); rt.addAtom("wxGAUGE_EMULATE_INDETERMINATE_MODE"); rt.addInt(wxGAUGE_EMULATE_INDETERMINATE_MODE); rt.addTupleCount(2); + rt.addAtom("wxSL_LABELS"); rt.addInt(wxSL_LABELS); + rt.addTupleCount(2); rt.addAtom("wxTR_DEFAULT_STYLE"); rt.addInt(wxTR_DEFAULT_STYLE); rt.addTupleCount(2); rt.addAtom("wxBETA_NUMBER"); rt.addInt(wxBETA_NUMBER); @@ -136,7 +138,7 @@ void WxeApp::init_nonconsts(wxeMemEnv *memenv, ErlDrvTermData caller) { rt.addTupleCount(2); rt.addAtom("wxWHITE_PEN"); rt.addRef(getRef((void *)wxWHITE_PEN,memenv),"wxPen"); rt.addTupleCount(2); - rt.endList(56); + rt.endList(57); rt.addTupleCount(2); rt.send(); } diff --git a/lib/wx/include/wx.hrl b/lib/wx/include/wx.hrl index 795e481396..348daf64ce 100644 --- a/lib/wx/include/wx.hrl +++ b/lib/wx/include/wx.hrl @@ -2520,7 +2520,7 @@ -define(wxSL_RIGHT, 256). -define(wxSL_TOP, 128). -define(wxSL_LEFT, 64). --define(wxSL_LABELS, 32). +-define(wxSL_LABELS, wxe_util:get_const(wxSL_LABELS)). -define(wxSL_AUTOTICKS, ?wxSL_TICKS). -define(wxSL_TICKS, 16). -define(wxSL_VERTICAL, ?wxVERTICAL). |