[gnome-tweak-tool] Add support for changing window titlebar click actions
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] Add support for changing window titlebar click actions
- Date: Fri, 18 Mar 2011 05:30:27 +0000 (UTC)
commit 6b4e89a0456075da1453467619c18d14d0849ebc
Author: John Stowers <john stowers gmail com>
Date: Fri Mar 18 15:40:41 2011 +1300
Add support for changing window titlebar click actions
AKA the famous Linus bug. You can now adjust the action when
double, right or middle clicking on the window titlebar.
Fixes #408898, #408906, #408907
gtweak/tweaks/tweak_windows.py | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_windows.py b/gtweak/tweaks/tweak_windows.py
new file mode 100644
index 0000000..95ef4c3
--- /dev/null
+++ b/gtweak/tweaks/tweak_windows.py
@@ -0,0 +1,25 @@
+from gtweak.tweakmodel import TweakGroup
+from gtweak.widgets import GConfComboTweak, build_horizontal_sizegroup
+
+class ActionClickTitlebarTweak(GConfComboTweak):
+ def __init__(self, key_name, **options):
+
+ #from the metacity schema
+ schema_options = ('toggle_shade', 'toggle_maximize', 'toggle_maximize_horizontally',
+ 'toggle_maximize_vertically', 'minimize', 'shade', 'menu', 'lower', 'none')
+
+ GConfComboTweak.__init__(self,
+ key_name,
+ str,
+ [(o, o.replace("_"," ").title()) for o in schema_options],
+ **options)
+
+sg = build_horizontal_sizegroup()
+
+TWEAK_GROUPS = (
+ TweakGroup(
+ "Windows",
+ ActionClickTitlebarTweak("/apps/metacity/general/action_double_click_titlebar", size_group=sg),
+ ActionClickTitlebarTweak("/apps/metacity/general/action_middle_click_titlebar", size_group=sg),
+ ActionClickTitlebarTweak("/apps/metacity/general/action_right_click_titlebar", size_group=sg)),
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]