[gnome-user-share] obex: Fix notifications not working
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-user-share] obex: Fix notifications not working
- Date: Thu, 14 Nov 2013 21:14:31 +0000 (UTC)
commit 39a2765e752b2df812ce2e2002325d020db3d2b6
Author: Bastien Nocera <hadess hadess net>
Date: Wed Nov 13 21:00:11 2013 +0100
obex: Fix notifications not working
We passed the original filename sent, instead of a full file path
as saved on disk.
src/obexpush.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/obexpush.c b/src/obexpush.c
index 0fa4084..c4e03ab 100644
--- a/src/obexpush.c
+++ b/src/obexpush.c
@@ -480,7 +480,7 @@ parse_extension (const char *filename)
return strrchr ((last_separator) ? last_separator : filename, '.');
}
-static void
+static char *
move_temp_filename (GObject *object)
{
const char *orig_filename;
@@ -554,7 +554,8 @@ move_temp_filename (GObject *object)
g_object_unref (src);
g_object_unref (dest);
- g_free (dest_filename);
+
+ return dest_filename;
}
static void
@@ -584,13 +585,16 @@ transfer_property_changed (GDBusProxy *transfer,
g_debug ("Got status %s = %s for filename %s", status, str, filename);
if (g_str_equal (status, "complete")) {
- move_temp_filename (G_OBJECT (transfer));
+ char *path;
+
+ path = move_temp_filename (G_OBJECT (transfer));
if (show_notifications) {
g_debug ("transfer completed, showing a notification");
- show_notification (filename);
+ show_notification (path);
} else {
hide_statusicon ();
}
+ g_free (path);
}
/* Done with this transfer */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]