[fix] removed open notification when sending file to somebody else

This commit is contained in:
Julian Sparber
2017-09-18 11:55:01 +02:00
parent 1e9a9d824b
commit ceedb1ae43

View File

@@ -25,6 +25,8 @@ gchar * getFilePath (const gchar *, const gchar *);
finished (SoupSession *session, SoupMessage *msg, gpointer target)
{
//GVariant *target array: {originDevice, url, filename, downloadDirectory}
if ((char *) g_variant_get_string (
g_variant_get_child_value ((GVariant *) target, 2), NULL) != NULL) {
saveFile(msg,
(char *) g_variant_get_string (
g_variant_get_child_value ((GVariant *) target, 3), NULL),
@@ -37,6 +39,7 @@ finished (SoupSession *session, SoupMessage *msg, gpointer target)
g_variant_get_string (
g_variant_get_child_value ((GVariant *) target, 2), NULL),
target);
}
}
int
@@ -70,6 +73,10 @@ get (char *url, const gchar *originDevice, const gchar *downloadDirectory, const
g_object_ref (msg);
//soup_session_queue_message (session, msg, finished, loop);
if (outputFilename == NULL) {
soup_session_queue_message (session, msg, NULL, NULL);
}
else {
GVariantBuilder *builder;
GVariant *target;
@@ -82,6 +89,7 @@ get (char *url, const gchar *originDevice, const gchar *downloadDirectory, const
g_variant_builder_unref (builder);
soup_session_queue_message (session, msg, finished, target);
}
return 0;
}