changeset 27554:38feacee7c86

merge of '04fc08604e52c75e1a6fbe762bd0bf5646fb7707' and '52beafecb8a7a6f963f4ff6271eef29ca699e552'
author Paul Aurich <paul@darkrain42.org>
date Wed, 15 Jul 2009 15:32:11 +0000
parents 828d21a1ec43 (diff) 70dcaa0b6fea (current diff)
children bff61dad9a6b
files
diffstat 5 files changed, 34 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jul 15 05:49:30 2009 +0000
+++ b/ChangeLog	Wed Jul 15 15:32:11 2009 +0000
@@ -113,6 +113,8 @@
 	* Yahoo! and Yahoo! JAPAN are now two separate protocol plugins that share
 	  common protocol code.  You can now have the same account on both
 	  networks.
+	* Ability to set personal details for an account and for buddies in the
+	  buddylist.
 
 	Pidgin:
 	* Added -f command line option to tell Pidgin to ignore NetworkManager
--- a/finch/gntrequest.c	Wed Jul 15 05:49:30 2009 +0000
+++ b/finch/gntrequest.c	Wed Jul 15 15:32:11 2009 +0000
@@ -317,6 +317,8 @@
 		{
 			PurpleRequestField *field = fields->data;
 			PurpleRequestFieldType type = purple_request_field_get_type(field);
+			if (!purple_request_field_is_visible(field))
+				continue;
 			if (type == PURPLE_REQUEST_FIELD_BOOLEAN)
 			{
 				GntWidget *check = FINCH_GET_DATA(field);
@@ -598,11 +600,13 @@
 
 		for (; fields ; fields = fields->next)
 		{
-			/* XXX: Break each of the fields into a separate function? */
 			PurpleRequestField *field = fields->data;
 			PurpleRequestFieldType type = purple_request_field_get_type(field);
 			const char *label = purple_request_field_get_label(field);
 
+			if (!purple_request_field_is_visible(field))
+				continue;
+
 			hbox = gnt_hbox_new(TRUE);   /* hrm */
 			gnt_box_add_widget(GNT_BOX(box), hbox);
 
--- a/libpurple/prefs.h	Wed Jul 15 05:49:30 2009 +0000
+++ b/libpurple/prefs.h	Wed Jul 15 15:32:11 2009 +0000
@@ -315,6 +315,15 @@
 
 /**
  * Add a callback to a pref (and its children)
+ *
+ * @param handle   The handle of the receiver.
+ * @param name     The name of the preference
+ * @param cb       The callback function
+ * @param data     The data to pass to the callback function.
+ *
+ * @return An id to disconnect the callback
+ *
+ * @see purple_prefs_disconnect_callback
  */
 guint purple_prefs_connect_callback(void *handle, const char *name, PurplePrefCallback cb,
 		gpointer data);
--- a/libpurple/privacy.h	Wed Jul 15 05:49:30 2009 +0000
+++ b/libpurple/privacy.h	Wed Jul 15 15:32:11 2009 +0000
@@ -29,7 +29,7 @@
 /**
  * Privacy data types.
  */
-typedef enum
+typedef enum _PurplePrivacyType
 {
 	PURPLE_PRIVACY_ALLOW_ALL = 1,
 	PURPLE_PRIVACY_DENY_ALL,
--- a/libpurple/protocols/yahoo/libymsg.c	Wed Jul 15 05:49:30 2009 +0000
+++ b/libpurple/protocols/yahoo/libymsg.c	Wed Jul 15 15:32:11 2009 +0000
@@ -3408,6 +3408,9 @@
 	PurpleConnection *gc = purple_account_get_connection(account);
 	struct yahoo_data *yd = gc->proto_data = g_new0(struct yahoo_data, 1);
 	PurpleStatus *status = purple_account_get_active_status(account);
+	const char *server = NULL;
+	int pager_port = 0;
+
 	gc->flags |= PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_NO_BGCOLOR | PURPLE_CONNECTION_NO_URLDESC;
 
 	purple_connection_update_progress(gc, _("Connecting"), 1, 2);
@@ -3423,41 +3426,30 @@
 	yd->friends = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, yahoo_friend_free);
 	yd->imvironments = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
 	yd->xfer_peer_idstring_map = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, NULL);
-	yd->peers = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, yahoo_p2p_disconnect_destroy_data);
+	yd->peers = g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
+					yahoo_p2p_disconnect_destroy_data);
 	yd->sms_carrier = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
-	yd->yahoo_p2p_timer = purple_timeout_add_seconds(YAHOO_P2P_KEEPALIVE_SECS, yahoo_p2p_keepalive, gc);
+	yd->yahoo_p2p_timer = purple_timeout_add_seconds(YAHOO_P2P_KEEPALIVE_SECS,
+					yahoo_p2p_keepalive, gc);
 	yd->confs = NULL;
 	yd->conf_id = 2;
 	yd->last_keepalive = yd->last_ping = time(NULL);
 
 	yd->current_status = get_yahoo_status_from_purple_status(status);
+	yd->jp = yahoo_is_japan(account);
 
 	yahoo_server_check(account);
 	yahoo_picture_check(account);
 
-	if (yahoo_is_japan(account)) {
-		yd->jp = TRUE;
-		if (purple_proxy_connect(gc, account,
-		                       purple_account_get_string(account, "server",  YAHOOJP_PAGER_HOST),
-		                       purple_account_get_int(account, "port", YAHOO_PAGER_PORT),
-		                       yahoo_got_connected, gc) == NULL)
-		{
-			purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
-			                               _("Unable to connect"));
-			return;
-		}
-	} else {
-		yd->jp = FALSE;
-		if (purple_proxy_connect(gc, account,
-		                       purple_account_get_string(account, "server",  YAHOO_PAGER_HOST),
-		                       purple_account_get_int(account, "port", YAHOO_PAGER_PORT),
-		                       yahoo_got_connected, gc) == NULL)
-		{
-			purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
-			                               _("Unable to connect"));
-			return;
-		}
-	}
+	server = purple_account_get_string(account, "server",
+					yd->jp ? YAHOOJP_PAGER_HOST : YAHOO_PAGER_HOST);
+	pager_port = purple_account_get_int(account, "port", YAHOO_PAGER_PORT);
+
+	if (purple_proxy_connect(gc, account, server, pager_port, yahoo_got_connected, gc) == NULL)
+		purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
+						_("Unable to connect"));
+
+	return;
 }
 
 void yahoo_close(PurpleConnection *gc) {