diff --git a/ChangeLog b/ChangeLog index 65b92aeac..6685ff234 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-01-21 Elijah Newren + + * 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 * configure.in: post-release version bump to 2.13.55 diff --git a/src/common.h b/src/common.h index 391601cdd..16430e0f0 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 46a4ea648..28e6777a2 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 c9139c617..a2a3a4f9e 100644 --- a/src/metacity.schemas.in +++ b/src/metacity.schemas.in @@ -99,10 +99,11 @@ Action on title bar double-click - 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. diff --git a/src/prefs.c b/src/prefs.c index 4e5c9dc1c..44751a73b 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; }