[mutter/wip/gtk-theming: 13/20] theme: Disable support for fringe buttons



commit 22763c72de401a2bf66e5b88833595e5713f80e4
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Sep 30 13:49:52 2014 +0200

    theme: Disable support for fringe buttons
    
    Few themes ever had support for those in the first place, and even
    less supported them properly; in particular support in the default
    theme has been broken for a while now.
    With this in mind (and considering that not even the tweak tool exposes
    any UI to configure them), let's (try to) remove support altogether - the
    corresponding rects are still kept around, so it's easy to add back in
    case we reconsider (and get the necessary artwork).

 src/ui/theme.c |   49 +++----------------------------------------------
 1 files changed, 3 insertions(+), 46 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 7551bb9..0e86210 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -398,48 +398,6 @@ rect_for_function (MetaFrameGeometry *fgeom,
                    MetaButtonFunction function,
                    MetaTheme         *theme)
 {
-
-  /* Firstly, check version-specific things. */
-
-  if (META_THEME_ALLOWS(theme, META_THEME_SHADE_STICK_ABOVE_BUTTONS))
-    {
-      switch (function)
-        {
-        case META_BUTTON_FUNCTION_SHADE:
-          if ((flags & META_FRAME_ALLOWS_SHADE) && !(flags & META_FRAME_SHADED))
-            return &fgeom->shade_rect;
-          else
-            return NULL;
-        case META_BUTTON_FUNCTION_ABOVE:
-          if (!(flags & META_FRAME_ABOVE))
-            return &fgeom->above_rect;
-          else
-            return NULL;
-        case META_BUTTON_FUNCTION_STICK:
-          if (!(flags & META_FRAME_STUCK))
-            return &fgeom->stick_rect;
-          else
-            return NULL;
-        case META_BUTTON_FUNCTION_UNSHADE:
-          if ((flags & META_FRAME_ALLOWS_SHADE) && (flags & META_FRAME_SHADED))
-            return &fgeom->unshade_rect;
-          else
-            return NULL;
-        case META_BUTTON_FUNCTION_UNABOVE:
-          if (flags & META_FRAME_ABOVE)
-            return &fgeom->unabove_rect;
-          else
-            return NULL;
-        case META_BUTTON_FUNCTION_UNSTICK:
-          if (flags & META_FRAME_STUCK)
-            return &fgeom->unstick_rect;
-        default:
-          /* just go on to the next switch block */;
-        }
-    }
-
-  /* now consider the buttons which exist in all versions */
-
   switch (function)
     {
     case META_BUTTON_FUNCTION_MENU:
@@ -473,10 +431,9 @@ rect_for_function (MetaFrameGeometry *fgeom,
     case META_BUTTON_FUNCTION_UNSTICK:
     case META_BUTTON_FUNCTION_UNSHADE:
     case META_BUTTON_FUNCTION_UNABOVE:
-      /* we are being asked for a >v1 button which hasn't been handled yet,
-       * so obviously we're not in a theme which supports that version.
-       * therefore, we don't show the button. return NULL and all will
-       * be well.
+      /* Fringe buttons that used to be supported by theme versions >v1;
+       * if we want to support them again, we need to return the
+       * correspondings rects here
        */
       return NULL;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]