committed, BUT doesn't build on linux --> working on it
undefined references to PlaceWindow --> hmm strange, and make clean was of no help
FIXED :I hate ifdefs
Hahaha... that was why I reverted Patch #1762.
You are really unable to tell what's going on with all those
#ifdefs. Save the whales, kill
#ifdefs instead
@Tim:
Although your patch did work just fine (thanks for spotting the issue, above all), I did not like it, sorry
For
PlaceWindow, it really only makes sense to work on
wxToplevelWindow*, if one thinks about it. I originally implemented it to take a
wxWindow* because that was the class which contained all the
CentreXXX functions (and still does in 2.8, according to the documentation!). The documentation would say "no effect on non-toplevel windows" and I said "yeah, fine with me, makes sense".
It would of course have been no mistake (and maybe more logical) to use
wxToplevelWindow* in the first place, since you really only want to position dialogs and frames.
Now, they secretly moved those functions into
wxTopLevelWindow (without updating the documentation, and without a fallback), so it would suddenly no longer compile.
Changing the function signature works fine for all versions, and takes no
#ifdefs, which is more readable.
As to the other two locations in the reverted patch,
cbSplashScreen is a
wxFrame (thus it is a
wxTopLevelWindow), so it is not necessary to patch anything here.
The call to
PlaceWindow inside the config panel dialog is wrong alltogether. It is a relict from the times before all config panels were placed inside a list view (where it of course no longer makes sense to center anything on screen). It used to work without problems in 2.6, so nobody ever noticed. But, the correct solution here is to just delete the offending code alltogether.