summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-10-13 21:12:46 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-10-13 21:12:46 +0000
commit8be537ef80ec6e211bae5a67b99af74bb744c453 (patch)
tree20a0f6abb434249c8dedeaa4024cf41cbda49c51 /src
parente2dc56fff13148973f16ba9e92eedbcc9770f31f (diff)
if the app is started with a torrent and autoconnect, upload it after the first update, not session_get. noticed a bunch of added notifications when connecting, think this is because the first update isn't through the first update callback.
Diffstat (limited to 'src')
-rw-r--r--src/trg-main-window.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/trg-main-window.c b/src/trg-main-window.c
index 37e5cfe..c1af8d3 100644
--- a/src/trg-main-window.c
+++ b/src/trg-main-window.c
@@ -852,8 +852,6 @@ static gboolean on_session_get(gpointer data) {
if (!isConnected) {
trg_trackers_tree_view_new_connection(priv->trackersTreeView, client);
dispatch_async(client, torrent_get(-1), on_torrent_get_first, win);
- if (priv->args)
- trg_add_from_filename(win, priv->args);
}
trg_response_free(response);
@@ -939,7 +937,16 @@ static gboolean on_torrent_get_active(gpointer data) {
}
static gboolean on_torrent_get_first(gpointer data) {
- return on_torrent_get(data, TORRENT_GET_MODE_FIRST);
+ trg_response *response = (trg_response*)data;
+ TrgMainWindowPrivate *priv = TRG_MAIN_WINDOW_GET_PRIVATE(response->cb_data);
+ TrgMainWindow *win = TRG_MAIN_WINDOW(response->cb_data);
+
+ gboolean result = on_torrent_get(data, TORRENT_GET_MODE_FIRST);
+
+ if (priv->args)
+ trg_add_from_filename(win, priv->args);
+
+ return result;
}
static gboolean on_torrent_get_interactive(gpointer data) {