Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: tereshkosg on June 12, 2008, 07:57:54 pm

Title: Multi File editing
Post by: tereshkosg on June 12, 2008, 07:57:54 pm
Hi everyone,

First of all thanks to the developers for CodeBlocks IDE.

Is it possible to edit two files simultaneously ... basically place them next to each other. In other word split the view .. but with two different files?

Thanks
Title: Re: Multi File editing
Post by: MortenMacFly on June 13, 2008, 08:53:46 am
Is it possible to edit two files simultaneously ... basically place them next to each other. In other word split the view .. but with two different files?
A search in the forums would have revealed the answer, too... Hence I am giving it another time: No.
Split view does only work on the same file.
Hence if I really need another file for comparison I have setup C::B as a "tool" within the tools menu and provide the file I want to see as parameter. This will just open another (temporary) C::B session. Another options would be to use just "another" editor as tool, e.g. SciTE.
Title: Re: Multi File editing
Post by: tereshkosg on June 13, 2008, 02:39:49 pm
I appologize if I have re-asked the "asked so many times" question.

  Do you know if it is planned to incorporate this feature in the IDE? I would strongly suggest that. This is something that so far Eclipse is ahead of C::B with. I have 1680x1050 screen resolution on my 22" Samsung Syncmaster and having one edit window in front of me is totally inefficient.

Besides that, great job!
Title: Re: Multi File editing
Post by: dje on June 13, 2008, 04:05:50 pm
You should use a smaller screen  :lol:

I agree this should be a great improvement.
You can try code snippets plugin or even ThreadSearch plugin to have 2 views on 2 different files at the same time but they don't provide an integrated C::B editor.

Dje
Title: Re: Multi File editing
Post by: MortenMacFly on June 13, 2008, 05:04:48 pm
Do you know if it is planned to incorporate this feature in the IDE?
I believe the only good way to do it is through a(ny kind of) layout manager. Thus if wxFlatNotebook would allow to detach tabs we are "done". I am not sure if probably wxAuiNotebook can do this... there was a patch IIRC somewhere in the patch tracker that tried to achieve this behaviour.
Title: Re: Multi File editing - strongly agree...
Post by: Alexis on June 13, 2008, 05:35:41 pm
... that it is an important feature C::B is lacking.

Visual Studio and Eclipse have it.

And I know C::B developpers are aware of it ; but it seems quite complicated to implement.

Anyway, thanks a lot to devs for their great work !
Title: Re: Multi File editing
Post by: Der Meister on June 15, 2008, 03:18:32 pm
I am not sure if probably wxAuiNotebook can do this... there was a patch IIRC somewhere in the patch tracker that tried to achieve this behaviour.
wxAuiNotebook can do this. However, I couldn't find the patch you were talking about. Therefore I wrote my one patch:
https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=2495&group_id=5358

This patch replaces the wxFlatNotebook containing the open editors by wxAuiNotebook. This allows detaching the editor and dragging it at another position. That way it is possible to edit two different files at one.
This patch also removes the old editor splitting mechanism as it is no more required.

Small drawback: The style of the tabs looks different than the style of wxFlatNotebook and cannot be changed from the application (yet). I see two possible solutions here: Either change replace all occurences of wxFlatNotebook by wxAuiNotebook or provide a custon wxAuiTabArt that implements the necessary styles.

Edit:
One thing I forgot about: Some contrib plugins need changes when the patch mentioned above is applied. I don't want to file an extra ticket on berlios for this therefore I'm just posting the necessary changes here:
Code
Index: src/plugins/contrib/ThreadSearch/ThreadSearchThread.cpp
===================================================================
--- src/plugins/contrib/ThreadSearch/ThreadSearchThread.cpp (revision 5095)
+++ src/plugins/contrib/ThreadSearch/ThreadSearchThread.cpp (working copy)
@@ -20,7 +20,7 @@
  #include "configmanager.h"
 #endif
 
-#include <wx/wxFlatNotebook/wxFlatNotebook.h>
+#include <wx/aui/auibook.h>
 
 #include "ThreadSearchThread.h"
 #include "ThreadSearchEvent.h"
Index: src/plugins/contrib/wxSmith/wxsresource.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxsresource.cpp (revision 5095)
+++ src/plugins/contrib/wxSmith/wxsresource.cpp (working copy)
@@ -24,7 +24,7 @@
 #include "wxsextresmanager.h"
 #include "wxsresourcetreeitemdata.h"
 
-#include <wx/wxFlatNotebook/wxFlatNotebook.h>
+#include <wx/aui/auibook.h>
 #include <editormanager.h>
 
 namespace
