Full screen (F11) patch to keep toolbars / tearoffs

25 replies [Last post]
dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

I've gone ahead and developed a patch to keep the toolbars / tearoffs and a method to toggle them in full screen (via the 'Window' menu). It also keeps the settings with the session's options.

If you want to download and apply the patch and try out (and give feedback), you can go here:

http://dx9s.ath.cx/node/51

**IF** there is a bug that I've introduced, understand this is a un-offical patch to the development stream. It might never be added to any of the branches, but is a small patch for a small feature that some people might like!

BTW> thanks to Paul for pointing at the files and speeding up my time spend hacking the code... I am NOT a GTK programmer and can get away with hacking most C/C++ code with no problems!

--Doug

porl
User offline. Last seen 30 weeks 4 days ago. Offline
Joined: 2006-07-20
Posts:

just a question: my audio computer is down so i can't look at it to see for myself.

i haven't used fullscreen mode before, but i like to have the main ardour window and the mixer window on two different desktops (in metacity or compiz). does the fullscreen mode work with this sort of setup? ie can i have the main window fullscreen on one desktop face and the mixer fullscreen on another? what about when using two monitors? can you make the windows fullscreen on each head?

just curious :)

porl

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

If the screens have Xinerama extensions and the environment (gnome/kde) recognizes the two displays.. full screen (F11) snaps to the window that the Editor is MOST/MORE in .. (if between to windows, the screen it occupies more of).

I've done that for a while... Mixer in one window (still has the window manger border around it) and the editor in another window (and yes with more monitors) qjackctl in another monitor and the mixer (envy24control) in the fourth window.

--Doug

porl
User offline. Last seen 30 weeks 4 days ago. Offline
Joined: 2006-07-20
Posts:

hmm... maybe i should think about getting a second monitor again :)

could i make a suggestion though that the mixer window has a fullscreen option as well? not urgent, but would be nice :)

porl

nowhiskey
User offline. Last seen 5 weeks 1 day ago. Offline
Joined: 2006-09-30
Posts:

hallo, i just applied the patch into the svn-ongoing-rev2507, and it seems that the patch is working good, at least i did not recognize any new artifacts caused by applying the patch.
but who knows, me do not, there might be some reason, why the patch is not accepted/applied to the code.
there is a issue in the bug tracker0001646, so perhaps it would make sense to attach the patch there too - so some more people could have a look on it.
this is because i think that the functionality which come with the patch is actually very useful, so we should not drop it away - if possible.

cheers,
doc

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

nowhiskey, thanks for testing it out on svn-ongoing-rev25* ... If it does break, it will usually kick out some rejected files which are easy to fix. (2.0.5 -> 2.1 had one rejected and took 30 seconds to fix) Just leave a note here or contact via IRC.

I will continue to maintain this patch for my use as I find it useful too. I took some short cuts in the code (generates some minor [momentary, additional] CPU usage over what it could be doing, *JUST* during screen redrawing adding/removing the tearoffs) and could/should go back and smooth it out. But this hack was just that. If it gets adopted, I'd expect that it would require a little more code to make *polished*.

--Doug

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

I am going to (soon) remove the patch. The link above won't work anymore. There wasn't enough desire to keep this (old, unmaintained) patch.

--Doug

seablade
User offline. Last seen 16 hours 37 min ago. Offline
Joined: 2007-01-22
Posts:

Did you ever post it to the mantis issue? I haven't had time to work on Mantis recently, but I don't remember seeing a patch for this in the issues on this topic.

Seablade

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

It was a feature patch... and I never did post it... my mistake. I could attempt to update it, but as 3.0 is coming closer -- not sure it's really necessary. It allowed for keeping the "tearoffs" (the tool bars with buttons and such) in F11 mode (and made it an option in the menus). The patch was fairly simple and I guess it would still apply (would have to manually adjust/read the patch and find/make the same changes).

Only work around is to make the tool bar (aka tearoffs) float, then F11 [full screen] then re-dock.

--Doug (dx9s)

seablade
User offline. Last seen 16 hours 37 min ago. Offline
Joined: 2007-01-22
Posts:

You should check and see if it will patch against 3.0 then, that actually is a useful feature for some of us;)

Seablade

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

I'll need to check out a good rev # for 3.0 (and which branch) and look into it. I *THINK* I can do that w/o any help. (dunno much about 3.0, been using 2 for a while).

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

FWIW, just ran it agains 2.8.4:

