summaryrefslogtreecommitdiff
path: root/src/trg-torrent-move-dialog.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-04-21 22:17:01 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-04-21 22:17:01 +0000
commit682ae4d2444dfb7ddb4d35c578bf3656bca59922 (patch)
tree679bd4a5c136e951494a0b369e3452ed5135a1c8 /src/trg-torrent-move-dialog.c
parent004fe9ed03adf35a62ee714319cf3b49887afde0 (diff)
only lookup the selected torrent id when it changes, remember it until checking every update, use the hash table instead. also fix a crash on multiple consecutive deletes caused by gtktreemodel weirdness.
Diffstat (limited to 'src/trg-torrent-move-dialog.c')
-rw-r--r--src/trg-torrent-move-dialog.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/trg-torrent-move-dialog.c b/src/trg-torrent-move-dialog.c
index 6b2c4a0..f850672 100644
--- a/src/trg-torrent-move-dialog.c
+++ b/src/trg-torrent-move-dialog.c
@@ -144,8 +144,9 @@ TrgTorrentMoveDialog *trg_torrent_move_dialog_new(TrgMainWindow * win,
JsonObject *json;
gchar *name;
const gchar *current_location;
- get_first_selected(client, ttv, &iter, &json);
- gtk_tree_model_get(gtk_tree_view_get_model(GTK_TREE_VIEW(ttv)),
+
+ get_torrent_data(client->torrentTable, trg_mw_get_selected_torrent_id(win), &json, &iter);
+ gtk_tree_model_get(trg_main_window_get_torrent_model(priv->win),
&iter, TORRENT_COLUMN_NAME, &name, -1);
current_location = torrent_get_download_dir(json);
gtk_combo_box_append_text(GTK_COMBO_BOX(priv->location_combo),