| 46 #include "gg-utils.h" |
46 #include "gg-utils.h" |
| 47 |
47 |
| 48 #ifdef _WIN32 |
48 #ifdef _WIN32 |
| 49 # include "win32-resolver.h" |
49 # include "win32-resolver.h" |
| 50 #endif |
50 #endif |
| 51 |
|
| 52 static PurplePlugin *my_protocol = NULL; |
|
| 53 |
51 |
| 54 /* Prototypes */ |
52 /* Prototypes */ |
| 55 static void ggp_set_status(PurpleAccount *account, PurpleStatus *status); |
53 static void ggp_set_status(PurpleAccount *account, PurpleStatus *status); |
| 56 static int ggp_to_gg_status(PurpleStatus *status, char **msg); |
54 static int ggp_to_gg_status(PurpleStatus *status, char **msg); |
| 57 |
55 |
| 2973 static void init_plugin(PurplePlugin *plugin) |
2971 static void init_plugin(PurplePlugin *plugin) |
| 2974 { |
2972 { |
| 2975 PurpleAccountOption *option; |
2973 PurpleAccountOption *option; |
| 2976 GList *encryption_options = NULL; |
2974 GList *encryption_options = NULL; |
| 2977 |
2975 |
| |
2976 purple_debug_info("gg", "init_plugin: [libgadu version: %s]\n", |
| |
2977 gg_libgadu_version()); |
| |
2978 |
| 2978 option = purple_account_option_string_new(_("GG server"), |
2979 option = purple_account_option_string_new(_("GG server"), |
| 2979 "gg_server", ""); |
2980 "gg_server", ""); |
| 2980 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, |
2981 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, |
| 2981 option); |
2982 option); |
| 2982 |
2983 |
| 2999 |
3000 |
| 3000 option = purple_account_option_bool_new(_("Show links from strangers"), |
3001 option = purple_account_option_bool_new(_("Show links from strangers"), |
| 3001 "show_links_from_strangers", 1); |
3002 "show_links_from_strangers", 1); |
| 3002 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, |
3003 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, |
| 3003 option); |
3004 option); |
| 3004 |
|
| 3005 my_protocol = plugin; |
|
| 3006 |
3005 |
| 3007 gg_debug_handler = purple_gg_debug_handler; |
3006 gg_debug_handler = purple_gg_debug_handler; |
| 3008 |
3007 |
| 3009 #ifdef _WIN32 |
3008 #ifdef _WIN32 |
| 3010 gg_global_set_custom_resolver(ggp_resolver_win32thread_start, |
3009 gg_global_set_custom_resolver(ggp_resolver_win32thread_start, |