Gentoo Archives: gentoo-commits

From: "Alexandre Rostovtsev (tetromino)" <tetromino@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-wm/mutter/files: mutter-3.2.1-ignore-shadow-and-padding.patch
Date: Sun, 01 Jan 2012 18:48:44
Message-Id: 20120101184834.D90EC2004C@flycatcher.gentoo.org
1 tetromino 12/01/01 18:48:34
2
3 Added: mutter-3.2.1-ignore-shadow-and-padding.patch
4 Log:
5 Add Ubuntu patch to enable support for Ubuntu's metacity themes such as x11-themes/light-themes (bug #396673, thanks to Luis Medinas for reporting).
6
7 (Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 x11-wm/mutter/files/mutter-3.2.1-ignore-shadow-and-padding.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-wm/mutter/files/mutter-3.2.1-ignore-shadow-and-padding.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-wm/mutter/files/mutter-3.2.1-ignore-shadow-and-padding.patch?rev=1.1&content-type=text/plain
14
15 Index: mutter-3.2.1-ignore-shadow-and-padding.patch
16 ===================================================================
17 Patch author: Timo Kluck <tkluck@×××××.nl> Wed, 21 Sep 2011 17:51:28 +0200
18
19 Patch to silently ignore padding and shadow tags in Ubuntu metacity themes.
20
21 https://bugs.launchpad.net/bugs/800315
22 https://bugs.gentoo.org/show_bug.cgi?id=396673
23
24 diff --git a/src/ui/theme-parser.c b/src/ui/theme-parser.c
25 index 9063541..63a881f 100644
26 --- a/src/ui/theme-parser.c
27 +++ b/src/ui/theme-parser.c
28 @@ -90,7 +90,9 @@ typedef enum
29 STATE_WINDOW,
30 /* things we don't use any more but we can still parse: */
31 STATE_MENU_ICON,
32 - STATE_FALLBACK
33 + STATE_FALLBACK,
34 + /* an ubuntu specific ignore-this-element state */
35 + UBUNTU_STATE_IGNORE
36 } ParseState;
37
38 typedef struct
39 @@ -1306,7 +1308,19 @@ parse_toplevel_element (GMarkupParseContext *context,
40 */
41 push_state (info, STATE_FALLBACK);
42 }
43 - else
44 + else if (ELEMENT_IS ("shadow"))
45 + {
46 + /* ubuntu specific, workaround for light-themes: silently ignore shadow tag.
47 + */
48 + push_state (info, UBUNTU_STATE_IGNORE);
49 + }
50 + else if (ELEMENT_IS ("padding"))
51 + {
52 + /* ubuntu specific, workaround for light-themes: silently ignore padding tag.
53 + */
54 + push_state (info, UBUNTU_STATE_IGNORE);
55 + }
56 + else
57 {
58 set_error (error, context,
59 G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
60 @@ -3027,6 +3041,18 @@ parse_style_element (GMarkupParseContext *context,
61
62 push_state (info, STATE_BUTTON);
63 }
64 + else if (ELEMENT_IS ("shadow"))
65 + {
66 + /* ubuntu specific, workaround for light-themes: silently ignore shadow tag.
67 + */
68 + push_state (info, UBUNTU_STATE_IGNORE);
69 + }
70 + else if (ELEMENT_IS ("padding"))
71 + {
72 + /* ubuntu specific, workaround for light-themes: silently ignore padding tag.
73 + */
74 + push_state (info, UBUNTU_STATE_IGNORE);
75 + }
76 else
77 {
78 set_error (error, context,
79 @@ -3671,6 +3697,8 @@ start_element_handler (GMarkupParseContext *context,
80 _("Element <%s> is not allowed inside a <%s> element"),
81 element_name, "fallback");
82 break;
83 + case UBUNTU_STATE_IGNORE:
84 + break;
85 }
86 }
87
88 @@ -3960,6 +3988,9 @@ end_element_handler (GMarkupParseContext *context,
89 pop_state (info);
90 g_assert (peek_state (info) == STATE_THEME);
91 break;
92 + case UBUNTU_STATE_IGNORE:
93 + pop_state (info);
94 + break;
95 }
96
97 pop_required_version (info);
98 @@ -4165,6 +4196,9 @@ text_handler (GMarkupParseContext *context,
99 case STATE_FALLBACK:
100 NO_TEXT ("fallback");
101 break;
102 + case UBUNTU_STATE_IGNORE:
103 + NO_TEXT ("ignored_element");
104 + break;
105 }
106 }