/* Define to 1 if you have the <
sys/stat.h> header file. */
+#undef HAVE_SYS_TSOL_LABEL_MACRO_H
/* Define to 1 if you have the <
sys/types.h> header file. */
/* Define to 1 if you have the <
unistd.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XTSOL_H
#undef HAVE_X11_SM_SMLIB_H
+/* Building with XTSOL support */
CPPFLAGS="$metacity_save_cppflags"
+### tsol ans Xtsol libraries
+ AC_DEFINE(HAVE_XTSOL, ,[Building with XTSOL support]) found_xtsol=yes,)
+AM_CONDITIONAL(XTSOL_DEFINED, test x$found_xtsol = xyes)
AC_CHECK_LIB(Xext, XShapeQueryExtension,
SUBDIRS=wm-tester tools themes
-INCLUDES=-I$(srcdir)/include -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 @METACITY_CFLAGS@
+INCLUDES=-I$(srcdir)/include -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 @METACITY_CFLAGS@ -DBUILD_TX_CODE
@@ -96,12 +96,15 @@ metacity_SOURCES= \
# by setting libmetacity_private_la_CFLAGS, the files shared with
# metacity proper will be compiled with different names.
-libmetacity_private_la_CFLAGS =
+libmetacity_private_la_CFLAGS = -UBUILD_TX_CODE
libmetacity_private_la_SOURCES= \
@@ -156,6 +156,9 @@ item(_NET_WM_ACTION_ABOVE)
item(_NET_WM_ACTION_BELOW)
item(_NET_WM_STATE_STICKY)
item(_NET_WM_FULLSCREEN_MONITORS)
+item(_NET_DESKTOP_ROLES)
+item(_NET_TRUSTED_ACTIVE_WINDOW)
+item(_NET_DESKTOP_LABELS)
/* We apparently never use: */
@@ -127,6 +127,9 @@ struct _MetaDisplay
guint error_trap_synced_at_last_pop : 1;
MetaScreen *active_screen;
#define GRAB_OP_IS_WINDOW_SWITCH(g) \
(g == META_GRAB_OP_KEYBOARD_TABBING_NORMAL || \
@@ -415,6 +418,10 @@ meta_display_open (void)
the_display->screens = NULL;
the_display->active_screen = NULL;
+ the_display->labels = NULL;
#ifdef HAVE_STARTUP_NOTIFICATION
the_display->sn_display = sn_display_new (the_display->xdisplay,
@@ -1789,7 +1796,10 @@ event_callback (XEvent *event,
meta_window_handle_mouse_grab_op_event (window, event);
- if (display->grab_window == window &&
+ tsol_trusted_stripe_atom_update (display, window);
+ if (display->grab_window == window &&
grab_op_is_mouse (display->grab_op))
meta_window_handle_mouse_grab_op_event (window, event);
@@ -1881,6 +1891,9 @@ event_callback (XEvent *event,
+ tsol_trusted_stripe_atom_update (display, window);
if (display->grab_window == window &&
grab_op_is_mouse (display->grab_op))
meta_window_handle_mouse_grab_op_event (window, event);
@@ -2171,6 +2184,14 @@ event_callback (XEvent *event,
display->atom__NET_DESKTOP_NAMES)
meta_screen_update_workspace_names (screen);
+ display->atom__NET_DESKTOP_LABELS)
+ tsol_workspace_labels_gconf_update (screen);
+ display->atom__NET_DESKTOP_ROLES)
+ tsol_workspace_roles_gconf_update (screen);
display->atom__NET_RESTACK_WINDOW)
-typedef struct _MetaFrameGeometry MetaFrameGeometry;
+/*typedef struct _MetaFrameGeometry MetaFrameGeometry;
struct _MetaFrameGeometry
- /* border sizes (space between frame and child) */
@@ -157,6 +160,17 @@ meta_window_ensure_frame (MetaWindow *wi
+ /* associate trusted label with the window only if a frame exist */
+ meta_ui_set_frame_label (window->screen->ui,
+ window->frame->xwindow,
+ tsol_meta_window_label_get (window));
+ /* make sure the frame window as the same privileges
+ tsol_set_frame_label (window->display->xdisplay, window->xwindow, window->frame->xwindow);
/* Move keybindings to frame instead of window */
meta_window_grab_keys (window);
static gboolean all_bindings_disabled = FALSE;
typedef void (* MetaKeyHandlerFunc) (MetaDisplay *display,
@@ -2345,6 +2349,42 @@ meta_spawn_command_line_async_on_screen
+ if (tsol_is_available ())
+ Atom atom, utf8_string;
+ gchar* tsol_command = g_strdup_printf ("%d:%s",
+ dpy = gdk_display_get_default ();
+ xdpy = GDK_DISPLAY_XDISPLAY (dpy);
+ utf8_string = XInternAtom (xdpy, "UTF8_STRING", FALSE);
+ root = DefaultRootWindow (xdpy);
+ atom = XInternAtom (xdpy, "_LABEL_EXEC_COMMAND", FALSE);
+ gdk_error_trap_push ();
+ XChangeProperty (xdpy, root, atom, utf8_string, 8, PropModeReplace,
+ tsol_command, strlen (tsol_command));
retval = g_spawn_async (NULL,
@@ -2354,11 +2394,10 @@ meta_spawn_command_line_async_on_screen
handle_run_command (MetaDisplay *display,
#define MAX_REASONABLE_WORKSPACES 36
@@ -106,6 +114,14 @@ static char *commands[MAX_COMMANDS] = {
static char *terminal_command = NULL;
static char *workspace_names[MAX_REASONABLE_WORKSPACES] = { NULL, };
+/* these are only used for session managements
+ * workspace_labels are NOT used in metacity as the window label
+ * is queried directly from the window
+ * ditto for the workspace_roles*/
+static char *workspace_labels[MAX_REASONABLE_WORKSPACES] = { NULL, };
+static char *workspace_roles[MAX_REASONABLE_WORKSPACES] = { NULL, };
static gboolean handle_preference_update_enum (const gchar *key, GConfValue *value);
@@ -128,6 +144,16 @@ static void change_notify (GConfClient
static char* gconf_key_for_workspace_name (int i);
+static void init_labels_roles_workspaces (void);
+update_workspace_property (char **property,
+ char *error_property_name,
+static char* gconf_key_for_workspace_label (int i);
+static char* gconf_key_for_workspace_role (int i);
static void queue_changed (MetaPreference pref);
@@ -837,6 +863,40 @@ handle_preference_update_int (const gcha
if (*cursor->target != new_value)
+ if (cursor->pref == META_PREF_NUM_WORKSPACES && tsol_use_trusted_extensions ())
+ if (*cursor->target > new_value) /* remove a workspace blank label and role */
+ char *key = gconf_key_for_workspace_label (new_value);
+ gconf_client_unset (default_client,
+ update_workspace_property (workspace_labels,"Workspace Label",
+ key = gconf_key_for_workspace_role (new_value);
+ gconf_client_unset (default_client,
+ update_workspace_property (workspace_roles ,"Workspace roles",
+ else if (new_value > *cursor->target) /* add a workspace add default label, blank role */
+ char *key = gconf_key_for_workspace_role (new_value-1);
+ gconf_client_unset (default_client,
+ update_workspace_property (workspace_roles ,"Workspace roles",
+ meta_prefs_change_workspace_label (new_value, tsol_label_get_min ());
*cursor->target = new_value;
queue_changed (cursor->pref);
@@ -1008,6 +1068,11 @@ meta_prefs_init (void)
/* returns a reference which we hold forever */
default_client = gconf_client_get_default ();
+ /* tsol labels and roles */
+ init_labels_roles_workspaces ();
for (gconf_dir_cursor=gconf_dirs_we_are_interested_in;
@@ -1063,6 +1128,7 @@ meta_prefs_init (void)
/****************************************************************************/
gboolean (*preference_update_handler[]) (const gchar*, GConfValue*) = {
@@ -1169,6 +1235,98 @@ change_notify (GConfClient *client,
if (update_workspace_name (key, str))
queue_changed (META_PREF_WORKSPACE_NAMES);
+ else if (g_str_has_prefix (key, KEY_WORKSPACE_LABEL_PREFIX))
+ if (!tsol_use_trusted_extensions ())
+ if (value && value->type != GCONF_VALUE_STRING)
+ meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
+ str = value ? gconf_value_get_string (value) : NULL;
+ /* Check if the label is in range if not set it to USER_MIN_SL or role MIN label
+ * NOTE : if USER_MIN_SL is not properly set you can have an infinite loop here */
+ if (str && !tsol_label_is_in_user_range (str))
+ char *p; /* code from update_workspace_property */
+ p = strrchr (key, '_');
+ if (g_ascii_isdigit (*p))
+ i -= 1; /* count from 0 not 1 */
+ if (i >= MAX_REASONABLE_WORKSPACES)
+ meta_topic (META_DEBUG_PREFS,
+ "%s key %d is too highly numbered, ignoring\n",
+ "trusted workspace label", i);
+ role_key = gconf_key_for_workspace_role (i);
+ name = gconf_client_get_string (default_client, role_key, &err);
+ char *min_role_label = NULL;
+ if (!tsol_label_is_in_role_range (str, name, min_role_label))
+ meta_prefs_change_workspace_label (i, min_role_label);
+ meta_prefs_change_workspace_label (i, tsol_label_get_min ());
+ meta_prefs_change_workspace_label (i, tsol_label_get_min ());
+ if (update_workspace_property (workspace_labels,"Workspace Label", key, str))
+ queue_changed (META_PREF_WORKSPACE_LABELS);
+ else if (g_str_has_prefix (key, KEY_WORKSPACE_ROLE_PREFIX))
+ if (!tsol_use_trusted_extensions ())
+ if (value && value->type != GCONF_VALUE_STRING)
+ meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
+ str = value ? gconf_value_get_string (value) : NULL;
+ if (update_workspace_property (workspace_roles ,"Workspace roles", key, str))
+ queue_changed (META_PREF_WORKSPACE_ROLES);
meta_topic (META_DEBUG_PREFS, "Key %s doesn't mean anything to Metacity\n",
@@ -1750,6 +1908,15 @@ meta_preference_to_string (MetaPreferenc
case META_PREF_COMPOSITING_MANAGER:
return "COMPOSITING_MANAGER";
+ case META_PREF_WORKSPACE_LABELS:
+ return "WORKSPACE_LABELS";
+ case META_PREF_WORKSPACE_ROLES:
+ return "WORKSPACE_ROLES";
case META_PREF_RESIZE_WITH_RIGHT_BUTTON:
return "RESIZE_WITH_RIGHT_BUTTON";
@@ -1941,6 +2108,53 @@ init_commands (void)
+static void init_labels_roles_workspaces (void)
+ if (!tsol_use_trusted_extensions ())
+ while (i < MAX_REASONABLE_WORKSPACES)
+ char *label_key, *role_key;
+ label_key = gconf_key_for_workspace_label (i);
+ str_val = gconf_client_get_string (default_client, label_key, &err);
+ update_workspace_property (workspace_labels,"Workspace Label",
+ role_key = gconf_key_for_workspace_role (i);
+ str_val = gconf_client_get_string (default_client, role_key, &err);
+ update_workspace_property (workspace_roles ,"Workspace roles",
init_workspace_names (void)
@@ -2418,6 +2632,72 @@ meta_prefs_get_gconf_key_for_terminal_co
+update_workspace_property (char **property,
+ char *error_property_name,
+ if (!tsol_use_trusted_extensions ())
+ p = strrchr (name, '_');
+ meta_topic (META_DEBUG_PREFS,
+ "%s name %s has no underscore?\n", error_property_name, name);
+ if (!g_ascii_isdigit (*p))
+ meta_topic (META_DEBUG_PREFS,
+ "%s name %s doesn't end in number?\n",
+ error_property_name, name);
+ i -= 1; /* count from 0 not 1 */
+ if (i >= MAX_REASONABLE_WORKSPACES)
+ meta_topic (META_DEBUG_PREFS,
+ "%s name %d is too highly numbered, ignoring\n",
+ error_property_name, i);
+ if (property[i] && value && strcmp (property[i], value) == 0)
+ meta_topic (META_DEBUG_PREFS,
+ "%s name %d is unchanged\n", error_property_name, i);
+ if (value != NULL && *value != '\0')
+ property[i] = g_strdup (value);
update_workspace_name (const char *name,
@@ -2495,6 +2775,152 @@ update_workspace_name (const char *name
+const char* meta_prefs_get_workspace_label (int i)
+ g_return_val_if_fail (i >= 0 && i < MAX_REASONABLE_WORKSPACES, NULL);
+ if (!tsol_use_trusted_extensions ())
+ return workspace_labels [i];
+meta_prefs_change_workspace_label (int i,
+ g_return_if_fail (i >= 0 && i < MAX_REASONABLE_WORKSPACES);
+ if (!tsol_use_trusted_extensions ())
+ meta_topic (META_DEBUG_PREFS,
+ "Changing name of workspace_labels %d to %s\n",
+ i, name ? name : "none");
+ /* This is a bad hack. We have to treat empty string as
+ * "unset" because the root window property can't contain
+ * null. So it gets empty string instead and we don't want
+ * that to result in setting the empty string as a value that
+ if (name && *name == '\0')
+ if ((name == NULL && workspace_labels [i] == NULL) ||
+ (name && workspace_labels[i] && strcmp (name, workspace_labels[i]) == 0))
+ meta_topic (META_DEBUG_PREFS,
+ "Workspace label %d already has name %s\n",
+ i, name ? name : "none");
+ key = gconf_key_for_workspace_label (i);
+ gconf_client_set_string (default_client,
+ gconf_client_unset (default_client,
+ meta_warning (_("Error setting name for workspace label %d to \"%s\": %s\n"),
+ i, name ? name : "none",
+ update_workspace_property (workspace_labels,"Workspace Label",
+const char* meta_prefs_get_workspace_role (int i)
+ g_return_val_if_fail (i >= 0 && i < MAX_REASONABLE_WORKSPACES, NULL);
+ if (!tsol_use_trusted_extensions ())
+ return workspace_roles [i];
+void meta_prefs_change_workspace_role (int i,
+ g_return_if_fail (i >= 0 && i < MAX_REASONABLE_WORKSPACES);
+ if (!tsol_use_trusted_extensions ())
+ meta_topic (META_DEBUG_PREFS,
+ "Changing name of workspace_roles %d to %s\n",
+ i, name ? name : "none");
+ /* This is a bad hack. We have to treat empty string as
+ * "unset" because the root window property can't contain
+ * null. So it gets empty string instead and we don't want
+ * that to result in setting the empty string as a value that
+ if (name && *name == '\0')
+ if ((name == NULL && workspace_roles [i] == NULL) ||
+ (name && workspace_roles [i] && strcmp (name, workspace_roles [i]) == 0))
+ meta_topic (META_DEBUG_PREFS,
+ "Workspace role %d already has name %s\n",
+ i, name ? name : "none");
+ key = gconf_key_for_workspace_role (i);
+ gconf_client_set_string (default_client,
+ gconf_client_unset (default_client,
+ meta_warning (_("Error setting name for workspace role %d to \"%s\": %s\n"),
+ i, name ? name : "none",
meta_prefs_get_workspace_name (int i)
@@ -2570,6 +2996,29 @@ meta_prefs_change_workspace_name (int
+gconf_key_for_workspace_label (int i)
+ key = g_strdup_printf (KEY_WORKSPACE_LABEL_PREFIX"%d", i + 1);
+gconf_key_for_workspace_role (int i)
+ key = g_strdup_printf (KEY_WORKSPACE_ROLE_PREFIX"%d", i + 1);
gconf_key_for_workspace_name (int i)
#ifdef HAVE_SOLARIS_XINERAMA
@@ -573,6 +574,16 @@ meta_screen_new (MetaDisplay *display,
update_num_workspaces (screen, timestamp);
set_workspace_names (screen);
+ if (tsol_is_available ())
+ tsol_workspace_labels_atom_set (screen);
+ tsol_workspace_roles_atom_set (screen);
+ /* create a synch atom to indicate we are done setting up the
+ XInternAtom (screen->display->xdisplay, "TX_WS_SETUP_DONE", FALSE);
screen->all_keys_grabbed = FALSE;
screen->keys_grabbed = FALSE;
@@ -863,6 +874,16 @@ prefs_changed_callback (MetaPreference p
set_workspace_names (screen);
+ else if (pref == META_PREF_WORKSPACE_LABELS)
+ tsol_workspace_labels_atom_set (screen);
+ else if (pref == META_PREF_WORKSPACE_ROLES)
+ tsol_workspace_roles_atom_set (screen);
@@ -1158,6 +1179,13 @@ update_num_workspaces (MetaScreen *scree
set_number_of_spaces_hint (screen, new_num);
+ if (tsol_is_available ())
+ tsol_workspace_labels_atom_set (screen);
+ tsol_workspace_roles_atom_set (screen);
meta_screen_queue_workarea_recalc (screen);
+/* Metacity trusted image */
+ * Copyright (C) 2005 Erwann Chenede
+/* GdkPixbuf RGBA C-Source image dump */
+#pragma align 4 (label_arrows)
+static const guint8 label_arrows[] __attribute__ ((__aligned__ (4))) =
+static const guint8 label_arrows[] =
+ /* Pixbuf magic (0x47646b50) */
+ /* length: header (24) + pixel_data (400) */
+ /* pixdata_type (0x1010002) */
+ "\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"
+ "\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"
+ "\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"
+ "\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"
+ "\0\362\362\362\0\2\2\2t\362\362\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\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\2\2\2t\362\362\362^\362\362\362\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\2\2\2"
+ "t\362\362\362^\362\362\362\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\2t\362\362\362^\362\362\362\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\2\2\2t\362\362\362"
+ "^\362\362\362\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\2t\362\362\362^\362\362\362\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\2\2\2t\362\362\362^\362\362\362\0"
+/*GdkPixbuf RGBA C-Source image dump */
+#pragma align 4 (title_gradient)
+static const guint8 title_gradient[] __attribute__ ((__aligned__ (4))) =
+static const guint8 title_gradient[] =
+ /* Pixbuf magic (0x47646b50) */
+ /* length: header (24) + pixel_data (360) */
+ /* pixdata_type (0x1010002) */
+ "\337\337\337\11\337\337\337\11\337\337\337\11\337\337\337\11\337\337"
+ "\337\11\337\337\337\11\337\337\337\11\337\337\337\11\337\337\337\11\337"
+ "\337\337\11\364\364\364\32\364\364\364\32\364\364\364\32\364\364\364"
+ "\32\364\364\364\32\364\364\364\32\364\364\364\32\364\364\364\32\364\364"
+ "\364\32\364\364\364\32\360\360\3600\360\360\3600\360\360\3600\360\360"
+ "\3600\360\360\3600\360\360\3600\360\360\3600\360\360\3600\360\360\360"
+ "0\360\360\3600\357\357\357E\357\357\357E\357\357\357E\357\357\357E\357"
+ "\357\357E\357\357\357E\357\357\357E\357\357\357E\357\357\357E\357\357"
+ "\357E\356\356\356X\356\356\356X\356\356\356X\356\356\356X\356\356\356"
+ "X\356\356\356X\356\356\356X\356\356\356X\356\356\356X\356\356\356X\356"
+ "\356\356k\356\356\356k\356\356\356k\356\356\356k\356\356\356k\356\356"
+ "\356k\356\356\356k\356\356\356k\356\356\356k\356\356\356k\357\357\357"
+ "}\357\357\357}\357\357\357}\357\357\357}\357\357\357}\357\357\357}\357"
+ "\357\357}\357\357\357}\357\357\357}\357\357\357}\360\360\360\212\360"
+ "\360\360\212\360\360\360\212\360\360\360\212\360\360\360\212\360\360"
+ "\360\212\360\360\360\212\360\360\360\212\360\360\360\212\360\360\360"
+ "\212\266\266\266J\266\266\266J\266\266\266J\266\266\266J\266\266\266"
+ "J\266\266\266J\266\266\266J\266\266\266J\266\266\266J\266\266\266J"};
+/* GdkPixbuf RGBA C-Source image dump */
+#pragma align 4 (title_center_dimple)
+static const guint8 title_center_dimple[] __attribute__ ((__aligned__ (4))) =
+static const guint8 title_center_dimple[] =
+ /* Pixbuf magic (0x47646b50) */
+ /* length: header (24) + pixel_data (76) */
+ /* pixdata_type (0x1010002) */
+ "QQQ\377RRR\377UUU\377YYY\377]]]\377bbb\377hhh\377nnn\377sss\377zzz\377"
+ "\200\200\200\377\205\205\205\377\212\212\212\377\216\216\216\377\222"
+ "\222\222\377\225\225\225\377\227\227\227\377\230\230\230\377\231\231"
+/* GdkPixbuf RGBA C-Source image dump */
+#pragma align 4 (title_left_dimple)
+static const guint8 title_left_dimple[] __attribute__ ((__aligned__ (4))) =
+static const guint8 title_left_dimple[] =
+ /* Pixbuf magic (0x47646b50) */
+ /* length: header (24) + pixel_data (1444) */
+ /* pixdata_type (0x1010002) */
+ "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377"
+ "\0NNNEMMM\231MMM\314MMM\374MMM\377NNN\377NNN\377OOO\377PPP\377PPP\377"
+ "PPP\377QQQ\377QQQ\377QQQ\377\377\377\377\0\377\377\377\0\377\377\377"
+ "\0OOO$MMM\300MMM\377LLL\377LLL\377MMM\377MMM\377NNN\377OOO\377PPP\377"
+ "PPP\377QQQ\377RRR\377RRR\377RRR\377RRR\377\377\377\377\0\377\377\377"
+ "\0OOO<MMM\355LLL\377LLL\377LLL\377MMM\377MMM\377OOO\377PPP\377QQQ\377"
+ "RRR\377SSS\377SSS\377TTT\377TTT\377TTT\377UUU\377\377\377\377\0PPP$N"
+ "NN\355MMM\377LLL\377MMM\377MMM\377NNN\377OOO\377QQQ\377RRR\377TTT\377"
+ "UUU\377VVV\377WWW\377XXX\377XXX\377XXX\377YYY\377\377\377\377\0OOO\300"
+ "NNN\377MMM\377MMM\377NNN\377OOO\377PPP\377RRR\377TTT\377VVV\377XXX\377"
+ "YYY\377ZZZ\377[[[\377\\\\\\\377]]]\377]]]\377]]]\377RRRBPPP\377OOO\377"
+ "OOO\377OOO\377PPP\377RRR\377TTT\377VVV\377XXX\377ZZZ\377\\\\\\\377^^"
+ "^\377```\377```\377aaa\377aaa\377bbb\377bbb\377SSS\226QQQ\377QQQ\377"
+ "QQQ\377RRR\377TTT\377VVV\377XXX\377ZZZ\377]]]\377___\377aaa\377ccc\377"
+ "eee\377fff\377ggg\377ggg\377ggg\377ggg\377TTT\333SSS\377SSS\377TTT\377"
+ "VVV\377WWW\377ZZZ\377]]]\377___\377bbb\377eee\377ggg\377iii\377kkk\377"
+ "lll\377lll\377mmm\377mmm\377mmm\377WWW\371VVV\377VVV\377XXX\377ZZZ\377"
+ "\\\\\\\377___\377bbb\377eee\377hhh\377kkk\377mmm\377ooo\377qqq\377rr"
+ "r\377sss\377sss\377sss\377sss\377ZZZ\377YYY\377ZZZ\377\\\\\\\377^^^\377"
+ "aaa\377ddd\377ggg\377kkk\377nnn\377ppp\377sss\377uuu\377www\377xxx\377"
+ "yyy\377yyy\377zzz\377zzz\377]]]\366]]]\377^^^\377aaa\377ccc\377fff\377"
+ "iii\377mmm\377ppp\377ttt\377www\377yyy\377|||\377}}}\377~~~\377\177\177"
+ "\177\377\177\177\177\377\177\177\177\377\177\177\177\377aaa\333aaa\377"
+ "ccc\377eee\377hhh\377kkk\377ooo\377rrr\377vvv\377yyy\377|||\377\177\177"
+ "\177\377\200\200\200\377\202\202\202\377\203\203\203\377\204\204\204"
+ "\377\204\204\204\377\205\205\205\377\205\205\205\377eee\245eee\377gg"
+ "g\377jjj\377mmm\377ppp\377ttt\377xxx\377{{{\377~~~\377\201\201\201\377"
+ "\203\203\203\377\205\205\205\377\207\207\207\377\210\210\210\377\211"
+ "\211\211\377\211\211\211\377\212\212\212\377\212\212\212\377iiiNjjj\377"
+ "lll\377ooo\377rrr\377uuu\377yyy\377}}}\377\177\177\177\377\202\202\202"
+ "\377\205\205\205\377\210\210\210\377\212\212\212\377\213\213\213\377"
+ "\214\214\214\377\215\215\215\377\215\215\215\377\216\216\216\377\216"
+ "\216\216\377lll\3nnn\317ppp\377sss\377vvv\377zzz\377}}}\377\200\200\200"
+ "\377\203\203\203\377\206\206\206\377\211\211\211\377\213\213\213\377"
+ "\215\215\215\377\217\217\217\377\220\220\220\377\220\220\220\377\221"
+ "\221\221\377\221\221\221\377\222\222\222\377\377\377\377\0rrr-ttt\363"
+ "www\377zzz\377}}}\377\200\200\200\377\203\203\203\377\207\207\207\377"
+ "\212\212\212\377\214\214\214\377\216\216\216\377\220\220\220\377\222"
+ "\222\222\377\223\223\223\377\223\223\223\377\224\224\224\377\224\224"
+ "\224\377\224\224\224\377\377\377\377\0\377\377\377\0xxxKzzz\366}}}\377"
+ "\200\200\200\377\203\203\203\377\207\207\207\377\212\212\212\377\214"
+ "\214\214\377\216\216\216\377\221\221\221\377\223\223\223\377\224\224"
+ "\224\377\225\225\225\377\226\226\226\377\226\226\226\377\226\226\226"
+ "\377\226\226\226\377\377\377\377\0\377\377\377\0\377\377\377\0}}}-\200"
+ "\200\200\317\203\203\203\377\206\206\206\377\211\211\211\377\213\213"
+ "\213\377\216\216\216\377\220\220\220\377\223\223\223\377\224\224\224"
+ "\377\226\226\226\377\226\226\226\377\227\227\227\377\230\230\230\377"
+ "\230\230\230\377\230\230\230\377\377\377\377\0\377\377\377\0\377\377"
+ "\377\0\377\377\377\0\377\377\377\0\205\205\205T\210\210\210\256\212\212"
+ "\212\355\215\215\215\377\217\217\217\377\222\222\222\377\223\223\223"
+ "\377\225\225\225\377\226\226\226\377\230\230\230\377\230\230\230\377"
+ "\231\231\231\377\231\231\231\377\231\231\231\377"};
+/* GdkPixbuf RGBA C-Source image dump */
+#pragma align 4 (title_right_dimple)
+static const guint8 title_right_dimple[] __attribute__ ((__aligned__ (4))) =
+static const guint8 title_right_dimple[] =
+ /* Pixbuf magic (0x47646b50) */
+ /* length: header (24) + pixel_data (1444) */
+ /* pixdata_type (0x1010002) */
+ "QQQ\377QQQ\377RRR\377RRR\377SSS\377SSS\377TTT\377VVV\377XXX\377ZZZ\377"
+ "\\\\\\\377___\314bbb\231eeeE\377\377\377\0\377\377\377\0\377\377\377"
+ "\0\377\377\377\0\377\377\377\0SSS\377SSS\377SSS\377SSS\377TTT\377TTT"
+ "\377VVV\377WWW\377YYY\377[[[\377^^^\377aaa\377ddd\377ggg\377jjj\300n"
+ "nn$\377\377\377\0\377\377\377\0\377\377\377\0UUU\377UUU\377UUU\377VV"
+ "V\377VVV\377WWW\377XXX\377ZZZ\377[[[\377^^^\377```\377ccc\377fff\377"
+ "iii\377lll\377ppp\355sss<\377\377\377\0\377\377\377\0YYY\377YYY\377Y"
+ "YY\377YYY\377ZZZ\377[[[\377\\\\\\\377]]]\377___\377aaa\377ddd\377ggg"
+ "\377iii\377mmm\377ppp\377sss\377vvv\355yyy$\377\377\377\0]]]\377]]]\377"
+ "]]]\377^^^\377^^^\377___\377```\377bbb\377ccc\377eee\377hhh\377kkk\377"
+ "nnn\377qqq\377ttt\377www\377zzz\377}}}\300\377\377\377\0bbb\377bbb\377"
+ "bbb\377ccc\377ccc\377ddd\377eee\377ggg\377hhh\377kkk\377mmm\377ppp\377"
+ "sss\377vvv\377yyy\377|||\377~~~\377\200\200\200\377\202\202\202Bhhh\377"
+ "hhh\377hhh\377hhh\377iii\377iii\377kkk\377lll\377nnn\377ppp\377sss\377"
+ "uuu\377xxx\377{{{\377}}}\377\200\200\200\377\202\202\202\377\204\204"
+ "\204\377\205\205\205\226nnn\377nnn\377nnn\377nnn\377ooo\377ooo\377pp"
+ "p\377rrr\377ttt\377vvv\377yyy\377{{{\377}}}\377\200\200\200\377\202\202"
+ "\202\377\205\205\205\377\207\207\207\377\210\210\210\377\211\211\211"
+ "\333ttt\377ttt\377ttt\377ttt\377uuu\377vvv\377www\377yyy\377zzz\377|"
+ "||\377~~~\377\200\200\200\377\203\203\203\377\205\205\205\377\210\210"
+ "\210\377\212\212\212\377\213\213\213\377\214\214\214\377\215\215\215"
+ "\371zzz\377zzz\377zzz\377{{{\377{{{\377|||\377}}}\377\177\177\177\377"
+ "\200\200\200\377\202\202\202\377\204\204\204\377\206\206\206\377\210"
+ "\210\210\377\213\213\213\377\215\215\215\377\216\216\216\377\220\220"
+ "\220\377\220\220\220\377\221\221\221\377\200\200\200\377\200\200\200"
+ "\377\200\200\200\377\200\200\200\377\201\201\201\377\202\202\202\377"
+ "\203\203\203\377\204\204\204\377\206\206\206\377\210\210\210\377\212"
+ "\212\212\377\214\214\214\377\216\216\216\377\220\220\220\377\222\222"
+ "\222\377\223\223\223\377\224\224\224\377\224\224\224\377\224\224\224"
+ "\371\205\205\205\377\205\205\205\377\205\205\205\377\206\206\206\377"
+ "\206\206\206\377\207\207\207\377\210\210\210\377\212\212\212\377\213"
+ "\213\213\377\215\215\215\377\217\217\217\377\221\221\221\377\223\223"
+ "\223\377\225\225\225\377\226\226\226\377\227\227\227\377\230\230\230"
+ "\377\230\230\230\377\227\227\227\336\212\212\212\377\212\212\212\377"
+ "\212\212\212\377\213\213\213\377\213\213\213\377\214\214\214\377\215"
+ "\215\215\377\216\216\216\377\220\220\220\377\222\222\222\377\224\224"
+ "\224\377\225\225\225\377\227\227\227\377\231\231\231\377\232\232\232"
+ "\377\232\232\232\377\233\233\233\377\232\232\232\377\231\231\231\245"
+ "\216\216\216\377\216\216\216\377\216\216\216\377\217\217\217\377\220"
+ "\220\220\377\220\220\220\377\222\222\222\377\223\223\223\377\225\225"
+ "\225\377\226\226\226\377\230\230\230\377\232\232\232\377\233\233\233"
+ "\377\234\234\234\377\235\235\235\377\235\235\235\377\235\235\235\377"
+ "\234\234\234\377\233\233\233N\222\222\222\377\222\222\222\377\222\222"
+ "\222\377\223\223\223\377\223\223\223\377\224\224\224\377\225\225\225"
+ "\377\226\226\226\377\230\230\230\377\232\232\232\377\233\233\233\377"
+ "\235\235\235\377\236\236\236\377\236\236\236\377\237\237\237\377\237"
+ "\237\237\377\236\236\236\377\235\235\235\317\234\234\234\3\225\225\225"
+ "\377\225\225\225\377\225\225\225\377\226\226\226\377\226\226\226\377"
+ "\227\227\227\377\230\230\230\377\232\232\232\377\233\233\233\377\234"
+ "\234\234\377\235\235\235\377\236\236\236\377\240\240\240\377\240\240"
+ "\240\377\240\240\240\377\240\240\240\377\237\237\237\363\236\236\236"
+ "-\377\377\377\0\227\227\227\377\227\227\227\377\230\230\230\377\230\230"
+ "\230\377\230\230\230\377\231\231\231\377\232\232\232\377\233\233\233"
+ "\377\235\235\235\377\236\236\236\377\237\237\237\377\240\240\240\377"
+ "\240\240\240\377\241\241\241\377\241\241\241\377\240\240\240\366\237"
+ "\237\237K\377\377\377\0\377\377\377\0\231\231\231\377\231\231\231\377"
+ "\231\231\231\377\232\232\232\377\232\232\232\377\233\233\233\377\234"
+ "\234\234\377\235\235\235\377\236\236\236\377\236\236\236\377\240\240"
+ "\240\377\240\240\240\377\241\241\241\377\241\241\241\377\240\240\240"
+ "\317\240\240\240-\377\377\377\0\377\377\377\0\377\377\377\0\232\232\232"
+ "\377\232\232\232\377\232\232\232\377\232\232\232\377\233\233\233\377"
+ "\233\233\233\377\234\234\234\377\235\235\235\377\236\236\236\377\236"
+ "\236\236\377\237\237\237\377\240\240\240\355\240\240\240\256\240\240"
+ "\240T\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377"
+/* GdkPixbuf RGBA C-Source image dump */
+#pragma align 4 (shield)
+static const guint8 shield[] __attribute__ ((__aligned__ (4))) =
+static const guint8 shield[] =
+ /* Pixbuf magic (0x47646b50) */
+ /* length: header (24) + pixel_data (4096) */
+ /* pixdata_type (0x1010002) */
+ "\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"
+ "\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"
+ "\17\377\341d\276\375\321D\217\377\362\270\3\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\0\0\0\0\0\0\377\340\204\3"
+ "\377\341\201\6\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\0\377\351z\271\377"
+ "\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"
+ "\0\0\0\0\0\0\0\0\377\373\327\3\377\351{P\377\341d\333\377\336Z\377\377"
+ "\334T\377\377\327F\275\377\333[4\377\377\377\1\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\376\1\376\311.1\371\271\13\273\343"
+ "\252.\264\377\377\376\0\0\0\0\0\0\0\0\0\377\370\305\13\377\352y\365\377"
+ "\353{\377\377\354\200\373\377\356\210\310\377\360\214\217\377\360\217"
+ "k\377\361\221X\377\360\217S\377\355\211j\377\354\201\230\377\352w\337"
+ "\377\345m\377\377\344f\377\377\340_\377\377\335W\377\377\334Q\377\377"
+ "\332I\375\377\327H\317\377\327I\215\377\326Fd\377\321\77R\377\317;Z\377"
+ "\
314.p\377\310\"\230\376\301\27\325\375\273\6\376\373\267\0\377\337\241"
+ "\32\363\374\354\315\14\0\0\0\0\0\0\0\0\377\360\2238\377\353~\377\377"
+ "\356\203\377\377\357\210\377\377\360\213\377\377\360\215\377\377\360"
+ "\215\377\377\360\214\377\377\360\211\377\377\356\205\377\377\354\177"
+ "\377\377\352y\377\377\351s\377\377\345l\377\377\343d\377\377\337]\377"
+ "\377\335V\377\377\333N\377\377\330G\377\377\324\77\377\377\3227\377\377"
+ "\315/\377\377\311'\377\377\307\37\377\377\305\27\377\377\277\17\377\375"
+ "\273\10\377\375\271\1\377\342\240\4\377\346\276\2055\0\0\0\0\0\0\0\0"
+ "\377\357\215c\377\356\204\377\377\360\213\377\377\361\220\377\377\363"
+ "\224\377\377\363\227\377\377\364\227\377\377\363\225\377\377\362\221"
+ "\377\377\360\214\377\377\357\206\377\377\354\177\377\377\352x\377\377"
+ "\350q\377\377\344i\377\377\342b\377\377\336Z\377\377\334R\377\377\332"
+ "J\377\377\325B\377\377\323:\377\377\3171\377\377\312)\377\377\310!\377"
+ "\377\306\31\377\377\301\21\377\375\274\12\377\375\271\2\377\357\255\0"
+ "\377\311\227Sb\0\0\0\0\0\0\0\0\377\360\214\204\377\360\211\377\377\361"
+ "\221\377\377\364\227\377\377\365\235\377\377\366\241\377\377\366\241"
+ "\377\377\365\236\377\377\364\231\377\377\362\223\377\377\360\214\377"
+ "\377\356\204\377\377\353|\377\376\334U\377\376\3161\377\377\347t\377"
+ "\377\342g\377\377\335T\377\377\333L\377\377\326D\377\377\323<\377\377"
+ "\3213\377\377\312+\377\377\310#\377\377\306\33\377\377\302\22\377\376"
+ "\274\13\377\376\272\3\377\370\264\0\377\301\213:\201\0\0\0\0\0\0\0\0"
+ "\377\360\215\234\377\360\215\377\377\363\226\377\377\365\237\377\377"
+ "\363\232\377\377\346v\377\377\347y\377\377\343m\377\376\337d\377\376"
+ "\342h\377\376\334W\377\376\322>\377\376\3175\377\376\331L\377\377\345"
+ "k\377\377\347r\377\377\353\205\377\377\355\212\377\377\352~\377\377\337"
+ "\\\377\377\327G\377\377\3239\377\377\314.\377\377\312'\377\377\310\40"
+ "\377\377\303\23\377\376\275\14\377\376\272\4\377\371\266\0\377\304\213"
+ "/\227\0\0\0\0\0\0\0\0\376\356\211\254\377\360\216\377\377\365\236\377"
+ "\377\370\255\377\377\360\222\377\377\354\206\377\377\363\235\377\377"
+ "\362\231\377\377\357\217\377\377\353\200\377\377\354\201\377\377\357"
+ "\210\377\377\354\200\377\377\352x\377\377\347o\377\377\344g\377\377\340"
+ "_\377\377\335V\377\377\334P\377\377\331L\377\377\325B\377\377\324;\377"
+ "\377\315/\377\377\321=\377\377\332S\377\377\303\23\377\376\275\14\377"
+ "\376\272\4\377\372\266\0\377\305\213+\253\0\0\0\0\0\0\0\0\375\353\204"
+ "\254\377\360\216\377\377\366\244\377\377\370\263\377\377\355\213\377"
+ "\377\360\224\377\377\370\252\377\377\367\246\377\377\365\237\377\377"
+ "\364\227\377\377\361\217\377\377\357\207\377\377\354\177\377\377\352"
+ "w\377\377\346o\377\377\344f\377\377\337^\377\377\335V\377\377\333M\377"
+ "\377\327E\377\377\323=\377\377\3225\377\377\313,\377\377\311$\377\377"
+ "\343n\377\377\303\23\377\376\275\14\377\376\272\4\377\371\266\0\377\275"
+ "\203'\254\0\0\0\0\0\0\0\0\375\352\201\254\377\360\212\377\377\366\242"
+ "\377\377\371\263\377\377\350\200\377\377\362\230\377\377\366\241\377"
+ "\377\365\236\377\377\364\231\377\377\362\223\377\377\360\214\377\377"
+ "\356\204\377\377\353|\377\377\352t\377\377\345m\377\377\343d\377\377"
+ "\336\\\377\377\335T\377\377\333L\377\377\326D\377\377\323<\377\377\321"
+ "3\377\377\312+\377\377\310#\377\377\342m\377\377\302\22\377\376\274\13"
+ "\377\376\272\3\377\370\265\0\377\274\202)\254\0\0\0\0\0\0\0\0\377\353"
+ "\205\245\377\356\204\377\377\364\233\377\377\371\261\377\377\343r\377"
+ "\377\365\241\377\377\364\227\377\377\363\225\377\377\362\221\377\377"
+ "\360\214\377\377\357\206\377\377\354\177\377\377\352x\377\377\350q\377"
+ "\377\344i\377\377\342a\377\377\336Y\377\377\334R\377\377\332J\377\377"
+ "\325B\377\377\323:\377\377\3202\377\377\312)\377\377\310!\377\377\344"
+ "r\377\377\301\22\377\375\274\12\377\375\271\2\377\367\264\0\377\263|"
+ "*\234\0\0\0\0\0\0\0\0\376\353\201\216\377\353~\377\377\362\223\377\377"
+ "\371\260\377\377\351\203\377\377\360\217\377\377\360\216\377\377\360"
+ "\214\377\377\360\211\377\377\356\204\377\377\354\177\377\377\352y\377"
+ "\377\351s\377\377\345l\377\377\343e\377\377\337]\377\377\335V\377\377"
+ "\333N\377\377\330G\377\377\324\77\377\377\3227\377\377\315/\377\377\311"
+ "'\377\377\307\37\377\377\347{\377\376\277\17\377\375\273\10\377\375\271"
+ "\1\377\363\260\0\377\251t2\210\0\0\0\0\0\0\0\0\376\351}p\377\352v\377"
+ "\377\357\214\377\377\370\257\377\377\360\227\377\377\353\202\377\377"
+ "\356\205\377\377\355\202\377\377\354\200\377\377\353|\377\377\352w\377"
+ "\377\351r\377\377\345l\377\377\344f\377\377\340`\377\377\336Y\377\377"
+ "\334Q\377\377\332J\377\377\325C\377\377\323;\377\377\3213\377\377\313"
+ ",\377\377\310$\377\377\307\35\377\377\345v\377\376\275\15\377\375\272"
+ "\6\377\373\267\0\377\343\243\1\377\255z@i\0\0\0\0\0\0\0\0\376\350\177"
+ "F\377\346n\377\377\354\202\377\377\370\253\377\377\366\252\377\377\336"
+ "\\\377\377\353}\377\377\352y\377\377\352v\377\377\351s\377\377\347o\377"
+ "\377\345k\377\377\343e\377\377\340`\377\377\336Y\377\377\334S\377\377"
+ "\333L\377\377\327E\377\377\324>\377\377\3227\377\377\315/\377\377\311"
+ "(\377\377\310\40\377\377\315.\377\377\327S\377\375\274\12\377\376\272"
+ "\2\377\370\265\0\377\313\215\2\377\316\235b\77\0\0\0\0\0\0\0\0\377\361"
+ "\244\26\376\343f\374\377\350s\377\377\365\240\377\377\371\257\377\377"
+ "\331P\377\377\352x\377\377\346o\377\377\346m\377\377\345j\377\377\344"
+ "g\377\377\342c\377\377\337^\377\377\336X\377\377\334S\377\377\333M\377"
+ "\377\327F\377\377\324\77\377\377\3239\377\377\3202\377\377\312+\377\377"
+ "\310#\377\377\306\34\377\377\333U\377\376\310+\377\375\273\7\377\374"
+ "\270\0\377\365\262\0\377\275\201\16\370\364\333\264\22\0\0\0\0\0\0\0"
+ "\0\377\377\377\1\376\340e\320\377\342d\377\377\357\213\377\377\366\244"
+ "\377\377\336^\377\377\343f\377\377\343e\377\377\342c\377\377\341a\377"
+ "\377\337^\377\377\336Z\377\377\335V\377\377\334Q\377\377\333L\377\377"
+ "\327F\377\377\324@\377\377\3239\377\377\3203\377\377\313,\377\377\311"
+ "%\377\377\307\36\377\377\305\27\377\377\340h\377\375\274\12\377\376\272"
+ "\2\377\371\265\0\377\361\260\0\377\256x\40\311\377\377\376\1\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\376\336a\205\377\335W\377\377\347s\377\377\362\223\377"
+ "\377\354\202\377\377\322:\377\377\336\\\377\377\336Z\377\377\335X\377"
+ "\377\335U\377\377\334Q\377\377\333M\377\377\331I\377\377\326D\377\377"
+ "\324\77\377\377\3239\377\377\3203\377\377\313-\377\377\311&\377\377\307"
+ "\40\377\377\306\31\377\377\310\"\377\376\332Z\377\375\272\5\377\373\267"
+ "\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"
+ "\0\0\377\344u/\376\332N\376\377\337\\\377\377\353|\377\377\355\203\377"
+ "\376\3204\377\377\333P\377\377\334P\377\377\333N\377\377\333K\377\377"
+ "\331H\377\377\326D\377\377\324@\377\377\323<\377\377\3227\377\377\317"
+ "1\377\377\313,\377\377\311&\377\377\307\40\377\377\306\31\377\377\303"
+ "\23\377\377\336d\377\375\305\"\377\375\271\1\377\366\264\0\377\357\257"
+ "\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"
+ "\1\376\330N\307\377\331J\377\377\342c\377\377\347q\377\377\333R\377\376"
+ "\316-\377\377\330F\377\377\326D\377\377\325B\377\377\324\77\377\377\323"
+ "<\377\377\3228\377\377\3214\377\377\315/\377\377\312*\377\377\311%\377"
+ "\377\307\37\377\377\306\31\377\377\303\23\377\376\306&\377\376\336g\377"
+ "\375\271\1\377\370\265\0\377\361\260\0\377\351\251\0\377\241l\40\300"
+ "\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"
+ "\323=\377\377\331K\377\377\337]\377\377\335X\377\376\307\37\377\377\321"
+ "6\377\377\323;\377\377\3239\377\377\3226\377\377\3203\377\377\316/\377"
+ "\377\312+\377\377\311'\377\377\310\"\377\377\307\35\377\377\305\30\377"
+ "\377\302\22\377\376\275\16\377\377\344v\377\376\277\22\377\371\265\0"
+ "\377\362\261\0\377\353\253\0\377\301\203\2\377\256\177LP\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\365\311\4\376\322=\321\377\322"
+ "8\377\377\327F\377\377\331J\377\377\3218\377\376\304\27\377\377\3171"
+ "\377\377\315/\377\377\313-\377\377\312*\377\377\311&\377\377\310#\377"
+ "\377\307\36\377\377\306\32\377\377\304\25\377\377\300\20\377\376\275"
+ "\14\377\376\324M\377\375\320A\377\370\265\0\377\362\261\0\377\354\254"
+ "\0\377\344\242\0\377\236i\34\312\374\363\335\3\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\325UJ\377\312+\376\377\3161\377"
+ "\377\3229\377\377\3204\377\376\306\40\377\376\304\31\377\377\311%\377"
+ "\377\310#\377\377\310\40\377\377\307\35\377\377\306\32\377\377\304\26"
+ "\377\377\301\22\377\376\276\16\377\375\273\12\377\376\311.\377\375\337"
+ "k\377\367\264\0\377\361\260\0\377\353\253\0\377\345\243\0\377\264x\5"
+ "\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"
+ "\0\0\0\0\0\0\377\375\362\1\376\315<\263\377\310\"\377\377\311'\377\377"
+ "\311'\377\377\310\"\377\376\302\22\377\376\304\26\377\377\306\32\377"
+ "\377\305\27\377\377\304\24\377\377\301\21\377\376\276\16\377\375\274"
+ "\13\377\375\273\6\377\376\302\32\377\375\344x\377\365\265\6\377\360\257"
+ "\0\377\352\252\0\377\344\242\0\377\322\222\0\377\230f)\236\377\377\372"
+ "\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"
+ "\0\0\0\376\334\206\40\374\305%\355\377\305\30\377\377\306\32\377\377"
+ "\305\30\377\377\303\24\377\376\302\22\377\376\302\21\377\376\276\17\377"
+ "\376\274\14\377\375\273\11\377\375\272\6\377\375\271\2\377\374\304\40"
+ "\377\374\344z\377\363\267\16\377\355\255\0\377\350\247\0\377\343\241"
+ "\0\377\334\233\0\377\233d\24\334\340\275\215\21\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\0\0\0\0\0\0\0\0\0\0\365"
+ "\307[Q\371\272\24\374\376\275\16\377\376\275\16\377\376\274\14\377\375"
+ "\274\12\377\375\276\13\377\376\304\30\377\375\273\5\377\375\270\1\377"
+ "\372\266\0\377\372\306-\377\373\341v\377\357\262\11\377\352\251\0\377"
+ "\345\243\0\377\340\236\0\377\333\233\0\377\244l\12\364\267\213X5\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\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\376\0\353\270Lz\370\265\10\377\375\272"
+ "\3\377\375\271\2\377\375\271\1\377\374\270\0\377\372\271\4\377\375\307"
+ "#\377\367\274\25\377\371\325V\377\366\327a\377\353\254\5\377\346\244"
+ "\0\377\342\237\0\377\335\234\0\377\330\231\0\377\254r\6\373\244vDT\377"
+ "\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"
+ "\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"
+ "D\215\361\257\4\377\366\263\0\377\364\262\0\377\362\261\0\377\360\257"
+ "\0\377\357\257\2\377\366\3072\377\357\2774\377\345\243\0\377\341\237"
+ "\0\377\335\234\0\377\331\231\0\377\325\226\0\377\254s\6\374\237q>b\377"
+ "\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"
+ "\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"
+ "\345\2\335\250C\206\345\245\6\376\352\252\0\377\351\250\0\377\347\245"
+ "\0\377\345\245\0\377\345\245\0\377\336\235\0\377\334\233\0\377\330\231"
+ "\0\377\325\226\0\377\321\223\0\377\246m\7\367\236p=[\377\377\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\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\0\0\0\377"
+ "\377\370\1\325\242Lg\331\230\13\370\337\236\0\377\335\234\0\377\336\235"
+ "\0\377\342\240\0\377\325\226\0\377\323\225\0\377\320\223\0\377\314\217"
+ "\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"
+ "\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"
+ "\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"
+ "\325\246`B\315\220\30\345\324\225\0\377\324\226\0\377\332\232\0\377\317"
+ "\222\0\377\316\221\0\377\277\203\1\377\225a\30\312\276\222_$\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\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\0\0\0\0"
+ "\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"
+ "\315\216\4\376\327\230\0\377\316\221\0\377\251p\7\372\227e,\211\355\321"
+ "\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"
+ "\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"
+ "\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"
+ "\0\377\375\360\1\313\230QX\272\200\32\345\231e\32\312\261\204Q7\377\377"
+ "\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"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
+GdkPixbuf *shield_pixbuf;
+/* GdkPixbuf RGBA C-Source image dump */
+#pragma align 4 (title_center_dimple_unfocused)
+static const guint8 title_center_dimple_unfocused[] __attribute__ ((__aligned__ (4))) =
+static const guint8 title_center_dimple_unfocused[] =
+ /* Pixbuf magic (0x47646b50) */
+ /* length: header (24) + pixel_data (76) */
+ /* pixdata_type (0x1010002) */
+ "\231\231\231\377\230\230\230\377\227\227\227\377\225\225\225\377\222"
+ "\222\222\377\216\216\216\377\212\212\212\377\205\205\205\377\200\200"
+ "\200\377zzz\377sss\377nnn\377hhh\377bbb\377]]]\377YYY\377UUU\377RRR\377"
+/* GdkPixbuf RGBA C-Source image dump */
+#pragma align 4 (title_left_dimple_unfocused)
+static const guint8 title_left_dimple_unfocused[] __attribute__ ((__aligned__ (4))) =
+static const guint8 title_left_dimple_unfocused[] =
+ /* Pixbuf magic (0x47646b50) */
+ /* length: header (24) + pixel_data (1444) */
+ /* pixdata_type (0x1010002) */
+ "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377"
+ "\0\205\205\205T\210\210\210\256\212\212\212\355\215\215\215\377\217\217"
+ "\217\377\222\222\222\377\223\223\223\377\225\225\225\377\226\226\226"
+ "\377\230\230\230\377\230\230\230\377\231\231\231\377\231\231\231\377"
+ "\231\231\231\377\377\377\377\0\377\377\377\0\377\377\377\0}}}-\200\200"
+ "\200\317\203\203\203\377\206\206\206\377\211\211\211\377\213\213\213"
+ "\377\216\216\216\377\220\220\220\377\223\223\223\377\224\224\224\377"
+ "\226\226\226\377\226\226\226\377\227\227\227\377\230\230\230\377\230"
+ "\230\230\377\230\230\230\377\377\377\377\0\377\377\377\0xxxKzzz\366}"
+ "}}\377\200\200\200\377\203\203\203\377\207\207\207\377\212\212\212\377"
+ "\214\214\214\377\216\216\216\377\221\221\221\377\223\223\223\377\224"
+ "\224\224\377\225\225\225\377\226\226\226\377\226\226\226\377\226\226"
+ "\226\377\226\226\226\377\377\377\377\0rrr-ttt\363www\377zzz\377}}}\377"
+ "\200\200\200\377\203\203\203\377\207\207\207\377\212\212\212\377\214"
+ "\214\214\377\216\216\216\377\220\220\220\377\222\222\222\377\223\223"
+ "\223\377\223\223\223\377\224\224\224\377\224\224\224\377\224\224\224"
+ "\377lll\3nnn\317ppp\377sss\377vvv\377zzz\377}}}\377\200\200\200\377\203"
+ "\203\203\377\206\206\206\377\211\211\211\377\213\213\213\377\215\215"
+ "\215\377\217\217\217\377\220\220\220\377\220\220\220\377\221\221\221"
+ "\377\221\221\221\377\222\222\222\377iiiNjjj\377lll\377ooo\377rrr\377"
+ "uuu\377yyy\377}}}\377\177\177\177\377\202\202\202\377\205\205\205\377"
+ "\210\210\210\377\212\212\212\377\213\213\213\377\214\214\214\377\215"
+ "\215\215\377\215\215\215\377\216\216\216\377\216\216\216\377eee\245e"
+ "ee\377ggg\377jjj\377mmm\377ppp\377ttt\377xxx\377{{{\377~~~\377\201\201"
+ "\201\377\203\203\203\377\205\205\205\377\207\207\207\377\210\210\210"
+ "\377\211\211\211\377\211\211\211\377\212\212\212\377\212\212\212\377"
+ "aaa\333aaa\377ccc\377eee\377hhh\377kkk\377ooo\377rrr\377vvv\377yyy\377"
+ "|||\377\177\177\177\377\200\200\200\377\202\202\202\377\203\203\203\377"
+ "\204\204\204\377\204\204\204\377\205\205\205\377\205\205\205\377]]]\366"
+ "]]]\377^^^\377aaa\377ccc\377fff\377iii\377mmm\377ppp\377ttt\377www\377"
+ "yyy\377|||\377}}}\377~~~\377\177\177\177\377\177\177\177\377\177\177"
+ "\177\377\177\177\177\377ZZZ\377YYY\377ZZZ\377\\\\\\\377^^^\377aaa\377"
+ "ddd\377ggg\377kkk\377nnn\377ppp\377sss\377uuu\377www\377xxx\377yyy\377"
+ "yyy\377zzz\377zzz\377WWW\371VVV\377VVV\377XXX\377ZZZ\377\\\\\\\377__"
+ "_\377bbb\377eee\377hhh\377kkk\377mmm\377ooo\377qqq\377rrr\377sss\377"
+ "sss\377sss\377sss\377TTT\333SSS\377SSS\377TTT\377VVV\377WWW\377ZZZ\377"
+ "]]]\377___\377bbb\377eee\377ggg\377iii\377kkk\377lll\377lll\377mmm\377"
+ "mmm\377mmm\377SSS\226QQQ\377QQQ\377QQQ\377RRR\377TTT\377VVV\377XXX\377"
+ "ZZZ\377]]]\377___\377aaa\377ccc\377eee\377fff\377ggg\377ggg\377ggg\377"
+ "ggg\377RRRBPPP\377OOO\377OOO\377OOO\377PPP\377RRR\377TTT\377VVV\377X"
+ "XX\377ZZZ\377\\\\\\\377^^^\377```\377```\377aaa\377aaa\377bbb\377bbb"
+ "\377\377\377\377\0OOO\300NNN\377MMM\377MMM\377NNN\377OOO\377PPP\377R"
+ "RR\377TTT\377VVV\377XXX\377YYY\377ZZZ\377[[[\377\\\\\\\377]]]\377]]]"
+ "\377]]]\377\377\377\377\0PPP$NNN\355MMM\377LLL\377MMM\377MMM\377NNN\377"
+ "OOO\377QQQ\377RRR\377TTT\377UUU\377VVV\377WWW\377XXX\377XXX\377XXX\377"
+ "YYY\377\377\377\377\0\377\377\377\0OOO<MMM\355LLL\377LLL\377LLL\377M"
+ "MM\377MMM\377OOO\377PPP\377QQQ\377RRR\377SSS\377SSS\377TTT\377TTT\377"
+ "TTT\377UUU\377\377\377\377\0\377\377\377\0\377\377\377\0OOO$MMM\300M"
+ "MM\377LLL\377LLL\377MMM\377MMM\377NNN\377OOO\377PPP\377PPP\377QQQ\377"
+ "RRR\377RRR\377RRR\377RRR\377\377\377\377\0\377\377\377\0\377\377\377"
+ "\0\377\377\377\0\377\377\377\0NNNEMMM\231MMM\314MMM\374MMM\377NNN\377"
+ "NNN\377OOO\377PPP\377PPP\377PPP\377QQQ\377QQQ\377QQQ\377"};
+/* GdkPixbuf RGBA C-Source image dump */
+#pragma align 4 (title_right_dimple_unfocused)
+static const guint8 title_right_dimple_unfocused[] __attribute__ ((__aligned__ (4))) =
+static const guint8 title_right_dimple_unfocused[] =
+ /* Pixbuf magic (0x47646b50) */
+ /* length: header (24) + pixel_data (1444) */
+ /* pixdata_type (0x1010002) */
+ "\232\232\232\377\232\232\232\377\232\232\232\377\232\232\232\377\233"
+ "\233\233\377\233\233\233\377\234\234\234\377\235\235\235\377\236\236"
+ "\236\377\236\236\236\377\237\237\237\377\240\240\240\355\240\240\240"
+ "\256\240\240\240T\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377"
+ "\0\377\377\377\0\231\231\231\377\231\231\231\377\231\231\231\377\232"
+ "\232\232\377\232\232\232\377\233\233\233\377\234\234\234\377\235\235"
+ "\235\377\236\236\236\377\236\236\236\377\240\240\240\377\240\240\240"
+ "\377\241\241\241\377\241\241\241\377\240\240\240\317\240\240\240-\377"
+ "\377\377\0\377\377\377\0\377\377\377\0\227\227\227\377\227\227\227\377"
+ "\230\230\230\377\230\230\230\377\230\230\230\377\231\231\231\377\232"
+ "\232\232\377\233\233\233\377\235\235\235\377\236\236\236\377\237\237"
+ "\237\377\240\240\240\377\240\240\240\377\241\241\241\377\241\241\241"
+ "\377\240\240\240\366\237\237\237K\377\377\377\0\377\377\377\0\225\225"
+ "\225\377\225\225\225\377\225\225\225\377\226\226\226\377\226\226\226"
+ "\377\227\227\227\377\230\230\230\377\232\232\232\377\233\233\233\377"
+ "\234\234\234\377\235\235\235\377\236\236\236\377\240\240\240\377\240"
+ "\240\240\377\240\240\240\377\240\240\240\377\237\237\237\363\236\236"
+ "\236-\377\377\377\0\222\222\222\377\222\222\222\377\222\222\222\377\223"
+ "\223\223\377\223\223\223\377\224\224\224\377\225\225\225\377\226\226"
+ "\226\377\230\230\230\377\232\232\232\377\233\233\233\377\235\235\235"
+ "\377\236\236\236\377\236\236\236\377\237\237\237\377\237\237\237\377"
+ "\236\236\236\377\235\235\235\317\234\234\234\3\216\216\216\377\216\216"
+ "\216\377\216\216\216\377\217\217\217\377\220\220\220\377\220\220\220"
+ "\377\222\222\222\377\223\223\223\377\225\225\225\377\226\226\226\377"
+ "\230\230\230\377\232\232\232\377\233\233\233\377\234\234\234\377\235"
+ "\235\235\377\235\235\235\377\235\235\235\377\234\234\234\377\233\233"
+ "\233N\212\212\212\377\212\212\212\377\212\212\212\377\213\213\213\377"
+ "\213\213\213\377\214\214\214\377\215\215\215\377\216\216\216\377\220"
+ "\220\220\377\222\222\222\377\224\224\224\377\225\225\225\377\227\227"
+ "\227\377\231\231\231\377\232\232\232\377\232\232\232\377\233\233\233"
+ "\377\232\232\232\377\231\231\231\245\205\205\205\377\205\205\205\377"
+ "\205\205\205\377\206\206\206\377\206\206\206\377\207\207\207\377\210"
+ "\210\210\377\212\212\212\377\213\213\213\377\215\215\215\377\217\217"
+ "\217\377\221\221\221\377\223\223\223\377\225\225\225\377\226\226\226"
+ "\377\227\227\227\377\230\230\230\377\230\230\230\377\227\227\227\336"
+ "\200\200\200\377\200\200\200\377\200\200\200\377\200\200\200\377\201"
+ "\201\201\377\202\202\202\377\203\203\203\377\204\204\204\377\206\206"
+ "\206\377\210\210\210\377\212\212\212\377\214\214\214\377\216\216\216"
+ "\377\220\220\220\377\222\222\222\377\223\223\223\377\224\224\224\377"
+ "\224\224\224\377\224\224\224\371zzz\377zzz\377zzz\377{{{\377{{{\377|"
+ "||\377}}}\377\177\177\177\377\200\200\200\377\202\202\202\377\204\204"
+ "\204\377\206\206\206\377\210\210\210\377\213\213\213\377\215\215\215"
+ "\377\216\216\216\377\220\220\220\377\220\220\220\377\221\221\221\377"
+ "ttt\377ttt\377ttt\377ttt\377uuu\377vvv\377www\377yyy\377zzz\377|||\377"
+ "~~~\377\200\200\200\377\203\203\203\377\205\205\205\377\210\210\210\377"
+ "\212\212\212\377\213\213\213\377\214\214\214\377\215\215\215\371nnn\377"
+ "nnn\377nnn\377nnn\377ooo\377ooo\377ppp\377rrr\377ttt\377vvv\377yyy\377"
+ "{{{\377}}}\377\200\200\200\377\202\202\202\377\205\205\205\377\207\207"
+ "\207\377\210\210\210\377\211\211\211\333hhh\377hhh\377hhh\377hhh\377"
+ "iii\377iii\377kkk\377lll\377nnn\377ppp\377sss\377uuu\377xxx\377{{{\377"
+ "}}}\377\200\200\200\377\202\202\202\377\204\204\204\377\205\205\205\226"
+ "bbb\377bbb\377bbb\377ccc\377ccc\377ddd\377eee\377ggg\377hhh\377kkk\377"
+ "mmm\377ppp\377sss\377vvv\377yyy\377|||\377~~~\377\200\200\200\377\202"
+ "\202\202B]]]\377]]]\377]]]\377^^^\377^^^\377___\377```\377bbb\377ccc"
+ "\377eee\377hhh\377kkk\377nnn\377qqq\377ttt\377www\377zzz\377}}}\300\377"
+ "\377\377\0YYY\377YYY\377YYY\377YYY\377ZZZ\377[[[\377\\\\\\\377]]]\377"
+ "___\377aaa\377ddd\377ggg\377iii\377mmm\377ppp\377sss\377vvv\355yyy$\377"
+ "\377\377\0UUU\377UUU\377UUU\377VVV\377VVV\377WWW\377XXX\377ZZZ\377[["
+ "[\377^^^\377```\377ccc\377fff\377iii\377lll\377ppp\355sss<\377\377\377"
+ "\0\377\377\377\0SSS\377SSS\377SSS\377SSS\377TTT\377TTT\377VVV\377WWW"
+ "\377YYY\377[[[\377^^^\377aaa\377ddd\377ggg\377jjj\300nnn$\377\377\377"
+ "\0\377\377\377\0\377\377\377\0QQQ\377QQQ\377RRR\377RRR\377SSS\377SSS"
+ "\377TTT\377VVV\377XXX\377ZZZ\377\\\\\\\377___\314bbb\231eeeE\377\377"
+ "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0"};
+#pragma align 4 (my_pixbuf)
+static const guint8 tabpopup_highlight[] __attribute__ ((__aligned__ (4))) =
+static const guint8 tabpopup_highlight[] =
+ /* Pixbuf magic (0x47646b50) */
+ /* length: header (24) + pixel_data (421) */
+ /* pixdata_type (0x2010002) */
+ "\246\0\0\0\0\3^^^F^^^\215^^^\307\221^^^\377\3^^^\307^^^\215^^^F\210\0"
+ "\0\0\0\3^^^\40^^^\214^^^\363\225^^^\377\3^^^\363^^^\214^^^\40\205\0\0"
+ "\0\0\2^^^\40^^^\243\231^^^\377\2^^^\243^^^\40\204\0\0\0\0\1^^^\214\233"
+ "^^^\377\1^^^\214\203\0\0\0\0\2^^^F^^^\363\233^^^\377\2^^^\363^^^F\202"
+ "\0\0\0\0\1^^^\215\235^^^\377\1^^^\215\202\0\0\0\0\1^^^\307\235^^^\377"
+ "\1^^^\307\202\0\0\0\0\1^^^\360\235^^^\377\1^^^\360\202\0\0\0\0\1^^^\360"
+ "\235^^^\377\1^^^\360\202\0\0\0\0\1^^^\307\235^^^\377\1^^^\307\202\0\0"
+ "\0\0\1^^^\215\235^^^\377\1^^^\215\202\0\0\0\0\2^^^F^^^\363\233^^^\377"
+ "\2^^^\363^^^F\203\0\0\0\0\1^^^\214\233^^^\377\1^^^\214\204\0\0\0\0\2"
+ "^^^\40^^^\243\231^^^\377\2^^^\243^^^\40\205\0\0\0\0\3^^^\40^^^\214^^"
+ "^\363\225^^^\377\3^^^\363^^^\214^^^\40\210\0\0\0\0\3^^^F^^^\215^^^\307"
+ "\221^^^\377\3^^^\307^^^\215^^^F\246\0\0\0\0"};
+#endif /*TRUSTED_PICS_H */
+ * Copyright (C) 2005 Erwann Chenede
+void * dlopen_tsol (void)
+void * dlopen_gnometsol (void)
+void * dlopen_xtsol (void)
+void * dlopen_bsm (void)
+tsol_is_multi_label_session (void)
+ static int trusted = -1;
+ if (getenv ("TRUSTED_SESSION")) {
+ return trusted ? TRUE : FALSE;
+tsol_use_trusted_extensions (void)
+ static gboolean _trusted_extensions_initialised = FALSE;
+ static gpointer tsol_handle = NULL;
+ static gpointer xtsol_handle = NULL;
+ static gpointer gnometsol_handle = NULL;
+ static gpointer bsm_handle = NULL;
+ if (!_trusted_extensions_initialised) {
+ _trusted_extensions_initialised = TRUE;
+ if (!tsol_is_multi_label_session ())
+ tsol_handle = dlopen_tsol ();
+ if (tsol_handle != NULL)
+ xtsol_handle = dlopen_xtsol ();
+ bsm_handle = dlopen_bsm ();
+ if (tsol_handle && xtsol_handle && bsm_handle) {
+ /* libbsm function (only interested in the one) */
+ libbsm_getdevicerange = (bsm_getdevicerange) dlsym (bsm_handle, "getdevicerange");
+ /* Replacement libtsol functions */
+ libtsol_label_to_str = (tsol_label_to_str) dlsym (tsol_handle, "label_to_str");
+ libtsol_str_to_label = (tsol_str_to_label) dlsym (tsol_handle, "str_to_label");
+ libtsol_m_label_free = (tsol_m_label_free) dlsym (tsol_handle, "m_label_free");
+ /* Other misc. libtsol functions */
+ libtsol_blminimum = (tsol_blminimum) dlsym (tsol_handle, "blminimum");
+ libtsol_blmaximum = (tsol_blmaximum) dlsym (tsol_handle, "blmaximum");
+ libtsol_blinrange = (tsol_blinrange) dlsym (tsol_handle, "blinrange");
+ libtsol_getuserrange = (tsol_getuserrange) dlsym (tsol_handle, "getuserrange");
+ /* libtsol_blabel_alloc = (tsol_blabel_alloc) dlsym (tsol_handle, "blabel_alloc"); */
+ libtsol_blabel_free = (tsol_blabel_free) dlsym (tsol_handle, "blabel_free");
+ /* libtsol_bsllow = (tsol_bsllow) dlsym (tsol_handle, "bsllow"); */
+ /* libtsol_bslhigh = (tsol_bslhigh) dlsym (tsol_handle, "bslhigh"); */
+ /* libXtsol functions */
+ libxtsol_XTSOLgetClientLabel = (xtsol_XTSOLgetClientLabel) dlsym (xtsol_handle,
+ "XTSOLgetClientLabel");
+ libxtsol_XTSOLIsWindowTrusted = (xtsol_XTSOLIsWindowTrusted) dlsym (xtsol_handle,
+ "XTSOLIsWindowTrusted");
+ libxtsol_XTSOLsetResLabel = (xtsol_XTSOLsetResLabel) dlsym (xtsol_handle,
+ libxtsol_XTSOLsetResUID = (xtsol_XTSOLsetResUID) dlsym (xtsol_handle,
+ libxtsol_XTSOLgetResLabel = (xtsol_XTSOLgetResLabel) dlsym (xtsol_handle,
+ libxtsol_XTSOLgetResUID = (xtsol_XTSOLgetResUID) dlsym (xtsol_handle,
+ if (libbsm_getdevicerange == NULL ||
+ /*libtsol_stobsl == NULL ||
+ libtsol_bsltos == NULL || */
+ libtsol_label_to_str == NULL ||
+ libtsol_str_to_label == NULL ||
+ libtsol_m_label_free == NULL ||
+ libtsol_blminimum == NULL ||
+ libtsol_blmaximum == NULL ||
+ libtsol_blinrange == NULL ||
+ libtsol_getuserrange == NULL ||
+ libtsol_blabel_free == NULL ||
+ /* libtsol_getdevicerange == NULL ||
+ libtsol_blabel_alloc == NULL ||
+ libtsol_bsllow == NULL ||
+ libtsol_bslhigh == NULL || */
+ libxtsol_XTSOLgetClientLabel == NULL ||
+ libxtsol_XTSOLIsWindowTrusted == NULL ||
+ libxtsol_XTSOLsetResLabel == NULL ||
+ libxtsol_XTSOLsetResUID == NULL ||
+ libxtsol_XTSOLgetResLabel == NULL ||
+ libxtsol_XTSOLgetResUID == NULL)
+ dlclose (xtsol_handle);
+ gnometsol_handle = dlopen_gnometsol ();
+ if (gnometsol_handle != NULL)
+ libgnome_tsol_constraint_image_render = (gnome_tsol_constraint_image_render) dlsym (gnometsol_handle, "gnome_tsol_constraint_image_render");
+ libgnome_tsol_constraint_image_set_border = (gnome_tsol_constraint_image_set_border) dlsym (gnometsol_handle, "gnome_tsol_constraint_image_set_border");
+ libgnome_tsol_constraint_image_set_stretch = (gnome_tsol_constraint_image_set_stretch) dlsym (gnometsol_handle, "gnome_tsol_constraint_image_set_stretch");
+ libgnome_tsol_constraint_image_colorize = (gnome_tsol_constraint_image_colorize) dlsym (gnometsol_handle, "gnome_tsol_constraint_image_colorize");
+ if (libgnome_tsol_constraint_image_render == NULL ||
+ libgnome_tsol_constraint_image_set_border == NULL ||
+ libgnome_tsol_constraint_image_set_stretch == NULL ||
+ libgnome_tsol_constraint_image_colorize == NULL)
+ gnometsol_handle = NULL;
+ return ((tsol_handle != NULL) && (xtsol_handle != NULL) && (gnometsol_handle != NULL) && (bsm_handle != NULL));
+tsol_use_xtsol_extension ()
+ static int foundxtsol = -1;
+ int major_code, first_event, first_error;
+ foundxtsol = XQueryExtension (gdk_display, "SUN_TSOL", &major_code,
+ &first_event, &first_error);
+gboolean tsol_is_available ()
+ if (tsol_use_xtsol_extension () && tsol_use_trusted_extensions ())
+MetaDrawOpList * tsol_theme_trusted_title_ops_get (MetaFrameFocus focus, MetaTheme *theme)
+ static MetaDrawOpList *op_list = NULL;
+ op_list = meta_draw_op_list_new (6);
+ /* inspired from Bluecruve title_gradient draw_ops */
+ /* background gradient */
+ op = meta_draw_op_new (META_DRAW_GRADIENT);
+ op->
data.gradient.x = meta_draw_spec_new (theme, g_strdup ("left_width"), NULL);
+ op->
data.gradient.width = meta_draw_spec_new (theme, g_strdup ("width - (left_width + right_width)"), NULL);
+ meta_gradient_spec_new (meta_gradient_type_from_string ("vertical"));
+ /* Similar to bluecurve Gradient */
+ meta_color_spec_new_from_string ("
blend/gtk:light[NORMAL]/gtk:bg[NORMAL]/0.7", error));
+ meta_color_spec_new_from_string ("
blend/gtk:light[NORMAL]/gtk:bg[NORMAL]/0.95", error));
+ meta_color_spec_new_from_string ("
blend/gtk:light[NORMAL]/gtk:bg[NORMAL]/1.0", error));
+ meta_color_spec_new_from_string ("
blend/gtk:light[NORMAL]/gtk:bg[NORMAL]/0.95", error));
+ meta_color_spec_new_from_string ("
blend/gtk:light[NORMAL]/gtk:bg[NORMAL]/0.7", error));
+ meta_draw_op_list_append (op_list, op);
+ /* top shine first line */
+ op = meta_draw_op_new (META_DRAW_GRADIENT);
+ op->
data.gradient.x = meta_draw_spec_new (theme, g_strdup ("left_width"), NULL);
+ op->
data.gradient.width = meta_draw_spec_new (theme, g_strdup ("width - (left_width + right_width)"), NULL);
+ meta_gradient_spec_new (meta_gradient_type_from_string ("vertical"));
+ meta_color_spec_new_from_string ("
shade/gtk:bg[NORMAL]/2.0", error));
+ meta_color_spec_new_from_string ("
shade/gtk:bg[NORMAL]/1.7", error));
+ meta_draw_op_list_append (op_list, op);
+ /* top shine second line */
+ op = meta_draw_op_new (META_DRAW_GRADIENT);
+ op->
data.gradient.x = meta_draw_spec_new (theme, g_strdup ("left_width"), NULL);
+ op->
data.gradient.width = meta_draw_spec_new (theme, g_strdup ("width - (left_width + right_width)"), NULL);
+ meta_gradient_spec_new (meta_gradient_type_from_string ("vertical"));
+ meta_color_spec_new_from_string ("
shade/gtk:bg[NORMAL]/2.0", error));
+ meta_color_spec_new_from_string ("
shade/gtk:bg[NORMAL]/1.4", error));
+ meta_draw_op_list_append (op_list, op);
+ /* background alpha image */
+ op = meta_draw_op_new (META_DRAW_IMAGE);
+ op->
data.image.pixbuf = gdk_pixbuf_new_from_inline (-1, title_gradient, FALSE, error);
+ op->
data.image.x = meta_draw_spec_new (theme, g_strdup ("left_width"), NULL);
+ op->
data.image.y = meta_draw_spec_new (theme, g_strdup ("height - object_height"), NULL);
+ op->
data.image.width = meta_draw_spec_new (theme, g_strdup ("width - (left_width + right_width)"), NULL);
+ op->
data.image.height = meta_draw_spec_new (theme, g_strdup ("object_height"), NULL);
+ meta_draw_op_list_append (op_list, op);
+ op = meta_draw_op_new (META_DRAW_TITLE);
+ op->
data.title.x = meta_draw_spec_new (theme, g_strdup ("(width - title_width) / 2"), NULL);
+ op->
data.title.y = meta_draw_spec_new (theme, g_strdup ("(height - title_height) / 2"), NULL);
+ meta_draw_op_list_append (op_list, op);
+ meta_draw_op_list_ref (op_list);
+/* create and return drawing ops for the window trusted label */
+MetaDrawOpList * tsol_theme_trusted_label_ops_get (MetaFrameFocus focus, MetaTheme *theme)
+ static MetaDrawOpList *op_list_focus = NULL;
+ static MetaDrawOpList *op_list_unfocused = NULL;
+ if (focus == META_FRAME_FOCUS_YES)
+ if (op_list_focus == NULL)
+ op_list_focus = meta_draw_op_list_new (5);
+ op = meta_draw_op_new (META_DRAW_IMAGE);
+ op->
data.image.pixbuf = gdk_pixbuf_new_from_inline (-1, title_center_dimple, FALSE, error);
+ op->
data.image.x = meta_draw_spec_new (theme, g_strdup ("19"), NULL);
+ op->
data.image.y = meta_draw_spec_new (theme, g_strdup ("0"), NULL);
+ op->
data.image.width = meta_draw_spec_new (theme, g_strdup ("width - (19*2)"), NULL);
+ meta_draw_op_list_append (op_list_focus, op);
+ op = meta_draw_op_new (META_DRAW_IMAGE);
+ op->
data.image.pixbuf = gdk_pixbuf_new_from_inline (-1, title_left_dimple, FALSE, error);
+ op->
data.image.x = meta_draw_spec_new (theme, g_strdup ("0"), NULL);
+ op->
data.image.y = meta_draw_spec_new (theme, g_strdup ("0"), NULL);
+ op->
data.image.width = meta_draw_spec_new (theme, g_strdup ("object_width"), NULL);
+ meta_draw_op_list_append (op_list_focus, op);
+ op = meta_draw_op_new (META_DRAW_IMAGE);
+ op->
data.image.pixbuf = gdk_pixbuf_new_from_inline (-1, title_right_dimple, FALSE, error);
+ op->
data.image.x = meta_draw_spec_new (theme, g_strdup ("width-(object_width+1)"), NULL);
+ op->
data.image.y = meta_draw_spec_new (theme, g_strdup ("0"), NULL);
+ op->
data.image.width = meta_draw_spec_new (theme, g_strdup ("object_width"), NULL);
+ meta_draw_op_list_append (op_list_focus, op);
+ op = meta_draw_op_new (META_DRAW_TRUSTED_LABEL);
+ op->
data.title.x = meta_draw_spec_new (theme, g_strdup ("10"), NULL);
+ op->
data.title.y = meta_draw_spec_new (theme, g_strdup ("5"), NULL);
+ meta_draw_op_list_append (op_list_focus, op);
+ op = meta_draw_op_new (META_DRAW_IMAGE);
+ if (shield_pixbuf == NULL)
+ shield_pixbuf = gdk_pixbuf_new_from_inline (-1, shield, FALSE, error);
+ op->
data.image.x = meta_draw_spec_new (theme, g_strdup ("((width - trusted_label_width) / 2) - (trusted_label_height *3)"), NULL);
+ op->
data.image.y = meta_draw_spec_new (theme, g_strdup ("0"), NULL);
+ op->
data.image.width = meta_draw_spec_new (theme, g_strdup ("trusted_label_height"), NULL);
+ op->
data.image.height = meta_draw_spec_new (theme, g_strdup ("trusted_label_height"), NULL);
+ meta_draw_op_list_append (op_list_focus, op);
+ meta_draw_op_list_ref (op_list_focus);
+ if (op_list_unfocused == NULL)
+ op_list_unfocused = meta_draw_op_list_new (5);
+ op = meta_draw_op_new (META_DRAW_IMAGE);
+ op->
data.image.pixbuf = gdk_pixbuf_new_from_inline (-1, title_center_dimple_unfocused, FALSE, error);
+ op->
data.image.x = meta_draw_spec_new (theme, g_strdup ("19"), NULL);
+ op->
data.image.y = meta_draw_spec_new (theme, g_strdup ("0"), NULL);
+ op->
data.image.width = meta_draw_spec_new (theme, g_strdup ("width - (19*2)"), NULL);
+ meta_draw_op_list_append (op_list_unfocused, op);
+ op = meta_draw_op_new (META_DRAW_IMAGE);
+ op->
data.image.pixbuf = gdk_pixbuf_new_from_inline (-1, title_left_dimple_unfocused, FALSE, error);
+ op->
data.image.x = meta_draw_spec_new (theme, g_strdup ("0"), NULL);
+ op->
data.image.y = meta_draw_spec_new (theme, g_strdup ("0"), NULL);
+ op->
data.image.width = meta_draw_spec_new (theme, g_strdup ("object_width"), NULL);
+ meta_draw_op_list_append (op_list_unfocused, op);
+ op = meta_draw_op_new (META_DRAW_IMAGE);
+ op->
data.image.pixbuf = gdk_pixbuf_new_from_inline (-1, title_right_dimple_unfocused, FALSE, error);
+ op->
data.image.x = meta_draw_spec_new (theme, g_strdup ("width-(object_width+1)"), NULL);
+ op->
data.image.y = meta_draw_spec_new (theme, g_strdup ("0"), NULL);
+ op->
data.image.width = meta_draw_spec_new (theme, g_strdup ("object_width"), NULL);
+ meta_draw_op_list_append (op_list_unfocused, op);
+ op = meta_draw_op_new (META_DRAW_TRUSTED_LABEL);
+ op->
data.title.x = meta_draw_spec_new (theme, g_strdup ("10"), NULL);
+ op->
data.title.y = meta_draw_spec_new (theme, g_strdup ("5"), NULL);
+ meta_draw_op_list_append (op_list_unfocused, op);
+ op = meta_draw_op_new (META_DRAW_IMAGE);
+ if (shield_pixbuf == NULL)
+ shield_pixbuf = gdk_pixbuf_new_from_inline (-1, shield, FALSE, error);
+ op->
data.image.x = meta_draw_spec_new (theme, g_strdup ("((width - trusted_label_width) / 2) - (trusted_label_height *3)"), NULL);
+ op->
data.image.y = meta_draw_spec_new (theme, g_strdup ("0"), NULL);
+ op->
data.image.width = meta_draw_spec_new (theme, g_strdup ("trusted_label_height"), NULL);
+ op->
data.image.height = meta_draw_spec_new (theme, g_strdup ("trusted_label_height"), NULL);
+ meta_draw_op_list_append (op_list_unfocused, op);
+ meta_draw_op_list_ref (op_list_unfocused);
+ return op_list_unfocused;
+trusted_label_string_compare (MetaTrustedLabel *tmp, char *searched_label)
+ return strcmp (searched_label, tmp->name);
+get_window_label (Display *xdisplay, Window xwindow)
+ if (!tsol_is_available ())
+ if (libxtsol_XTSOLIsWindowTrusted (xdisplay, xwindow))
+ /* SUN_BRANDING TJDS */
+ return g_strdup (_("Trusted Path"));
+ else if (libxtsol_XTSOLgetResLabel (xdisplay, xwindow, IsWindow, &label))
+ libtsol_label_to_str (&label, &string, M_LABEL, DEF_NAMES, &error);
+ return g_strdup ("didn't get the label\n");
+getlabelcolor(Display *xdisplay, Window xwindow)
+#define DEFAULT_COLOR "white"
+ if (!tsol_is_available ())
+ if (libxtsol_XTSOLgetResLabel (xdisplay, xwindow, IsWindow, &label))
+ libtsol_label_to_str (&label, &colorname, M_COLOR, DEF_NAMES, &error);
+ return g_strdup(DEFAULT_COLOR);
+ return g_strdup(colorname);
+MetaTrustedLabel* tsol_xwindow_label_get (MetaDisplay *display, Window xwindow)
+ MetaTrustedLabel *label = NULL;
+ GSList *stored_label = NULL;
+ if (!tsol_is_available ())
+ label_name = get_window_label (display->xdisplay, xwindow);
+ /* Look if the label already exist */
+ stored_label = g_slist_find_custom (display->labels, label_name, (GCompareFunc)trusted_label_string_compare);
+ return (MetaTrustedLabel*) stored_label->data;
+ /* create new MetaTrustedLabel */
+ label = g_new0 (MetaTrustedLabel, 1);
+ label->name = label_name;
+ /* Layout is initialized in meta_frame_style_draw */
+ label->color = meta_color_spec_new (META_COLOR_SPEC_BASIC);
+ if (!gdk_color_parse ((const char*)getlabelcolor (display->xdisplay, xwindow), &label->color->
data.basic.color))
+ g_warning ("gdk_color_parse couldn't parse the label color\n");
+ display->labels = g_slist_append (display->labels, label);
+tsol_meta_window_label_get (MetaWindow *window)
+ if (!tsol_is_available ())
+ return tsol_xwindow_label_get (window->display, window->xwindow);
+gboolean tsol_should_label_layout_be_black (MetaColorSpec *bkg)
+ /* printf ("ntsc %d ->",ntsc); */
+ if ((65535 - ntsc) < .61 * 65535)
+get_window_at_pointer (Display *xdisplay)
+ int rootx = -1, rooty = -1;
+ XQueryPointer (xdisplay, DefaultRootWindow (xdisplay),
+ &root, &child, &rootx, &rooty, &winx, &winy, &xmask);
+gboolean tsol_meta_screen_use_roles (MetaScreen *screen)
+ char **role_list = NULL;
+ if (meta_prop_get_utf8_list (screen->display,
+ screen->display->atom__NET_DESKTOP_ROLES,
+ &role_list, &nb_roles))
+ for (i=0;i<nb_roles;i++)
+ if (role_list[i] != NULL && strcmp (role_list[i], "") != 0)
+ g_strfreev (role_list);
+ g_strfreev (role_list);
+gboolean tsol_meta_workspace_has_role (MetaWorkspace *ws)
+ char **role_list = NULL;
+ if (!tsol_is_available ())
+ if (meta_prop_get_utf8_list (ws->screen->display,
+ ws->screen->display->atom__NET_DESKTOP_ROLES,
+ &role_list, &nb_roles))
+ int ws_id = meta_workspace_index (ws);
+ if (ws_id > nb_roles) /* something is wrong here we don't have the same number of
roles/ws */
+ g_strfreev (role_list);
+ if (role_list[ws_id] != NULL && strcmp (role_list[ws_id], "") != 0)
+ pwd = getpwuid (getuid ());
+ if (strcmp (role_list[ws_id], pwd->pw_name) == 0) /* role is normal user */
+ g_strfreev (role_list);
+ g_strfreev (role_list);
+ g_strfreev (role_list);
+char * tsol_meta_workspace_get_role (MetaWorkspace *ws)
+ char **role_list = NULL;
+ if (!tsol_is_available ())
+ if (meta_prop_get_utf8_list (ws->screen->display,
+ ws->screen->display->atom__NET_DESKTOP_ROLES,
+ &role_list, &nb_roles))
+ int ws_id = meta_workspace_index (ws);
+ if (ws_id > nb_roles) /* something is wrong here we don't have the same number of
roles/ws */
+ g_strfreev (role_list);
+ if (role_list[ws_id] != NULL && strcmp (role_list[ws_id], "") != 0)
+ char *return_role_name = NULL;
+ pwd = getpwuid (getuid ());
+ if (strcmp (role_list[ws_id], pwd->pw_name) == 0) /* role is normal user */
+ g_strfreev (role_list);
+ return_role_name = g_strdup (role_list[ws_id]);
+ g_strfreev (role_list);
+ return return_role_name;
+ g_strfreev (role_list);
+gboolean tsol_meta_window_can_move_to_workspace (MetaWindow *win,
+ if (tsol_meta_workspace_has_role (ws))
+ MetaTrustedLabel * label = tsol_meta_window_label_get (win);
+ /* SUN_BRANDING TJDS */
+ if (strcmp (label->name, _("Trusted Path")) != 0)
+ g_warning ("window %s cannot be moved to workspace %s\n",
+ win->title, meta_workspace_get_name (ws));
+gboolean tsol_xwindow_can_move_to_workspace (Display *xdisplay,
+ MetaDisplay *display = meta_display_for_x_display (xdisplay);
+ MetaWindow *window = meta_display_lookup_x_window (display, xwin);
+ g_assert (window != NULL);
+ MetaWorkspace *workspace = meta_screen_get_workspace_by_index (window->screen, ws_index);
+ if (tsol_meta_window_can_move_to_workspace (window, workspace))
+GList *tsol_add_all_sticky_non_tp_windows (MetaDisplay *display, GList *win_list)
+ return_list = win_list;
+ all_windows = meta_display_list_windows (display);
+ MetaWindow *window = tmp->data;
+ if (window->on_all_workspaces &&
+ /* SUN_BRANDING TJDS */
+ strcmp (tsol_meta_window_label_get (window)->name, _("Trusted Path")) != 0)
+ return_list = g_list_prepend (return_list, window);
+void tsol_trusted_stripe_atom_update (MetaDisplay* display, MetaWindow *window)
+ if (!tsol_is_available())
+ data[0] = get_window_at_pointer (display->xdisplay);
+ data[0] = window->xwindow;
+ meta_error_trap_push (display);
+ XChangeProperty (display->xdisplay, DefaultRootWindow (display->xdisplay),
+ display->atom__NET_TRUSTED_ACTIVE_WINDOW,
+ 32, PropModeReplace, (guchar*) data, 2);
+ meta_error_trap_pop (display, FALSE);
+/* Preference related code
+ * init labels and roles from metacity to root window */
+ static char *min_label = NULL;
+ min_label = (char *) getenv ("USER_MIN_SL");
+ static char *max_label = NULL;
+ max_label = (char *) getenv ("USER_MAX_SL");
+tsol_workspace_get_label (MetaWorkspace *ws)
+ MetaTrustedLabel *label = NULL;
+ m_label_t *mlabel = NULL;
+ GSList *stored_label = NULL;
+ GdkColor * color = g_new0 (GdkColor, 1);
+ const char *label_name = meta_prefs_get_workspace_label (meta_workspace_index (ws));
+ /* Look if the label already exist */
+ stored_label = g_slist_find_custom (ws->screen->display->labels,
+ (GCompareFunc)trusted_label_string_compare);
+ return (MetaTrustedLabel*) stored_label->data;
+ /* create a new one otherwise */
+ if (libtsol_str_to_label (label_name, &mlabel,
+ MAC_LABEL, L_NO_CORRECTION, &error) == 0)
+ char *colorname = NULL;
+ libtsol_label_to_str (mlabel, &colorname, M_COLOR, DEF_NAMES, &error);
+ #define DEFAULT_COLOR "white"
+ colorname = g_strdup(DEFAULT_COLOR);
+ label = g_new0 (MetaTrustedLabel, 1);
+ label->name = (char*)label_name;
+ /* Layout is initialized in meta_frame_style_draw */
+ label->color = meta_color_spec_new (META_COLOR_SPEC_BASIC);
+ if (!gdk_color_parse ((const char*)colorname, &label->color->
data.basic.color))
+ g_warning ("gdk_color_parse couldn't parse the label color\n");
+ ws->screen->display->labels = g_slist_append (ws->screen->display->labels, label);
+void tsol_set_frame_label (Display* xdpy, Window xwin, Window xwin_frame)
+ if (!tsol_is_available ())
+ if (libxtsol_XTSOLgetResLabel (xdpy, xwin, IsWindow, &label))
+ libxtsol_XTSOLsetResLabel (xdpy, xwin_frame, IsWindow, &label);
+ if (libxtsol_XTSOLgetResUID (xdpy, xwin, IsWindow, &uid))
+ libxtsol_XTSOLsetResUID (xdpy, xwin_frame, IsWindow, &uid);
+tsol_label_is_in_user_range (const char * label)
+ static blrange_t *range = NULL;
+ m_label_t *mlabel = NULL;
+ if (!tsol_is_available ())
+ { /* Get user label Range */
+ char *min_label = NULL;
+ char *max_label = NULL;
+ range = g_malloc (sizeof (blrange_t));
+ range->lower_bound = range->upper_bound = NULL;
+ min_label = g_strdup (tsol_label_get_min ());
+ max_label = g_strdup (tsol_label_get_max ());
+ if (libtsol_str_to_label (min_label, &(range->lower_bound),
+ MAC_LABEL, L_NO_CORRECTION, &error) < 0)
+ g_warning ("Couldn't determine minimum workspace label");
+ if (libtsol_str_to_label (max_label, &(range->upper_bound),
+ USER_CLEAR, L_NO_CORRECTION, &error) < 0)
+ g_warning ("Couldn't determine workspace clearance");
+ if (libtsol_str_to_label (label, &mlabel, MAC_LABEL, L_NO_CORRECTION, &error) < 0)
+ g_warning("Could not validate sensitivity label \"%s\"", label);
+ if (!libtsol_blinrange (mlabel, range))
+ libtsol_m_label_free (mlabel);
+ libtsol_m_label_free (mlabel);
+ * These private (hint hint) functions assume that they have been called
+ * from within a trusted desktop session. The caller must ensure that
+ * this is the case otherwise it will trigger a load of the potentially
+ * non existant tsol and xtsol libs. That would be bad!
+get_display_range (void)
+ blrange_t *range = NULL;
+ range = libbsm_getdevicerange ("framebuffer");
+ range = g_malloc (sizeof (blrange_t));
+ range->lower_bound = libtsol_blabel_alloc ();
+ range->upper_bound = libtsol_blabel_alloc ();
+ libtsol_bsllow (range->lower_bound);
+ libtsol_bslhigh (range->upper_bound);
+/* tsol_label_is_in_role_range
+ * return FALSE if the label is not in the username role range
+ * not if the role exist and has a range it is returned via role_range
+ * Note if note NULL role_range needs to be freed
+tsol_label_is_in_role_range (const char * label, const char * username, char *min_role_label)
+ /* partial copy of _wnck_workspace_update_role in libwnck */
+ m_label_t *mlabel = NULL;
+ /* validate the label passed */
+ if (libtsol_str_to_label (label, &mlabel, MAC_LABEL, L_NO_CORRECTION, &error) < 0)
+ g_warning("Could not validate sensitivity label \"%s\"", label);
+ * This is a role workspace so we need to construct the correct label range
+ * instead of relying on USER_MIN_SL and USER_MAX_SL
+ if ((role_range = libtsol_getuserrange (username)) == NULL)
+ g_warning ("Couldn't get label range for %s\n", username);
+ /* Get display device's range */
+ if ((disp_range = get_display_range ()) == NULL)
+ g_warning ("Couldn't get the display's device range");
+ * Determine the low & high bound of the label range
+ * where the role user can operate. This is the
+ * intersection of display label range & role label
+ libtsol_blmaximum (role_range->lower_bound, disp_range->lower_bound);
+ libtsol_blminimum (role_range->upper_bound, disp_range->upper_bound);
+ libtsol_blabel_free (disp_range->lower_bound);
+ libtsol_blabel_free (disp_range->upper_bound);
+ /* check if in range */
+ if (!libtsol_blinrange (mlabel, role_range))
+ libtsol_m_label_free (mlabel);
+ libtsol_label_to_str (role_range->lower_bound, &min_role_label, M_INTERNAL, DEF_NAMES, &error);
+ libtsol_blabel_free (role_range->lower_bound);
+ libtsol_blabel_free (role_range->upper_bound);
+ libtsol_blabel_free (role_range->lower_bound);
+ libtsol_blabel_free (role_range->upper_bound);
+ libtsol_m_label_free (mlabel);
+/* boolean is used to select between label or roles */
+set_workspace_tsol_properties (MetaScreen *screen, gboolean label)
+ /* flatten to nul-separated list */
+ n_spaces = meta_screen_get_n_workspaces (screen);
+ flattened = g_string_new ("");
+ name = meta_prefs_get_workspace_label (i);
+ if (!tsol_meta_workspace_has_role (meta_screen_get_workspace_by_index (screen, i)))
+ /* default to min label range if the workspace label isn't defined */
+ /* printf ("set min label on a workspace (%d) that as a role !\n", i); */
+ name = tsol_label_get_min ();
+ if (!tsol_label_is_in_user_range (name))
+ name = tsol_label_get_min ();
+ name = meta_prefs_get_workspace_role (i);
+ g_string_append_len (flattened, name,
+ g_string_append_len (flattened, "", 1);
+ meta_error_trap_push (screen->display);
+ XChangeProperty (screen->display->xdisplay,
+ label ? screen->display->atom__NET_DESKTOP_LABELS : screen->display->atom__NET_DESKTOP_ROLES,
+ screen->display->atom_UTF8_STRING,
+ (const unsigned char *)flattened->str, flattened->len);
+ meta_error_trap_pop (screen->display, FALSE);
+ g_string_free (flattened, TRUE);
+tsol_workspace_labels_atom_set (MetaScreen *screen)
+ /* This updates label names on root window when the pref changes,
+ * note we only get prefs change notify if things have
+ if (tsol_is_available ())
+ set_workspace_tsol_properties (screen, TRUE);
+void tsol_workspace_roles_atom_set (MetaScreen *screen)
+ /* This updates roles names on root window when the pref changes,
+ * note we only get prefs change notify if things have
+ if (tsol_is_available ())
+ set_workspace_tsol_properties (screen, FALSE);
+tsol_workspace_labels_gconf_update (MetaScreen *screen)
+ if (!tsol_is_available ())
+ /* this updates names in prefs when the root window property changes,
+ * iff the new property contents don't match what's already in prefs
+ if (!meta_prop_get_utf8_list (screen->display,
+ screen->display->atom__NET_DESKTOP_LABELS,
+ meta_verbose ("Failed to get workspace label from root window %d\n",
+ /* Check if the label is in range if not set it to USER_MIN_SL
+ * NOTE : if USER_MIN_SL is not properly set you can have an infinite loop here */
+ if (names[i] && !tsol_label_is_in_user_range (names[i]))
+ if (!tsol_meta_workspace_has_role (meta_screen_get_workspace_by_index (screen, i)))
+ names[i] = g_strdup (tsol_label_get_min ());
+ char *min_role_label = NULL;
+ char *role = tsol_meta_workspace_get_role (meta_screen_get_workspace_by_index (screen, i));
+ if (!tsol_label_is_in_role_range (names[i], role, min_role_label))
+ names[i] = min_role_label;
+ names[i] = g_strdup (tsol_label_get_min ());
+ meta_topic (META_DEBUG_PREFS,
+ "Setting workspace label %d name to \"%s\" due to _NET_DESKTOP_LABELS change ROLE workspace :%s \n",
+ i, names[i] ? names[i] : "null",
+ tsol_meta_workspace_has_role (meta_screen_get_workspace_by_index (screen, i)) ? "TRUE" : "FALSE");
+ meta_prefs_change_workspace_label (i, names[i]);
+tsol_workspace_roles_gconf_update (MetaScreen *screen)
+ if (!tsol_is_available ())
+ /* this updates names in prefs when the root window property changes,
+ * iff the new property contents don't match what's already in prefs
+ if (!meta_prop_get_utf8_list (screen->display,
+ screen->display->atom__NET_DESKTOP_ROLES,
+ meta_verbose ("Failed to get workspace roles from root window %d\n",
+ meta_topic (META_DEBUG_PREFS,
+ "Setting workspace roles %d name to \"%s\" due to _NET_DESKTOP_ROLES change\n",
+ i, names[i] ? names[i] : "null");
+ meta_prefs_change_workspace_role (i, names[i]);
+typedef struct _HighlightStripe HighlightStripe;
+ ConstraintImage *image;
+label_string_compare (HighlightStripe *tmp, char *searched_label)
+ return strcmp (searched_label, tmp->name);
+tsol_get_highlight_stripe (char *name,
+ static GSList *hl_stripe_list = NULL;
+ GSList *stored_hl_stripe = NULL;
+ HighlightStripe *hl_stripe;
+ if ((name == NULL) || (label_color == NULL))
+ stored_hl_stripe = g_slist_find_custom (hl_stripe_list,
+ (GCompareFunc)label_string_compare);
+ return ((HighlightStripe* )stored_hl_stripe->data)->image;
+ hl_stripe = g_new0 (HighlightStripe, 1);
+ hl_stripe->name = g_strdup (name);
+ hl_stripe->image = g_new0 (ConstraintImage, 1);
+ hl_stripe->image->pixbuf = gdk_pixbuf_new_from_inline (-1,
+ libgnome_tsol_constraint_image_set_border (hl_stripe->image, 8, 8, 3, 3);
+ libgnome_tsol_constraint_image_set_stretch (hl_stripe->image, TRUE);
+ libgnome_tsol_constraint_image_colorize (hl_stripe->image, label_color, 255, TRUE);
+ hl_stripe_list = g_slist_append (hl_stripe_list, hl_stripe);
+ return hl_stripe->image;
+ * Copyright (C) 2005 Erwann Chenede
+typedef struct _ConstraintImage ConstraintImage;
+ GdkColor colorize_color;
+ gboolean use_as_bkg_mask;
+/* dlopened libtsol functions */
+typedef int (*tsol_label_to_str) (const m_label_t *label, char **string,
+ const m_label_str_t conversion_type, uint_t flags,
+typedef int (*tsol_str_to_label) (const char *string, m_label_t **label,
+ const m_label_type_t label_type, uint_t flags,
+typedef void (*tsol_m_label_free) (m_label_t *label);
+typedef blrange_t* (*tsol_getuserrange) (const char *username);
+typedef int (*tsol_blinrange) (const m_label_t *label,
+ const blrange_t *range);
+typedef void (*tsol_blminimum) (m_label_t *minimum_label,
+ const m_label_t *bounding_label);
+typedef void (*tsol_blmaximum) (m_label_t *maximum_label,
+ const m_label_t *bounding_label);
+typedef m_label_t* (*tsol_blabel_alloc) (void);
+typedef void (*tsol_blabel_free) (m_label_t *label_p);
+typedef void (*tsol_bsllow) (m_label_t *label);
+typedef void (*tsol_bslhigh) (m_label_t *label);
+typedef void (*gnome_tsol_constraint_image_render) (ConstraintImage *cimage,
+ GdkRectangle *clip_rect,
+typedef void (*gnome_tsol_constraint_image_set_border) (ConstraintImage *pb,
+typedef void (*gnome_tsol_constraint_image_set_stretch) (ConstraintImage *pb,
+typedef void (*gnome_tsol_constraint_image_colorize) (ConstraintImage *image,
+/* dlopened libXtsol functions */
+typedef Status (*xtsol_XTSOLgetClientLabel) (Display *dpy,
+typedef Bool (*xtsol_XTSOLIsWindowTrusted) (Display *dpy,
+typedef Status (*xtsol_XTSOLsetResLabel) (Display *dpy,
+ ResourceType resourceFlag,
+typedef Status (*xtsol_XTSOLsetResUID) (Display *dpy,
+ ResourceType resourceFlag,
+typedef Status (*xtsol_XTSOLgetResLabel) (Display *dpy,
+ ResourceType resourceFlag,
+typedef Status (*xtsol_XTSOLgetResUID) (Display *dpy,
+ ResourceType resourceFlag,
+/* libbsm provides getdevicerange(3TSOL) - don't believe the man page */
+typedef blrange_t* (*bsm_getdevicerange) (const char *device);
+tsol_label_to_str libtsol_label_to_str;
+tsol_str_to_label libtsol_str_to_label;
+tsol_m_label_free libtsol_m_label_free;
+tsol_blminimum libtsol_blminimum;
+tsol_blmaximum libtsol_blmaximum;
+tsol_blinrange libtsol_blinrange;
+tsol_getuserrange libtsol_getuserrange;
+tsol_blabel_alloc libtsol_blabel_alloc;
+tsol_blabel_free libtsol_blabel_free;
+tsol_bsllow libtsol_bsllow;
+tsol_bslhigh libtsol_bslhigh;
+bsm_getdevicerange libbsm_getdevicerange;
+gnome_tsol_constraint_image_render libgnome_tsol_constraint_image_render;
+gnome_tsol_constraint_image_set_border libgnome_tsol_constraint_image_set_border;
+gnome_tsol_constraint_image_set_stretch libgnome_tsol_constraint_image_set_stretch;
+gnome_tsol_constraint_image_colorize libgnome_tsol_constraint_image_colorize;
+xtsol_XTSOLgetClientLabel libxtsol_XTSOLgetClientLabel;
+xtsol_XTSOLIsWindowTrusted libxtsol_XTSOLIsWindowTrusted;
+xtsol_XTSOLsetResLabel libxtsol_XTSOLsetResLabel;
+xtsol_XTSOLgetResLabel libxtsol_XTSOLgetResLabel;
+xtsol_XTSOLsetResUID libxtsol_XTSOLsetResUID;
+xtsol_XTSOLgetResUID libxtsol_XTSOLgetResUID;
+gboolean tsol_is_available (void);
+gboolean tsol_use_trusted_extensions (void);
+/* metacity trusted functions */
+struct _MetaTrustedLabel
+void tsol_trusted_stripe_atom_update (MetaDisplay *display,
+MetaDrawOpList* tsol_theme_trusted_label_ops_get (MetaFrameFocus focus,
+MetaDrawOpList* tsol_theme_trusted_title_ops_get (MetaFrameFocus focus,
+MetaTrustedLabel* tsol_meta_window_label_get (MetaWindow *window);
+MetaTrustedLabel* tsol_workspace_get_label (MetaWorkspace *ws);
+MetaTrustedLabel* tsol_xwindow_label_get (MetaDisplay *display,
+gboolean tsol_should_label_layout_be_black (MetaColorSpec *bkg);
+gboolean tsol_meta_workspace_has_role (MetaWorkspace *ws);
+char * tsol_meta_workspace_get_role (MetaWorkspace *ws);
+gboolean tsol_meta_window_can_move_to_workspace (MetaWindow *win,
+gboolean tsol_xwindow_can_move_to_workspace (Display *display,
+gboolean tsol_meta_screen_use_roles (MetaScreen *screen);
+GList* tsol_add_all_sticky_non_tp_windows (MetaDisplay *display,
+void tsol_workspace_labels_atom_set (MetaScreen *screen);
+void tsol_workspace_roles_atom_set (MetaScreen *screen);
+void tsol_workspace_labels_gconf_update (MetaScreen *screen);
+void tsol_workspace_roles_gconf_update (MetaScreen *screen);
+gboolean tsol_label_is_in_user_range (const char * label);
+const char *tsol_label_get_min ();
+const char *tsol_label_get_max ();
+gboolean tsol_label_is_in_role_range (const char * label,
+ConstraintImage * tsol_get_highlight_stripe (char *name,
+ GdkColor *label_color);
+void tsol_set_frame_label (Display* xdpy, Window xwin, Window xwin_frame);
@@ -759,6 +760,10 @@ meta_window_new_with_attrs (MetaDisplay
meta_stack_add (window->screen->stack,
+ meta_window_ensure_frame (window);
/* Put our state back where it should be,
* passing TRUE for is_configure_request, ICCCM says
* initial map is handled same as configure request
@@ -1325,6 +1330,17 @@ gboolean
meta_window_located_on_workspace (MetaWindow *window,
MetaWorkspace *workspace)
+ if (tsol_meta_workspace_has_role (workspace))
+ /* SUN_BRANDING TJDS */
+ if (window->on_all_workspaces && window->decorated && strcmp (tsol_meta_window_label_get (window)->name, _("Trusted Path")) != 0)
+ /* printf ("meta_window_visible_on_workspace in ws role win (%s) is not TP\n", window->title); */
return (window->on_all_workspaces && window->screen == workspace->screen) ||
(window->workspace == workspace);
@@ -1764,7 +1780,12 @@ meta_window_queue (MetaWindow *window, g
G_PRIORITY_DEFAULT_IDLE /* UPDATE_ICON */
- const GSourceFunc window_queue_idle_handler[NUMBER_OF_QUEUES] =
+ /* removing the const definition as the trusted patch
+ * includes this file in libmetacity_private. Which
+ * cause linker errors due to
+ * "relocations remain against allocatable but non-writable sections"
+ * Better solution welcome */
+ GSourceFunc window_queue_idle_handler[NUMBER_OF_QUEUES] =
@@ -3274,8 +3295,14 @@ meta_window_move_resize_internal (MetaWi
- meta_frame_calc_geometry (window->frame,
+ meta_frame_calc_geometry (window->frame,
+ if (tsol_is_available ()) /*Trusted Frame Layout Modification TFLM*/
@@ -4206,6 +4233,11 @@ void
meta_window_change_workspace (MetaWindow *window,
MetaWorkspace *workspace)
+ if (!tsol_meta_window_can_move_to_workspace(window, workspace))
meta_window_change_workspace_without_transients (window, workspace);
meta_window_foreach_transient (window, change_workspace_foreach,
@@ -5334,16 +5366,17 @@ meta_window_notify_focus (MetaWindow *wi
link = g_list_find (window->screen->active_workspace->mru_list,
- window->screen->active_workspace->mru_list =
- g_list_remove_link (window->screen->active_workspace->mru_list,
- window->screen->active_workspace->mru_list =
- g_list_prepend (window->screen->active_workspace->mru_list,
+ window->screen->active_workspace->mru_list =
+ g_list_remove_link (window->screen->active_workspace->mru_list,
+ window->screen->active_workspace->mru_list =
+ g_list_prepend (window->screen->active_workspace->mru_list,
@@ -6536,6 +6569,17 @@ meta_window_show_menu (MetaWindow *windo
if (!window->on_all_workspaces)
+ if (
layout.current_col > 0 && tsol_meta_window_can_move_to_workspace (window, meta_workspace_get_neighbor (window->screen->active_workspace, META_MOTION_LEFT)))
+ ops |= META_MENU_OP_MOVE_LEFT;
+ 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)))
+ ops |= META_MENU_OP_MOVE_RIGHT;
+ if (
layout.current_row > 0 && tsol_meta_window_can_move_to_workspace (window, meta_workspace_get_neighbor (window->screen->active_workspace, META_MOTION_UP)))
+ ops |= META_MENU_OP_MOVE_UP;
+ 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)))
+ ops |= META_MENU_OP_MOVE_DOWN;
ltr = meta_ui_get_direction() == META_UI_DIRECTION_LTR;
@@ -6548,6 +6592,7 @@ meta_window_show_menu (MetaWindow *windo
ops |= META_MENU_OP_MOVE_DOWN;
meta_screen_free_workspace_layout (&layout);
@@ -120,6 +120,10 @@ meta_workspace_free (MetaWorkspace *work
tmp = workspace->windows;
+ if (tsol_is_available ())
+ tmp = tsol_add_all_sticky_non_tp_windows (workspace->screen->display, tmp);
+ META_PREF_WORKSPACE_LABELS,
+ META_PREF_WORKSPACE_ROLES,
META_PREF_MOUSE_BUTTON_MODS,
META_PREF_FOCUS_NEW_WINDOWS,
@@ -117,6 +121,15 @@ int meta_prefs_get_cursor_size
gboolean meta_prefs_get_compositing_manager (void);
gboolean meta_prefs_get_force_fullscreen (void);
+const char* meta_prefs_get_workspace_label (int i);
+void meta_prefs_change_workspace_label (int i,
+const char* meta_prefs_get_workspace_role (int i);
+void meta_prefs_change_workspace_role (int i,
* Sets whether the compositor is turned on.
@@ -204,6 +205,12 @@ MetaUIDirection meta_ui_get_direction (v
GdkPixbuf *meta_ui_get_pixbuf_from_pixmap (Pixmap pmap);
+void meta_ui_set_frame_label (MetaUI *ui,
+ MetaTrustedLabel *label);
MetaFrame *meta_window_get_frame (MetaWindow *window);
gboolean meta_window_has_focus (MetaWindow *window);
@@ -606,7 +606,7 @@ meta_frames_manage_window (MetaFrames *f
- frame = g_new (MetaUIFrame, 1);
+ frame = g_new0 (MetaUIFrame, 1);
@@ -2491,7 +2491,14 @@ meta_frames_paint_to_drawable (MetaFrame
/* Punch out the client area */
+ if (tsol_is_available ())
+
area.y = top + top; /*Trusted Frame Layout Modification TFLM*/
tmp_region = gdk_region_rectangle (&area);
@@ -2537,7 +2544,11 @@ meta_frames_paint_to_drawable (MetaFrame
gdk_window_end_paint (drawable);
@@ -2563,7 +2574,11 @@ meta_frames_paint_to_drawable (MetaFrame
@@ -2937,3 +2952,26 @@ invalidate_whole_window (MetaFrames *fra
gdk_window_invalidate_rect (frame->window, NULL, FALSE);
invalidate_cache (frames, frame);
+meta_frames_set_label (MetaFrames *frames,
+ MetaTrustedLabel *label)
+ widget = GTK_WIDGET (frames);
+ frame = meta_frames_lookup_window (frames, xwindow);
+ if (frame->label != NULL)
+ g_warning ("label should be null");
@@ -77,6 +80,9 @@ struct _MetaUIFrame
MetaFrameStyle *cache_style;
+ MetaTrustedLabel *label;
char *title; /* NULL once we have a layout */
@@ -160,4 +166,9 @@ Window meta_frames_get_moving_frame (Met
void meta_frames_push_delay_exposes (MetaFrames *frames);
void meta_frames_pop_delay_exposes (MetaFrames *frames);
+void meta_frames_set_label (MetaFrames *frames,
+ MetaTrustedLabel *label);
#define _XOPEN_SOURCE 600 /* for the maths routines over floats */
@@ -262,7 +263,13 @@ meta_preview_expose (GtkWidget *wid
meta_preview_get_mini_icon (),
- meta_preview_get_icon ());
+ meta_preview_get_icon ()
#define OUTSIDE_SELECT_RECT 2
#define INSIDE_SELECT_RECT 2
@@ -103,6 +107,65 @@ outline_window_expose (GtkWidget *w
+static gboolean should_label_layout_be_black (GdkColor *color)
+ ntsc = ((color->red) * .4450 +
+ (color->green) * .525);
+ if ((65535 - ntsc) < .61 * 65535)
+tsol_tab_label_expose_event (GtkWidget *widget,
+ ConstraintImage *cimage;
+ MetaTrustedLabel *tlabel;
+ if (popup->current_selected_entry == NULL)
+ te = popup->current_selected_entry;
+ tlabel = tsol_xwindow_label_get (meta_display_for_x_display (gdk_display), (Window) te->key);
+ tlabel = tsol_workspace_get_label ((MetaWorkspace *) te->key);
+ gtk_widget_modify_fg (widget, GTK_STATE_NORMAL, &widget->style->black);
+ gtk_widget_modify_fg (widget, GTK_STATE_NORMAL, &widget->style->white);
+ cimage = tsol_get_highlight_stripe (tlabel->name, &tlabel->color->
data.basic.color);
+ libgnome_tsol_constraint_image_render (cimage,
dimm_icon (GdkPixbuf *pixbuf)
@@ -303,6 +366,13 @@ meta_ui_tab_popup_new (const MetaTabEntr
gtk_box_pack_end (GTK_BOX (vbox), popup->label, FALSE, FALSE, 0);
+ if (tsol_is_available ())
+ g_signal_connect (G_OBJECT (popup->label), "expose_event",
+ G_CALLBACK (tsol_tab_label_expose_event),
@@ -943,6 +1013,34 @@ meta_select_workspace_expose_event (GtkW
+ if (tsol_is_available ())
+ GdkGC *tmp_gc = gdk_gc_new (widget->window);
+ MetaTrustedLabel *label = tsol_workspace_get_label (workspace);
+ gdk_draw_rectangle (widget->window,
+ g_object_unref (tmp_gc);
+ gdk_draw_rectangle (widget->window,
+ widget->style->black_gc,
@@ -1009,7 +1009,11 @@ run_theme_benchmark (void)
meta_preview_get_mini_icon (),
- meta_preview_get_icon ());
+ meta_preview_get_icon ()
g_object_unref (G_OBJECT (pixmap));
#define GDK_COLOR_RGBA(color) \
@@ -622,7 +627,12 @@ meta_frame_layout_calc_geometry (const M
+ if (tsol_is_available ())
+ fgeom->height = height + fgeom->top_height; /*Trusted Frame Layout Modification TFLM*/
fgeom->left_titlebar_edge = layout->left_titlebar_edge;
@@ -1064,7 +1074,13 @@ meta_color_spec_new (MetaColorSpecType t
case META_COLOR_SPEC_BASIC:
+ case META_COLOR_SPEC_LABEL:
case META_COLOR_SPEC_GTK:
@@ -1095,7 +1111,13 @@ meta_color_spec_free (MetaColorSpec *spe
case META_COLOR_SPEC_BASIC:
+ case META_COLOR_SPEC_LABEL:
case META_COLOR_SPEC_GTK:
@@ -1194,6 +1216,16 @@ meta_color_spec_new_from_string (const c
+ else if (str[0] == 'l' && str[1] == 'a' && str[2] == 'b' && str[3] == 'e' &&
+ spec = meta_color_spec_new (META_COLOR_SPEC_LABEL);
else if (str[0] == 'b' && str[1] == 'l' && str[2] == 'e' && str[3] == 'n' &&
str[4] == 'd' && str[5] == '/')
@@ -1369,7 +1401,21 @@ meta_color_spec_render (MetaColorSpec *s
case META_COLOR_SPEC_BASIC:
+ case META_COLOR_SPEC_LABEL:
+ MetaTrustedLabel *label = NULL;
+ label = (MetaTrustedLabel *)g_object_get_data (G_OBJECT (widget), "trusted_label");
+ g_warning ("trusted_label property isn't set for the widget");
case META_COLOR_SPEC_GTK:
@@ -2188,6 +2234,14 @@ pos_eval_get_variable (PosToken
*result = env->title_width;
*result = env->title_height;
+ else if (t->
d.v.name_quark == env->theme->quark_trusted_label_width)
+ *result = env->trusted_label_width;
+ else if (t->
d.v.name_quark == env->theme->quark_trusted_label_height)
+ *result = env->trusted_label_height;
g_set_error (err, META_THEME_ERROR,
@@ -2229,6 +2283,14 @@ pos_eval_get_variable (PosToken
*result = env->title_width;
else if (strcmp (t->
d.v.name, "title_height") == 0)
*result = env->title_height;
+ else if (strcmp (t->
d.v.name, "trusted_label_width") == 0)
+ *result = env->trusted_label_width;
+ else if (strcmp (t->
d.v.name, "trusted_label_height") == 0)
+ *result = env->trusted_label_height;
g_set_error (err, META_THEME_ERROR,
@@ -2742,6 +2804,13 @@ meta_draw_op_new (MetaDrawType type)
+ case META_DRAW_TRUSTED_LABEL:
@@ -2901,6 +2970,16 @@ meta_draw_op_free (MetaDrawOp *op)
+ case META_DRAW_TRUSTED_LABEL:
@@ -3416,6 +3495,12 @@ draw_op_as_pixbuf (const MetaDrawOp *
+ case META_DRAW_TRUSTED_LABEL:
@@ -3453,6 +3538,25 @@ fill_env (MetaPositionExprEnv *env,
env->title_width = info->title_layout_width;
env->title_height = info->title_layout_height;
+ if (info->label && info->label->layout)
+ PangoRectangle extents;
+ pango_layout_get_pixel_extents (info->label->layout,
+ env->trusted_label_width = 0;
+ env->trusted_label_height = 0;
env->theme = meta_current_theme;
@@ -3637,6 +3741,17 @@ meta_draw_op_draw_with_env (const MetaDr
+ /* Hack to display shield icon conditionally */
+ /* SUN_BRANDING TJDS */
+ if (strcmp (info->label->name, _("Trusted Path")) != 0)
@@ -3823,6 +3938,54 @@ meta_draw_op_draw_with_env (const MetaDr
+ case META_DRAW_TRUSTED_LABEL:
+ if (info->title_layout)
+ static MetaColorSpec *black = NULL;
+ static MetaColorSpec *white = NULL;
+ gboolean black_text = tsol_should_label_layout_be_black (info->label->color);
+ black = meta_color_spec_new (META_COLOR_SPEC_BASIC);
+ white = meta_color_spec_new (META_COLOR_SPEC_BASIC);
+ pango_layout_get_pixel_size (info->label->layout,&text_w, &text_h);
+ gc = get_gc_for_primitive (widget, drawable, color, clip, 0);
+ gdk_draw_layout (drawable, gc,
+ g_object_unref (G_OBJECT (gc));
@@ -4302,6 +4465,11 @@ meta_frame_style_draw_with_style (MetaFr
PangoLayout *title_layout,
+ MetaTrustedLabel *label,
MetaButtonState button_states[META_BUTTON_TYPE_LAST],
@@ -4369,6 +4537,19 @@ meta_frame_style_draw_with_style (MetaFr
+ if (tsol_is_available ())
+ label->layout = gtk_widget_create_pango_layout (widget, label->name);
+ g_object_set_data (G_OBJECT (widget), "trusted_label", label);
/* The enum is in the order the pieces should be rendered. */
@@ -4386,6 +4567,16 @@ meta_frame_style_draw_with_style (MetaFr
+ case META_FRAME_PIECE_TRUSTED_LABEL:
case META_FRAME_PIECE_TITLEBAR:
@@ -4552,6 +4743,11 @@ meta_frame_style_draw (MetaFrameStyle
PangoLayout *title_layout,
+ MetaTrustedLabel *label,
MetaButtonState button_states[META_BUTTON_TYPE_LAST],
@@ -4560,7 +4756,13 @@ meta_frame_style_draw (MetaFrameStyle
meta_frame_style_draw_with_style (style, widget->style, widget,
drawable, x_offset, y_offset,
clip, fgeom, client_width, client_height,
- title_layout, text_height,
button_states, mini_icon, icon);
@@ -4758,6 +4960,45 @@ meta_theme_get_current (void)
return meta_current_theme;
+set_trusted_ops (MetaFrameStyle *style, MetaFrameFocus focus, MetaTheme *theme)
+ if (style->pieces[META_FRAME_PIECE_TITLE])
+ meta_draw_op_list_unref (style->pieces[META_FRAME_PIECE_TITLE]);
+ style->pieces[META_FRAME_PIECE_TITLE] = tsol_theme_trusted_label_ops_get (focus, theme);
+ style->pieces[META_FRAME_PIECE_TRUSTED_LABEL] = tsol_theme_trusted_title_ops_get (focus, theme);
+style_set_for_each (gpointer key,gpointer value,gpointer user_data)
+ MetaFrameStyleSet *sset = (MetaFrameStyleSet *) value;
+ MetaTheme *theme = (MetaTheme *)user_data;
+ for (i=0;i < META_FRAME_RESIZE_LAST;i++)
+ set_trusted_ops(sset->normal_styles[i][META_FRAME_FOCUS_YES], META_FRAME_FOCUS_YES, theme);
+ set_trusted_ops(sset->normal_styles[i][META_FRAME_FOCUS_NO], META_FRAME_FOCUS_NO, theme);
+ set_trusted_ops(sset->shaded_styles[i][META_FRAME_FOCUS_YES], META_FRAME_FOCUS_YES, theme);
+ set_trusted_ops(sset->shaded_styles[i][META_FRAME_FOCUS_NO], META_FRAME_FOCUS_NO, theme);
+ set_trusted_ops(sset->maximized_styles[META_FRAME_FOCUS_YES], META_FRAME_FOCUS_YES, theme);
+ set_trusted_ops(sset->maximized_styles[META_FRAME_FOCUS_NO], META_FRAME_FOCUS_NO, theme);
+ set_trusted_ops(sset->maximized_and_shaded_styles[META_FRAME_FOCUS_YES], META_FRAME_FOCUS_YES, theme);
+ set_trusted_ops(sset->maximized_and_shaded_styles[META_FRAME_FOCUS_NO], META_FRAME_FOCUS_NO, theme);
meta_theme_set_current (const char *name,
@@ -4788,6 +5029,16 @@ meta_theme_set_current (const char *name
meta_current_theme = new_theme;
+ if (tsol_is_available ())
+ shield_pixbuf = NULL; /* hack to display shield icon conditionally */
+ g_hash_table_foreach (new_theme->style_sets_by_name, style_set_for_each, meta_current_theme);
meta_topic (META_DEBUG_THEMES, "New theme is \"%s\"\n", meta_current_theme->name);
@@ -4845,10 +5096,15 @@ meta_theme_new (void)
theme->quark_icon_height = g_quark_from_static_string ("icon_height");
theme->quark_title_width = g_quark_from_static_string ("title_width");
theme->quark_title_height = g_quark_from_static_string ("title_height");
+ theme->quark_trusted_label_width = g_quark_from_static_string ("trusted_label_width");
+ theme->quark_trusted_label_height = g_quark_from_static_string ("trusted_label_height");
meta_theme_free (MetaTheme *theme)
@@ -5127,7 +5383,13 @@ meta_theme_draw_frame_with_style (MetaTh
const MetaButtonLayout *button_layout,
MetaButtonState button_states[META_BUTTON_TYPE_LAST],
+ ,MetaTrustedLabel *label
@@ -5157,6 +5419,11 @@ meta_theme_draw_frame_with_style (MetaTh
client_width, client_height,
@@ -5178,14 +5445,26 @@ meta_theme_draw_frame (MetaTheme
const MetaButtonLayout *button_layout,
MetaButtonState button_states[META_BUTTON_TYPE_LAST],
+ ,MetaTrustedLabel *label
meta_theme_draw_frame_with_style (theme, widget->style, widget,
drawable, clip, x_offset, y_offset, type,flags,
client_width, client_height,
title_layout, text_height,
button_layout, button_states,
@@ -5204,7 +5483,13 @@ meta_theme_draw_frame_by_name (MetaTheme
const MetaButtonLayout *button_layout,
MetaButtonState button_states[META_BUTTON_TYPE_LAST],
+ ,MetaTrustedLabel *label
@@ -5231,6 +5516,11 @@ meta_theme_draw_frame_by_name (MetaTheme
client_width, client_height,
@@ -5820,6 +6110,12 @@ meta_frame_piece_to_string (MetaFramePie
case META_FRAME_PIECE_ENTIRE_BACKGROUND:
return "entire_background";
+ case META_FRAME_PIECE_TRUSTED_LABEL:
+ return "trusted_label";
case META_FRAME_PIECE_TITLEBAR:
case META_FRAME_PIECE_TITLEBAR_MIDDLE:
@@ -42,6 +42,11 @@ typedef struct _MetaFrameGeometry MetaFr
typedef struct _MetaTheme MetaTheme;
typedef struct _MetaPositionExprEnv MetaPositionExprEnv;
typedef struct _MetaDrawInfo MetaDrawInfo;
+typedef struct _MetaTrustedLabel MetaTrustedLabel;
#define META_THEME_ERROR (g_quark_from_static_string ("meta-theme-error"))
@@ -227,6 +232,12 @@ typedef enum
@@ -250,6 +261,13 @@ struct _MetaColorSpec
MetaGtkColorComponent component;
@@ -291,6 +309,11 @@ struct _MetaDrawInfo
const MetaFrameGeometry *fgeom;
+ MetaTrustedLabel *label;
@@ -328,6 +351,13 @@ typedef enum
/** tiled draw op list */
+ /* draw a string (used for trusted label) */
+ META_DRAW_TRUSTED_LABEL
@@ -556,6 +586,16 @@ struct _MetaDrawOp
MetaDrawSpec *tile_height;
+ MetaColorSpec *color_spec;
@@ -631,6 +671,12 @@ typedef enum
META_FRAME_PIECE_ENTIRE_BACKGROUND,
+ /* Trusted Label area*/
+ META_FRAME_PIECE_TRUSTED_LABEL,
/* entire titlebar background */
META_FRAME_PIECE_TITLEBAR,
/* portion of the titlebar background inside the titlebar
@@ -819,6 +865,12 @@ struct _MetaTheme
GQuark quark_icon_height;
GQuark quark_title_width;
GQuark quark_title_height;
+ GQuark quark_trusted_label_width;
+ GQuark quark_trusted_label_height;
struct _MetaPositionExprEnv
@@ -834,6 +886,12 @@ struct _MetaPositionExprEnv
+ int trusted_label_width;
+ int trusted_label_height;
@@ -961,6 +1019,11 @@ void meta_frame_style_draw (MetaFrameSty
PangoLayout *title_layout,
+ MetaTrustedLabel *label,
MetaButtonState button_states[META_BUTTON_TYPE_LAST],
@@ -978,7 +1041,12 @@ void meta_frame_style_draw_with_style (M
PangoLayout *title_layout,
+ MetaTrustedLabel *label,
MetaButtonState button_states[META_BUTTON_TYPE_LAST],
@@ -1031,7 +1099,13 @@ void meta_theme_draw_frame (MetaTheme
const MetaButtonLayout *button_layout,
MetaButtonState button_states[META_BUTTON_TYPE_LAST],
+ ,MetaTrustedLabel *label
void meta_theme_draw_frame_by_name (MetaTheme *theme,
@@ -1048,7 +1122,13 @@ void meta_theme_draw_frame_by_name (Meta
const MetaButtonLayout *button_layout,
MetaButtonState button_states[META_BUTTON_TYPE_LAST],
+ ,MetaTrustedLabel *label
void meta_theme_draw_frame_with_style (MetaTheme *theme,
@@ -1066,7 +1146,13 @@ void meta_theme_draw_frame_with_style (M
const MetaButtonLayout *button_layout,
MetaButtonState button_states[META_BUTTON_TYPE_LAST],
+ ,MetaTrustedLabel *label
void meta_theme_get_frame_borders (MetaTheme *theme,
@@ -963,6 +967,16 @@ meta_ui_get_drag_threshold (MetaUI *ui)
+meta_ui_set_frame_label (MetaUI *ui,
+ MetaTrustedLabel *label)
+ meta_frames_set_label (ui->frames, xwindow, label);
meta_ui_get_direction (void)
* The exit code we'll return to our parent process when we eventually die.
@@ -416,6 +417,10 @@ main (int argc, char **argv)
+ if (tsol_use_trusted_extensions () ) {
+ putenv ("GDK_NATIVE_WINDOWS=true");
if (!g_thread_supported ())
static GConfClient *default_client = NULL;
/* This is between GTK_PRIORITY_RESIZE (+10) and GDK_PRIORITY_REDRAW (+20) */
#define META_PRIORITY_RESIZE (G_PRIORITY_HIGH_IDLE + 15)