Index: src/plugins/contrib/keybinder/cbkeybinder.cpp
===================================================================
--- src/plugins/contrib/keybinder/cbkeybinder.cpp (revision 5095)
+++ src/plugins/contrib/keybinder/cbkeybinder.cpp (working copy)
@@ -1002,25 +1002,14 @@
     {
         wxWindow* pWindow = (wxWindow*)(event.GetEventObject());
         cbEditor* ed = 0;
-        cbStyledTextCtrl* p_cbStyledTextCtrl = 0;
-        cbStyledTextCtrl* pLeftSplitWin = 0;
-        cbStyledTextCtrl* pRightSplitWin = 0;
         ed  = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
         if (ed)
-        {   p_cbStyledTextCtrl = ed->GetControl();
-            pLeftSplitWin = ed->GetLeftSplitViewControl();
-            pRightSplitWin = ed->GetRightSplitViewControl();
-            //Has this window been split?
+        {
             //**This is a temporary hack until some cbEvents are defined**
-            if ( pWindow && (pRightSplitWin == 0) )
-            {
-                //-if (pRightSplitWin eq pWindow)
-                //-{    Attach(pRightSplitWin);
-                if (pWindow->GetParent() == ed)
-                {   LOGIT( _T("OnWindowCreateEvent Attaching:%p"), pWindow );
-                    AttachEditor(pWindow);
-                }
-            }
+ if ( pWindow && pWindow->GetParent() == ed)
+ {   LOGIT( _T("OnWindowCreateEvent Attaching:%p"), pWindow );
+ AttachEditor(pWindow);
+ }
         }
     }//if m_bBound...
 
Title: Re: Multi File editing
Post by: MortenMacFly on June 16, 2008, 10:00:29 am
I am not sure if probably wxAuiNotebook can do this... there was a patch IIRC somewhere in the patch tracker that tried to achieve this behaviour.
wxAuiNotebook can do this. However, I couldn't find the patch you were talking about. Therefore I wrote my one patch:
https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=2495&group_id=5358
Wow... To be honest: I am speechless. I applied the patch and it just works. Very no... VERY nice work this is! Pretty cool!
Title: Re: Multi File editing
Post by: MortenMacFly on June 16, 2008, 10:38:06 am
I am not sure if probably wxAuiNotebook can do this... there was a patch IIRC somewhere in the patch tracker that tried to achieve this behaviour.
wxAuiNotebook can do this. However, I couldn't find the patch you were talking about. Therefore I wrote my one patch:
https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=2495&group_id=5358
Wow... To be honest: I am speechless. I applied the patch and it just works. Very no... VERY nice work this is! Pretty cool!
Ok: here are some testing results:
- Opening files works (it opens them as another tab in the current active view)
- Searching / activating (in) files from a list works
- Different styles work (C++/XML for example)
- Undocking/Re-attaching works
- (Re-)Ordering tabs works
- Debugging across multiple files in different views / tabs work (cool!)
- Opening an already open file works (activates the right view/tab)
- Replacing in multiple file works (all files get "dirty")
- Saving all modified files works.
- (...continuing...)

Who is willing to test this under Linux?
Title: Re: Multi File editing
Post by: Alexis on June 16, 2008, 11:15:23 am
Congratulations, guys, for this nice achievement.
Title: Re: Multi File editing
Post by: mariocup on June 16, 2008, 11:38:00 am
Hi,

I tested the patch yesterday under windows and had the following problem working with BrowseTracker. If I switch between different files using ALT+right/left the selected file gets the focus but then the focus returns again to the current opened file. Can you reproduce this behaviour?

Thx,

Mario
Title: Re: Multi File editing
Post by: MortenMacFly on June 16, 2008, 11:50:04 am
I tested the patch yesterday under windows and had the following problem working with BrowseTracker.
I don't use this plugin but I compiled/installed it now.

It seems the "right" tab get's quickly activated but then the current active one is re-activated. However, for the first choice it works. Seems like a bug in BrowseTracker to me... I don't know this plugin... probably Pecan can have a look into?!
Title: Re: Multi File editing
Post by: Der Meister on June 16, 2008, 11:52:20 am
Note that this problem does not appear on Linux.
Title: Re: Multi File editing
Post by: Der Meister on June 16, 2008, 12:03:39 pm
- Opening files works (it opens them as another tab in the current active view)
- Searching / activating (in) files from a list works
- Different styles work (C++/XML for example)
- Undocking/Re-attaching works
- (Re-)Ordering tabs works
- Debugging across multiple files in different views / tabs work (cool!)
- Opening an already open file works (activates the right view/tab)
- Replacing in multiple file works (all files get "dirty")
- Saving all modified files works.
- (...continuing...)

Who is willing to test this under Linux?
Just tested on Linux and all tests passed without problems.
Title: Re: Multi File editing
Post by: Pecan on June 16, 2008, 01:23:21 pm
I tested the patch yesterday under windows and had the following problem working with BrowseTracker.
I don't use this plugin but I compiled/installed it now.

It seems the "right" tab get's quickly activated but then the current active one is re-activated. However, for the first choice it works. Seems like a bug in BrowseTracker to me... I don't know this plugin... probably Pecan can have a look into?!

Acknowledged. I'm not in a position to test/debug right now, but will do so some time this week.
Title: Re: Multi File editing
Post by: mariocup on June 16, 2008, 05:02:31 pm
The patch is really cool :D

It would be nice if the configuration of the split windows is saved per project. As far as I know codeblocks saves only the open files and the tab positions in the .layout files. Is there a chance to save the split settings too?

Thx,

Mario
Title: Re: Multi File editing
Post by: MortenMacFly on June 16, 2008, 05:27:37 pm
I think we all here love the work of "Der Meister".

Hence just to avoid the "apply, apply" questions:
IMHO this patch has to be used very carefully and is a very special case due to:
1.) Binary compatibility with 08.02 basically is lost.
2.) This mix of wxFlatNotebook / wxAuiNotebook should be cleaned up (as "Der Meister" suggested: Make all wxAuiNotebook).
3.) MAC testing is needed, too.
4.) Layout should be saved (as mariocup suggested).
5.) We need some time for plugin devs to adopt.

So this does not mean it will be rejected (of course not) but it most likely will not appear in the nightlies any time soon. It is more likely to appear in a special branch which needs to be maintained by somebody obviously, probably until the next official release.
Title: Re: Multi File editing
Post by: JGM on June 16, 2008, 05:56:16 pm
really cool! no more third party components  :)
Title: Re: Multi File editing
Post by: killerbot on June 16, 2008, 08:12:34 pm
really cool! no more third party components  :)

wxScintilla, TinyXml  8)
Title: Re: Multi File editing
Post by: rhf on June 16, 2008, 09:20:09 pm
Der Meister,
Great!  Based on some very quick tests, this appears to be is a very useful feature.
However, I am a little puzzled about the removal of the splitting mechanism.
... This patch also removes the old editor splitting mechanism as it is no more required.
At times, it is very handy to have split views of the same file.
Using your patch, I could not figure out how to do that.  Perhaps, I am missing something.
Thanks for your good work.
rhf
Title: Re: Multi File editing
Post by: Der Meister on June 16, 2008, 09:48:18 pm
No, you are not missing anything.

I know that it is not possible to have two views of the same file with this patch any more. However, as far as I know this feature wasn't used very often. wxAuiNotebook has some splitting mechanism, therefore this feature could probably be kept even with this patch. But I don't think this is worth the effort and splitting editors in an already splitted notebook might even be somewhat confusing. I would like to hear more opinions on that issue.
Title: Re: Multi File editing
Post by: dje on June 16, 2008, 09:50:32 pm
No, you are not missing anything.

I know that it is not possible to have two views of the same file with this patch any more. However, as far as I know this feature wasn't used very often. wxAuiNotebook has some splitting mechanism, therefore this feature could probably be kept even with this patch. But I don't think this is worth the effort and splitting editors in an already splitted notebook might even be somewhat confusing. I would like to hear more opinions on that issue.
Der Meister ++  :)
Title: Re: Multi File editing
Post by: rhf on June 16, 2008, 10:01:17 pm
But I don't think this is worth the effort and splitting editors in an already splitted notebook might even be somewhat confusing. I would like to hear more opinions on that issue.
OK!  If it is either/or, I would definitely prefer having the multiple file editing capability.
rhf
Title: Re: Multi File editing
Post by: mariocup on June 16, 2008, 10:36:25 pm
Hi Meister,

I agree that multiple editors are more important than a splitting view of a single file, but in some cases it can be useful, e.g. if you have a source file with a lot of lines and you want to compare two functions within one module.

In my eyes it is important to save the layout of the multiple editor views.:D

Bye,

Mario
Title: Re: Multi File editing
Post by: JGM on June 17, 2008, 07:51:35 am
wxScintilla, TinyXml  8)

