summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Untz <vuntz@gnome.org>2007-08-18 08:33:34 +0000
committeruid3020 <uid3020>2007-08-18 08:33:34 +0000
commitcf94986afb2eeb2ff0294e4448980f4030880a9e (patch)
tree2eb6fb7d97ee0a91d2d65ba2d5f118135ad1ad13
parent9dec6ec674c88c9a8a6ab4aa9e71e3d9075faf22 (diff)
Handle X-Foo in environments. Based on patch by Stanislav Brabec
2007-08-18 Vincent Untz <vuntz@gnome.org> Handle X-Foo in environments. Based on patch by Stanislav Brabec <sbrabec@suse.cz>. Fix bug #11565. * src/validate.c: (handle_show_in_key): handle "X-Foo" and change the error message to mention X- (handle_categories_key): change a bit the error message to mention X-
-rw-r--r--ChangeLog10
-rw-r--r--src/validate.c11
2 files changed, 19 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ab45fb5..e49b4dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-08-18 Vincent Untz <vuntz@gnome.org>
+
+ Handle X-Foo in environments.
+ Based on patch by Stanislav Brabec <sbrabec@suse.cz>.
+ Fix bug #11565.
+
+ * src/validate.c: (handle_show_in_key): handle "X-Foo" and change the
+ error message to mention X-
+ (handle_categories_key): change a bit the error message to mention X-
+
2007-07-27 Vincent Untz <vuntz@gnome.org>
* src/validate.c: (handle_icon_key): new, checks that the value is
diff --git a/src/validate.c b/src/validate.c
index 6fa1da6..90b381d 100644
--- a/src/validate.c
+++ b/src/validate.c
@@ -755,6 +755,8 @@ handle_icon_key (kf_validator *kf,
* Checked.
* FIXME: this is not perfect because it could fail if a new value with
* a semicolon is registered.
+ * + All values extending the format should start with "X-".
+ * Checked.
* + FIXME: is this okay to have only ";"? (gnome-theme-installer.desktop does)
*/
static gboolean
@@ -796,6 +798,9 @@ handle_show_in_key (kf_validator *kf,
g_hash_table_insert (hashtable, show[i], show[i]);
+ if (!strncmp (show[i], "X-", 2))
+ continue;
+
for (j = 0; j < G_N_ELEMENTS (show_in_registered); j++) {
if (!strcmp (show[i], show_in_registered[j]))
break;
@@ -803,7 +808,8 @@ handle_show_in_key (kf_validator *kf,
if (j == G_N_ELEMENTS (show_in_registered)) {
print_fatal (kf, "value \"%s\" for key \"%s\" in group \"%s\" "
- "contains an unregistered value \"%s\"\n",
+ "contains an unregistered value \"%s\"; values "
+ "extending the format should start with \"X-\"\n",
value, locale_key, kf->current_group, show[i]);
retval = FALSE;
}
@@ -1213,7 +1219,8 @@ handle_categories_key (kf_validator *kf,
}
print_fatal (kf, "value \"%s\" for key \"%s\" in group \"%s\" "
- "contains an unregistered value \"%s\"\n",
+ "contains an unregistered value \"%s\"; values "
+ "extending the format should start with \"X-\"\n",
value, locale_key, kf->current_group, categories[i]);
retval = FALSE;
}