#include <telepathy-glib/account-manager.h>
#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/util.h>
#include "empathy-tp-chat.h"
#include "empathy-chatroom-manager.h"
xmlNewTextChild (node, NULL, (const xmlChar *) "auto_connect",
empathy_chatroom_get_auto_connect (chatroom) ?
(const xmlChar *) "yes" : (const xmlChar *) "no");
+ xmlNewTextChild (node, NULL, (const xmlChar *) "always_urgent",
+ empathy_chatroom_is_always_urgent (chatroom) ?
+ (const xmlChar *) "yes" : (const xmlChar *) "no");
}
/* Make sure the XML is indented properly */
gchar *room;
gchar *account_id;
gboolean auto_connect;
+ gboolean always_urgent;
priv = GET_PRIV (manager);
name = NULL;
room = NULL;
auto_connect = TRUE;
+ always_urgent = FALSE;
account_id = NULL;
for (child = node->children; child; child = child->next) {
auto_connect = FALSE;
}
}
+ else if (!tp_strdiff (tag, "always_urgent")) {
+ if (strcmp (str, "yes") == 0) {
+ always_urgent = TRUE;
+ } else {
+ always_urgent = FALSE;
+ }
+ }
else if (strcmp (tag, "account") == 0) {
account_id = g_strdup (str);
}
chatroom = empathy_chatroom_new_full (account, room, name, auto_connect);
empathy_chatroom_set_favorite (chatroom, TRUE);
+ empathy_chatroom_set_always_urgent (chatroom, always_urgent);
add_chatroom (manager, chatroom);
g_signal_emit (manager, signals[CHATROOM_ADDED], 0, chatroom);
<!ELEMENT chatrooms (chatroom*)>
<!ELEMENT chatroom
- (name,room,account,(auto_connect?))>
+ (name,room,account,(auto_connect?),(always_urgent?))>
<!ELEMENT name (#PCDATA)>
<!ELEMENT room (#PCDATA)>
<!ELEMENT auto_connect (#PCDATA)>
+<!ELEMENT always_urgent (#PCDATA)>
<!ELEMENT account (#PCDATA)>