~/src/ardour-2.8.4$ patch --dry-run -p1 < ../../files/ardour/keep-tearoffs-2.1.patch
patching file gtk2_ardour/ardour.menus
Hunk #1 FAILED at 227.
1 out of 1 hunk FAILED -- saving rejects to file gtk2_ardour/ardour.menus.rej
patching file gtk2_ardour/ardour_ui2.cc
Hunk #1 succeeded at 889 (offset -1 lines).
patching file gtk2_ardour/ardour_ui_ed.cc
Hunk #1 succeeded at 204 (offset 6 lines).
patching file gtk2_ardour/ardour_ui.h
Hunk #1 succeeded at 172 (offset 17 lines).
Hunk #2 succeeded at 739 (offset 31 lines).
patching file gtk2_ardour/ardour_ui_options.cc
Hunk #1 succeeded at 538 (offset 115 lines).
Hunk #2 succeeded at 735 (offset 163 lines).
Hunk #3 FAILED at 1183.
1 out of 3 hunks FAILED -- saving rejects to file gtk2_ardour/ardour_ui_options.cc.rej
patching file gtk2_ardour/editor.cc
Hunk #1 succeeded at 4260 (offset 569 lines).
patching file libs/ardour/ardour/configuration_vars.h
Hunk #1 FAILED at 147.
1 out of 1 hunk FAILED -- saving rejects to file libs/ardour/ardour/configuration_vars.h.rej

And will look at the diffs more closely.. suspect it would be easy for 2.8.4 (at least) and submit to mantis.

--Doug

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

I believe (compiling now) I have a working patch for 2.8.4 (not that hard to update)... Testing now, but I do think that perhaps the menu "words" should be changed to something like "Keep toolbars when maximised/F11" (or something to that effect). I think the "Keep Tearoffs" is cryptic as the magic is from an if statement inside Editor::maximise_editing_space () that calls mouse_mode_tearoff->set_visible (true); tools_tearoff->set_visible (true); ... I didn't pick that Text randomly, only haphazardly!

--Doug (dx9s)

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

Well it still works, but have noticed something interesting, perhaps intentional!?

There are two locations that list "Maximise Editor Space F11", one is under View and other is under Window ... If this is by choice, then perhaps it has a reason. I put the menu item back where it was originally (under View) but naturally went to Window to find the option. I can add in both places, but perhaps these (Maximise, keep tearoffs [under a better bit-o-text]) should ONLY appear under one!?

it took me a little while to figure out that the menu option WAS where I put it, just not where I thought that I put it and hence the discovery of two places... Again perhaps a mute point until I look at some rev for 3.0.

(time to go to bed)

--Doug (dx9s)

macinnisrr
macinnisrr's picture
User offline. Last seen 6 days 27 min ago. Offline
Joined: 2008-01-14
Posts:

I currently use fluxbox as my window manager, and I can do this without a patch. Just hit alt=f11 and any program goes fullscreen but still includes the menus. Works with both the editor and MIxer.

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

