aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-06-16 01:13:33 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-06-18 18:04:01 +0800
commitc007f0c68d7a40f658a238cc2316ccc545bef7c0 (patch)
treebb42b6ce75cd1e74808c5516d75e621a020a0356
parentafd2392c8e58e1f9b01eb7e983634ab288b62751 (diff)
downloadgsoc2013-empathy-c007f0c68d7a40f658a238cc2316ccc545bef7c0.tar
gsoc2013-empathy-c007f0c68d7a40f658a238cc2316ccc545bef7c0.tar.gz
gsoc2013-empathy-c007f0c68d7a40f658a238cc2316ccc545bef7c0.tar.bz2
gsoc2013-empathy-c007f0c68d7a40f658a238cc2316ccc545bef7c0.tar.lz
gsoc2013-empathy-c007f0c68d7a40f658a238cc2316ccc545bef7c0.tar.xz
gsoc2013-empathy-c007f0c68d7a40f658a238cc2316ccc545bef7c0.tar.zst
gsoc2013-empathy-c007f0c68d7a40f658a238cc2316ccc545bef7c0.zip
status_presets_file_parse: discard invalid presence (#585031)
-rw-r--r--libempathy/empathy-status-presets.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/libempathy/empathy-status-presets.c b/libempathy/empathy-status-presets.c
index c91895eeb..135212cc5 100644
--- a/libempathy/empathy-status-presets.c
+++ b/libempathy/empathy-status-presets.c
@@ -131,16 +131,17 @@ status_presets_file_parse (const gchar *filename)
if (state_str) {
state = empathy_presence_from_str (state_str);
-
- if (is_default) {
- DEBUG ("Default status preset state is:"
- " '%s', status:'%s'", state_str,
- status);
-
- status_presets_set_default (state, status);
- } else {
- preset = status_preset_new (state, status);
- presets = g_list_append (presets, preset);
+ if (empathy_status_presets_is_valid (state)) {
+ if (is_default) {
+ DEBUG ("Default status preset state is:"
+ " '%s', status:'%s'", state_str,
+ status);
+
+ status_presets_set_default (state, status);
+ } else {
+ preset = status_preset_new (state, status);
+ presets = g_list_append (presets, preset);
+ }
}
}