summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/theme-parser.c5
-rw-r--r--src/ui/theme-viewer.c7
-rw-r--r--src/ui/theme.c11
3 files changed, 19 insertions, 4 deletions
diff --git a/src/ui/theme-parser.c b/src/ui/theme-parser.c
index 38c1e664..e3c044f9 100644
--- a/src/ui/theme-parser.c
+++ b/src/ui/theme-parser.c
@@ -38,7 +38,7 @@
* look out for.
*/
#define THEME_MAJOR_VERSION 3
-#define THEME_MINOR_VERSION 1
+#define THEME_MINOR_VERSION 2
#define THEME_VERSION (1000 * THEME_MAJOR_VERSION + THEME_MINOR_VERSION)
#define MARCO_THEME_FILENAME_FORMAT "metacity-theme-%d.xml"
@@ -1277,7 +1277,8 @@ parse_toplevel_element (GMarkupParseContext *context,
type = meta_frame_type_from_string (type_name);
- if (type == META_FRAME_TYPE_LAST)
+ if (type == META_FRAME_TYPE_LAST ||
+ (type == META_FRAME_TYPE_ATTACHED && peek_required_version (info) < 3002))
{
set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
_("Unknown type \"%s\" on <%s> element"),
diff --git a/src/ui/theme-viewer.c b/src/ui/theme-viewer.c
index e6e4e097..65df34fa 100644
--- a/src/ui/theme-viewer.c
+++ b/src/ui/theme-viewer.c
@@ -427,6 +427,10 @@ get_window_contents (MetaFrameType type,
*title = _("Border");
return border_only_contents ();
+ case META_FRAME_TYPE_ATTACHED:
+ *title = _("Attached Modal Dialog");
+ return dialog_contents ();
+
case META_FRAME_TYPE_LAST:
g_assert_not_reached ();
break;
@@ -474,6 +478,9 @@ get_window_flags (MetaFrameType type)
case META_FRAME_TYPE_BORDER:
break;
+ case META_FRAME_TYPE_ATTACHED:
+ break;
+
case META_FRAME_TYPE_LAST:
g_assert_not_reached ();
break;
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 4385b7c6..667e60ff 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -5193,7 +5193,7 @@ meta_theme_validate (MetaTheme *theme,
}
for (i = 0; i < (int)META_FRAME_TYPE_LAST; i++)
- if (theme->style_sets_by_type[i] == NULL)
+ if (i != (int)META_FRAME_TYPE_ATTACHED && theme->style_sets_by_type[i] == NULL)
{
g_set_error (error, META_THEME_ERROR, META_THEME_ERROR_FAILED,
_("No frame style set for window type \"%s\" in theme \"%s\", add a <window type=\"%s\" style_set=\"whatever\"/> element"),
@@ -5271,7 +5271,10 @@ theme_get_style (MetaTheme *theme,
style_set = theme->style_sets_by_type[type];
- /* Right now the parser forces a style set for all types,
+ if (style_set == NULL && type == META_FRAME_TYPE_ATTACHED)
+ style_set = theme->style_sets_by_type[META_FRAME_TYPE_BORDER];
+
+ /* Right now the parser forces a style set for all other types,
* but this fallback code is here in case I take that out.
*/
if (style_set == NULL)
@@ -6229,6 +6232,8 @@ meta_frame_type_from_string (const char *str)
return META_FRAME_TYPE_MENU;
else if (strcmp ("border", str) == 0)
return META_FRAME_TYPE_BORDER;
+ else if (strcmp ("attached", str) == 0)
+ return META_FRAME_TYPE_ATTACHED;
#if 0
else if (strcmp ("toolbar", str) == 0)
return META_FRAME_TYPE_TOOLBAR;
@@ -6254,6 +6259,8 @@ meta_frame_type_to_string (MetaFrameType type)
return "menu";
case META_FRAME_TYPE_BORDER:
return "border";
+ case META_FRAME_TYPE_ATTACHED:
+ return "attached";
#if 0
case META_FRAME_TYPE_TOOLBAR:
return "toolbar";