- Timestamp:
- 2010-03-21T21:38:42Z (15 years ago)
- Branches:
- master
- Children:
- c735200
- Parents:
- 0cb71a6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/purple/purple.c
r0cb71a6 r437bd9b 581 581 fn = va_arg( actions, void* ); 582 582 583 if( str cmp( caption, "Accept" ) == 0)583 if( strstr( caption, "Accept" ) ) 584 584 { 585 585 pqad->yes = fn; 586 586 pqad->yes_i = i; 587 587 } 588 else if( str cmp( caption, "Reject" ) == 0)588 else if( strstr( caption, "Reject" ) || strstr( caption, "Cancel" ) ) 589 589 { 590 590 pqad->no = fn; … … 659 659 } 660 660 661 static 661 static PurpleNotifyUiOps bee_notify_uiops = 662 662 { 663 663 NULL, 664 664 prplcb_notify_email, 665 }; 666 667 static void prplcb_xfer( PurpleXfer *xfer ) 668 { 669 fprintf( stderr, "ft bla: 0x%p\n", xfer ); 670 } 671 672 static void prpl_xfer_accept( struct file_transfer *ft ) 673 { 674 purple_xfer_request_accepted( ft->data, NULL ); 675 purple_xfer_ui_ready( ft->data ); 676 } 677 678 static void prpl_xfer_reject( struct file_transfer *ft ) 679 { 680 purple_xfer_request_denied( ft->data ); 681 } 682 683 static gboolean prplcb_xfer_new_cb( gpointer data, gint fd, b_input_condition cond ) 684 { 685 PurpleXfer *xfer = data; 686 struct im_connection *ic = purple_ic_by_pa( xfer->account ); 687 file_transfer_t *ft; 688 689 ft = imcb_file_send_start( ic, xfer->who, xfer->filename, xfer->size ); 690 ft->data = xfer; 691 xfer->ui_data = ft; 692 693 ft->accept = prpl_xfer_accept; 694 695 return FALSE; 696 } 697 698 static void prplcb_xfer_new( PurpleXfer *xfer ) 699 { 700 purple_xfer_set_local_filename( xfer, "/tmp/wtf123" ); 701 702 fprintf( stderr, "ft_new bla: 0x%p\n", xfer ); 703 704 b_timeout_add( 0, prplcb_xfer_new_cb, xfer ); 705 } 706 707 static PurpleXferUiOps bee_xfer_uiops = 708 { 709 prplcb_xfer_new, 710 prplcb_xfer, 711 prplcb_xfer, 712 prplcb_xfer, 713 prplcb_xfer, 714 prplcb_xfer, 715 prplcb_xfer, 716 prplcb_xfer, 717 prplcb_xfer, 718 prplcb_xfer, 665 719 }; 666 720 … … 671 725 purple_conversations_set_ui_ops( &bee_conv_uiops ); 672 726 purple_request_set_ui_ops( &bee_request_uiops ); 673 purple_notify_set_ui_ops(&bee_notify_uiops); 674 //purple_debug_set_ui_ops( &bee_debug_uiops ); 727 purple_notify_set_ui_ops( &bee_notify_uiops ); 728 purple_xfers_set_ui_ops( &bee_xfer_uiops ); 729 purple_debug_set_ui_ops( &bee_debug_uiops ); 675 730 } 676 731
Note: See TracChangeset
for help on using the changeset viewer.