hehe, I forgot those!  :P
Title: Re: Multi File editing
Post by: MortenMacFly on June 18, 2008, 02:42:41 pm
Mmmmh... one thing I have noticed:
If I search in files and click on the list of search results the file is opened, the line is focussed but not highlighted anymore. That's quite annoying as you don't really see where you are... there is even no cursor.

Can somebody confirm this? (I am not sure whether it's related to this patch...)
Title: Re: Multi File editing
Post by: Der Meister on June 18, 2008, 03:09:26 pm
It works for me as soon as the editor gets the keyboard focus. I guess this should automatically happen by the following lines in editormanager (function SetActiveEditor):
Code
    if (ed->IsBuiltinEditor())
        static_cast<cbEditor*>(ed)->GetControl()->SetFocus();
Therefore either cbEditor::m_IsBuiltinEditor isn't set to true or cbStyledTextCtrl::SetFocus doesn't work (anymore).

Edit: cbEditor::m_IsBuiltinEditor seems to be true. I don't think that wxPanel::SetFocus has a bug. The issue here on my system os probably related to my window-manager. It is configured in the way that the window below the mouse cursor gets the keyboard focus which isn't the editor in this case. Therefore I guess everything is working fine here for me. It could still be an issue with the patch I posted on berlios because my local working copy already has a lot more modifications (no more wxFlatNotebook for example).
Title: Re: Multi File editing
Post by: MortenMacFly on June 18, 2008, 05:08:08 pm
Code
    if (ed->IsBuiltinEditor())
        static_cast<cbEditor*>(ed)->GetControl()->SetFocus();
This seems in fact to work... but different now. I realised the following:
If you click on a search result you are taken to the right tab (editor) in the view(s). This tab also gets active - so this seems to work. If you press the TAB key now (on Windows) the content of the editor becomes active and the line is highlighted correctly (and the cursor appears). It seems as if the editors tab (where the file name stands) gets activated first. Very, very strange...

At least it gives a clue and is really caused by the patch...

my local working copy already has a lot more modifications (no more wxFlatNotebook for example).
Oh dear... that *really* sounds great... Time to open a SVN branch then... ;-)
Title: Re: Multi File editing
Post by: MortenMacFly on June 19, 2008, 04:55:35 pm
Very, very strange...
OK - I found a way to "reproduce" (it's very simple):
- Have an editor opened and an active line in the editor (visible cursor).
- Now just switch to another application (using ALT+TAB) and then back to C::B.

In my case the editors tab is now selected , the actual editor's content (source code) is not and therefore no line highlighted, no cursor etc... Is this the usual behaviour of a wxAuiNotebook?

Anyone using this patch on Windows/Linux, please tell me: What happens to you?
Title: Re: Multi File editing
Post by: Der Meister on June 25, 2008, 06:57:02 pm
Before I put more effort into this I would like to ask the devs a question: Is this patch desired and will it be applied somewhere in the future? I know it won't be applied immediately because this patch implies big changes (MortenMacFly already named the issues) but I don't want to sacrifice a lot of work for it if no one is willing to apply it to the main codeline.
Title: Re: Multi File editing
Post by: Ceniza on June 25, 2008, 08:02:10 pm
I love the idea, but it's the Don who has the last word about it.
Title: Re: Multi File editing
Post by: MortenMacFly on June 25, 2008, 10:41:48 pm
I clearly vote for it and I already had some discussions with "the Don" about it. It seems he is willing to accept. In the end it's a major new (cool) feature. I am already using it in daily work... ;-)
Title: Re: Multi File editing
Post by: mariocup on June 26, 2008, 08:09:18 am
I would cleary vote for it. I am using it on my personal PC and it is a real benefit for me and if you are used to it you can't live without it. :D
I think that CB has so many users that a willing in testing, so if the feature is added, then it should be soon quite stable.

I suggest that we keep the split view feature, since sometimes it makes sense to see different parts of the same file, if a software module contains a lot of lines and navigating with bookmarks is to annoying.

I do not know if wxAuiNotebook support the following feature but if so we should think about it.

If you open the different files in multiple views it could be helpful to have a minimize button for the different views.

Bye,

Mario
Title: Re: Multi File editing
Post by: mandrav on June 26, 2008, 08:54:07 am
Before I put more effort into this I would like to ask the devs a question: Is this patch desired and will it be applied somewhere in the future? I know it won't be applied immediately because this patch implies big changes (MortenMacFly already named the issues) but I don't want to sacrifice a lot of work for it if no one is willing to apply it to the main codeline.

We were planning to move completely to wxAuiNotebook anyway (which would already be an API breaking change) so the answer is 'yes': when this patch reaches a mature state it will be applied to trunk.

Btw, there's a hack for this sort of thing already in trunk/src/src/app.cpp. At the very bottom of the file. That would be a nice place to start looking for this editor-focus problem (don't know, maybe it's the cause too, have a look).
Title: Re: Multi File editing
Post by: Der Meister on June 27, 2008, 07:10:15 pm
No, it's not the cause. And the Linux-hack doesn't do anything for me.

However, I found the cause for this focus bug: The problem is in EditorManager::SetActiveEditor. This function first gave the active editor the focus and then updated the selection of the notebook. But when changing the selected page wxAuiNotebook sets the focus to the tab of the selected page and therefore removes the focus from the editor. Changing the order of these two steps (e.g. first select the page and then set the focus to the editor) fixed this problem.

Edit: I just updated the patch to reflect the current status of my working copy
Already done/already working:

What doesn't work yet/needs to be done:

The patch is quit big this time because I deleted the complete wxFlatNotebook sources and this is included in the diff and accounts for about 90% of the patch. Some contrib plugins need additional patches. Most of these patches are trivial, except for wxSmith.
Title: Re: Multi File editing
Post by: Belgabor on June 27, 2008, 11:01:51 pm
Sounds great. The layout saving might be a problem though, as far as I know wxAuiNotebook cannot do that. There is a patch on the Kirix forums about that though that was reported to work (I have applied it in my local wxWidgets copy, but haven't worked the functionality into my app yet).
Title: Re: Multi File editing
Post by: Der Meister on June 27, 2008, 11:05:37 pm
I haven't looked into this issue yet, but as I saw no obvious way for saving the layout I already feared that it might get tricky. However, patching wxWidgets is probably a no-go which means that if this is the only way for implementing this feature we would have to wait until wxWidgets officially provides an api for it.
Title: Re: Multi File editing
Post by: MortenMacFly on July 04, 2008, 09:30:48 am
Ok - here are some testing results
1.) The patch does not work under Windows (it stops while trying to remove AUTHORS from wxFlatNotebook)
2.) wxContribItems is broken heavily afterwards because this relies on the wxFlatNotebook library
3.) same applies to lib_finder
4.) I had to exchange some includes with the wxAUI ones in addition to the ones in the patch (I only recall codesnippets atm).

