1
0
Fork 0

Fix build with gcc 4.5

Based on patch by Dominique Leuenberger
<dominique-gnomezilla@leuenberger.net>

https://bugzilla.gnome.org/show_bug.cgi?id=606719
This commit is contained in:
Vincent Untz 2010-03-31 22:34:02 +02:00 committed by Owen W. Taylor
parent d8b0f213b2
commit 11061a23b1
3 changed files with 10 additions and 7 deletions

View file

@ -526,6 +526,9 @@ meta_core_get_menu_accelerator (MetaMenuOp menu_op,
switch (menu_op) switch (menu_op)
{ {
case META_MENU_OP_NONE:
name = "none";
break;
case META_MENU_OP_DELETE: case META_MENU_OP_DELETE:
name = "close"; name = "close";
break; break;

View file

@ -7067,9 +7067,12 @@ menu_callback (MetaWindowMenu *menu,
{ {
meta_verbose ("Menu op %u on %s\n", op, window->desc); meta_verbose ("Menu op %u on %s\n", op, window->desc);
/* op can be 0 for none */
switch (op) switch (op)
{ {
case META_MENU_OP_NONE:
/* nothing */
break;
case META_MENU_OP_DELETE: case META_MENU_OP_DELETE:
meta_window_delete (window, timestamp); meta_window_delete (window, timestamp);
break; break;
@ -7157,10 +7160,6 @@ menu_callback (MetaWindowMenu *menu,
meta_window_shove_titlebar_onscreen (window); meta_window_shove_titlebar_onscreen (window);
break; break;
case 0:
/* nothing */
break;
default: default:
meta_warning (G_STRLOC": Unknown window op\n"); meta_warning (G_STRLOC": Unknown window op\n");
break; break;
@ -7213,8 +7212,8 @@ meta_window_show_menu (MetaWindow *window,
window->display->window_with_menu = NULL; window->display->window_with_menu = NULL;
} }
ops = 0; ops = META_MENU_OP_NONE;
insensitive = 0; insensitive = META_MENU_OP_NONE;
ops |= (META_MENU_OP_DELETE | META_MENU_OP_MINIMIZE | META_MENU_OP_MOVE | META_MENU_OP_RESIZE); ops |= (META_MENU_OP_DELETE | META_MENU_OP_MINIMIZE | META_MENU_OP_MOVE | META_MENU_OP_RESIZE);

View file

@ -52,6 +52,7 @@ typedef enum
typedef enum typedef enum
{ {
META_MENU_OP_NONE = 0,
META_MENU_OP_DELETE = 1 << 0, META_MENU_OP_DELETE = 1 << 0,
META_MENU_OP_MINIMIZE = 1 << 1, META_MENU_OP_MINIMIZE = 1 << 1,
META_MENU_OP_UNMAXIMIZE = 1 << 2, META_MENU_OP_UNMAXIMIZE = 1 << 2,