I just found a minor glitch in the new wxFlatNotebook :)Eran :P
Microsoft (tm) VisualStudio style and tabs at bottom. The background of the active tab is right, but the line border is wrong. It's even more evident with the messages dock.
Anyone familiar with wxFlatNotebook's code? :wink:
Microsoft (tm) VisualStudio style and tabs at bottom. The background of the active tab is right, but the line border is wrong. It's even more evident with the messages dock.
BTW, look here and see who intitated the insertion of wxFlatNotebook into C::B .... :wink:
Try to use other styles (try the VC8 style) until the next minor release, which I will make shortly due to number of little, but annoying bugs that I already fixed.I'd love to try VC8, but C::B doesn't allow me to choose that :(
@Eran,Better yet, can we maybe convince you to switch to Subversion? ;)
it seems you already have some fixes, and some other code juggling done in the meantime ;-)
do you have plans on a 2.1 in the near future ?
If that's near I'll wait, otherwise I'll manually update by retrieving from cvs.
Any suggestion for a good repository place ?Uh... the same place where it is now? ;)
good idea Thomas, but we have made a few changes to the code ...If everything works as it should, that should even be not a problem. In theory, Subversion should simply merge our changes. However, I only experienced lately that merging isn't always working nicely :lol:
Yiannis: Which tool was it we used back then?
What do we need to change anyway, shouldn't it work out-of-the box, too?
From what I see while quickly scanning over the patch, it mostly changes include paths, registers one additional key event (for whatever it's good?), and replaces an awful lot of seemingly identical lines (--> changed indentation from tab to spaces?).
Our changes are not that simple ;).But why is the rum gone!
For example, the latest patching I did in wxFNB was to move the EVT_PAGE_SELECTION_CHANGED and EVT_PAGE_SELECTION_CHANGING events to the SetSelection() function, instead of in the OnLeftDown(). The way it was, we were only informed about page selection changing only when the user used the mouse to change pages. But if you used Ctrl-Tab/Shift-Ctrl-Tab we never knew you changed the page, causing all kinds of side-effects for us...
I mean, this is a change that would better be placed in the *real* codebase, as those problems will affect any application, not just ours. I think Arto won't object to adopt changes that are obviously advantageous to everybody ;)
Our changes are not that simple ;).But why is the rum gone!
For example, the latest patching I did in wxFNB was to move the EVT_PAGE_SELECTION_CHANGED and EVT_PAGE_SELECTION_CHANGING events to the SetSelection() function, instead of in the OnLeftDown(). The way it was, we were only informed about page selection changing only when the user used the mouse to change pages. But if you used Ctrl-Tab/Shift-Ctrl-Tab we never knew you changed the page, causing all kinds of side-effects for us...
I mean, this is a change that would better be placed in the *real* codebase, as those problems will affect any application, not just ours. I think Arto won't object to adopt changes that are obviously advantageous to everybody ;)
Are there any other major changes that we need besides that?
this weekend I will 'document [== readable text]' the changes we made (the number is rather small, but don't look at the patch, it's awfull because of white space stripping), so then it will be more clear.
In particular, if you used Subversion, we could simply put an externals definition onto the wxFlatNotebook directory which points to your "stable" branch, and we would never have to worry about updating anything any more. You can develop the same way as before, and whenever you deem your source tree "stable", you make a svn copy to "stable".
The updates will magically appear in every project using wxFNB.
But even more, we would be overjoyed to see mandrav's patches in eran's codebase - we too have a problem with only getting page changed events when the pages are clicked ...
Yes, of course itwould be better if eran (not Arto ;)) would incorporate them
common change :
1) header include
- the original wxFNB code includes it's own headers like this (according do it's directory structure) :
#include <wx/wxFlatNotebook/header.h>
- CB has put all sources together in the same directory, and therefor changed to includes to this format :
#include "header.h"
modified files :
1) popup_dlg.cpp
- header include (see above for more info)
2) renderer.h
- header include (see above for more info)
3) renderer.cpp
- header include (see above for more info)
4) wxFlatNotebook.h
- header include (see above for more info)
- remove the definitions of the XPM's from the header (here) to the cpp file (and just extern declare them here)
- add #define wxFNB_ALLOW_FOREIGN_DND 0x00000080 : purpose : prevent dragging tabs from one notebook to another notebook (is only allowed when this style is active)
- wxFlatNotebook::DeletePage(), wxFlatNotebook::RemovePage(), wxPageContainer::DeletePage() get a second argument with default value true : bool notify = true (see below for more info)
5) wxFlatNotebook.cpp
- header include (see above for more info)
- remove the definitions of the XPM's from the header to the cpp file (here)
- wxFlatNotebook::SetSelection (see below for more info : wxPageContainer::OnLeftDown())
- wxFlatNotebook::DeletePage(), wxFlatNotebook::RemovePage(), wxPageContainer::DeletePage() get a second argument with default value true : bool notify = true : only when the new argument is true, an event will be posted, otherwise the actions are just silently carried out
example: in EditorManager::Close(EditorBase*,bool) we call wxFNB->DeletePage(index,false). We don't want our page closing event to be called then: we know we 're closing the page, no need for wxFNB to tell us again. We could avoid this patch but we 'd need to add some considerable amount of logic in our sources. Since this kind of scenario is pretty common, we chose to make this little change in wxFNB
- wxPageContainer::AddPage() and wxPageContainer::InsertPage() : a SetPosition(wxPoint(1,1)) is carried out on the wxPageInfo
because later, when repainting, there was a comparison taking place and without this (for newly added pages) we would get artifacts
- wxPageContainer::OnMiddleDown() : because the original implementation (that was wxFNB 1.3 (or lower)) wouldn't send the wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSING event. Now I see that DeletePage() sends it, so I think it would be safe to ignore this patch.
- wxPageContainer::OnRightDown() the if(m_pRightClickMenu) is removed : because it was on the top of the function and the right-click menu event wouldn't be called then. I didn't remove it, I just moved it before popping up the menu.
- wxPageContainer::OnLeftDown() : event generation (re)moved, is being put in "wxFlatNotebook::SetSelection" because otherwise there were no events generated when the user swicthed tabs by means of ctrl-tab (without this modification it only worked when the change was made with the mouse)
- wxPageContainer::IsTabVisible : correct spelling of the Don's name : Yiannis ;-)
- wxPageContainer::OnDropTarget: prevent dragging tabs from one notebook to another notebook (is only allowed when the style wxFNB_ALLOW_FOREIGN_DND is active)
Most of the changes are making sense, and I will try to incorporate them inside CVS. I think most of them are OK, except for the "header" one, since I want to keep the current directory structure (it is the common contrib directory structure)I didn't understand that one anyway, having the headers in the "standard contrib" fashion works nicely, if we add one more path to the project, doesn't it?
Most of the changes are making sense, and I will try to incorporate them inside CVS. I think most of them are OK, except for the "header" one, since I want to keep the current directory structure (it is the common contrib directory structure)
I will look at the changes tomorrow (I already insertd the
- wxFNB_ALLOW_FOREIGN_DND
- SetSelection now fires the 'Page Change' instead of OnLeftDown
- All XPM files were moved to fnb_resources.cpp file, fnb_resources.h now externs them all
- Fixed the drawing issue mentioned by Ceniza
OnDropTagret already contains the mentioned fix, ( see above new style: wxFNB_ALLOW_FOREIGN_DND )
With regards,
Eran
Most of the changes are making sense, and I will try to incorporate them inside CVS. I think most of them are OK, except for the "header" one, since I want to keep the current directory structure (it is the common contrib directory structure)I didn't understand that one anyway, having the headers in the "standard contrib" fashion works nicely, if we add one more path to the project, doesn't it?
Most of the changes are making sense, and I will try to incorporate them inside CVS. I think most of them are OK, except for the "header" one, since I want to keep the current directory structure (it is the common contrib directory structure)I didn't understand that one anyway, having the headers in the "standard contrib" fashion works nicely, if we add one more path to the project, doesn't it?
Could somebody please while moving around & commenting stuff expose the VC8 style to us poor users? :DDoes that refer to how to enable it?
Try to use other styles (try the VC8 style) until the next minor release, which I will make shortly due to number of little, but annoying bugs that I already fixed.I'd love to try VC8, but C::B doesn't allow me to choose that :(
Here is the patch. :)
Here is the patch. :)
Do you got also no-close buttons?
I think not because VS8 doesn't AFAIK.But if that's the case, why isn't there the close button that was before at the right?
`wx-config --cflags`
`wx-config --libs`
the old close button was removed for save space. Hehe, the majority seems to prefer to firefox 2.0 way ;-)
(less mouse-miles)
the VC style does not support the close button on the tab yet, that's stated in the release notes of wxFNB 1.5.
That's why I didn't add the VC8 style yet.
Well gonna add it, but don't come complaining about the close button ;-)
When releasing v2.0 there was a bug and VC8 style didnt get the close buttons (if you look closely, you will see that the control does make space for them :wink:)
A fix for this is already in CVS, I think tomorrow (Sunday) I will relelase v2.1 which include the 'x' button on the tab when using vc8 and the discuessed bugs
Eran
Project | Remove Files...
It does absolutely nothing. It doesn't crash. It doesn't bring up a dialog. Now I just edit the .CBP file to remove files from my projects.
Project | Remove Files...
It does absolutely nothing. It doesn't crash. It doesn't bring up a dialog. Now I just edit the .CBP file to remove files from my projects.
Hi All,
A quick update:
wxFlatNotebook V2.1 is released and can be downloaded from SF.
here is summary:
Accepted changes:
- Added style wxFNB_ALLOW_FOREIGN_DND
- DeletePage, RemovePage now accepts second argument 'notify' to allows user to enable/disable
firing of the PAGE_CLOSE/CLOSING events
- All XPM files are now located under fnb_reousrces.cpp, include fnb_resources.h
if you need them :)
- OnRightDown - the if( m_pRightClickMenu ) was removed, when looking at the code
I did support for custom user menus, but forgot to remove this 'if' ...
- SetSelection now fires the events: wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CHANGED/ ING instead of OnLeftDown
- OnDropTarget - changed to fit the new style wxFNB_ALLOW_FOREIGN_DND
- Fixed drawing issues with VC7.1 & Fancy style AND bottoms tabs
- Added the missing 'x' button on active tab for VS8 style
Not accepted:
- Changes to the header include (1, 2, 3)
- AddPage, InsertPage - Not accepted, I am not sure if it is needed anymore. However, I DO know
that a invisible tab must have -1, -1 position set. So far I did not get any drawing
artifacts, can you guys check and tell me if it still exists?
- OnMiddleDown - like you mentioned, this patch can safely be ignored
Hope now it will be easier for you to handle new versions of wxFlatNotebook :)
Eran
1 *important* change in wxFlatNotebook.cpp : the comment where the boss's name is mentioned "Yiannis".
In your sources it's misspelled ... we don't want to get the Don angry Wink
it does nothing until you select any project in the project manager pane."Add Files.." works anytime and "Remove Files..." only works when a project is selected. That discontinuity is why I didn't look any further. Add, Add Recursively, and Remove must behave exactly the same. You have some options:
Quote1 *important* change in wxFlatNotebook.cpp : the comment where the boss's name is mentioned "Yiannis".
In your sources it's misspelled ... we don't want to get the Don angry Wink
I could not find it in my sources ... maybe I deleted it by accident? :oops:
just give me the line number and source (and the comment) and I will add it again ...
Eran
// Thanks to Yiannis AKA Mandrav
it does nothing until you select any project in the project manager pane."Add Files.." works anytime and "Remove Files..." only works when a project is selected. That discontinuity is why I didn't look any further. Add, Add Recursively, and Remove must behave exactly the same. You have some options:
1 All grayed out when a project is not selected
2 All available when a workspace contains exactly one project even if it isn't selected
3 An irritating dialog is displayed telling me to click on something or other before trying again.
4 Both always apply to the project that is currently active. There is no need to select it. The options were never greyed out or non working before because there must always be an active project and what does active mean anyways if not that?
I prefer #4 because that's the way Add already works. If I want to add to a project other than the active one I can right click.
wxFlatNotebook V2.1 is released and can be downloaded from SF.
<snip>
Not accepted:
- AddPage, InsertPage - Not accepted, I am not sure if it is needed anymore. However, I DO know
that a invisible tab must have -1, -1 position set. So far I did not get any drawing
artifacts, can you guys check and tell me if it still exists?
I agree with this behavior, and I can confirm it.
BUT, using your solution causes another problem:
When I open the demo, and typing Ctrl+N a new page is added
and set as selected.
Now, when the room for drawing tabs is full, and scrolling is needed, the active tab is not visible until the next Ctrl+N !
in other words, your solution affects the visibility of the selected tab in other cases.
I still think that the behavior you descrivbed is a bug, and I will find another way to solve it.
With regards,
Eran
MinGW lib generation has a bug. Each time I load the Interactive Data Objects project, "lib" gets added to the beginning of the lib name. This results in a succession of library names.
IDO.a
libIDO.a :shock:
liblibIDO.a
libliblibIDO.a
It's pretty cute but darned annoying to keep going back and removing lib.
Because I didn't believe that it would have been fixed within the last 8 days.