Other that that... looks fine! ;-)
For the issues, including:
What doesn't work yet/needs to be done:
  • Project files update
  • Saving the layout of the editors
  • Styling of the notebooks. Currently 'Settings->Environment->Notebook appearance' has just no effect.

The "solutions" are:
Project files update I have done.
Saving layout and the styling of notebooks remains (IMHO styling we could just remove).
"1.)" I don't know how to resolve but that's not an issue as one of the devs will just do it right when committing... ;-)
"2.)" I resolved by putting wxFlatNotebook under wxContribItems and adding a target to the wxContribItems project file accordingly.
"3.)" I resolved "not so nice" by pointing to wxContribItems. Hence it should be resolved by exchanging the wxFlatNotebook with a "default" one in lib_finder (I don't see the need for a wxFlatNotebook there). Exchanging with wxAUI is not possible atm as lib_finder does it's GUI with wxSmith which does not support wxAUI (yet)... Byo!!! ;-) So this is a work-around anyways.
"4.)" is obviously done, too.
Title: Re: Multi File editing
Post by: Der Meister on July 04, 2008, 09:46:44 am
1.) The patch does not work under Windows (it stops while trying to remove AUTHORS from wxFlatNotebook)
Well, the patch just removes these files therefore this shouldn't be a big problem.

2.) wxContribItems is broken heavily afterwards because this relies on the wxFlatNotebook library
Yes, wxSmith might need its own copy of wxFlatNotebook to work with this patch.


Saving layout and the styling of notebooks remains (IMHO styling we could just remove).
I wouldn't remove the sytling. I think most of it can be implemented as wxAuiNotebook gives you almost complete control over drawing the tabs. The styles used with wxFlatNotebooks should be possible to implement (possibly with borrowing some code from wxFlatNotebook ;) ). Maybe the gradient colors should be removed as wxAuiNotebook automatically grabs the wxAUI colors. The smart-tab option is also useless and I already removed it from my working copy. The option regarding the list or scroll buttons works in my working copy, too.

I will try to implement the styles and then provide another version of the patch. But this may take some time as I'm quite busy working on my diploma thesis and therefore only work on this patch in some little spare time. So don't expect an update in the next few days ;)
Title: Re: Multi File editing
Post by: lexis on July 07, 2008, 12:41:31 am
Hi all.

I've found some bug with tabs drawing. If switch tabs appear at top/bottom then tab line is drawn twice. The doubled wrong tab line is drown above text window (if at top) or scroll bar (if at bottom)

I have compiled a revision 5109 from trunk with dermeister's patch updated at the 27th of July applyed. It has been compiled for Windows with mingw (gcc 3.4.2)

PS: Thank you for the work, is seems perfect!
Title: Re: Multi File editing
Post by: Der Meister on July 22, 2008, 06:24:39 pm
After a long period of silence I updated the patch again. It should apply to the current svn revision. The main thing that changed compared to the last update is that styling of the tabs is possible again (at least to some extend). This means that the page in the enviroment settings dialog is working again, however I removed large parts of the original dialog. Maybe the remaining elements should be merged with some other page in that dialog.

This version of the patch provides three different styles for tabs: The two provided by wxWidgets (Default and Simple) and a Visual Studio 2003 like style. I wrote the rendering class for the last one based on the code of wxDefaultArtProvider and the renderer included in wxFlatNotebook. It's not perfect but working and the main reason for including this was to show how new styles can be added. Little drawback: Due to a bug in wxWidgets changing the art provider for the tabs only works if the height of the tabs differes between the current and the new art provider. I already reported this in the bug tracker for wxWidgets but got no reaction yet.

What still doesn't work yet/needs to be done:
Title: Re: Multi File editing
Post by: MortenMacFly on July 22, 2008, 07:58:19 pm
After a long period of silence I updated the patch again.
...nice! :-) Just compiling...

  • Testing, especially on Windows (patch was developed on Linux)
I do test it in everyday use on Windows XP and Vista. If I don't report any issues - all is fine (for me)... so at least 4 eyes see more than 2.

  • Project files update
Don't worry about this - I have done it in my local copy already. In addition some (newer) plugins required modification, too, which I did (e.g. code snippets).

