Patch from Dick Marinus to add a minimize double-click-titlebar-action;

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.
This commit is contained in:
Elijah Newren 2006-01-21 19:18:51 +00:00 committed by Elijah Newren
parent e44e8c93aa
commit c0f4b9d2d4
5 changed files with 31 additions and 4 deletions

View File

@ -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> 2006-01-20 Elijah Newren <newren gmail.com>
* configure.in: post-release version bump to 2.13.55 * configure.in: post-release version bump to 2.13.55

View File

@ -155,6 +155,8 @@ typedef enum
{ {
META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_SHADE, META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_SHADE,
META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_MAXIMIZE, 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 META_ACTION_DOUBLE_CLICK_TITLEBAR_LAST
} MetaActionDoubleClickTitlebar; } MetaActionDoubleClickTitlebar;

View File

@ -1290,6 +1290,16 @@ meta_frames_button_press_event (GtkWidget *widget,
} }
break; 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: case META_ACTION_DOUBLE_CLICK_TITLEBAR_LAST:
break; break;
} }

View File

@ -101,8 +101,9 @@
<long> <long>
This option determines the effects of double-clicking on the This option determines the effects of double-clicking on the
title bar. Current valid options are 'toggle_shade', which will title bar. Current valid options are 'toggle_shade', which will
shade/unshade the window, and 'toggle_maximize' which will shade/unshade the window, 'toggle_maximize' which will
maximize/unmaximize the window. maximize/unmaximize the window, 'minimize' which will minimize
the window, and 'none' which will not do anything.
</long> </long>
</locale> </locale>
</schema> </schema>

View File

@ -1477,6 +1477,10 @@ action_double_click_titlebar_from_string (const char *str)
return META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_SHADE; return META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_SHADE;
else if (strcmp (str, "toggle_maximize") == 0) else if (strcmp (str, "toggle_maximize") == 0)
return META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_MAXIMIZE; 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 else
return META_ACTION_DOUBLE_CLICK_TITLEBAR_LAST; return META_ACTION_DOUBLE_CLICK_TITLEBAR_LAST;
} }