summaryrefslogtreecommitdiff
path: root/client-qt/udm-client-qt/udm_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'client-qt/udm-client-qt/udm_main.cpp')
-rw-r--r--client-qt/udm-client-qt/udm_main.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/client-qt/udm-client-qt/udm_main.cpp b/client-qt/udm-client-qt/udm_main.cpp
index ab9b898..4110f03 100644
--- a/client-qt/udm-client-qt/udm_main.cpp
+++ b/client-qt/udm-client-qt/udm_main.cpp
@@ -305,6 +305,7 @@ void udm_main::server_message_received(server_msg msg)
s->mutable_download_state_change()->add_states(SDS_STARTED); //subscript to download started event
s->mutable_download_state_change()->add_states(SDS_STOPPED); //subscript to download stopped event
s->mutable_download_state_change()->add_states(SDS_DELETED); //subscript to download deleted event
+ s->mutable_download_state_change()->add_states(SDS_COMPLETED); //subscript to download deleted event
session->send_message(msg);
}
@@ -390,6 +391,17 @@ void udm_main::server_message_received(server_msg msg)
}
}
break;
+ case SUBSCRIPTION_DOWNLOAD_STATE::SDS_COMPLETED:
+ for(auto d = downloads.begin(), end = downloads.end(); d != end; ++d)
+ {
+ if(d->id() == i.download_id())
+ {
+ d->set_state(2); //TODO: use human readable enum for states ?
+ mdl_downloads->refresh(); //TODO: udapte only changed item
+ break;
+ }
+ }
+ break;
case SUBSCRIPTION_DOWNLOAD_STATE::SDS_DELETED:
{
bool found = false;