[grilo-plugins] [shoutcast] Notify remaining==0 when user cancels operation
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] [shoutcast] Notify remaining==0 when user cancels operation
- Date: Wed, 2 Jun 2010 14:54:03 +0000 (UTC)
commit ec7416b2d2df3638b9dc991a9498f61ad4d45737
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Wed Jun 2 16:52:08 2010 +0200
[shoutcast] Notify remaining==0 when user cancels operation
When user cancels browse() operation, invoke the callback for last time, with
remaining as 0, so UI knows that cancel was in fact done.
It fixes GB#620334.
src/shoutcast/grl-shoutcast.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/shoutcast/grl-shoutcast.c b/src/shoutcast/grl-shoutcast.c
index fe40d82..9522e3a 100644
--- a/src/shoutcast/grl-shoutcast.c
+++ b/src/shoutcast/grl-shoutcast.c
@@ -270,6 +270,13 @@ send_media (OperationData *op_data, GrlMedia *media)
NULL);
op_data->xml_entries = op_data->xml_entries->next;
+ } else {
+ op_data->result_cb (op_data->source,
+ op_data->operation_id,
+ NULL,
+ 0,
+ op_data->user_data,
+ NULL);
}
if (op_data->to_send == 0 || op_data->cancelled) {
@@ -306,6 +313,12 @@ xml_parse_result (const gchar *str, OperationData *op_data)
xmlXPathObjectPtr xpath_res;
if (op_data->cancelled) {
+ op_data->result_cb (op_data->source,
+ op_data->operation_id,
+ NULL,
+ 0,
+ op_data->user_data,
+ NULL);
g_slice_free (OperationData, op_data);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]