From f9a48fb5e46c387e87c190fc62046e732e776b94 Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Fri, 22 Apr 2011 13:36:25 +0000 Subject: handle multiple files via libunique, also use the more reliable get_uris() in libunique --- src/trg-torrent-add-dialog.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/trg-torrent-add-dialog.h') diff --git a/src/trg-torrent-add-dialog.h b/src/trg-torrent-add-dialog.h index 0b932ff..a64379d 100644 --- a/src/trg-torrent-add-dialog.h +++ b/src/trg-torrent-add-dialog.h @@ -46,12 +46,28 @@ typedef struct { GtkDialogClass parent_class; } TrgTorrentAddDialogClass; +/* Use synchronous dispatch() in our dedicated thread function. + * This means torrents are added in sequence, instead of dispatch_async() + * working concurrently for each upload. + */ + +struct add_torrent_threadfunc_args { + GSList *list; + trg_client *client; + gpointer cb_data; + gboolean paused; + gchar *dir; + gint priority; + gboolean extraArgs; +}; + GType trg_torrent_add_dialog_get_type(void); TrgTorrentAddDialog *trg_torrent_add_dialog_new(TrgMainWindow * win, trg_client * client, GSList * filenames); void trg_torrent_add_dialog(TrgMainWindow * win, trg_client * client); +void launch_add_thread(struct add_torrent_threadfunc_args *args); G_END_DECLS #endif /* TRG_TORRENT_ADD_DIALOG_H_ */ -- cgit v1.2.3