changeset 11043:629cbfd1ed6d

[gaim-migrate @ 12957] Patch #1210242 from Bleeter "Following on from patch 941731, I've updated for both head and oldstatus. I couldn't submit the patches there, so I've opened this so I can do so here. As noted in the other tracker entry, I have some testing to do on all known locales so the FAQ can be updated accordingly. I'll submit patches once I've done this check." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 30 Jun 2005 05:33:05 +0000
parents a5c31b83063f
children 8bf376579177
files src/protocols/yahoo/yahoo.c src/protocols/yahoo/yahoo.h src/protocols/yahoo/yahoochat.c
diffstat 3 files changed, 26 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo.c	Thu Jun 30 05:13:41 2005 +0000
+++ b/src/protocols/yahoo/yahoo.c	Thu Jun 30 05:33:05 2005 +0000
@@ -2437,8 +2437,6 @@
 			return;
 		}
 	}
-
-
 }
 
 static void yahoo_close(GaimConnection *gc) {
@@ -3585,9 +3583,12 @@
 	option = gaim_account_option_int_new(_("File transfer port"), "xfer_port", YAHOO_XFER_PORT);
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
 
+	option = gaim_account_option_string_new(_("Chat Room Locale"), "room_list_locale", YAHOO_ROOMLIST_LOCALE);
+	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
+#if 0
 	option = gaim_account_option_string_new(_("Chat Room List Url"), "room_list", YAHOO_ROOMLIST_URL);
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
-#if 0
+
 	option = gaim_account_option_string_new(_("YCHT Host"), "ycht-server", YAHOO_YCHT_HOST);
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
 
--- a/src/protocols/yahoo/yahoo.h	Thu Jun 30 05:13:41 2005 +0000
+++ b/src/protocols/yahoo/yahoo.h	Thu Jun 30 05:33:05 2005 +0000
@@ -34,7 +34,7 @@
 #define YAHOO_XFER_HOST "filetransfer.msg.yahoo.com"
 #define YAHOO_XFER_PORT 80
 #define YAHOO_ROOMLIST_URL "http://insider.msg.yahoo.com/ycontent/"
-
+#define YAHOO_ROOMLIST_LOCALE ""
 /* really we should get the list of servers from
  http://update.messenger.yahoo.co.jp/servers.html */
 #define YAHOOJP_PAGER_HOST "cs.yahoo.co.jp"
--- a/src/protocols/yahoo/yahoochat.c	Thu Jun 30 05:13:41 2005 +0000
+++ b/src/protocols/yahoo/yahoochat.c	Thu Jun 30 05:33:05 2005 +0000
@@ -1361,10 +1361,17 @@
 	GList *fields = NULL;
 	GaimRoomlistField *f;
 
-	url = g_strdup_printf("%s?chatcat=0",
-	                      gaim_account_get_string(
-	                      gaim_connection_get_account(gc),
-	                      "room_list", YAHOO_ROOMLIST_URL));
+	if (YAHOO_ROOMLIST_LOCALE) {
+		url = g_strdup_printf("%s?chatcat=0&intl=%s",
+	        gaim_account_get_string(gaim_connection_get_account(gc),
+	        "room_list", YAHOO_ROOMLIST_URL),
+	        gaim_account_get_string(gaim_connection_get_account(gc),
+	        "room_list_locale", YAHOO_ROOMLIST_LOCALE));
+	} else {
+		url = g_strdup_printf("%s?chatcat=0",
+	        gaim_account_get_string(gaim_connection_get_account(gc),
+	        "room_list", YAHOO_ROOMLIST_URL));
+	}
 
 	yrl = g_new0(struct yahoo_roomlist, 1);
 	rl = gaim_roomlist_new(gaim_connection_get_account(gc));
@@ -1437,10 +1444,16 @@
 		return;
 	}
 
-	url = g_strdup_printf("%s?chatroom_%s=0",
-	                      gaim_account_get_string(
-	                      list->account,
-	                      "room_list", YAHOO_ROOMLIST_URL), id);
+	if (YAHOO_ROOMLIST_LOCALE) {
+		url = g_strdup_printf("%s?chatroom_%s=0&intl=%s",
+	       gaim_account_get_string(list->account,"room_list", 
+	       YAHOO_ROOMLIST_URL), id, gaim_account_get_string(list->account,
+	       "room_list_locale", YAHOO_ROOMLIST_LOCALE));
+	} else {
+		url = g_strdup_printf("%s?chatroom_%s=0",
+	       gaim_account_get_string(list->account,"room_list",
+	       YAHOO_ROOMLIST_URL), id);
+	}
 
 	yrl = g_new0(struct yahoo_roomlist, 1);
 	yrl->list = list;