comparison src/protocols/yahoo/yahoo.c @ 12595:3169cd6727ad

[gaim-migrate @ 14925] I've been meaning to spend the time to commit these changes separately, but it's been a couple days without me finding the time... 1. Allow the creation of GaimStatusTypes by passing NULL for the name and/or id. The core uses the default name and/or id. This eliminates quite a bit of duplication in the prpls. 2. Make statuses more consistent. For example, in some prpls, "Busy" was descended from the UNAVAILABLE primitive and on others it was a case of AWAY. Another example... "On Vacation" is definitely an EXTENDED_AWAY not an AWAY. 3. Rename some pixmaps to elminate some special cases. The names of the pixmaps should now match the primitive default IDs. 4. Rename the HIDDEN primitive to INVISIBLE, since we seem to be using that term everywhere. In conjunction with #1, more duplication was eliminated. 5. Add a MOBILE status primitive. It's not used now. It'll be needed in the (hopefully not-too-distant) future, so I'm planning ahead. 6. Shrink the status select for small blist folks. Now if someone can get rid of that stupid extra padding, we'll be set (well, after we deal with imhtml space issues). I've fought with this for many many hours over several days and I can't get it. It's clear that the combo box is requesting more space than is really necessary, but I don't know why. This is really my first go at anything significant status-related. Everyone should check their favorite prpls carefully to make sure I didn't break anything. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 21 Dec 2005 08:24:17 +0000
parents 12db50600de5
children e856f985a0b9
comparison
equal deleted inserted replaced
12594:3d34460ecfd6 12595:3169cd6727ad
3197 static GList *yahoo_status_types(GaimAccount *account) 3197 static GList *yahoo_status_types(GaimAccount *account)
3198 { 3198 {
3199 GaimStatusType *type; 3199 GaimStatusType *type;
3200 GList *types = NULL; 3200 GList *types = NULL;
3201 3201
3202 type = gaim_status_type_new(GAIM_STATUS_OFFLINE, YAHOO_STATUS_TYPE_OFFLINE, _("Offline"), TRUE); 3202 type = gaim_status_type_new(GAIM_STATUS_OFFLINE, YAHOO_STATUS_TYPE_OFFLINE, NULL, TRUE);
3203 types = g_list_append(types, type); 3203 types = g_list_append(types, type);
3204 3204
3205 type = gaim_status_type_new_with_attrs(GAIM_STATUS_AVAILABLE, YAHOO_STATUS_TYPE_AVAILABLE, 3205 type = gaim_status_type_new_with_attrs(GAIM_STATUS_AVAILABLE, YAHOO_STATUS_TYPE_AVAILABLE,
3206 "Available", TRUE, TRUE, FALSE, 3206 NULL, TRUE, TRUE, FALSE,
3207 "message", _("Message"), 3207 "message", _("Message"),
3208 gaim_value_new(GAIM_TYPE_STRING), NULL); 3208 gaim_value_new(GAIM_TYPE_STRING), NULL);
3209 types = g_list_append(types, type); 3209 types = g_list_append(types, type);
3210 3210
3211 type = gaim_status_type_new_with_attrs(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_AWAY, 3211 type = gaim_status_type_new_with_attrs(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_AWAY,
3212 _("Away"), TRUE, TRUE, FALSE, 3212 NULL, TRUE, TRUE, FALSE,
3213 "message", _("Message"), 3213 "message", _("Message"),
3214 gaim_value_new(GAIM_TYPE_STRING), NULL); 3214 gaim_value_new(GAIM_TYPE_STRING), NULL);
3215 types = g_list_append(types, type); 3215 types = g_list_append(types, type);
3216 3216
3217 type = gaim_status_type_new(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_BRB, _("Be Right Back"), TRUE); 3217 type = gaim_status_type_new(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_BRB, _("Be Right Back"), TRUE);
3218 types = g_list_append(types, type); 3218 types = g_list_append(types, type);
3219 3219
3220 type = gaim_status_type_new(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_BUSY, _("Busy"), TRUE); 3220 type = gaim_status_type_new(GAIM_STATUS_UNAVAILABLE, YAHOO_STATUS_TYPE_BUSY, _("Busy"), TRUE);
3221 types = g_list_append(types, type); 3221 types = g_list_append(types, type);
3222 3222
3223 type = gaim_status_type_new(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_NOTATHOME, _("Not at Home"), TRUE); 3223 type = gaim_status_type_new(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_NOTATHOME, _("Not at Home"), TRUE);
3224 types = g_list_append(types, type); 3224 types = g_list_append(types, type);
3225 3225
3227 types = g_list_append(types, type); 3227 types = g_list_append(types, type);
3228 3228
3229 type = gaim_status_type_new(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_NOTINOFFICE, _("Not in Office"), TRUE); 3229 type = gaim_status_type_new(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_NOTINOFFICE, _("Not in Office"), TRUE);
3230 types = g_list_append(types, type); 3230 types = g_list_append(types, type);
3231 3231
3232 type = gaim_status_type_new(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_ONPHONE, _("On the Phone"), TRUE); 3232 type = gaim_status_type_new(GAIM_STATUS_UNAVAILABLE, YAHOO_STATUS_TYPE_ONPHONE, _("On the Phone"), TRUE);
3233 types = g_list_append(types, type); 3233 types = g_list_append(types, type);
3234 3234
3235 type = gaim_status_type_new(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_ONVACATION, _("On Vacation"), TRUE); 3235 type = gaim_status_type_new(GAIM_STATUS_EXTENDED_AWAY, YAHOO_STATUS_TYPE_ONVACATION, _("On Vacation"), TRUE);
3236 types = g_list_append(types, type); 3236 types = g_list_append(types, type);
3237 3237
3238 type = gaim_status_type_new(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_OUTTOLUNCH, _("Out to Lunch"), TRUE); 3238 type = gaim_status_type_new(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_OUTTOLUNCH, _("Out to Lunch"), TRUE);
3239 types = g_list_append(types, type); 3239 types = g_list_append(types, type);
3240 3240
3241 type = gaim_status_type_new(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_STEPPEDOUT, _("Stepped Out"), TRUE); 3241 type = gaim_status_type_new(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_STEPPEDOUT, _("Stepped Out"), TRUE);
3242 types = g_list_append(types, type); 3242 types = g_list_append(types, type);
3243 3243
3244 3244
3245 type = gaim_status_type_new(GAIM_STATUS_HIDDEN, YAHOO_STATUS_TYPE_INVISIBLE, _("Invisible"), TRUE); 3245 type = gaim_status_type_new(GAIM_STATUS_INVISIBLE, YAHOO_STATUS_TYPE_INVISIBLE, NULL, TRUE);
3246 types = g_list_append(types, type); 3246 types = g_list_append(types, type);
3247 3247
3248 return types; 3248 return types;
3249 } 3249 }
3250 3250