pidgin/pidginmooddialog.c

changeset 40634
4d3018b00ad4
parent 40444
f2d8204dcf4e
child 40647
33d7e6abb37f
equal deleted inserted replaced
40633:d884c4b6e202 40634:4d3018b00ad4
149 149
150 if (purple_connection_get_flags(gc) & PURPLE_CONNECTION_FLAG_SUPPORT_MOODS) { 150 if (purple_connection_get_flags(gc) & PURPLE_CONNECTION_FLAG_SUPPORT_MOODS) {
151 PurpleProtocol *protocol = purple_connection_get_protocol(gc); 151 PurpleProtocol *protocol = purple_connection_get_protocol(gc);
152 PurpleMood *mood = NULL; 152 PurpleMood *mood = NULL;
153 153
154 for (mood = purple_protocol_client_iface_get_moods(protocol, account) ; 154 for (mood = purple_protocol_client_get_moods(PURPLE_PROTOCOL_CLIENT(protocol), account) ;
155 mood->mood != NULL ; mood++) { 155 mood->mood != NULL ; mood++) {
156 int mood_count = 156 int mood_count =
157 GPOINTER_TO_INT(g_hash_table_lookup(mood_counts, mood->mood)); 157 GPOINTER_TO_INT(g_hash_table_lookup(mood_counts, mood->mood));
158 158
159 if (!g_hash_table_contains(global_moods, mood->mood)) { 159 if (!g_hash_table_contains(global_moods, mood->mood)) {
261 if (current_mood == NULL) 261 if (current_mood == NULL)
262 purple_request_field_list_add_selected(f, _("None")); 262 purple_request_field_list_add_selected(f, _("None"));
263 263
264 /* TODO: rlaager wants this sorted. */ 264 /* TODO: rlaager wants this sorted. */
265 /* TODO: darkrain wants it sorted post-translation */ 265 /* TODO: darkrain wants it sorted post-translation */
266 if (account && PURPLE_PROTOCOL_IMPLEMENTS(protocol, CLIENT, get_moods)) { 266 if (account && PURPLE_IS_PROTOCOL_CLIENT(protocol)) {
267 mood = purple_protocol_client_iface_get_moods(protocol, account); 267 mood = purple_protocol_client_get_moods(PURPLE_PROTOCOL_CLIENT(protocol), account);
268 } else { 268 }
269
270 if(mood == NULL) {
269 mood = global_moods = pidgin_mood_get_global_moods(); 271 mood = global_moods = pidgin_mood_get_global_moods();
270 } 272 }
271 for ( ; mood->mood != NULL ; mood++) { 273
274 for ( ; mood != NULL && mood->mood != NULL ; mood++) {
272 char *path; 275 char *path;
273 276
274 if (mood->description == NULL) { 277 if (mood->description == NULL) {
275 continue; 278 continue;
276 } 279 }

mercurial