User forums > Nightly builds

The 12 october 2006 build is out.

<< < (5/13) > >>

mandrav:

--- Quote from: rjmyst3 on October 13, 2006, 01:40:19 pm ---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 ...

--- End quote ---

Then it seems like eran will "have to" accept a patch due to popular demand, lol :P

thomas:

--- Quote from: mandrav on October 13, 2006, 01:31:16 pm ---Yes, of course itwould be better if eran (not Arto ;)) would incorporate them
--- End quote ---

Oi, Arto tricked me with his Bazaar comment! Sorry :)

killerbot:
this is what we did to the wxFNB 2.0 sources :

--- Quote ---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)


--- End quote ---

Note : I already compared with the new sources from eranif in cvs, and the set of differences already reduced ;-)

So @eranif : could you take a look on what we did, and see if it makes sense for you to incorporate them in the offcial product.

eranif:
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

RJP Computing:
eranif,

I second/third/fourth the move to svn.

Thanks for your effort and the control is great.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version