Changeset d0527c1 for protocols/purple
- Timestamp:
- 2010-07-17T11:34:24Z (14 years ago)
- Branches:
- master
- Children:
- a08e875
- Parents:
- 177ffd7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/purple/purple.c
r177ffd7 rd0527c1 884 884 } 885 885 886 /* 886 887 static void prplcb_request_test() 887 888 { 888 889 fprintf( stderr, "bla\n" ); 889 890 } 891 */ 890 892 891 893 static PurpleRequestUiOps bee_request_uiops = 892 894 { 893 prplcb_request_test,894 prplcb_request_test,895 NULL, 896 NULL, 895 897 prplcb_request_action, 896 prplcb_request_test,897 prplcb_request_test,898 prplcb_request_test,899 prplcb_request_test,898 NULL, 899 NULL, 900 NULL, 901 NULL, 900 902 }; 901 903 … … 1048 1050 }; 1049 1051 1052 static void *prplcb_account_request_authorize( PurpleAccount *account, const char *remote_user, 1053 const char *id, const char *alias, const char *message, gboolean on_list, 1054 PurpleAccountRequestAuthorizationCb authorize_cb, PurpleAccountRequestAuthorizationCb deny_cb, void *user_data ) 1055 { 1056 struct im_connection *ic = purple_ic_by_pa( account ); 1057 char *q; 1058 1059 if( alias ) 1060 q = g_strdup_printf( "%s (%s) wants to add you to his/her contact " 1061 "list. (%s)", alias, remote_user, message ); 1062 else 1063 q = g_strdup_printf( "%s wants to add you to his/her contact " 1064 "list. (%s)", remote_user, message ); 1065 1066 imcb_ask_with_free( ic, q, user_data, authorize_cb, deny_cb, NULL ); 1067 g_free( q ); 1068 } 1069 1070 static PurpleAccountUiOps bee_account_uiops = 1071 { 1072 NULL, 1073 NULL, 1074 NULL, 1075 prplcb_account_request_authorize, 1076 NULL, 1077 }; 1078 1050 1079 extern PurpleXferUiOps bee_xfer_uiops; 1051 1080 1052 1081 static void purple_ui_init() 1053 1082 { 1083 purple_connections_set_ui_ops( &bee_conn_uiops ); 1054 1084 purple_blist_set_ui_ops( &bee_blist_uiops ); 1055 purple_connections_set_ui_ops( &bee_conn_uiops );1056 1085 purple_conversations_set_ui_ops( &bee_conv_uiops ); 1057 1086 purple_request_set_ui_ops( &bee_request_uiops ); 1087 purple_privacy_set_ui_ops( &bee_privacy_uiops ); 1058 1088 purple_notify_set_ui_ops( &bee_notify_uiops ); 1089 purple_accounts_set_ui_ops( &bee_account_uiops ); 1059 1090 purple_xfers_set_ui_ops( &bee_xfer_uiops ); 1060 purple_privacy_set_ui_ops( &bee_privacy_uiops );1061 1091 1062 1092 if( getenv( "BITLBEE_DEBUG" ) ) … … 1077 1107 } 1078 1108 1079 purple_util_set_user_dir( "/tmp");1080 purple_debug_set_enabled( FALSE);1081 purple_core_set_ui_ops( &bee_core_uiops);1082 purple_eventloop_set_ui_ops( &glib_eventloops);1109 purple_util_set_user_dir( "/tmp" ); 1110 purple_debug_set_enabled( FALSE ); 1111 purple_core_set_ui_ops( &bee_core_uiops ); 1112 purple_eventloop_set_ui_ops( &glib_eventloops ); 1083 1113 if( !purple_core_init( "BitlBee") ) 1084 1114 { … … 1089 1119 1090 1120 /* This seems like stateful shit we don't want... */ 1091 purple_set_blist( purple_blist_new());1121 purple_set_blist( purple_blist_new() ); 1092 1122 purple_blist_load(); 1093 1123 … … 1120 1150 funcs.transfer_request = purple_transfer_request; 1121 1151 1122 help = g_string_new( "BitlBee libpurple module supports the following IM protocols:\n");1152 help = g_string_new( "BitlBee libpurple module supports the following IM protocols:\n" ); 1123 1153 1124 1154 /* Add a protocol entry to BitlBee's structures for every protocol
Note: See TracChangeset
for help on using the changeset viewer.