Mercurial > pidgin.yaz
comparison src/protocols/oscar/oscar.c @ 13311:f6f465b8d1c0
[gaim-migrate @ 15677]
Honor the 'use_rv_proxy' account option and remove the prpl prefs.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 21 Feb 2006 19:56:50 +0000 |
parents | 263c2db78f77 |
children | 554575d1f9b5 |
comparison
equal
deleted
inserted
replaced
13310:10c26505d6db | 13311:f6f465b8d1c0 |
---|---|
2752 GaimXfer *xfer; | 2752 GaimXfer *xfer; |
2753 PeerConnection *peer_connection; | 2753 PeerConnection *peer_connection; |
2754 const char *ip; | 2754 const char *ip; |
2755 gboolean use_rv_proxy; | 2755 gboolean use_rv_proxy; |
2756 | 2756 |
2757 use_rv_proxy = gaim_prefs_get_bool("/plugins/prpl/oscar/use_rv_proxy"); | 2757 use_rv_proxy = gaim_account_get_bool(gc->account, "use_rv_proxy", OSCAR_DEFAULT_USE_RV_PROXY); |
2758 if(use_rv_proxy) | 2758 if(use_rv_proxy) |
2759 gaim_debug_info("oscar","using stage 1 proxied transfer\n"); | 2759 gaim_debug_info("oscar","using stage 1 proxied transfer\n"); |
2760 | 2760 |
2761 od = (OscarData *)gc->proto_data; | 2761 od = (OscarData *)gc->proto_data; |
2762 | 2762 |
4228 } | 4228 } |
4229 | 4229 |
4230 /* Build the file transfer handle */ | 4230 /* Build the file transfer handle */ |
4231 xfer = gaim_xfer_new(gc->account, GAIM_XFER_RECEIVE, userinfo->sn); | 4231 xfer = gaim_xfer_new(gc->account, GAIM_XFER_RECEIVE, userinfo->sn); |
4232 | 4232 |
4233 use_rv_proxy = gaim_prefs_get_bool("/plugins/prpl/oscar/use_rv_proxy"); | 4233 use_rv_proxy = gaim_account_get_bool(account, "use_rv_proxy", OSCAR_DEFAULT_USE_RV_PROXY); |
4234 | 4234 |
4235 if(args->info.sendfile.use_proxy) { | 4235 if(args->info.sendfile.use_proxy) { |
4236 /* The sender requested (stage 1) that we use a rendezvous proxy */ | 4236 /* The sender requested (stage 1) that we use a rendezvous proxy */ |
4237 xfer_method = AIM_XFER_PROXY; | 4237 xfer_method = AIM_XFER_PROXY; |
4238 proxy_stage = AIM_XFER_PROXY_STG1; | 4238 proxy_stage = AIM_XFER_PROXY_STG1; |
8523 aim_ssi_setpresence(sess, presence); | 8523 aim_ssi_setpresence(sess, presence); |
8524 } else { | 8524 } else { |
8525 presence |= AIM_SSI_PRESENCE_FLAG_NORECENTBUDDIES; | 8525 presence |= AIM_SSI_PRESENCE_FLAG_NORECENTBUDDIES; |
8526 aim_ssi_setpresence(sess, presence); | 8526 aim_ssi_setpresence(sess, presence); |
8527 } | 8527 } |
8528 } | |
8529 | |
8530 static GaimPluginPrefFrame * | |
8531 get_plugin_pref_frame(GaimPlugin *plugin) | |
8532 { | |
8533 GaimPluginPrefFrame *frame; | |
8534 GaimPluginPref *ppref; | |
8535 | |
8536 frame = gaim_plugin_pref_frame_new(); | |
8537 | |
8538 #ifdef USE_PRPL_PREFERENCES | |
8539 ppref = gaim_plugin_pref_new_with_name_and_label("/plugins/prpl/oscar/recent_buddies", _("Use recent buddies group")); | |
8540 gaim_plugin_pref_frame_add(frame, ppref); | |
8541 | |
8542 ppref = gaim_plugin_pref_new_with_name_and_label("/plugins/prpl/oscar/show_idle", _("Show how long you have been idle")); | |
8543 gaim_plugin_pref_frame_add(frame, ppref); | |
8544 #endif | |
8545 | |
8546 ppref = gaim_plugin_pref_new_with_label(_("File Transfers")); | |
8547 gaim_plugin_pref_frame_add(frame, ppref); | |
8548 | |
8549 ppref = gaim_plugin_pref_new_with_name_and_label( | |
8550 "/plugins/prpl/oscar/use_rv_proxy", | |
8551 _("Use AIM/ICQ proxy server (slower, but usually works)")); | |
8552 gaim_plugin_pref_frame_add(frame, ppref); | |
8553 | |
8554 return frame; | |
8555 } | 8528 } |
8556 | 8529 |
8557 static const char * | 8530 static const char * |
8558 oscar_normalize(const GaimAccount *account, const char *str) | 8531 oscar_normalize(const GaimAccount *account, const char *str) |
8559 { | 8532 { |
8657 oscar_new_xfer, /* new_xfer */ | 8630 oscar_new_xfer, /* new_xfer */ |
8658 oscar_offline_message, /* offline_message */ | 8631 oscar_offline_message, /* offline_message */ |
8659 NULL, /* whiteboard_prpl_ops */ | 8632 NULL, /* whiteboard_prpl_ops */ |
8660 }; | 8633 }; |
8661 | 8634 |
8662 static GaimPluginUiInfo prefs_info = { | |
8663 get_plugin_pref_frame, | |
8664 0, /* page_num (Reserved) */ | |
8665 NULL /* frame (Reserved) */ | |
8666 }; | |
8667 | |
8668 static GaimPluginInfo info = | 8635 static GaimPluginInfo info = |
8669 { | 8636 { |
8670 GAIM_PLUGIN_MAGIC, | 8637 GAIM_PLUGIN_MAGIC, |
8671 GAIM_MAJOR_VERSION, | 8638 GAIM_MAJOR_VERSION, |
8672 GAIM_MINOR_VERSION, | 8639 GAIM_MINOR_VERSION, |
8690 NULL, /**< unload */ | 8657 NULL, /**< unload */ |
8691 NULL, /**< destroy */ | 8658 NULL, /**< destroy */ |
8692 | 8659 |
8693 NULL, /**< ui_info */ | 8660 NULL, /**< ui_info */ |
8694 &prpl_info, /**< extra_info */ | 8661 &prpl_info, /**< extra_info */ |
8695 &prefs_info, | 8662 NULL, |
8696 oscar_actions | 8663 oscar_actions |
8697 }; | 8664 }; |
8698 | 8665 |
8699 static void | 8666 static void |
8700 init_plugin(GaimPlugin *plugin) | 8667 init_plugin(GaimPlugin *plugin) |
8717 | 8684 |
8718 /* Preferences */ | 8685 /* Preferences */ |
8719 gaim_prefs_add_none("/plugins/prpl/oscar"); | 8686 gaim_prefs_add_none("/plugins/prpl/oscar"); |
8720 gaim_prefs_add_bool("/plugins/prpl/oscar/recent_buddies", FALSE); | 8687 gaim_prefs_add_bool("/plugins/prpl/oscar/recent_buddies", FALSE); |
8721 gaim_prefs_add_bool("/plugins/prpl/oscar/show_idle", FALSE); | 8688 gaim_prefs_add_bool("/plugins/prpl/oscar/show_idle", FALSE); |
8722 gaim_prefs_add_bool("/plugins/prpl/oscar/use_rv_proxy", FALSE); | 8689 |
8690 gaim_prefs_remove("/plugins/prpl/oscar/use_rv_proxy"); | |
8723 } | 8691 } |
8724 | 8692 |
8725 GAIM_INIT_PLUGIN(oscar, init_plugin, info); | 8693 GAIM_INIT_PLUGIN(oscar, init_plugin, info); |