comparison src/protocols/sametime/sametime.c @ 12970:ec9b92104904

[gaim-migrate @ 15323] Pass the tooltip GString to the prpls. This make the prpl tooltip_text consistent with the drawing-tooltip signal callbacks. It also eliminates a little bit of duplicated code from the prpls. It's also theoretically more efficient, but I'm sure the difference is irrelevant. However, this change will allow me to kill a bunch more duplicated code. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Fri, 20 Jan 2006 20:35:18 +0000
parents aba96d7cee74
children eb64b2b26e56
comparison
equal deleted inserted replaced
12969:b98a28bf29d9 12970:ec9b92104904
3171 return (*feat)? g_strjoinv(", ", feat): NULL; 3171 return (*feat)? g_strjoinv(", ", feat): NULL;
3172 /* jenni loves siege */ 3172 /* jenni loves siege */
3173 } 3173 }
3174 3174
3175 3175
3176 static char *mw_prpl_tooltip_text(GaimBuddy *b, gboolean full) { 3176 static void mw_prpl_tooltip_text(GaimBuddy *b, GString *str, gboolean full) {
3177 GaimConnection *gc; 3177 GaimConnection *gc;
3178 struct mwGaimPluginData *pd; 3178 struct mwGaimPluginData *pd;
3179 struct mwAwareIdBlock idb = { mwAware_USER, b->name, NULL }; 3179 struct mwAwareIdBlock idb = { mwAware_USER, b->name, NULL };
3180 3180
3181 GString *str;
3182 const char *message; 3181 const char *message;
3183 const char *status; 3182 const char *status;
3184 char *tmp; 3183 char *tmp;
3185 3184
3186 gc = b->account->gc; 3185 gc = b->account->gc;
3187 pd = gc->proto_data; 3186 pd = gc->proto_data;
3188
3189 str = g_string_new(NULL);
3190 3187
3191 message = mwServiceAware_getText(pd->srvc_aware, &idb); 3188 message = mwServiceAware_getText(pd->srvc_aware, &idb);
3192 status = status_text(b); 3189 status = status_text(b);
3193 3190
3194 if(message != NULL && gaim_utf8_strcasecmp(status, message)) { 3191 if(message != NULL && gaim_utf8_strcasecmp(status, message)) {
3209 3206
3210 if(buddy_is_external(b)) { 3207 if(buddy_is_external(b)) {
3211 g_string_append(str, _("\n<b>External User</b>")); 3208 g_string_append(str, _("\n<b>External User</b>"));
3212 } 3209 }
3213 } 3210 }
3214
3215 return g_string_free(str, FALSE);
3216 } 3211 }
3217 3212
3218 3213
3219 static GList *mw_prpl_status_types(GaimAccount *acct) { 3214 static GList *mw_prpl_status_types(GaimAccount *acct) {
3220 GList *types = NULL; 3215 GList *types = NULL;