Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Matt Corallo on May 24, 2011, 02:02:38 AM



Title: [PATCH] (Mostly) Working backport to wx2.8
Post by: Matt Corallo on May 24, 2011, 02:02:38 AM
I decided to actually look at what is required to backport to wx2.8.  Actually, its mostly copy/paste/sed crap. 
Its done in the worst possible way and is ridiculously inefficient, I just wanted to see if it could be done.
As it turns out, it seems completely possible.
The GUI shows up and the majority seems to work.  Translations appear to work, but that is only in very brief testing.
I'm sure I've made 100 or more typos, so I'd like some corrections (and pointing out of much better ways of converting crap between wxString and std::string, if someone can find one).
You can grab the version at https://github.com/TheBlueMatt/bitcoin/tree/wx2.8 (https://github.com/TheBlueMatt/bitcoin/tree/wx2.8)


Title: Re: [PATCH] (Mostly) Working backport to wx2.8
Post by: Pieter Wuille on May 24, 2011, 09:09:11 AM
Very nice! It doesn't seem to work completely yet, as I get weird character in the status column and status bar below. Apart from that, really good to see we don't need a dev branch of wxwindows.

One suggestion: is it possible to define _ yourself, so all the GetTranslationChar calls aren't necessary?


Title: Re: [PATCH] (Mostly) Working backport to wx2.8
Post by: Matt Corallo on May 24, 2011, 11:29:20 AM
Very nice! It doesn't seem to work completely yet, as I get weird character in the status column and status bar below. Apart from that, really good to see we don't need a dev branch of wxwindows.
Yea, that showed up in a couple places because I didn't handle temporary pointers right, I think I've fixed the majority of those now.
One suggestion: is it possible to define _ yourself, so all the GetTranslationChar calls aren't necessary?
Not really, _ has to return 3 different types (wxString, std::string, char*) and you can't override based on return value (AFAIK, but I may very well be wrong).  wx2.9 will convert properly automatically, but not with 2.8.