empathy r1758 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r1758 - trunk/libempathy
- Date: Fri, 21 Nov 2008 16:15:10 +0000 (UTC)
Author: xclaesse
Date: Fri Nov 21 16:15:10 2008
New Revision: 1758
URL: http://svn.gnome.org/viewvc/empathy?rev=1758&view=rev
Log:
Handled TransferredBytes signal properly and show in the progress bar. (Jonny Lamb)
Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>
Modified:
trunk/libempathy/empathy-file.c
Modified: trunk/libempathy/empathy-file.c
==============================================================================
--- trunk/libempathy/empathy-file.c (original)
+++ trunk/libempathy/empathy-file.c Fri Nov 21 16:15:10 2008
@@ -87,9 +87,8 @@
guint state,
guint reason,
EmpathyFile *file);
-static void file_transferred_bytes_changed_cb (DBusGProxy *file_iface,
- guint64 transferred_bytes,
- EmpathyFile *file);
+static void file_transferred_bytes_changed_cb (TpProxy *proxy, guint64 count,
+ EmpathyFile *file, GObject *weak_object);
static void copy_stream (GInputStream *in,
GOutputStream *out,
GCancellable *cancellable);
@@ -137,6 +136,7 @@
PROP_FILENAME,
PROP_SIZE,
PROP_CONTENT_TYPE,
+ PROP_TRANSFERRED_BYTES,
PROP_CONTENT_MD5,
PROP_IN_STREAM,
};
@@ -229,6 +229,16 @@
G_PARAM_READWRITE));
g_object_class_install_property (object_class,
+ PROP_TRANSFERRED_BYTES,
+ g_param_spec_uint64 ("transferred-bytes",
+ "bytes transferred",
+ "The number of bytes transferred",
+ 0,
+ G_MAXUINT64,
+ 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class,
PROP_IN_STREAM,
g_param_spec_object ("in-stream",
"transfer input stream",
@@ -751,17 +761,17 @@
}
static void
-file_transferred_bytes_changed_cb (DBusGProxy *file_iface,
- guint64 transferred_bytes, EmpathyFile *file)
+file_transferred_bytes_changed_cb (TpProxy *proxy,
+ guint64 count, EmpathyFile *file, GObject *weak_object)
{
EmpathyFilePriv *priv;
priv = GET_PRIV (file);
- if (priv->transferred_bytes == transferred_bytes)
+ if (priv->transferred_bytes == count)
return;
- priv->transferred_bytes = transferred_bytes;
+ priv->transferred_bytes = count;
g_object_notify (G_OBJECT (file), "transferred-bytes");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]