8481
|
1 |
diff -Nrup metacity-2.16.3/config.h.in ../SUNWgnome-wm-2.16.1/metacity-2.16.3/config.h.in
|
|
2 |
--- metacity-2.16.3/config.h.in 2006-11-02 13:18:51.283813000 +0100
|
|
3 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/config.h.in 2006-11-02 13:21:03.744380000 +0100
|
7488
|
4 |
@@ -78,12 +78,18 @@
|
|
5 |
/* Define to 1 if you have the <sys/stat.h> header file. */
|
|
6 |
#undef HAVE_SYS_STAT_H
|
|
7 |
|
|
8 |
+/* Define to 1 if you have the <sys/tsol/label_macro.h> header file. */
|
|
9 |
+#undef HAVE_SYS_TSOL_LABEL_MACRO_H
|
|
10 |
+
|
|
11 |
/* Define to 1 if you have the <sys/types.h> header file. */
|
|
12 |
#undef HAVE_SYS_TYPES_H
|
|
13 |
|
|
14 |
/* Define to 1 if you have the <unistd.h> header file. */
|
|
15 |
#undef HAVE_UNISTD_H
|
|
16 |
|
|
17 |
+/* Define to 1 if you have the <X11/extensions/Xtsol.h> header file. */
|
|
18 |
+#undef HAVE_X11_EXTENSIONS_XTSOL_H
|
|
19 |
+
|
|
20 |
/* Define to 1 if you have the <X11/SM/SMlib.h> header file. */
|
|
21 |
#undef HAVE_X11_SM_SMLIB_H
|
|
22 |
|
|
23 |
@@ -102,6 +108,9 @@
|
|
24 |
/* Have the Xsync extension library */
|
|
25 |
#undef HAVE_XSYNC
|
|
26 |
|
|
27 |
+/* Building with XTSOL support */
|
|
28 |
+#undef HAVE_XTSOL
|
|
29 |
+
|
|
30 |
/* Name of package */
|
|
31 |
#undef PACKAGE
|
|
32 |
|
8481
|
33 |
diff -Nrup metacity-2.16.3/configure.in ../SUNWgnome-wm-2.16.1/metacity-2.16.3/configure.in
|
|
34 |
--- metacity-2.16.3/configure.in 2006-11-02 13:18:51.279604000 +0100
|
|
35 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/configure.in 2006-11-02 13:21:03.746104000 +0100
|
|
36 |
@@ -339,6 +339,19 @@ if test "${try_xinerama}" != no; then
|
7488
|
37 |
fi
|
|
38 |
|
|
39 |
CPPFLAGS="$metacity_save_cppflags"
|
|
40 |
+### tsol ans Xtsol libraries
|
|
41 |
+
|
|
42 |
+found_xtsol=no
|
|
43 |
+case "$host" in
|
|
44 |
+ *-*-solaris*)
|
|
45 |
+ AC_CHECK_HEADERS(X11/extensions/Xtsol.h sys/tsol/label_macro.h,
|
|
46 |
+ AC_DEFINE(HAVE_XTSOL, ,[Building with XTSOL support]) found_xtsol=yes,)
|
|
47 |
+ ;;
|
|
48 |
+ *)
|
|
49 |
+ ;;
|
|
50 |
+esac
|
|
51 |
+
|
|
52 |
+AM_CONDITIONAL(XTSOL_DEFINED, test x$found_xtsol = xyes)
|
|
53 |
|
|
54 |
SHAPE_LIBS=
|
|
55 |
found_shape=no
|
8481
|
56 |
diff -Nrup metacity-2.16.3/src/Makefile.am ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/Makefile.am
|
|
57 |
--- metacity-2.16.3/src/Makefile.am 2006-11-02 13:18:50.417123000 +0100
|
|
58 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/Makefile.am 2006-11-02 14:10:51.786071000 +0100
|
|
59 |
@@ -4,7 +4,7 @@ SUBDIRS=wm-tester tools themes
|
|
60 |
|
|
61 |
INCLUDES=@METACITY_CFLAGS@ -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\" -DMETACITY_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"metacity\" -DSN_API_NOT_YET_FROZEN=1
|
7488
|
62 |
|
|
63 |
-metacity_SOURCES= \
|
|
64 |
+SOURCEFILES= \
|
|
65 |
async-getprop.c \
|
|
66 |
async-getprop.h \
|
|
67 |
bell.h \
|
8481
|
68 |
@@ -82,6 +82,9 @@ metacity_SOURCES= \
|
7488
|
69 |
theme-parser.h \
|
|
70 |
themewidget.c \
|
|
71 |
themewidget.h \
|
|
72 |
+ trusted.h \
|
|
73 |
+ trusted.c \
|
|
74 |
+ trusted-pics.h \
|
|
75 |
ui.c \
|
|
76 |
ui.h \
|
|
77 |
util.c \
|
8481
|
78 |
@@ -95,23 +98,16 @@ metacity_SOURCES= \
|
|
79 |
xprops.c \
|
|
80 |
xprops.h
|
7488
|
81 |
|
8481
|
82 |
+metacity_SOURCES= $(SOURCEFILES)
|
|
83 |
+metacity_CFLAGS = $(AM_CFLAGS)
|
7488
|
84 |
+
|
|
85 |
# by setting libmetacity_private_la_CFLAGS, the files shared with
|
|
86 |
# metacity proper will be compiled with different names.
|
|
87 |
libmetacity_private_la_CFLAGS =
|
|
88 |
libmetacity_private_la_SOURCES= \
|
8481
|
89 |
- boxes.c \
|
|
90 |
- boxes.h \
|
7488
|
91 |
- gradient.c \
|
|
92 |
- gradient.h \
|
|
93 |
preview-widget.c \
|
|
94 |
preview-widget.h \
|
|
95 |
- theme.c \
|
|
96 |
- theme.h \
|
|
97 |
- theme-parser.c \
|
|
98 |
- theme-parser.h \
|
|
99 |
- util.c \
|
|
100 |
- util.h \
|
|
101 |
- common.h
|
|
102 |
+ $(SOURCEFILES)
|
|
103 |
|
|
104 |
libmetacity_private_la_LDFLAGS = -no-undefined
|
|
105 |
libmetacity_private_la_LIBADD = @METACITY_LIBS@
|
8481
|
106 |
diff -Nrup metacity-2.16.3/src/display.c ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/display.c
|
|
107 |
--- metacity-2.16.3/src/display.c 2006-11-02 13:18:50.435094000 +0100
|
|
108 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/display.c 2006-11-02 13:21:03.758620000 +0100
|
7488
|
109 |
@@ -64,6 +64,9 @@
|
|
110 |
#include <X11/Xcursor/Xcursor.h>
|
|
111 |
#endif
|
|
112 |
#include <string.h>
|
|
113 |
+#ifdef HAVE_XTSOL
|
|
114 |
+#include "trusted.h"
|
|
115 |
+#endif
|
|
116 |
|
8481
|
117 |
#define GRAB_OP_IS_WINDOW_SWITCH(g) \
|
|
118 |
(g == META_GRAB_OP_KEYBOARD_TABBING_NORMAL || \
|
|
119 |
@@ -331,7 +334,10 @@ meta_display_open (void)
|
7488
|
120 |
"_NET_DESKTOP_VIEWPORT",
|
|
121 |
"_METACITY_VERSION",
|
|
122 |
"_NET_WM_VISIBLE_NAME",
|
|
123 |
- "_NET_WM_VISIBLE_ICON_NAME"
|
|
124 |
+ "_NET_WM_VISIBLE_ICON_NAME",
|
|
125 |
+ "_NET_DESKTOP_ROLES",
|
|
126 |
+ "_NET_TRUSTED_ACTIVE_WINDOW",
|
|
127 |
+ "_NET_DESKTOP_LABELS"
|
|
128 |
};
|
|
129 |
Atom atoms[G_N_ELEMENTS(atom_names)];
|
|
130 |
|
8481
|
131 |
@@ -489,6 +495,11 @@ meta_display_open (void)
|
7488
|
132 |
display->atom_metacity_version = atoms[91];
|
|
133 |
display->atom_net_wm_visible_name = atoms[92];
|
|
134 |
display->atom_net_wm_visible_icon_name = atoms[93];
|
|
135 |
+ display->atom_net_desktop_roles = atoms[94];
|
|
136 |
+ display->atom_net_trusted_active_window = atoms[95];
|
|
137 |
+ display->atom_net_desktop_labels = atoms[96];
|
|
138 |
+
|
|
139 |
+
|
|
140 |
|
|
141 |
display->prop_hooks = NULL;
|
|
142 |
meta_display_init_window_prop_hooks (display);
|
8481
|
143 |
@@ -510,6 +521,10 @@ meta_display_open (void)
|
7488
|
144 |
display->screens = NULL;
|
|
145 |
display->active_screen = NULL;
|
|
146 |
|
|
147 |
+#ifdef HAVE_XTSOL
|
|
148 |
+ display->labels = NULL;
|
|
149 |
+#endif
|
|
150 |
+
|
|
151 |
#ifdef HAVE_STARTUP_NOTIFICATION
|
|
152 |
display->sn_display = sn_display_new (display->xdisplay,
|
|
153 |
sn_error_trap_push,
|
8481
|
154 |
@@ -1811,7 +1826,10 @@ event_callback (XEvent *event,
|
7488
|
155 |
meta_window_handle_mouse_grab_op_event (window, event);
|
|
156 |
break;
|
|
157 |
case EnterNotify:
|
|
158 |
- if (display->grab_window == window &&
|
|
159 |
+ #ifdef HAVE_XTSOL
|
|
160 |
+ tsol_trusted_stripe_atom_update (display, window);
|
|
161 |
+ #endif
|
|
162 |
+ if (display->grab_window == window &&
|
|
163 |
event->xany.serial >= display->grab_start_serial &&
|
|
164 |
grab_op_is_mouse (display->grab_op))
|
|
165 |
{
|
|
166 |
@@ -1905,6 +1923,9 @@ event_callback (XEvent *event,
|
|
167 |
}
|
|
168 |
break;
|
|
169 |
case LeaveNotify:
|
|
170 |
+#ifdef HAVE_XTSOL
|
|
171 |
+ tsol_trusted_stripe_atom_update (display, window);
|
|
172 |
+#endif
|
|
173 |
if (display->grab_window == window &&
|
|
174 |
event->xany.serial >= display->grab_start_serial &&
|
|
175 |
grab_op_is_mouse (display->grab_op))
|
8481
|
176 |
@@ -2185,6 +2206,14 @@ event_callback (XEvent *event,
|
7488
|
177 |
else if (event->xproperty.atom ==
|
|
178 |
display->atom_net_desktop_names)
|
|
179 |
meta_screen_update_workspace_names (screen);
|
|
180 |
+ #ifdef HAVE_XTSOL
|
|
181 |
+ else if (event->xproperty.atom ==
|
|
182 |
+ display->atom_net_desktop_labels)
|
|
183 |
+ tsol_workspace_labels_gconf_update (screen);
|
|
184 |
+ else if (event->xproperty.atom ==
|
|
185 |
+ display->atom_net_desktop_roles)
|
|
186 |
+ tsol_workspace_roles_gconf_update (screen);
|
|
187 |
+ #endif /*HAVE_XTSOL */
|
|
188 |
#if 0
|
|
189 |
else if (event->xproperty.atom ==
|
|
190 |
display->atom_net_restack_window)
|
8481
|
191 |
diff -Nrup metacity-2.16.3/src/display.h ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/display.h
|
|
192 |
--- metacity-2.16.3/src/display.h 2006-11-02 13:18:50.435594000 +0100
|
|
193 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/display.h 2006-11-02 13:21:03.761557000 +0100
|
7488
|
194 |
@@ -178,6 +178,9 @@ struct _MetaDisplay
|
|
195 |
Atom atom_metacity_version;
|
|
196 |
Atom atom_net_wm_visible_name;
|
|
197 |
Atom atom_net_wm_visible_icon_name;
|
|
198 |
+ Atom atom_net_desktop_roles;
|
|
199 |
+ Atom atom_net_trusted_active_window;
|
|
200 |
+ Atom atom_net_desktop_labels;
|
|
201 |
|
|
202 |
/* This is the actual window from focus events,
|
|
203 |
* not the one we last set
|
|
204 |
@@ -219,6 +222,9 @@ struct _MetaDisplay
|
|
205 |
guint error_trap_synced_at_last_pop : 1;
|
|
206 |
MetaEventQueue *events;
|
|
207 |
GSList *screens;
|
|
208 |
+#ifdef HAVE_XTSOL
|
|
209 |
+ GSList *labels;
|
|
210 |
+#endif
|
|
211 |
MetaScreen *active_screen;
|
|
212 |
GHashTable *window_ids;
|
|
213 |
int error_traps;
|
8481
|
214 |
diff -Nrup metacity-2.16.3/src/frame.c ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/frame.c
|
|
215 |
--- metacity-2.16.3/src/frame.c 2006-11-02 13:18:50.441652000 +0100
|
|
216 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/frame.c 2006-11-02 13:21:03.763300000 +0100
|
7488
|
217 |
@@ -26,6 +26,9 @@
|
|
218 |
#include "bell.h"
|
|
219 |
#include "errors.h"
|
|
220 |
#include "keybindings.h"
|
|
221 |
+#ifdef HAVE_XTSOL
|
|
222 |
+#include "trusted.h"
|
|
223 |
+#endif
|
|
224 |
|
|
225 |
#ifdef HAVE_RENDER
|
|
226 |
#include <X11/extensions/Xrender.h>
|
|
227 |
@@ -150,6 +153,17 @@ meta_window_ensure_frame (MetaWindow *wi
|
|
228 |
window->frame->xwindow,
|
|
229 |
window->title);
|
|
230 |
|
|
231 |
+#ifdef HAVE_XTSOL
|
|
232 |
+ /* associate trusted label with the window only if a frame exist */
|
|
233 |
+ meta_ui_set_frame_label (window->screen->ui,
|
|
234 |
+ window->frame->xwindow,
|
|
235 |
+ tsol_meta_window_label_get (window));
|
|
236 |
+
|
|
237 |
+ /* make sure the frame window as the same privileges
|
|
238 |
+ * "real" window */
|
|
239 |
+ tsol_set_frame_label (window->display->xdisplay, window->xwindow, window->frame->xwindow);
|
|
240 |
+#endif
|
|
241 |
+
|
|
242 |
/* Move keybindings to frame instead of window */
|
|
243 |
meta_window_grab_keys (window);
|
|
244 |
|
8481
|
245 |
diff -Nrup metacity-2.16.3/src/frame.h ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/frame.h
|
|
246 |
--- metacity-2.16.3/src/frame.h 2006-11-02 13:18:50.442017000 +0100
|
|
247 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/frame.h 2006-11-02 13:21:03.764262000 +0100
|
7488
|
248 |
@@ -23,17 +23,19 @@
|
|
249 |
#define META_FRAME_H
|
|
250 |
|
|
251 |
#include "window.h"
|
|
252 |
+#ifdef HAVE_XTSOL
|
|
253 |
+#include "theme.h"
|
|
254 |
+#endif
|
|
255 |
|
|
256 |
-typedef struct _MetaFrameGeometry MetaFrameGeometry;
|
|
257 |
+/*typedef struct _MetaFrameGeometry MetaFrameGeometry;
|
|
258 |
|
|
259 |
struct _MetaFrameGeometry
|
|
260 |
{
|
|
261 |
- /* border sizes (space between frame and child) */
|
|
262 |
int left_width;
|
|
263 |
int right_width;
|
|
264 |
int top_height;
|
|
265 |
int bottom_height;
|
|
266 |
-};
|
|
267 |
+};*/
|
|
268 |
|
|
269 |
struct _MetaFrame
|
|
270 |
{
|
8481
|
271 |
diff -Nrup metacity-2.16.3/src/frames.c ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/frames.c
|
|
272 |
--- metacity-2.16.3/src/frames.c 2006-11-02 13:18:50.443059000 +0100
|
|
273 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/frames.c 2006-11-02 13:21:03.768671000 +0100
|
|
274 |
@@ -561,7 +561,7 @@ meta_frames_manage_window (MetaFrames *f
|
7488
|
275 |
|
|
276 |
g_assert (window);
|
|
277 |
|
|
278 |
- frame = g_new (MetaUIFrame, 1);
|
|
279 |
+ frame = g_new0 (MetaUIFrame, 1);
|
|
280 |
|
|
281 |
frame->window = window;
|
|
282 |
|
8481
|
283 |
@@ -2190,7 +2190,14 @@ meta_frames_paint_to_drawable (MetaFrame
|
7488
|
284 |
|
|
285 |
/* Punch out the client area */
|
|
286 |
area.x = left;
|
|
287 |
+#ifdef HAVE_XTSOL
|
|
288 |
+ if (tsol_is_available ())
|
|
289 |
+ area.y = top + top; /*Trusted Frame Layout Modification TFLM*/
|
|
290 |
+ else
|
|
291 |
+ area.y = top;
|
|
292 |
+#else
|
|
293 |
area.y = top;
|
|
294 |
+#endif
|
|
295 |
area.width = w;
|
|
296 |
area.height = h;
|
|
297 |
tmp_region = gdk_region_rectangle (&area);
|
8481
|
298 |
@@ -2217,7 +2224,12 @@ meta_frames_paint_to_drawable (MetaFrame
|
7488
|
299 |
frame->text_height,
|
|
300 |
&button_layout,
|
|
301 |
button_states,
|
|
302 |
- mini_icon, icon);
|
|
303 |
+ mini_icon, icon
|
|
304 |
+#ifdef HAVE_XTSOL
|
|
305 |
+ ,frame->label
|
|
306 |
+#endif
|
|
307 |
+ );
|
|
308 |
+
|
|
309 |
|
|
310 |
if (GDK_IS_WINDOW (drawable))
|
|
311 |
gdk_window_end_paint (drawable);
|
8481
|
312 |
@@ -2509,3 +2521,26 @@ invalidate_whole_window (MetaFrames *fra
|
7488
|
313 |
gdk_window_invalidate_rect (frame->window, NULL, FALSE);
|
|
314 |
invalidate_cache (frames, frame);
|
|
315 |
}
|
|
316 |
+
|
|
317 |
+#ifdef HAVE_XTSOL
|
|
318 |
+void
|
|
319 |
+meta_frames_set_label (MetaFrames *frames,
|
|
320 |
+ Window xwindow,
|
|
321 |
+ MetaTrustedLabel *label)
|
|
322 |
+{
|
|
323 |
+ GtkWidget *widget;
|
|
324 |
+ MetaUIFrame *frame;
|
|
325 |
+
|
|
326 |
+ widget = GTK_WIDGET (frames);
|
|
327 |
+
|
|
328 |
+ frame = meta_frames_lookup_window (frames, xwindow);
|
|
329 |
+
|
|
330 |
+ g_assert (frame);
|
|
331 |
+
|
|
332 |
+ if (frame->label != NULL)
|
|
333 |
+ g_warning ("label should be null");
|
|
334 |
+
|
|
335 |
+ frame->label = label;
|
|
336 |
+}
|
|
337 |
+#endif
|
|
338 |
+
|
8481
|
339 |
diff -Nrup metacity-2.16.3/src/frames.h ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/frames.h
|
|
340 |
--- metacity-2.16.3/src/frames.h 2006-11-02 13:18:50.443366000 +0100
|
|
341 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/frames.h 2006-11-02 13:21:03.770334000 +0100
|
7488
|
342 |
@@ -26,6 +26,9 @@
|
|
343 |
#include <gdk/gdkx.h>
|
|
344 |
#include "common.h"
|
|
345 |
#include "theme.h"
|
|
346 |
+#ifdef HAVE_XTSOL
|
|
347 |
+#include "trusted.h"
|
|
348 |
+#endif
|
|
349 |
|
|
350 |
typedef enum
|
|
351 |
{
|
|
352 |
@@ -68,6 +71,9 @@ struct _MetaUIFrame
|
|
353 |
Window xwindow;
|
|
354 |
GdkWindow *window;
|
|
355 |
MetaFrameStyle *cache_style;
|
|
356 |
+#ifdef HAVE_XTSOL
|
|
357 |
+ MetaTrustedLabel *label;
|
|
358 |
+#endif
|
|
359 |
PangoLayout *layout;
|
|
360 |
int text_height;
|
|
361 |
char *title; /* NULL once we have a layout */
|
|
362 |
@@ -151,4 +157,9 @@ Window meta_frames_get_moving_frame (Met
|
|
363 |
void meta_frames_push_delay_exposes (MetaFrames *frames);
|
|
364 |
void meta_frames_pop_delay_exposes (MetaFrames *frames);
|
|
365 |
|
|
366 |
+#ifdef HAVE_XTSOL
|
|
367 |
+void meta_frames_set_label (MetaFrames *frames,
|
|
368 |
+ Window xwindow,
|
|
369 |
+ MetaTrustedLabel *label);
|
|
370 |
+#endif
|
|
371 |
#endif
|
8481
|
372 |
diff -Nrup metacity-2.16.3/src/keybindings.c ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/keybindings.c
|
|
373 |
--- metacity-2.16.3/src/keybindings.c 2006-11-02 13:18:50.448923000 +0100
|
|
374 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/keybindings.c 2006-11-02 13:21:03.775661000 +0100
|
|
375 |
@@ -42,6 +42,11 @@
|
7488
|
376 |
#include <X11/XKBlib.h>
|
|
377 |
#endif
|
|
378 |
|
|
379 |
+#ifdef HAVE_XTSOL
|
|
380 |
+#include "trusted.h"
|
|
381 |
+#endif
|
|
382 |
+
|
|
383 |
+
|
|
384 |
static gboolean all_bindings_disabled = FALSE;
|
|
385 |
|
|
386 |
typedef void (* MetaKeyHandlerFunc) (MetaDisplay *display,
|
8481
|
387 |
@@ -2738,6 +2743,42 @@ meta_spawn_command_line_async_on_screen
|
7488
|
388 |
error))
|
|
389 |
return FALSE;
|
|
390 |
|
|
391 |
+#ifdef HAVE_XTSOL
|
|
392 |
+ if (tsol_is_available ())
|
|
393 |
+ {
|
|
394 |
+ GdkDisplay *dpy;
|
|
395 |
+ Display *xdpy;
|
|
396 |
+ Window root;
|
|
397 |
+ Atom atom, utf8_string;
|
|
398 |
+ gchar* tsol_command = g_strdup_printf ("%d:%s",
|
|
399 |
+ screen->number,
|
|
400 |
+ command_line);
|
|
401 |
+
|
|
402 |
+ dpy = gdk_display_get_default ();
|
|
403 |
+ xdpy = GDK_DISPLAY_XDISPLAY (dpy);
|
|
404 |
+
|
|
405 |
+ utf8_string = XInternAtom (xdpy, "UTF8_STRING", FALSE);
|
|
406 |
+
|
|
407 |
+ root = DefaultRootWindow (xdpy);
|
|
408 |
+
|
|
409 |
+ atom = XInternAtom (xdpy, "_LABEL_EXEC_COMMAND", FALSE);
|
|
410 |
+
|
|
411 |
+ gdk_error_trap_push ();
|
|
412 |
+
|
|
413 |
+ XChangeProperty (xdpy, root, atom, utf8_string, 8, PropModeReplace,
|
|
414 |
+ tsol_command, strlen (tsol_command));
|
|
415 |
+
|
|
416 |
+ XSync (xdpy, False);
|
|
417 |
+
|
|
418 |
+ gdk_error_trap_pop ();
|
|
419 |
+
|
|
420 |
+ g_free (tsol_command);
|
|
421 |
+
|
|
422 |
+ retval = TRUE;
|
|
423 |
+ }
|
|
424 |
+ else
|
|
425 |
+#endif /* HAVE_XTSOL */
|
|
426 |
+ {
|
|
427 |
retval = g_spawn_async (NULL,
|
|
428 |
argv,
|
|
429 |
NULL,
|
8481
|
430 |
@@ -2747,11 +2788,10 @@ meta_spawn_command_line_async_on_screen
|
7488
|
431 |
NULL,
|
|
432 |
error);
|
|
433 |
g_strfreev (argv);
|
|
434 |
-
|
|
435 |
+ }
|
|
436 |
return retval;
|
|
437 |
}
|
|
438 |
|
|
439 |
-
|
|
440 |
static void
|
|
441 |
handle_run_command (MetaDisplay *display,
|
|
442 |
MetaScreen *screen,
|
8481
|
443 |
diff -Nrup metacity-2.16.3/src/prefs.c ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/prefs.c
|
|
444 |
--- metacity-2.16.3/src/prefs.c 2006-11-02 13:18:50.704637000 +0100
|
|
445 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/prefs.c 2006-11-02 13:23:36.656857000 +0100
|
7488
|
446 |
@@ -29,6 +29,9 @@
|
|
447 |
#endif
|
|
448 |
#include <string.h>
|
|
449 |
#include <stdlib.h>
|
|
450 |
+#ifdef HAVE_XTSOL
|
|
451 |
+#include "trusted.h"
|
|
452 |
+#endif /* HAVE_XTSOL */
|
|
453 |
|
|
454 |
#define MAX_REASONABLE_WORKSPACES 36
|
|
455 |
|
8481
|
456 |
@@ -68,6 +71,10 @@
|
|
457 |
#define KEY_LIST_BINDINGS_SUFFIX "_list"
|
7488
|
458 |
|
|
459 |
#define KEY_WORKSPACE_NAME_PREFIX "/apps/metacity/workspace_names/name_"
|
|
460 |
+#ifdef HAVE_XTSOL
|
|
461 |
+#define KEY_WORKSPACE_LABEL_PREFIX "/apps/metacity/workspace_labels/ws_"
|
|
462 |
+#define KEY_WORKSPACE_ROLE_PREFIX "/apps/metacity/workspace_roles/ws_"
|
|
463 |
+#endif /* HAVE_XTSOL */
|
|
464 |
|
|
465 |
#define KEY_VISUAL_BELL "/apps/metacity/general/visual_bell"
|
|
466 |
#define KEY_AUDIBLE_BELL "/apps/metacity/general/audible_bell"
|
8481
|
467 |
@@ -128,6 +135,14 @@ static char *commands[MAX_COMMANDS] = {
|
7488
|
468 |
static char *terminal_command = NULL;
|
|
469 |
|
|
470 |
static char *workspace_names[MAX_REASONABLE_WORKSPACES] = { NULL, };
|
|
471 |
+#ifdef HAVE_XTSOL
|
|
472 |
+/* these are only used for session managements
|
|
473 |
+ * workspace_labels are NOT used in metacity as the window label
|
|
474 |
+ * is queried directly from the window
|
|
475 |
+ * ditto for the workspace_roles*/
|
|
476 |
+static char *workspace_labels[MAX_REASONABLE_WORKSPACES] = { NULL, };
|
|
477 |
+static char *workspace_roles[MAX_REASONABLE_WORKSPACES] = { NULL, };
|
|
478 |
+#endif /* HAVE_XTSOL */
|
|
479 |
|
|
480 |
#ifdef HAVE_GCONF
|
|
481 |
static gboolean update_use_system_font (gboolean value);
|
8481
|
482 |
@@ -175,6 +190,10 @@ static void change_notify (GConfClient
|
7488
|
483 |
gpointer user_data);
|
|
484 |
|
|
485 |
static char* gconf_key_for_workspace_name (int i);
|
|
486 |
+#ifdef HAVE_XTSOL
|
|
487 |
+static char* gconf_key_for_workspace_label (int i);
|
|
488 |
+static char* gconf_key_for_workspace_role (int i);
|
|
489 |
+#endif /*HAVE_XTSOL*/
|
|
490 |
|
|
491 |
static void queue_changed (MetaPreference pref);
|
|
492 |
#endif /* HAVE_GCONF */
|
8481
|
493 |
@@ -195,6 +214,15 @@ static void init_bindings
|
7488
|
494 |
static void init_commands (void);
|
|
495 |
static void init_workspace_names (void);
|
|
496 |
|
|
497 |
+#ifdef HAVE_XTSOL
|
|
498 |
+static void init_labels_roles_workspaces (void);
|
|
499 |
+static gboolean
|
|
500 |
+update_workspace_property (char **property,
|
|
501 |
+ char *error_property_name,
|
|
502 |
+ const char *name,
|
|
503 |
+ const char *value);
|
|
504 |
+#endif /* HAVE_XTSOL */
|
|
505 |
+
|
|
506 |
|
|
507 |
typedef struct
|
|
508 |
{
|
8481
|
509 |
@@ -536,6 +564,11 @@ meta_prefs_init (void)
|
7488
|
510 |
/* workspace names */
|
|
511 |
init_workspace_names ();
|
|
512 |
|
|
513 |
+#ifdef HAVE_XTSOL
|
|
514 |
+ /* tsol labels and roles */
|
|
515 |
+ init_labels_roles_workspaces ();
|
|
516 |
+#endif /* HAVE_XTSOL */
|
|
517 |
+
|
|
518 |
#ifdef HAVE_GCONF
|
|
519 |
gconf_client_notify_add (default_client, "/apps/metacity",
|
|
520 |
change_notify,
|
8481
|
521 |
@@ -923,6 +956,75 @@ change_notify (GConfClient *client,
|
7488
|
522 |
if (update_workspace_name (key, str))
|
|
523 |
queue_changed (META_PREF_WORKSPACE_NAMES);
|
|
524 |
}
|
|
525 |
+#ifdef HAVE_XTSOL
|
|
526 |
+ else if (g_str_has_prefix (key, KEY_WORKSPACE_LABEL_PREFIX))
|
|
527 |
+ {
|
|
528 |
+ const char *str;
|
|
529 |
+
|
|
530 |
+ if (!tsol_use_trusted_extensions ())
|
|
531 |
+ goto out;
|
|
532 |
+
|
|
533 |
+ if (value && value->type != GCONF_VALUE_STRING)
|
|
534 |
+ {
|
|
535 |
+ meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
|
|
536 |
+ key);
|
|
537 |
+ goto out;
|
|
538 |
+ }
|
|
539 |
+
|
|
540 |
+ str = value ? gconf_value_get_string (value) : NULL;
|
|
541 |
+
|
|
542 |
+ /* Check if the label is in range if not set it to USER_MIN_SL
|
|
543 |
+ * NOTE : if USER_MIN_SL is not properly set you can have an infinite loop here */
|
|
544 |
+
|
|
545 |
+ if (str && !tsol_label_is_in_user_range (str))
|
|
546 |
+ {
|
|
547 |
+ char *p; /* code from update_workspace_property */
|
|
548 |
+ int i;
|
|
549 |
+
|
|
550 |
+ p = strrchr (key, '_');
|
|
551 |
+ if (p != NULL)
|
|
552 |
+ {
|
|
553 |
+ ++p;
|
|
554 |
+ if (g_ascii_isdigit (*p))
|
|
555 |
+ {
|
|
556 |
+ i = atoi (p);
|
|
557 |
+ i -= 1; /* count from 0 not 1 */
|
|
558 |
+
|
|
559 |
+ if (i >= MAX_REASONABLE_WORKSPACES)
|
|
560 |
+ {
|
|
561 |
+ meta_topic (META_DEBUG_PREFS,
|
|
562 |
+ "%s key %d is too highly numbered, ignoring\n",
|
|
563 |
+ "trusted workspace label", i);
|
|
564 |
+ }
|
|
565 |
+ else
|
|
566 |
+ meta_prefs_change_workspace_label (i, tsol_label_get_min ());
|
|
567 |
+ }
|
|
568 |
+ }
|
|
569 |
+ }
|
|
570 |
+
|
|
571 |
+ if (update_workspace_property (workspace_labels,"Workspace Label", key, str))
|
|
572 |
+ queue_changed (META_PREF_WORKSPACE_LABELS);
|
|
573 |
+ }
|
|
574 |
+ else if (g_str_has_prefix (key, KEY_WORKSPACE_ROLE_PREFIX))
|
|
575 |
+ {
|
|
576 |
+ const char *str;
|
|
577 |
+
|
|
578 |
+ if (!tsol_use_trusted_extensions ())
|
|
579 |
+ goto out;
|
|
580 |
+
|
|
581 |
+ if (value && value->type != GCONF_VALUE_STRING)
|
|
582 |
+ {
|
|
583 |
+ meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
|
|
584 |
+ key);
|
|
585 |
+ goto out;
|
|
586 |
+ }
|
|
587 |
+
|
|
588 |
+ str = value ? gconf_value_get_string (value) : NULL;
|
|
589 |
+
|
|
590 |
+ if (update_workspace_property (workspace_roles ,"Workspace roles", key, str))
|
|
591 |
+ queue_changed (META_PREF_WORKSPACE_ROLES);
|
|
592 |
+ }
|
|
593 |
+#endif /*HAVE_XTSOL*/
|
|
594 |
else if (strcmp (key, KEY_BUTTON_LAYOUT) == 0)
|
|
595 |
{
|
|
596 |
const char *str;
|
8481
|
597 |
@@ -1546,6 +1648,42 @@ update_num_workspaces (int value)
|
7488
|
598 |
value = MAX_REASONABLE_WORKSPACES;
|
|
599 |
}
|
|
600 |
|
|
601 |
+#ifdef HAVE_XTSOL
|
|
602 |
+ if (tsol_use_trusted_extensions ())
|
|
603 |
+ {
|
|
604 |
+ if (old > value) /* remove a workspace blank label and role */
|
|
605 |
+ {
|
|
606 |
+ GError *err = NULL;
|
|
607 |
+ char *key = gconf_key_for_workspace_label (value-1);
|
|
608 |
+ gconf_client_unset (default_client,
|
|
609 |
+ key, &err);
|
|
610 |
+ update_workspace_property (workspace_labels,"Workspace Label",
|
|
611 |
+ key, NULL);
|
|
612 |
+
|
|
613 |
+ g_free (key);
|
|
614 |
+ err = NULL;
|
|
615 |
+ key = gconf_key_for_workspace_role (value-1);
|
|
616 |
+ gconf_client_unset (default_client,
|
|
617 |
+ key, &err);
|
|
618 |
+ update_workspace_property (workspace_roles ,"Workspace roles",
|
|
619 |
+ key, NULL);
|
|
620 |
+ g_free (key);
|
|
621 |
+ }
|
|
622 |
+ else /* add a workspace add default label, blank role */
|
|
623 |
+ {
|
|
624 |
+ GError *err = NULL;
|
|
625 |
+ char *key = gconf_key_for_workspace_role (value-1);
|
|
626 |
+ gconf_client_unset (default_client,
|
|
627 |
+ key, &err);
|
|
628 |
+ update_workspace_property (workspace_roles ,"Workspace roles",
|
|
629 |
+ key, NULL);
|
|
630 |
+ g_free (key);
|
|
631 |
+ meta_prefs_change_workspace_label (value, tsol_label_get_min ());
|
|
632 |
+ }
|
|
633 |
+ }
|
|
634 |
+#endif /* HAVE_XTSOL */
|
|
635 |
+
|
|
636 |
+
|
|
637 |
num_workspaces = value;
|
|
638 |
|
|
639 |
return old != num_workspaces;
|
8481
|
640 |
@@ -1795,6 +1933,16 @@ meta_preference_to_string (MetaPreferenc
|
7488
|
641 |
|
8481
|
642 |
case META_PREF_COMPOSITING_MANAGER:
|
|
643 |
return "COMPOSITING_MANAGER";
|
|
644 |
+
|
7488
|
645 |
+#ifdef HAVE_XTSOL
|
|
646 |
+ case META_PREF_WORKSPACE_LABELS:
|
|
647 |
+ return "WORKSPACE_LABELS";
|
|
648 |
+ break;
|
|
649 |
+ case META_PREF_WORKSPACE_ROLES:
|
|
650 |
+ return "WORKSPACE_ROLES";
|
|
651 |
+ break;
|
8481
|
652 |
+#endif /*HAVE_XTSOL*/
|
|
653 |
+
|
7488
|
654 |
}
|
|
655 |
|
|
656 |
return "(unknown)";
|
8481
|
657 |
@@ -2150,6 +2298,53 @@ init_commands (void)
|
7488
|
658 |
#endif /* HAVE_GCONF */
|
|
659 |
}
|
|
660 |
|
|
661 |
+#ifdef HAVE_XTSOL
|
|
662 |
+static void init_labels_roles_workspaces (void)
|
|
663 |
+{
|
|
664 |
+ #ifdef HAVE_GCONF
|
|
665 |
+ int i;
|
|
666 |
+ GError *err;
|
|
667 |
+
|
|
668 |
+ if (!tsol_use_trusted_extensions ())
|
|
669 |
+ return;
|
|
670 |
+
|
|
671 |
+ i = 0;
|
|
672 |
+ while (i < MAX_REASONABLE_WORKSPACES)
|
|
673 |
+ {
|
|
674 |
+ char *str_val;
|
|
675 |
+ char *label_key, *role_key;
|
|
676 |
+
|
|
677 |
+ label_key = gconf_key_for_workspace_label (i);
|
|
678 |
+
|
|
679 |
+ err = NULL;
|
|
680 |
+ str_val = gconf_client_get_string (default_client, label_key, &err);
|
|
681 |
+ cleanup_error (&err);
|
|
682 |
+
|
|
683 |
+ update_workspace_property (workspace_labels,"Workspace Label",
|
|
684 |
+ label_key, str_val);
|
|
685 |
+
|
|
686 |
+ g_free (str_val);
|
|
687 |
+ g_free (label_key);
|
|
688 |
+
|
|
689 |
+ role_key = gconf_key_for_workspace_role (i);
|
|
690 |
+
|
|
691 |
+ err = NULL;
|
|
692 |
+ str_val = gconf_client_get_string (default_client, role_key, &err);
|
|
693 |
+ cleanup_error (&err);
|
|
694 |
+
|
|
695 |
+ update_workspace_property (workspace_roles ,"Workspace roles",
|
|
696 |
+ role_key, str_val);
|
|
697 |
+
|
|
698 |
+ g_free (str_val);
|
|
699 |
+ g_free (role_key);
|
|
700 |
+
|
|
701 |
+ ++i;
|
|
702 |
+ }
|
|
703 |
+#endif /* HAVE_GCONF */
|
|
704 |
+}
|
|
705 |
+#endif /* HAVE_XTSOL */
|
|
706 |
+
|
|
707 |
+
|
|
708 |
static void
|
|
709 |
init_workspace_names (void)
|
|
710 |
{
|
8481
|
711 |
@@ -2666,6 +2861,72 @@ meta_prefs_get_gconf_key_for_terminal_co
|
7488
|
712 |
}
|
|
713 |
|
|
714 |
#ifdef HAVE_GCONF
|
|
715 |
+#ifdef HAVE_XTSOL
|
|
716 |
+static gboolean
|
|
717 |
+update_workspace_property (char **property,
|
|
718 |
+ char *error_property_name,
|
|
719 |
+ const char *name,
|
|
720 |
+ const char *value)
|
|
721 |
+{
|
|
722 |
+ char *p;
|
|
723 |
+ int i;
|
|
724 |
+
|
|
725 |
+ if (!tsol_use_trusted_extensions ())
|
|
726 |
+ return FALSE;
|
|
727 |
+
|
|
728 |
+ p = strrchr (name, '_');
|
|
729 |
+ if (p == NULL)
|
|
730 |
+ {
|
|
731 |
+ meta_topic (META_DEBUG_PREFS,
|
|
732 |
+ "%s name %s has no underscore?\n", error_property_name, name);
|
|
733 |
+ return FALSE;
|
|
734 |
+ }
|
|
735 |
+
|
|
736 |
+ ++p;
|
|
737 |
+
|
|
738 |
+ if (!g_ascii_isdigit (*p))
|
|
739 |
+ {
|
|
740 |
+ meta_topic (META_DEBUG_PREFS,
|
|
741 |
+ "%s name %s doesn't end in number?\n",
|
|
742 |
+ error_property_name, name);
|
|
743 |
+ return FALSE;
|
|
744 |
+ }
|
|
745 |
+
|
|
746 |
+ i = atoi (p);
|
|
747 |
+ i -= 1; /* count from 0 not 1 */
|
|
748 |
+
|
|
749 |
+ if (i >= MAX_REASONABLE_WORKSPACES)
|
|
750 |
+ {
|
|
751 |
+ meta_topic (META_DEBUG_PREFS,
|
|
752 |
+ "%s name %d is too highly numbered, ignoring\n",
|
|
753 |
+ error_property_name, i);
|
|
754 |
+ return FALSE;
|
|
755 |
+ }
|
|
756 |
+
|
|
757 |
+ if (property[i] && value && strcmp (property[i], value) == 0)
|
|
758 |
+ {
|
|
759 |
+ meta_topic (META_DEBUG_PREFS,
|
|
760 |
+ "%s name %d is unchanged\n", error_property_name, i);
|
|
761 |
+ return FALSE;
|
|
762 |
+ }
|
|
763 |
+
|
|
764 |
+ if (value != NULL && *value != '\0')
|
|
765 |
+ {
|
|
766 |
+ g_free (property[i]);
|
|
767 |
+ property[i] = g_strdup (value);
|
|
768 |
+ }
|
|
769 |
+ else
|
|
770 |
+ {
|
|
771 |
+ g_free (property[i]);
|
|
772 |
+ property[i] = NULL;
|
|
773 |
+ }
|
|
774 |
+
|
|
775 |
+ return TRUE;
|
|
776 |
+}
|
|
777 |
+
|
|
778 |
+#endif /* HAVE_XTSOL */
|
|
779 |
+
|
|
780 |
+
|
|
781 |
static gboolean
|
|
782 |
update_workspace_name (const char *name,
|
|
783 |
const char *value)
|
8481
|
784 |
@@ -2743,6 +3004,152 @@ update_workspace_name (const char *name
|
7488
|
785 |
return TRUE;
|
|
786 |
}
|
|
787 |
#endif /* HAVE_GCONF */
|
|
788 |
+#ifdef HAVE_XTSOL
|
|
789 |
+const char* meta_prefs_get_workspace_label (int i)
|
|
790 |
+{
|
|
791 |
+ g_return_val_if_fail (i >= 0 && i < MAX_REASONABLE_WORKSPACES, NULL);
|
|
792 |
+
|
|
793 |
+ if (!tsol_use_trusted_extensions ())
|
|
794 |
+ return NULL;
|
|
795 |
+
|
|
796 |
+ return workspace_labels [i];
|
|
797 |
+}
|
|
798 |
+void
|
|
799 |
+meta_prefs_change_workspace_label (int i,
|
|
800 |
+ const char *name)
|
|
801 |
+{
|
|
802 |
+#ifdef HAVE_GCONF
|
|
803 |
+ char *key;
|
|
804 |
+ GError *err;
|
|
805 |
+
|
|
806 |
+ g_return_if_fail (i >= 0 && i < MAX_REASONABLE_WORKSPACES);
|
|
807 |
+
|
|
808 |
+ if (!tsol_use_trusted_extensions ())
|
|
809 |
+ return;
|
|
810 |
+
|
|
811 |
+ meta_topic (META_DEBUG_PREFS,
|
|
812 |
+ "Changing name of workspace_labels %d to %s\n",
|
|
813 |
+ i, name ? name : "none");
|
|
814 |
+
|
|
815 |
+ /* This is a bad hack. We have to treat empty string as
|
|
816 |
+ * "unset" because the root window property can't contain
|
|
817 |
+ * null. So it gets empty string instead and we don't want
|
|
818 |
+ * that to result in setting the empty string as a value that
|
|
819 |
+ * overrides "unset".
|
|
820 |
+ */
|
|
821 |
+ if (name && *name == '\0')
|
|
822 |
+ name = NULL;
|
|
823 |
+
|
|
824 |
+ if ((name == NULL && workspace_labels [i] == NULL) ||
|
|
825 |
+ (name && workspace_labels[i] && strcmp (name, workspace_labels[i]) == 0))
|
|
826 |
+ {
|
|
827 |
+ meta_topic (META_DEBUG_PREFS,
|
|
828 |
+ "Workspace label %d already has name %s\n",
|
|
829 |
+ i, name ? name : "none");
|
|
830 |
+ return;
|
|
831 |
+ }
|
|
832 |
+
|
|
833 |
+ key = gconf_key_for_workspace_label (i);
|
|
834 |
+
|
|
835 |
+ err = NULL;
|
|
836 |
+ if (name != NULL)
|
|
837 |
+ gconf_client_set_string (default_client,
|
|
838 |
+ key, name,
|
|
839 |
+ &err);
|
|
840 |
+ else
|
|
841 |
+ gconf_client_unset (default_client,
|
|
842 |
+ key, &err);
|
|
843 |
+
|
|
844 |
+
|
|
845 |
+ if (err)
|
|
846 |
+ {
|
|
847 |
+ meta_warning (_("Error setting name for workspace label %d to \"%s\": %s\n"),
|
|
848 |
+ i, name ? name : "none",
|
|
849 |
+ err->message);
|
|
850 |
+ g_error_free (err);
|
|
851 |
+ }
|
|
852 |
+
|
|
853 |
+ update_workspace_property (workspace_labels,"Workspace Label",
|
|
854 |
+ key, name);
|
|
855 |
+
|
|
856 |
+ g_free (key);
|
|
857 |
+#endif /* HAVE_GCONF */
|
|
858 |
+}
|
|
859 |
+
|
|
860 |
+
|
|
861 |
+const char* meta_prefs_get_workspace_role (int i)
|
|
862 |
+{
|
|
863 |
+ g_return_val_if_fail (i >= 0 && i < MAX_REASONABLE_WORKSPACES, NULL);
|
|
864 |
+
|
|
865 |
+ if (!tsol_use_trusted_extensions ())
|
|
866 |
+ return NULL;
|
|
867 |
+
|
|
868 |
+ return workspace_roles [i];
|
|
869 |
+}
|
|
870 |
+
|
|
871 |
+void meta_prefs_change_workspace_role (int i,
|
|
872 |
+ const char *name)
|
|
873 |
+{
|
|
874 |
+#ifdef HAVE_GCONF
|
|
875 |
+ char *key;
|
|
876 |
+ GError *err;
|
|
877 |
+
|
|
878 |
+ g_return_if_fail (i >= 0 && i < MAX_REASONABLE_WORKSPACES);
|
|
879 |
+
|
|
880 |
+ if (!tsol_use_trusted_extensions ())
|
|
881 |
+ return;
|
|
882 |
+
|
|
883 |
+ meta_topic (META_DEBUG_PREFS,
|
|
884 |
+ "Changing name of workspace_roles %d to %s\n",
|
|
885 |
+ i, name ? name : "none");
|
|
886 |
+
|
|
887 |
+ /* This is a bad hack. We have to treat empty string as
|
|
888 |
+ * "unset" because the root window property can't contain
|
|
889 |
+ * null. So it gets empty string instead and we don't want
|
|
890 |
+ * that to result in setting the empty string as a value that
|
|
891 |
+ * overrides "unset".
|
|
892 |
+ */
|
|
893 |
+ if (name && *name == '\0')
|
|
894 |
+ name = NULL;
|
|
895 |
+
|
|
896 |
+ if ((name == NULL && workspace_roles [i] == NULL) ||
|
|
897 |
+ (name && workspace_roles [i] && strcmp (name, workspace_roles [i]) == 0))
|
|
898 |
+ {
|
|
899 |
+ meta_topic (META_DEBUG_PREFS,
|
|
900 |
+ "Workspace role %d already has name %s\n",
|
|
901 |
+ i, name ? name : "none");
|
|
902 |
+ return;
|
|
903 |
+ }
|
|
904 |
+
|
|
905 |
+ key = gconf_key_for_workspace_role (i);
|
|
906 |
+
|
|
907 |
+ err = NULL;
|
|
908 |
+ if (name != NULL)
|
|
909 |
+ gconf_client_set_string (default_client,
|
|
910 |
+ key, name,
|
|
911 |
+ &err);
|
|
912 |
+ else
|
|
913 |
+ gconf_client_unset (default_client,
|
|
914 |
+ key, &err);
|
|
915 |
+
|
|
916 |
+
|
|
917 |
+ if (err)
|
|
918 |
+ {
|
|
919 |
+ meta_warning (_("Error setting name for workspace role %d to \"%s\": %s\n"),
|
|
920 |
+ i, name ? name : "none",
|
|
921 |
+ err->message);
|
|
922 |
+ g_error_free (err);
|
|
923 |
+ }
|
|
924 |
+
|
|
925 |
+ g_free (key);
|
|
926 |
+#endif /* HAVE_GCONF */
|
|
927 |
+
|
|
928 |
+
|
|
929 |
+
|
|
930 |
+
|
|
931 |
+}
|
|
932 |
+
|
|
933 |
+#endif /* HAVE_XTSOL */
|
|
934 |
|
|
935 |
const char*
|
|
936 |
meta_prefs_get_workspace_name (int i)
|
8481
|
937 |
@@ -2818,6 +3225,29 @@ meta_prefs_change_workspace_name (int
|
7488
|
938 |
}
|
|
939 |
|
|
940 |
#ifdef HAVE_GCONF
|
|
941 |
+#ifdef HAVE_XTSOL
|
|
942 |
+static char*
|
|
943 |
+gconf_key_for_workspace_label (int i)
|
|
944 |
+{
|
|
945 |
+ char *key;
|
|
946 |
+
|
|
947 |
+ key = g_strdup_printf (KEY_WORKSPACE_LABEL_PREFIX"%d", i + 1);
|
|
948 |
+
|
|
949 |
+ return key;
|
|
950 |
+}
|
|
951 |
+static char*
|
|
952 |
+gconf_key_for_workspace_role (int i)
|
|
953 |
+{
|
|
954 |
+ char *key;
|
|
955 |
+
|
|
956 |
+ key = g_strdup_printf (KEY_WORKSPACE_ROLE_PREFIX"%d", i + 1);
|
|
957 |
+
|
|
958 |
+ return key;
|
|
959 |
+}
|
|
960 |
+#endif /* HAVE_XTSOL */
|
|
961 |
+
|
|
962 |
+
|
|
963 |
+
|
|
964 |
static char*
|
|
965 |
gconf_key_for_workspace_name (int i)
|
|
966 |
{
|
8481
|
967 |
diff -Nrup metacity-2.16.3/src/prefs.h ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/prefs.h
|
|
968 |
--- metacity-2.16.3/src/prefs.h 2006-11-02 13:18:50.705019000 +0100
|
|
969 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/prefs.h 2006-11-02 13:24:26.248825000 +0100
|
|
970 |
@@ -56,6 +56,10 @@ typedef enum
|
7488
|
971 |
META_PREF_CURSOR_THEME,
|
8481
|
972 |
META_PREF_CURSOR_SIZE,
|
|
973 |
META_PREF_COMPOSITING_MANAGER
|
7488
|
974 |
+#ifdef HAVE_XTSOL
|
8481
|
975 |
+ ,META_PREF_WORKSPACE_LABELS,
|
7488
|
976 |
+ META_PREF_WORKSPACE_ROLES
|
|
977 |
+#endif /*HAVE_XTSOL*/
|
|
978 |
} MetaPreference;
|
|
979 |
|
|
980 |
typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
|
8481
|
981 |
@@ -105,6 +109,16 @@ const char* meta_prefs_get_cursor_theme
|
7488
|
982 |
int meta_prefs_get_cursor_size (void);
|
8481
|
983 |
gboolean meta_prefs_get_compositing_manager (void);
|
7488
|
984 |
|
|
985 |
+#ifdef HAVE_XTSOL
|
|
986 |
+const char* meta_prefs_get_workspace_label (int i);
|
|
987 |
+void meta_prefs_change_workspace_label (int i,
|
|
988 |
+ const char *name);
|
|
989 |
+const char* meta_prefs_get_workspace_role (int i);
|
|
990 |
+void meta_prefs_change_workspace_role (int i,
|
|
991 |
+ const char *name);
|
|
992 |
+#endif /* HAVE_XTSOL */
|
|
993 |
+
|
|
994 |
+
|
|
995 |
/* Screen bindings */
|
|
996 |
#define META_KEYBINDING_WORKSPACE_1 "switch_to_workspace_1"
|
|
997 |
#define META_KEYBINDING_WORKSPACE_2 "switch_to_workspace_2"
|
8481
|
998 |
diff -Nrup metacity-2.16.3/src/preview-widget.c ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/preview-widget.c
|
|
999 |
--- metacity-2.16.3/src/preview-widget.c 2006-11-02 13:18:50.419967000 +0100
|
|
1000 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/preview-widget.c 2006-11-02 13:21:03.827543000 +0100
|
7488
|
1001 |
@@ -19,6 +19,7 @@
|
|
1002 |
* 02111-1307, USA.
|
|
1003 |
*/
|
|
1004 |
|
|
1005 |
+#include <config.h>
|
|
1006 |
#include "preview-widget.h"
|
|
1007 |
|
|
1008 |
static void meta_preview_class_init (MetaPreviewClass *klass);
|
|
1009 |
@@ -248,7 +249,11 @@ meta_preview_expose (GtkWidget *wid
|
|
1010 |
&preview->button_layout,
|
|
1011 |
button_states,
|
|
1012 |
meta_preview_get_mini_icon (),
|
|
1013 |
- meta_preview_get_icon ());
|
|
1014 |
+ meta_preview_get_icon ()
|
|
1015 |
+#ifdef HAVE_XTSOL
|
|
1016 |
+ ,NULL
|
|
1017 |
+#endif
|
|
1018 |
+ );
|
|
1019 |
}
|
|
1020 |
|
|
1021 |
/* draw child */
|
8481
|
1022 |
diff -Nrup metacity-2.16.3/src/screen.c ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/screen.c
|
|
1023 |
--- metacity-2.16.3/src/screen.c 2006-11-02 13:18:50.706767000 +0100
|
|
1024 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/screen.c 2006-11-02 13:21:03.872773000 +0100
|
7488
|
1025 |
@@ -36,6 +36,7 @@
|
|
1026 |
#include "stack.h"
|
|
1027 |
#include "xprops.h"
|
|
1028 |
#include "compositor.h"
|
|
1029 |
+#include <gtk/gtk.h>
|
|
1030 |
|
|
1031 |
#ifdef HAVE_SOLARIS_XINERAMA
|
|
1032 |
#include <X11/extensions/xinerama.h>
|
8481
|
1033 |
@@ -612,6 +613,13 @@ meta_screen_new (MetaDisplay *display,
|
|
1034 |
update_num_workspaces (screen, timestamp);
|
7488
|
1035 |
|
|
1036 |
set_workspace_names (screen);
|
|
1037 |
+#ifdef HAVE_XTSOL
|
|
1038 |
+ if (tsol_is_available ())
|
|
1039 |
+ {
|
|
1040 |
+ tsol_workspace_labels_atom_set (screen);
|
|
1041 |
+ tsol_workspace_roles_atom_set (screen);
|
|
1042 |
+ }
|
|
1043 |
+#endif /*HAVE_XTSOL */
|
|
1044 |
|
|
1045 |
screen->all_keys_grabbed = FALSE;
|
|
1046 |
screen->keys_grabbed = FALSE;
|
8481
|
1047 |
@@ -872,6 +880,16 @@ prefs_changed_callback (MetaPreference p
|
7488
|
1048 |
{
|
|
1049 |
set_workspace_names (screen);
|
|
1050 |
}
|
|
1051 |
+#ifdef HAVE_XTSOL
|
|
1052 |
+ else if (pref == META_PREF_WORKSPACE_LABELS)
|
|
1053 |
+ {
|
|
1054 |
+ tsol_workspace_labels_atom_set (screen);
|
|
1055 |
+ }
|
|
1056 |
+ else if (pref == META_PREF_WORKSPACE_ROLES)
|
|
1057 |
+ {
|
|
1058 |
+ tsol_workspace_roles_atom_set (screen);
|
|
1059 |
+ }
|
|
1060 |
+#endif /*HAVE_XTSOL */
|
|
1061 |
}
|
|
1062 |
|
|
1063 |
|
8481
|
1064 |
@@ -1167,6 +1185,13 @@ update_num_workspaces (MetaScreen *scree
|
7488
|
1065 |
}
|
|
1066 |
|
|
1067 |
set_number_of_spaces_hint (screen, new_num);
|
|
1068 |
+#ifdef HAVE_XTSOL
|
|
1069 |
+ if (tsol_is_available ())
|
|
1070 |
+ {
|
|
1071 |
+ tsol_workspace_labels_atom_set (screen);
|
|
1072 |
+ tsol_workspace_roles_atom_set (screen);
|
|
1073 |
+ }
|
|
1074 |
+#endif /* HAVE_XTSOL */
|
|
1075 |
|
|
1076 |
meta_screen_queue_workarea_recalc (screen);
|
|
1077 |
}
|
8481
|
1078 |
diff -Nrup metacity-2.16.3/src/tabpopup.c ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/tabpopup.c
|
|
1079 |
--- metacity-2.16.3/src/tabpopup.c 2006-11-02 13:18:50.801016000 +0100
|
|
1080 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/tabpopup.c 2006-11-02 13:21:03.895686000 +0100
|
7488
|
1081 |
@@ -31,6 +31,10 @@
|
|
1082 |
#include "frame.h"
|
|
1083 |
#include <gtk/gtk.h>
|
|
1084 |
#include <math.h>
|
|
1085 |
+#ifdef HAVE_XTSOL
|
|
1086 |
+#include "trusted.h"
|
|
1087 |
+#include "display.h"
|
|
1088 |
+#endif /* HAVE_XTSOL */
|
|
1089 |
|
|
1090 |
#define OUTSIDE_SELECT_RECT 2
|
|
1091 |
#define INSIDE_SELECT_RECT 2
|
|
1092 |
@@ -99,6 +103,65 @@ outline_window_expose (GtkWidget *w
|
|
1093 |
return FALSE;
|
|
1094 |
}
|
|
1095 |
|
|
1096 |
+#ifdef HAVE_XTSOL
|
|
1097 |
+static gboolean should_label_layout_be_black (GdkColor *color)
|
|
1098 |
+{
|
|
1099 |
+ int ntsc;
|
|
1100 |
+ ntsc = ((color->red) * .4450 +
|
|
1101 |
+ (color->blue) * .030 +
|
|
1102 |
+ (color->green) * .525);
|
|
1103 |
+
|
|
1104 |
+ if ((65535 - ntsc) < .61 * 65535)
|
|
1105 |
+ return TRUE;
|
|
1106 |
+ return FALSE;
|
|
1107 |
+}
|
|
1108 |
+
|
|
1109 |
+static gboolean
|
|
1110 |
+tsol_tab_label_expose_event (GtkWidget *widget,
|
|
1111 |
+ GdkEventExpose *event,
|
|
1112 |
+ gpointer data)
|
|
1113 |
+{
|
|
1114 |
+ MetaTabPopup *popup;
|
|
1115 |
+ int w, h;
|
|
1116 |
+ TabEntry *te;
|
|
1117 |
+ ConstraintImage *cimage;
|
|
1118 |
+ MetaTrustedLabel *tlabel;
|
|
1119 |
+
|
|
1120 |
+ popup = data;
|
|
1121 |
+
|
|
1122 |
+ if (popup->current_selected_entry == NULL)
|
|
1123 |
+ return FALSE;
|
|
1124 |
+
|
|
1125 |
+ te = popup->current_selected_entry;
|
|
1126 |
+
|
|
1127 |
+ if (popup->outline)
|
|
1128 |
+ tlabel = tsol_xwindow_label_get (meta_display_for_x_display (gdk_display), (Window) te->key);
|
|
1129 |
+ else
|
|
1130 |
+ tlabel = tsol_workspace_get_label ((MetaWorkspace *) te->key);
|
|
1131 |
+
|
|
1132 |
+ if (should_label_layout_be_black (&tlabel->color->data.basic.color))
|
|
1133 |
+ gtk_widget_modify_fg (widget, GTK_STATE_NORMAL, &widget->style->black);
|
|
1134 |
+ else
|
|
1135 |
+ gtk_widget_modify_fg (widget, GTK_STATE_NORMAL, &widget->style->white);
|
|
1136 |
+
|
|
1137 |
+
|
|
1138 |
+ cimage = tsol_get_highlight_stripe (tlabel->name, &tlabel->color->data.basic.color);
|
|
1139 |
+
|
|
1140 |
+ if (cimage)
|
|
1141 |
+ libgnome_tsol_constraint_image_render (cimage,
|
|
1142 |
+ widget->window,
|
|
1143 |
+ NULL, &event->area,
|
|
1144 |
+ FALSE,
|
|
1145 |
+ event->area.x,
|
|
1146 |
+ event->area.y,
|
|
1147 |
+ event->area.width,
|
|
1148 |
+ event->area.height);
|
|
1149 |
+
|
|
1150 |
+ return FALSE;
|
|
1151 |
+}
|
|
1152 |
+#endif /* HAVE_XTSOL */
|
|
1153 |
+
|
|
1154 |
+
|
|
1155 |
static GdkPixbuf*
|
|
1156 |
dimm_icon (GdkPixbuf *pixbuf)
|
|
1157 |
{
|
8481
|
1158 |
@@ -301,6 +364,13 @@ meta_ui_tab_popup_new (const MetaTabEntr
|
7488
|
1159 |
|
|
1160 |
gtk_box_pack_end (GTK_BOX (vbox), popup->label, FALSE, FALSE, 0);
|
|
1161 |
|
|
1162 |
+#ifdef HAVE_XTSOL
|
|
1163 |
+ if (tsol_is_available ())
|
|
1164 |
+ g_signal_connect (G_OBJECT (popup->label), "expose_event",
|
|
1165 |
+ G_CALLBACK (tsol_tab_label_expose_event),
|
|
1166 |
+ popup);
|
|
1167 |
+#endif /*HAVE_XTSOL */
|
|
1168 |
+
|
|
1169 |
max_label_width = 0;
|
|
1170 |
top = 0;
|
|
1171 |
bottom = 1;
|
8481
|
1172 |
@@ -933,6 +1003,34 @@ meta_select_workspace_expose_event (GtkW
|
7488
|
1173 |
}
|
|
1174 |
}
|
|
1175 |
|
|
1176 |
+#ifdef HAVE_XTSOL
|
|
1177 |
+ if (tsol_is_available ())
|
|
1178 |
+ {
|
|
1179 |
+ GdkGC *tmp_gc = gdk_gc_new (widget->window);
|
|
1180 |
+ MetaTrustedLabel *label = tsol_workspace_get_label (workspace);
|
|
1181 |
+
|
|
1182 |
+ gdk_gc_set_rgb_fg_color (tmp_gc, &label->color->data.basic.color);
|
|
1183 |
+
|
|
1184 |
+ gdk_draw_rectangle (widget->window,
|
|
1185 |
+ tmp_gc,
|
|
1186 |
+ TRUE,
|
|
1187 |
+ widget->allocation.width / 3,
|
|
1188 |
+ 0,
|
|
1189 |
+ widget->allocation.width / 3,
|
|
1190 |
+ 4);
|
|
1191 |
+
|
|
1192 |
+ g_object_unref (tmp_gc);
|
|
1193 |
+
|
|
1194 |
+ gdk_draw_rectangle (widget->window,
|
|
1195 |
+ widget->style->black_gc,
|
|
1196 |
+ FALSE,
|
|
1197 |
+ widget->allocation.width / 3,
|
|
1198 |
+ 0,
|
|
1199 |
+ widget->allocation.width / 3,
|
|
1200 |
+ 4);
|
|
1201 |
+ }
|
|
1202 |
+#endif /*HAVE_XTSOL*/
|
|
1203 |
+
|
|
1204 |
return TRUE;
|
|
1205 |
}
|
|
1206 |
|
8481
|
1207 |
diff -Nrup metacity-2.16.3/src/theme-viewer.c ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/theme-viewer.c
|
|
1208 |
--- metacity-2.16.3/src/theme-viewer.c 2006-11-02 13:18:50.810534000 +0100
|
|
1209 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/theme-viewer.c 2006-11-02 13:21:03.898536000 +0100
|
7488
|
1210 |
@@ -987,7 +987,11 @@ run_theme_benchmark (void)
|
|
1211 |
&button_layout,
|
|
1212 |
button_states,
|
|
1213 |
meta_preview_get_mini_icon (),
|
|
1214 |
- meta_preview_get_icon ());
|
|
1215 |
+ meta_preview_get_icon ()
|
|
1216 |
+#ifdef HAVE_XTSOL
|
|
1217 |
+ ,NULL
|
|
1218 |
+#endif
|
|
1219 |
+ );
|
|
1220 |
|
|
1221 |
g_object_unref (G_OBJECT (pixmap));
|
|
1222 |
|
8481
|
1223 |
diff -Nrup metacity-2.16.3/src/theme.c ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/theme.c
|
|
1224 |
--- metacity-2.16.3/src/theme.c 2006-11-02 13:18:50.423816000 +0100
|
|
1225 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/theme.c 2006-11-02 13:21:03.975292000 +0100
|
7488
|
1226 |
@@ -28,6 +28,9 @@
|
|
1227 |
#include <string.h>
|
|
1228 |
#include <stdlib.h>
|
|
1229 |
#include <math.h>
|
|
1230 |
+#ifdef HAVE_XTSOL
|
|
1231 |
+#include "trusted.h"
|
|
1232 |
+#endif
|
|
1233 |
|
|
1234 |
#define GDK_COLOR_RGBA(color) \
|
|
1235 |
((guint32) (0xff | \
|
|
1236 |
@@ -497,8 +500,14 @@ meta_frame_layout_calc_geometry (const M
|
|
1237 |
fgeom->top_height + fgeom->bottom_height;
|
|
1238 |
|
|
1239 |
fgeom->width = width;
|
|
1240 |
+#ifdef HAVE_XTSOL
|
|
1241 |
+ if (tsol_is_available ())
|
|
1242 |
+ fgeom->height = height + fgeom->top_height; /*Trusted Frame Layout Modification TFLM*/
|
|
1243 |
+ else
|
|
1244 |
fgeom->height = height;
|
|
1245 |
-
|
|
1246 |
+#else
|
|
1247 |
+ fgeom->height = height;
|
|
1248 |
+#endif
|
|
1249 |
fgeom->top_titlebar_edge = layout->title_border.top;
|
|
1250 |
fgeom->bottom_titlebar_edge = layout->title_border.bottom;
|
|
1251 |
fgeom->left_titlebar_edge = layout->left_titlebar_edge;
|
8481
|
1252 |
@@ -891,7 +900,11 @@ meta_color_spec_new (MetaColorSpecType t
|
7488
|
1253 |
case META_COLOR_SPEC_BASIC:
|
|
1254 |
size += sizeof (dummy.data.basic);
|
|
1255 |
break;
|
|
1256 |
-
|
|
1257 |
+#ifdef HAVE_XTSOL
|
|
1258 |
+ case META_COLOR_SPEC_LABEL:
|
|
1259 |
+ size += sizeof (dummy.data.label);
|
|
1260 |
+ break;
|
|
1261 |
+#endif
|
|
1262 |
case META_COLOR_SPEC_GTK:
|
|
1263 |
size += sizeof (dummy.data.gtk);
|
|
1264 |
break;
|
8481
|
1265 |
@@ -922,7 +935,11 @@ meta_color_spec_free (MetaColorSpec *spe
|
7488
|
1266 |
case META_COLOR_SPEC_BASIC:
|
|
1267 |
DEBUG_FILL_STRUCT (&spec->data.basic);
|
|
1268 |
break;
|
|
1269 |
-
|
|
1270 |
+#ifdef HAVE_XTSOL
|
|
1271 |
+ case META_COLOR_SPEC_LABEL:
|
|
1272 |
+ DEBUG_FILL_STRUCT (&spec->data.label);
|
|
1273 |
+ break;
|
|
1274 |
+#endif
|
|
1275 |
case META_COLOR_SPEC_GTK:
|
|
1276 |
DEBUG_FILL_STRUCT (&spec->data.gtk);
|
|
1277 |
break;
|
8481
|
1278 |
@@ -1021,6 +1038,14 @@ meta_color_spec_new_from_string (const c
|
7488
|
1279 |
g_assert (spec->data.gtk.state < N_GTK_STATES);
|
|
1280 |
g_assert (spec->data.gtk.component < META_GTK_COLOR_LAST);
|
|
1281 |
}
|
|
1282 |
+#ifdef HAVE_XTSOL
|
|
1283 |
+ else if (str[0] == 'l' && str[1] == 'a' && str[2] == 'b' && str[3] == 'e' &&
|
|
1284 |
+ str[4] == 'l')
|
|
1285 |
+ {
|
|
1286 |
+ spec = meta_color_spec_new (META_COLOR_SPEC_LABEL);
|
|
1287 |
+ spec->data.label.dummy = TRUE;
|
|
1288 |
+ }
|
|
1289 |
+#endif
|
|
1290 |
else if (str[0] == 'b' && str[1] == 'l' && str[2] == 'e' && str[3] == 'n' &&
|
|
1291 |
str[4] == 'd' && str[5] == '/')
|
|
1292 |
{
|
8481
|
1293 |
@@ -1196,7 +1221,19 @@ meta_color_spec_render (MetaColorSpec *s
|
7488
|
1294 |
case META_COLOR_SPEC_BASIC:
|
|
1295 |
*color = spec->data.basic.color;
|
|
1296 |
break;
|
|
1297 |
+#ifdef HAVE_XTSOL
|
|
1298 |
+ case META_COLOR_SPEC_LABEL:
|
|
1299 |
+ {
|
|
1300 |
+ MetaTrustedLabel *label = NULL;
|
|
1301 |
+ label = (MetaTrustedLabel *)g_object_get_data (G_OBJECT (widget), "trusted_label");
|
|
1302 |
+ if (label != NULL)
|
|
1303 |
+ *color = label->color->data.basic.color;
|
|
1304 |
+ else
|
|
1305 |
+ g_warning ("trusted_label property isn't set for the widget");
|
|
1306 |
|
|
1307 |
+ }
|
|
1308 |
+ break;
|
|
1309 |
+#endif
|
|
1310 |
case META_COLOR_SPEC_GTK:
|
|
1311 |
switch (spec->data.gtk.component)
|
|
1312 |
{
|
8481
|
1313 |
@@ -2039,6 +2076,12 @@ pos_eval_helper (PosToken
|
7488
|
1314 |
exprs[n_exprs].d.int_val = env->title_width;
|
|
1315 |
else if (strcmp (t->d.v.name, "title_height") == 0)
|
|
1316 |
exprs[n_exprs].d.int_val = env->title_height;
|
|
1317 |
+#ifdef HAVE_XTSOL
|
|
1318 |
+ else if (strcmp (t->d.v.name, "trusted_label_width") == 0)
|
|
1319 |
+ exprs[n_exprs].d.int_val = env->trusted_label_width;
|
|
1320 |
+ else if (strcmp (t->d.v.name, "trusted_label_height") == 0)
|
|
1321 |
+ exprs[n_exprs].d.int_val = env->trusted_label_height;
|
|
1322 |
+#endif
|
|
1323 |
/* In practice we only hit this code on initial theme
|
|
1324 |
* parse; after that we always optimize constants away
|
|
1325 |
*/
|
8481
|
1326 |
@@ -2484,6 +2527,11 @@ meta_draw_op_new (MetaDrawType type)
|
7488
|
1327 |
case META_DRAW_TILE:
|
|
1328 |
size += sizeof (dummy.data.tile);
|
|
1329 |
break;
|
|
1330 |
+#ifdef HAVE_XTSOL
|
|
1331 |
+ case META_DRAW_TRUSTED_LABEL:
|
|
1332 |
+ size += sizeof (dummy.data.trusted_label);
|
|
1333 |
+ break;
|
|
1334 |
+#endif
|
|
1335 |
}
|
|
1336 |
|
|
1337 |
op = g_malloc0 (size);
|
8481
|
1338 |
@@ -2628,6 +2676,14 @@ meta_draw_op_free (MetaDrawOp *op)
|
7488
|
1339 |
g_free (op->data.tile.tile_width);
|
|
1340 |
g_free (op->data.tile.tile_height);
|
|
1341 |
break;
|
|
1342 |
+#ifdef HAVE_XTSOL
|
|
1343 |
+ case META_DRAW_TRUSTED_LABEL:
|
|
1344 |
+ if (op->data.trusted_label.color_spec)
|
|
1345 |
+ meta_color_spec_free (op->data.trusted_label.color_spec);
|
|
1346 |
+ g_free (op->data.trusted_label.x);
|
|
1347 |
+ g_free (op->data.trusted_label.y);
|
|
1348 |
+ break;
|
|
1349 |
+#endif
|
|
1350 |
}
|
|
1351 |
|
|
1352 |
g_free (op);
|
8481
|
1353 |
@@ -3144,6 +3200,10 @@ draw_op_as_pixbuf (const MetaDrawOp *
|
7488
|
1354 |
|
|
1355 |
case META_DRAW_TILE:
|
|
1356 |
break;
|
|
1357 |
+#ifdef HAVE_XTSOL
|
|
1358 |
+ case META_DRAW_TRUSTED_LABEL:
|
|
1359 |
+ break;
|
|
1360 |
+#endif
|
|
1361 |
}
|
|
1362 |
|
|
1363 |
return pixbuf;
|
8481
|
1364 |
@@ -3181,6 +3241,23 @@ fill_env (MetaPositionExprEnv *env,
|
7488
|
1365 |
|
|
1366 |
env->title_width = info->title_layout_width;
|
|
1367 |
env->title_height = info->title_layout_height;
|
|
1368 |
+#ifdef HAVE_XTSOL
|
|
1369 |
+ if (info->label && info->label->layout)
|
|
1370 |
+ {
|
|
1371 |
+ PangoRectangle extents;
|
|
1372 |
+
|
|
1373 |
+ pango_layout_get_pixel_extents (info->label->layout,
|
|
1374 |
+ NULL, &extents);
|
|
1375 |
+
|
|
1376 |
+ env->trusted_label_width = extents.width;
|
|
1377 |
+ env->trusted_label_height = extents.height;
|
|
1378 |
+ }
|
|
1379 |
+ else
|
|
1380 |
+ {
|
|
1381 |
+ env->trusted_label_width = 0;
|
|
1382 |
+ env->trusted_label_height = 0;
|
|
1383 |
+ }
|
|
1384 |
+#endif
|
|
1385 |
env->theme = NULL; /* not required, constants have been optimized out */
|
|
1386 |
}
|
|
1387 |
|
8481
|
1388 |
@@ -3349,6 +3426,14 @@ meta_draw_op_draw_with_env (const MetaDr
|
7488
|
1389 |
{
|
|
1390 |
env->object_width = gdk_pixbuf_get_width (op->data.image.pixbuf);
|
|
1391 |
env->object_height = gdk_pixbuf_get_height (op->data.image.pixbuf);
|
|
1392 |
+#ifdef HAVE_XTSOL
|
|
1393 |
+ /* Hack to display shield icon conditionally */
|
|
1394 |
+ if (op->data.image.pixbuf == shield_pixbuf)
|
|
1395 |
+ {
|
|
1396 |
+ if (strcmp (info->label->name, "Trusted Path") != 0)
|
|
1397 |
+ return;
|
|
1398 |
+ }
|
|
1399 |
+#endif
|
|
1400 |
}
|
|
1401 |
|
|
1402 |
rwidth = parse_size_unchecked (op->data.image.width, env);
|
8481
|
1403 |
@@ -3535,6 +3620,67 @@ meta_draw_op_draw_with_env (const MetaDr
|
7488
|
1404 |
}
|
|
1405 |
}
|
|
1406 |
break;
|
|
1407 |
+
|
|
1408 |
+#ifdef HAVE_XTSOL
|
|
1409 |
+ case META_DRAW_TRUSTED_LABEL:
|
|
1410 |
+ if (info->title_layout)
|
|
1411 |
+ {
|
|
1412 |
+ int rx, ry;
|
|
1413 |
+ int text_w, text_h;
|
|
1414 |
+ static MetaColorSpec *black = NULL;
|
|
1415 |
+ static MetaColorSpec *white = NULL;
|
|
1416 |
+ MetaColorSpec *main_color, *shadow_color;
|
|
1417 |
+ gboolean black_text = tsol_should_label_layout_be_black (info->label->color);
|
|
1418 |
+
|
|
1419 |
+ if (!black)
|
|
1420 |
+ {
|
|
1421 |
+ black = meta_color_spec_new (META_COLOR_SPEC_BASIC);
|
|
1422 |
+ white = meta_color_spec_new (META_COLOR_SPEC_BASIC);
|
|
1423 |
+
|
|
1424 |
+ gdk_color_parse ("black", &black->data.basic.color);
|
|
1425 |
+ gdk_color_parse ("white", &white->data.basic.color);
|
|
1426 |
+ }
|
|
1427 |
+
|
|
1428 |
+ if (black_text)
|
|
1429 |
+ {
|
|
1430 |
+ main_color = black;
|
|
1431 |
+ shadow_color = white;
|
|
1432 |
+ }
|
|
1433 |
+ else
|
|
1434 |
+ {
|
|
1435 |
+ main_color = white;
|
|
1436 |
+ shadow_color = black;
|
|
1437 |
+ }
|
|
1438 |
+
|
|
1439 |
+ pango_layout_get_pixel_size (info->label->layout,&text_w, &text_h);
|
|
1440 |
+
|
8481
|
1441 |
+ rx = ((rect.width - text_w) / 2 ) + rect.x;
|
|
1442 |
+ ry = ((rect.height - text_h) / 2 ) + rect.y;
|
7488
|
1443 |
+
|
|
1444 |
+ gc = get_gc_for_primitive (widget, drawable, shadow_color, clip, 0);
|
|
1445 |
+
|
|
1446 |
+ if (black)
|
|
1447 |
+ gdk_draw_layout (drawable, gc,
|
|
1448 |
+ rx+1, ry+1,
|
|
1449 |
+ info->label->layout);
|
|
1450 |
+ else
|
|
1451 |
+ gdk_draw_layout (drawable, gc,
|
|
1452 |
+ rx+1, ry,
|
|
1453 |
+ info->label->layout);
|
|
1454 |
+
|
|
1455 |
+ g_object_unref (G_OBJECT (gc));
|
|
1456 |
+
|
|
1457 |
+ gc = get_gc_for_primitive (widget, drawable, main_color, clip, 0);
|
|
1458 |
+
|
|
1459 |
+ gdk_draw_layout (drawable, gc,
|
|
1460 |
+ rx, ry,
|
|
1461 |
+ info->label->layout);
|
|
1462 |
+
|
|
1463 |
+ g_object_unref (G_OBJECT (gc));
|
|
1464 |
+
|
|
1465 |
+ }
|
|
1466 |
+ break;
|
|
1467 |
+#endif
|
|
1468 |
}
|
|
1469 |
}
|
|
1470 |
|
8481
|
1471 |
@@ -3934,6 +4080,9 @@ meta_frame_style_draw (MetaFrameStyle
|
7488
|
1472 |
int client_width,
|
|
1473 |
int client_height,
|
|
1474 |
PangoLayout *title_layout,
|
|
1475 |
+#ifdef HAVE_XTSOL
|
|
1476 |
+ MetaTrustedLabel *label,
|
|
1477 |
+#endif
|
|
1478 |
int text_height,
|
|
1479 |
MetaButtonState button_states[META_BUTTON_TYPE_LAST],
|
|
1480 |
GdkPixbuf *mini_icon,
|
8481
|
1481 |
@@ -3999,6 +4148,18 @@ meta_frame_style_draw (MetaFrameStyle
|
7488
|
1482 |
draw_info.title_layout_width = title_layout ? extents.width : 0;
|
|
1483 |
draw_info.title_layout_height = title_layout ? extents.height : 0;
|
|
1484 |
draw_info.fgeom = fgeom;
|
|
1485 |
+#ifdef HAVE_XTSOL
|
|
1486 |
+ if (tsol_is_available ())
|
|
1487 |
+ {
|
|
1488 |
+ draw_info.label = label;
|
|
1489 |
+ if (!label->layout)
|
|
1490 |
+ label->layout = gtk_widget_create_pango_layout (widget, label->name);
|
|
1491 |
+ g_object_set_data (G_OBJECT (widget), "trusted_label", label);
|
|
1492 |
+ }
|
|
1493 |
+ else
|
|
1494 |
+ draw_info.label = NULL;
|
|
1495 |
+#endif
|
|
1496 |
+
|
|
1497 |
|
|
1498 |
/* The enum is in the order the pieces should be rendered. */
|
|
1499 |
i = 0;
|
8481
|
1500 |
@@ -4015,7 +4176,14 @@ meta_frame_style_draw (MetaFrameStyle
|
7488
|
1501 |
rect.width = fgeom->width;
|
|
1502 |
rect.height = fgeom->height;
|
|
1503 |
break;
|
|
1504 |
-
|
|
1505 |
+#ifdef HAVE_XTSOL
|
|
1506 |
+ case META_FRAME_PIECE_TRUSTED_LABEL:
|
|
1507 |
+ rect.x = 0;
|
|
1508 |
+ rect.y = fgeom->top_height;
|
|
1509 |
+ rect.width = fgeom->width;
|
|
1510 |
+ rect.height = fgeom->top_height;
|
|
1511 |
+ break;
|
|
1512 |
+#endif
|
|
1513 |
case META_FRAME_PIECE_TITLEBAR:
|
|
1514 |
rect = titlebar_rect;
|
|
1515 |
break;
|
8481
|
1516 |
@@ -4353,6 +4521,97 @@ meta_theme_get_current (void)
|
7488
|
1517 |
return meta_current_theme;
|
|
1518 |
}
|
|
1519 |
|
|
1520 |
+
|
|
1521 |
+#ifdef HAVE_XTSOL
|
|
1522 |
+static void
|
|
1523 |
+set_trusted_ops (MetaFrameStyle *style, MetaFrameFocus focus)
|
|
1524 |
+{
|
|
1525 |
+ if (style != NULL)
|
|
1526 |
+ {
|
|
1527 |
+ if (style->pieces[META_FRAME_PIECE_TITLE])
|
|
1528 |
+ meta_draw_op_list_unref (style->pieces[META_FRAME_PIECE_TITLE]);
|
|
1529 |
+ style->pieces[META_FRAME_PIECE_TITLE] = tsol_theme_trusted_label_ops_get (focus);
|
|
1530 |
+ style->pieces[META_FRAME_PIECE_TRUSTED_LABEL] = tsol_theme_trusted_title_ops_get (focus);
|
|
1531 |
+ }
|
|
1532 |
+}
|
|
1533 |
+
|
|
1534 |
+static void
|
|
1535 |
+style_set_for_each (gpointer key,gpointer value,gpointer user_data)
|
|
1536 |
+{
|
|
1537 |
+ int i;
|
|
1538 |
+ MetaFrameStyleSet *sset = (MetaFrameStyleSet *) value;
|
|
1539 |
+ for (i=0;i < META_FRAME_RESIZE_LAST;i++)
|
|
1540 |
+ {
|
|
1541 |
+ set_trusted_ops(sset->normal_styles[i][META_FRAME_FOCUS_YES], META_FRAME_FOCUS_YES);
|
|
1542 |
+ set_trusted_ops(sset->normal_styles[i][META_FRAME_FOCUS_NO], META_FRAME_FOCUS_NO);
|
|
1543 |
+ }
|
|
1544 |
+
|
|
1545 |
+ set_trusted_ops(sset->maximized_styles[META_FRAME_FOCUS_YES], META_FRAME_FOCUS_YES);
|
|
1546 |
+ set_trusted_ops(sset->maximized_styles[META_FRAME_FOCUS_NO], META_FRAME_FOCUS_NO);
|
|
1547 |
+ set_trusted_ops(sset->shaded_styles[META_FRAME_FOCUS_YES], META_FRAME_FOCUS_YES);
|
|
1548 |
+ set_trusted_ops(sset->shaded_styles[META_FRAME_FOCUS_NO], META_FRAME_FOCUS_NO);
|
|
1549 |
+ set_trusted_ops(sset->maximized_and_shaded_styles[META_FRAME_FOCUS_YES], META_FRAME_FOCUS_YES);
|
|
1550 |
+ set_trusted_ops(sset->maximized_and_shaded_styles[META_FRAME_FOCUS_NO], META_FRAME_FOCUS_NO);
|
|
1551 |
+}
|
|
1552 |
+
|
|
1553 |
+/* merge all needed style piece into one MetaDrawOpList
|
|
1554 |
+ * to draw the titlebar in the Trusted Label space */
|
|
1555 |
+/*static MetaDrawOpList *
|
|
1556 |
+merge_title_draw_list(MetaFrameStyle *style)
|
|
1557 |
+{
|
|
1558 |
+ MetaDrawOpList *new = meta_draw_op_list_new (10);
|
|
1559 |
+ MetaDrawOpList *tmp = NULL;
|
|
1560 |
+ int i;
|
|
1561 |
+
|
|
1562 |
+ tmp = style->pieces[META_FRAME_PIECE_TITLEBAR];
|
|
1563 |
+ if (tmp)
|
|
1564 |
+ {
|
|
1565 |
+ for (i=0;i< tmp->n_ops; i++)
|
|
1566 |
+ meta_draw_op_list_append (new, tmp->ops[i]);
|
|
1567 |
+ }
|
|
1568 |
+ tmp = style->pieces[META_FRAME_PIECE_TITLEBAR_MIDDLE];
|
|
1569 |
+ if (tmp)
|
|
1570 |
+ {
|
|
1571 |
+ for (i=0;i< tmp->n_ops; i++)
|
|
1572 |
+ meta_draw_op_list_append (new, tmp->ops[i]);
|
|
1573 |
+ }
|
|
1574 |
+
|
|
1575 |
+ tmp = style->pieces[META_FRAME_PIECE_TOP_TITLEBAR_EDGE];
|
|
1576 |
+ if (tmp)
|
|
1577 |
+ {
|
|
1578 |
+ for (i=0;i< tmp->n_ops; i++)
|
|
1579 |
+ meta_draw_op_list_append (new, tmp->ops[i]);
|
|
1580 |
+ }
|
|
1581 |
+
|
|
1582 |
+ tmp = style->pieces[META_FRAME_PIECE_BOTTOM_TITLEBAR_EDGE];
|
|
1583 |
+ if (tmp)
|
|
1584 |
+ {
|
|
1585 |
+ for (i=0;i< tmp->n_ops; i++)
|
|
1586 |
+ meta_draw_op_list_append (new, tmp->ops[i]);
|
|
1587 |
+ }
|
|
1588 |
+
|
|
1589 |
+ tmp = style->pieces[META_FRAME_PIECE_TITLE];
|
|
1590 |
+ if (tmp)
|
|
1591 |
+ {
|
|
1592 |
+ for (i=0;i< tmp->n_ops; i++)
|
|
1593 |
+ meta_draw_op_list_append (new, tmp->ops[i]);
|
|
1594 |
+ }
|
|
1595 |
+
|
|
1596 |
+ return new;
|
|
1597 |
+}
|
|
1598 |
+
|
|
1599 |
+static void
|
|
1600 |
+style_for_each (gpointer key,gpointer value,gpointer user_data)
|
|
1601 |
+{
|
|
1602 |
+ MetaFrameStyle * style = (MetaFrameStyle *) value;
|
|
1603 |
+
|
|
1604 |
+ if (style->pieces[META_FRAME_PIECE_TITLE])
|
|
1605 |
+ meta_draw_op_list_unref (style->pieces[META_FRAME_PIECE_TITLE]);
|
|
1606 |
+ style->pieces[META_FRAME_PIECE_TITLE] = tsol_theme_trusted_label_ops_get (META_FRAME_FOCUS_YES);
|
|
1607 |
+ style->pieces[META_FRAME_PIECE_TRUSTED_LABEL] = tsol_theme_trusted_title_ops_get (META_FRAME_FOCUS_YES);
|
|
1608 |
+}*/
|
|
1609 |
+#endif
|
|
1610 |
+
|
|
1611 |
void
|
|
1612 |
meta_theme_set_current (const char *name,
|
|
1613 |
gboolean force_reload)
|
8481
|
1614 |
@@ -4383,6 +4642,14 @@ meta_theme_set_current (const char *name
|
7488
|
1615 |
|
|
1616 |
meta_current_theme = new_theme;
|
|
1617 |
|
|
1618 |
+#ifdef HAVE_XTSOL
|
|
1619 |
+ if (tsol_is_available ())
|
|
1620 |
+ {
|
|
1621 |
+ shield_pixbuf = NULL; /* hack to display shield icon conditionally */
|
|
1622 |
+ g_hash_table_foreach (new_theme->style_sets_by_name, style_set_for_each, NULL);
|
|
1623 |
+ }
|
|
1624 |
+#endif
|
|
1625 |
+
|
|
1626 |
meta_topic (META_DEBUG_THEMES, "New theme is \"%s\"\n", meta_current_theme->name);
|
|
1627 |
}
|
|
1628 |
}
|
8481
|
1629 |
@@ -4729,7 +4996,11 @@ meta_theme_draw_frame (MetaTheme
|
7488
|
1630 |
const MetaButtonLayout *button_layout,
|
|
1631 |
MetaButtonState button_states[META_BUTTON_TYPE_LAST],
|
|
1632 |
GdkPixbuf *mini_icon,
|
|
1633 |
- GdkPixbuf *icon)
|
|
1634 |
+ GdkPixbuf *icon
|
|
1635 |
+#ifdef HAVE_XTSOL
|
|
1636 |
+ ,MetaTrustedLabel *label
|
|
1637 |
+#endif
|
|
1638 |
+ )
|
|
1639 |
{
|
|
1640 |
MetaFrameGeometry fgeom;
|
|
1641 |
MetaFrameStyle *style;
|
8481
|
1642 |
@@ -4757,6 +5028,9 @@ meta_theme_draw_frame (MetaTheme
|
7488
|
1643 |
&fgeom,
|
|
1644 |
client_width, client_height,
|
|
1645 |
title_layout,
|
|
1646 |
+#ifdef HAVE_XTSOL
|
|
1647 |
+ label,
|
|
1648 |
+#endif
|
|
1649 |
text_height,
|
|
1650 |
button_states,
|
|
1651 |
mini_icon, icon);
|
8481
|
1652 |
@@ -5305,6 +5579,10 @@ meta_frame_piece_to_string (MetaFramePie
|
7488
|
1653 |
{
|
|
1654 |
case META_FRAME_PIECE_ENTIRE_BACKGROUND:
|
|
1655 |
return "entire_background";
|
|
1656 |
+#ifdef HAVE_XTSOL
|
|
1657 |
+ case META_FRAME_PIECE_TRUSTED_LABEL:
|
|
1658 |
+ return "trusted_label";
|
|
1659 |
+#endif
|
|
1660 |
case META_FRAME_PIECE_TITLEBAR:
|
|
1661 |
return "titlebar";
|
|
1662 |
case META_FRAME_PIECE_TITLEBAR_MIDDLE:
|
8481
|
1663 |
diff -Nrup metacity-2.16.3/src/theme.h ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/theme.h
|
|
1664 |
--- metacity-2.16.3/src/theme.h 2006-11-02 13:18:50.416316000 +0100
|
|
1665 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/theme.h 2006-11-02 13:21:04.020925000 +0100
|
|
1666 |
@@ -40,6 +40,9 @@ typedef struct _MetaFrameGeometry MetaFr
|
7488
|
1667 |
typedef struct _MetaTheme MetaTheme;
|
|
1668 |
typedef struct _MetaPositionExprEnv MetaPositionExprEnv;
|
|
1669 |
typedef struct _MetaDrawInfo MetaDrawInfo;
|
|
1670 |
+#ifdef HAVE_XTSOL
|
|
1671 |
+typedef struct _MetaTrustedLabel MetaTrustedLabel;
|
|
1672 |
+#endif
|
|
1673 |
|
|
1674 |
#define META_THEME_ERROR (g_quark_from_static_string ("meta-theme-error"))
|
|
1675 |
|
8481
|
1676 |
@@ -172,6 +175,10 @@ typedef enum
|
7488
|
1677 |
META_COLOR_SPEC_GTK,
|
|
1678 |
META_COLOR_SPEC_BLEND,
|
|
1679 |
META_COLOR_SPEC_SHADE
|
|
1680 |
+#ifdef HAVE_XTSOL
|
|
1681 |
+ ,
|
|
1682 |
+ META_COLOR_SPEC_LABEL
|
|
1683 |
+#endif
|
|
1684 |
} MetaColorSpecType;
|
|
1685 |
|
|
1686 |
typedef enum
|
8481
|
1687 |
@@ -195,6 +202,11 @@ struct _MetaColorSpec
|
7488
|
1688 |
struct {
|
|
1689 |
GdkColor color;
|
|
1690 |
} basic;
|
|
1691 |
+#ifdef HAVE_XTSOL
|
|
1692 |
+ struct {
|
|
1693 |
+ gboolean dummy;
|
|
1694 |
+ } label;
|
|
1695 |
+#endif
|
|
1696 |
struct {
|
|
1697 |
MetaGtkColorComponent component;
|
|
1698 |
GtkStateType state;
|
8481
|
1699 |
@@ -232,6 +244,9 @@ struct _MetaDrawInfo
|
7488
|
1700 |
int title_layout_width;
|
|
1701 |
int title_layout_height;
|
|
1702 |
const MetaFrameGeometry *fgeom;
|
|
1703 |
+#ifdef HAVE_XTSOL
|
|
1704 |
+ MetaTrustedLabel *label;
|
|
1705 |
+#endif
|
|
1706 |
};
|
|
1707 |
|
|
1708 |
typedef enum
|
8481
|
1709 |
@@ -262,6 +277,11 @@ typedef enum
|
7488
|
1710 |
META_DRAW_OP_LIST,
|
|
1711 |
/* tiled draw op list */
|
|
1712 |
META_DRAW_TILE
|
|
1713 |
+#ifdef HAVE_XTSOL
|
|
1714 |
+ ,
|
|
1715 |
+ /* draw a string (used for trusted label) */
|
|
1716 |
+ META_DRAW_TRUSTED_LABEL
|
|
1717 |
+#endif
|
|
1718 |
} MetaDrawType;
|
|
1719 |
|
|
1720 |
struct _MetaDrawOp
|
8481
|
1721 |
@@ -404,6 +424,14 @@ struct _MetaDrawOp
|
7488
|
1722 |
char *tile_height;
|
|
1723 |
} tile;
|
|
1724 |
|
|
1725 |
+#ifdef HAVE_XTSOL
|
|
1726 |
+ struct {
|
|
1727 |
+ MetaColorSpec *color_spec;
|
|
1728 |
+ char *x;
|
|
1729 |
+ char *y;
|
|
1730 |
+ } trusted_label;
|
|
1731 |
+#endif
|
|
1732 |
+
|
|
1733 |
} data;
|
|
1734 |
};
|
|
1735 |
|
8481
|
1736 |
@@ -465,6 +493,10 @@ typedef enum
|
7488
|
1737 |
|
|
1738 |
/* entire frame */
|
|
1739 |
META_FRAME_PIECE_ENTIRE_BACKGROUND,
|
|
1740 |
+#ifdef HAVE_XTSOL
|
|
1741 |
+ /* Trusted Label area*/
|
|
1742 |
+ META_FRAME_PIECE_TRUSTED_LABEL,
|
|
1743 |
+#endif
|
|
1744 |
/* entire titlebar background */
|
|
1745 |
META_FRAME_PIECE_TITLEBAR,
|
|
1746 |
/* portion of the titlebar background inside the titlebar
|
8481
|
1747 |
@@ -589,6 +621,10 @@ struct _MetaPositionExprEnv
|
7488
|
1748 |
int bottom_height;
|
|
1749 |
int title_width;
|
|
1750 |
int title_height;
|
|
1751 |
+#ifdef HAVE_XTSOL
|
|
1752 |
+ int trusted_label_width;
|
|
1753 |
+ int trusted_label_height;
|
|
1754 |
+#endif
|
|
1755 |
int mini_icon_width;
|
|
1756 |
int mini_icon_height;
|
|
1757 |
int icon_width;
|
8481
|
1758 |
@@ -694,6 +730,9 @@ void meta_frame_style_draw (MetaFrameSty
|
7488
|
1759 |
int client_width,
|
|
1760 |
int client_height,
|
|
1761 |
PangoLayout *title_layout,
|
|
1762 |
+#ifdef HAVE_XTSOL
|
|
1763 |
+ MetaTrustedLabel *label,
|
|
1764 |
+#endif
|
|
1765 |
int text_height,
|
|
1766 |
MetaButtonState button_states[META_BUTTON_TYPE_LAST],
|
|
1767 |
GdkPixbuf *mini_icon,
|
19085
|
1768 |
@@ -771,7 +771,11 @@
|
7488
|
1769 |
const MetaButtonLayout *button_layout,
|
|
1770 |
MetaButtonState button_states[META_BUTTON_TYPE_LAST],
|
|
1771 |
GdkPixbuf *mini_icon,
|
|
1772 |
- GdkPixbuf *icon);
|
|
1773 |
+ GdkPixbuf *icon
|
19085
|
1774 |
+#ifdef HAVE_XTSOL
|
|
1775 |
+ ,MetaTrustedLabel *label
|
|
1776 |
+#endif
|
|
1777 |
+ );
|
7488
|
1778 |
|
19085
|
1779 |
void meta_theme_get_frame_borders (MetaTheme *theme,
|
|
1780 |
MetaFrameType type,
|
8481
|
1781 |
diff -Nrup metacity-2.16.3/src/trusted-pics.h ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/trusted-pics.h
|
|
1782 |
--- metacity-2.16.3/src/trusted-pics.h 1970-01-01 01:00:00.000000000 +0100
|
|
1783 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/trusted-pics.h 2006-11-02 13:21:04.026656000 +0100
|
7488
|
1784 |
@@ -0,0 +1,728 @@
|
|
1785 |
+/* Metacity trusted image */
|
|
1786 |
+
|
|
1787 |
+/*
|
|
1788 |
+ * Copyright (C) 2005 Erwann Chenede
|
|
1789 |
+ */
|
|
1790 |
+
|
|
1791 |
+#ifndef TRUSTED_PICS_H
|
|
1792 |
+#define TRUSTED_PICS_H
|
|
1793 |
+#ifdef HAVE_XTSOL
|
|
1794 |
+#include <gtk/gtk.h>
|
|
1795 |
+/* GdkPixbuf RGBA C-Source image dump */
|
|
1796 |
+
|
|
1797 |
+#ifdef __SUNPRO_C
|
|
1798 |
+#pragma align 4 (label_arrows)
|
|
1799 |
+#endif
|
|
1800 |
+#ifdef __GNUC__
|
|
1801 |
+static const guint8 label_arrows[] __attribute__ ((__aligned__ (4))) =
|
|
1802 |
+#else
|
|
1803 |
+static const guint8 label_arrows[] =
|
|
1804 |
+#endif
|
|
1805 |
+{ ""
|
|
1806 |
+ /* Pixbuf magic (0x47646b50) */
|
|
1807 |
+ "GdkP"
|
|
1808 |
+ /* length: header (24) + pixel_data (400) */
|
|
1809 |
+ "\0\0\1\250"
|
|
1810 |
+ /* pixdata_type (0x1010002) */
|
|
1811 |
+ "\1\1\0\2"
|
|
1812 |
+ /* rowstride (80) */
|
|
1813 |
+ "\0\0\0P"
|
|
1814 |
+ /* width (20) */
|
|
1815 |
+ "\0\0\0\24"
|
|
1816 |
+ /* height (5) */
|
|
1817 |
+ "\0\0\0\5"
|
|
1818 |
+ /* pixel_data: */
|
|
1819 |
+ "\2\2\2t\362\362\362^\0\0\0\0\0\0\0\0\0\0\0\0\2\2\2t\362\362\362^\0\0"
|
|
1820 |
+ "\0\0\0\0\0\0\0\0\0\0\2\2\2t\362\362\362^\0\0\0\0\0\0\0\0\0\0\0\0\2\2"
|
|
1821 |
+ "\2t\362\362\362^\0\0\0\0\0\0\0\0\0\0\0\0\362\362\362\0\2\2\2t\362\362"
|
|
1822 |
+ "\362^\0\0\0\0\2\2\2\0\362\362\362\0\2\2\2t\362\362\362^\0\0\0\0\2\2\2"
|
|
1823 |
+ "\0\362\362\362\0\2\2\2t\362\362\362^\0\0\0\0\2\2\2\0\362\362\362\0\2"
|
|
1824 |
+ "\2\2t\362\362\362^\0\0\0\0\2\2\2\0\0\0\0\0\0\0\0\0\2\2\2t\362\362\362"
|
|
1825 |
+ "^\362\362\362\0\0\0\0\0\0\0\0\0\2\2\2t\362\362\362^\362\362\362\0\0\0"
|
|
1826 |
+ "\0\0\0\0\0\0\2\2\2t\362\362\362^\362\362\362\0\0\0\0\0\0\0\0\0\2\2\2"
|
|
1827 |
+ "t\362\362\362^\362\362\362\0\0\0\0\0\2\2\2t\362\362\362^\362\362\362"
|
|
1828 |
+ "\0\0\0\0\0\0\0\0\0\2\2\2t\362\362\362^\362\362\362\0\0\0\0\0\0\0\0\0"
|
|
1829 |
+ "\2\2\2t\362\362\362^\362\362\362\0\0\0\0\0\0\0\0\0\2\2\2t\362\362\362"
|
|
1830 |
+ "^\362\362\362\0\0\0\0\0\2\2\2t\362\362\362^\362\362\362\0\0\0\0\0\0\0"
|
|
1831 |
+ "\0\0\2\2\2t\362\362\362^\362\362\362\0\0\0\0\0\0\0\0\0\2\2\2t\362\362"
|
|
1832 |
+ "\362^\362\362\362\0\0\0\0\0\0\0\0\0\2\2\2t\362\362\362^\362\362\362\0"
|
|
1833 |
+ "\0\0\0\0\0\0\0\0"};
|
|
1834 |
+
|
|
1835 |
+/*GdkPixbuf RGBA C-Source image dump */
|
|
1836 |
+
|
|
1837 |
+#ifdef __SUNPRO_C
|
|
1838 |
+#pragma align 4 (title_gradient)
|
|
1839 |
+#endif
|
|
1840 |
+#ifdef __GNUC__
|
|
1841 |
+static const guint8 title_gradient[] __attribute__ ((__aligned__ (4))) =
|
|
1842 |
+#else
|
|
1843 |
+static const guint8 title_gradient[] =
|
|
1844 |
+#endif
|
|
1845 |
+{ ""
|
|
1846 |
+ /* Pixbuf magic (0x47646b50) */
|
|
1847 |
+ "GdkP"
|
|
1848 |
+ /* length: header (24) + pixel_data (360) */
|
|
1849 |
+ "\0\0\1\200"
|
|
1850 |
+ /* pixdata_type (0x1010002) */
|
|
1851 |
+ "\1\1\0\2"
|
|
1852 |
+ /* rowstride (40) */
|
|
1853 |
+ "\0\0\0("
|
|
1854 |
+ /* width (10) */
|
|
1855 |
+ "\0\0\0\12"
|
|
1856 |
+ /* height (9) */
|
|
1857 |
+ "\0\0\0\11"
|
|
1858 |
+ /* pixel_data: */
|
|
1859 |
+ "\337\337\337\11\337\337\337\11\337\337\337\11\337\337\337\11\337\337"
|
|
1860 |
+ "\337\11\337\337\337\11\337\337\337\11\337\337\337\11\337\337\337\11\337"
|
|
1861 |
+ "\337\337\11\364\364\364\32\364\364\364\32\364\364\364\32\364\364\364"
|
|
1862 |
+ "\32\364\364\364\32\364\364\364\32\364\364\364\32\364\364\364\32\364\364"
|
|
1863 |
+ "\364\32\364\364\364\32\360\360\3600\360\360\3600\360\360\3600\360\360"
|
|
1864 |
+ "\3600\360\360\3600\360\360\3600\360\360\3600\360\360\3600\360\360\360"
|
|
1865 |
+ "0\360\360\3600\357\357\357E\357\357\357E\357\357\357E\357\357\357E\357"
|
|
1866 |
+ "\357\357E\357\357\357E\357\357\357E\357\357\357E\357\357\357E\357\357"
|
|
1867 |
+ "\357E\356\356\356X\356\356\356X\356\356\356X\356\356\356X\356\356\356"
|
|
1868 |
+ "X\356\356\356X\356\356\356X\356\356\356X\356\356\356X\356\356\356X\356"
|
|
1869 |
+ "\356\356k\356\356\356k\356\356\356k\356\356\356k\356\356\356k\356\356"
|
|
1870 |
+ "\356k\356\356\356k\356\356\356k\356\356\356k\356\356\356k\357\357\357"
|
|
1871 |
+ "}\357\357\357}\357\357\357}\357\357\357}\357\357\357}\357\357\357}\357"
|
|
1872 |
+ "\357\357}\357\357\357}\357\357\357}\357\357\357}\360\360\360\212\360"
|
|
1873 |
+ "\360\360\212\360\360\360\212\360\360\360\212\360\360\360\212\360\360"
|
|
1874 |
+ "\360\212\360\360\360\212\360\360\360\212\360\360\360\212\360\360\360"
|
|
1875 |
+ "\212\266\266\266J\266\266\266J\266\266\266J\266\266\266J\266\266\266"
|
|
1876 |
+ "J\266\266\266J\266\266\266J\266\266\266J\266\266\266J\266\266\266J"};
|
|
1877 |
+
|
|
1878 |
+/* GdkPixbuf RGBA C-Source image dump */
|
|
1879 |
+
|
|
1880 |
+#ifdef __SUNPRO_C
|
|
1881 |
+#pragma align 4 (title_center_dimple)
|
|
1882 |
+#endif
|
|
1883 |
+#ifdef __GNUC__
|
|
1884 |
+static const guint8 title_center_dimple[] __attribute__ ((__aligned__ (4))) =
|
|
1885 |
+#else
|
|
1886 |
+static const guint8 title_center_dimple[] =
|
|
1887 |
+#endif
|
|
1888 |
+{ ""
|
|
1889 |
+ /* Pixbuf magic (0x47646b50) */
|
|
1890 |
+ "GdkP"
|
|
1891 |
+ /* length: header (24) + pixel_data (76) */
|
|
1892 |
+ "\0\0\0d"
|
|
1893 |
+ /* pixdata_type (0x1010002) */
|
|
1894 |
+ "\1\1\0\2"
|
|
1895 |
+ /* rowstride (4) */
|
|
1896 |
+ "\0\0\0\4"
|
|
1897 |
+ /* width (1) */
|
|
1898 |
+ "\0\0\0\1"
|
|
1899 |
+ /* height (19) */
|
|
1900 |
+ "\0\0\0\23"
|
|
1901 |
+ /* pixel_data: */
|
|
1902 |
+ "QQQ\377RRR\377UUU\377YYY\377]]]\377bbb\377hhh\377nnn\377sss\377zzz\377"
|
|
1903 |
+ "\200\200\200\377\205\205\205\377\212\212\212\377\216\216\216\377\222"
|
|
1904 |
+ "\222\222\377\225\225\225\377\227\227\227\377\230\230\230\377\231\231"
|
|
1905 |
+ "\231\377"};
|
|
1906 |
+/* GdkPixbuf RGBA C-Source image dump */
|
|
1907 |
+
|
|
1908 |
+#ifdef __SUNPRO_C
|
|
1909 |
+#pragma align 4 (title_left_dimple)
|
|
1910 |
+#endif
|
|
1911 |
+#ifdef __GNUC__
|
|
1912 |
+static const guint8 title_left_dimple[] __attribute__ ((__aligned__ (4))) =
|
|
1913 |
+#else
|
|
1914 |
+static const guint8 title_left_dimple[] =
|
|
1915 |
+#endif
|
|
1916 |
+{ ""
|
|
1917 |
+ /* Pixbuf magic (0x47646b50) */
|
|
1918 |
+ "GdkP"
|
|
1919 |
+ /* length: header (24) + pixel_data (1444) */
|
|
1920 |
+ "\0\0\5\274"
|
|
1921 |
+ /* pixdata_type (0x1010002) */
|
|
1922 |
+ "\1\1\0\2"
|
|
1923 |
+ /* rowstride (76) */
|
|
1924 |
+ "\0\0\0L"
|
|
1925 |
+ /* width (19) */
|
|
1926 |
+ "\0\0\0\23"
|
|
1927 |
+ /* height (19) */
|
|
1928 |
+ "\0\0\0\23"
|
|
1929 |
+ /* pixel_data: */
|
|
1930 |
+ "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377"
|
|
1931 |
+ "\0NNNEMMM\231MMM\314MMM\374MMM\377NNN\377NNN\377OOO\377PPP\377PPP\377"
|
|
1932 |
+ "PPP\377QQQ\377QQQ\377QQQ\377\377\377\377\0\377\377\377\0\377\377\377"
|
|
1933 |
+ "\0OOO$MMM\300MMM\377LLL\377LLL\377MMM\377MMM\377NNN\377OOO\377PPP\377"
|
|
1934 |
+ "PPP\377QQQ\377RRR\377RRR\377RRR\377RRR\377\377\377\377\0\377\377\377"
|
|
1935 |
+ "\0OOO<MMM\355LLL\377LLL\377LLL\377MMM\377MMM\377OOO\377PPP\377QQQ\377"
|
|
1936 |
+ "RRR\377SSS\377SSS\377TTT\377TTT\377TTT\377UUU\377\377\377\377\0PPP$N"
|
|
1937 |
+ "NN\355MMM\377LLL\377MMM\377MMM\377NNN\377OOO\377QQQ\377RRR\377TTT\377"
|
|
1938 |
+ "UUU\377VVV\377WWW\377XXX\377XXX\377XXX\377YYY\377\377\377\377\0OOO\300"
|
|
1939 |
+ "NNN\377MMM\377MMM\377NNN\377OOO\377PPP\377RRR\377TTT\377VVV\377XXX\377"
|
|
1940 |
+ "YYY\377ZZZ\377[[[\377\\\\\\\377]]]\377]]]\377]]]\377RRRBPPP\377OOO\377"
|
|
1941 |
+ "OOO\377OOO\377PPP\377RRR\377TTT\377VVV\377XXX\377ZZZ\377\\\\\\\377^^"
|
|
1942 |
+ "^\377```\377```\377aaa\377aaa\377bbb\377bbb\377SSS\226QQQ\377QQQ\377"
|
|
1943 |
+ "QQQ\377RRR\377TTT\377VVV\377XXX\377ZZZ\377]]]\377___\377aaa\377ccc\377"
|
|
1944 |
+ "eee\377fff\377ggg\377ggg\377ggg\377ggg\377TTT\333SSS\377SSS\377TTT\377"
|
|
1945 |
+ "VVV\377WWW\377ZZZ\377]]]\377___\377bbb\377eee\377ggg\377iii\377kkk\377"
|
|
1946 |
+ "lll\377lll\377mmm\377mmm\377mmm\377WWW\371VVV\377VVV\377XXX\377ZZZ\377"
|
|
1947 |
+ "\\\\\\\377___\377bbb\377eee\377hhh\377kkk\377mmm\377ooo\377qqq\377rr"
|
|
1948 |
+ "r\377sss\377sss\377sss\377sss\377ZZZ\377YYY\377ZZZ\377\\\\\\\377^^^\377"
|
|
1949 |
+ "aaa\377ddd\377ggg\377kkk\377nnn\377ppp\377sss\377uuu\377www\377xxx\377"
|
|
1950 |
+ "yyy\377yyy\377zzz\377zzz\377]]]\366]]]\377^^^\377aaa\377ccc\377fff\377"
|
|
1951 |
+ "iii\377mmm\377ppp\377ttt\377www\377yyy\377|||\377}}}\377~~~\377\177\177"
|
|
1952 |
+ "\177\377\177\177\177\377\177\177\177\377\177\177\177\377aaa\333aaa\377"
|
|
1953 |
+ "ccc\377eee\377hhh\377kkk\377ooo\377rrr\377vvv\377yyy\377|||\377\177\177"
|
|
1954 |
+ "\177\377\200\200\200\377\202\202\202\377\203\203\203\377\204\204\204"
|
|
1955 |
+ "\377\204\204\204\377\205\205\205\377\205\205\205\377eee\245eee\377gg"
|
|
1956 |
+ "g\377jjj\377mmm\377ppp\377ttt\377xxx\377{{{\377~~~\377\201\201\201\377"
|
|
1957 |
+ "\203\203\203\377\205\205\205\377\207\207\207\377\210\210\210\377\211"
|
|
1958 |
+ "\211\211\377\211\211\211\377\212\212\212\377\212\212\212\377iiiNjjj\377"
|
|
1959 |
+ "lll\377ooo\377rrr\377uuu\377yyy\377}}}\377\177\177\177\377\202\202\202"
|
|
1960 |
+ "\377\205\205\205\377\210\210\210\377\212\212\212\377\213\213\213\377"
|
|
1961 |
+ "\214\214\214\377\215\215\215\377\215\215\215\377\216\216\216\377\216"
|
|
1962 |
+ "\216\216\377lll\3nnn\317ppp\377sss\377vvv\377zzz\377}}}\377\200\200\200"
|
|
1963 |
+ "\377\203\203\203\377\206\206\206\377\211\211\211\377\213\213\213\377"
|
|
1964 |
+ "\215\215\215\377\217\217\217\377\220\220\220\377\220\220\220\377\221"
|
|
1965 |
+ "\221\221\377\221\221\221\377\222\222\222\377\377\377\377\0rrr-ttt\363"
|
|
1966 |
+ "www\377zzz\377}}}\377\200\200\200\377\203\203\203\377\207\207\207\377"
|
|
1967 |
+ "\212\212\212\377\214\214\214\377\216\216\216\377\220\220\220\377\222"
|
|
1968 |
+ "\222\222\377\223\223\223\377\223\223\223\377\224\224\224\377\224\224"
|
|
1969 |
+ "\224\377\224\224\224\377\377\377\377\0\377\377\377\0xxxKzzz\366}}}\377"
|
|
1970 |
+ "\200\200\200\377\203\203\203\377\207\207\207\377\212\212\212\377\214"
|
|
1971 |
+ "\214\214\377\216\216\216\377\221\221\221\377\223\223\223\377\224\224"
|
|
1972 |
+ "\224\377\225\225\225\377\226\226\226\377\226\226\226\377\226\226\226"
|
|
1973 |
+ "\377\226\226\226\377\377\377\377\0\377\377\377\0\377\377\377\0}}}-\200"
|
|
1974 |
+ "\200\200\317\203\203\203\377\206\206\206\377\211\211\211\377\213\213"
|
|
1975 |
+ "\213\377\216\216\216\377\220\220\220\377\223\223\223\377\224\224\224"
|
|
1976 |
+ "\377\226\226\226\377\226\226\226\377\227\227\227\377\230\230\230\377"
|
|
1977 |
+ "\230\230\230\377\230\230\230\377\377\377\377\0\377\377\377\0\377\377"
|
|
1978 |
+ "\377\0\377\377\377\0\377\377\377\0\205\205\205T\210\210\210\256\212\212"
|
|
1979 |
+ "\212\355\215\215\215\377\217\217\217\377\222\222\222\377\223\223\223"
|
|
1980 |
+ "\377\225\225\225\377\226\226\226\377\230\230\230\377\230\230\230\377"
|
|
1981 |
+ "\231\231\231\377\231\231\231\377\231\231\231\377"};
|
|
1982 |
+/* GdkPixbuf RGBA C-Source image dump */
|
|
1983 |
+
|
|
1984 |
+#ifdef __SUNPRO_C
|
|
1985 |
+#pragma align 4 (title_right_dimple)
|
|
1986 |
+#endif
|
|
1987 |
+#ifdef __GNUC__
|
|
1988 |
+static const guint8 title_right_dimple[] __attribute__ ((__aligned__ (4))) =
|
|
1989 |
+#else
|
|
1990 |
+static const guint8 title_right_dimple[] =
|
|
1991 |
+#endif
|
|
1992 |
+{ ""
|
|
1993 |
+ /* Pixbuf magic (0x47646b50) */
|
|
1994 |
+ "GdkP"
|
|
1995 |
+ /* length: header (24) + pixel_data (1444) */
|
|
1996 |
+ "\0\0\5\274"
|
|
1997 |
+ /* pixdata_type (0x1010002) */
|
|
1998 |
+ "\1\1\0\2"
|
|
1999 |
+ /* rowstride (76) */
|
|
2000 |
+ "\0\0\0L"
|
|
2001 |
+ /* width (19) */
|
|
2002 |
+ "\0\0\0\23"
|
|
2003 |
+ /* height (19) */
|
|
2004 |
+ "\0\0\0\23"
|
|
2005 |
+ /* pixel_data: */
|
|
2006 |
+ "QQQ\377QQQ\377RRR\377RRR\377SSS\377SSS\377TTT\377VVV\377XXX\377ZZZ\377"
|
|
2007 |
+ "\\\\\\\377___\314bbb\231eeeE\377\377\377\0\377\377\377\0\377\377\377"
|
|
2008 |
+ "\0\377\377\377\0\377\377\377\0SSS\377SSS\377SSS\377SSS\377TTT\377TTT"
|
|
2009 |
+ "\377VVV\377WWW\377YYY\377[[[\377^^^\377aaa\377ddd\377ggg\377jjj\300n"
|
|
2010 |
+ "nn$\377\377\377\0\377\377\377\0\377\377\377\0UUU\377UUU\377UUU\377VV"
|
|
2011 |
+ "V\377VVV\377WWW\377XXX\377ZZZ\377[[[\377^^^\377```\377ccc\377fff\377"
|
|
2012 |
+ "iii\377lll\377ppp\355sss<\377\377\377\0\377\377\377\0YYY\377YYY\377Y"
|
|
2013 |
+ "YY\377YYY\377ZZZ\377[[[\377\\\\\\\377]]]\377___\377aaa\377ddd\377ggg"
|
|
2014 |
+ "\377iii\377mmm\377ppp\377sss\377vvv\355yyy$\377\377\377\0]]]\377]]]\377"
|
|
2015 |
+ "]]]\377^^^\377^^^\377___\377```\377bbb\377ccc\377eee\377hhh\377kkk\377"
|
|
2016 |
+ "nnn\377qqq\377ttt\377www\377zzz\377}}}\300\377\377\377\0bbb\377bbb\377"
|
|
2017 |
+ "bbb\377ccc\377ccc\377ddd\377eee\377ggg\377hhh\377kkk\377mmm\377ppp\377"
|
|
2018 |
+ "sss\377vvv\377yyy\377|||\377~~~\377\200\200\200\377\202\202\202Bhhh\377"
|
|
2019 |
+ "hhh\377hhh\377hhh\377iii\377iii\377kkk\377lll\377nnn\377ppp\377sss\377"
|
|
2020 |
+ "uuu\377xxx\377{{{\377}}}\377\200\200\200\377\202\202\202\377\204\204"
|
|
2021 |
+ "\204\377\205\205\205\226nnn\377nnn\377nnn\377nnn\377ooo\377ooo\377pp"
|
|
2022 |
+ "p\377rrr\377ttt\377vvv\377yyy\377{{{\377}}}\377\200\200\200\377\202\202"
|
|
2023 |
+ "\202\377\205\205\205\377\207\207\207\377\210\210\210\377\211\211\211"
|
|
2024 |
+ "\333ttt\377ttt\377ttt\377ttt\377uuu\377vvv\377www\377yyy\377zzz\377|"
|
|
2025 |
+ "||\377~~~\377\200\200\200\377\203\203\203\377\205\205\205\377\210\210"
|
|
2026 |
+ "\210\377\212\212\212\377\213\213\213\377\214\214\214\377\215\215\215"
|
|
2027 |
+ "\371zzz\377zzz\377zzz\377{{{\377{{{\377|||\377}}}\377\177\177\177\377"
|
|
2028 |
+ "\200\200\200\377\202\202\202\377\204\204\204\377\206\206\206\377\210"
|
|
2029 |
+ "\210\210\377\213\213\213\377\215\215\215\377\216\216\216\377\220\220"
|
|
2030 |
+ "\220\377\220\220\220\377\221\221\221\377\200\200\200\377\200\200\200"
|
|
2031 |
+ "\377\200\200\200\377\200\200\200\377\201\201\201\377\202\202\202\377"
|
|
2032 |
+ "\203\203\203\377\204\204\204\377\206\206\206\377\210\210\210\377\212"
|
|
2033 |
+ "\212\212\377\214\214\214\377\216\216\216\377\220\220\220\377\222\222"
|
|
2034 |
+ "\222\377\223\223\223\377\224\224\224\377\224\224\224\377\224\224\224"
|
|
2035 |
+ "\371\205\205\205\377\205\205\205\377\205\205\205\377\206\206\206\377"
|
|
2036 |
+ "\206\206\206\377\207\207\207\377\210\210\210\377\212\212\212\377\213"
|
|
2037 |
+ "\213\213\377\215\215\215\377\217\217\217\377\221\221\221\377\223\223"
|
|
2038 |
+ "\223\377\225\225\225\377\226\226\226\377\227\227\227\377\230\230\230"
|
|
2039 |
+ "\377\230\230\230\377\227\227\227\336\212\212\212\377\212\212\212\377"
|
|
2040 |
+ "\212\212\212\377\213\213\213\377\213\213\213\377\214\214\214\377\215"
|
|
2041 |
+ "\215\215\377\216\216\216\377\220\220\220\377\222\222\222\377\224\224"
|
|
2042 |
+ "\224\377\225\225\225\377\227\227\227\377\231\231\231\377\232\232\232"
|
|
2043 |
+ "\377\232\232\232\377\233\233\233\377\232\232\232\377\231\231\231\245"
|
|
2044 |
+ "\216\216\216\377\216\216\216\377\216\216\216\377\217\217\217\377\220"
|
|
2045 |
+ "\220\220\377\220\220\220\377\222\222\222\377\223\223\223\377\225\225"
|
|
2046 |
+ "\225\377\226\226\226\377\230\230\230\377\232\232\232\377\233\233\233"
|
|
2047 |
+ "\377\234\234\234\377\235\235\235\377\235\235\235\377\235\235\235\377"
|
|
2048 |
+ "\234\234\234\377\233\233\233N\222\222\222\377\222\222\222\377\222\222"
|
|
2049 |
+ "\222\377\223\223\223\377\223\223\223\377\224\224\224\377\225\225\225"
|
|
2050 |
+ "\377\226\226\226\377\230\230\230\377\232\232\232\377\233\233\233\377"
|
|
2051 |
+ "\235\235\235\377\236\236\236\377\236\236\236\377\237\237\237\377\237"
|
|
2052 |
+ "\237\237\377\236\236\236\377\235\235\235\317\234\234\234\3\225\225\225"
|
|
2053 |
+ "\377\225\225\225\377\225\225\225\377\226\226\226\377\226\226\226\377"
|
|
2054 |
+ "\227\227\227\377\230\230\230\377\232\232\232\377\233\233\233\377\234"
|
|
2055 |
+ "\234\234\377\235\235\235\377\236\236\236\377\240\240\240\377\240\240"
|
|
2056 |
+ "\240\377\240\240\240\377\240\240\240\377\237\237\237\363\236\236\236"
|
|
2057 |
+ "-\377\377\377\0\227\227\227\377\227\227\227\377\230\230\230\377\230\230"
|
|
2058 |
+ "\230\377\230\230\230\377\231\231\231\377\232\232\232\377\233\233\233"
|
|
2059 |
+ "\377\235\235\235\377\236\236\236\377\237\237\237\377\240\240\240\377"
|
|
2060 |
+ "\240\240\240\377\241\241\241\377\241\241\241\377\240\240\240\366\237"
|
|
2061 |
+ "\237\237K\377\377\377\0\377\377\377\0\231\231\231\377\231\231\231\377"
|
|
2062 |
+ "\231\231\231\377\232\232\232\377\232\232\232\377\233\233\233\377\234"
|
|
2063 |
+ "\234\234\377\235\235\235\377\236\236\236\377\236\236\236\377\240\240"
|
|
2064 |
+ "\240\377\240\240\240\377\241\241\241\377\241\241\241\377\240\240\240"
|
|
2065 |
+ "\317\240\240\240-\377\377\377\0\377\377\377\0\377\377\377\0\232\232\232"
|
|
2066 |
+ "\377\232\232\232\377\232\232\232\377\232\232\232\377\233\233\233\377"
|
|
2067 |
+ "\233\233\233\377\234\234\234\377\235\235\235\377\236\236\236\377\236"
|
|
2068 |
+ "\236\236\377\237\237\237\377\240\240\240\355\240\240\240\256\240\240"
|
|
2069 |
+ "\240T\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377"
|
|
2070 |
+ "\377\0"};
|
|
2071 |
+/* GdkPixbuf RGBA C-Source image dump */
|
|
2072 |
+
|
|
2073 |
+#ifdef __SUNPRO_C
|
|
2074 |
+#pragma align 4 (shield)
|
|
2075 |
+#endif
|
|
2076 |
+#ifdef __GNUC__
|
|
2077 |
+static const guint8 shield[] __attribute__ ((__aligned__ (4))) =
|
|
2078 |
+#else
|
|
2079 |
+static const guint8 shield[] =
|
|
2080 |
+#endif
|
|
2081 |
+{ ""
|
|
2082 |
+ /* Pixbuf magic (0x47646b50) */
|
|
2083 |
+ "GdkP"
|
|
2084 |
+ /* length: header (24) + pixel_data (4096) */
|
|
2085 |
+ "\0\0\20\30"
|
|
2086 |
+ /* pixdata_type (0x1010002) */
|
|
2087 |
+ "\1\1\0\2"
|
|
2088 |
+ /* rowstride (128) */
|
|
2089 |
+ "\0\0\0\200"
|
|
2090 |
+ /* width (32) */
|
|
2091 |
+ "\0\0\0\40"
|
|
2092 |
+ /* height (32) */
|
|
2093 |
+ "\0\0\0\40"
|
|
2094 |
+ /* pixel_data: */
|
|
2095 |
+ "\0\0\0\0\0\0\0\0\377\375\326\7\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2096 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\354\220"
|
|
2097 |
+ "\17\377\341d\276\375\321D\217\377\362\270\3\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2098 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\340\204\3"
|
|
2099 |
+ "\377\341\201\6\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\0\377\351z\271\377"
|
|
2100 |
+ "\353}\232\377\361\233!\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2101 |
+ "\0\0\0\0\0\0\0\0\377\373\327\3\377\351{P\377\341d\333\377\336Z\377\377"
|
|
2102 |
+ "\334T\377\377\327F\275\377\333[4\377\377\377\1\0\0\0\0\0\0\0\0\0\0\0"
|
|
2103 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\376\1\376\311.1\371\271\13\273\343"
|
|
2104 |
+ "\252.\264\377\377\376\0\0\0\0\0\0\0\0\0\377\370\305\13\377\352y\365\377"
|
|
2105 |
+ "\353{\377\377\354\200\373\377\356\210\310\377\360\214\217\377\360\217"
|
|
2106 |
+ "k\377\361\221X\377\360\217S\377\355\211j\377\354\201\230\377\352w\337"
|
|
2107 |
+ "\377\345m\377\377\344f\377\377\340_\377\377\335W\377\377\334Q\377\377"
|
|
2108 |
+ "\332I\375\377\327H\317\377\327I\215\377\326Fd\377\321\77R\377\317;Z\377"
|
|
2109 |
+ "\314.p\377\310\"\230\376\301\27\325\375\273\6\376\373\267\0\377\337\241"
|
|
2110 |
+ "\32\363\374\354\315\14\0\0\0\0\0\0\0\0\377\360\2238\377\353~\377\377"
|
|
2111 |
+ "\356\203\377\377\357\210\377\377\360\213\377\377\360\215\377\377\360"
|
|
2112 |
+ "\215\377\377\360\214\377\377\360\211\377\377\356\205\377\377\354\177"
|
|
2113 |
+ "\377\377\352y\377\377\351s\377\377\345l\377\377\343d\377\377\337]\377"
|
|
2114 |
+ "\377\335V\377\377\333N\377\377\330G\377\377\324\77\377\377\3227\377\377"
|
|
2115 |
+ "\315/\377\377\311'\377\377\307\37\377\377\305\27\377\377\277\17\377\375"
|
|
2116 |
+ "\273\10\377\375\271\1\377\342\240\4\377\346\276\2055\0\0\0\0\0\0\0\0"
|
|
2117 |
+ "\377\357\215c\377\356\204\377\377\360\213\377\377\361\220\377\377\363"
|
|
2118 |
+ "\224\377\377\363\227\377\377\364\227\377\377\363\225\377\377\362\221"
|
|
2119 |
+ "\377\377\360\214\377\377\357\206\377\377\354\177\377\377\352x\377\377"
|
|
2120 |
+ "\350q\377\377\344i\377\377\342b\377\377\336Z\377\377\334R\377\377\332"
|
|
2121 |
+ "J\377\377\325B\377\377\323:\377\377\3171\377\377\312)\377\377\310!\377"
|
|
2122 |
+ "\377\306\31\377\377\301\21\377\375\274\12\377\375\271\2\377\357\255\0"
|
|
2123 |
+ "\377\311\227Sb\0\0\0\0\0\0\0\0\377\360\214\204\377\360\211\377\377\361"
|
|
2124 |
+ "\221\377\377\364\227\377\377\365\235\377\377\366\241\377\377\366\241"
|
|
2125 |
+ "\377\377\365\236\377\377\364\231\377\377\362\223\377\377\360\214\377"
|
|
2126 |
+ "\377\356\204\377\377\353|\377\376\334U\377\376\3161\377\377\347t\377"
|
|
2127 |
+ "\377\342g\377\377\335T\377\377\333L\377\377\326D\377\377\323<\377\377"
|
|
2128 |
+ "\3213\377\377\312+\377\377\310#\377\377\306\33\377\377\302\22\377\376"
|
|
2129 |
+ "\274\13\377\376\272\3\377\370\264\0\377\301\213:\201\0\0\0\0\0\0\0\0"
|
|
2130 |
+ "\377\360\215\234\377\360\215\377\377\363\226\377\377\365\237\377\377"
|
|
2131 |
+ "\363\232\377\377\346v\377\377\347y\377\377\343m\377\376\337d\377\376"
|
|
2132 |
+ "\342h\377\376\334W\377\376\322>\377\376\3175\377\376\331L\377\377\345"
|
|
2133 |
+ "k\377\377\347r\377\377\353\205\377\377\355\212\377\377\352~\377\377\337"
|
|
2134 |
+ "\\\377\377\327G\377\377\3239\377\377\314.\377\377\312'\377\377\310\40"
|
|
2135 |
+ "\377\377\303\23\377\376\275\14\377\376\272\4\377\371\266\0\377\304\213"
|
|
2136 |
+ "/\227\0\0\0\0\0\0\0\0\376\356\211\254\377\360\216\377\377\365\236\377"
|
|
2137 |
+ "\377\370\255\377\377\360\222\377\377\354\206\377\377\363\235\377\377"
|
|
2138 |
+ "\362\231\377\377\357\217\377\377\353\200\377\377\354\201\377\377\357"
|
|
2139 |
+ "\210\377\377\354\200\377\377\352x\377\377\347o\377\377\344g\377\377\340"
|
|
2140 |
+ "_\377\377\335V\377\377\334P\377\377\331L\377\377\325B\377\377\324;\377"
|
|
2141 |
+ "\377\315/\377\377\321=\377\377\332S\377\377\303\23\377\376\275\14\377"
|
|
2142 |
+ "\376\272\4\377\372\266\0\377\305\213+\253\0\0\0\0\0\0\0\0\375\353\204"
|
|
2143 |
+ "\254\377\360\216\377\377\366\244\377\377\370\263\377\377\355\213\377"
|
|
2144 |
+ "\377\360\224\377\377\370\252\377\377\367\246\377\377\365\237\377\377"
|
|
2145 |
+ "\364\227\377\377\361\217\377\377\357\207\377\377\354\177\377\377\352"
|
|
2146 |
+ "w\377\377\346o\377\377\344f\377\377\337^\377\377\335V\377\377\333M\377"
|
|
2147 |
+ "\377\327E\377\377\323=\377\377\3225\377\377\313,\377\377\311$\377\377"
|
|
2148 |
+ "\343n\377\377\303\23\377\376\275\14\377\376\272\4\377\371\266\0\377\275"
|
|
2149 |
+ "\203'\254\0\0\0\0\0\0\0\0\375\352\201\254\377\360\212\377\377\366\242"
|
|
2150 |
+ "\377\377\371\263\377\377\350\200\377\377\362\230\377\377\366\241\377"
|
|
2151 |
+ "\377\365\236\377\377\364\231\377\377\362\223\377\377\360\214\377\377"
|
|
2152 |
+ "\356\204\377\377\353|\377\377\352t\377\377\345m\377\377\343d\377\377"
|
|
2153 |
+ "\336\\\377\377\335T\377\377\333L\377\377\326D\377\377\323<\377\377\321"
|
|
2154 |
+ "3\377\377\312+\377\377\310#\377\377\342m\377\377\302\22\377\376\274\13"
|
|
2155 |
+ "\377\376\272\3\377\370\265\0\377\274\202)\254\0\0\0\0\0\0\0\0\377\353"
|
|
2156 |
+ "\205\245\377\356\204\377\377\364\233\377\377\371\261\377\377\343r\377"
|
|
2157 |
+ "\377\365\241\377\377\364\227\377\377\363\225\377\377\362\221\377\377"
|
|
2158 |
+ "\360\214\377\377\357\206\377\377\354\177\377\377\352x\377\377\350q\377"
|
|
2159 |
+ "\377\344i\377\377\342a\377\377\336Y\377\377\334R\377\377\332J\377\377"
|
|
2160 |
+ "\325B\377\377\323:\377\377\3202\377\377\312)\377\377\310!\377\377\344"
|
|
2161 |
+ "r\377\377\301\22\377\375\274\12\377\375\271\2\377\367\264\0\377\263|"
|
|
2162 |
+ "*\234\0\0\0\0\0\0\0\0\376\353\201\216\377\353~\377\377\362\223\377\377"
|
|
2163 |
+ "\371\260\377\377\351\203\377\377\360\217\377\377\360\216\377\377\360"
|
|
2164 |
+ "\214\377\377\360\211\377\377\356\204\377\377\354\177\377\377\352y\377"
|
|
2165 |
+ "\377\351s\377\377\345l\377\377\343e\377\377\337]\377\377\335V\377\377"
|
|
2166 |
+ "\333N\377\377\330G\377\377\324\77\377\377\3227\377\377\315/\377\377\311"
|
|
2167 |
+ "'\377\377\307\37\377\377\347{\377\376\277\17\377\375\273\10\377\375\271"
|
|
2168 |
+ "\1\377\363\260\0\377\251t2\210\0\0\0\0\0\0\0\0\376\351}p\377\352v\377"
|
|
2169 |
+ "\377\357\214\377\377\370\257\377\377\360\227\377\377\353\202\377\377"
|
|
2170 |
+ "\356\205\377\377\355\202\377\377\354\200\377\377\353|\377\377\352w\377"
|
|
2171 |
+ "\377\351r\377\377\345l\377\377\344f\377\377\340`\377\377\336Y\377\377"
|
|
2172 |
+ "\334Q\377\377\332J\377\377\325C\377\377\323;\377\377\3213\377\377\313"
|
|
2173 |
+ ",\377\377\310$\377\377\307\35\377\377\345v\377\376\275\15\377\375\272"
|
|
2174 |
+ "\6\377\373\267\0\377\343\243\1\377\255z@i\0\0\0\0\0\0\0\0\376\350\177"
|
|
2175 |
+ "F\377\346n\377\377\354\202\377\377\370\253\377\377\366\252\377\377\336"
|
|
2176 |
+ "\\\377\377\353}\377\377\352y\377\377\352v\377\377\351s\377\377\347o\377"
|
|
2177 |
+ "\377\345k\377\377\343e\377\377\340`\377\377\336Y\377\377\334S\377\377"
|
|
2178 |
+ "\333L\377\377\327E\377\377\324>\377\377\3227\377\377\315/\377\377\311"
|
|
2179 |
+ "(\377\377\310\40\377\377\315.\377\377\327S\377\375\274\12\377\376\272"
|
|
2180 |
+ "\2\377\370\265\0\377\313\215\2\377\316\235b\77\0\0\0\0\0\0\0\0\377\361"
|
|
2181 |
+ "\244\26\376\343f\374\377\350s\377\377\365\240\377\377\371\257\377\377"
|
|
2182 |
+ "\331P\377\377\352x\377\377\346o\377\377\346m\377\377\345j\377\377\344"
|
|
2183 |
+ "g\377\377\342c\377\377\337^\377\377\336X\377\377\334S\377\377\333M\377"
|
|
2184 |
+ "\377\327F\377\377\324\77\377\377\3239\377\377\3202\377\377\312+\377\377"
|
|
2185 |
+ "\310#\377\377\306\34\377\377\333U\377\376\310+\377\375\273\7\377\374"
|
|
2186 |
+ "\270\0\377\365\262\0\377\275\201\16\370\364\333\264\22\0\0\0\0\0\0\0"
|
|
2187 |
+ "\0\377\377\377\1\376\340e\320\377\342d\377\377\357\213\377\377\366\244"
|
|
2188 |
+ "\377\377\336^\377\377\343f\377\377\343e\377\377\342c\377\377\341a\377"
|
|
2189 |
+ "\377\337^\377\377\336Z\377\377\335V\377\377\334Q\377\377\333L\377\377"
|
|
2190 |
+ "\327F\377\377\324@\377\377\3239\377\377\3203\377\377\313,\377\377\311"
|
|
2191 |
+ "%\377\377\307\36\377\377\305\27\377\377\340h\377\375\274\12\377\376\272"
|
|
2192 |
+ "\2\377\371\265\0\377\361\260\0\377\256x\40\311\377\377\376\1\0\0\0\0"
|
|
2193 |
+ "\0\0\0\0\0\0\0\0\376\336a\205\377\335W\377\377\347s\377\377\362\223\377"
|
|
2194 |
+ "\377\354\202\377\377\322:\377\377\336\\\377\377\336Z\377\377\335X\377"
|
|
2195 |
+ "\377\335U\377\377\334Q\377\377\333M\377\377\331I\377\377\326D\377\377"
|
|
2196 |
+ "\324\77\377\377\3239\377\377\3203\377\377\313-\377\377\311&\377\377\307"
|
|
2197 |
+ "\40\377\377\306\31\377\377\310\"\377\376\332Z\377\375\272\5\377\373\267"
|
|
2198 |
+ "\0\377\364\262\0\377\341\242\1\377\233i2~\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2199 |
+ "\0\0\377\344u/\376\332N\376\377\337\\\377\377\353|\377\377\355\203\377"
|
|
2200 |
+ "\376\3204\377\377\333P\377\377\334P\377\377\333N\377\377\333K\377\377"
|
|
2201 |
+ "\331H\377\377\326D\377\377\324@\377\377\323<\377\377\3227\377\377\317"
|
|
2202 |
+ "1\377\377\313,\377\377\311&\377\377\307\40\377\377\306\31\377\377\303"
|
|
2203 |
+ "\23\377\377\336d\377\375\305\"\377\375\271\1\377\366\264\0\377\357\257"
|
|
2204 |
+ "\0\377\270}\6\375\325\253w+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377"
|
|
2205 |
+ "\1\376\330N\307\377\331J\377\377\342c\377\377\347q\377\377\333R\377\376"
|
|
2206 |
+ "\316-\377\377\330F\377\377\326D\377\377\325B\377\377\324\77\377\377\323"
|
|
2207 |
+ "<\377\377\3228\377\377\3214\377\377\315/\377\377\312*\377\377\311%\377"
|
|
2208 |
+ "\377\307\37\377\377\306\31\377\377\303\23\377\376\306&\377\376\336g\377"
|
|
2209 |
+ "\375\271\1\377\370\265\0\377\361\260\0\377\351\251\0\377\241l\40\300"
|
|
2210 |
+ "\377\377\377\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\331WW\377"
|
|
2211 |
+ "\323=\377\377\331K\377\377\337]\377\377\335X\377\376\307\37\377\377\321"
|
|
2212 |
+ "6\377\377\323;\377\377\3239\377\377\3226\377\377\3203\377\377\316/\377"
|
|
2213 |
+ "\377\312+\377\377\311'\377\377\310\"\377\377\307\35\377\377\305\30\377"
|
|
2214 |
+ "\377\302\22\377\376\275\16\377\377\344v\377\376\277\22\377\371\265\0"
|
|
2215 |
+ "\377\362\261\0\377\353\253\0\377\301\203\2\377\256\177LP\0\0\0\0\0\0"
|
|
2216 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\365\311\4\376\322=\321\377\322"
|
|
2217 |
+ "8\377\377\327F\377\377\331J\377\377\3218\377\376\304\27\377\377\3171"
|
|
2218 |
+ "\377\377\315/\377\377\313-\377\377\312*\377\377\311&\377\377\310#\377"
|
|
2219 |
+ "\377\307\36\377\377\306\32\377\377\304\25\377\377\300\20\377\376\275"
|
|
2220 |
+ "\14\377\376\324M\377\375\320A\377\370\265\0\377\362\261\0\377\354\254"
|
|
2221 |
+ "\0\377\344\242\0\377\236i\34\312\374\363\335\3\0\0\0\0\0\0\0\0\0\0\0"
|
|
2222 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\325UJ\377\312+\376\377\3161\377"
|
|
2223 |
+ "\377\3229\377\377\3204\377\376\306\40\377\376\304\31\377\377\311%\377"
|
|
2224 |
+ "\377\310#\377\377\310\40\377\377\307\35\377\377\306\32\377\377\304\26"
|
|
2225 |
+ "\377\377\301\22\377\376\276\16\377\375\273\12\377\376\311.\377\375\337"
|
|
2226 |
+ "k\377\367\264\0\377\361\260\0\377\353\253\0\377\345\243\0\377\264x\5"
|
|
2227 |
+ "\374\260\203P\77\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2228 |
+ "\0\0\0\0\0\0\377\375\362\1\376\315<\263\377\310\"\377\377\311'\377\377"
|
|
2229 |
+ "\311'\377\377\310\"\377\376\302\22\377\376\304\26\377\377\306\32\377"
|
|
2230 |
+ "\377\305\27\377\377\304\24\377\377\301\21\377\376\276\16\377\375\274"
|
|
2231 |
+ "\13\377\375\273\6\377\376\302\32\377\375\344x\377\365\265\6\377\360\257"
|
|
2232 |
+ "\0\377\352\252\0\377\344\242\0\377\322\222\0\377\230f)\236\377\377\372"
|
|
2233 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2234 |
+ "\0\0\0\376\334\206\40\374\305%\355\377\305\30\377\377\306\32\377\377"
|
|
2235 |
+ "\305\30\377\377\303\24\377\376\302\22\377\376\302\21\377\376\276\17\377"
|
|
2236 |
+ "\376\274\14\377\375\273\11\377\375\272\6\377\375\271\2\377\374\304\40"
|
|
2237 |
+ "\377\374\344z\377\363\267\16\377\355\255\0\377\350\247\0\377\343\241"
|
|
2238 |
+ "\0\377\334\233\0\377\233d\24\334\340\275\215\21\0\0\0\0\0\0\0\0\0\0\0"
|
|
2239 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\365"
|
|
2240 |
+ "\307[Q\371\272\24\374\376\275\16\377\376\275\16\377\376\274\14\377\375"
|
|
2241 |
+ "\274\12\377\375\276\13\377\376\304\30\377\375\273\5\377\375\270\1\377"
|
|
2242 |
+ "\372\266\0\377\372\306-\377\373\341v\377\357\262\11\377\352\251\0\377"
|
|
2243 |
+ "\345\243\0\377\340\236\0\377\333\233\0\377\244l\12\364\267\213X5\0\0"
|
|
2244 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2245 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\376\0\353\270Lz\370\265\10\377\375\272"
|
|
2246 |
+ "\3\377\375\271\2\377\375\271\1\377\374\270\0\377\372\271\4\377\375\307"
|
|
2247 |
+ "#\377\367\274\25\377\371\325V\377\366\327a\377\353\254\5\377\346\244"
|
|
2248 |
+ "\0\377\342\237\0\377\335\234\0\377\330\231\0\377\254r\6\373\244vDT\377"
|
|
2249 |
+ "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2250 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\375\357\2\345\260"
|
|
2251 |
+ "D\215\361\257\4\377\366\263\0\377\364\262\0\377\362\261\0\377\360\257"
|
|
2252 |
+ "\0\377\357\257\2\377\366\3072\377\357\2774\377\345\243\0\377\341\237"
|
|
2253 |
+ "\0\377\335\234\0\377\331\231\0\377\325\226\0\377\254s\6\374\237q>b\377"
|
|
2254 |
+ "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2255 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\376\370"
|
|
2256 |
+ "\345\2\335\250C\206\345\245\6\376\352\252\0\377\351\250\0\377\347\245"
|
|
2257 |
+ "\0\377\345\245\0\377\345\245\0\377\336\235\0\377\334\233\0\377\330\231"
|
|
2258 |
+ "\0\377\325\226\0\377\321\223\0\377\246m\7\367\236p=[\377\377\376\0\0"
|
|
2259 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2260 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377"
|
|
2261 |
+ "\377\370\1\325\242Lg\331\230\13\370\337\236\0\377\335\234\0\377\336\235"
|
|
2262 |
+ "\0\377\342\240\0\377\325\226\0\377\323\225\0\377\320\223\0\377\314\217"
|
|
2263 |
+ "\0\377\234e\15\352\251|KH\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2264 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2265 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\0"
|
|
2266 |
+ "\325\246`B\315\220\30\345\324\225\0\377\324\226\0\377\332\232\0\377\317"
|
|
2267 |
+ "\222\0\377\316\221\0\377\277\203\1\377\225a\30\312\276\222_$\0\0\0\0"
|
|
2268 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2269 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2270 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\350\303\215\30\307\216-\256"
|
|
2271 |
+ "\315\216\4\376\327\230\0\377\316\221\0\377\251p\7\372\227e,\211\355\321"
|
|
2272 |
+ "\246\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2273 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2274 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2275 |
+ "\0\377\375\360\1\313\230QX\272\200\32\345\231e\32\312\261\204Q7\377\377"
|
|
2276 |
+ "\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
|
|
2277 |
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
|
|
2278 |
+GdkPixbuf *shield_pixbuf;
|
|
2279 |
+/* GdkPixbuf RGBA C-Source image dump */
|
|
2280 |
+
|
|
2281 |
+#ifdef __SUNPRO_C
|
|
2282 |
+#pragma align 4 (title_center_dimple_unfocused)
|
|
2283 |
+#endif
|
|
2284 |
+#ifdef __GNUC__
|
|
2285 |
+static const guint8 title_center_dimple_unfocused[] __attribute__ ((__aligned__ (4))) =
|
|
2286 |
+#else
|
|
2287 |
+static const guint8 title_center_dimple_unfocused[] =
|
|
2288 |
+#endif
|
|
2289 |
+{ ""
|
|
2290 |
+ /* Pixbuf magic (0x47646b50) */
|
|
2291 |
+ "GdkP"
|
|
2292 |
+ /* length: header (24) + pixel_data (76) */
|
|
2293 |
+ "\0\0\0d"
|
|
2294 |
+ /* pixdata_type (0x1010002) */
|
|
2295 |
+ "\1\1\0\2"
|
|
2296 |
+ /* rowstride (4) */
|
|
2297 |
+ "\0\0\0\4"
|
|
2298 |
+ /* width (1) */
|
|
2299 |
+ "\0\0\0\1"
|
|
2300 |
+ /* height (19) */
|
|
2301 |
+ "\0\0\0\23"
|
|
2302 |
+ /* pixel_data: */
|
|
2303 |
+ "\231\231\231\377\230\230\230\377\227\227\227\377\225\225\225\377\222"
|
|
2304 |
+ "\222\222\377\216\216\216\377\212\212\212\377\205\205\205\377\200\200"
|
|
2305 |
+ "\200\377zzz\377sss\377nnn\377hhh\377bbb\377]]]\377YYY\377UUU\377RRR\377"
|
|
2306 |
+ "QQQ\377"};
|
|
2307 |
+
|
|
2308 |
+/* GdkPixbuf RGBA C-Source image dump */
|
|
2309 |
+
|
|
2310 |
+#ifdef __SUNPRO_C
|
|
2311 |
+#pragma align 4 (title_left_dimple_unfocused)
|
|
2312 |
+#endif
|
|
2313 |
+#ifdef __GNUC__
|
|
2314 |
+static const guint8 title_left_dimple_unfocused[] __attribute__ ((__aligned__ (4))) =
|
|
2315 |
+#else
|
|
2316 |
+static const guint8 title_left_dimple_unfocused[] =
|
|
2317 |
+#endif
|
|
2318 |
+{ ""
|
|
2319 |
+ /* Pixbuf magic (0x47646b50) */
|
|
2320 |
+ "GdkP"
|
|
2321 |
+ /* length: header (24) + pixel_data (1444) */
|
|
2322 |
+ "\0\0\5\274"
|
|
2323 |
+ /* pixdata_type (0x1010002) */
|
|
2324 |
+ "\1\1\0\2"
|
|
2325 |
+ /* rowstride (76) */
|
|
2326 |
+ "\0\0\0L"
|
|
2327 |
+ /* width (19) */
|
|
2328 |
+ "\0\0\0\23"
|
|
2329 |
+ /* height (19) */
|
|
2330 |
+ "\0\0\0\23"
|
|
2331 |
+ /* pixel_data: */
|
|
2332 |
+ "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377"
|
|
2333 |
+ "\0\205\205\205T\210\210\210\256\212\212\212\355\215\215\215\377\217\217"
|
|
2334 |
+ "\217\377\222\222\222\377\223\223\223\377\225\225\225\377\226\226\226"
|
|
2335 |
+ "\377\230\230\230\377\230\230\230\377\231\231\231\377\231\231\231\377"
|
|
2336 |
+ "\231\231\231\377\377\377\377\0\377\377\377\0\377\377\377\0}}}-\200\200"
|
|
2337 |
+ "\200\317\203\203\203\377\206\206\206\377\211\211\211\377\213\213\213"
|
|
2338 |
+ "\377\216\216\216\377\220\220\220\377\223\223\223\377\224\224\224\377"
|
|
2339 |
+ "\226\226\226\377\226\226\226\377\227\227\227\377\230\230\230\377\230"
|
|
2340 |
+ "\230\230\377\230\230\230\377\377\377\377\0\377\377\377\0xxxKzzz\366}"
|
|
2341 |
+ "}}\377\200\200\200\377\203\203\203\377\207\207\207\377\212\212\212\377"
|
|
2342 |
+ "\214\214\214\377\216\216\216\377\221\221\221\377\223\223\223\377\224"
|
|
2343 |
+ "\224\224\377\225\225\225\377\226\226\226\377\226\226\226\377\226\226"
|
|
2344 |
+ "\226\377\226\226\226\377\377\377\377\0rrr-ttt\363www\377zzz\377}}}\377"
|
|
2345 |
+ "\200\200\200\377\203\203\203\377\207\207\207\377\212\212\212\377\214"
|
|
2346 |
+ "\214\214\377\216\216\216\377\220\220\220\377\222\222\222\377\223\223"
|
|
2347 |
+ "\223\377\223\223\223\377\224\224\224\377\224\224\224\377\224\224\224"
|
|
2348 |
+ "\377lll\3nnn\317ppp\377sss\377vvv\377zzz\377}}}\377\200\200\200\377\203"
|
|
2349 |
+ "\203\203\377\206\206\206\377\211\211\211\377\213\213\213\377\215\215"
|
|
2350 |
+ "\215\377\217\217\217\377\220\220\220\377\220\220\220\377\221\221\221"
|
|
2351 |
+ "\377\221\221\221\377\222\222\222\377iiiNjjj\377lll\377ooo\377rrr\377"
|
|
2352 |
+ "uuu\377yyy\377}}}\377\177\177\177\377\202\202\202\377\205\205\205\377"
|
|
2353 |
+ "\210\210\210\377\212\212\212\377\213\213\213\377\214\214\214\377\215"
|
|
2354 |
+ "\215\215\377\215\215\215\377\216\216\216\377\216\216\216\377eee\245e"
|
|
2355 |
+ "ee\377ggg\377jjj\377mmm\377ppp\377ttt\377xxx\377{{{\377~~~\377\201\201"
|
|
2356 |
+ "\201\377\203\203\203\377\205\205\205\377\207\207\207\377\210\210\210"
|
|
2357 |
+ "\377\211\211\211\377\211\211\211\377\212\212\212\377\212\212\212\377"
|
|
2358 |
+ "aaa\333aaa\377ccc\377eee\377hhh\377kkk\377ooo\377rrr\377vvv\377yyy\377"
|
|
2359 |
+ "|||\377\177\177\177\377\200\200\200\377\202\202\202\377\203\203\203\377"
|
|
2360 |
+ "\204\204\204\377\204\204\204\377\205\205\205\377\205\205\205\377]]]\366"
|
|
2361 |
+ "]]]\377^^^\377aaa\377ccc\377fff\377iii\377mmm\377ppp\377ttt\377www\377"
|
|
2362 |
+ "yyy\377|||\377}}}\377~~~\377\177\177\177\377\177\177\177\377\177\177"
|
|
2363 |
+ "\177\377\177\177\177\377ZZZ\377YYY\377ZZZ\377\\\\\\\377^^^\377aaa\377"
|
|
2364 |
+ "ddd\377ggg\377kkk\377nnn\377ppp\377sss\377uuu\377www\377xxx\377yyy\377"
|
|
2365 |
+ "yyy\377zzz\377zzz\377WWW\371VVV\377VVV\377XXX\377ZZZ\377\\\\\\\377__"
|
|
2366 |
+ "_\377bbb\377eee\377hhh\377kkk\377mmm\377ooo\377qqq\377rrr\377sss\377"
|
|
2367 |
+ "sss\377sss\377sss\377TTT\333SSS\377SSS\377TTT\377VVV\377WWW\377ZZZ\377"
|
|
2368 |
+ "]]]\377___\377bbb\377eee\377ggg\377iii\377kkk\377lll\377lll\377mmm\377"
|
|
2369 |
+ "mmm\377mmm\377SSS\226QQQ\377QQQ\377QQQ\377RRR\377TTT\377VVV\377XXX\377"
|
|
2370 |
+ "ZZZ\377]]]\377___\377aaa\377ccc\377eee\377fff\377ggg\377ggg\377ggg\377"
|
|
2371 |
+ "ggg\377RRRBPPP\377OOO\377OOO\377OOO\377PPP\377RRR\377TTT\377VVV\377X"
|
|
2372 |
+ "XX\377ZZZ\377\\\\\\\377^^^\377```\377```\377aaa\377aaa\377bbb\377bbb"
|
|
2373 |
+ "\377\377\377\377\0OOO\300NNN\377MMM\377MMM\377NNN\377OOO\377PPP\377R"
|
|
2374 |
+ "RR\377TTT\377VVV\377XXX\377YYY\377ZZZ\377[[[\377\\\\\\\377]]]\377]]]"
|
|
2375 |
+ "\377]]]\377\377\377\377\0PPP$NNN\355MMM\377LLL\377MMM\377MMM\377NNN\377"
|
|
2376 |
+ "OOO\377QQQ\377RRR\377TTT\377UUU\377VVV\377WWW\377XXX\377XXX\377XXX\377"
|
|
2377 |
+ "YYY\377\377\377\377\0\377\377\377\0OOO<MMM\355LLL\377LLL\377LLL\377M"
|
|
2378 |
+ "MM\377MMM\377OOO\377PPP\377QQQ\377RRR\377SSS\377SSS\377TTT\377TTT\377"
|
|
2379 |
+ "TTT\377UUU\377\377\377\377\0\377\377\377\0\377\377\377\0OOO$MMM\300M"
|
|
2380 |
+ "MM\377LLL\377LLL\377MMM\377MMM\377NNN\377OOO\377PPP\377PPP\377QQQ\377"
|
|
2381 |
+ "RRR\377RRR\377RRR\377RRR\377\377\377\377\0\377\377\377\0\377\377\377"
|
|
2382 |
+ "\0\377\377\377\0\377\377\377\0NNNEMMM\231MMM\314MMM\374MMM\377NNN\377"
|
|
2383 |
+ "NNN\377OOO\377PPP\377PPP\377PPP\377QQQ\377QQQ\377QQQ\377"};
|
|
2384 |
+
|
|
2385 |
+/* GdkPixbuf RGBA C-Source image dump */
|
|
2386 |
+
|
|
2387 |
+#ifdef __SUNPRO_C
|
|
2388 |
+#pragma align 4 (title_right_dimple_unfocused)
|
|
2389 |
+#endif
|
|
2390 |
+#ifdef __GNUC__
|
|
2391 |
+static const guint8 title_right_dimple_unfocused[] __attribute__ ((__aligned__ (4))) =
|
|
2392 |
+#else
|
|
2393 |
+static const guint8 title_right_dimple_unfocused[] =
|
|
2394 |
+#endif
|
|
2395 |
+{ ""
|
|
2396 |
+ /* Pixbuf magic (0x47646b50) */
|
|
2397 |
+ "GdkP"
|
|
2398 |
+ /* length: header (24) + pixel_data (1444) */
|
|
2399 |
+ "\0\0\5\274"
|
|
2400 |
+ /* pixdata_type (0x1010002) */
|
|
2401 |
+ "\1\1\0\2"
|
|
2402 |
+ /* rowstride (76) */
|
|
2403 |
+ "\0\0\0L"
|
|
2404 |
+ /* width (19) */
|
|
2405 |
+ "\0\0\0\23"
|
|
2406 |
+ /* height (19) */
|
|
2407 |
+ "\0\0\0\23"
|
|
2408 |
+ /* pixel_data: */
|
|
2409 |
+ "\232\232\232\377\232\232\232\377\232\232\232\377\232\232\232\377\233"
|
|
2410 |
+ "\233\233\377\233\233\233\377\234\234\234\377\235\235\235\377\236\236"
|
|
2411 |
+ "\236\377\236\236\236\377\237\237\237\377\240\240\240\355\240\240\240"
|
|
2412 |
+ "\256\240\240\240T\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377"
|
|
2413 |
+ "\0\377\377\377\0\231\231\231\377\231\231\231\377\231\231\231\377\232"
|
|
2414 |
+ "\232\232\377\232\232\232\377\233\233\233\377\234\234\234\377\235\235"
|
|
2415 |
+ "\235\377\236\236\236\377\236\236\236\377\240\240\240\377\240\240\240"
|
|
2416 |
+ "\377\241\241\241\377\241\241\241\377\240\240\240\317\240\240\240-\377"
|
|
2417 |
+ "\377\377\0\377\377\377\0\377\377\377\0\227\227\227\377\227\227\227\377"
|
|
2418 |
+ "\230\230\230\377\230\230\230\377\230\230\230\377\231\231\231\377\232"
|
|
2419 |
+ "\232\232\377\233\233\233\377\235\235\235\377\236\236\236\377\237\237"
|
|
2420 |
+ "\237\377\240\240\240\377\240\240\240\377\241\241\241\377\241\241\241"
|
|
2421 |
+ "\377\240\240\240\366\237\237\237K\377\377\377\0\377\377\377\0\225\225"
|
|
2422 |
+ "\225\377\225\225\225\377\225\225\225\377\226\226\226\377\226\226\226"
|
|
2423 |
+ "\377\227\227\227\377\230\230\230\377\232\232\232\377\233\233\233\377"
|
|
2424 |
+ "\234\234\234\377\235\235\235\377\236\236\236\377\240\240\240\377\240"
|
|
2425 |
+ "\240\240\377\240\240\240\377\240\240\240\377\237\237\237\363\236\236"
|
|
2426 |
+ "\236-\377\377\377\0\222\222\222\377\222\222\222\377\222\222\222\377\223"
|
|
2427 |
+ "\223\223\377\223\223\223\377\224\224\224\377\225\225\225\377\226\226"
|
|
2428 |
+ "\226\377\230\230\230\377\232\232\232\377\233\233\233\377\235\235\235"
|
|
2429 |
+ "\377\236\236\236\377\236\236\236\377\237\237\237\377\237\237\237\377"
|
|
2430 |
+ "\236\236\236\377\235\235\235\317\234\234\234\3\216\216\216\377\216\216"
|
|
2431 |
+ "\216\377\216\216\216\377\217\217\217\377\220\220\220\377\220\220\220"
|
|
2432 |
+ "\377\222\222\222\377\223\223\223\377\225\225\225\377\226\226\226\377"
|
|
2433 |
+ "\230\230\230\377\232\232\232\377\233\233\233\377\234\234\234\377\235"
|
|
2434 |
+ "\235\235\377\235\235\235\377\235\235\235\377\234\234\234\377\233\233"
|
|
2435 |
+ "\233N\212\212\212\377\212\212\212\377\212\212\212\377\213\213\213\377"
|
|
2436 |
+ "\213\213\213\377\214\214\214\377\215\215\215\377\216\216\216\377\220"
|
|
2437 |
+ "\220\220\377\222\222\222\377\224\224\224\377\225\225\225\377\227\227"
|
|
2438 |
+ "\227\377\231\231\231\377\232\232\232\377\232\232\232\377\233\233\233"
|
|
2439 |
+ "\377\232\232\232\377\231\231\231\245\205\205\205\377\205\205\205\377"
|
|
2440 |
+ "\205\205\205\377\206\206\206\377\206\206\206\377\207\207\207\377\210"
|
|
2441 |
+ "\210\210\377\212\212\212\377\213\213\213\377\215\215\215\377\217\217"
|
|
2442 |
+ "\217\377\221\221\221\377\223\223\223\377\225\225\225\377\226\226\226"
|
|
2443 |
+ "\377\227\227\227\377\230\230\230\377\230\230\230\377\227\227\227\336"
|
|
2444 |
+ "\200\200\200\377\200\200\200\377\200\200\200\377\200\200\200\377\201"
|
|
2445 |
+ "\201\201\377\202\202\202\377\203\203\203\377\204\204\204\377\206\206"
|
|
2446 |
+ "\206\377\210\210\210\377\212\212\212\377\214\214\214\377\216\216\216"
|
|
2447 |
+ "\377\220\220\220\377\222\222\222\377\223\223\223\377\224\224\224\377"
|
|
2448 |
+ "\224\224\224\377\224\224\224\371zzz\377zzz\377zzz\377{{{\377{{{\377|"
|
|
2449 |
+ "||\377}}}\377\177\177\177\377\200\200\200\377\202\202\202\377\204\204"
|
|
2450 |
+ "\204\377\206\206\206\377\210\210\210\377\213\213\213\377\215\215\215"
|
|
2451 |
+ "\377\216\216\216\377\220\220\220\377\220\220\220\377\221\221\221\377"
|
|
2452 |
+ "ttt\377ttt\377ttt\377ttt\377uuu\377vvv\377www\377yyy\377zzz\377|||\377"
|
|
2453 |
+ "~~~\377\200\200\200\377\203\203\203\377\205\205\205\377\210\210\210\377"
|
|
2454 |
+ "\212\212\212\377\213\213\213\377\214\214\214\377\215\215\215\371nnn\377"
|
|
2455 |
+ "nnn\377nnn\377nnn\377ooo\377ooo\377ppp\377rrr\377ttt\377vvv\377yyy\377"
|
|
2456 |
+ "{{{\377}}}\377\200\200\200\377\202\202\202\377\205\205\205\377\207\207"
|
|
2457 |
+ "\207\377\210\210\210\377\211\211\211\333hhh\377hhh\377hhh\377hhh\377"
|
|
2458 |
+ "iii\377iii\377kkk\377lll\377nnn\377ppp\377sss\377uuu\377xxx\377{{{\377"
|
|
2459 |
+ "}}}\377\200\200\200\377\202\202\202\377\204\204\204\377\205\205\205\226"
|
|
2460 |
+ "bbb\377bbb\377bbb\377ccc\377ccc\377ddd\377eee\377ggg\377hhh\377kkk\377"
|
|
2461 |
+ "mmm\377ppp\377sss\377vvv\377yyy\377|||\377~~~\377\200\200\200\377\202"
|
|
2462 |
+ "\202\202B]]]\377]]]\377]]]\377^^^\377^^^\377___\377```\377bbb\377ccc"
|
|
2463 |
+ "\377eee\377hhh\377kkk\377nnn\377qqq\377ttt\377www\377zzz\377}}}\300\377"
|
|
2464 |
+ "\377\377\0YYY\377YYY\377YYY\377YYY\377ZZZ\377[[[\377\\\\\\\377]]]\377"
|
|
2465 |
+ "___\377aaa\377ddd\377ggg\377iii\377mmm\377ppp\377sss\377vvv\355yyy$\377"
|
|
2466 |
+ "\377\377\0UUU\377UUU\377UUU\377VVV\377VVV\377WWW\377XXX\377ZZZ\377[["
|
|
2467 |
+ "[\377^^^\377```\377ccc\377fff\377iii\377lll\377ppp\355sss<\377\377\377"
|
|
2468 |
+ "\0\377\377\377\0SSS\377SSS\377SSS\377SSS\377TTT\377TTT\377VVV\377WWW"
|
|
2469 |
+ "\377YYY\377[[[\377^^^\377aaa\377ddd\377ggg\377jjj\300nnn$\377\377\377"
|
|
2470 |
+ "\0\377\377\377\0\377\377\377\0QQQ\377QQQ\377RRR\377RRR\377SSS\377SSS"
|
|
2471 |
+ "\377TTT\377VVV\377XXX\377ZZZ\377\\\\\\\377___\314bbb\231eeeE\377\377"
|
|
2472 |
+ "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0"};
|
|
2473 |
+
|
|
2474 |
+#endif /* HAVE_XTSOL */
|
|
2475 |
+#ifdef __SUNPRO_C
|
|
2476 |
+#pragma align 4 (my_pixbuf)
|
|
2477 |
+#endif
|
|
2478 |
+#ifdef __GNUC__
|
|
2479 |
+static const guint8 tabpopup_highlight[] __attribute__ ((__aligned__ (4))) =
|
|
2480 |
+#else
|
|
2481 |
+static const guint8 tabpopup_highlight[] =
|
|
2482 |
+#endif
|
|
2483 |
+{ ""
|
|
2484 |
+ /* Pixbuf magic (0x47646b50) */
|
|
2485 |
+ "GdkP"
|
|
2486 |
+ /* length: header (24) + pixel_data (421) */
|
|
2487 |
+ "\0\0\1\275"
|
|
2488 |
+ /* pixdata_type (0x2010002) */
|
|
2489 |
+ "\2\1\0\2"
|
|
2490 |
+ /* rowstride (132) */
|
|
2491 |
+ "\0\0\0\204"
|
|
2492 |
+ /* width (33) */
|
|
2493 |
+ "\0\0\0!"
|
|
2494 |
+ /* height (18) */
|
|
2495 |
+ "\0\0\0\22"
|
|
2496 |
+ /* pixel_data: */
|
|
2497 |
+ "\246\0\0\0\0\3^^^F^^^\215^^^\307\221^^^\377\3^^^\307^^^\215^^^F\210\0"
|
|
2498 |
+ "\0\0\0\3^^^\40^^^\214^^^\363\225^^^\377\3^^^\363^^^\214^^^\40\205\0\0"
|
|
2499 |
+ "\0\0\2^^^\40^^^\243\231^^^\377\2^^^\243^^^\40\204\0\0\0\0\1^^^\214\233"
|
|
2500 |
+ "^^^\377\1^^^\214\203\0\0\0\0\2^^^F^^^\363\233^^^\377\2^^^\363^^^F\202"
|
|
2501 |
+ "\0\0\0\0\1^^^\215\235^^^\377\1^^^\215\202\0\0\0\0\1^^^\307\235^^^\377"
|
|
2502 |
+ "\1^^^\307\202\0\0\0\0\1^^^\360\235^^^\377\1^^^\360\202\0\0\0\0\1^^^\360"
|
|
2503 |
+ "\235^^^\377\1^^^\360\202\0\0\0\0\1^^^\307\235^^^\377\1^^^\307\202\0\0"
|
|
2504 |
+ "\0\0\1^^^\215\235^^^\377\1^^^\215\202\0\0\0\0\2^^^F^^^\363\233^^^\377"
|
|
2505 |
+ "\2^^^\363^^^F\203\0\0\0\0\1^^^\214\233^^^\377\1^^^\214\204\0\0\0\0\2"
|
|
2506 |
+ "^^^\40^^^\243\231^^^\377\2^^^\243^^^\40\205\0\0\0\0\3^^^\40^^^\214^^"
|
|
2507 |
+ "^\363\225^^^\377\3^^^\363^^^\214^^^\40\210\0\0\0\0\3^^^F^^^\215^^^\307"
|
|
2508 |
+ "\221^^^\377\3^^^\307^^^\215^^^F\246\0\0\0\0"};
|
|
2509 |
+
|
|
2510 |
+
|
|
2511 |
+
|
|
2512 |
+#endif /*TRUSTED_PICS_H */
|
8481
|
2513 |
diff -Nrup metacity-2.16.3/src/trusted.c ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/trusted.c
|
|
2514 |
--- metacity-2.16.3/src/trusted.c 1970-01-01 01:00:00.000000000 +0100
|
|
2515 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/trusted.c 2006-11-02 13:21:04.028609000 +0100
|
7488
|
2516 |
@@ -0,0 +1,1131 @@
|
|
2517 |
+/* Metacity trusted */
|
|
2518 |
+
|
|
2519 |
+/*
|
|
2520 |
+ * Copyright (C) 2005 Erwann Chenede
|
|
2521 |
+ */
|
|
2522 |
+
|
|
2523 |
+#include <config.h>
|
|
2524 |
+#ifdef HAVE_XTSOL
|
|
2525 |
+#include <string.h>
|
|
2526 |
+#include <X11/Xatom.h>
|
|
2527 |
+#include <stdlib.h>
|
|
2528 |
+#include <dlfcn.h>
|
|
2529 |
+#include <link.h>
|
|
2530 |
+#include "trusted.h"
|
|
2531 |
+#include "window.h"
|
|
2532 |
+#include "display.h"
|
|
2533 |
+#include "screen.h"
|
|
2534 |
+#include "workspace.h"
|
|
2535 |
+#include "xprops.h"
|
|
2536 |
+#include "trusted-pics.h"
|
|
2537 |
+#include "errors.h"
|
|
2538 |
+#include "prefs.h"
|
|
2539 |
+
|
|
2540 |
+static
|
|
2541 |
+void * dlopen_tsol (void)
|
|
2542 |
+{
|
|
2543 |
+ void *handle = NULL;
|
|
2544 |
+
|
|
2545 |
+ if ((handle = dlopen ("/usr/lib/libtsol.so.2", RTLD_LAZY)) != NULL)
|
|
2546 |
+ return handle;
|
|
2547 |
+
|
|
2548 |
+ return handle;
|
|
2549 |
+}
|
|
2550 |
+
|
|
2551 |
+static
|
|
2552 |
+void * dlopen_gnometsol (void)
|
|
2553 |
+{
|
|
2554 |
+ void *handle = NULL;
|
|
2555 |
+
|
|
2556 |
+ if ((handle = dlopen ("/usr/lib/libgnometsol.so", RTLD_LAZY)) != NULL)
|
|
2557 |
+ return handle;
|
|
2558 |
+
|
|
2559 |
+ return handle;
|
|
2560 |
+}
|
|
2561 |
+
|
|
2562 |
+
|
|
2563 |
+static
|
|
2564 |
+void * dlopen_xtsol (void)
|
|
2565 |
+{
|
|
2566 |
+ void *handle = NULL;
|
|
2567 |
+
|
|
2568 |
+ if ((handle = dlopen ("/usr/lib/libXtsol.so.1", RTLD_LAZY)) != NULL)
|
|
2569 |
+ return handle;
|
|
2570 |
+ if ((handle = dlopen ("/usr/openwin/lib/libXtsol.so.1", RTLD_LAZY)) != NULL)
|
|
2571 |
+ return handle;
|
|
2572 |
+
|
|
2573 |
+ return handle;
|
|
2574 |
+}
|
|
2575 |
+
|
|
2576 |
+static gboolean
|
|
2577 |
+tsol_is_multi_label_session (void)
|
|
2578 |
+{
|
|
2579 |
+ static int trusted = -1;
|
|
2580 |
+ if (trusted < 0) {
|
|
2581 |
+ if (getenv ("TRUSTED_SESSION")) {
|
|
2582 |
+ trusted = 1;
|
|
2583 |
+ } else {
|
|
2584 |
+ trusted = 0;
|
|
2585 |
+ }
|
|
2586 |
+ }
|
|
2587 |
+ return trusted ? TRUE : FALSE;
|
|
2588 |
+}
|
|
2589 |
+
|
|
2590 |
+gboolean
|
|
2591 |
+tsol_use_trusted_extensions (void)
|
|
2592 |
+{
|
|
2593 |
+ static gboolean _trusted_extensions_initialised = FALSE;
|
|
2594 |
+ static gpointer tsol_handle = NULL;
|
|
2595 |
+ static gpointer xtsol_handle = NULL;
|
|
2596 |
+ static gpointer gnometsol_handle = NULL;
|
|
2597 |
+
|
|
2598 |
+ if (!_trusted_extensions_initialised) {
|
|
2599 |
+ char *label = NULL;
|
|
2600 |
+ _trusted_extensions_initialised = TRUE;
|
|
2601 |
+
|
|
2602 |
+ if (!tsol_is_multi_label_session ())
|
|
2603 |
+ return FALSE;
|
|
2604 |
+
|
|
2605 |
+ tsol_handle = dlopen_tsol ();
|
|
2606 |
+ if (tsol_handle != NULL)
|
|
2607 |
+ xtsol_handle = dlopen_xtsol ();
|
|
2608 |
+ if (tsol_handle && xtsol_handle) {
|
|
2609 |
+
|
|
2610 |
+ /* Replacement libtsol functions */
|
|
2611 |
+ libtsol_label_to_str = (tsol_label_to_str) dlsym (tsol_handle, "label_to_str");
|
|
2612 |
+ libtsol_str_to_label = (tsol_str_to_label) dlsym (tsol_handle, "str_to_label");
|
|
2613 |
+ libtsol_m_label_free = (tsol_m_label_free) dlsym (tsol_handle, "m_label_free");
|
|
2614 |
+
|
|
2615 |
+
|
|
2616 |
+ /* Other misc. libtsol functions */
|
|
2617 |
+ /* libtsol_blminimum = (tsol_blminimum) dlsym (tsol_handle, "blminimum"); */
|
|
2618 |
+ /* libtsol_blmaximum = (tsol_blmaximum) dlsym (tsol_handle, "blmaximum"); */
|
|
2619 |
+ libtsol_blinrange = (tsol_blinrange) dlsym (tsol_handle, "blinrange");
|
|
2620 |
+ /* libtsol_getuserrange = (tsol_getuserrange) dlsym (tsol_handle, "getuserrange"); */
|
|
2621 |
+ /* libtsol_blabel_alloc = (tsol_blabel_alloc) dlsym (tsol_handle, "blabel_alloc"); */
|
|
2622 |
+ /* libtsol_blabel_free = (tsol_blabel_free) dlsym (tsol_handle, "blabel_free"); */
|
|
2623 |
+ /* libtsol_bsllow = (tsol_bsllow) dlsym (tsol_handle, "bsllow"); */
|
|
2624 |
+ /* libtsol_bslhigh = (tsol_bslhigh) dlsym (tsol_handle, "bslhigh"); */
|
|
2625 |
+
|
|
2626 |
+ /* libXtsol functions */
|
|
2627 |
+ libxtsol_XTSOLgetClientLabel = (xtsol_XTSOLgetClientLabel) dlsym (xtsol_handle,
|
|
2628 |
+ "XTSOLgetClientLabel");
|
|
2629 |
+ libxtsol_XTSOLIsWindowTrusted = (xtsol_XTSOLIsWindowTrusted) dlsym (xtsol_handle,
|
|
2630 |
+ "XTSOLIsWindowTrusted");
|
|
2631 |
+ libxtsol_XTSOLsetResLabel = (xtsol_XTSOLsetResLabel) dlsym (xtsol_handle,
|
|
2632 |
+ "XTSOLsetResLabel");
|
|
2633 |
+ libxtsol_XTSOLsetResUID = (xtsol_XTSOLsetResUID) dlsym (xtsol_handle,
|
|
2634 |
+ "XTSOLsetResUID");
|
|
2635 |
+ libxtsol_XTSOLgetResLabel = (xtsol_XTSOLgetResLabel) dlsym (xtsol_handle,
|
|
2636 |
+ "XTSOLgetResLabel");
|
|
2637 |
+ libxtsol_XTSOLgetResUID = (xtsol_XTSOLgetResUID) dlsym (xtsol_handle,
|
|
2638 |
+ "XTSOLgetResUID");
|
|
2639 |
+
|
|
2640 |
+ if (/*libtsol_stobsl == NULL ||
|
|
2641 |
+ libtsol_bsltos == NULL || */
|
|
2642 |
+ libtsol_label_to_str == NULL ||
|
|
2643 |
+ libtsol_str_to_label == NULL ||
|
|
2644 |
+ libtsol_m_label_free == NULL ||
|
|
2645 |
+ /*libtsol_blminimum == NULL ||
|
|
2646 |
+ libtsol_blmaximum == NULL ||*/
|
|
2647 |
+ libtsol_blinrange == NULL ||
|
|
2648 |
+ /* libtsol_getdevicerange == NULL ||
|
|
2649 |
+ libtsol_getuserrange == NULL ||
|
|
2650 |
+ libtsol_blabel_alloc == NULL ||
|
|
2651 |
+ libtsol_blabel_free == NULL ||
|
|
2652 |
+ libtsol_bsllow == NULL ||
|
|
2653 |
+ libtsol_bslhigh == NULL || */
|
|
2654 |
+ libxtsol_XTSOLgetClientLabel == NULL ||
|
|
2655 |
+ libxtsol_XTSOLIsWindowTrusted == NULL ||
|
|
2656 |
+ libxtsol_XTSOLsetResLabel == NULL ||
|
|
2657 |
+ libxtsol_XTSOLsetResUID == NULL ||
|
|
2658 |
+ libxtsol_XTSOLgetResLabel == NULL ||
|
|
2659 |
+ libxtsol_XTSOLgetResUID == NULL)
|
|
2660 |
+ {
|
|
2661 |
+ dlclose (tsol_handle);
|
|
2662 |
+ dlclose (xtsol_handle);
|
|
2663 |
+ tsol_handle = NULL;
|
|
2664 |
+ xtsol_handle = NULL;
|
|
2665 |
+ }
|
|
2666 |
+ }
|
|
2667 |
+ gnometsol_handle = dlopen_gnometsol ();
|
|
2668 |
+ if (gnometsol_handle != NULL)
|
|
2669 |
+ {
|
|
2670 |
+ libgnome_tsol_constraint_image_render = (gnome_tsol_constraint_image_render) dlsym (gnometsol_handle, "gnome_tsol_constraint_image_render");
|
|
2671 |
+ libgnome_tsol_constraint_image_set_border = (gnome_tsol_constraint_image_set_border) dlsym (gnometsol_handle, "gnome_tsol_constraint_image_set_border");
|
|
2672 |
+ libgnome_tsol_constraint_image_set_stretch = (gnome_tsol_constraint_image_set_stretch) dlsym (gnometsol_handle, "gnome_tsol_constraint_image_set_stretch");
|
|
2673 |
+ libgnome_tsol_constraint_image_colorize = (gnome_tsol_constraint_image_colorize) dlsym (gnometsol_handle, "gnome_tsol_constraint_image_colorize");
|
|
2674 |
+
|
|
2675 |
+ if (libgnome_tsol_constraint_image_render == NULL ||
|
|
2676 |
+ libgnome_tsol_constraint_image_set_border == NULL ||
|
|
2677 |
+ libgnome_tsol_constraint_image_set_stretch == NULL ||
|
|
2678 |
+ libgnome_tsol_constraint_image_colorize == NULL)
|
|
2679 |
+ gnometsol_handle = NULL;
|
|
2680 |
+
|
|
2681 |
+ }
|
|
2682 |
+
|
|
2683 |
+ }
|
|
2684 |
+ return ((tsol_handle != NULL) && (xtsol_handle != NULL) && (gnometsol_handle != NULL));
|
|
2685 |
+}
|
|
2686 |
+
|
|
2687 |
+static gboolean
|
|
2688 |
+tsol_use_xtsol_extension ()
|
|
2689 |
+{
|
|
2690 |
+ static int foundxtsol = -1;
|
|
2691 |
+ int major_code, first_event, first_error;
|
|
2692 |
+
|
|
2693 |
+ if (foundxtsol < 0) {
|
|
2694 |
+ foundxtsol = XQueryExtension (gdk_display, "SUN_TSOL", &major_code,
|
|
2695 |
+ &first_event, &first_error);
|
|
2696 |
+ }
|
|
2697 |
+ return foundxtsol;
|
|
2698 |
+}
|
|
2699 |
+
|
|
2700 |
+gboolean tsol_is_available ()
|
|
2701 |
+{
|
|
2702 |
+ if (tsol_use_xtsol_extension () && tsol_use_trusted_extensions ())
|
|
2703 |
+ return TRUE;
|
|
2704 |
+ return FALSE;
|
|
2705 |
+}
|
|
2706 |
+
|
|
2707 |
+MetaDrawOpList * tsol_theme_trusted_title_ops_get (MetaFrameFocus focus)
|
|
2708 |
+{
|
|
2709 |
+ static MetaDrawOpList *op_list = NULL;
|
|
2710 |
+ if (op_list == NULL)
|
|
2711 |
+ {
|
|
2712 |
+ MetaDrawOp *op;
|
|
2713 |
+ GError **error = NULL;
|
|
2714 |
+
|
|
2715 |
+ op_list = meta_draw_op_list_new (6);
|
|
2716 |
+
|
|
2717 |
+ /* inspired from Bluecruve title_gradient draw_ops */
|
|
2718 |
+
|
|
2719 |
+ /* background gradient */
|
|
2720 |
+ op = meta_draw_op_new (META_DRAW_GRADIENT);
|
|
2721 |
+
|
|
2722 |
+ op->data.gradient.x = g_strdup ("left_width");
|
|
2723 |
+ op->data.gradient.y = g_strdup ("0");
|
|
2724 |
+ op->data.gradient.width = g_strdup ("width - (left_width + right_width)");
|
|
2725 |
+ op->data.gradient.height = g_strdup ("height - 2");
|
|
2726 |
+ op->data.gradient.alpha_spec = NULL;
|
|
2727 |
+ op->data.gradient.gradient_spec =
|
|
2728 |
+ meta_gradient_spec_new (meta_gradient_type_from_string ("vertical"));
|
|
2729 |
+
|
|
2730 |
+ /* Similar to bluecurve Gradient */
|
|
2731 |
+ op->data.gradient.gradient_spec->color_specs =
|
|
2732 |
+ g_slist_append (op->data.gradient.gradient_spec->color_specs,
|
|
2733 |
+ meta_color_spec_new_from_string ("blend/gtk:light[NORMAL]/gtk:bg[NORMAL]/0.7", error));
|
|
2734 |
+ op->data.gradient.gradient_spec->color_specs =
|
|
2735 |
+ g_slist_append (op->data.gradient.gradient_spec->color_specs,
|
|
2736 |
+ meta_color_spec_new_from_string ("blend/gtk:light[NORMAL]/gtk:bg[NORMAL]/0.95", error));
|
|
2737 |
+ op->data.gradient.gradient_spec->color_specs =
|
|
2738 |
+ g_slist_append (op->data.gradient.gradient_spec->color_specs,
|
|
2739 |
+ meta_color_spec_new_from_string ("blend/gtk:light[NORMAL]/gtk:bg[NORMAL]/1.0", error));
|
|
2740 |
+ op->data.gradient.gradient_spec->color_specs =
|
|
2741 |
+ g_slist_append (op->data.gradient.gradient_spec->color_specs,
|
|
2742 |
+ meta_color_spec_new_from_string ("blend/gtk:light[NORMAL]/gtk:bg[NORMAL]/0.95", error));
|
|
2743 |
+ op->data.gradient.gradient_spec->color_specs =
|
|
2744 |
+ g_slist_append (op->data.gradient.gradient_spec->color_specs,
|
|
2745 |
+ meta_color_spec_new_from_string ("blend/gtk:light[NORMAL]/gtk:bg[NORMAL]/0.7", error));
|
|
2746 |
+
|
|
2747 |
+ meta_draw_op_list_append (op_list, op);
|
|
2748 |
+
|
|
2749 |
+ /* background alpha image */
|
|
2750 |
+
|
|
2751 |
+ op = meta_draw_op_new (META_DRAW_IMAGE);
|
|
2752 |
+
|
|
2753 |
+ op->data.image.pixbuf = gdk_pixbuf_new_from_inline (-1, label_arrows, FALSE, error);
|
|
2754 |
+ op->data.image.colorize_spec = NULL;
|
|
2755 |
+ op->data.image.x = g_strdup ("left_width + 1");
|
|
2756 |
+ op->data.image.y = g_strdup ("2");
|
|
2757 |
+ op->data.image.width = g_strdup ("width - (left_width + right_width)");
|
|
2758 |
+ op->data.image.height = g_strdup ("(height-4)");
|
|
2759 |
+ op->data.image.alpha_spec = meta_alpha_gradient_spec_new (META_GRADIENT_HORIZONTAL, 5);
|
|
2760 |
+ op->data.image.alpha_spec->alphas[0] = (unsigned char) 255 * 0.9;
|
|
2761 |
+ op->data.image.alpha_spec->alphas[1] = (unsigned char) 255 * 0.4;
|
|
2762 |
+ op->data.image.alpha_spec->alphas[2] = (unsigned char) 0;
|
|
2763 |
+ op->data.image.alpha_spec->alphas[3] = (unsigned char) 255 * 0.4;
|
|
2764 |
+ op->data.image.alpha_spec->alphas[4] = (unsigned char) 255 * 0.9;
|
|
2765 |
+
|
|
2766 |
+ op->data.image.fill_type = meta_image_fill_type_from_string ("tile");
|
|
2767 |
+
|
|
2768 |
+ meta_draw_op_list_append (op_list, op);
|
|
2769 |
+
|
|
2770 |
+ /* top shine first line */
|
|
2771 |
+
|
|
2772 |
+ op = meta_draw_op_new (META_DRAW_GRADIENT);
|
|
2773 |
+
|
|
2774 |
+ op->data.gradient.x = g_strdup ("left_width");
|
|
2775 |
+ op->data.gradient.y = g_strdup ("0");
|
|
2776 |
+ op->data.gradient.width = g_strdup ("width - (left_width + right_width)");
|
|
2777 |
+ op->data.gradient.height = g_strdup ("1");
|
|
2778 |
+ op->data.gradient.alpha_spec = meta_alpha_gradient_spec_new (META_GRADIENT_HORIZONTAL, 1);
|
|
2779 |
+ op->data.image.alpha_spec->alphas[0] = (unsigned char) 255 * 0.2;
|
|
2780 |
+ op->data.gradient.gradient_spec =
|
|
2781 |
+ meta_gradient_spec_new (meta_gradient_type_from_string ("vertical"));
|
|
2782 |
+
|
|
2783 |
+ op->data.gradient.gradient_spec->color_specs =
|
|
2784 |
+ g_slist_append (op->data.gradient.gradient_spec->color_specs,
|
|
2785 |
+ meta_color_spec_new_from_string ("shade/gtk:bg[NORMAL]/2.0", error));
|
|
2786 |
+ op->data.gradient.gradient_spec->color_specs =
|
|
2787 |
+ g_slist_append (op->data.gradient.gradient_spec->color_specs,
|
|
2788 |
+ meta_color_spec_new_from_string ("shade/gtk:bg[NORMAL]/1.7", error));
|
|
2789 |
+
|
|
2790 |
+ meta_draw_op_list_append (op_list, op);
|
|
2791 |
+
|
|
2792 |
+ /* top shine second line */
|
|
2793 |
+
|
|
2794 |
+ op = meta_draw_op_new (META_DRAW_GRADIENT);
|
|
2795 |
+
|
|
2796 |
+ op->data.gradient.x = g_strdup ("left_width");
|
|
2797 |
+ op->data.gradient.y = g_strdup ("0");
|
|
2798 |
+ op->data.gradient.width = g_strdup ("width - (left_width + right_width)");
|
|
2799 |
+ op->data.gradient.height = g_strdup ("1");
|
|
2800 |
+ op->data.gradient.alpha_spec = meta_alpha_gradient_spec_new (META_GRADIENT_HORIZONTAL, 1);
|
|
2801 |
+ op->data.image.alpha_spec->alphas[0] = (unsigned char) 255 * 0.4;
|
|
2802 |
+ op->data.gradient.gradient_spec =
|
|
2803 |
+ meta_gradient_spec_new (meta_gradient_type_from_string ("vertical"));
|
|
2804 |
+
|
|
2805 |
+ op->data.gradient.gradient_spec->color_specs =
|
|
2806 |
+ g_slist_append (op->data.gradient.gradient_spec->color_specs,
|
|
2807 |
+ meta_color_spec_new_from_string ("shade/gtk:bg[NORMAL]/2.0", error));
|
|
2808 |
+ op->data.gradient.gradient_spec->color_specs =
|
|
2809 |
+ g_slist_append (op->data.gradient.gradient_spec->color_specs,
|
|
2810 |
+ meta_color_spec_new_from_string ("shade/gtk:bg[NORMAL]/1.4", error));
|
|
2811 |
+
|
|
2812 |
+ meta_draw_op_list_append (op_list, op);
|
|
2813 |
+
|
|
2814 |
+ /* background alpha image */
|
|
2815 |
+
|
|
2816 |
+ op = meta_draw_op_new (META_DRAW_IMAGE);
|
|
2817 |
+
|
|
2818 |
+ op->data.image.pixbuf = gdk_pixbuf_new_from_inline (-1, title_gradient, FALSE, error);
|
|
2819 |
+
|
|
2820 |
+ op->data.image.colorize_spec = NULL;
|
|
2821 |
+ op->data.image.x = g_strdup ("left_width");
|
|
2822 |
+ op->data.image.y = g_strdup ("height - object_height");
|
|
2823 |
+ op->data.image.width = g_strdup ("width - (left_width + right_width)");
|
|
2824 |
+ op->data.image.height = g_strdup ("object_height");
|
|
2825 |
+ op->data.image.alpha_spec = meta_alpha_gradient_spec_new (META_GRADIENT_HORIZONTAL, 1);
|
|
2826 |
+ op->data.image.alpha_spec->alphas[0] = (unsigned char) 255 * 0.2;
|
|
2827 |
+ op->data.image.colorize_spec = meta_color_spec_new_from_string ("shade/gtk:bg[NORMAL]/2.0", error);
|
|
2828 |
+
|
|
2829 |
+ op->data.image.fill_type = meta_image_fill_type_from_string ("tile");
|
|
2830 |
+
|
|
2831 |
+ meta_draw_op_list_append (op_list, op);
|
|
2832 |
+
|
|
2833 |
+ op = meta_draw_op_new (META_DRAW_TITLE);
|
|
2834 |
+ op->data.trusted_label.color_spec = meta_color_spec_new_from_string ("black", error);
|
|
2835 |
+ op->data.title.x = g_strdup ("(width - title_width) / 2");
|
|
2836 |
+ op->data.title.y = g_strdup ("(height - title_height) / 2");
|
|
2837 |
+ meta_draw_op_list_append (op_list, op);
|
|
2838 |
+
|
|
2839 |
+ }
|
|
2840 |
+ meta_draw_op_list_ref (op_list);
|
|
2841 |
+ return op_list;
|
|
2842 |
+}
|
|
2843 |
+
|
|
2844 |
+
|
|
2845 |
+/* create and return drawing ops for the window trusted label */
|
|
2846 |
+
|
|
2847 |
+MetaDrawOpList * tsol_theme_trusted_label_ops_get (MetaFrameFocus focus)
|
|
2848 |
+{
|
|
2849 |
+ static MetaDrawOpList *op_list_focus = NULL;
|
|
2850 |
+ static MetaDrawOpList *op_list_unfocused = NULL;
|
|
2851 |
+
|
|
2852 |
+ if (focus == META_FRAME_FOCUS_YES)
|
|
2853 |
+ {
|
|
2854 |
+ if (op_list_focus == NULL)
|
|
2855 |
+ {
|
|
2856 |
+ MetaDrawOp *op;
|
|
2857 |
+ GError **error = NULL;
|
|
2858 |
+
|
|
2859 |
+ op_list_focus = meta_draw_op_list_new (5);
|
|
2860 |
+
|
|
2861 |
+ /* dimple center */
|
|
2862 |
+
|
|
2863 |
+ op = meta_draw_op_new (META_DRAW_IMAGE);
|
|
2864 |
+
|
|
2865 |
+
|
|
2866 |
+ op->data.image.pixbuf = gdk_pixbuf_new_from_inline (-1, title_center_dimple, FALSE, error);
|
|
2867 |
+ op->data.image.colorize_spec = meta_color_spec_new_from_string ("label", error);
|
|
2868 |
+ op->data.image.x = g_strdup ("19");
|
|
2869 |
+ op->data.image.y = g_strdup ("0");
|
|
2870 |
+ op->data.image.width = g_strdup ("width - (19*2)");
|
|
2871 |
+ op->data.image.height = g_strdup ("height");
|
|
2872 |
+ op->data.image.alpha_spec = NULL;
|
|
2873 |
+ op->data.image.fill_type = META_IMAGE_FILL_SCALE;
|
|
2874 |
+
|
|
2875 |
+ meta_draw_op_list_append (op_list_focus, op);
|
|
2876 |
+
|
|
2877 |
+ /* left dimple */
|
|
2878 |
+
|
|
2879 |
+ op = meta_draw_op_new (META_DRAW_IMAGE);
|
|
2880 |
+
|
|
2881 |
+ op->data.image.pixbuf = gdk_pixbuf_new_from_inline (-1, title_left_dimple, FALSE, error);
|
|
2882 |
+ op->data.image.colorize_spec = meta_color_spec_new_from_string ("label", error);
|
|
2883 |
+ op->data.image.x = g_strdup ("0");
|
|
2884 |
+ op->data.image.y = g_strdup ("0");
|
|
2885 |
+ op->data.image.width = g_strdup ("object_width");
|
|
2886 |
+ op->data.image.height = g_strdup ("height");
|
|
2887 |
+ op->data.image.alpha_spec = NULL;
|
|
2888 |
+ op->data.image.fill_type = META_IMAGE_FILL_SCALE;
|
|
2889 |
+
|
|
2890 |
+ meta_draw_op_list_append (op_list_focus, op);
|
|
2891 |
+
|
|
2892 |
+ /* right dimple */
|
|
2893 |
+
|
|
2894 |
+ op = meta_draw_op_new (META_DRAW_IMAGE);
|
|
2895 |
+
|
|
2896 |
+ op->data.image.pixbuf = gdk_pixbuf_new_from_inline (-1, title_right_dimple, FALSE, error);
|
|
2897 |
+ op->data.image.colorize_spec = meta_color_spec_new_from_string ("label", error);
|
|
2898 |
+ op->data.image.x = g_strdup ("width-(object_width+1)");
|
|
2899 |
+ op->data.image.y = g_strdup ("0");
|
|
2900 |
+ op->data.image.width = g_strdup ("object_width");
|
|
2901 |
+ op->data.image.height = g_strdup ("height");
|
|
2902 |
+ op->data.image.alpha_spec = NULL;
|
|
2903 |
+ op->data.image.fill_type = META_IMAGE_FILL_SCALE;
|
|
2904 |
+
|
|
2905 |
+ meta_draw_op_list_append (op_list_focus, op);
|
|
2906 |
+
|
|
2907 |
+ /*Trusted Label */
|
|
2908 |
+
|
|
2909 |
+ op = meta_draw_op_new (META_DRAW_TRUSTED_LABEL);
|
|
2910 |
+ /* dummy value */
|
|
2911 |
+ op->data.trusted_label.color_spec = meta_color_spec_new_from_string ("black", error);
|
|
2912 |
+ op->data.title.x = g_strdup ("10");
|
|
2913 |
+ op->data.title.y = g_strdup ("5");
|
|
2914 |
+ meta_draw_op_list_append (op_list_focus, op);
|
|
2915 |
+
|
|
2916 |
+ /* shield icon */
|
|
2917 |
+
|
|
2918 |
+ op = meta_draw_op_new (META_DRAW_IMAGE);
|
|
2919 |
+
|
|
2920 |
+ if (shield_pixbuf == NULL)
|
|
2921 |
+ shield_pixbuf = gdk_pixbuf_new_from_inline (-1, shield, FALSE, error);
|
|
2922 |
+ op->data.image.pixbuf = shield_pixbuf;
|
|
2923 |
+ op->data.image.colorize_spec = NULL;
|
|
2924 |
+ op->data.image.x = g_strdup ("((width - trusted_label_width) / 2) - (trusted_label_height *3)");
|
|
2925 |
+ op->data.image.y = g_strdup ("0");
|
|
2926 |
+ op->data.image.width = g_strdup ("trusted_label_height");
|
|
2927 |
+ op->data.image.height = g_strdup ("trusted_label_height");
|
|
2928 |
+ op->data.image.alpha_spec = NULL;
|
|
2929 |
+ op->data.image.fill_type = META_IMAGE_FILL_SCALE;
|
|
2930 |
+ meta_draw_op_list_append (op_list_focus, op);
|
|
2931 |
+
|
|
2932 |
+ }
|
|
2933 |
+ meta_draw_op_list_ref (op_list_focus);
|
|
2934 |
+ return op_list_focus;
|
|
2935 |
+ }
|
|
2936 |
+ else
|
|
2937 |
+ {
|
|
2938 |
+ if (op_list_unfocused == NULL)
|
|
2939 |
+ {
|
|
2940 |
+ MetaDrawOp *op;
|
|
2941 |
+ GError **error = NULL;
|
|
2942 |
+
|
|
2943 |
+ op_list_unfocused = meta_draw_op_list_new (5);
|
|
2944 |
+
|
|
2945 |
+ /* dimple center */
|
|
2946 |
+
|
|
2947 |
+ op = meta_draw_op_new (META_DRAW_IMAGE);
|
|
2948 |
+
|
|
2949 |
+
|
|
2950 |
+ op->data.image.pixbuf = gdk_pixbuf_new_from_inline (-1, title_center_dimple_unfocused, FALSE, error);
|
|
2951 |
+ op->data.image.colorize_spec = meta_color_spec_new_from_string ("label", error);
|
|
2952 |
+ op->data.image.x = g_strdup ("19");
|
|
2953 |
+ op->data.image.y = g_strdup ("0");
|
|
2954 |
+ op->data.image.width = g_strdup ("width - (19*2)");
|
|
2955 |
+ op->data.image.height = g_strdup ("height");
|
|
2956 |
+ op->data.image.alpha_spec = NULL;
|
|
2957 |
+ op->data.image.fill_type = META_IMAGE_FILL_SCALE;
|
|
2958 |
+
|
|
2959 |
+ meta_draw_op_list_append (op_list_unfocused, op);
|
|
2960 |
+
|
|
2961 |
+ /* left dimple */
|
|
2962 |
+
|
|
2963 |
+ op = meta_draw_op_new (META_DRAW_IMAGE);
|
|
2964 |
+
|
|
2965 |
+ op->data.image.pixbuf = gdk_pixbuf_new_from_inline (-1, title_left_dimple_unfocused, FALSE, error);
|
|
2966 |
+ op->data.image.colorize_spec = meta_color_spec_new_from_string ("label", error);
|
|
2967 |
+ op->data.image.x = g_strdup ("0");
|
|
2968 |
+ op->data.image.y = g_strdup ("0");
|
|
2969 |
+ op->data.image.width = g_strdup ("object_width");
|
|
2970 |
+ op->data.image.height = g_strdup ("height");
|
|
2971 |
+ op->data.image.alpha_spec = NULL;
|
|
2972 |
+ op->data.image.fill_type = META_IMAGE_FILL_SCALE;
|
|
2973 |
+
|
|
2974 |
+ meta_draw_op_list_append (op_list_unfocused, op);
|
|
2975 |
+
|
|
2976 |
+ /* right dimple */
|
|
2977 |
+
|
|
2978 |
+ op = meta_draw_op_new (META_DRAW_IMAGE);
|
|
2979 |
+
|
|
2980 |
+ op->data.image.pixbuf = gdk_pixbuf_new_from_inline (-1, title_right_dimple_unfocused, FALSE, error);
|
|
2981 |
+ op->data.image.colorize_spec = meta_color_spec_new_from_string ("label", error);
|
|
2982 |
+ op->data.image.x = g_strdup ("width-(object_width+1)");
|
|
2983 |
+ op->data.image.y = g_strdup ("0");
|
|
2984 |
+ op->data.image.width = g_strdup ("object_width");
|
|
2985 |
+ op->data.image.height = g_strdup ("height");
|
|
2986 |
+ op->data.image.alpha_spec = NULL;
|
|
2987 |
+ op->data.image.fill_type = META_IMAGE_FILL_SCALE;
|
|
2988 |
+
|
|
2989 |
+ meta_draw_op_list_append (op_list_unfocused, op);
|
|
2990 |
+
|
|
2991 |
+ /*Trusted Label */
|
|
2992 |
+
|
|
2993 |
+ op = meta_draw_op_new (META_DRAW_TRUSTED_LABEL);
|
|
2994 |
+ /* dummy value */
|
|
2995 |
+ op->data.trusted_label.color_spec = meta_color_spec_new_from_string ("black", error);
|
|
2996 |
+ op->data.title.x = g_strdup ("10");
|
|
2997 |
+ op->data.title.y = g_strdup ("5");
|
|
2998 |
+ meta_draw_op_list_append (op_list_unfocused, op);
|
|
2999 |
+
|
|
3000 |
+ /* shield icon */
|
|
3001 |
+
|
|
3002 |
+ op = meta_draw_op_new (META_DRAW_IMAGE);
|
|
3003 |
+
|
|
3004 |
+ if (shield_pixbuf == NULL)
|
|
3005 |
+ shield_pixbuf = gdk_pixbuf_new_from_inline (-1, shield, FALSE, error);
|
|
3006 |
+ op->data.image.pixbuf = shield_pixbuf;
|
|
3007 |
+ op->data.image.colorize_spec = NULL;
|
|
3008 |
+ op->data.image.x = g_strdup ("((width - trusted_label_width) / 2) - (trusted_label_height *3)");
|
|
3009 |
+ op->data.image.y = g_strdup ("0");
|
|
3010 |
+ op->data.image.width = g_strdup ("trusted_label_height");
|
|
3011 |
+ op->data.image.height = g_strdup ("trusted_label_height");
|
|
3012 |
+ op->data.image.alpha_spec = NULL;
|
|
3013 |
+ op->data.image.fill_type = META_IMAGE_FILL_SCALE;
|
|
3014 |
+ meta_draw_op_list_append (op_list_unfocused, op);
|
|
3015 |
+
|
|
3016 |
+ }
|
|
3017 |
+ meta_draw_op_list_ref (op_list_unfocused);
|
|
3018 |
+ return op_list_unfocused;
|
|
3019 |
+ }
|
|
3020 |
+}
|
|
3021 |
+static gint
|
|
3022 |
+trusted_label_string_compare (MetaTrustedLabel *tmp, char *searched_label)
|
|
3023 |
+{
|
|
3024 |
+ return strcmp (searched_label, tmp->name);
|
|
3025 |
+}
|
|
3026 |
+
|
|
3027 |
+static char *
|
|
3028 |
+get_window_label (Display *xdisplay, Window xwindow)
|
|
3029 |
+{
|
|
3030 |
+ m_label_t label;
|
|
3031 |
+ int error;
|
|
3032 |
+
|
|
3033 |
+ if (!tsol_is_available ())
|
|
3034 |
+ return NULL;
|
|
3035 |
+
|
|
3036 |
+ if (libxtsol_XTSOLIsWindowTrusted (xdisplay, xwindow))
|
|
3037 |
+ {
|
|
3038 |
+ return g_strdup ("Trusted Path");
|
|
3039 |
+ }
|
|
3040 |
+ else if (libxtsol_XTSOLgetClientLabel (xdisplay, xwindow, &label))
|
|
3041 |
+ {
|
|
3042 |
+ char *string = NULL;
|
|
3043 |
+ libtsol_label_to_str (&label, &string, M_LABEL, DEF_NAMES, &error);
|
|
3044 |
+ return string;
|
|
3045 |
+ }
|
|
3046 |
+ else
|
|
3047 |
+ return g_strdup ("didn't get the label\n");
|
|
3048 |
+}
|
|
3049 |
+static char *
|
|
3050 |
+getlabelcolor(Display *xdisplay, Window xwindow)
|
|
3051 |
+{
|
|
3052 |
+#define DEFAULT_COLOR "white"
|
|
3053 |
+ char *colorname;
|
|
3054 |
+ m_label_t label;
|
|
3055 |
+ int error;
|
|
3056 |
+
|
|
3057 |
+ if (!tsol_is_available ())
|
|
3058 |
+ return NULL;
|
|
3059 |
+
|
|
3060 |
+ if (libxtsol_XTSOLgetClientLabel (xdisplay, xwindow, &label))
|
|
3061 |
+ {
|
|
3062 |
+ libtsol_label_to_str (&label, &colorname, M_COLOR, DEF_NAMES, &error);
|
|
3063 |
+ if (colorname == NULL)
|
|
3064 |
+ return g_strdup(DEFAULT_COLOR);
|
|
3065 |
+ else
|
|
3066 |
+ return g_strdup(colorname);
|
|
3067 |
+ }
|
|
3068 |
+ return NULL;
|
|
3069 |
+}
|
|
3070 |
+
|
|
3071 |
+MetaTrustedLabel* tsol_xwindow_label_get (MetaDisplay *display, Window xwindow)
|
|
3072 |
+{
|
|
3073 |
+ MetaTrustedLabel *label = NULL;
|
|
3074 |
+ GSList *stored_label = NULL;
|
|
3075 |
+ char *label_name;
|
|
3076 |
+
|
|
3077 |
+ if (!tsol_is_available ())
|
|
3078 |
+ return NULL;
|
|
3079 |
+
|
|
3080 |
+ label_name = get_window_label (display->xdisplay, xwindow);
|
|
3081 |
+
|
|
3082 |
+ /* Look if the label already exist */
|
|
3083 |
+ stored_label = g_slist_find_custom (display->labels, label_name, (GCompareFunc)trusted_label_string_compare);
|
|
3084 |
+
|
|
3085 |
+ if (stored_label)
|
|
3086 |
+ return (MetaTrustedLabel*) stored_label->data;
|
|
3087 |
+
|
|
3088 |
+ /* create new MetaTrustedLabel */
|
|
3089 |
+ label = g_new0 (MetaTrustedLabel, 1);
|
|
3090 |
+
|
|
3091 |
+ label->name = label_name;
|
|
3092 |
+ /* Layout is initialized in meta_frame_style_draw */
|
|
3093 |
+
|
|
3094 |
+ label->color = meta_color_spec_new (META_COLOR_SPEC_BASIC);
|
|
3095 |
+
|
|
3096 |
+ if (!gdk_color_parse ((const char*)getlabelcolor (display->xdisplay, xwindow), &label->color->data.basic.color))
|
|
3097 |
+ {
|
|
3098 |
+ label->color->data.basic.color.red = 255 *255;
|
|
3099 |
+ label->color->data.basic.color.green = 255 *255;
|
|
3100 |
+ label->color->data.basic.color.blue = 255 *255;
|
|
3101 |
+ g_warning ("gdk_color_parse couldn't parse the label color\n");
|
|
3102 |
+ }
|
|
3103 |
+
|
|
3104 |
+ display->labels = g_slist_append (display->labels, label);
|
|
3105 |
+
|
|
3106 |
+ return label;
|
|
3107 |
+}
|
|
3108 |
+
|
|
3109 |
+
|
|
3110 |
+MetaTrustedLabel*
|
|
3111 |
+tsol_meta_window_label_get (MetaWindow *window)
|
|
3112 |
+{
|
|
3113 |
+ if (!tsol_is_available ())
|
|
3114 |
+ return NULL;
|
|
3115 |
+
|
|
3116 |
+ return tsol_xwindow_label_get (window->display, window->xwindow);
|
|
3117 |
+}
|
|
3118 |
+
|
|
3119 |
+gboolean tsol_should_label_layout_be_black (MetaColorSpec *bkg)
|
|
3120 |
+{
|
|
3121 |
+ int ntsc;
|
|
3122 |
+ ntsc = ((bkg->data.basic.color.red) * .4450 +
|
|
3123 |
+ (bkg->data.basic.color.blue) * .030 +
|
|
3124 |
+ (bkg->data.basic.color.green) * .525);
|
|
3125 |
+
|
|
3126 |
+ /* printf ("ntsc %d ->",ntsc); */
|
|
3127 |
+
|
|
3128 |
+ if ((65535 - ntsc) < .61 * 65535)
|
|
3129 |
+ return TRUE;
|
|
3130 |
+ return FALSE;
|
|
3131 |
+}
|
|
3132 |
+
|
|
3133 |
+static Window
|
|
3134 |
+get_window_at_pointer (Display *xdisplay)
|
|
3135 |
+{
|
|
3136 |
+ Window root;
|
|
3137 |
+ Window child;
|
|
3138 |
+ int rootx = -1, rooty = -1;
|
|
3139 |
+ int winx, winy;
|
|
3140 |
+ unsigned int xmask;
|
|
3141 |
+
|
|
3142 |
+ XQueryPointer (xdisplay, DefaultRootWindow (xdisplay),
|
|
3143 |
+ &root, &child, &rootx, &rooty, &winx, &winy, &xmask);
|
|
3144 |
+
|
|
3145 |
+ return child;
|
|
3146 |
+}
|
|
3147 |
+
|
|
3148 |
+gboolean tsol_meta_screen_use_roles (MetaScreen *screen)
|
|
3149 |
+{
|
|
3150 |
+ char **role_list = NULL;
|
|
3151 |
+ int nb_roles;
|
|
3152 |
+ if (meta_prop_get_utf8_list (screen->display,
|
|
3153 |
+ screen->xroot,
|
|
3154 |
+ screen->display->atom_net_desktop_roles,
|
|
3155 |
+ &role_list, &nb_roles))
|
|
3156 |
+ {
|
|
3157 |
+ int i;
|
|
3158 |
+ for (i=0;i<nb_roles;i++)
|
|
3159 |
+ {
|
|
3160 |
+ if (role_list[i] != NULL && strcmp (role_list[i], "") != 0)
|
|
3161 |
+ {
|
|
3162 |
+ g_strfreev (role_list);
|
|
3163 |
+ return TRUE;
|
|
3164 |
+ }
|
|
3165 |
+ }
|
|
3166 |
+ g_strfreev (role_list);
|
|
3167 |
+ }
|
|
3168 |
+ return FALSE;
|
|
3169 |
+}
|
|
3170 |
+
|
|
3171 |
+gboolean tsol_meta_workspace_has_roleas_role (MetaWorkspace *ws)
|
|
3172 |
+{
|
|
3173 |
+ char **role_list = NULL;
|
|
3174 |
+ int nb_roles;
|
|
3175 |
+
|
|
3176 |
+ if (!tsol_is_available ())
|
|
3177 |
+ return FALSE;
|
|
3178 |
+
|
|
3179 |
+ if (meta_prop_get_utf8_list (ws->screen->display,
|
|
3180 |
+ ws->screen->xroot,
|
|
3181 |
+ ws->screen->display->atom_net_desktop_roles,
|
|
3182 |
+ &role_list, &nb_roles))
|
|
3183 |
+ {
|
|
3184 |
+ int ws_id = meta_workspace_index (ws);
|
|
3185 |
+ if (ws_id > nb_roles) /* something is wrong here we don't have the same number of roles/ws */
|
|
3186 |
+ {
|
|
3187 |
+ g_strfreev (role_list);
|
|
3188 |
+ return FALSE;
|
|
3189 |
+ }
|
|
3190 |
+ if (role_list[ws_id] != NULL && strcmp (role_list[ws_id], "") != 0)
|
|
3191 |
+ {
|
|
3192 |
+ g_strfreev (role_list);
|
|
3193 |
+ return TRUE;
|
|
3194 |
+ }
|
|
3195 |
+ g_strfreev (role_list);
|
|
3196 |
+ }
|
|
3197 |
+ return FALSE;
|
|
3198 |
+}
|
|
3199 |
+
|
|
3200 |
+gboolean tsol_meta_window_can_move_to_workspace (MetaWindow *win,
|
|
3201 |
+ MetaWorkspace *ws)
|
|
3202 |
+{
|
|
3203 |
+ if (tsol_meta_workspace_has_roleas_role (ws))
|
|
3204 |
+ {
|
|
3205 |
+ MetaTrustedLabel * label = tsol_meta_window_label_get (win);
|
|
3206 |
+ if (strcmp (label->name, "Trusted Path") != 0)
|
|
3207 |
+ {
|
|
3208 |
+ g_warning ("window %s cannot be moved to workspace %s\n",
|
|
3209 |
+ win->title, meta_workspace_get_name (ws));
|
|
3210 |
+ return FALSE;
|
|
3211 |
+ }
|
|
3212 |
+ }
|
|
3213 |
+ return TRUE;
|
|
3214 |
+}
|
|
3215 |
+
|
|
3216 |
+gboolean tsol_xwindow_can_move_to_workspace (Display *xdisplay,
|
|
3217 |
+ Window xwin,
|
|
3218 |
+ int ws_index)
|
|
3219 |
+{
|
|
3220 |
+ MetaDisplay *display = meta_display_for_x_display (xdisplay);
|
|
3221 |
+ MetaWindow *window = meta_display_lookup_x_window (display, xwin);
|
|
3222 |
+ g_assert (window != NULL);
|
|
3223 |
+ MetaWorkspace *workspace = meta_screen_get_workspace_by_index (window->screen, ws_index);
|
|
3224 |
+ if (tsol_meta_window_can_move_to_workspace (window, workspace))
|
|
3225 |
+ return TRUE;
|
|
3226 |
+ return FALSE;
|
|
3227 |
+}
|
|
3228 |
+
|
|
3229 |
+GList *tsol_add_all_sticky_non_tp_windows (MetaDisplay *display, GList *win_list)
|
|
3230 |
+{
|
|
3231 |
+ GList *return_list;
|
|
3232 |
+ GSList *all_windows;
|
|
3233 |
+ GSList *tmp;
|
|
3234 |
+
|
|
3235 |
+ return_list = win_list;
|
|
3236 |
+
|
|
3237 |
+ all_windows = meta_display_list_windows (display);
|
|
3238 |
+
|
|
3239 |
+ tmp = all_windows;
|
|
3240 |
+ while (tmp != NULL)
|
|
3241 |
+ {
|
|
3242 |
+ MetaWindow *window = tmp->data;
|
|
3243 |
+
|
|
3244 |
+ if (window->on_all_workspaces &&
|
|
3245 |
+ window->decorated &&
|
|
3246 |
+ strcmp (tsol_meta_window_label_get (window)->name, "Trusted Path") != 0)
|
|
3247 |
+ {
|
|
3248 |
+ return_list = g_list_prepend (return_list, window);
|
|
3249 |
+ }
|
|
3250 |
+ tmp = tmp->next;
|
|
3251 |
+ }
|
|
3252 |
+ return return_list;
|
|
3253 |
+}
|
|
3254 |
+
|
|
3255 |
+void tsol_trusted_stripe_atom_update (MetaDisplay* display, MetaWindow *window)
|
|
3256 |
+{
|
|
3257 |
+ unsigned long data[2];
|
|
3258 |
+
|
|
3259 |
+ if (!tsol_is_available())
|
|
3260 |
+ return;
|
|
3261 |
+
|
|
3262 |
+ if (window == NULL)
|
|
3263 |
+ data[0] = get_window_at_pointer (display->xdisplay);
|
|
3264 |
+ else
|
|
3265 |
+ data[0] = window->xwindow;
|
|
3266 |
+
|
|
3267 |
+ data[1] = None;
|
|
3268 |
+
|
|
3269 |
+ meta_error_trap_push (display);
|
|
3270 |
+
|
|
3271 |
+ XChangeProperty (display->xdisplay, DefaultRootWindow (display->xdisplay),
|
|
3272 |
+ display->atom_net_trusted_active_window,
|
|
3273 |
+ XA_WINDOW,
|
|
3274 |
+ 32, PropModeReplace, (guchar*) data, 2);
|
|
3275 |
+ meta_error_trap_pop (display, FALSE);
|
|
3276 |
+}
|
|
3277 |
+
|
|
3278 |
+
|
|
3279 |
+/* Preference related code
|
|
3280 |
+ * init labels and roles from metacity to root window */
|
|
3281 |
+
|
|
3282 |
+
|
|
3283 |
+const char *
|
|
3284 |
+tsol_label_get_min ()
|
|
3285 |
+{
|
|
3286 |
+ static char *min_label = NULL;
|
|
3287 |
+
|
|
3288 |
+ if (!min_label)
|
|
3289 |
+ min_label = (char *) getenv ("USER_MIN_SL");
|
|
3290 |
+
|
|
3291 |
+ return min_label;
|
|
3292 |
+}
|
|
3293 |
+
|
|
3294 |
+const char*
|
|
3295 |
+tsol_label_get_max ()
|
|
3296 |
+{
|
|
3297 |
+ static char *max_label = NULL;
|
|
3298 |
+
|
|
3299 |
+ if (!max_label)
|
|
3300 |
+ max_label = (char *) getenv ("USER_MAX_SL");
|
|
3301 |
+
|
|
3302 |
+ return max_label;
|
|
3303 |
+}
|
|
3304 |
+MetaTrustedLabel *
|
|
3305 |
+tsol_workspace_get_label (MetaWorkspace *ws)
|
|
3306 |
+{
|
|
3307 |
+ int error;
|
|
3308 |
+ MetaTrustedLabel *label = NULL;
|
|
3309 |
+ m_label_t *mlabel = NULL;
|
|
3310 |
+ GSList *stored_label = NULL;
|
|
3311 |
+ GdkColor * color = g_new0 (GdkColor, 1);
|
|
3312 |
+ const char *label_name = meta_prefs_get_workspace_label (meta_workspace_index (ws));
|
|
3313 |
+
|
|
3314 |
+ /* Look if the label already exist */
|
|
3315 |
+
|
|
3316 |
+ stored_label = g_slist_find_custom (ws->screen->display->labels,
|
|
3317 |
+ label_name,
|
|
3318 |
+ (GCompareFunc)trusted_label_string_compare);
|
|
3319 |
+
|
|
3320 |
+ if (stored_label)
|
|
3321 |
+ return (MetaTrustedLabel*) stored_label->data;
|
|
3322 |
+
|
|
3323 |
+ /* create a new one otherwise */
|
|
3324 |
+
|
|
3325 |
+ if (libtsol_str_to_label (label_name, &mlabel,
|
|
3326 |
+ MAC_LABEL, L_NO_CORRECTION, &error) == 0)
|
|
3327 |
+ {
|
|
3328 |
+ char *colorname = NULL;
|
|
3329 |
+
|
|
3330 |
+ libtsol_label_to_str (mlabel, &colorname, M_COLOR, DEF_NAMES, &error);
|
|
3331 |
+
|
|
3332 |
+ #define DEFAULT_COLOR "white"
|
|
3333 |
+
|
|
3334 |
+ if (colorname == NULL)
|
|
3335 |
+ colorname = g_strdup(DEFAULT_COLOR);
|
|
3336 |
+
|
|
3337 |
+ label = g_new0 (MetaTrustedLabel, 1);
|
|
3338 |
+
|
|
3339 |
+ label->name = (char*)label_name;
|
|
3340 |
+ /* Layout is initialized in meta_frame_style_draw */
|
|
3341 |
+
|
|
3342 |
+ label->color = meta_color_spec_new (META_COLOR_SPEC_BASIC);
|
|
3343 |
+
|
|
3344 |
+ if (!gdk_color_parse ((const char*)colorname, &label->color->data.basic.color))
|
|
3345 |
+ {
|
|
3346 |
+ label->color->data.basic.color.red = 255 *255;
|
|
3347 |
+ label->color->data.basic.color.green = 255 *255;
|
|
3348 |
+ label->color->data.basic.color.blue = 255 *255;
|
|
3349 |
+ g_warning ("gdk_color_parse couldn't parse the label color\n");
|
|
3350 |
+ }
|
|
3351 |
+
|
|
3352 |
+ ws->screen->display->labels = g_slist_append (ws->screen->display->labels, label);
|
|
3353 |
+
|
|
3354 |
+ g_free (colorname);
|
|
3355 |
+ }
|
|
3356 |
+
|
|
3357 |
+ return label;
|
|
3358 |
+}
|
|
3359 |
+
|
|
3360 |
+void tsol_set_frame_label (Display* xdpy, Window xwin, Window xwin_frame)
|
|
3361 |
+{
|
|
3362 |
+ bslabel_t label;
|
|
3363 |
+ uid_t uid;
|
|
3364 |
+
|
|
3365 |
+ if (!tsol_is_available ())
|
|
3366 |
+ return;
|
|
3367 |
+
|
|
3368 |
+ if (libxtsol_XTSOLgetResLabel (xdpy, xwin, IsWindow, &label))
|
|
3369 |
+ libxtsol_XTSOLsetResLabel (xdpy, xwin_frame, IsWindow, &label);
|
|
3370 |
+
|
|
3371 |
+ if (libxtsol_XTSOLgetResUID (xdpy, xwin, IsWindow, &uid))
|
|
3372 |
+ libxtsol_XTSOLsetResUID (xdpy, xwin_frame, IsWindow, &uid);
|
|
3373 |
+}
|
|
3374 |
+
|
|
3375 |
+gboolean
|
|
3376 |
+tsol_label_is_in_user_range (const char * label)
|
|
3377 |
+{
|
|
3378 |
+ static blrange_t *range = NULL;
|
|
3379 |
+ m_label_t *mlabel = NULL;
|
|
3380 |
+ int error;
|
|
3381 |
+
|
|
3382 |
+ if (!tsol_is_available ())
|
|
3383 |
+ return FALSE;
|
|
3384 |
+
|
|
3385 |
+ if (!range)
|
|
3386 |
+ { /* Get user label Range */
|
|
3387 |
+ char *min_label = NULL;
|
|
3388 |
+ char *max_label = NULL;
|
|
3389 |
+
|
|
3390 |
+ range = g_malloc (sizeof (blrange_t));
|
|
3391 |
+ range->lower_bound = range->upper_bound = NULL;
|
|
3392 |
+
|
|
3393 |
+ min_label = g_strdup (tsol_label_get_min ());
|
|
3394 |
+ max_label = g_strdup (tsol_label_get_max ());
|
|
3395 |
+
|
|
3396 |
+ if (libtsol_str_to_label (min_label, &(range->lower_bound),
|
|
3397 |
+ MAC_LABEL, L_NO_CORRECTION, &error) < 0)
|
|
3398 |
+ {
|
|
3399 |
+ g_warning ("Couldn't determine minimum workspace label");
|
|
3400 |
+ g_free (min_label);
|
|
3401 |
+ g_free (max_label);
|
|
3402 |
+ return FALSE;
|
|
3403 |
+ }
|
|
3404 |
+ if (libtsol_str_to_label (max_label, &(range->upper_bound),
|
|
3405 |
+ USER_CLEAR, L_NO_CORRECTION, &error) < 0)
|
|
3406 |
+ {
|
|
3407 |
+ g_warning ("Couldn't determine workspace clearance");
|
|
3408 |
+ g_free (min_label);
|
|
3409 |
+ g_free (max_label);
|
|
3410 |
+ return FALSE;
|
|
3411 |
+ }
|
|
3412 |
+ g_free (min_label);
|
|
3413 |
+ g_free (max_label);
|
|
3414 |
+ }
|
|
3415 |
+
|
|
3416 |
+ if (libtsol_str_to_label (label, &mlabel, MAC_LABEL, L_NO_CORRECTION, &error) < 0)
|
|
3417 |
+ {
|
|
3418 |
+ g_warning("Could not validate sensitivity label \"%s\"", label);
|
|
3419 |
+ return FALSE;
|
|
3420 |
+ }
|
|
3421 |
+
|
|
3422 |
+ if (!libtsol_blinrange (mlabel, range))
|
|
3423 |
+ {
|
|
3424 |
+ libtsol_m_label_free (mlabel);
|
|
3425 |
+ return FALSE;
|
|
3426 |
+ }
|
|
3427 |
+ libtsol_m_label_free (mlabel);
|
|
3428 |
+ return TRUE;
|
|
3429 |
+}
|
|
3430 |
+
|
|
3431 |
+
|
|
3432 |
+
|
|
3433 |
+/* boolean is used to select between label or roles */
|
|
3434 |
+static void
|
|
3435 |
+set_workspace_tsol_properties (MetaScreen *screen, gboolean label)
|
|
3436 |
+{
|
|
3437 |
+ GString *flattened;
|
|
3438 |
+ int i;
|
|
3439 |
+ int n_spaces;
|
|
3440 |
+
|
|
3441 |
+ /* flatten to nul-separated list */
|
|
3442 |
+ n_spaces = meta_screen_get_n_workspaces (screen);
|
|
3443 |
+ flattened = g_string_new ("");
|
|
3444 |
+ i = 0;
|
|
3445 |
+ while (i < n_spaces)
|
|
3446 |
+ {
|
|
3447 |
+ const char *name;
|
|
3448 |
+
|
|
3449 |
+ if (label)
|
|
3450 |
+ {
|
|
3451 |
+ name = meta_prefs_get_workspace_label (i);
|
|
3452 |
+ /* default to min label range if the workspace label isn't defined */
|
|
3453 |
+ if (name == NULL)
|
|
3454 |
+ name = tsol_label_get_min ();
|
|
3455 |
+ if (!tsol_label_is_in_user_range (name))
|
|
3456 |
+ name = tsol_label_get_min ();
|
|
3457 |
+ }
|
|
3458 |
+ else
|
|
3459 |
+ name = meta_prefs_get_workspace_role (i);
|
|
3460 |
+
|
|
3461 |
+
|
|
3462 |
+ if (name)
|
|
3463 |
+ g_string_append_len (flattened, name,
|
|
3464 |
+ strlen (name) + 1);
|
|
3465 |
+ else
|
|
3466 |
+ g_string_append_len (flattened, "", 1);
|
|
3467 |
+
|
|
3468 |
+ ++i;
|
|
3469 |
+ }
|
|
3470 |
+
|
|
3471 |
+ meta_error_trap_push (screen->display);
|
|
3472 |
+ XChangeProperty (screen->display->xdisplay,
|
|
3473 |
+ screen->xroot,
|
|
3474 |
+ label ? screen->display->atom_net_desktop_labels : screen->display->atom_net_desktop_roles,
|
|
3475 |
+ screen->display->atom_utf8_string,
|
|
3476 |
+ 8, PropModeReplace,
|
|
3477 |
+ (const unsigned char *)flattened->str, flattened->len);
|
|
3478 |
+ meta_error_trap_pop (screen->display, FALSE);
|
|
3479 |
+
|
|
3480 |
+ g_string_free (flattened, TRUE);
|
|
3481 |
+}
|
|
3482 |
+
|
|
3483 |
+void
|
|
3484 |
+tsol_workspace_labels_atom_set (MetaScreen *screen)
|
|
3485 |
+{
|
|
3486 |
+ /* This updates label names on root window when the pref changes,
|
|
3487 |
+ * note we only get prefs change notify if things have
|
|
3488 |
+ * really changed.
|
|
3489 |
+ */
|
|
3490 |
+ if (tsol_is_available ())
|
|
3491 |
+ set_workspace_tsol_properties (screen, TRUE);
|
|
3492 |
+}
|
|
3493 |
+
|
|
3494 |
+void tsol_workspace_roles_atom_set (MetaScreen *screen)
|
|
3495 |
+{
|
|
3496 |
+ /* This updates roles names on root window when the pref changes,
|
|
3497 |
+ * note we only get prefs change notify if things have
|
|
3498 |
+ * really changed.
|
|
3499 |
+ */
|
|
3500 |
+ if (tsol_is_available ())
|
|
3501 |
+ set_workspace_tsol_properties (screen, FALSE);
|
|
3502 |
+}
|
|
3503 |
+
|
|
3504 |
+
|
|
3505 |
+void
|
|
3506 |
+tsol_workspace_labels_gconf_update (MetaScreen *screen)
|
|
3507 |
+{
|
|
3508 |
+ char **names;
|
|
3509 |
+ int n_names;
|
|
3510 |
+ int i;
|
|
3511 |
+
|
|
3512 |
+ if (!tsol_is_available ())
|
|
3513 |
+ return;
|
|
3514 |
+
|
|
3515 |
+ /* this updates names in prefs when the root window property changes,
|
|
3516 |
+ * iff the new property contents don't match what's already in prefs
|
|
3517 |
+ */
|
|
3518 |
+
|
|
3519 |
+ names = NULL;
|
|
3520 |
+ n_names = 0;
|
|
3521 |
+ if (!meta_prop_get_utf8_list (screen->display,
|
|
3522 |
+ screen->xroot,
|
|
3523 |
+ screen->display->atom_net_desktop_labels,
|
|
3524 |
+ &names, &n_names))
|
|
3525 |
+ {
|
|
3526 |
+ meta_verbose ("Failed to get workspace label from root window %d\n",
|
|
3527 |
+ screen->number);
|
|
3528 |
+ return;
|
|
3529 |
+ }
|
|
3530 |
+
|
|
3531 |
+ i = 0;
|
|
3532 |
+ while (i < n_names)
|
|
3533 |
+ {
|
|
3534 |
+ /* Check if the label is in range if not set it to USER_MIN_SL
|
|
3535 |
+ * NOTE : if USER_MIN_SL is not properly set you can have an infinite loop here */
|
|
3536 |
+ if (names[i] && !tsol_label_is_in_user_range (names[i]))
|
|
3537 |
+ {
|
|
3538 |
+ g_free (names[i]);
|
|
3539 |
+ names[i] = g_strdup (tsol_label_get_min ());
|
|
3540 |
+ }
|
|
3541 |
+
|
|
3542 |
+ meta_topic (META_DEBUG_PREFS,
|
|
3543 |
+ "Setting workspace label %d name to \"%s\" due to _NET_DESKTOP_LABELS change\n",
|
|
3544 |
+ i, names[i] ? names[i] : "null");
|
|
3545 |
+ meta_prefs_change_workspace_label (i, names[i]);
|
|
3546 |
+
|
|
3547 |
+ ++i;
|
|
3548 |
+ }
|
|
3549 |
+
|
|
3550 |
+ g_strfreev (names);
|
|
3551 |
+}
|
|
3552 |
+
|
|
3553 |
+void
|
|
3554 |
+tsol_workspace_roles_gconf_update (MetaScreen *screen)
|
|
3555 |
+{
|
|
3556 |
+ char **names;
|
|
3557 |
+ int n_names;
|
|
3558 |
+ int i;
|
|
3559 |
+
|
|
3560 |
+ if (!tsol_is_available ())
|
|
3561 |
+ return;
|
|
3562 |
+
|
|
3563 |
+ /* this updates names in prefs when the root window property changes,
|
|
3564 |
+ * iff the new property contents don't match what's already in prefs
|
|
3565 |
+ */
|
|
3566 |
+
|
|
3567 |
+ names = NULL;
|
|
3568 |
+ n_names = 0;
|
|
3569 |
+ if (!meta_prop_get_utf8_list (screen->display,
|
|
3570 |
+ screen->xroot,
|
|
3571 |
+ screen->display->atom_net_desktop_roles,
|
|
3572 |
+ &names, &n_names))
|
|
3573 |
+ {
|
|
3574 |
+ meta_verbose ("Failed to get workspace roles from root window %d\n",
|
|
3575 |
+ screen->number);
|
|
3576 |
+ return;
|
|
3577 |
+ }
|
|
3578 |
+
|
|
3579 |
+ i = 0;
|
|
3580 |
+ while (i < n_names)
|
|
3581 |
+ {
|
|
3582 |
+ meta_topic (META_DEBUG_PREFS,
|
|
3583 |
+ "Setting workspace roles %d name to \"%s\" due to _NET_DESKTOP_ROLES change\n",
|
|
3584 |
+ i, names[i] ? names[i] : "null");
|
|
3585 |
+ meta_prefs_change_workspace_role (i, names[i]);
|
|
3586 |
+
|
|
3587 |
+ ++i;
|
|
3588 |
+ }
|
|
3589 |
+
|
|
3590 |
+ g_strfreev (names);
|
|
3591 |
+}
|
|
3592 |
+
|
|
3593 |
+/* GFX part */
|
|
3594 |
+
|
|
3595 |
+
|
|
3596 |
+typedef struct _HighlightStripe HighlightStripe;
|
|
3597 |
+
|
|
3598 |
+struct _HighlightStripe
|
|
3599 |
+{
|
|
3600 |
+ ConstraintImage *image;
|
|
3601 |
+ char *name;
|
|
3602 |
+};
|
|
3603 |
+
|
|
3604 |
+static gint
|
|
3605 |
+label_string_compare (HighlightStripe *tmp, char *searched_label)
|
|
3606 |
+{
|
|
3607 |
+ return strcmp (searched_label, tmp->name);
|
|
3608 |
+}
|
|
3609 |
+
|
|
3610 |
+ConstraintImage *
|
|
3611 |
+tsol_get_highlight_stripe (char *name,
|
|
3612 |
+ GdkColor *label_color)
|
|
3613 |
+{
|
|
3614 |
+ static GSList *hl_stripe_list = NULL;
|
|
3615 |
+ GSList *stored_hl_stripe = NULL;
|
|
3616 |
+ HighlightStripe *hl_stripe;
|
|
3617 |
+
|
|
3618 |
+ if ((name == NULL) || (label_color == NULL))
|
|
3619 |
+ return NULL;
|
|
3620 |
+
|
|
3621 |
+
|
|
3622 |
+ stored_hl_stripe = g_slist_find_custom (hl_stripe_list,
|
|
3623 |
+ name,
|
|
3624 |
+ (GCompareFunc)label_string_compare);
|
|
3625 |
+ if (stored_hl_stripe)
|
|
3626 |
+ return ((HighlightStripe* )stored_hl_stripe->data)->image;
|
|
3627 |
+
|
|
3628 |
+ hl_stripe = g_new0 (HighlightStripe, 1);
|
|
3629 |
+
|
|
3630 |
+ hl_stripe->name = g_strdup (name);
|
|
3631 |
+
|
|
3632 |
+ hl_stripe->image = g_new0 (ConstraintImage, 1);
|
|
3633 |
+
|
|
3634 |
+ hl_stripe->image->pixbuf = gdk_pixbuf_new_from_inline (-1,
|
|
3635 |
+ tabpopup_highlight,
|
|
3636 |
+ TRUE, NULL);
|
|
3637 |
+
|
|
3638 |
+ libgnome_tsol_constraint_image_set_border (hl_stripe->image, 8, 8, 3, 3);
|
|
3639 |
+ libgnome_tsol_constraint_image_set_stretch (hl_stripe->image, TRUE);
|
|
3640 |
+ libgnome_tsol_constraint_image_colorize (hl_stripe->image, label_color, 255, TRUE);
|
|
3641 |
+
|
|
3642 |
+ hl_stripe_list = g_slist_append (hl_stripe_list, hl_stripe);
|
|
3643 |
+ return hl_stripe->image;
|
|
3644 |
+}
|
|
3645 |
+
|
|
3646 |
+
|
|
3647 |
+#endif
|
8481
|
3648 |
diff -Nrup metacity-2.16.3/src/trusted.h ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/trusted.h
|
|
3649 |
--- metacity-2.16.3/src/trusted.h 1970-01-01 01:00:00.000000000 +0100
|
|
3650 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/trusted.h 2006-11-02 13:21:04.029390000 +0100
|
7488
|
3651 |
@@ -0,0 +1,193 @@
|
|
3652 |
+/* Metacity trusted */
|
|
3653 |
+
|
|
3654 |
+/*
|
|
3655 |
+ * Copyright (C) 2005 Erwann Chenede
|
|
3656 |
+ */
|
|
3657 |
+
|
|
3658 |
+#ifndef TRUSTED_H
|
|
3659 |
+#define TRUSTED_H
|
|
3660 |
+
|
|
3661 |
+#ifdef HAVE_XTSOL
|
|
3662 |
+#include "frames.h"
|
|
3663 |
+#include "display.h"
|
|
3664 |
+#include "theme.h"
|
|
3665 |
+#include <gdk/gdkcolor.h>
|
|
3666 |
+#include <gtk/gtk.h>
|
|
3667 |
+#include "trusted-pics.h"
|
|
3668 |
+#include <X11/extensions/Xtsol.h>
|
|
3669 |
+#include <sys/tsol/label_macro.h>
|
|
3670 |
+/* #include "constraint-scaling.h" */
|
|
3671 |
+
|
|
3672 |
+typedef struct _ConstraintImage ConstraintImage;
|
|
3673 |
+struct _ConstraintImage
|
|
3674 |
+{
|
|
3675 |
+ gchar *filename;
|
|
3676 |
+ GdkPixbuf *pixbuf;
|
|
3677 |
+ GdkPixbuf *scaled;
|
|
3678 |
+ gboolean stretch;
|
|
3679 |
+ gint border_left;
|
|
3680 |
+ gint border_right;
|
|
3681 |
+ gint border_bottom;
|
|
3682 |
+ gint border_top;
|
|
3683 |
+ guint hints[3][3];
|
|
3684 |
+ gboolean recolorable;
|
|
3685 |
+ GdkColor colorize_color;
|
|
3686 |
+ gboolean use_as_bkg_mask;
|
|
3687 |
+};
|
|
3688 |
+
|
|
3689 |
+/* dlopened libtsol functions */
|
|
3690 |
+
|
|
3691 |
+typedef int (*tsol_label_to_str) (const m_label_t *label, char **string,
|
|
3692 |
+ const m_label_str_t conversion_type, uint_t flags,
|
|
3693 |
+ int *error);
|
|
3694 |
+typedef int (*tsol_str_to_label) (const char *string, m_label_t **label,
|
|
3695 |
+ const m_label_type_t label_type, uint_t flags,
|
|
3696 |
+ int *error);
|
|
3697 |
+typedef void (*tsol_m_label_free) (m_label_t *label);
|
|
3698 |
+
|
|
3699 |
+typedef blrange_t* (*tsol_getuserrange) (const char *username);
|
|
3700 |
+typedef int (*tsol_blinrange) (const m_label_t *label,
|
|
3701 |
+ const blrange_t *range);
|
|
3702 |
+typedef void (*tsol_blminimum) (m_label_t *minimum_label,
|
|
3703 |
+ const m_label_t *bounding_label);
|
|
3704 |
+typedef void (*tsol_blmaximum) (m_label_t *maximum_label,
|
|
3705 |
+ const m_label_t *bounding_label);
|
|
3706 |
+typedef m_label_t* (*tsol_blabel_alloc) (void);
|
|
3707 |
+typedef void (*tsol_blabel_free) (m_label_t *label_p);
|
|
3708 |
+typedef void (*tsol_bsllow) (m_label_t *label);
|
|
3709 |
+typedef void (*tsol_bslhigh) (m_label_t *label);
|
|
3710 |
+
|
|
3711 |
+
|
|
3712 |
+typedef void (*gnome_tsol_constraint_image_render) (ConstraintImage *cimage,
|
|
3713 |
+ GdkWindow *window,
|
|
3714 |
+ GdkBitmap *mask,
|
|
3715 |
+ GdkRectangle *clip_rect,
|
|
3716 |
+ gboolean center,
|
|
3717 |
+ gint x,
|
|
3718 |
+ gint y,
|
|
3719 |
+ gint width,
|
|
3720 |
+ gint height);
|
|
3721 |
+
|
|
3722 |
+typedef void (*gnome_tsol_constraint_image_set_border) (ConstraintImage *pb,
|
|
3723 |
+ gint left,
|
|
3724 |
+ gint right,
|
|
3725 |
+ gint top,
|
|
3726 |
+ gint bottom);
|
|
3727 |
+
|
|
3728 |
+typedef void (*gnome_tsol_constraint_image_set_stretch) (ConstraintImage *pb,
|
|
3729 |
+ gboolean stretch);
|
|
3730 |
+
|
|
3731 |
+typedef void (*gnome_tsol_constraint_image_colorize) (ConstraintImage *image,
|
|
3732 |
+ GdkColor *color,
|
|
3733 |
+ int alpha,
|
|
3734 |
+ gboolean use_alpha);
|
|
3735 |
+
|
|
3736 |
+/* dlopened libXtsol functions */
|
|
3737 |
+typedef Status (*xtsol_XTSOLgetClientLabel) (Display *dpy,
|
|
3738 |
+ XID xid,
|
|
3739 |
+ bslabel_t *sl);
|
|
3740 |
+typedef Bool (*xtsol_XTSOLIsWindowTrusted) (Display *dpy,
|
|
3741 |
+ Window win);
|
|
3742 |
+
|
|
3743 |
+typedef Status (*xtsol_XTSOLsetResLabel) (Display *dpy,
|
|
3744 |
+ XID object,
|
|
3745 |
+ ResourceType resourceFlag,
|
|
3746 |
+ bslabel_t *sl);
|
|
3747 |
+typedef Status (*xtsol_XTSOLsetResUID) (Display *dpy,
|
|
3748 |
+ XID object,
|
|
3749 |
+ ResourceType resourceFlag,
|
|
3750 |
+ uid_t *uidp);
|
|
3751 |
+
|
|
3752 |
+typedef Status (*xtsol_XTSOLgetResLabel) (Display *dpy,
|
|
3753 |
+ XID object,
|
|
3754 |
+ ResourceType resourceFlag,
|
|
3755 |
+ bslabel_t *sl);
|
|
3756 |
+
|
|
3757 |
+typedef Status (*xtsol_XTSOLgetResUID) (Display *dpy,
|
|
3758 |
+ XID object,
|
|
3759 |
+ ResourceType resourceFlag,
|
|
3760 |
+ uid_t *uidp);
|
|
3761 |
+
|
|
3762 |
+
|
|
3763 |
+tsol_label_to_str libtsol_label_to_str;
|
|
3764 |
+tsol_str_to_label libtsol_str_to_label;
|
|
3765 |
+tsol_m_label_free libtsol_m_label_free;
|
|
3766 |
+tsol_blminimum libtsol_blminimum;
|
|
3767 |
+tsol_blmaximum libtsol_blmaximum;
|
|
3768 |
+tsol_blinrange libtsol_blinrange;
|
|
3769 |
+tsol_getuserrange libtsol_getuserrange;
|
|
3770 |
+tsol_blabel_alloc libtsol_blabel_alloc;
|
|
3771 |
+tsol_blabel_free libtsol_blabel_free;
|
|
3772 |
+tsol_bsllow libtsol_bsllow;
|
|
3773 |
+tsol_bslhigh libtsol_bslhigh;
|
|
3774 |
+
|
|
3775 |
+gnome_tsol_constraint_image_render libgnome_tsol_constraint_image_render;
|
|
3776 |
+gnome_tsol_constraint_image_set_border libgnome_tsol_constraint_image_set_border;
|
|
3777 |
+gnome_tsol_constraint_image_set_stretch libgnome_tsol_constraint_image_set_stretch;
|
|
3778 |
+gnome_tsol_constraint_image_colorize libgnome_tsol_constraint_image_colorize;
|
|
3779 |
+
|
|
3780 |
+xtsol_XTSOLgetClientLabel libxtsol_XTSOLgetClientLabel;
|
|
3781 |
+xtsol_XTSOLIsWindowTrusted libxtsol_XTSOLIsWindowTrusted;
|
|
3782 |
+
|
|
3783 |
+xtsol_XTSOLsetResLabel libxtsol_XTSOLsetResLabel;
|
|
3784 |
+xtsol_XTSOLgetResLabel libxtsol_XTSOLgetResLabel;
|
|
3785 |
+xtsol_XTSOLsetResUID libxtsol_XTSOLsetResUID;
|
|
3786 |
+xtsol_XTSOLgetResUID libxtsol_XTSOLgetResUID;
|
|
3787 |
+
|
|
3788 |
+gboolean tsol_is_available (void);
|
|
3789 |
+gboolean tsol_use_trusted_extensions (void);
|
|
3790 |
+
|
|
3791 |
+/* metacity trusted functions */
|
|
3792 |
+
|
|
3793 |
+struct _MetaTrustedLabel
|
|
3794 |
+{
|
|
3795 |
+ char *name;
|
|
3796 |
+ PangoLayout *layout;
|
|
3797 |
+ MetaColorSpec *color;
|
|
3798 |
+};
|
|
3799 |
+
|
|
3800 |
+void tsol_trusted_stripe_atom_update (MetaDisplay *display,
|
|
3801 |
+ MetaWindow *window);
|
|
3802 |
+
|
|
3803 |
+MetaDrawOpList* tsol_theme_trusted_label_ops_get (MetaFrameFocus focus);
|
|
3804 |
+MetaDrawOpList* tsol_theme_trusted_title_ops_get (MetaFrameFocus focus);
|
|
3805 |
+
|
|
3806 |
+MetaTrustedLabel* tsol_meta_window_label_get (MetaWindow *window);
|
|
3807 |
+MetaTrustedLabel* tsol_workspace_get_label (MetaWorkspace *ws);
|
|
3808 |
+MetaTrustedLabel* tsol_xwindow_label_get (MetaDisplay *display,
|
|
3809 |
+ Window xwindow);
|
|
3810 |
+
|
|
3811 |
+gboolean tsol_should_label_layout_be_black (MetaColorSpec *bkg);
|
|
3812 |
+gboolean tsol_meta_workspace_has_role (MetaWorkspace *ws);
|
|
3813 |
+gboolean tsol_meta_workspace_has_roleas_role (MetaWorkspace *ws);
|
|
3814 |
+
|
|
3815 |
+gboolean tsol_meta_window_can_move_to_workspace (MetaWindow *win,
|
|
3816 |
+ MetaWorkspace *ws);
|
|
3817 |
+
|
|
3818 |
+gboolean tsol_xwindow_can_move_to_workspace (Display *display,
|
|
3819 |
+ Window xwin,
|
|
3820 |
+ int ws_index);
|
|
3821 |
+
|
|
3822 |
+gboolean tsol_meta_screen_use_roles (MetaScreen *screen);
|
|
3823 |
+GList* tsol_add_all_sticky_non_tp_windows (MetaDisplay *display,
|
|
3824 |
+ GList *win_list);
|
|
3825 |
+
|
|
3826 |
+void tsol_workspace_labels_atom_set (MetaScreen *screen);
|
|
3827 |
+void tsol_workspace_roles_atom_set (MetaScreen *screen);
|
|
3828 |
+
|
|
3829 |
+
|
|
3830 |
+void tsol_workspace_labels_gconf_update (MetaScreen *screen);
|
|
3831 |
+void tsol_workspace_roles_gconf_update (MetaScreen *screen);
|
|
3832 |
+
|
|
3833 |
+gboolean tsol_label_is_in_user_range (const char * label);
|
|
3834 |
+const char *tsol_label_get_min ();
|
|
3835 |
+const char *tsol_label_get_max ();
|
|
3836 |
+
|
|
3837 |
+ConstraintImage * tsol_get_highlight_stripe (char *name,
|
|
3838 |
+ GdkColor *label_color);
|
|
3839 |
+
|
|
3840 |
+void tsol_set_frame_label (Display* xdpy, Window xwin, Window xwin_frame);
|
|
3841 |
+
|
|
3842 |
+
|
|
3843 |
+#endif /*HAVE_XTSOL*/
|
|
3844 |
+#endif /*TRUSTED_H*/
|
8481
|
3845 |
diff -Nrup metacity-2.16.3/src/ui.c ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/ui.c
|
|
3846 |
--- metacity-2.16.3/src/ui.c 2006-11-02 13:18:50.802434000 +0100
|
|
3847 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/ui.c 2006-11-02 13:21:04.031870000 +0100
|
|
3848 |
@@ -969,3 +969,13 @@ meta_ui_get_drag_threshold (MetaUI *ui)
|
7488
|
3849 |
|
|
3850 |
return threshold;
|
|
3851 |
}
|
|
3852 |
+
|
|
3853 |
+#ifdef HAVE_XTSOL
|
|
3854 |
+void
|
|
3855 |
+meta_ui_set_frame_label (MetaUI *ui,
|
|
3856 |
+ Window xwindow,
|
|
3857 |
+ MetaTrustedLabel *label)
|
|
3858 |
+{
|
|
3859 |
+ meta_frames_set_label (ui->frames, xwindow, label);
|
|
3860 |
+}
|
|
3861 |
+#endif
|
8481
|
3862 |
diff -Nrup metacity-2.16.3/src/ui.h ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/ui.h
|
|
3863 |
--- metacity-2.16.3/src/ui.h 2006-11-02 13:18:50.802849000 +0100
|
|
3864 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/ui.h 2006-11-02 13:21:04.033142000 +0100
|
7488
|
3865 |
@@ -28,6 +28,7 @@
|
|
3866 |
#include <X11/Xutil.h>
|
|
3867 |
#include <glib.h>
|
|
3868 |
#include <gdk-pixbuf/gdk-pixbuf.h>
|
|
3869 |
+#include "frames.h"
|
|
3870 |
|
|
3871 |
/* This is between GTK_PRIORITY_RESIZE (+10) and GTK_PRIORITY_REDRAW (+20) */
|
|
3872 |
#define META_PRIORITY_RESIZE (G_PRIORITY_HIGH_IDLE + 15)
|
8481
|
3873 |
@@ -192,6 +193,12 @@ gboolean meta_ui_window_is_widget (MetaU
|
|
3874 |
|
7488
|
3875 |
int meta_ui_get_drag_threshold (MetaUI *ui);
|
|
3876 |
|
|
3877 |
+#ifdef HAVE_XTSOL
|
|
3878 |
+void meta_ui_set_frame_label (MetaUI *ui,
|
|
3879 |
+ Window xwindow,
|
|
3880 |
+ MetaTrustedLabel *label);
|
|
3881 |
+#endif
|
|
3882 |
+
|
|
3883 |
#include "tabpopup.h"
|
|
3884 |
|
|
3885 |
#endif
|
8481
|
3886 |
diff -Nrup metacity-2.16.3/src/window.c ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/window.c
|
|
3887 |
--- metacity-2.16.3/src/window.c 2006-11-02 13:18:50.805857000 +0100
|
|
3888 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/window.c 2006-11-02 13:21:04.051573000 +0100
|
7488
|
3889 |
@@ -27,6 +27,7 @@
|
|
3890 |
#include "edge-resistance.h"
|
|
3891 |
#include "util.h"
|
|
3892 |
#include "frame.h"
|
|
3893 |
+#include "frames.h"
|
|
3894 |
#include "errors.h"
|
|
3895 |
#include "workspace.h"
|
|
3896 |
#include "stack.h"
|
|
3897 |
@@ -185,7 +186,7 @@ maybe_leave_show_desktop_mode (MetaWindo
|
|
3898 |
}
|
|
3899 |
}
|
|
3900 |
|
|
3901 |
-static
|
|
3902 |
+static void
|
|
3903 |
prefs_changed_callback (MetaPreference pref,
|
|
3904 |
gpointer data)
|
|
3905 |
{
|
8481
|
3906 |
@@ -423,7 +424,11 @@ meta_window_new_with_attrs (MetaDisplay
|
7488
|
3907 |
window->rect.x = attrs->x;
|
|
3908 |
window->rect.y = attrs->y;
|
|
3909 |
window->rect.width = attrs->width;
|
|
3910 |
+#ifdef HAVE_XTSOL /*TODO check what's the difference */
|
|
3911 |
+ window->rect.height = 0;
|
|
3912 |
+#else
|
|
3913 |
window->rect.height = attrs->height;
|
|
3914 |
+#endif
|
|
3915 |
|
|
3916 |
/* And border width, size_hints are the "request" */
|
|
3917 |
window->border_width = attrs->border_width;
|
8481
|
3918 |
@@ -725,6 +730,10 @@ meta_window_new_with_attrs (MetaDisplay
|
|
3919 |
meta_stack_add (window->screen->stack,
|
|
3920 |
window);
|
7488
|
3921 |
|
|
3922 |
+
|
|
3923 |
+ if (window->decorated)
|
|
3924 |
+ meta_window_ensure_frame (window);
|
|
3925 |
+
|
|
3926 |
/* Put our state back where it should be,
|
|
3927 |
* passing TRUE for is_configure_request, ICCCM says
|
|
3928 |
* initial map is handled same as configure request
|
8481
|
3929 |
@@ -1241,6 +1250,16 @@ gboolean
|
7488
|
3930 |
meta_window_located_on_workspace (MetaWindow *window,
|
|
3931 |
MetaWorkspace *workspace)
|
|
3932 |
{
|
|
3933 |
+#ifdef HAVE_XTSOL
|
|
3934 |
+ if (tsol_meta_workspace_has_roleas_role (workspace))
|
|
3935 |
+ {
|
|
3936 |
+ if (window->on_all_workspaces && window->decorated && strcmp (tsol_meta_window_label_get (window)->name, "Trusted Path") != 0)
|
|
3937 |
+ {
|
|
3938 |
+ /* printf ("meta_window_visible_on_workspace in ws role win (%s) is not TP\n", window->title); */
|
|
3939 |
+ return FALSE;
|
|
3940 |
+ }
|
|
3941 |
+ }
|
|
3942 |
+#endif
|
|
3943 |
return (window->on_all_workspaces && window->screen == workspace->screen) ||
|
|
3944 |
(window->workspace == workspace);
|
|
3945 |
}
|
8481
|
3946 |
@@ -3003,7 +3022,23 @@ meta_window_move_resize_internal (MetaWi
|
7488
|
3947 |
if (window->shaded)
|
|
3948 |
new_h = fgeom.top_height;
|
|
3949 |
else
|
|
3950 |
+#ifdef HAVE_XTSOL
|
|
3951 |
+ { /* Trusted Frame Layout Modification TFLM */
|
|
3952 |
+ if (tsol_is_available ())
|
|
3953 |
+ {
|
|
3954 |
+ if (window->maximized_vertically)
|
|
3955 |
+ {
|
|
3956 |
+ /*remove label size from height if maximized */
|
|
3957 |
+ window->rect.height -= fgeom.top_height;
|
|
3958 |
+ }
|
|
3959 |
+ new_h = window->rect.height + fgeom.top_height + fgeom.bottom_height + fgeom.top_height;
|
|
3960 |
+ }
|
|
3961 |
+ else
|
|
3962 |
new_h = window->rect.height + fgeom.top_height + fgeom.bottom_height;
|
|
3963 |
+ }
|
|
3964 |
+#else
|
|
3965 |
+ new_h = window->rect.height + fgeom.top_height + fgeom.bottom_height;
|
|
3966 |
+#endif
|
|
3967 |
|
|
3968 |
frame_size_dx = new_w - window->frame->rect.width;
|
|
3969 |
frame_size_dy = new_h - window->frame->rect.height;
|
8481
|
3970 |
@@ -3195,7 +3230,19 @@ meta_window_move_resize_internal (MetaWi
|
7488
|
3971 |
|
|
3972 |
values.border_width = 0;
|
|
3973 |
values.x = client_move_x;
|
|
3974 |
+#ifdef HAVE_XTSOL
|
|
3975 |
+ if (tsol_is_available () && window->frame)
|
|
3976 |
+ {
|
|
3977 |
+ values.y = client_move_y + fgeom.top_height; /* Trusted Frame Layout Modification TFLM */
|
|
3978 |
+ /* added padding for tlabel */
|
|
3979 |
+ }
|
|
3980 |
+ else
|
|
3981 |
+ {
|
|
3982 |
values.y = client_move_y;
|
|
3983 |
+ }
|
|
3984 |
+#else
|
|
3985 |
+ values.y = client_move_y;
|
|
3986 |
+#endif
|
|
3987 |
values.width = window->rect.width;
|
|
3988 |
values.height = window->rect.height;
|
|
3989 |
|
8481
|
3990 |
@@ -3930,6 +3977,11 @@ void
|
7488
|
3991 |
meta_window_change_workspace (MetaWindow *window,
|
|
3992 |
MetaWorkspace *workspace)
|
|
3993 |
{
|
|
3994 |
+#ifdef HAVE_XTSOL
|
|
3995 |
+ if (!tsol_meta_window_can_move_to_workspace(window, workspace))
|
|
3996 |
+ return;
|
|
3997 |
+#endif
|
|
3998 |
+
|
|
3999 |
meta_window_change_workspace_without_transients (window, workspace);
|
|
4000 |
|
|
4001 |
meta_window_foreach_transient (window, change_workspace_foreach,
|
8481
|
4002 |
@@ -4969,16 +5021,17 @@ meta_window_notify_focus (MetaWindow *wi
|
7488
|
4003 |
GList* link;
|
|
4004 |
link = g_list_find (window->screen->active_workspace->mru_list,
|
|
4005 |
window);
|
|
4006 |
- g_assert (link);
|
|
4007 |
-
|
|
4008 |
- window->screen->active_workspace->mru_list =
|
|
4009 |
- g_list_remove_link (window->screen->active_workspace->mru_list,
|
|
4010 |
- link);
|
|
4011 |
- g_list_free (link);
|
|
4012 |
-
|
|
4013 |
- window->screen->active_workspace->mru_list =
|
|
4014 |
- g_list_prepend (window->screen->active_workspace->mru_list,
|
|
4015 |
- window);
|
|
4016 |
+ if (link)
|
|
4017 |
+ {
|
|
4018 |
+ window->screen->active_workspace->mru_list =
|
|
4019 |
+ g_list_remove_link (window->screen->active_workspace->mru_list,
|
|
4020 |
+ link);
|
|
4021 |
+ g_list_free (link);
|
|
4022 |
+
|
|
4023 |
+ window->screen->active_workspace->mru_list =
|
|
4024 |
+ g_list_prepend (window->screen->active_workspace->mru_list,
|
|
4025 |
+ window);
|
|
4026 |
+ }
|
|
4027 |
}
|
|
4028 |
|
|
4029 |
if (window->frame)
|
8481
|
4030 |
@@ -6310,7 +6363,16 @@ meta_window_show_menu (MetaWindow *windo
|
7488
|
4031 |
|
|
4032 |
if (!window->on_all_workspaces)
|
|
4033 |
{
|
|
4034 |
-
|
|
4035 |
+ #ifdef HAVE_XTSOL
|
|
4036 |
+ if (layout.current_col > 0 && tsol_meta_window_can_move_to_workspace (window, meta_workspace_get_neighbor (window->screen->active_workspace, META_MOTION_LEFT)))
|
|
4037 |
+ ops |= META_MENU_OP_MOVE_LEFT;
|
|
4038 |
+ if (layout.current_col < layout.cols - 1 && tsol_meta_window_can_move_to_workspace (window, meta_workspace_get_neighbor (window->screen->active_workspace, META_MOTION_RIGHT)))
|
|
4039 |
+ ops |= META_MENU_OP_MOVE_RIGHT;
|
|
4040 |
+ if (layout.current_row > 0 && tsol_meta_window_can_move_to_workspace (window, meta_workspace_get_neighbor (window->screen->active_workspace, META_MOTION_UP)))
|
|
4041 |
+ ops |= META_MENU_OP_MOVE_UP;
|
|
4042 |
+ if (layout.current_row < layout.rows - 1 && tsol_meta_window_can_move_to_workspace (window, meta_workspace_get_neighbor (window->screen->active_workspace, META_MOTION_DOWN)))
|
|
4043 |
+ ops |= META_MENU_OP_MOVE_DOWN;
|
|
4044 |
+ #else
|
|
4045 |
if (layout.current_col > 0)
|
|
4046 |
ops |= META_MENU_OP_MOVE_LEFT;
|
|
4047 |
if ((layout.current_col < layout.cols - 1) &&
|
8481
|
4048 |
@@ -6321,6 +6383,7 @@ meta_window_show_menu (MetaWindow *windo
|
7488
|
4049 |
if ((layout.current_row < layout.rows - 1) &&
|
|
4050 |
((layout.current_row + 1) * layout.cols + layout.current_col < n_workspaces))
|
|
4051 |
ops |= META_MENU_OP_MOVE_DOWN;
|
|
4052 |
+#endif
|
|
4053 |
}
|
|
4054 |
|
|
4055 |
meta_screen_free_workspace_layout (&layout);
|
8481
|
4056 |
diff -Nrup metacity-2.16.3/src/window.h ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/window.h
|
|
4057 |
--- metacity-2.16.3/src/window.h 2006-11-02 13:18:50.806354000 +0100
|
|
4058 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/window.h 2006-11-02 13:21:04.053727000 +0100
|
7488
|
4059 |
@@ -30,6 +30,8 @@
|
|
4060 |
#include "util.h"
|
|
4061 |
#include "stack.h"
|
|
4062 |
#include "iconcache.h"
|
|
4063 |
+#include <pango/pango.h>
|
|
4064 |
+#include "theme.h"
|
|
4065 |
#include <X11/Xutil.h>
|
|
4066 |
#include <gdk-pixbuf/gdk-pixbuf.h>
|
|
4067 |
|
8481
|
4068 |
diff -Nrup metacity-2.16.3/src/workspace.c ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/workspace.c
|
|
4069 |
--- metacity-2.16.3/src/workspace.c 2006-11-02 13:18:50.807912000 +0100
|
|
4070 |
+++ ../SUNWgnome-wm-2.16.1/metacity-2.16.3/src/workspace.c 2006-11-02 13:21:04.054822000 +0100
|
7488
|
4071 |
@@ -263,6 +263,10 @@ meta_workspace_queue_calc_showing (Meta
|
|
4072 |
GList *tmp;
|
|
4073 |
|
|
4074 |
tmp = workspace->windows;
|
|
4075 |
+#ifdef HAVE_XTSOL
|
|
4076 |
+ if (tsol_is_available ())
|
|
4077 |
+ tmp = tsol_add_all_sticky_non_tp_windows (workspace->screen->display, tmp);
|
|
4078 |
+#endif /*HAVE_XTSOL*/
|
|
4079 |
while (tmp != NULL)
|
|
4080 |
{
|
|
4081 |
meta_window_queue_calc_showing (tmp->data);
|
19085
|
4082 |
--- theme.h.orig 2006-11-23 16:31:45.339642400 +0000
|
|
4083 |
+++ theme.h 2006-11-23 16:33:45.526709500 +0000
|