Title / Description
Code diff -Naur metacity-2.18.2/src/effects.c metacity-2.18.2.new/src/effects.c --- metacity-2.18.2/src/effects.c 2007-04-08 15:46:17.000000000 -0300 +++ metacity-2.18.2.new/src/effects.c 2007-06-30 16:16:13.000000000 -0300 @@ -755,17 +755,18 @@ static void run_default_effect_handler (MetaEffect *effect) -{ +{ switch (effect->type) { case META_EFFECT_MINIMIZE: - meta_effects_draw_box_animation (effect->window->screen, + if (meta_prefs_get_minimize_animation_box ()) { + meta_effects_draw_box_animation (effect->window->screen, &(effect->u.minimize.window_rect), &(effect->u.minimize.icon_rect), META_MINIMIZE_ANIMATION_LENGTH, META_BOX_ANIM_SCALE); + } break; - default: break; } diff -Naur metacity-2.18.2/src/metacity.schemas.in metacity-2.18.2.new/src/metacity.schemas.in --- metacity-2.18.2/src/metacity.schemas.in 2007-04-08 15:46:17.000000000 -0300 +++ metacity-2.18.2.new/src/metacity.schemas.in 2007-06-30 16:15:01.000000000 -0300 @@ -335,6 +335,17 @@ </locale> </schema> + <schema> + <key>/schemas/apps/metacity/general/minimize_animation_box</key> + <applyto>/apps/metacity/general/minimize_animation_box</applyto> + <owner>metacity</owner> + <type>bool</type> + <default>true</default> + <locale name="C"> + <short>If true, shows a black border when minimize windows</short> + </locale> + </schema> + <!-- Window Keybindings --> <schema> diff -Naur metacity-2.18.2/src/prefs.c metacity-2.18.2.new/src/prefs.c --- metacity-2.18.2/src/prefs.c 2007-04-08 15:46:17.000000000 -0300 +++ metacity-2.18.2.new/src/prefs.c 2007-06-30 16:14:37.000000000 -0300 @@ -57,6 +57,7 @@ #define KEY_DISABLE_WORKAROUNDS "/apps/metacity/general/disable_workarounds" #define KEY_BUTTON_LAYOUT "/apps/metacity/general/button_layout" #define KEY_REDUCED_RESOURCES "/apps/metacity/general/reduced_resources" +#define KEY_MINIMIZE_ANIMATION_BOX "/apps/metacity/general/minimize_animation_box" #define KEY_GNOME_ACCESSIBILITY "/desktop/gnome/interface/accessibility" #define KEY_COMMAND_PREFIX "/apps/metacity/keybinding_commands/command_" @@ -100,6 +101,7 @@ static gboolean provide_visual_bell = FALSE; static gboolean bell_is_audible = TRUE; static gboolean reduced_resources = FALSE; +static gboolean minimize_animation_box = TRUE; static gboolean gnome_accessibility = FALSE; static char *cursor_theme = NULL; static int cursor_size = 24; @@ -162,6 +164,7 @@ static gboolean update_workspace_name (const char *name, const char *value); static gboolean update_reduced_resources (gboolean value); +static gboolean update_minimize_animation_box (gboolean value); static gboolean update_gnome_accessibility (gboolean value); static gboolean update_cursor_theme (const char *value); static gboolean update_cursor_size (int size); @@ -489,6 +492,9 @@ if (get_bool (KEY_REDUCED_RESOURCES, &bool_val)) update_reduced_resources (bool_val); + if (get_bool (KEY_MINIMIZE_ANIMATION_BOX, &bool_val)) + update_minimize_animation_box (bool_val); + str_val = gconf_client_get_string (default_client, KEY_TERMINAL_COMMAND, &err); cleanup_error (&err); @@ -975,6 +981,23 @@ if (update_reduced_resources (b)) queue_changed (META_PREF_REDUCED_RESOURCES); } + else if (strcmp (key, KEY_MINIMIZE_ANIMATION_BOX) == 0) + { + gboolean b; + + if (value && value->type != GCONF_VALUE_BOOL) + { + meta_warning (_("GConf key \"%s\" is set to an invalid type\n"), + KEY_MINIMIZE_ANIMATION_BOX); + goto out; + } + + b = value ? gconf_value_get_bool (value) : minimize_animation_box; + + if (update_minimize_animation_box (b)) + queue_changed (META_PREF_MINIMIZE_ANIMATION_BOX); + } + else if (strcmp (key, KEY_GNOME_ACCESSIBILITY) == 0) { gboolean b; @@ -1706,6 +1728,16 @@ } static gboolean +update_minimize_animation_box (gboolean value) +{ + gboolean old = minimize_animation_box; + + minimize_animation_box = value; + + return old != minimize_animation_box; +} + +static gboolean update_gnome_accessibility (gboolean value) { gboolean old = gnome_accessibility; @@ -1788,6 +1820,9 @@ case META_PREF_REDUCED_RESOURCES: return "REDUCED_RESOURCES"; + case META_PREF_MINIMIZE_ANIMATION_BOX: + return "MINIMIZE_ANIMATION_BOX"; + case META_PREF_GNOME_ACCESSIBILITY: return "GNOME_ACCESSIBILTY"; @@ -2898,6 +2933,12 @@ } gboolean +meta_prefs_get_minimize_animation_box (void) +{ + return minimize_animation_box; +} + +gboolean meta_prefs_get_gnome_accessibility () { return gnome_accessibility; diff -Naur metacity-2.18.2/src/prefs.h metacity-2.18.2.new/src/prefs.h --- metacity-2.18.2/src/prefs.h 2007-04-08 15:46:17.000000000 -0300 +++ metacity-2.18.2.new/src/prefs.h 2007-06-30 16:14:37.000000000 -0300 @@ -53,6 +53,7 @@ META_PREF_AUDIBLE_BELL, META_PREF_VISUAL_BELL_TYPE, META_PREF_REDUCED_RESOURCES, + META_PREF_MINIMIZE_ANIMATION_BOX, META_PREF_GNOME_ACCESSIBILITY, META_PREF_CURSOR_THEME, META_PREF_CURSOR_SIZE, @@ -83,6 +84,7 @@ gboolean meta_prefs_get_auto_raise (void); int meta_prefs_get_auto_raise_delay (void); gboolean meta_prefs_get_reduced_resources (void); +gboolean meta_prefs_get_minimize_animation_box (void); gboolean meta_prefs_get_gnome_accessibility (void); const char* meta_prefs_get_command (int i);
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code