empathy r2408 - trunk/src



Author: xclaesse
Date: Tue Feb  3 09:04:13 2009
New Revision: 2408
URL: http://svn.gnome.org/viewvc/empathy?rev=2408&view=rev

Log:
Start streaming video when webcam icon is clicked

Signed-off-by: Sjoerd Simons <sjoerd simons collabora co uk>

Modified:
   trunk/src/empathy-call-window.c

Modified: trunk/src/empathy-call-window.c
==============================================================================
--- trunk/src/empathy-call-window.c	(original)
+++ trunk/src/empathy-call-window.c	Tue Feb  3 09:04:13 2009
@@ -89,6 +89,9 @@
 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 @@
 
   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 @@
 }
 
 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)
 {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]