[empathy] empathy_call_new_with_streams: remove initial_audio arg



commit 1fd36e1e67a9c6cc3b0be6250809424045e56d20
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Mon Feb 24 14:33:55 2014 +0100

    empathy_call_new_with_streams: remove initial_audio arg
    
    We always pass TRUE.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=725070

 libempathy-gtk/empathy-call-utils.c      |   13 ++++---------
 libempathy-gtk/empathy-call-utils.h      |    2 --
 libempathy-gtk/empathy-individual-menu.c |    8 +++-----
 libempathy-gtk/empathy-log-window.c      |    2 +-
 libempathy-gtk/empathy-new-call-dialog.c |    2 +-
 src/empathy-call-handler.c               |    3 +--
 6 files changed, 10 insertions(+), 20 deletions(-)
---
diff --git a/libempathy-gtk/empathy-call-utils.c b/libempathy-gtk/empathy-call-utils.c
index a235e7b..261205b 100644
--- a/libempathy-gtk/empathy-call-utils.c
+++ b/libempathy-gtk/empathy-call-utils.c
@@ -73,7 +73,6 @@ show_call_error (GError *error)
 
 GHashTable *
 empathy_call_create_call_request (const gchar *contact,
-    gboolean initial_audio,
     gboolean initial_video)
 {
   GHashTable *asv = tp_asv_new (
@@ -83,13 +82,12 @@ empathy_call_create_call_request (const gchar *contact,
       TP_HANDLE_TYPE_CONTACT,
     TP_PROP_CHANNEL_TARGET_ID, G_TYPE_STRING,
       contact,
+    TP_PROP_CHANNEL_TYPE_CALL_INITIAL_AUDIO, G_TYPE_BOOLEAN,
+      TRUE,
     NULL);
 
-  /* Only add InitialAudio or InitialVideo if they are true: it should work
+  /* Only add InitialVideo if it is true: it should work
    * with genuinely voice-only CMs. */
-  if (initial_audio)
-    tp_asv_set_boolean (asv, TP_PROP_CHANNEL_TYPE_CALL_INITIAL_AUDIO,
-                        initial_audio);
   if (initial_video)
     tp_asv_set_boolean (asv, TP_PROP_CHANNEL_TYPE_CALL_INITIAL_VIDEO,
                         initial_video);
@@ -116,7 +114,6 @@ create_call_channel_cb (GObject *source,
 void
 empathy_call_new_with_streams (const gchar *contact,
     TpAccount *account,
-    gboolean initial_audio,
     gboolean initial_video,
     gint64 timestamp)
 {
@@ -124,9 +121,7 @@ empathy_call_new_with_streams (const gchar *contact,
   TpAccountChannelRequest *call_req;
 
   /* Call */
-  call_request = empathy_call_create_call_request (contact,
-      initial_audio,
-      initial_video);
+  call_request = empathy_call_create_call_request (contact, initial_video);
 
   call_req = tp_account_channel_request_new (account, call_request, timestamp);
 
diff --git a/libempathy-gtk/empathy-call-utils.h b/libempathy-gtk/empathy-call-utils.h
index 788d828..d8656e8 100644
--- a/libempathy-gtk/empathy-call-utils.h
+++ b/libempathy-gtk/empathy-call-utils.h
@@ -28,12 +28,10 @@ G_BEGIN_DECLS
 /* Calls */
 void empathy_call_new_with_streams (const gchar *contact,
     TpAccount *account,
-    gboolean initial_audio,
     gboolean initial_video,
     gint64 timestamp);
 
 GHashTable * empathy_call_create_call_request (const gchar *contact,
-    gboolean initial_audio,
     gboolean initial_video);
 
 TpSendingState empathy_call_channel_get_video_state (TpCallChannel *self);
diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c
index 7f53a7a..286eeaa 100644
--- a/libempathy-gtk/empathy-individual-menu.c
+++ b/libempathy-gtk/empathy-individual-menu.c
@@ -345,7 +345,7 @@ call_phone_number (FolksPhoneFieldDetails *details,
   DEBUG ("Try to call %s", number);
 
   empathy_call_new_with_streams (number,
-      account, TRUE, FALSE, empathy_get_current_action_time ());
+      account, FALSE, empathy_get_current_action_time ());
 
   g_free (number);
 }
@@ -1432,8 +1432,7 @@ empathy_individual_audio_call_menu_item_activated (GtkMenuItem *item,
 
   empathy_call_new_with_streams (empathy_contact_get_id (contact),
       empathy_contact_get_account (contact),
-      TRUE, FALSE,
-      empathy_get_current_action_time ());
+      FALSE, empathy_get_current_action_time ());
 
   emit_menu_item_activated (item);
 }
@@ -1468,8 +1467,7 @@ empathy_individual_video_call_menu_item_activated (GtkMenuItem *item,
 
   empathy_call_new_with_streams (empathy_contact_get_id (contact),
       empathy_contact_get_account (contact),
-      TRUE, TRUE,
-      empathy_get_current_action_time ());
+      TRUE, empathy_get_current_action_time ());
 
   emit_menu_item_activated (item);
 }
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 55202d3..d58de82 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -346,7 +346,7 @@ toolbutton_av_clicked (GtkToolButton *toolbutton,
   empathy_call_new_with_streams (
       empathy_contact_get_id (self->priv->selected_contact),
       empathy_contact_get_account (self->priv->selected_contact),
-      TRUE, video, gtk_get_current_event_time ());
+      video, gtk_get_current_event_time ());
 }
 
 static void
diff --git a/libempathy-gtk/empathy-new-call-dialog.c b/libempathy-gtk/empathy-new-call-dialog.c
index d96d0bb..e981be2 100644
--- a/libempathy-gtk/empathy-new-call-dialog.c
+++ b/libempathy-gtk/empathy-new-call-dialog.c
@@ -84,7 +84,7 @@ empathy_new_call_dialog_response (GtkDialog *dialog,
   g_assert (contact != NULL);
 
   empathy_call_new_with_streams (empathy_contact_get_id (contact),
-      empathy_contact_get_account (contact), TRUE,
+      empathy_contact_get_account (contact),
       response_id == RESPONSE_VIDEO, empathy_get_current_action_time ());
 
   g_object_unref (individual);
diff --git a/src/empathy-call-handler.c b/src/empathy-call-handler.c
index 1c4939a..9d8da00 100644
--- a/src/empathy-call-handler.c
+++ b/src/empathy-call-handler.c
@@ -933,8 +933,7 @@ empathy_call_handler_start_call (EmpathyCallHandler *handler,
 
   account = empathy_contact_get_account (priv->contact);
   request = empathy_call_create_call_request (
-      empathy_contact_get_id (priv->contact),
-      priv->initial_audio, priv->initial_video);
+      empathy_contact_get_id (priv->contact), priv->initial_video);
 
   req = tp_account_channel_request_new (account, request, timestamp);
 


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