From 44fd2beed4446ed72f12a5f22961d3cc748fd939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= Date: Thu, 19 Mar 2020 02:43:41 +0200 Subject: libmetacity: remove appmenu button This button has never been used by Metacity nor by Compiz. Remove everyting related to this button. --- libmetacity/meta-button-layout.c | 3 --- libmetacity/meta-button-private.h | 1 - libmetacity/meta-button.h | 1 - libmetacity/meta-frame-enums.h | 35 +++++++++++++++++------------------ libmetacity/meta-frame-style.c | 2 -- libmetacity/meta-theme-gtk.c | 5 ----- libmetacity/meta-theme-impl.c | 6 ------ libmetacity/meta-theme-metacity.c | 12 +----------- libmetacity/meta-theme.c | 2 +- 9 files changed, 19 insertions(+), 48 deletions(-) (limited to 'libmetacity') diff --git a/libmetacity/meta-button-layout.c b/libmetacity/meta-button-layout.c index 01a6045f..6aded451 100644 --- a/libmetacity/meta-button-layout.c +++ b/libmetacity/meta-button-layout.c @@ -25,8 +25,6 @@ type_from_string (const gchar *str) { if (g_strcmp0 (str, "menu") == 0) return META_BUTTON_TYPE_MENU; - else if (g_strcmp0 (str, "appmenu") == 0) - return META_BUTTON_TYPE_APPMENU; else if (g_strcmp0 (str, "minimize") == 0) return META_BUTTON_TYPE_MINIMIZE; else if (g_strcmp0 (str, "maximize") == 0) @@ -72,7 +70,6 @@ get_opposite_type (MetaButtonType type) return META_BUTTON_TYPE_STICK; case META_BUTTON_TYPE_MENU: - case META_BUTTON_TYPE_APPMENU: case META_BUTTON_TYPE_MINIMIZE: case META_BUTTON_TYPE_MAXIMIZE: case META_BUTTON_TYPE_CLOSE: diff --git a/libmetacity/meta-button-private.h b/libmetacity/meta-button-private.h index f849e086..2d95492e 100644 --- a/libmetacity/meta-button-private.h +++ b/libmetacity/meta-button-private.h @@ -37,7 +37,6 @@ typedef enum META_BUTTON_FUNCTION_MAXIMIZE, META_BUTTON_FUNCTION_MINIMIZE, META_BUTTON_FUNCTION_MENU, - META_BUTTON_FUNCTION_APPMENU, META_BUTTON_FUNCTION_SHADE, META_BUTTON_FUNCTION_ABOVE, META_BUTTON_FUNCTION_STICK, diff --git a/libmetacity/meta-button.h b/libmetacity/meta-button.h index 9edf2753..c591719c 100644 --- a/libmetacity/meta-button.h +++ b/libmetacity/meta-button.h @@ -26,7 +26,6 @@ G_BEGIN_DECLS typedef enum { META_BUTTON_TYPE_MENU, - META_BUTTON_TYPE_APPMENU, META_BUTTON_TYPE_MINIMIZE, META_BUTTON_TYPE_MAXIMIZE, META_BUTTON_TYPE_CLOSE, diff --git a/libmetacity/meta-frame-enums.h b/libmetacity/meta-frame-enums.h index 97f759ba..f1b5ea01 100644 --- a/libmetacity/meta-frame-enums.h +++ b/libmetacity/meta-frame-enums.h @@ -24,24 +24,23 @@ G_BEGIN_DECLS typedef enum { - META_FRAME_ALLOWS_DELETE = 1 << 0, - META_FRAME_ALLOWS_MENU = 1 << 1, - META_FRAME_ALLOWS_APPMENU = 1 << 2, - META_FRAME_ALLOWS_MINIMIZE = 1 << 3, - META_FRAME_ALLOWS_MAXIMIZE = 1 << 4, - META_FRAME_ALLOWS_VERTICAL_RESIZE = 1 << 5, - META_FRAME_ALLOWS_HORIZONTAL_RESIZE = 1 << 6, - META_FRAME_HAS_FOCUS = 1 << 7, - META_FRAME_SHADED = 1 << 8, - META_FRAME_STUCK = 1 << 9, - META_FRAME_MAXIMIZED = 1 << 10, - META_FRAME_ALLOWS_SHADE = 1 << 11, - META_FRAME_ALLOWS_MOVE = 1 << 12, - META_FRAME_FULLSCREEN = 1 << 13, - META_FRAME_IS_FLASHING = 1 << 14, - META_FRAME_ABOVE = 1 << 15, - META_FRAME_TILED_LEFT = 1 << 16, - META_FRAME_TILED_RIGHT = 1 << 17 + META_FRAME_ALLOWS_DELETE = 1 << 0, + META_FRAME_ALLOWS_MENU = 1 << 1, + META_FRAME_ALLOWS_MINIMIZE = 1 << 2, + META_FRAME_ALLOWS_MAXIMIZE = 1 << 3, + META_FRAME_ALLOWS_VERTICAL_RESIZE = 1 << 4, + META_FRAME_ALLOWS_HORIZONTAL_RESIZE = 1 << 5, + META_FRAME_HAS_FOCUS = 1 << 6, + META_FRAME_SHADED = 1 << 7, + META_FRAME_STUCK = 1 << 8, + META_FRAME_MAXIMIZED = 1 << 9, + META_FRAME_ALLOWS_SHADE = 1 << 10, + META_FRAME_ALLOWS_MOVE = 1 << 11, + META_FRAME_FULLSCREEN = 1 << 12, + META_FRAME_IS_FLASHING = 1 << 13, + META_FRAME_ABOVE = 1 << 14, + META_FRAME_TILED_LEFT = 1 << 15, + META_FRAME_TILED_RIGHT = 1 << 16 } MetaFrameFlags; typedef enum diff --git a/libmetacity/meta-frame-style.c b/libmetacity/meta-frame-style.c index fa49d5c9..ced565be 100644 --- a/libmetacity/meta-frame-style.c +++ b/libmetacity/meta-frame-style.c @@ -177,8 +177,6 @@ meta_button_function_to_string (MetaButtonFunction function) return "unstick"; case META_BUTTON_FUNCTION_MENU: return "menu"; - case META_BUTTON_FUNCTION_APPMENU: - return "appmenu"; case META_BUTTON_FUNCTION_LEFT_LEFT_BACKGROUND: return "left_left_background"; case META_BUTTON_FUNCTION_LEFT_MIDDLE_BACKGROUND: diff --git a/libmetacity/meta-theme-gtk.c b/libmetacity/meta-theme-gtk.c index 93723067..4ee117c5 100644 --- a/libmetacity/meta-theme-gtk.c +++ b/libmetacity/meta-theme-gtk.c @@ -654,8 +654,6 @@ get_class_from_button_type (MetaButtonType type) return "maximize"; else if (type == META_BUTTON_TYPE_MINIMIZE) return "minimize"; - else if (type == META_BUTTON_TYPE_APPMENU) - return "appmenu"; return NULL; } @@ -851,9 +849,6 @@ meta_theme_gtk_draw_frame (MetaThemeImpl *impl, case META_BUTTON_TYPE_MENU: icon_name = "open-menu-symbolic"; break; - case META_BUTTON_TYPE_APPMENU: - pixbuf = g_object_ref (mini_icon); - break; case META_BUTTON_TYPE_SHADE: case META_BUTTON_TYPE_ABOVE: case META_BUTTON_TYPE_STICK: diff --git a/libmetacity/meta-theme-impl.c b/libmetacity/meta-theme-impl.c index 568844a2..68a98985 100644 --- a/libmetacity/meta-theme-impl.c +++ b/libmetacity/meta-theme-impl.c @@ -122,11 +122,6 @@ is_button_visible (MetaButton *button, visible = TRUE; break; - case META_BUTTON_TYPE_APPMENU: - if (flags & META_FRAME_ALLOWS_APPMENU) - visible = TRUE; - break; - case META_BUTTON_TYPE_MINIMIZE: if (flags & META_FRAME_ALLOWS_MINIMIZE) visible = TRUE; @@ -223,7 +218,6 @@ strip_buttons (MetaButtonLayout *layout, types[count++] = META_BUTTON_TYPE_MAXIMIZE; types[count++] = META_BUTTON_TYPE_CLOSE; types[count++] = META_BUTTON_TYPE_MENU; - types[count++] = META_BUTTON_TYPE_APPMENU; for (i = 0; i < count; i++) { diff --git a/libmetacity/meta-theme-metacity.c b/libmetacity/meta-theme-metacity.c index e91cac47..a9df246d 100644 --- a/libmetacity/meta-theme-metacity.c +++ b/libmetacity/meta-theme-metacity.c @@ -42,7 +42,7 @@ * look out for. */ #define THEME_MAJOR_VERSION 3 -#define THEME_MINOR_VERSION 5 +#define THEME_MINOR_VERSION 4 #define THEME_VERSION (1000 * THEME_MAJOR_VERSION + THEME_MINOR_VERSION) /* Translators: This means that an attribute which should have been found @@ -2897,8 +2897,6 @@ meta_button_function_from_string (MetaThemeMetacity *metacity, return META_BUTTON_FUNCTION_MINIMIZE; else if (strcmp ("menu", str) == 0) return META_BUTTON_FUNCTION_MENU; - else if (strcmp ("appmenu", str) == 0) - return META_BUTTON_FUNCTION_APPMENU; else if (strcmp ("left_left_background", str) == 0) return META_BUTTON_FUNCTION_LEFT_LEFT_BACKGROUND; else if (strcmp ("left_middle_background", str) == 0) @@ -4814,7 +4812,6 @@ is_button_allowed (MetaThemeMetacity *metacity, return TRUE; case META_BUTTON_TYPE_MENU: - case META_BUTTON_TYPE_APPMENU: case META_BUTTON_TYPE_MINIMIZE: case META_BUTTON_TYPE_MAXIMIZE: case META_BUTTON_TYPE_CLOSE: @@ -4829,7 +4826,6 @@ is_button_allowed (MetaThemeMetacity *metacity, switch (type) { case META_BUTTON_TYPE_MENU: - case META_BUTTON_TYPE_APPMENU: case META_BUTTON_TYPE_MINIMIZE: case META_BUTTON_TYPE_MAXIMIZE: case META_BUTTON_TYPE_CLOSE: @@ -5344,9 +5340,6 @@ get_button_function (MetaButtonType type, case META_BUTTON_TYPE_MENU: return META_BUTTON_FUNCTION_MENU; - case META_BUTTON_TYPE_APPMENU: - return META_BUTTON_FUNCTION_APPMENU; - case META_BUTTON_TYPE_MINIMIZE: return META_BUTTON_FUNCTION_MINIMIZE; @@ -5821,9 +5814,6 @@ meta_theme_metacity_earliest_version_with_button (MetaButtonFunction function) case META_BUTTON_FUNCTION_RIGHT_SINGLE_BACKGROUND: return 3003; - case META_BUTTON_FUNCTION_APPMENU: - return 3005; - case META_BUTTON_FUNCTION_LAST: default: g_warning ("Unknown button %d", (gint) function); diff --git a/libmetacity/meta-theme.c b/libmetacity/meta-theme.c index 0003e891..28a82329 100644 --- a/libmetacity/meta-theme.c +++ b/libmetacity/meta-theme.c @@ -356,7 +356,7 @@ meta_theme_constructed (GObject *object) meta_theme_impl_set_composited (theme->impl, theme->composited); meta_theme_impl_set_scale (theme->impl, theme->scale); - button_layout = "appmenu:minimize,maximize,close"; + button_layout = ":minimize,maximize,close"; meta_theme_set_button_layout (theme, button_layout, FALSE); if (theme->type == META_THEME_TYPE_METACITY) -- cgit v1.2.1