[empathy] status_presets_file_parse: discard invalid presence (#585031)
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy] status_presets_file_parse: discard invalid presence (#585031)
- Date: Thu, 18 Jun 2009 06:04:37 -0400 (EDT)
commit c007f0c68d7a40f658a238cc2316ccc545bef7c0
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Jun 15 18:13:33 2009 +0100
status_presets_file_parse: discard invalid presence (#585031)
libempathy/empathy-status-presets.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/libempathy/empathy-status-presets.c b/libempathy/empathy-status-presets.c
index c91895e..135212c 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);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]