I have in mind to introduce this wxAUI version of C::B at work, soon. So most likely we get some more feedback. For me (again) it's just working great.
Title: Re: Multi File editing
Post by: Der Meister on July 27, 2008, 04:34:24 pm
I just updated the patch again. The only thing I changed was to fix a regression introduced with one of the last updates (moving a tab around wasn't possible any more).

Currently the patch is in a state where I would say it is feature complete. There were some additional feature requests but not all of them would be really helpfull and for most of them the implementation would be at least very difficult with the current implementation of wxAuiNotebook. For example saving and loading the layout isn't possible yet but as far as I know this is already a feature request in their bug tracker.

So, please go on and test this patch and drop me a note if there are problems. If no issues should be discovered I would like to see this patch applied rather soon because it touches a lot of different files and keeping it in sync with the current trunk for a long time is some tedious work. However, the plugin developer should also have a look at the patch because some plugins need to be changed because they used the wxFlatNotebook implementation of Code::Blocks. The patch already includes the necessary changes for the core plugins but some contrib plugins are affected, too. But most of these changes should be rather trivial.
Title: Re: Multi File editing
Post by: lexis on July 29, 2008, 12:43:19 am
I've created a small patch for some contrib plugins. It simply replaces wxFlatNotebook with wxAuiNotebook.
Quote
Index: BrowseTracker/BrowseSelector.h
===================================================================
--- BrowseTracker/BrowseSelector.h   (revision 5170)
+++ BrowseTracker/BrowseSelector.h   (working copy)
@@ -26,7 +26,7 @@
 #include <wx/bitmap.h>
 
 class wxListBox;
-class wxFlatNotebook;
+class wxAuiNotebook;
 class wxPanel;
 
 // ----------------------------------------------------------------------------
Index: BrowseTracker/BrowseTracker.h
===================================================================
--- BrowseTracker/BrowseTracker.h   (revision 5170)
+++ BrowseTracker/BrowseTracker.h   (working copy)
@@ -33,7 +33,7 @@
 class ProjectData;
 class BrowseMarks;
 class cbStyledTextCtrl;
-class wxFlatNotebookEvent;
+class wxAuiNotebookEvent;
 
 // ----------------------------------------------------------------------------
 // The following have been moved to BrowseTrackerDefs.h
@@ -215,7 +215,7 @@
         void OnProjectLoadingHook(cbProject* project, TiXmlElement* elem, bool loading);
 
         void OnStartShutdown(CodeBlocksEvent& event);
-        void OnPageChanged(wxFlatNotebookEvent& event);
+        void OnPageChanged(wxAuiNotebookEvent& event);
 
         void OnMenuBrowseMarkPrevious(wxCommandEvent& event);
         void OnMenuBrowseMarkNext(wxCommandEvent& event);
Index: headerfixup/defaults.cpp
===================================================================
--- headerfixup/defaults.cpp   (revision 5170)
+++ headerfixup/defaults.cpp   (working copy)
@@ -153,7 +153,7 @@
   AddBinding(_T("CodeBlocks"),_T("GetLogManager"),                _T("logmanager.h"));
   AddBinding(_T("CodeBlocks"),_T("GetMacrosManager"),             _T("macrosmanager.h"));
   AddBinding(_T("CodeBlocks"),_T("GetMessageManager"),            _T("messagemanager.h"));
-  AddBinding(_T("CodeBlocks"),_T("GetNotebook"),                  _T("wx/wxFlatNotebook/wxFlatNotebook.h"));
+  AddBinding(_T("CodeBlocks"),_T("GetNotebook"),                  _T("wx/aui/auibook.h"));
   AddBinding(_T("CodeBlocks"),_T("GetParentProject"),             _T("cbproject.h"));
   AddBinding(_T("CodeBlocks"),_T("GetPersonalityManager"),        _T("personalitymanager.h"));
   AddBinding(_T("CodeBlocks"),_T("GetPlatformsFromString"),       _T("globals.h"));
Index: ThreadSearch/ThreadSearchThread.cpp
===================================================================
--- ThreadSearch/ThreadSearchThread.cpp   (revision 5170)
+++ ThreadSearch/ThreadSearchThread.cpp   (working copy)
@@ -21,7 +21,7 @@
    #include "projectbuildtarget.h"
 #endif
 
-#include <wx/wxFlatNotebook/wxFlatNotebook.h>
+#include <wx/aui/auibook.h>
 
 #include "ThreadSearchThread.h"
 #include "ThreadSearchEvent.h"

As minimum it enables the ThreadSearch plugin.
The BrowseTracker plugin is compiled successfully but failed to start with the next messages:

Quote
02:11:32: BrowseTracker Plugin Logging Started[1.2.74 2008/03/15]
02:11:32: Argv[0][C:\proj\CB\work\src\output\codeblocks.exe] Cwd[C:\proj\CB\work\src\output]
02:11:32: FindAppPath: AbsolutePath[C:\proj\CB\work\src\output]
02:11:32: CfgFolder[C:\Documents and Settings\lexis\Application Data\codeblocks]
02:11:32: ExecFolder[C:\proj\CB\work\src\output]
02:11:32: TrackerCfgFullPath[C:\Documents and Settings\lexis\Application Data\codeblocks\BrowseTracker.ini]
02:11:32: Menubar[0153F008]idMenuViewTracker[953]
02:11:35: Error: Execution of command 'pkg-config --version' failed (error 2: .... .)
02:11:35: Error: Can not enumerate files in directory 'C:\proj\CB\work\src\output/share/codeblocks\lib_finder/predefined' (error 3: .... .)
02:11:35: Error: Can not enumerate files in directory 'C:\Documents and Settings\lexis\Application Data\codeblocks/share/codeblocks\lib_finder/predefined' (error 3: .... .)
Please note: I've replaced real system messages descriptions with dots since it was in Russian at my system...

I've prepaired the patch above an SVN revision 5170 with Der Meister's patch.
It have to be applied to src/plugins/contrib/ dir!

The patch completely skips the Codesnippets, wxSmith (and ContribItems), lib_finder plugins...
Title: Re: Multi File editing
Post by: lexis on July 29, 2008, 05:03:10 pm
You need to compile contrib plugins to use my patch. And you need to apply it over an src/plugins/contrib/ dir.

The patch just replaces wxFlatNotebook related identificators and headers with wxAuiNotebook related ones in ThreadSearch and BrowseTracker plugins.
The Der Meister's patch fixes core CB sources, not contrib plugins.

The ThreadSearch plugin should fail to compile without my patch. Since I use it very often I prepaired the patch for it.

PS: I use WinXP as well

Edit:
As I understand the post I've replied is already removed. But the comments may be useful for some else
Title: Re: Multi File editing
Post by: Pecan on July 29, 2008, 05:07:02 pm
I copied .../cbbeta/trunk to .../cbalpha/trunk (svn 5170) and applied the Der Meister patch via TortoiseSvn (got lots of compaints about mismatched lines).

I then tried to compile it with .../cbalpha/trunk/src/codeblocks.cbp.
I got the following compile error:

Edit: adding "Der Meister" for clarity
Code
-------------- Build: wxFlatNotebook in Code::Blocks ---------------

WARNING: Can't read file's timestamp: C:\Usr\Proj\cbAlpha\trunk\src\sdk\wxFlatNotebook\src\wxFlatNotebook\fnb_resources.cpp
WARNING: Can't read file's timestamp: C:\Usr\Proj\cbAlpha\trunk\src\sdk\wxFlatNotebook\src\wxFlatNotebook\popup_dlg.cpp
WARNING: Can't read file's timestamp: C:\Usr\Proj\cbAlpha\trunk\src\sdk\wxFlatNotebook\src\wxFlatNotebook\renderer.cpp
WARNING: Can't read file's timestamp: C:\Usr\Proj\cbAlpha\trunk\src\sdk\wxFlatNotebook\src\wxFlatNotebook\wxFlatNotebook.cpp
WARNING: Can't read file's timestamp: C:\Usr\Proj\cbAlpha\trunk\src\sdk\wxFlatNotebook\src\wxFlatNotebook\xh_fnb.cpp
mingw32-g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE     -IC:\Usr\Proj\wxWidgets287\include -IC:\Usr\Proj\wxWidgets287\lib\gcc_dll\mswu -Iinclude\wxscintilla\include -Iinclude\tinyxml -Iinclude\wxFlatNotebook\include -IC:\MinGW345\include  -c C:\Usr\Proj\cbAlpha\trunk\src\sdk\wxFlatNotebook\src\wxFlatNotebook\fnb_customize_dlg.cpp -o .objs\sdk\wxFlatNotebook\src\wxFlatNotebook\fnb_customize_dlg.o
ar.exe -r -s sdk\wxFlatNotebook\libwxflatnotebook.a .objs\sdk\wxFlatNotebook\src\wxFlatNotebook\fnb_resources.o .objs\sdk\wxFlatNotebook\src\wxFlatNotebook\popup_dlg.o .objs\sdk\wxFlatNotebook\src\wxFlatNotebook\renderer.o .objs\sdk\wxFlatNotebook\src\wxFlatNotebook\wxFlatNotebook.o .objs\sdk\wxFlatNotebook\src\wxFlatNotebook\xh_fnb.o .objs\sdk\wxFlatNotebook\src\wxFlatNotebook\fnb_customize_dlg.o
ar.exe: creating sdk\wxFlatNotebook\libwxflatnotebook.a
ar.exe: .objs\sdk\wxFlatNotebook\src\wxFlatNotebook\fnb_resources.o: No such file or directory
Process terminated with status 1 (0 minutes, 41 seconds)
0 errors, 11 warnings
 

Title: Re: Multi File editing
Post by: lexis on July 29, 2008, 05:16:30 pm

I copied .../cbbeta/trunk to .../cbalpha/trunk (svn 5170) and applied the patch via TortoiseSvn (got lots of compaints about mismatched lines).

I then tried to compile it with .../cbalpha/trunk/src/codeblocks.cbp.
I got the following compile error ...

You need to apply Der Meister's patch first! It fixes CB and core CB plugins. Sorry for incomplete instructions
Title: Re: Multi File editing
Post by: Pecan on July 29, 2008, 05:19:51 pm
I have indeed appied the Der Meister patch. And verified that it took.

However, I now see that there is no patch to codeblocks.cbp.
What is necessary to make that work?


Edit: adding "Der Meister" for clarity
Title: Re: Multi File editing
Post by: lexis on July 29, 2008, 05:23:27 pm
(got lots of compaints about mismatched lines).

See the last post at page 3 of this topic! If yopu see inside of patch You'll see that it is needed to apply it to different point in source tree. The patch is very small so it possible to see
Title: Re: Multi File editing
Post by: Pecan on July 29, 2008, 05:37:58 pm
TortoiseSVN is refusing to apply the Der Meister patch to "mismatched lines".

So, I think I'll just wait until there's a repository with the patch in it.

Edit: adding "Der Meister" for clarity
Title: Re: Multi File editing
Post by: lexis on July 29, 2008, 06:08:02 pm
TortoiseSVN is refusing to apply the patch to "mismatched lines".

So, I think I'll just wait until there's a repository with the patch in it.

Please, try to apply it to trunk/src/plugins/contrib dir.
The patch had created with TortoiseSVN at my WinXP so it should work!
Title: Re: Multi File editing
Post by: Der Meister on July 29, 2008, 06:22:31 pm
However, I now see that there is no patch to codeblocks.cbp.
What is necessary to make that work?
I've never built Code::Blocks using the project file, therefore I didn't patch it. However, I think the only changes should be:
Title: Re: Multi File editing
Post by: mandrav on August 17, 2008, 12:14:04 pm
I 've finally found the time to try this patch on Windows. Mostly a nice job Der Meister :).
I only have two little gripes:


Title: Re: Multi File editing
Post by: Der Meister on August 18, 2008, 10:50:47 am
  • wxAuiNotebook (on windows at least) has this "sunken" (as opposed to "flat") border which is ugly - can we do anything about it?
I just compared Code::Blocks with wxAuiNotebook on Linux with Code::Blocks with wxFlatNotebook on Windows. I didn't see much difference and unfortunately I don't have the possibility to build Code::Blocks on Windows at the moment. However, I'll try some different window style flags and see what changes.

  • (Shift-)Ctrl-Tab is no longer working - can only switch between tabs by using the mouse: not good
That seems to be a missing feature in wxAui/wxAuiNotebook. However, I found a forum post which looks quite promising:
http://www.kirix.com/forums/viewtopic.php?f=16&t=528
I'll try to add this and I hope I find enough time to update the patch before the end of this week.
Title: Re: Multi File editing
Post by: DrewBoo on August 18, 2008, 11:48:02 pm
FWIW, I tried the patch on my work Solaris machine.



Code::Blocks-wxAUI seems to run fine on Solaris, and I really like that tabs can be drag-sorted, even in the "Logs & Others" pane.

I am excited by this development that Der Meister has kicked off!
Title: Re: Multi File editing
Post by: Pecan on August 19, 2008, 02:00:29 am
CodeSnippets did not build, however it never has been buildable, as it uses nonstandard C++.

What part of CodeSnippets is nonstandard C++ ?

Maybe we can fix that if we knew what you mean.
Title: Re: Multi File editing
Post by: DrewBoo on August 19, 2008, 06:06:24 pm
What part of CodeSnippets is nonstandard C++ ?

Maybe we can fix that if we knew what you mean.

 :lol:  I guess i was being a bit coy with that.  I just didn't want to threadjack this already-awesome thread.

The forum gods can bump this to its own topic if they so decide.

Let me get something easy out of the way first. src/sdk/scripting/sqplus/SquirrelVM.cpp needs to include <string.h>.  Just throw it at the top and all is fine.

You can see string functions being used early in that file.  It's probably a safe guess that Windows and popular Linux build environments are including that indirectly, so that omission hasn't been noticed.

I'll be back here in a bit after I have time to reproduce the CodeSnippits issues.




Title: Re: Multi File editing
Post by: Der Meister on August 19, 2008, 06:32:56 pm
Let me get something easy out of the way first. src/sdk/scripting/sqplus/SquirrelVM.cpp needs to include <string.h>.  Just throw it at the top and all is fine.
I don't see any functions in this file which require this header file. Could you please specify the line you are talking about?
Anyway, including <string.h> in a C++ source file is always an error. Either include <string> which is the header file containing std::string or include <cstring> which is the correct file if the C-header file <string.h> is needed.
Title: Re: Multi File editing
Post by: DrewBoo on August 19, 2008, 07:01:30 pm
What part of CodeSnippets is nonstandard C++ ?

Maybe we can fix that if we knew what you mean.

In memorymappedfile.cpp, you'll see that every function has separate Windows code and Linux code.  It follows this pattern:

Code
#ifdef __WXMSW__
  // (Code intended to build in Windows)
#else
  // (Code intended to build in Linux)
#endif


Since __WXMSW__ is not defined, my build blows up trying to build Linux-specific code.

Code
../memorymappedfile.cpp: In member function 'long int wxMemoryMappedFile::MapFile(const wxString&, bool)':
../memorymappedfile.cpp:107: error: 'open' was not declared in this scope
../memorymappedfile.cpp:124: error: 'MAP_FILE' was not declared in this scope

Thought #1:  Does wxWindows include a file operation API so we can outright eliminate this fragile code?

Thought #2:  I've read that MAP_FILE is legacy and is #defined as 0.  Can someone verify this? 

I don't know what this would break on other platforms, but I'm adding this code to the file and am trying a build now....

Code
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#ifndef MAP_FILE
     #define MAP_FILE 0
#endif
Title: Re: Multi File editing
Post by: DrewBoo on August 19, 2008, 07:05:10 pm
I don't see any functions in this file which require this header file. Could you please specify the line you are talking about?

Can do.  Here's the build output from what's in the svn trunk.

Code
SquirrelVM.cpp: In static member function 'static SquirrelObject SquirrelVM::CompileBuffer(const SQChar*, const SQChar*)':
SquirrelVM.cpp:109: error: 'strlen' was not declared in this scope
Title: Re: Multi File editing
Post by: Der Meister on August 19, 2008, 07:58:43 pm
Actually it uses STRLEN which seems to be a preprocessor macro defined by squirrel which evaluates to strlen on your system. I would say this is clearly a squirrel bug because it is squirrel's code. It don't think it is a proper fix but including <cstring> in this file might work as temporary hack to solve the problem.
Title: Re: Multi File editing
Post by: DrewBoo on August 19, 2008, 08:43:37 pm
Actually it uses STRLEN which seems to be a preprocessor macro defined by squirrel which evaluates to strlen on your system.

Yup!  That preprocessor macro is defined on line 17 of the same source file.
Title: Re: Multi File editing
Post by: Der Meister on August 21, 2008, 07:30:08 pm
I updated the patch (https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=2495&group_id=5358) again. As requested it adds the possibility to navigate between open editors using Ctrl+Tab. However, on wxGTK and wxMAC other key combinations need to be used as Ctrl+Tab does not work on these systems. I guess it get's eaten by GTK (although it actuall allows navigation throw the tabs, at least on wxGTK). Therefore wxGTK users have to use Ctrl+, and wxMAC users should use Alt+Tab to see the new dialog for navigation. This follows the example in the link to the kirix forum posted by me a few days ago.

Referreing to the sunken border: Changing the style flag for the border didn't change anything for me on wxGTK. I have no idea how things look when using wxMSW, so I guess someone else needs to investigate that.

Last thing to mention: In this update I did not include the removal of the wxFlatNotebook files to keep the patch small. But these files aren't used any more (except by some contrib plugins which need to be fixed), therefore they can be deleted manually.
Title: Re: Multi File editing
Post by: mandrav on August 21, 2008, 10:09:09 pm
However, on wxGTK and wxMAC other key combinations need to be used as Ctrl+Tab does not work on these systems. I guess it get's eaten by GTK (although it actuall allows navigation throw the tabs, at least on wxGTK).

Ok, I 'm confused now because wxFNB works with (shift-)ctrl-tab just fine?!?
And every other app on linux uses ctrl-tab for tabs navigation so I don't really get what you mean by "get's eaten by GTK"...
Title: Re: Multi File editing
Post by: killerbot on August 21, 2008, 10:09:16 pm
Ctrl+ is normally used to increase the font
Title: Re: Multi File editing
Post by: MortenMacFly on August 22, 2008, 08:48:28 am
I updated the patch (https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=2495&group_id=5358) again.
Confirmed, applied and testing... Looks good so far. The only thing missing is an update of the project file(s) as the files switcherdlg.{cpp/h} have been added.
Title: Re: Multi File editing
Post by: MortenMacFly on August 22, 2008, 02:24:33 pm
The only thing missing is an update of the project file(s) as the files switcherdlg.{cpp/h} have been added.
Besides this: The switch algorithm is not very intuitive. If I initiate "CTRL+TAB" the tab that is currently active is selected. Usually the next tab or (even better) the previous active one would be selected. Other wise the first "CTRL+TAB" has no function.
Title: Re: Multi File editing
Post by: Der Meister on August 22, 2008, 08:03:29 pm
Ok, I 'm confused now because wxFNB works with (shift-)ctrl-tab just fine?!?
And every other app on linux uses ctrl-tab for tabs navigation so I don't really get what you mean by "get's eaten by GTK"...
Pressing Ctrl+Tab indeed switches the tabs - but it does not work as accelerator to open the dialog. It just switches to the next tab. I have no idea how wxFNB handles this. I looked at its code as well as at the code of wxAuiNotebook but that didn't help much. I saw some basic handling for this in wxAuiNotebook but as far I unterstood it would generate an event that would allow custom handling. However, I wasn't able to handle this event because I simply didn't get it. Neither in the app nor in the editormanager. The next thing is that the example in the kirix forum (where I got the class for this dialog from) mentions the same issue and provides the same workaround as I implemented.
I am confused about this whole issue, too, but didn't find a solution yet.

Edit: After a second look at the source of wxAuiNotebook things are more clear to me. wxAuiNotebook already handles the wxNavigationKeyEvent which is generated when pressing Ctrl+Tab and it just switches to the next tab. However, according to the kirix forum post I linked a few posts ago this should be different on windows - but I could not check this. Morten, did you test the patch on Windows?
I don't see an easy way to get Ctrl+Tab to show the switching dialog at the moment as wxAuiNotebook seems to consume the corresponding event and Ctrl+Tab doesn't seem to work as accelerator for menus on wxGTK. Has anyone an idea to get around this issue?

Quote from: MortenMacFly
Besides this: The switch algorithm is not very intuitive. If I initiate "CTRL+TAB" the tab that is currently active is selected. Usually the next tab or (even better) the previous active one would be selected. Other wise the first "CTRL+TAB" has no function.
I didn't notice that, but I guess you're right. I think fixing this shouldn't be too difficult, at least selecting the next tab. Selecting the last active one could be more difficult and is actually already handled by the BrowseTracker-plugin. I don't think this needs to be duplicated.

Quote from: MortenMacFly
The only thing missing is an update of the project file(s) as the files switcherdlg.{cpp/h} have been added.
Yes, I know. But I still don't use the project-file to build Code::Blocks therefore I didn't update it. But I updated the autotools-files ;)