There are slight differences, but yes it is possible to go full screen with various window managers. One difference in going full screen IN Ardour is that you have the option to drop the tool bar (or with this patch, add it back in). Also when you go full screen from Ardour, the window decoration (title bar on top, outline around sides) are lost, which gain you a little more space as well and the app "sticks" to the screen (can't drag it to another screen as easily).

Just small little things.

At this point, I need to determine the text (of which I think "Toolbars when Maximized" works best) and if the menu option for maximized should possibly be removed from the View menu... I'll chat w/ Seablade and las and punch the idea around.

--Doug (dx9s)

seablade
User offline. Last seen 16 hours 37 min ago. Offline
Joined: 2007-01-22
Posts:

dx9s-

Sorry to duck out on you earlier... I am in the middle of a huge headache of a small production(Go figure) and am jumping in and out these days. I was right before final rehearsal earlier today when I was trying to get MTC working right and was in a huge hurry as a result.

Seablade

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

@Seablade: Not a problem and guessing the time of year, it's to be expected!

I think that I should provide two patches, one to clean up (remove the F11 option from Window and leave under View) and 2nd to put the F11+Keep Toolbars when Maximized. That way each can be reviewed independently.

--Doug

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

I've gone ahead and done some polishing (reorganising the View/Window menus) and added the Keep Toolbars as two separate patches ... as well as providing the feature as a patch against the original code (very minimal, only View, menu changes).

http://tracker.ardour.org/view.php?id=2973

I think the changes to View/Window will meet with approval. I chatted w/ las about what should go where and I removed the option to Maximise from Window and leave in View, but only after moving that menu item to top (same place as it was under Window) and added some separators to make it more pleasing to view the View menu.

Try both the view_window-reorder-2.8.4.patch.txt THEN keep-toolbars-with-reorder-2.8.4.patch.txt, and I think you'll agree... The only thing left is the consistent spelling of Maximise/Maximize/Maximised/Maximized (of which I left intentionally the way it is to draw attention).

I still need to get a rev of 3.0 and port the feature as a patch there. 3.0 will throw me a little bit I am sure!

--Doug (dx9s)

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

Okay did by first "svn co http://subversion.ardour.org/svn/ardour2/branches/3.0"

and got rev 6398 and started compiling (not sure if I have all the requirements satisfied, but I think waf would have told me otherwise)

and got an error:

../libs/pbd/pbd/signals.h:35:16: error: ‘boost::signals2’ has not been declared
../libs/pbd/pbd/signals.h:35:37: error: expected initializer before ‘UnscopedConnection’
../libs/pbd/pbd/signals.h:36:16: error: ‘boost::signals2’ has not been declared
../libs/pbd/pbd/signals.h:36:37: error: expected initializer before ‘Connection’
../libs/pbd/pbd/signals.h:37:16: error: ‘boost::signals2’ has not been declared

[...]

../libs/pbd/pbd/signals.h:262:28: error: ‘_signal’ was not declared in this scope
../libs/pbd/pbd/signals.h: In member function ‘void PBD::Signal4::connect(int&, const int&, PBD::EventLoop*)’:
../libs/pbd/pbd/signals.h:268:10: error: ‘_signal’ was not declared in this scope
../libs/pbd/pbd/signals.h: In member function ‘bool PBD::Signal4::empty() const’:
../libs/pbd/pbd/signals.h:275:33: error: ‘_signal’ was not declared in this scope
In file included from ../libs/pbd/pbd/destructible.h:23,
from ../libs/pbd/pbd/statefuldestructible.h:24,
from ../libs/pbd/pbd/command.h:25,
from ../libs/pbd/command.cc:20:
../libs/pbd/pbd/signals.h: In member function ‘int PBD::Signal0::operator()() [with R = void]’:
../libs/pbd/pbd/destructible.h:30: instantiated from here
../libs/pbd/pbd/signals.h:103:22: error: ‘_signal’ was not declared in this scope
Waf: Leaving directory `/home/dx/src/svn/ardour3.0-6398/build'
Build failed
-> task failed (err #1):
{task: cxx command.cc -> command_1.o}

Either this is a known flaky rev point or I got something wrong... I still need SOMEBODY to tell be a rev point to start at/from so I know I have a good REV starting point!

(HINT HINT HINT, aka I need a reply on this, I wasn't as obvious before!)

--Doug

paul
paul's picture
User offline. Last seen 3 hours 8 min ago. Offline
Joined: 2006-03-16
Posts:

You need a newer version of boost. 1.40 appears to be the cutoff.

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

hmmm... and I perform a
sudo apt-get install libboost1.40-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libboost-test1.38.0 libboost-regex1.38.0 libboost-wave1.38.0 libboost-program-options1.38.0 libboost-thread1.38.0 libboost-serialization1.38.0
libboost-date-time1.38.0 libboost-signals1.38.0 libboost-graph1.38.0 libboost-math1.38.0 libboost1.38-doc libboost-iostreams1.38.0 libicu-dev
libboost-filesystem1.38.0 libboost-system1.38.0 libboost-python1.38.0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libboost-python1.40-dev libboost-python1.40.0
Suggested packages:
libboost1.40-doc libboost-date-time1.40-dev libboost-filesystem1.40-dev libboost-graph-parallel1.40-dev libboost-graph1.40-dev libboost-iostreams1.40-dev
libboost-math1.40-dev libboost-mpi1.40-dev libboost-program-options1.40-dev libboost-regex1.40-dev libboost-serialization1.40-dev
libboost-signals1.40-dev libboost-system1.40-dev libboost-test1.40-dev libboost-thread1.40-dev libboost-wave1.40-dev docbook-xsl default-jdk fop
The following packages will be REMOVED:
libboost-date-time1.38-dev libboost-dev libboost-filesystem1.38-dev libboost-graph1.38-dev libboost-iostreams1.38-dev libboost-math1.38-dev
libboost-program-options1.38-dev libboost-python1.38-dev libboost-regex1.38-dev libboost-serialization1.38-dev libboost-signals1.38-dev
libboost-system1.38-dev libboost-test1.38-dev libboost-thread1.38-dev libboost-wave1.38-dev libboost1.38-dev
The following NEW packages will be installed:
libboost-python1.40-dev libboost-python1.40.0 libboost1.40-dev
0 upgraded, 3 newly installed, 16 to remove and 0 not upgraded.
Need to get 5,044kB of archives.
After this operation, 25.4MB disk space will be freed.

will hold off on the suggested stuff for now.

still getting:

../libs/pbd/pbd/signals.h:26:30: error: boost/signals2.hpp: No such file or directory
In file included from ../libs/pbd/pbd/destructible.h:23,
from ../libs/pbd/pbd/statefuldestructible.h:24,
from ../libs/pbd/pbd/command.h:25,
from ../libs/pbd/command.cc:20:

now I am missing signals2.hpp -- wonder where that comes from.

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

while in dependency hell.. I installed all the "recommended" stuff (every blasted last one, including the jdk suggestion, I know THAT should NOT have any effect)... and that seems to have gotten further.. I am on 32/602 at the moment (waf building one at a time)

(most likely I only needed the boost signal suggested dev)

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

Wow 3.0 is a bit different...

dx9s
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2006-05-19
Posts:

Well I think I did it... that is ported the patch feature and some View/Window menus slight reorganising:

http://tracker.ardour.org/view.php?id=2974

If you try it, report back here that it worked for you as well! or BETTER YET... report back in Mantis (use same account as forum).

--Doug (dx9s)

seablade
User offline. Last seen 16 hours 37 min ago. Offline
Joined: 2007-01-22
Posts:

Actually the Mantis and Forums are on seperate accounts, though you can feel free to create one with the same username. Kick me in a couple of days and I will make sure to poke Paul to take a look at that patch if he hasn't already for inclusion into 3.0.

Seablade