Skip to content

Restore ability to quit with the escape key

Dave Shoreman requested to merge dshoreman/pavucontrol:esc-to-quit into master

tl;dr

Based on discussion in !5 (merged), this MR reverts the commit that removed the esc keybinding and adds an option to both the config file and Configuration tab to toggle the feature on or off.

New section

So that it wasn't just two random checkboxes in the bottom corner, I've grouped them into a new section at the top of the Configuration tab. The spacing has also been kept in line with the first section in the other tabs so that the elements don't appear to "jump around" when switching to/from the Configuration tab.

I personally think it looks better grouped, but if you'd rather it below the interfaces let me know and I'll see if I can make it work. The interfaces section seems to want to expand but that could be an easy fix in the Glade file if needed.

Saving config

Due to an issue mentioned by @tanuk in !5 (comment 176829) where Gtk::Main::quit() causes a segfault, if you use ctrl-q or the escape key to quit pavucontrol then the config won't be saved. While I've added a fix for that on my Github fork, I haven't included it here as there is already !31 (merged) which would be affected by changes. In the meantime, closeOnEsc=<0|1> can be manually added to the config, or quit using the standard WM/DE shortcut (Alt+F4, $mod-shift-q etc) which will save fine.

Before and after

Comparison of Configuration tab before and after

Merge request reports