From b7bd7d3104bf7672eed5bfbd148d1c75820683e5 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Tue, 13 May 2014 17:23:18 +0200 Subject: wx: Fix non constant define (wxSL_LABELS) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- lib/wx/api_gen/wxapi.conf | 3 ++- lib/wx/c_src/gen/wxe_init.cpp | 6 ++++-- 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). -- cgit v1.2.3