#include void disconnect_user ( GtkWidget *widget, gpointer user_data ) { conv_conn * cc; extern user_info *userstuff; cc = get_conversation_from_name( get_treeview_selection_name() ); if ( cc == NULL ) //should connect if they are not already connected. { g_print ( "no conversation\n" ); return ; } //FIXME: I should hunt down any existing windows and ask about them first. if ( cutlass_conn_shutdown ( userstuff->cutlass_info, cc->connection ) != 0 ) g_warning ( "error shutting down connection" ); // I really should ask first. gtk_object_destroy ( GTK_OBJECT ( cc->winder ) ); conv_conn_destroy ( cc ); } void connection_status_window ( GtkWidget *widget, gpointer user_data ) { g_print ( "connection_status_window: called\n" ); } void popup_send_file ( GtkWidget *widget, gpointer user_data ) { conv_conn * cc; extern user_info *userstuff; gchar *filename = NULL; GtkWidget *fileselection; cc = get_conversation_from_name( get_treeview_selection_name() ); if ( cc == NULL ) // if this is NULL, they are not connected, or something is busted. { g_print ( "No conversation\n" ); return ; } fileselection = gtk_file_chooser_dialog_new ( "Select File to Send", GTK_WINDOW( gtk_widget_get_toplevel( widget ) ), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL ); if ( gtk_dialog_run ( GTK_DIALOG( fileselection ) ) == GTK_RESPONSE_CANCEL ) return ; filename = gtk_file_chooser_get_filename ( GTK_FILE_CHOOSER ( fileselection ) ); if ( cutlass_file_offer ( userstuff->cutlass_info, cc->connection, filename ) == -1 ) tellem ( "Error sending file" ); g_free( filename ); gtk_widget_destroy( fileselection ); return ; } void popup_start_audio ( GtkWidget *widget, gpointer user_data ) { g_print ( "popup_start_audio: called\n" ); }