Quote from: killerbot
Ctrl+ is normally used to increase the font
The key combination is Ctrl+, and not Ctrl++ ;)
Title: Re: Multi File editing
Post by: DrewBoo on August 25, 2008, 10:05:43 pm
There's a small usability bug that's introduced with this patch.  I imagine a small adjustment to the patch will fix it.

The new tabs will not consider themselves selected when they are right-clicked.  While I don't personally care whether right-clicking will select a tab, this change introduces a bug.

Steps to reproduce:


What happens with unpatched Code::Blocks, a.k.a. "The expected result":


What happens with this patch applied:

Title: Re: Multi File editing
Post by: plee3 on October 30, 2008, 06:08:57 am
I built a new version of CodeBlocks for Windows using the latest version of this patch on top of CodeBlocks revision 5189. After modifying the Codeblocks project file to include the new files created by the patch, I was able to successully compile and link the program.

Everything seems to run, but I am confused on how to undock the editor window and create new editor windows so I can view multiple files at the same time. Is there a new editor keystroke or mouse command to create new editor windows?

Thanks... Patrick
Title: Re: Multi File editing
Post by: mariocup on October 30, 2008, 07:41:18 am
Hi plee3,

you have to click with the left mouse button on a editor tab, then hold the mouse and move the editor window to a place. When the docking gets active you will see some kind of "preview". If you want to undock the windows you can drag the tab of one view to the tab list of a different view.

