summaryrefslogtreecommitdiff
path: root/src/theme-parser.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-02-09 06:54:44 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-02-09 06:54:44 +0000
commit116fc5546f3ab87a6a2650aa7afa4aa5c842a9bd (patch)
tree3ddd3567dbce8ed6b996d9f85608bb934ef7154e /src/theme-parser.c
parent844a8ac13f057f235cf3044f23b23cabf10e65f7 (diff)
downloadmetacity-116fc5546f3ab87a6a2650aa7afa4aa5c842a9bd.tar.gz
metacity-116fc5546f3ab87a6a2650aa7afa4aa5c842a9bd.tar.bz2
put in some kind of distinctive frame for UTILITY, though it's ugly. Also
2002-02-09 Havoc Pennington <hp@pobox.com> * src/themes/Atlanta/metacity-theme-1.xml: put in some kind of distinctive frame for UTILITY, though it's ugly. Also put in the borderless look for maximized windows. * src/stack.c (compute_layer): put splash screen in the splash layer * src/stack.h (enum): create a splash screen layer * src/place.c (meta_window_place): center splashscreen, and fix a typo in the centering code * src/window.c (recalc_window_features): disable most features on splash screens * src/screen.c (set_supported_hint): add UTILITY and SPLASHSCREEN hints * src/window.c: add UTILITY, SPLASHSCREEN implementation * src/window.h (enum): add UTILITY, SPLASHSCREEN types * src/theme-parser.c (parse_toplevel_element): parser support for has_title attribute * src/theme.c (meta_frame_layout_get_borders): handle a has_title field in the layout, for utility windows that don't display a title (would be better to be able to shrink the title text, but that's kind of tricky to implement :-/)
Diffstat (limited to 'src/theme-parser.c')
-rw-r--r--src/theme-parser.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/theme-parser.c b/src/theme-parser.c
index c1805f4..331b565 100644
--- a/src/theme-parser.c
+++ b/src/theme-parser.c
@@ -656,11 +656,14 @@ parse_toplevel_element (GMarkupParseContext *context,
{
const char *name = NULL;
const char *parent = NULL;
+ const char *has_title = NULL;
+ gboolean has_title_val;
MetaFrameLayout *parent_layout;
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
error,
"name", &name, "parent", &parent,
+ "has_title", &has_title,
NULL))
return;
@@ -672,6 +675,10 @@ parse_toplevel_element (GMarkupParseContext *context,
return;
}
+ has_title_val = TRUE;
+ if (has_title && !parse_boolean (has_title, &has_title_val, context, error))
+ return;
+
if (meta_theme_lookup_layout (info->theme, name))
{
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
@@ -700,6 +707,9 @@ parse_toplevel_element (GMarkupParseContext *context,
else
info->layout = meta_frame_layout_new ();
+ if (has_title) /* only if explicit, otherwise inherit */
+ info->layout->has_title = has_title_val;
+
meta_theme_insert_layout (info->theme, name, info->layout);
push_state (info, STATE_FRAME_GEOMETRY);