pidgin: f74d7dbb: Fix Bonjour to better deal with buddy va...
rlaager at pidgin.im
rlaager at pidgin.im
Fri Dec 12 12:11:47 EST 2008
-----------------------------------------------------------------
Revision: f74d7dbbb04d8d3d1d07486f87dcd96937196c88
Ancestor: 4ff028813f413133586393038d63ee3d565450a5
Author: rlaager at pidgin.im
Date: 2008-12-08T05:20:44
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f74d7dbbb04d8d3d1d07486f87dcd96937196c88
Modified files:
libpurple/protocols/bonjour/bonjour.c
libpurple/protocols/bonjour/buddy.c
ChangeLog:
Fix Bonjour to better deal with buddy values set to the empty string.
-------------- next part --------------
============================================================
--- libpurple/protocols/bonjour/bonjour.c 8c4efa99065cadfeb781b41b9cea3dad06e0e58d
+++ libpurple/protocols/bonjour/bonjour.c 91b8867e0f9183a173d33f9edb7f17ad9988b6ac
@@ -376,20 +376,20 @@ bonjour_tooltip_text(PurpleBuddy *buddy,
}
/* Only show first/last name if there is a nickname set (to avoid duplication) */
- if (bb->nick != NULL) {
- if (bb->first != NULL)
+ if (bb->nick != NULL && *bb->nick != '\0') {
+ if (bb->first != NULL && *bb->first != '\0')
purple_notify_user_info_add_pair(user_info, _("First name"), bb->first);
- if (bb->first != NULL)
+ if (bb->last != NULL && *bb->last != '\0')
purple_notify_user_info_add_pair(user_info, _("Last name"), bb->last);
}
- if (bb->email != NULL)
+ if (bb->email != NULL && *bb->email != '\0')
purple_notify_user_info_add_pair(user_info, _("Email"), bb->email);
- if (bb->AIM != NULL)
+ if (bb->AIM != NULL && *bb->AIM != '\0')
purple_notify_user_info_add_pair(user_info, _("AIM Account"), bb->AIM);
- if (bb->jid!= NULL)
+ if (bb->jid != NULL && *bb->jid != '\0')
purple_notify_user_info_add_pair(user_info, _("XMPP Account"), bb->jid);
}
============================================================
--- libpurple/protocols/bonjour/buddy.c 90aa957aac1ab51f4184dc610cad9605a595d86d
+++ libpurple/protocols/bonjour/buddy.c 741ffaf55edb95623a5167d54909aed6bc4e02b6
@@ -161,7 +161,7 @@ bonjour_buddy_add_to_purple(BonjourBuddy
name = purple_buddy_get_name(buddy);
/* Create the alias for the buddy using the first and the last name */
- if (bonjour_buddy->nick)
+ if (bonjour_buddy->nick && *bonjour_buddy->nick)
serv_got_alias(purple_account_get_connection(account), name, bonjour_buddy->nick);
else {
gchar *alias = NULL;
More information about the Commits
mailing list