pidgin: e1b0559d: Allow setting custom status messages for...

maiku at pidgin.im maiku at pidgin.im
Mon Jun 13 17:55:41 EDT 2011


----------------------------------------------------------------------
Revision: e1b0559d5747c6a3d7f70ccd0bd863ebc8caa320
Parent:   64f4eb5c598356fe1b8b9bc376faa66641096eda
Author:   maiku at pidgin.im
Date:     06/13/11 17:44:04
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e1b0559d5747c6a3d7f70ccd0bd863ebc8caa320

Changelog: 

Allow setting custom status messages for Yahoo when "Busy"

Changes against parent 64f4eb5c598356fe1b8b9bc376faa66641096eda

  patched  libpurple/protocols/yahoo/libymsg.c

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/libymsg.c	005e58473b7b328b3116a46be5ae83885eb57a51
+++ libpurple/protocols/yahoo/libymsg.c	85425c053ed4f8505c13ea478506abff6da461fc
@@ -3567,11 +3567,10 @@ static int get_yahoo_status_from_purple_
 	status_id = purple_status_get_id(status);
 	msg = purple_status_get_attr_string(status, "message");
 
-	if (!strcmp(status_id, YAHOO_STATUS_TYPE_AVAILABLE)) {
-		if ((msg != NULL) && (*msg != '\0'))
-			return YAHOO_STATUS_CUSTOM;
-		else
-			return YAHOO_STATUS_AVAILABLE;
+	if ((msg != NULL) && (*msg != '\0')) {
+		return YAHOO_STATUS_CUSTOM;
+	} else if (!strcmp(status_id, YAHOO_STATUS_TYPE_AVAILABLE)) {
+		return YAHOO_STATUS_AVAILABLE;
 	} else if (!strcmp(status_id, YAHOO_STATUS_TYPE_BRB)) {
 		return YAHOO_STATUS_BRB;
 	} else if (!strcmp(status_id, YAHOO_STATUS_TYPE_BUSY)) {
@@ -4876,7 +4875,10 @@ GList *yahoo_status_types(PurpleAccount 
 	type = purple_status_type_new(PURPLE_STATUS_AWAY, YAHOO_STATUS_TYPE_BRB, _("Be Right Back"), TRUE);
 	types = g_list_append(types, type);
 
-	type = purple_status_type_new(PURPLE_STATUS_UNAVAILABLE, YAHOO_STATUS_TYPE_BUSY, _("Busy"), TRUE);
+	type = purple_status_type_new_with_attrs(PURPLE_STATUS_UNAVAILABLE, YAHOO_STATUS_TYPE_BUSY,
+	                                       _("Busy"), TRUE, TRUE, FALSE,
+	                                       "message", _("Message"),
+	                                       purple_value_new(PURPLE_TYPE_STRING), NULL);
 	types = g_list_append(types, type);
 
 	type = purple_status_type_new(PURPLE_STATUS_AWAY, YAHOO_STATUS_TYPE_NOTATHOME, _("Not at Home"), TRUE);


More information about the Commits mailing list