aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-02-03 17:04:13 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2009-02-03 17:04:13 +0800
commit2fef950796a89992a87d2542d536bd4ab8e9cdfe (patch)
tree8b50da245ba812533554fc1abf424b000652118e
parentc09841d4cf7d003e1f68aab070ce311d2cc6d032 (diff)
downloadgsoc2013-empathy-2fef950796a89992a87d2542d536bd4ab8e9cdfe.tar
gsoc2013-empathy-2fef950796a89992a87d2542d536bd4ab8e9cdfe.tar.gz
gsoc2013-empathy-2fef950796a89992a87d2542d536bd4ab8e9cdfe.tar.bz2
gsoc2013-empathy-2fef950796a89992a87d2542d536bd4ab8e9cdfe.tar.lz
gsoc2013-empathy-2fef950796a89992a87d2542d536bd4ab8e9cdfe.tar.xz
gsoc2013-empathy-2fef950796a89992a87d2542d536bd4ab8e9cdfe.tar.zst
gsoc2013-empathy-2fef950796a89992a87d2542d536bd4ab8e9cdfe.zip
Start streaming video when webcam icon is clicked
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@2408 4ee84921-47dd-4033-b63a-18d7a039a3e4
-rw-r--r--src/empathy-call-window.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 4911f0373..491ba1e07 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -89,6 +89,9 @@ static gboolean empathy_call_window_delete_cb (GtkWidget *widget,
static void empathy_call_window_sidebar_toggled_cb (GtkToggleButton *toggle,
EmpathyCallWindow *window);
+static void empathy_call_window_camera_toggled_cb (GtkToggleToolButton *toggle,
+ EmpathyCallWindow *window);
+
static void empathy_call_window_sidebar_hidden_cb (EmpathySidebar *sidebar,
EmpathyCallWindow *window);
@@ -130,6 +133,9 @@ empathy_call_window_setup_toolbar (EmpathyCallWindow *self)
camera = glade_xml_get_widget (priv->glade, "camera");
gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (camera), FALSE);
+
+ g_signal_connect (G_OBJECT (camera), "toggled",
+ G_CALLBACK (empathy_call_window_camera_toggled_cb), self);
}
static GtkWidget *
@@ -568,6 +574,23 @@ empathy_call_window_sidebar_toggled_cb (GtkToggleButton *toggle,
}
static void
+empathy_call_window_camera_toggled_cb (GtkToggleToolButton *toggle,
+ EmpathyCallWindow *window)
+{
+ EmpathyCallWindowPriv *priv = GET_PRIV (window);
+ gboolean active;
+ EmpathyTpCall *call;
+
+ active = (gtk_toggle_tool_button_get_active (toggle));
+
+ g_object_get (priv->handler, "tp-call", &call, NULL);
+
+ empathy_tp_call_request_video_stream_direction (call, active);
+
+ g_object_unref (call);
+}
+
+static void
empathy_call_window_sidebar_hidden_cb (EmpathySidebar *sidebar,
EmpathyCallWindow *window)
{