| 31 | | struct status_icon *online, *offline, *away, *na, *dnd, *occ, *message_icon, |
| 32 | | *file_icon, *chat_icon, *url_icon, *no_icon; |
| | 31 | struct status_icon *online, *offline, *away, *na, *dnd, *occ, *ffc, |
| | 32 | *invisible, *message_icon, *file_icon, *chat_icon, *url_icon; |
| | 153 | num_users, 0, ","); |
| | 154 | } |
| | 155 | |
| | 156 | else if((gushort)user_status == ICQ_STATUS_OFFLINE) |
| | 157 | { |
| | 158 | cur_icon = offline; |
| | 159 | gtk_clist_set_foreground(GTK_CLIST(contact_list) |
| | 160 | , num_users, offline_color); |
| | 161 | gtk_clist_set_text(GTK_CLIST(contact_list), |
| | 162 | num_users, 0, "~"); |
| | 163 | } |
| | 164 | |
| | 165 | else if(user_status & ICQ_STATUS_DND) |
| | 166 | { |
| | 167 | cur_icon = dnd; |
| | 168 | gtk_clist_set_foreground(GTK_CLIST(contact_list) |
| | 169 | , num_users, away_color); |
| | 170 | gtk_clist_set_text(GTK_CLIST(contact_list), |
| | 171 | num_users, 0, "X"); |
| | 172 | } |
| | 173 | |
| | 174 | else if(user_status & ICQ_STATUS_OCCUPIED) |
| | 175 | { |
| | 176 | cur_icon = occ; |
| | 177 | gtk_clist_set_foreground(GTK_CLIST(contact_list) |
| | 178 | , num_users, away_color); |
| | 179 | gtk_clist_set_text(GTK_CLIST(contact_list), |
| | 180 | num_users, 0, "x"); |
| | 181 | } |
| | 182 | |
| | 183 | else if(user_status & ICQ_STATUS_NA) |
| | 184 | { |
| | 185 | cur_icon = na; |
| | 186 | gtk_clist_set_foreground(GTK_CLIST(contact_list) |
| | 187 | , num_users, away_color); |
| | 188 | gtk_clist_set_text(GTK_CLIST(contact_list), |
| | 189 | num_users, 0, "N"); |
| | 190 | } |
| | 191 | |
| | 192 | else if(user_status & ICQ_STATUS_AWAY) |
| | 193 | { |
| | 194 | cur_icon = away; |
| | 195 | gtk_clist_set_foreground(GTK_CLIST(contact_list) |
| | 196 | , num_users, away_color); |
| | 197 | gtk_clist_set_text(GTK_CLIST(contact_list), |
| | 198 | num_users, 0, "A"); |
| | 199 | } |
| | 200 | |
| | 201 | else if(user_status & ICQ_STATUS_FREEFORCHAT) |
| | 202 | { |
| | 203 | cur_icon = ffc; |
| | 204 | gtk_clist_set_foreground(GTK_CLIST(contact_list) |
| | 205 | , num_users, online_color); |
| | 206 | gtk_clist_set_text(GTK_CLIST(contact_list), |
| 154 | | break; |
| 155 | | } |
| 156 | | |
| 157 | | case ICQ_STATUS_AWAY: |
| 158 | | { |
| 159 | | gtk_clist_set_pixmap(GTK_CLIST(contact_list), |
| 160 | | num_users, 1, away->pm, away->bm); |
| 161 | | gtk_clist_set_foreground(GTK_CLIST(contact_list) |
| 162 | | , num_users, away_color); |
| 163 | | gtk_clist_set_text(GTK_CLIST(contact_list), |
| 164 | | num_users, 0, "A"); |
| 165 | | break; |
| 166 | | } |
| 167 | | |
| 168 | | case ICQ_STATUS_ONLINE: |
| 169 | | { |
| 170 | | gtk_clist_set_pixmap(GTK_CLIST(contact_list), |
| 171 | | num_users, 1, online->pm, online->bm); |
| | 208 | } |
| | 209 | |
| | 210 | else if(user_status & ICQ_STATUS_OCCUPIED) |
| | 211 | { |
| | 212 | cur_icon = occ; |
| | 213 | gtk_clist_set_foreground(GTK_CLIST(contact_list) |
| | 214 | , num_users, away_color); |
| | 215 | gtk_clist_set_text(GTK_CLIST(contact_list), |
| | 216 | num_users, 0, "x"); |
| | 217 | } |
| | 218 | |
| | 219 | else |
| | 220 | { |
| | 221 | cur_icon = online; |
| 176 | | break; |
| 177 | | } |
| 178 | | |
| 179 | | case ICQ_STATUS_NA: |
| 180 | | { |
| 181 | | gtk_clist_set_pixmap(GTK_CLIST(contact_list), |
| 182 | | num_users, 1, na->pm, na->bm); |
| 183 | | gtk_clist_set_foreground(GTK_CLIST(contact_list) |
| 184 | | , num_users, away_color); |
| 185 | | gtk_clist_set_text(GTK_CLIST(contact_list), |
| 186 | | num_users, 0, "N"); |
| 187 | | break; |
| 188 | | } |
| 189 | | |
| 190 | | case ICQ_STATUS_DND: |
| 191 | | { |
| 192 | | gtk_clist_set_pixmap(GTK_CLIST(contact_list), |
| 193 | | num_users, 1, dnd->pm, dnd->bm); |
| 194 | | gtk_clist_set_foreground(GTK_CLIST(contact_list) |
| 195 | | , num_users, away_color); |
| 196 | | gtk_clist_set_text(GTK_CLIST(contact_list), |
| 197 | | num_users, 0, "X"); |
| 198 | | break; |
| 199 | | } |
| | 226 | } |
| 201 | | case ICQ_STATUS_OCCUPIED: |
| 202 | | { |
| 203 | | gtk_clist_set_pixmap(GTK_CLIST(contact_list), |
| 204 | | num_users, 1, occ->pm, occ->bm); |
| 205 | | gtk_clist_set_foreground(GTK_CLIST(contact_list) |
| 206 | | , num_users, away_color); |
| 207 | | gtk_clist_set_text(GTK_CLIST(contact_list), |
| 208 | | num_users, 0, "x"); |
| 209 | | break; |
| 210 | | } |
| 211 | | |
| 212 | | case ICQ_STATUS_OFFLINE: |
| 213 | | { |
| 214 | | gtk_clist_set_pixmap(GTK_CLIST(contact_list), |
| 215 | | num_users, 1, offline->pm, offline->bm); |
| 216 | | gtk_clist_set_foreground(GTK_CLIST(contact_list) |
| 217 | | , num_users, offline_color); |
| 218 | | gtk_clist_set_text(GTK_CLIST(contact_list), |
| 219 | | num_users, 0, "~"); |
| 220 | | break; |
| 221 | | } |
| 222 | | |
| 223 | | default: |
| 224 | | g_print("Unknown status\n"); |
| 225 | | } //switch |
| | 228 | gtk_clist_set_pixmap(GTK_CLIST(contact_list), |
| | 229 | num_users, 1, cur_icon->pm, cur_icon->bm); |