Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 17697 Details for
Bug 28700
metacity: add option to set animation style
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
the patch for 2.6.1
metacity-anim.diff (text/plain), 7.09 KB, created by
Sebastian Dröge
on 2003-09-14 06:55:45 UTC
(
hide
)
Description:
the patch for 2.6.1
Filename:
MIME Type:
Creator:
Sebastian Dröge
Created:
2003-09-14 06:55:45 UTC
Size:
7.09 KB
patch
obsolete
>diff -Naur metacity-2.6.1-old/src/common.h metacity-2.6.1/src/common.h >--- metacity-2.6.1-old/src/common.h 2003-01-28 16:07:43.000000000 +0100 >+++ metacity-2.6.1/src/common.h 2003-09-14 15:40:32.560585560 +0200 >@@ -151,6 +151,15 @@ > > typedef enum > { >+ META_ANIMATION_DRAW_ROOT, >+ META_ANIMATION_WINDOW_WIREFRAME, >+ META_ANIMATION_WINDOW_OPAQUE, >+ META_ANIMATION_NONE >+ >+} MetaAnimationStyle; >+ >+typedef enum >+{ > META_FRAME_TYPE_NORMAL, > META_FRAME_TYPE_DIALOG, > META_FRAME_TYPE_MODAL_DIALOG, >diff -Naur metacity-2.6.1-old/src/effects.c metacity-2.6.1/src/effects.c >--- metacity-2.6.1-old/src/effects.c 2002-10-19 00:46:37.000000000 +0200 >+++ metacity-2.6.1/src/effects.c 2003-09-14 15:40:32.563585104 +0200 >@@ -28,14 +28,6 @@ > #include <X11/extensions/shape.h> > #endif > >-typedef enum >-{ >- META_ANIMATION_DRAW_ROOT, >- META_ANIMATION_WINDOW_WIREFRAME, >- META_ANIMATION_WINDOW_OPAQUE >- >-} MetaAnimationStyle; >- > typedef struct > { > MetaScreen *screen; >@@ -280,8 +272,6 @@ > * and unmapping of windows that's going on. > */ > >-static MetaAnimationStyle animation_style = META_ANIMATION_WINDOW_WIREFRAME; >- > void > meta_effects_draw_box_animation (MetaScreen *screen, > MetaRectangle *initial_rect, >@@ -307,7 +297,7 @@ > context->end_rect = *destination_rect; > context->anim_type = anim_type; > >- context->style = animation_style; >+ context->style = meta_prefs_get_animation_style(); > > #ifndef HAVE_SHAPE > if (context->style == META_ANIMATION_WINDOW_WIREFRAME) >diff -Naur metacity-2.6.1-old/src/metacity.schemas.in metacity-2.6.1/src/metacity.schemas.in >--- metacity-2.6.1-old/src/metacity.schemas.in 2003-07-21 22:12:27.000000000 +0200 >+++ metacity-2.6.1/src/metacity.schemas.in 2003-09-14 15:40:32.634574312 +0200 >@@ -1875,6 +1875,25 @@ > </locale> > </schema> > >+ <schema> >+ <key>/schemas/apps/metacity/general/animation_style</key> >+ <applyto>/apps/metacity/general/animation_style</applyto> >+ <owner>metacity</owner> >+ <type>string</type> >+ <default>wireframe</default> >+ <locale name="C"> >+ <short>Specify the Animation Style for Window Animations</short> >+ <long> >+ There are a number of places where Metacity might create a simple >+ animation of an operation. These animations can make clearer >+ what is happening. At the moment, there are animations for >+ window shading a window and minimizing a window. The options >+ are: thin, wireframe, opaque, and none. >+ </long> >+ >+ </locale> >+ </schema> >+ > > </schemalist> > </gconfschemafile> >diff -Naur metacity-2.6.1-old/src/prefs.c metacity-2.6.1/src/prefs.c >--- metacity-2.6.1-old/src/prefs.c 2003-07-21 22:12:27.000000000 +0200 >+++ metacity-2.6.1/src/prefs.c 2003-09-14 15:41:39.512407336 +0200 >@@ -50,6 +50,7 @@ > #define KEY_NUM_WORKSPACES "/apps/metacity/general/num_workspaces" > #define KEY_APPLICATION_BASED "/apps/metacity/general/application_based" > #define KEY_DISABLE_WORKAROUNDS "/apps/metacity/general/disable_workarounds" >+#define KEY_ANIMATION_STYLE "/apps/metacity/general/animation_style" > #define KEY_BUTTON_LAYOUT "/apps/metacity/general/button_layout" > > #define KEY_COMMAND_PREFIX "/apps/metacity/keybinding_commands/command_" >@@ -79,6 +80,7 @@ > META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_SHADE; > static gboolean application_based = FALSE; > static gboolean disable_workarounds = FALSE; >+static MetaAnimationStyle animation_style = META_ANIMATION_WINDOW_WIREFRAME; > static gboolean auto_raise = FALSE; > static gboolean auto_raise_delay = 500; > static gboolean provide_visual_bell = TRUE; >@@ -110,6 +112,7 @@ > static gboolean update_mouse_button_mods (const char *value); > static gboolean update_focus_mode (const char *value); > static gboolean update_theme (const char *value); >+static gboolean update_animation_style (const char *value); > static gboolean update_visual_bell (gboolean v1, gboolean v2); > static gboolean update_visual_bell_type (const char *value); > static gboolean update_num_workspaces (int value); >@@ -336,6 +339,12 @@ > update_theme (str_val); > g_free (str_val); > >+ str_val = gconf_client_get_string (default_client, KEY_ANIMATION_STYLE, >+ &err); >+ cleanup_error (&err); >+ update_animation_style (str_val); >+ g_free (str_val); >+ > /* If the keys aren't set in the database, we use essentially > * bogus values instead of any kind of default. This is > * just lazy. But they keys ought to be set, anyhow. >@@ -489,6 +498,22 @@ > if (update_theme (str)) > queue_changed (META_PREF_THEME); > } >+ else if (strcmp (key, KEY_ANIMATION_STYLE) == 0) >+ { >+ const char *str; >+ >+ if (value && value->type != GCONF_VALUE_STRING) >+ { >+ meta_warning (_("GConf key \"%s\" is set to an invalid type\n"), >+ KEY_ANIMATION_STYLE); >+ goto out; >+ } >+ >+ str = value ? gconf_value_get_string (value) : NULL; >+ >+ if (update_animation_style (str)) >+ queue_changed (META_PREF_ANIMATION_STYLE); >+ } > else if (strcmp (key, KEY_TITLEBAR_FONT) == 0) > { > const char *str; >@@ -802,6 +827,29 @@ > > #ifdef HAVE_GCONF > static gboolean >+update_animation_style (const char *value) >+{ >+ MetaAnimationStyle old_style = animation_style; >+ >+ if (value != NULL) >+ { >+ if (g_ascii_strcasecmp (value, "thin") == 0) >+ animation_style = META_ANIMATION_DRAW_ROOT; >+ else if (g_ascii_strcasecmp (value, "wireframe") == 0) >+ animation_style = META_ANIMATION_WINDOW_WIREFRAME; >+ else if (g_ascii_strcasecmp (value, "opaque") == 0) >+ animation_style = META_ANIMATION_WINDOW_OPAQUE; >+ else if (g_ascii_strcasecmp (value, "none") == 0) >+ animation_style = META_ANIMATION_NONE; >+ else >+ meta_warning (_("GConf key '%s' is set to an invalid value"), >+ KEY_ANIMATION_STYLE); >+ } >+ >+ return (old_style != animation_style); >+} >+ >+static gboolean > update_theme (const char *value) > { > char *old_theme; >@@ -880,6 +928,12 @@ > return META_VISUAL_BELL_FULLSCREEN_FLASH; > } > >+MetaAnimationStyle >+meta_prefs_get_animation_style (void) >+{ >+ return animation_style; >+} >+ > static gboolean > update_visual_bell_type (const char *value) > { >@@ -1256,6 +1310,9 @@ > case META_PREF_THEME: > return "THEME"; > >+ case META_PREF_ANIMATION_STYLE: >+ return "ANIMATION_STYLE"; >+ > case META_PREF_TITLEBAR_FONT: > return "TITLEBAR_FONT"; > >diff -Naur metacity-2.6.1-old/src/prefs.h metacity-2.6.1/src/prefs.h >--- metacity-2.6.1-old/src/prefs.h 2003-07-21 22:12:27.000000000 +0200 >+++ metacity-2.6.1/src/prefs.h 2003-09-14 15:40:32.659570512 +0200 >@@ -33,6 +33,7 @@ > META_PREF_ACTION_DOUBLE_CLICK_TITLEBAR, > META_PREF_AUTO_RAISE, > META_PREF_AUTO_RAISE_DELAY, >+ META_PREF_ANIMATION_STYLE, > META_PREF_THEME, > META_PREF_TITLEBAR_FONT, > META_PREF_NUM_WORKSPACES, >@@ -61,6 +62,7 @@ > > MetaVirtualModifier meta_prefs_get_mouse_button_mods (void); > MetaFocusMode meta_prefs_get_focus_mode (void); >+MetaAnimationStyle meta_prefs_get_animation_style (void); > const char* meta_prefs_get_theme (void); > /* returns NULL if GTK default should be used */ > const PangoFontDescription* meta_prefs_get_titlebar_font (void);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 28700
: 17697