Author Topic: The 12 october 2006 build is out.  (Read 50428 times)

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: The 12 october 2006 build is out.
« Reply #15 on: October 13, 2006, 12:51:06 pm »
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 ;)

Well, this is (should be) a Bazaar after all.
« Last Edit: October 13, 2006, 12:57:56 pm by artoj »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: The 12 october 2006 build is out.
« Reply #16 on: October 13, 2006, 01:12:40 pm »
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.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: The 12 october 2006 build is out.
« Reply #17 on: October 13, 2006, 01:31:16 pm »
Our changes are not that simple ;).

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...
But why is the rum gone!

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?

Yes, of course itwould be better if eran (not Arto ;)) would incorporate them in the codebase but until he does we have no other option.
The other changes, I did them quite some time back now and I can't remember them without looking at the code...
Anyway, killerbot will document them and we 'll see.
Be patient!
This bug will be fixed soon...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: The 12 october 2006 build is out.
« Reply #18 on: October 13, 2006, 01:33:56 pm »
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.

if you use WinMerge you can suppress all white-space changes and find out the "real" patch

Offline rjmyst3

  • Multiple posting newcomer
  • *
  • Posts: 117
    • wxFormBuilder
Re: The 12 october 2006 build is out.
« Reply #19 on: October 13, 2006, 01:40:19 pm »
Quote
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.

I agree with thomas. As a developer of another project using wxFNB, we too would appreciate wxFNB in svn. 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 ...

Another patch that we got to "harvest" from the codeblocks team is prevention of drag'n'drop to foreign flatnotebooks - I've already submitted this patch to eran (with credit to you guys) and he has implemented it.

To summarize, if we both external'd the source from eran's svn repository, I think everyone would be better off.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: The 12 october 2006 build is out.
« Reply #20 on: October 13, 2006, 01:42:46 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 ...

Then it seems like eran will "have to" accept a patch due to popular demand, lol :P
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: The 12 october 2006 build is out.
« Reply #21 on: October 13, 2006, 01:52:14 pm »
Yes, of course itwould be better if eran (not Arto ;)) would incorporate them

Oi, Arto tricked me with his Bazaar comment! Sorry :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: The 12 october 2006 build is out.
« Reply #22 on: October 13, 2006, 03:11:00 pm »
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)


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.

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: The 12 october 2006 build is out.
« Reply #23 on: October 13, 2006, 03:28:01 pm »
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

Offline RJP Computing

  • Almost regular
  • **
  • Posts: 135
    • RJP Computing
Re: The 12 october 2006 build is out.
« Reply #24 on: October 13, 2006, 03:41:36 pm »
eranif,

I second/third/fourth the move to svn.

Thanks for your effort and the control is great.
« Last Edit: October 13, 2006, 04:16:23 pm by RJP Computing »
- Ryan

Ubuntu/WinXP, AMD Athlon 64 3000+, 1000MB RAM, AC 97 Audio, ATI Radeon 9600XT 256MB

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: The 12 october 2006 build is out.
« Reply #25 on: October 13, 2006, 04:06:59 pm »
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?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: The 12 october 2006 build is out.
« Reply #26 on: October 13, 2006, 04:07:08 pm »
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


Then the day after tomorrow, I will sync our sources with your's in cvs (have already done that today, but won't commit yet) ;-) , or whenever you get to it

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: The 12 october 2006 build is out.
« Reply #27 on: October 13, 2006, 04:08:11 pm »
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?

will change that accordingly on the "day after tomorrow" :-)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: The 12 october 2006 build is out.
« Reply #28 on: October 13, 2006, 04:11:24 pm »
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?

As I commented to killerbot (but seems like he missed it), this is not a problem: we can always re-arrange them like in the original sources.
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: The 12 october 2006 build is out.
« Reply #29 on: October 13, 2006, 04:19:33 pm »
no I didn't miss it, I just gave a state on what is changed NOW, the future will be different (include difference will be removed, eranif already incorporated some of our changes and maybe the others [no not the others from LOST ;-) ]