empathy r1745 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r1745 - trunk/libempathy
- Date: Fri, 21 Nov 2008 16:14:17 +0000 (UTC)
Author: xclaesse
Date: Fri Nov 21 16:14:17 2008
New Revision: 1745
URL: http://svn.gnome.org/viewvc/empathy?rev=1745&view=rev
Log:
Push the notify::state and notify::transferred-bytes signals from EmpathyTpFile onto EmpathyFile for the ft-manager to listen to. (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:14:17 2008
@@ -69,6 +69,10 @@
GParamSpec *pspec);
static void file_set_property (GObject *object, guint param_id,
const GValue *value, GParamSpec *pspec);
+static void state_changed_cb (GObject *object, GParamSpec *pspec,
+ EmpathyFile *file);
+static void transferred_bytes_changed_cb (GObject *object, GParamSpec *pspec,
+ EmpathyFile *file);
static void file_set_tp_file (EmpathyFile *file, EmpathyTpFile *tp_file);
enum
@@ -210,6 +214,20 @@
}
static void
+state_changed_cb (GObject *object, GParamSpec *pspec,
+ EmpathyFile *file)
+{
+ g_object_notify (G_OBJECT (file), "state");
+}
+
+static void
+transferred_bytes_changed_cb (GObject *object, GParamSpec *pspec,
+ EmpathyFile *file)
+{
+ g_object_notify (G_OBJECT (file), "transferred-bytes");
+}
+
+static void
file_finalize (GObject *object)
{
EmpathyFilePriv *priv;
@@ -331,9 +349,18 @@
EmpathyFile *
empathy_file_new (EmpathyTpFile *tp_file)
{
- return g_object_new (EMPATHY_TYPE_FILE,
- "tp_file", tp_file,
+ EmpathyFile *file;
+
+ file = g_object_new (EMPATHY_TYPE_FILE,
+ "tp-file", tp_file,
NULL);
+
+ g_signal_connect (tp_file, "notify::state",
+ G_CALLBACK (state_changed_cb), file);
+ g_signal_connect (tp_file, "notify::transferred-bytes",
+ G_CALLBACK (transferred_bytes_changed_cb), file);
+
+ return file;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]