summaryrefslogtreecommitdiff
path: root/src/trg-files-model.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2012-01-13 15:29:10 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2012-01-13 15:29:10 +0000
commit5d019aa0e7ee5178d697162403819b8cce2f91f8 (patch)
tree75b77d986c7ca280807f6b9649c390794f563875 /src/trg-files-model.c
parent7aef8c5669946d7a13ec56e1b3a3c72584ab3284 (diff)
a torrent priority right click menu. change the refresh on interactive action behavior to make sure priority/other changes are refreshed immediately.
Diffstat (limited to 'src/trg-files-model.c')
-rw-r--r--src/trg-files-model.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/trg-files-model.c b/src/trg-files-model.c
index 8675237..fc79c73 100644
--- a/src/trg-files-model.c
+++ b/src/trg-files-model.c
@@ -248,11 +248,8 @@ static void trg_files_model_iter_update(TrgFilesModel * model,
gint64 fileCompleted = file_get_bytes_completed(file);
gint64 lastCompleted;
- gboolean wanted =
- json_node_get_int(json_array_get_element(wantedArray, id))
- == 1;
- gint priority = (gint)
- json_node_get_int(json_array_get_element(prioritiesArray, id));
+ gint wanted = (gint) json_array_get_int_element(wantedArray, id);
+ gint priority = (gint) json_array_get_int_element(prioritiesArray, id);
gdouble progress = file_get_progress(fileLength, fileCompleted);
gtk_tree_model_get(GTK_TREE_MODEL(model), filesIter,
@@ -373,8 +370,8 @@ static gpointer trg_files_model_buildtree_threadfunc(gpointer data)
return NULL;
}
-void trg_files_model_update(TrgFilesModel * model, GtkTreeView *tv,
- gint64 updateSerial, JsonObject * t, gint mode)
+void trg_files_model_update(TrgFilesModel * model, GtkTreeView * tv,
+ gint64 updateSerial, JsonObject * t, gint mode)
{
TrgFilesModelPrivate *priv = TRG_FILES_MODEL_GET_PRIVATE(model);
JsonArray *files = torrent_get_files(t);