Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/xmpp.c @ 2282:dc1b123d63d5
Improve message when bookmarks are updated
Thanks to Leonard Witte for the suggestion.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 01 Oct 2016 18:36:47 +0200 |
parents | f5402d705f67 |
children | 0d350e979bde |
comparison
equal
deleted
inserted
replaced
2281:1bb9002801e5 | 2282:dc1b123d63d5 |
---|---|
2117 xmpp_setstatus(mywantedstatus, NULL, mystatusmsg, FALSE); | 2117 xmpp_setstatus(mywantedstatus, NULL, mystatusmsg, FALSE); |
2118 } | 2118 } |
2119 | 2119 |
2120 // send_storage(store) | 2120 // send_storage(store) |
2121 // Send the node "store" to update the server. | 2121 // Send the node "store" to update the server. |
2122 // Note: the sender should check we're online. | 2122 // Note: the caller should check we're online. |
2123 void send_storage(LmMessageNode *store) | 2123 void send_storage(LmMessageNode *store) |
2124 { | 2124 { |
2125 LmMessage *iq; | 2125 LmMessage *iq; |
2126 LmMessageHandler *handler; | 2126 LmMessageHandler *handler; |
2127 LmMessageNode *query; | 2127 LmMessageNode *query; |
2331 if (fjoins) | 2331 if (fjoins) |
2332 lm_message_node_add_child(x, "flag_joins", strflagjoins[fjoins]); | 2332 lm_message_node_add_child(x, "flag_joins", strflagjoins[fjoins]); |
2333 if (group && *group) | 2333 if (group && *group) |
2334 lm_message_node_add_child(x, "group", group); | 2334 lm_message_node_add_child(x, "group", group); |
2335 changed = TRUE; | 2335 changed = TRUE; |
2336 scr_LogPrint(LPRINT_LOGNORM, "Updating bookmarks..."); | |
2337 } | 2336 } |
2338 | 2337 |
2339 if (!changed) | 2338 if (!changed) |
2340 return; | 2339 return; |
2341 | 2340 |
2342 if (xmpp_is_online()) | 2341 if (xmpp_is_online()) { |
2343 send_storage(bookmarks); | 2342 send_storage(bookmarks); |
2344 else | 2343 scr_LogPrint(LPRINT_LOGNORM, "Bookmarks updated."); |
2344 } else { | |
2345 scr_LogPrint(LPRINT_LOGNORM, | 2345 scr_LogPrint(LPRINT_LOGNORM, |
2346 "Warning: you're not connected to the server."); | 2346 "Warning: you're not connected to the server."); |
2347 } | |
2347 } | 2348 } |
2348 | 2349 |
2349 static struct annotation *parse_storage_rosternote(LmMessageNode *notenode) | 2350 static struct annotation *parse_storage_rosternote(LmMessageNode *notenode) |
2350 { | 2351 { |
2351 const char *p; | 2352 const char *p; |