Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/libxmpp.c @ 31449:1c660ba17ba1
propagate from branch 'im.pidgin.pidgin' (head 6f879669a6513a5c40335bbaefe842389a92b39e)
to branch 'im.pidgin.cpw.qulogic.cairo' (head 4ab0199887f74442673fd46dcbb662bc7f070bc4)
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Sun, 21 Nov 2010 20:30:12 +0000 |
parents | 25e200cb3532 |
children | 7c33eaed54e5 |
comparison
equal
deleted
inserted
replaced
31448:9a705087d64e | 31449:1c660ba17ba1 |
---|---|
39 #include "message.h" | 39 #include "message.h" |
40 #include "roster.h" | 40 #include "roster.h" |
41 #include "si.h" | 41 #include "si.h" |
42 #include "message.h" | 42 #include "message.h" |
43 #include "presence.h" | 43 #include "presence.h" |
44 #include "google.h" | 44 #include "google/google.h" |
45 #include "pep.h" | 45 #include "pep.h" |
46 #include "usermood.h" | 46 #include "usermood.h" |
47 #include "usertune.h" | 47 #include "usertune.h" |
48 #include "caps.h" | 48 #include "caps.h" |
49 #include "data.h" | 49 #include "data.h" |
251 static void | 251 static void |
252 init_plugin(PurplePlugin *plugin) | 252 init_plugin(PurplePlugin *plugin) |
253 { | 253 { |
254 PurpleAccountUserSplit *split; | 254 PurpleAccountUserSplit *split; |
255 PurpleAccountOption *option; | 255 PurpleAccountOption *option; |
256 GList *encryption_values = NULL; | |
256 | 257 |
257 /* Translators: 'domain' is used here in the context of Internet domains, e.g. pidgin.im */ | 258 /* Translators: 'domain' is used here in the context of Internet domains, e.g. pidgin.im */ |
258 split = purple_account_user_split_new(_("Domain"), NULL, '@'); | 259 split = purple_account_user_split_new(_("Domain"), NULL, '@'); |
259 purple_account_user_split_set_reverse(split, FALSE); | 260 purple_account_user_split_set_reverse(split, FALSE); |
260 prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); | 261 prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); |
261 | 262 |
262 split = purple_account_user_split_new(_("Resource"), "", '/'); | 263 split = purple_account_user_split_new(_("Resource"), "", '/'); |
263 purple_account_user_split_set_reverse(split, FALSE); | 264 purple_account_user_split_set_reverse(split, FALSE); |
264 prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); | 265 prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); |
265 | 266 |
266 option = purple_account_option_bool_new(_("Require SSL/TLS"), "require_tls", JABBER_DEFAULT_REQUIRE_TLS); | 267 #define ADD_VALUE(list, desc, v) { \ |
267 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, | 268 PurpleKeyValuePair *kvp = g_new0(PurpleKeyValuePair, 1); \ |
268 option); | 269 kvp->key = g_strdup((desc)); \ |
269 | 270 kvp->value = g_strdup((v)); \ |
270 option = purple_account_option_bool_new(_("Force old (port 5223) SSL"), "old_ssl", FALSE); | 271 list = g_list_prepend(list, kvp); \ |
271 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, | 272 } |
272 option); | 273 |
274 ADD_VALUE(encryption_values, _("Require encryption"), "require_tls"); | |
275 ADD_VALUE(encryption_values, _("Use encryption if available"), "opportunistic_tls"); | |
276 ADD_VALUE(encryption_values, _("Use old-style SSL"), "old_ssl"); | |
277 #if 0 | |
278 ADD_VALUE(encryption_values, "None", "none"); | |
279 #endif | |
280 encryption_values = g_list_reverse(encryption_values); | |
281 | |
282 #undef ADD_VALUE | |
283 | |
284 option = purple_account_option_list_new(_("Connection security"), "connection_security", encryption_values); | |
285 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, | |
286 option); | |
273 | 287 |
274 option = purple_account_option_bool_new( | 288 option = purple_account_option_bool_new( |
275 _("Allow plaintext auth over unencrypted streams"), | 289 _("Allow plaintext auth over unencrypted streams"), |
276 "auth_plain_in_clear", FALSE); | 290 "auth_plain_in_clear", FALSE); |
277 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, | 291 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, |