Bye,

Mario
Title: Re: Multi File editing
Post by: plee3 on October 30, 2008, 06:33:17 pm
Hi plee3,

you have to click with the left mouse button on a editor tab, then hold the mouse and move the editor window to a place. When the docking gets active you will see some kind of "preview". If you want to undock the windows you can drag the tab of one view to the tab list of a different view.

Bye,

Mario

That works great! This was the one major missing feature of CodeBlocks that I really needed!

Any idea of when this patch may get folded into the main development trunk so everyone can get this feature?

Thanks... Patrick
Title: Re: Multi File editing
Post by: MortenMacFly on October 30, 2008, 08:36:52 pm
Any idea of when this patch may get folded into the main development trunk so everyone can get this feature?
We currently work on another branch which will be submitted before. But straight after that this patch most likely will be the next major change. A branch does already exist on SVN... I just need to fill it... this will take some more time as I am very busy atm.
Title: Re: Multi File editing
Post by: Jerramy on December 06, 2008, 11:45:24 pm
Bump...

I *love* this IDE (it almost works flawlessly as a portable app, letting me fiddle around with my code in multiple places), but one pane of text is KILLING me.

Does the November 26th build have this feature yet?  I'm not quite brave enough to try rebuilding the IDE.


Title: Re: Multi File editing
Post by: Jenna on December 06, 2008, 11:56:36 pm
Bump...

