Mercurial > pidgin
comparison libpurple/protocols/qq/qq.c @ 31078:3a94faf350c7
Make QQ 2008 the default QQ protocol version. Fixes #11635.
committer: John Bailey <rekkanoryo@rekkanoryo.org>
author | mterry@ubuntu.com |
---|---|
date | Wed, 29 Dec 2010 02:32:10 +0000 |
parents | 351d07aefb09 |
children | a8cc50c2279f |
comparison
equal
deleted
inserted
replaced
31077:37c9f6020c35 | 31078:3a94faf350c7 |
---|---|
155 | 155 |
156 server_list_create(account); | 156 server_list_create(account); |
157 purple_debug_info("QQ", "Server list has %d\n", g_list_length(qd->servers)); | 157 purple_debug_info("QQ", "Server list has %d\n", g_list_length(qd->servers)); |
158 | 158 |
159 version_str = purple_account_get_string(account, "client_version", NULL); | 159 version_str = purple_account_get_string(account, "client_version", NULL); |
160 qd->client_tag = QQ_CLIENT_0D55; /* set default as QQ2005 */ | 160 qd->client_tag = QQ_CLIENT_115B; /* set default as QQ2008 */ |
161 qd->client_version = 2005; | 161 qd->client_version = 2008; |
162 if (version_str != NULL && strlen(version_str) != 0) { | 162 if (version_str != NULL && strlen(version_str) != 0) { |
163 if (strcmp(version_str, "qq2007") == 0) { | 163 if (strcmp(version_str, "qq2005") == 0) { |
164 qd->client_tag = QQ_CLIENT_0D55; | |
165 qd->client_version = 2005; | |
166 } else if (strcmp(version_str, "qq2007") == 0) { | |
164 qd->client_tag = QQ_CLIENT_111D; | 167 qd->client_tag = QQ_CLIENT_111D; |
165 qd->client_version = 2007; | 168 qd->client_version = 2007; |
166 } else if (strcmp(version_str, "qq2008") == 0) { | |
167 qd->client_tag = QQ_CLIENT_115B; | |
168 qd->client_version = 2008; | |
169 } | 169 } |
170 } | 170 } |
171 | 171 |
172 qd->is_show_notice = purple_account_get_bool(account, "show_notice", TRUE); | 172 qd->is_show_notice = purple_account_get_bool(account, "show_notice", TRUE); |
173 qd->is_show_news = purple_account_get_bool(account, "show_news", TRUE); | 173 qd->is_show_news = purple_account_get_bool(account, "show_news", TRUE); |
1111 | 1111 |
1112 option = purple_account_option_list_new(_("Select Server"), "server", server_kv_list); | 1112 option = purple_account_option_list_new(_("Select Server"), "server", server_kv_list); |
1113 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); | 1113 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |
1114 | 1114 |
1115 kvp = g_new0(PurpleKeyValuePair, 1); | 1115 kvp = g_new0(PurpleKeyValuePair, 1); |
1116 kvp->key = g_strdup(_("QQ2005")); | 1116 kvp->key = g_strdup(_("QQ2008")); |
1117 kvp->value = g_strdup("qq2005"); | 1117 kvp->value = g_strdup("qq2008"); |
1118 version_kv_list = g_list_append(version_kv_list, kvp); | 1118 version_kv_list = g_list_append(version_kv_list, kvp); |
1119 | 1119 |
1120 kvp = g_new0(PurpleKeyValuePair, 1); | 1120 kvp = g_new0(PurpleKeyValuePair, 1); |
1121 kvp->key = g_strdup(_("QQ2007")); | 1121 kvp->key = g_strdup(_("QQ2007")); |
1122 kvp->value = g_strdup("qq2007"); | 1122 kvp->value = g_strdup("qq2007"); |
1123 version_kv_list = g_list_append(version_kv_list, kvp); | 1123 version_kv_list = g_list_append(version_kv_list, kvp); |
1124 | 1124 |
1125 kvp = g_new0(PurpleKeyValuePair, 1); | 1125 kvp = g_new0(PurpleKeyValuePair, 1); |
1126 kvp->key = g_strdup(_("QQ2008")); | 1126 kvp->key = g_strdup(_("QQ2005")); |
1127 kvp->value = g_strdup("qq2008"); | 1127 kvp->value = g_strdup("qq2005"); |
1128 version_kv_list = g_list_append(version_kv_list, kvp); | 1128 version_kv_list = g_list_append(version_kv_list, kvp); |
1129 | 1129 |
1130 option = purple_account_option_list_new(_("Client Version"), "client_version", version_kv_list); | 1130 option = purple_account_option_list_new(_("Client Version"), "client_version", version_kv_list); |
1131 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); | 1131 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |
1132 | 1132 |