summaryrefslogtreecommitdiff
path: root/src/trg-destination-combo.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-08 19:49:34 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-08 19:49:34 +0000
commit6da9f33b200227e3dadf53d3fdbbf7712b90ba01 (patch)
tree75f66d5119a3edcc3299e76927d42dbb720b3ccd /src/trg-destination-combo.c
parente8cf7cb598d2dcb8cba29ccbe89eaa8509b16e63 (diff)
issue 71
Diffstat (limited to 'src/trg-destination-combo.c')
-rw-r--r--src/trg-destination-combo.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/trg-destination-combo.c b/src/trg-destination-combo.c
index c1f3758..4717637 100644
--- a/src/trg-destination-combo.c
+++ b/src/trg-destination-combo.c
@@ -130,11 +130,12 @@ static GObject *trg_destination_combo_constructor(GType type,
if (gtk_tree_model_get_iter(model, &iter, path)) {
gchar *dd;
gtk_tree_model_get(model, &iter, TORRENT_COLUMN_JSON, &t,
- -1);
- dd = g_strdup(torrent_get_download_dir(t));
- rm_trailing_slashes(dd);
+ TORRENT_COLUMN_DOWNLOADDIR, &dd,
+ -1);;
if (dd && g_strcmp0(dd, defaultDownDir))
g_slist_str_set_add(&dirs, dd, -1);
+ else
+ g_free(dd);
}
gtk_tree_path_free(path);
@@ -146,7 +147,7 @@ static GObject *trg_destination_combo_constructor(GType type,
g_list_free(torrentItemRefs);
g_slist_str_set_add(&dirs, defaultDownDir, 0);
- for (sli = dirs; sli != NULL; sli = g_slist_next(sli))
+ for (sli = dirs; sli; sli = g_slist_next(sli))
gtk_list_store_insert_with_values(comboModel, NULL, INT_MAX, 0,
(gchar *) sli->data, -1);