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

Multi File editing

<< < (14/18) > >>

MortenMacFly:

--- Quote from: Der Meister on August 21, 2008, 07:30:08 pm ---I updated the patch again.

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

MortenMacFly:

--- Quote from: MortenMacFly on August 22, 2008, 08:48:28 am ---The only thing missing is an update of the project file(s) as the files switcherdlg.{cpp/h} have been added.

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

Der Meister:

--- Quote from: mandrav on August 21, 2008, 10:09:09 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"...

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

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

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

--- End quote ---
The key combination is Ctrl+, and not Ctrl++ ;)

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


* Open two files, "A.cpp" and "B.cpp"
* It does not matter if the two files are in the same pane or if they are split into this patch's new "multi-file editing" view
* Click the tab for "A.cpp".  You will see the contents of "A.cpp"
* Right-click "B.cpp"'s tab.  From the popup menu that appears, select "Close all others"
What happens with unpatched Code::Blocks, a.k.a. "The expected result":


* B.cpp is the only file that remains open
What happens with this patch applied:


* A.cpp is the only file that remains open

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

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version