Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Multi File editing

<< < (9/18) > >>

Der Meister:
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:

* Testing, especially on Windows (patch was developed on Linux)
* Project files update
* Saving the layout of the editors (Doesn't seem to be possible yet without serious hacking/rewriting of wxAuiNotebook.)
* There were some additional feature requests and comments. Maybe some of the should get some attention

MortenMacFly:

--- Quote from: Der Meister on July 22, 2008, 06:24:39 pm ---After a long period of silence I updated the patch again.

--- End quote ---
...nice! :-) Just compiling...


--- Quote from: Der Meister on July 22, 2008, 06:24:39 pm ---
* Testing, especially on Windows (patch was developed on Linux)
--- End quote ---
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.


--- Quote from: Der Meister on July 22, 2008, 06:24:39 pm ---
* Project files update
--- End quote ---
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.

Der Meister:
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.

lexis:
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"

--- End quote ---

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: .... .)

--- End quote ---
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...

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

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version