[fix] removed open notification when sending file to somebody else
This commit is contained in:
@@ -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),
|
||||
@@ -38,6 +40,7 @@ finished (SoupSession *session, SoupMessage *msg, gpointer target)
|
||||
g_variant_get_child_value ((GVariant *) target, 2), NULL),
|
||||
target);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
get (char *url, const gchar *originDevice, const gchar *downloadDirectory, const gchar *outputFilename)
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user