From: Jordan Lee Date: Sat, 20 Jul 2013 15:55:29 +0000 (+0000) Subject: (trunk, gtk) #5430: periodic update timer in 'Torrent > Set Location...' should be... X-Git-Tag: 2.82~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d6ace29ba3561e37c1c5668ddc338c3f5fea57c;p=transmission (trunk, gtk) #5430: periodic update timer in 'Torrent > Set Location...' should be cleared immediately when dialog is closed. --- diff --git a/gtk/relocate.c b/gtk/relocate.c index b6d928473..000f69357 100644 --- a/gtk/relocate.c +++ b/gtk/relocate.c @@ -28,6 +28,7 @@ struct relocate_dialog_data { int done; bool do_move; + guint timer; TrCore * core; GSList * torrent_ids; GtkWidget * message_dialog; @@ -38,6 +39,7 @@ static void data_free (gpointer gdata) { struct relocate_dialog_data * data = gdata; + g_source_remove (data->timer); g_slist_free (data->torrent_ids); g_free (data); } @@ -127,8 +129,8 @@ onResponse (GtkDialog * dialog, int response, gpointer unused UNUSED) /* start the move and periodically check its status */ data->message_dialog = w; data->done = TR_LOC_DONE; + data->timer = gdk_threads_add_timeout_seconds (1, onTimer, data); onTimer (data); - gdk_threads_add_timeout_seconds (1, onTimer, data); } else {