Mercurial > pidgin
comparison libpurple/protocols/jabber/usermood.c @ 25952:5f9a24d1c25e
Remove some extra trailing whitespace I noticed after merging mlundblad's
xmpp branches.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Mon, 02 Mar 2009 06:37:05 +0000 |
parents | 5954c65ae4f4 |
children | c4fd9222dda1 5391094529c6 |
comparison
equal
deleted
inserted
replaced
25951:13574de83636 | 25952:5f9a24d1c25e |
---|---|
101 JabberBuddy *buddy = jabber_buddy_find(js, from, FALSE); | 101 JabberBuddy *buddy = jabber_buddy_find(js, from, FALSE); |
102 xmlnode *moodinfo, *mood; | 102 xmlnode *moodinfo, *mood; |
103 /* ignore the mood of people not on our buddy list */ | 103 /* ignore the mood of people not on our buddy list */ |
104 if (!buddy || !item) | 104 if (!buddy || !item) |
105 return; | 105 return; |
106 | 106 |
107 mood = xmlnode_get_child_with_namespace(item, "mood", "http://jabber.org/protocol/mood"); | 107 mood = xmlnode_get_child_with_namespace(item, "mood", "http://jabber.org/protocol/mood"); |
108 if (!mood) | 108 if (!mood) |
109 return; | 109 return; |
110 for (moodinfo = mood->child; moodinfo; moodinfo = moodinfo->next) { | 110 for (moodinfo = mood->child; moodinfo; moodinfo = moodinfo->next) { |
111 if (moodinfo->type == XMLNODE_TYPE_TAG) { | 111 if (moodinfo->type == XMLNODE_TYPE_TAG) { |
177 group = purple_request_field_group_new(NULL); | 177 group = purple_request_field_group_new(NULL); |
178 purple_request_fields_add_group(fields, group); | 178 purple_request_fields_add_group(fields, group); |
179 | 179 |
180 field = purple_request_field_choice_new("mood", | 180 field = purple_request_field_choice_new("mood", |
181 _("Mood"), 0); | 181 _("Mood"), 0); |
182 | 182 |
183 for(i = 0; moodstrings[i]; ++i) | 183 for(i = 0; moodstrings[i]; ++i) |
184 purple_request_field_choice_add(field, _(moodstrings[i])); | 184 purple_request_field_choice_add(field, _(moodstrings[i])); |
185 | 185 |
186 purple_request_field_set_required(field, TRUE); | 186 purple_request_field_set_required(field, TRUE); |
187 purple_request_field_group_add_field(group, field); | 187 purple_request_field_group_add_field(group, field); |
188 | 188 |
189 field = purple_request_field_string_new("text", | 189 field = purple_request_field_string_new("text", |
190 _("Description"), NULL, | 190 _("Description"), NULL, |
191 FALSE); | 191 FALSE); |
192 purple_request_field_group_add_field(group, field); | 192 purple_request_field_group_add_field(group, field); |
193 | 193 |
194 purple_request_fields(gc, _("Edit User Mood"), | 194 purple_request_fields(gc, _("Edit User Mood"), |
195 _("Edit User Mood"), | 195 _("Edit User Mood"), |
196 _("Please select your mood from the list."), | 196 _("Please select your mood from the list."), |
197 fields, | 197 fields, |
198 _("Set"), G_CALLBACK(do_mood_set_from_fields), | 198 _("Set"), G_CALLBACK(do_mood_set_from_fields), |
199 _("Cancel"), NULL, | 199 _("Cancel"), NULL, |
200 purple_connection_get_account(gc), NULL, NULL, | 200 purple_connection_get_account(gc), NULL, NULL, |
201 gc); | 201 gc); |
202 | 202 |
203 } | 203 } |
204 | 204 |
205 void jabber_mood_init_action(GList **m) { | 205 void jabber_mood_init_action(GList **m) { |
206 PurplePluginAction *act = purple_plugin_action_new(_("Set Mood..."), do_mood_set_mood); | 206 PurplePluginAction *act = purple_plugin_action_new(_("Set Mood..."), do_mood_set_mood); |
207 *m = g_list_append(*m, act); | 207 *m = g_list_append(*m, act); |
220 | 220 |
221 if (text && text[0] != '\0') { | 221 if (text && text[0] != '\0') { |
222 xmlnode *textnode = xmlnode_new_child(moodnode, "text"); | 222 xmlnode *textnode = xmlnode_new_child(moodnode, "text"); |
223 xmlnode_insert_data(textnode, text, -1); | 223 xmlnode_insert_data(textnode, text, -1); |
224 } | 224 } |
225 | 225 |
226 jabber_pep_publish(js, publish); | 226 jabber_pep_publish(js, publish); |
227 /* publish is freed by jabber_pep_publish -> jabber_iq_send -> jabber_iq_free | 227 /* publish is freed by jabber_pep_publish -> jabber_iq_send -> jabber_iq_free |
228 (yay for well-defined memory management rules) */ | 228 (yay for well-defined memory management rules) */ |
229 } | 229 } |