Author Topic: As requested: editor maximize with double-click on tab (patch to test)  (Read 12299 times)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
mariocup has asked me, if it is possible to maximize the editorpane with a double-click on an editor tab.

We use wxAuiNotebook as bas-class for the (most) notebooks in C::B.
wxAuiNotebook does not give us any mouse events on tabs (except for middle-mouse-events and tab-background doubleclicked).
Middlemouse-events cannot be used here (middlemouse-click closes the editor) and the tab-background can be hidden (if many editors are open).

Some users might have seen, that I added support for tab-tooltips last weekend.
With my experience from this work, I managed to create doubleclick-events from tabs.

I would be happy if other users (and devs) can test it, to find issues, that might have slipped in.

EDIT:

Patch updated : http://forums.codeblocks.org/index.php/topic,13862.msg93524.html#msg93524
« Last Edit: December 19, 2010, 08:02:53 pm by jens »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: As requested: editor maximize with double-click on tab
« Reply #1 on: December 15, 2010, 12:47:44 pm »
What I forgot, the feature can be disabled/enabled in "Settings -> Environment... -> View".

The first double-click creates a new perspective named "Code::Blocks minimal".
The default does not show anything, but the menubar and the editor panes, but it can be changed to fit the users needs, as any perspectives.
The second double-click returns to the previous perspective (if any).

If the perspective is totally messed up, the default can be recreated (as the default perspective) by deleting it (it will be recreated from scratch in this case).

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: As requested: editor maximize with double-click on tab
« Reply #2 on: December 19, 2010, 01:48:55 pm »
If the perspective is totally messed up, the default can be recreated (as the default perspective) by deleting it (it will be recreated from scratch in this case).
Well something I noticed which can be reproduced as following:
- Double-click on the tab (it gets maximised)
- Choose view -> perspectives -> delete current
- Answer the "reset" option with yes
- Double-click on the tab --> nothing happens.

Thus I can only return to the default perspective when choosing "Code::Blocks default" or alike.
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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: As requested: editor maximize with double-click on tab
« Reply #3 on: December 19, 2010, 08:01:51 pm »
If the perspective is totally messed up, the default can be recreated (as the default perspective) by deleting it (it will be recreated from scratch in this case).
Well something I noticed which can be reproduced as following:
- Double-click on the tab (it gets maximised)
- Choose view -> perspectives -> delete current
- Answer the "reset" option with yes
- Double-click on the tab --> nothing happens.

Thus I can only return to the default perspective when choosing "Code::Blocks default" or alike.


Fixed in this (updated) patch.

It includes the minimize space spatch as described here: http://forums.codeblocks.org/index.php/topic,13826.msg93382.html#msg93382
« Last Edit: December 19, 2010, 08:04:27 pm by jens »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: As requested: editor maximize with double-click on tab (patch to test)
« Reply #4 on: January 24, 2011, 04:49:29 pm »
Applied to trunk (svn r6934) without the minimize space patch.
This one comes later.

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: As requested: editor maximize with double-click on tab (patch to test)
« Reply #5 on: January 24, 2011, 08:40:25 pm »
This works really well!

Is it possible to add a new command line argument, and update the file type associations, so that when we open individual source code files, C::B opens them in "minimal" mode, but when we open project/workspace files, it opens them in "default" mode?