Changeset 279607e
- Timestamp:
- 2010-03-07T22:35:00Z (15 years ago)
- Branches:
- master
- Children:
- 52cae01
- Parents:
- fb020ac
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/purple/purple.c
rfb020ac r279607e 195 195 196 196 for( st = purple_account_get_status_types( pa ); st; st = st->next ) 197 ret = g_list_append( ret, (void*) purple_status_type_get_name( st->data ) ); 197 { 198 PurpleStatusPrimitive prim = purple_status_type_get_primitive( st->data ); 199 if( prim != PURPLE_STATUS_AVAILABLE && prim != PURPLE_STATUS_OFFLINE ) 200 ret = g_list_append( ret, (void*) purple_status_type_get_name( st->data ) ); 201 } 198 202 199 203 return ret; … … 205 209 GList *status_types = purple_account_get_status_types( pa ), *st; 206 210 PurpleStatusType *pst = NULL; 211 GList *args = NULL; 207 212 208 213 for( st = status_types; st; st = st->next ) … … 210 215 pst = st->data; 211 216 212 if( g_strcasecmp( state_txt, purple_status_type_get_name( pst ) ) == 0 ) 213 break; 214 } 215 216 purple_account_set_status( pa, st ? purple_status_type_get_id( pst ) : "away", 217 TRUE, "message", message, NULL ); 217 if( state_txt == NULL && 218 purple_status_type_get_primitive( st->data ) == PURPLE_STATUS_AVAILABLE ) 219 break; 220 221 if( state_txt != NULL && 222 g_strcasecmp( state_txt, purple_status_type_get_name( pst ) ) == 0 ) 223 break; 224 } 225 226 if( message ) 227 { 228 args = g_list_append( args, "message" ); 229 args = g_list_append( args, message ); 230 } 231 232 purple_account_set_status_list( pa, st ? purple_status_type_get_id( pst ) : "away", 233 TRUE, args ); 234 235 g_list_free( args ); 218 236 } 219 237
Note: See TracChangeset
for help on using the changeset viewer.