comparison src/gtkft.c @ 4675:3145c5c45877

[gaim-migrate @ 4986] Okay, redid the cancel stuff. It may not work too well yet, as it's largely untested, and will need some testing and bug reporting. The protocols may not work too well (namely, Oscar), but this will be fixed soon. Note that that's only for canceling. Any receiving that currently works will continue to work. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 08 Mar 2003 08:27:02 +0000
parents ccc304cb0389
children 2c380754eb67
comparison
equal deleted inserted replaced
4674:7ffe2b64de2d 4675:3145c5c45877
328 static void 328 static void
329 selection_changed_cb(GtkTreeSelection *selection, 329 selection_changed_cb(GtkTreeSelection *selection,
330 struct gaim_gtkxfer_dialog *dialog) 330 struct gaim_gtkxfer_dialog *dialog)
331 { 331 {
332 GtkTreeIter iter; 332 GtkTreeIter iter;
333 struct gaim_xfer *xfer = NULL;
333 334
334 if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { 335 if (gtk_tree_selection_get_selected(selection, NULL, &iter)) {
335 GValue val = {0, }; 336 GValue val = {0, };
336 struct gaim_xfer *xfer;
337 337
338 gtk_widget_set_sensitive(dialog->disclosure, TRUE); 338 gtk_widget_set_sensitive(dialog->disclosure, TRUE);
339 339
340 gtk_tree_model_get_value(GTK_TREE_MODEL(dialog->model), 340 gtk_tree_model_get_value(GTK_TREE_MODEL(dialog->model),
341 &iter, COLUMN_DATA, &val); 341 &iter, COLUMN_DATA, &val);
380 } 380 }
381 381
382 static void 382 static void
383 stop_button_cb(GtkButton *button, struct gaim_gtkxfer_dialog *dialog) 383 stop_button_cb(GtkButton *button, struct gaim_gtkxfer_dialog *dialog)
384 { 384 {
385 gaim_xfer_cancel(dialog->selected_xfer); 385 gaim_xfer_cancel_local(dialog->selected_xfer);
386 } 386 }
387 387
388 /************************************************************************** 388 /**************************************************************************
389 * Dialog Building Functions 389 * Dialog Building Functions
390 **************************************************************************/ 390 **************************************************************************/
1121 /* if (xfer->ui_data == NULL) 1121 /* if (xfer->ui_data == NULL)
1122 gaim_xfer_destroy(xfer); */ 1122 gaim_xfer_destroy(xfer); */
1123 } 1123 }
1124 1124
1125 static void 1125 static void
1126 gaim_gtkxfer_cancel(struct gaim_xfer *xfer) 1126 gaim_gtkxfer_cancel_local(struct gaim_xfer *xfer)
1127 { 1127 {
1128 gaim_gtkxfer_dialog_cancel_xfer(xfer_dialog, xfer); 1128 gaim_gtkxfer_dialog_cancel_xfer(xfer_dialog, xfer);
1129 1129 }
1130 /* See if it's removed. */ 1130
1131 /* XXX - This caused some looping, and I don't see a point to it */ 1131 static void
1132 /* if (xfer->ui_data == NULL) 1132 gaim_gtkxfer_cancel_remote(struct gaim_xfer *xfer)
1133 gaim_xfer_destroy(xfer); */ 1133 {
1134 gaim_gtkxfer_dialog_cancel_xfer(xfer_dialog, xfer);
1134 } 1135 }
1135 1136
1136 struct gaim_xfer_ui_ops ops = 1137 struct gaim_xfer_ui_ops ops =
1137 { 1138 {
1138 gaim_gtkxfer_destroy, 1139 gaim_gtkxfer_destroy,
1139 gaim_gtkxfer_request_file, 1140 gaim_gtkxfer_request_file,
1140 gaim_gtkxfer_ask_cancel, 1141 gaim_gtkxfer_ask_cancel,
1141 gaim_gtkxfer_add_xfer, 1142 gaim_gtkxfer_add_xfer,
1142 gaim_gtkxfer_update_progress, 1143 gaim_gtkxfer_update_progress,
1143 gaim_gtkxfer_cancel 1144 gaim_gtkxfer_cancel_local,
1145 gaim_gtkxfer_cancel_remote
1144 }; 1146 };
1145 1147
1146 /************************************************************************** 1148 /**************************************************************************
1147 * GTK+ File Transfer API 1149 * GTK+ File Transfer API
1148 **************************************************************************/ 1150 **************************************************************************/