summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--src/common.h2
-rw-r--r--src/frames.c10
-rw-r--r--src/metacity.schemas.in9
-rw-r--r--src/prefs.c4
5 files changed, 31 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 65b92aea..6685ff23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-01-21 Elijah Newren <newren gmail com>
+
+ * src/common.h (enum MetaActionDoubleClickTitlebar):
+ * src/frames.c (meta_frames_button_press_event):
+ * src/prefs.c (action_double_click_titlebar_from_string):
+ * src/metacity.schemas.in:
+ Patch from Dick Marinus to add a minimize
+ double-click-titlebar-action; slightly modified to also include a
+ none action. #300210.
+
2006-01-20 Elijah Newren <newren gmail.com>
* configure.in: post-release version bump to 2.13.55
diff --git a/src/common.h b/src/common.h
index 391601cd..16430e0f 100644
--- a/src/common.h
+++ b/src/common.h
@@ -155,6 +155,8 @@ typedef enum
{
META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_SHADE,
META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_MAXIMIZE,
+ META_ACTION_DOUBLE_CLICK_TITLEBAR_MINIMIZE,
+ META_ACTION_DOUBLE_CLICK_TITLEBAR_NONE,
META_ACTION_DOUBLE_CLICK_TITLEBAR_LAST
} MetaActionDoubleClickTitlebar;
diff --git a/src/frames.c b/src/frames.c
index 46a4ea64..28e6777a 100644
--- a/src/frames.c
+++ b/src/frames.c
@@ -1290,6 +1290,16 @@ meta_frames_button_press_event (GtkWidget *widget,
}
break;
+ case META_ACTION_DOUBLE_CLICK_TITLEBAR_MINIMIZE:
+ {
+ meta_core_minimize (gdk_display, frame->xwindow);
+ break;
+ }
+
+ case META_ACTION_DOUBLE_CLICK_TITLEBAR_NONE:
+ /* Yaay, a sane user that doesn't use that other weird crap! */
+ break;
+
case META_ACTION_DOUBLE_CLICK_TITLEBAR_LAST:
break;
}
diff --git a/src/metacity.schemas.in b/src/metacity.schemas.in
index c9139c61..a2a3a4f9 100644
--- a/src/metacity.schemas.in
+++ b/src/metacity.schemas.in
@@ -99,10 +99,11 @@
<locale name="C">
<short>Action on title bar double-click</short>
<long>
- This option determines the effects of double-clicking on the
- title bar. Current valid options are 'toggle_shade', which will
- shade/unshade the window, and 'toggle_maximize' which will
- maximize/unmaximize the window.
+ This option determines the effects of double-clicking on the
+ title bar. Current valid options are 'toggle_shade', which will
+ shade/unshade the window, 'toggle_maximize' which will
+ maximize/unmaximize the window, 'minimize' which will minimize
+ the window, and 'none' which will not do anything.
</long>
</locale>
</schema>
diff --git a/src/prefs.c b/src/prefs.c
index 4e5c9dc1..44751a73 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -1477,6 +1477,10 @@ action_double_click_titlebar_from_string (const char *str)
return META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_SHADE;
else if (strcmp (str, "toggle_maximize") == 0)
return META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_MAXIMIZE;
+ else if (strcmp (str, "minimize") == 0)
+ return META_ACTION_DOUBLE_CLICK_TITLEBAR_MINIMIZE;
+ else if (strcmp (str, "none") == 0)
+ return META_ACTION_DOUBLE_CLICK_TITLEBAR_NONE;
else
return META_ACTION_DOUBLE_CLICK_TITLEBAR_LAST;
}