[metacity] theme: merge MetaThemeError and ThemeParseError enums
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] theme: merge MetaThemeError and ThemeParseError enums
- Date: Sat, 23 Jan 2016 19:37:07 +0000 (UTC)
commit f6ffc482b149b08b7fb0b45ee88499b1523d3281
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Jan 23 21:08:09 2016 +0200
theme: merge MetaThemeError and ThemeParseError enums
src/ui/theme-parser.c | 19 +++----------------
src/ui/theme.h | 1 +
2 files changed, 4 insertions(+), 16 deletions(-)
---
diff --git a/src/ui/theme-parser.c b/src/ui/theme-parser.c
index 5eb5a30..f653538 100644
--- a/src/ui/theme-parser.c
+++ b/src/ui/theme-parser.c
@@ -116,19 +116,6 @@ typedef struct
int skip_level; /* depth of elements that we're ignoring */
} ParseInfo;
-typedef enum {
- THEME_PARSE_ERROR_TOO_OLD,
- THEME_PARSE_ERROR_TOO_FAILED
- } ThemeParseError;
-
-static GQuark
-theme_parse_error_quark (void)
-{
- return g_quark_from_static_string ("theme-parse-error-quark");
-}
-
-#define THEME_PARSE_ERROR (theme_parse_error_quark ())
-
static void set_error (GError **err,
GMarkupParseContext *context,
int error_domain,
@@ -3282,7 +3269,7 @@ start_element_handler (GMarkupParseContext *context,
}
else
{
- set_error (error, context, THEME_PARSE_ERROR, THEME_PARSE_ERROR_TOO_OLD,
+ set_error (error, context, META_THEME_ERROR, META_THEME_ERROR_TOO_OLD,
_("Theme requires version %s but latest supported theme version is %d.%d"),
version, THEME_VERSION, THEME_MINOR_VERSION);
return;
@@ -3866,8 +3853,8 @@ static gboolean
theme_error_is_fatal (GError *error)
{
return !(error->domain == G_FILE_ERROR ||
- (error->domain == THEME_PARSE_ERROR &&
- error->code == THEME_PARSE_ERROR_TOO_OLD));
+ (error->domain == META_THEME_ERROR &&
+ error->code == META_THEME_ERROR_TOO_OLD));
}
static MetaTheme *
diff --git a/src/ui/theme.h b/src/ui/theme.h
index fb77641..f3a0cb4 100644
--- a/src/ui/theme.h
+++ b/src/ui/theme.h
@@ -38,6 +38,7 @@ typedef struct _MetaTheme MetaTheme;
typedef enum
{
+ META_THEME_ERROR_TOO_OLD,
META_THEME_ERROR_FRAME_GEOMETRY,
META_THEME_ERROR_BAD_CHARACTER,
META_THEME_ERROR_BAD_PARENS,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]