Author Topic: Multi File editing  (Read 75008 times)

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: Multi File editing
« Reply #60 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.
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

Offline DrewBoo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: Multi File editing
« Reply #61 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.

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: Multi File editing
« Reply #62 on: August 21, 2008, 07:30:08 pm »
I updated the patch 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.
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Multi File editing
« Reply #63 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"...
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: Multi File editing
« Reply #64 on: August 21, 2008, 10:09:16 pm »
Ctrl+ is normally used to increase the font

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Multi File editing
« Reply #65 on: August 22, 2008, 08:48:28 am »
I updated the patch 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Multi File editing
« Reply #66 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: Multi File editing
« Reply #67 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++ ;)
« Last Edit: August 22, 2008, 11:10:49 pm by Der Meister »
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

Offline DrewBoo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: Multi File editing
« Reply #68 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:

  • 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

Offline plee3

  • Single posting newcomer
  • *
  • Posts: 4
Re: Multi File editing
« Reply #69 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

mariocup

  • Guest
Re: Multi File editing
« Reply #70 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

Offline plee3

  • Single posting newcomer
  • *
  • Posts: 4
Re: Multi File editing
« Reply #71 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

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Multi File editing
« Reply #72 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Jerramy

  • Guest
Re: Multi File editing
« Reply #73 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.



Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Multi File editing
« Reply #74 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