Changeset 8e9e2b7 for protocols/bee_user.c
- Timestamp:
- 2010-10-03T02:45:26Z (14 years ago)
- Branches:
- master
- Children:
- 04f0c10
- Parents:
- 88de0c9 (diff), 2af3e23 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/bee_user.c
r88de0c9 r8e9e2b7 187 187 /* TODO(wilmer): OPT_AWAY, or just state == NULL ? */ 188 188 bu->flags = flags; 189 bu->status = g_strdup( ( flags & OPT_AWAY ) && state == NULL ? "Away" : state );190 189 bu->status_msg = g_strdup( message ); 190 if( state && *state ) 191 bu->status = g_strdup( state ); 192 else if( flags & OPT_AWAY ) 193 bu->status = g_strdup( "Away" ); 194 else 195 bu->status = NULL; 191 196 192 197 if( bu->status == NULL && ( flags & OPT_MOBILE ) && … … 205 210 } 206 211 212 /* Same, but only change the away/status message, not any away/online state info. */ 213 void imcb_buddy_status_msg( struct im_connection *ic, const char *handle, const char *message ) 214 { 215 bee_t *bee = ic->bee; 216 bee_user_t *bu, *old; 217 218 if( !( bu = bee_user_by_handle( bee, ic, handle ) ) ) 219 { 220 return; 221 } 222 223 old = g_memdup( bu, sizeof( bee_user_t ) ); 224 225 bu->status_msg = message && *message ? g_strdup( message ) : NULL; 226 227 if( bee->ui->user_status ) 228 bee->ui->user_status( bee, bu, old ); 229 230 g_free( old->status_msg ); 231 g_free( old ); 232 } 233 207 234 void imcb_buddy_times( struct im_connection *ic, const char *handle, time_t login, time_t idle ) 208 235 {
Note: See TracChangeset
for help on using the changeset viewer.