Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
infopane.cpp doesn't build with wx26
SharkCZ:
Hello,
infopane.cpp doesn't build with wx26 due the non-existency of wxAui there. Fix is included ;-)
--- Code: ---Index: src/src/infopane.h
===================================================================
--- src/src/infopane.h (revision 4400)
+++ src/src/infopane.h (working copy)
@@ -4,12 +4,14 @@
#include <logmanager.h>
+#if wxCHECK_VERSION(2, 8, 0)
#include <wx/aui/auibook.h>
typedef wxAuiNotebook InfoPaneNotebook; // or wxFlatNotebook, or whatever...
+#else
+#include <wx/wxFlatNotebook/wxFlatNotebook.h>
+typedef wxFlatNotebook InfoPaneNotebook;
+#endif
-//#include <wx/wxFlatNotebook/wxFlatNotebook.h>
-//typedef wxFlatNotebook InfoPaneNotebook;
-
class wxWindow;
class wxCommandEvent;
class wxMouseEvent;
--- End code ---
killerbot:
maybe we should use in all cases wxFlatNotebook ??
What do you think Thomas ??
thomas:
You should only need to change one typedef and one #include to use wxFlatNotebook, Lieven. Actually, just uncomment two lines, and comment the other two... I've never tried it, but it should work. Why not, actually :)
In my understanding (from reading the docs), both notebooks should work just the same, and the API exposed should be 100% identical apart from icon handling (wxFlatNotebook uses a bitmap list and wxAuiNotebook uses individual bitmaps). I just picked wxAuiNotebook out of curiosity, because I had never used it before.
So... feel free to change the typedef and try it out :)
As for the patch, thank you for your work, SharkCZ, but I am not willing to add workarounds for some old versions of wxWidgets on a piece of code that is work in progress and not not even used by the application. That doesn't make sense to me.
If it causes a compilation problem, one should just remove the file from the project until it's at least finished. :)
killerbot:
wxFlatNotebook works still for wx26. Although people should start forgetting about wx26 [I also still have 1 system on wx26 ;-)], will change it to wxFlatNotebook this weekend then. WE can always change it back if needed and then we all wave bye bye to wx26 ;-)
MortenMacFly:
--- Quote from: thomas on August 17, 2007, 02:16:06 pm ---So... feel free to change the typedef and try it out :)
--- End quote ---
Tried that with a project of mine -> doesn't work. With wxNotebook all is fine, with wxFlatNotebook it crashes and (in addition) removes parts not being removed by wxNotebook (which is also the reason for the crash btw).
This doesn't mean wxFlatNotebook isn't great... it is! ;-)
Navigation
[0] Message Index
[#] Next page
Go to full version