I *love* this IDE (it almost works flawlessly as a portable app, letting me fiddle around with my code in multiple places), but one pane of text is KILLING me.

Does the November 26th build have this feature yet?  I'm not quite brave enough to try rebuilding the IDE.




No
Title: Re: Multi File editing
Post by: Jerramy on January 29, 2009, 08:47:03 pm
Sorry to be a nag.  Just wondering if this is something we'll ever see, or should I stop holding my breath?
Title: Re: Multi File editing
Post by: Jenna on January 29, 2009, 08:59:54 pm
Sorry to be a nag.  Just wondering if this is something we'll ever see, ...

Yes !

We are still testing, it's a major change, and should come with as less problems as possible.

And please don't forget, that all the devs work on C::B in there spare time, so be patient.
Title: Re: Multi File editing
Post by: dmoore on January 29, 2009, 09:06:51 pm
Sorry to be a nag.  Just wondering if this is something we'll ever see, or should I stop holding my breath?

just suck it up, get the source, apply the patch and run the gcc screen saver.

you can then help out by reporting issues.
Title: Re: Multi File editing
Post by: Jenna on January 29, 2009, 09:45:17 pm
Sorry to be a nag.  Just wondering if this is something we'll ever see, or should I stop holding my breath?

just suck it up, get the source, apply the patch and run the gcc screen saver.

you can then help out by reporting issues.

If he really wants to test the new branch, it would be better to check out the test-branch, as there have been some fixes since the patch was applied:
Quote
svn co svn://svn.berlios.de/codeblocks/branches/wxfnb_to_wxaui .

But he most likely does not want to do that:
I'm not quite brave enough to try rebuilding the IDE.
Title: Re: Multi File editing
Post by: dmoore on January 30, 2009, 03:05:05 am
But he most likely does not want to do that:
I'm not quite brave enough to try rebuilding the IDE.

Sorry, I wasn't trying to be mean. Compiling the source isn't as scary as it sounds. We'll be happy to help if you have any issues.

Title: Re: Multi File editing
Post by: lexis on February 19, 2009, 10:41:23 pm
Hi everybody

I tried to build wxfnb_to_wxaui branch from SVN. And i get 0xC0000005 (Access violation) error when attempting to start CB :-(
Now I've updated to latest 5460 revision but get the same result... Can anybody get me some advance?

upd: WinXP, WxWidgets 2.8.9 (unicode, monolithic, bla..bla), MinGW 3.4.5
Title: Re: Multi File editing
Post by: dmoore on February 19, 2009, 10:45:44 pm
did you run the update script?
Title: Re: Multi File editing
Post by: MortenMacFly on February 20, 2009, 07:01:31 am
And i get 0xC0000005 (Access violation) error when attempting to start CB :-(
Do not install the wxaui branch above an (old) version of C::B (i.e. really remove the old C::B binaries completely).
Do a clean checkout of the branch (i.e. really remove the old SVN tree).
(as dmoore said:) Don't forget to run the update script.
Title: Re: Multi File editing
Post by: lexis on February 21, 2009, 12:15:08 pm
thanks for suggestions.

Now when i've built CB successfully it seems that problem was in --disable-compat26 parameter for configure... It is not needed and causes CB access violation at start.

May be this info will be helpful for somebody else...
Title: Re: Multi File editing
Post by: oBFusCATed on May 20, 2009, 12:00:07 am
OK, I've decided to do some testing on the branch.

Status so far:

1. Compiled cleanly, on my gentoo amd64 unstable box (using modified ebuild found in the gentoo forum) :-P
2. Ctrl + tab doesn't wrap:
    - I have 3 opened files,  the first is active at the start.
    - hit ctrl + tab and the second is activated
    - hit ctrl + tab and the third is activated
    - hit ctrl + tab and the first should be activated, but it is not

Best regards,
Teodor

p.s. sorry if this is a know issue, I've not read the whole thread
Title: Re: Multi File editing
Post by: MortenMacFly on May 20, 2009, 08:40:07 am
p.s. sorry if this is a know issue, I've not read the whole thread
It is a known issue but not reported in this thread. ;-)
Title: Re: Multi File editing
Post by: Jenna on June 25, 2009, 12:38:14 am
p.s. sorry if this is a know issue, I've not read the whole thread
It is a known issue but not reported in this thread. ;-)

I attach a patch that can fix the problem.
It uses a class (cbAuiNotebook) derived from wxAuiNotebook, to make it possible to override the AdvanceSelection()- and partly override the OnNavigationKey()-function to be sure the new AdvanceSelection() is used.

The patch fixes the wrapping issue and makes it possible to navigate through the tabs in the order they appear (even after dragging them to another place).
If a notebokk is plit by the user navigating walks only throught the current tab-container and does no longer jump to the containers created by splitting the notebook.

The patch fixes all places where wxAuiNotebook is used.

I also committed it to the wxWidgets patch-tracker (exactly I updated an existing tickket): http://trac.wxwidgets.org/ticket/10848 (http://trac.wxwidgets.org/ticket/10848).

Please have a look at it.

I do not see any other possibility to fix the wrapping (not so important in my eyes) and tab-order issue.

EDIT:

If the patch is used cbauibooh.cpp and cbauibook.h have to be added to the sdk target in C::B's project-file(s) and to the appropriate Makefile.am's
updated the patch:
cbauibook.cpp and cbauibook.h are now only missing from windows cbp-file, but I found an real annoying issue: it does not work (correctly) for infopane, after tabs have been moved. I will try to find out what happens there later.

[attachment deleted by admin]