metacity r3775 - in trunk: . src/core src/include



Author: tthurman
Date: Sun Jun 29 21:57:39 2008
New Revision: 3775
URL: http://svn.gnome.org/viewvc/metacity?rev=3775&view=rev

Log:
2008-06-29  Thomas Thurman  <tthurman gnome org>

        Allow toggling of non-compositor effects (since there's a
        non-Metacity key to do so: /desktop/gnome/interface/enable_animations).
        Closes #92867.

        * src/include/prefs.h: add META_PREFS_GNOME_ANIMATIONS key and
          meta_prefs_get_gnome_animations() function
        * src/include/prefs.c: added meta_prefs_get_gnome_animations()
          function, and made supporting changes to structs.
        * src/core/effects.c (run_handler): checked whether enable_animations
          is set before running an effect.
        * src/core/effects.c (meta_effect_run_minimize): remove debug message.



Modified:
   trunk/ChangeLog
   trunk/src/core/effects.c
   trunk/src/core/prefs.c
   trunk/src/include/prefs.h

Modified: trunk/src/core/effects.c
==============================================================================
--- trunk/src/core/effects.c	(original)
+++ trunk/src/core/effects.c	Sun Jun 29 21:57:39 2008
@@ -60,6 +60,7 @@
 #include "display-private.h"
 #include "ui.h"
 #include "window-private.h"
+#include "prefs.h"
 
 #ifdef HAVE_SHAPE
 #include <X11/extensions/shape.h>
@@ -209,7 +210,6 @@
                           gpointer            data)
 {
     MetaEffect *effect;
-    meta_warning ("Well, here we aren't.\n");
 
     g_return_if_fail (window != NULL);
     g_return_if_fail (icon_rect != NULL);
@@ -728,6 +728,8 @@
 static void
 run_handler (MetaEffect *effect)
 {
-  run_default_effect_handler (effect);
+  if (meta_prefs_get_gnome_animations ())
+    run_default_effect_handler (effect);
+
   effect_free (effect);
 }

Modified: trunk/src/core/prefs.c
==============================================================================
--- trunk/src/core/prefs.c	(original)
+++ trunk/src/core/prefs.c	Sun Jun 29 21:57:39 2008
@@ -89,6 +89,7 @@
 static gboolean bell_is_audible = TRUE;
 static gboolean reduced_resources = FALSE;
 static gboolean gnome_accessibility = FALSE;
+static gboolean gnome_animations = TRUE;
 static char *cursor_theme = NULL;
 static int   cursor_size = 24;
 static gboolean compositing_manager = FALSE;
@@ -395,6 +396,11 @@
       &gnome_accessibility,
       FALSE,
     },
+    { "/desktop/gnome/interface/enable_animations",
+      META_PREF_GNOME_ANIMATIONS,
+      &gnome_animations,
+      TRUE,
+    },
     { "/apps/metacity/general/compositing_manager",
       META_PREF_COMPOSITING_MANAGER,
       &compositing_manager,
@@ -976,6 +982,7 @@
   KEY_TERMINAL_DIR,
   KEY_GNOME_ACCESSIBILITY,
   "/desktop/gnome/peripherals/mouse",
+  "/desktop/gnome/interface",
   NULL,
 };
 
@@ -1760,6 +1767,9 @@
     case META_PREF_GNOME_ACCESSIBILITY:
       return "GNOME_ACCESSIBILTY";
 
+    case META_PREF_GNOME_ANIMATIONS:
+      return "GNOME_ANIMATIONS";
+
     case META_PREF_CURSOR_THEME:
       return "CURSOR_THEME";
 
@@ -2862,6 +2872,12 @@
   return gnome_accessibility;
 }
 
+gboolean
+meta_prefs_get_gnome_animations ()
+{
+  return gnome_animations;
+}
+
 MetaKeyBindingAction
 meta_prefs_get_keybinding_action (const char *name)
 {

Modified: trunk/src/include/prefs.h
==============================================================================
--- trunk/src/include/prefs.h	(original)
+++ trunk/src/include/prefs.h	Sun Jun 29 21:57:39 2008
@@ -56,6 +56,7 @@
   META_PREF_VISUAL_BELL_TYPE,
   META_PREF_REDUCED_RESOURCES,
   META_PREF_GNOME_ACCESSIBILITY,
+  META_PREF_GNOME_ANIMATIONS,
   META_PREF_CURSOR_THEME,
   META_PREF_CURSOR_SIZE,
   META_PREF_COMPOSITING_MANAGER
@@ -86,6 +87,7 @@
 int                         meta_prefs_get_auto_raise_delay   (void);
 gboolean                    meta_prefs_get_reduced_resources  (void);
 gboolean                    meta_prefs_get_gnome_accessibility (void);
+gboolean                    meta_prefs_get_gnome_animations   (void);
 
 const char*                 meta_prefs_get_command            (int i);
 



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