~bcurtiswx/ubuntu/precise/empathy/3.4.2.1-0ubuntu1

« back to all changes in this revision

Viewing changes to src/empathy-call-window.c

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Bigonville
  • Date: 2009-11-16 23:40:52 UTC
  • mfrom: (1.1.39 upstream)
  • mto: (6.3.7 experimental)
  • mto: This revision was merged to the branch mainline in revision 80.
  • Revision ID: james.westby@ubuntu.com-20091116234052-7hhwrpeln4mwdyw7
Tags: upstream-2.29.2
ImportĀ upstreamĀ versionĀ 2.29.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
/* The avatar's default width and height are set to the same value because we
61
61
   want a square icon. */
62
62
#define REMOTE_CONTACT_AVATAR_DEFAULT_WIDTH EMPATHY_VIDEO_WIDGET_DEFAULT_HEIGHT
63
 
#define REMOTE_CONTACT_AVATAR_DEFAULT_HEIGHT EMPATHY_VIDEO_WIDGET_DEFAULT_HEIGHT
 
63
#define REMOTE_CONTACT_AVATAR_DEFAULT_HEIGHT \
 
64
  EMPATHY_VIDEO_WIDGET_DEFAULT_HEIGHT
64
65
 
65
66
/* If an video input error occurs, the error message will start with "v4l" */
66
67
#define VIDEO_INPUT_ERROR_PREFIX "v4l"
104
105
  gboolean outgoing;
105
106
 
106
107
  GtkUIManager *ui_manager;
 
108
  GtkWidget *errors_vbox;
107
109
  GtkWidget *video_output;
108
110
  GtkWidget *video_preview;
109
111
  GtkWidget *remote_user_avatar_widget;
207
209
static void empathy_call_window_send_video_toggled_cb (GtkToggleAction *toggle,
208
210
  EmpathyCallWindow *window);
209
211
 
210
 
static void empathy_call_window_show_preview_toggled_cb (GtkToggleAction *toggle,
211
 
  EmpathyCallWindow *window);
 
212
static void empathy_call_window_show_preview_toggled_cb (
 
213
  GtkToggleAction *toggle, EmpathyCallWindow *window);
212
214
 
213
215
static void empathy_call_window_mic_toggled_cb (
214
216
  GtkToggleToolButton *toggle, EmpathyCallWindow *window);
227
229
 
228
230
static void empathy_call_window_fullscreen_toggle (EmpathyCallWindow *window);
229
231
 
230
 
static gboolean empathy_call_window_video_button_press_cb (GtkWidget *video_output,
231
 
  GdkEventButton *event, EmpathyCallWindow *window);
 
232
static gboolean empathy_call_window_video_button_press_cb (
 
233
  GtkWidget *video_output, GdkEventButton *event, EmpathyCallWindow *window);
232
234
 
233
235
static gboolean empathy_call_window_key_press_cb (GtkWidget *video_output,
234
236
  GdkEventKey *event, EmpathyCallWindow *window);
235
237
 
236
 
static gboolean empathy_call_window_video_output_motion_notify (GtkWidget *widget,
237
 
  GdkEventMotion *event, EmpathyCallWindow *window);
 
238
static gboolean empathy_call_window_video_output_motion_notify (
 
239
  GtkWidget *widget, GdkEventMotion *event, EmpathyCallWindow *window);
238
240
 
239
241
static void empathy_call_window_video_menu_popup (EmpathyCallWindow *window,
240
242
  guint button);
520
522
  EmpathyCallWindowPriv *priv = GET_PRIV (window);
521
523
 
522
524
  value = CLAMP (pow (10, level / 20), 0.0, 1.0);
523
 
  gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (priv->volume_progress_bar), value);
 
525
  gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (priv->volume_progress_bar),
 
526
      value);
524
527
}
525
528
 
526
529
static GtkWidget *
552
555
 
553
556
  priv->volume_progress_bar = gtk_progress_bar_new ();
554
557
  gtk_progress_bar_set_orientation (
555
 
      GTK_PROGRESS_BAR (priv->volume_progress_bar), GTK_PROGRESS_BOTTOM_TO_TOP);
 
558
      GTK_PROGRESS_BAR (priv->volume_progress_bar),
 
559
      GTK_PROGRESS_BOTTOM_TO_TOP);
556
560
  gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (priv->volume_progress_bar),
557
561
      0);
558
562
 
617
621
  gst_object_ref (priv->audio_input);
618
622
  gst_object_sink (priv->audio_input);
619
623
 
620
 
  g_signal_connect (priv->audio_input, "peak-level-changed",
621
 
    G_CALLBACK (empathy_call_window_audio_input_level_changed_cb), self);
 
624
  empathy_signal_connect_weak (priv->audio_input, "peak-level-changed",
 
625
    G_CALLBACK (empathy_call_window_audio_input_level_changed_cb),
 
626
    G_OBJECT (self));
622
627
}
623
628
 
624
629
static void
693
698
  filename = empathy_file_lookup ("empathy-call-window.ui", "src");
694
699
  gui = empathy_builder_get_file (filename,
695
700
    "call_window_vbox", &top_vbox,
 
701
    "errors_vbox", &priv->errors_vbox,
696
702
    "pane", &priv->pane,
697
703
    "statusbar", &priv->statusbar,
698
704
    "redial", &priv->redial_button,
723
729
 
724
730
  gtk_container_add (GTK_CONTAINER (self), top_vbox);
725
731
 
726
 
  empathy_call_window_setup_toolbar (self);
727
 
 
728
732
  priv->content_hbox = gtk_hbox_new (FALSE, CONTENT_HBOX_SPACING);
729
733
  gtk_container_set_border_width (GTK_CONTAINER (priv->content_hbox),
730
734
                                  CONTENT_HBOX_BORDER_WIDTH);
769
773
  priv->vbox = gtk_vbox_new (FALSE, 3);
770
774
  gtk_box_pack_start (GTK_BOX (priv->content_hbox), priv->vbox,
771
775
      FALSE, FALSE, CONTENT_HBOX_CHILDREN_PACKING_PADDING);
772
 
  gtk_box_pack_start (GTK_BOX (priv->vbox), priv->self_user_output_frame, FALSE,
773
 
      FALSE, 0);
 
776
  gtk_box_pack_start (GTK_BOX (priv->vbox), priv->self_user_output_frame,
 
777
      FALSE, FALSE, 0);
774
778
  empathy_call_window_setup_self_frame (bus, self);
775
779
 
 
780
  empathy_call_window_setup_toolbar (self);
 
781
 
776
782
  g_object_unref (bus);
777
783
 
778
784
  priv->sidebar_button = gtk_toggle_button_new_with_mnemonic (_("_Sidebar"));
812
818
  gtk_widget_hide (priv->sidebar);
813
819
 
814
820
  priv->fullscreen = empathy_call_window_fullscreen_new (self);
815
 
  empathy_call_window_fullscreen_set_video_widget (priv->fullscreen, priv->video_output);
 
821
  empathy_call_window_fullscreen_set_video_widget (priv->fullscreen,
 
822
      priv->video_output);
816
823
  g_signal_connect (G_OBJECT (priv->fullscreen->leave_fullscreen_button),
817
824
      "clicked", G_CALLBACK (empathy_call_window_fullscreen_cb), self);
818
825
 
837
844
/* Instead of specifying a width and a height, we specify only one size. That's
838
845
   because we want a square avatar icon.  */
839
846
static void
840
 
init_contact_avatar_with_size (EmpathyContact *contact, GtkWidget *image_widget,
 
847
init_contact_avatar_with_size (EmpathyContact *contact,
 
848
    GtkWidget *image_widget,
841
849
    gint size)
842
850
{
843
851
  GdkPixbuf *pixbuf_avatar = NULL;
863
871
  EmpathyCallWindowPriv *priv = GET_PRIV (self);
864
872
  gchar *tmp;
865
873
 
866
 
  /* translators: Call is a noun and %s is the contact name. This string is used
867
 
   * in the window title */
 
874
  /* translators: Call is a noun and %s is the contact name. This string
 
875
   * is used in the window title */
868
876
  tmp = g_strdup_printf (_("Call with %s"),
869
877
      empathy_contact_get_name (priv->contact));
870
878
  gtk_window_set_title (GTK_WINDOW (self), tmp);
882
890
contact_avatar_changed_cb (EmpathyContact *contact,
883
891
    GParamSpec *pspec, GtkWidget *avatar_widget)
884
892
{
885
 
  init_contact_avatar_with_size (contact, avatar_widget,
886
 
      avatar_widget->allocation.height);
 
893
  int size;
 
894
 
 
895
  size = avatar_widget->allocation.height;
 
896
 
 
897
  if (size == 0)
 
898
    {
 
899
      /* the widget is not allocated yet, set a default size */
 
900
      size = MIN (REMOTE_CONTACT_AVATAR_DEFAULT_HEIGHT,
 
901
          REMOTE_CONTACT_AVATAR_DEFAULT_WIDTH);
 
902
    }
 
903
 
 
904
  init_contact_avatar_with_size (contact, avatar_widget, size);
887
905
}
888
906
 
889
907
static void
927
945
      factory = empathy_tp_contact_factory_dup_singleton (connection);
928
946
      empathy_tp_contact_factory_get_from_handle (factory,
929
947
          tp_connection_get_self_handle (connection),
930
 
          empathy_call_window_got_self_contact_cb, self, NULL, NULL);
 
948
          empathy_call_window_got_self_contact_cb, self, NULL, G_OBJECT (self));
931
949
 
932
950
      g_object_unref (factory);
933
951
    }
934
952
  else
935
953
    {
936
954
      g_warning ("call handler doesn't have a contact");
937
 
      /* translators: Call is a noun. This string is used in the window title */
 
955
      /* translators: Call is a noun. This string is used in the window
 
956
       * title */
938
957
      gtk_window_set_title (GTK_WINDOW (self), _("Call"));
939
958
 
940
959
      /* Since we can't access the remote contact, we can't get a connection
945
964
    }
946
965
 
947
966
  init_contact_avatar_with_size (priv->contact,
948
 
      priv->remote_user_avatar_widget, MIN (REMOTE_CONTACT_AVATAR_DEFAULT_WIDTH,
949
 
      REMOTE_CONTACT_AVATAR_DEFAULT_HEIGHT));
 
967
      priv->remote_user_avatar_widget,
 
968
      MIN (REMOTE_CONTACT_AVATAR_DEFAULT_WIDTH,
 
969
          REMOTE_CONTACT_AVATAR_DEFAULT_HEIGHT));
950
970
 
951
971
  /* The remote avatar is shown by default and will be hidden when we receive
952
972
     video from the remote side. */
959
979
    EmpathyCallHandler *handler)
960
980
{
961
981
  EmpathyCallWindowPriv *priv = GET_PRIV (self);
962
 
  gboolean initial_video = empathy_call_handler_has_initial_video (priv->handler);
 
982
  gboolean initial_video =
 
983
    empathy_call_handler_has_initial_video (priv->handler);
963
984
 
964
985
  gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (priv->show_preview),
965
986
      initial_video);
1069
1090
    {
1070
1091
      g_signal_handlers_disconnect_by_func (call,
1071
1092
        empathy_call_window_video_stream_changed_cb, object);
 
1093
      g_object_unref (call);
1072
1094
    }
1073
1095
 
1074
 
  g_object_unref (call);
1075
 
 
1076
1096
  if (priv->handler != NULL)
1077
1097
    g_object_unref (priv->handler);
1078
1098
  priv->handler = NULL;
1429
1449
  EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (user_data);
1430
1450
  EmpathyCallWindowPriv *priv = GET_PRIV (self);
1431
1451
  gchar *str;
1432
 
  gdouble time;
 
1452
  gdouble time_;
1433
1453
 
1434
 
  time = g_timer_elapsed (priv->timer, NULL);
 
1454
  time_ = g_timer_elapsed (priv->timer, NULL);
1435
1455
 
1436
1456
  /* Translators: number of minutes:seconds the caller has been connected */
1437
 
  str = g_strdup_printf (_("Connected ā€” %d:%02dm"), (int) time / 60,
1438
 
    (int) time % 60);
 
1457
  str = g_strdup_printf (_("Connected ā€” %d:%02dm"), (int) time_ / 60,
 
1458
    (int) time_ % 60);
1439
1459
  empathy_call_window_status_message (self, str);
1440
1460
  g_free (str);
1441
1461
 
1442
1462
  return TRUE;
1443
1463
}
1444
1464
 
 
1465
static void
 
1466
display_error (EmpathyCallWindow *self,
 
1467
    EmpathyTpCall *call,
 
1468
    const gchar *img,
 
1469
    const gchar *title,
 
1470
    const gchar *desc,
 
1471
    const gchar *details)
 
1472
{
 
1473
  EmpathyCallWindowPriv *priv = GET_PRIV (self);
 
1474
  GtkWidget *info_bar;
 
1475
  GtkWidget *content_area;
 
1476
  GtkWidget *hbox;
 
1477
  GtkWidget *vbox;
 
1478
  GtkWidget *image;
 
1479
  GtkWidget *label;
 
1480
  gchar *txt;
 
1481
 
 
1482
  /* Create info bar */
 
1483
  info_bar = gtk_info_bar_new_with_buttons (GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
 
1484
      NULL);
 
1485
 
 
1486
  gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar), GTK_MESSAGE_WARNING);
 
1487
 
 
1488
  content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar));
 
1489
 
 
1490
  /* hbox containing the image and the messages vbox */
 
1491
  hbox = gtk_hbox_new (FALSE, 3);
 
1492
  gtk_container_add (GTK_CONTAINER (content_area), hbox);
 
1493
 
 
1494
  /* Add image */
 
1495
  image = gtk_image_new_from_icon_name (img, GTK_ICON_SIZE_DIALOG);
 
1496
  gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
 
1497
 
 
1498
  /* vbox containing the main message and the details expander */
 
1499
  vbox = gtk_vbox_new (FALSE, 3);
 
1500
  gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
 
1501
 
 
1502
  /* Add text */
 
1503
  txt = g_strdup_printf ("<b>%s</b>\n%s", title, desc);
 
1504
 
 
1505
  label = gtk_label_new (NULL);
 
1506
  gtk_label_set_markup (GTK_LABEL (label), txt);
 
1507
  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
 
1508
  gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
 
1509
  g_free (txt);
 
1510
 
 
1511
  gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
 
1512
 
 
1513
  /* Add details */
 
1514
  if (details != NULL)
 
1515
    {
 
1516
      GtkWidget *expander;
 
1517
 
 
1518
      expander = gtk_expander_new (_("Technical Details"));
 
1519
 
 
1520
      txt = g_strdup_printf ("<i>%s</i>", details);
 
1521
 
 
1522
      label = gtk_label_new (NULL);
 
1523
      gtk_label_set_markup (GTK_LABEL (label), txt);
 
1524
      gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
 
1525
      gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
 
1526
      g_free (txt);
 
1527
 
 
1528
      gtk_container_add (GTK_CONTAINER (expander), label);
 
1529
      gtk_box_pack_start (GTK_BOX (vbox), expander, TRUE, TRUE, 0);
 
1530
    }
 
1531
 
 
1532
  g_signal_connect (info_bar, "response",
 
1533
      G_CALLBACK (gtk_widget_destroy), NULL);
 
1534
 
 
1535
  gtk_box_pack_start (GTK_BOX (priv->errors_vbox), info_bar,
 
1536
      FALSE, FALSE, CONTENT_HBOX_CHILDREN_PACKING_PADDING);
 
1537
  gtk_widget_show_all (info_bar);
 
1538
}
 
1539
 
 
1540
static gchar *
 
1541
media_stream_error_to_txt (EmpathyCallWindow *self,
 
1542
    EmpathyTpCall *call,
 
1543
    gboolean audio,
 
1544
    TpMediaStreamError error)
 
1545
{
 
1546
  EmpathyCallWindowPriv *priv = GET_PRIV (self);
 
1547
  const gchar *cm;
 
1548
  gchar *url;
 
1549
  gchar *result;
 
1550
 
 
1551
  switch (error)
 
1552
    {
 
1553
      case TP_MEDIA_STREAM_ERROR_CODEC_NEGOTIATION_FAILED:
 
1554
        if (audio)
 
1555
          return g_strdup_printf (
 
1556
              _("%s's software does not understand any of the audio formats "
 
1557
                "supported by your computer"),
 
1558
            empathy_contact_get_name (priv->contact));
 
1559
        else
 
1560
          return g_strdup_printf (
 
1561
              _("%s's software does not understand any of the video formats "
 
1562
                "supported by your computer"),
 
1563
            empathy_contact_get_name (priv->contact));
 
1564
 
 
1565
      case TP_MEDIA_STREAM_ERROR_CONNECTION_FAILED:
 
1566
        return g_strdup_printf (
 
1567
            _("Can't establish a connection to %s. "
 
1568
              "One of you might be on a network that does not allow "
 
1569
              "direct connections."),
 
1570
          empathy_contact_get_name (priv->contact));
 
1571
 
 
1572
      case TP_MEDIA_STREAM_ERROR_NETWORK_ERROR:
 
1573
          return g_strdup (_("There was a failure on the network"));
 
1574
 
 
1575
      case TP_MEDIA_STREAM_ERROR_NO_CODECS:
 
1576
        if (audio)
 
1577
          return g_strdup (_("The audio formats necessary for this call "
 
1578
                "are not installed on your computer"));
 
1579
        else
 
1580
          return g_strdup (_("The video formats necessary for this call "
 
1581
                "are not installed on your computer"));
 
1582
 
 
1583
      case TP_MEDIA_STREAM_ERROR_INVALID_CM_BEHAVIOR:
 
1584
        cm = empathy_tp_call_get_connection_manager (call);
 
1585
 
 
1586
        url = g_strdup_printf ("http://bugs.freedesktop.org/enter_bug.cgi?"
 
1587
            "product=Telepathy&amp;component=%s", cm);
 
1588
 
 
1589
        result = g_strdup_printf (
 
1590
            _("Something not expected happened in a Telepathy component. "
 
1591
              "Please <a href=\"%s\">report this bug</a> and attach "
 
1592
              "logs gathered from the 'Debug' window in the Help menu."), url);
 
1593
 
 
1594
        g_free (url);
 
1595
        return result;
 
1596
 
 
1597
      case TP_MEDIA_STREAM_ERROR_MEDIA_ERROR:
 
1598
        return g_strdup (_("There was a failure in the call engine"));
 
1599
 
 
1600
      default:
 
1601
        return NULL;
 
1602
    }
 
1603
}
 
1604
 
 
1605
static void
 
1606
empathy_call_window_stream_error (EmpathyCallWindow *self,
 
1607
    EmpathyTpCall *call,
 
1608
    gboolean audio,
 
1609
    guint code,
 
1610
    const gchar *msg,
 
1611
    const gchar *icon,
 
1612
    const gchar *title)
 
1613
{
 
1614
  gchar *desc;
 
1615
 
 
1616
  desc = media_stream_error_to_txt (self, call, audio, code);
 
1617
  if (desc == NULL)
 
1618
    {
 
1619
      /* No description, use the error message. That's not great as it's not
 
1620
       * localized but it's better than nothing. */
 
1621
      display_error (self, call, icon, title, msg, NULL);
 
1622
    }
 
1623
  else
 
1624
    {
 
1625
      display_error (self, call, icon, title, desc, msg);
 
1626
      g_free (desc);
 
1627
    }
 
1628
}
 
1629
 
 
1630
static void
 
1631
empathy_call_window_audio_stream_error (EmpathyTpCall *call,
 
1632
    guint code,
 
1633
    const gchar *msg,
 
1634
    EmpathyCallWindow *self)
 
1635
{
 
1636
  empathy_call_window_stream_error (self, call, TRUE, code, msg,
 
1637
      "gnome-stock-mic", _("Can't establish audio stream"));
 
1638
}
 
1639
 
 
1640
static void
 
1641
empathy_call_window_video_stream_error (EmpathyTpCall *call,
 
1642
    guint code,
 
1643
    const gchar *msg,
 
1644
    EmpathyCallWindow *self)
 
1645
{
 
1646
  empathy_call_window_stream_error (self, call, FALSE, code, msg,
 
1647
      "camera-web", _("Can't establish video stream"));
 
1648
}
 
1649
 
1445
1650
static gboolean
1446
1651
empathy_call_window_connected (gpointer user_data)
1447
1652
{
1472
1677
  gtk_action_set_sensitive (priv->show_preview, TRUE);
1473
1678
  gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (priv->show_preview),
1474
1679
      priv->sending_video
1475
 
      || gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (priv->show_preview)));
 
1680
      || gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (
 
1681
              priv->show_preview)));
1476
1682
  gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (priv->send_video),
1477
1683
      priv->sending_video && priv->video_input != NULL);
1478
1684
  gtk_toggle_tool_button_set_active (
1734
1940
}
1735
1941
 
1736
1942
static void
 
1943
call_handler_notify_tp_call_cb (EmpathyCallHandler *handler,
 
1944
    GParamSpec *spec,
 
1945
    EmpathyCallWindow *self)
 
1946
{
 
1947
  EmpathyCallWindowPriv *priv = GET_PRIV (self);
 
1948
  EmpathyTpCall *call;
 
1949
 
 
1950
  g_object_get (priv->handler, "tp-call", &call, NULL);
 
1951
  if (call == NULL)
 
1952
    return;
 
1953
 
 
1954
  empathy_signal_connect_weak (call, "audio-stream-error",
 
1955
      G_CALLBACK (empathy_call_window_audio_stream_error), G_OBJECT (self));
 
1956
  empathy_signal_connect_weak (call, "video-stream-error",
 
1957
      G_CALLBACK (empathy_call_window_video_stream_error), G_OBJECT (self));
 
1958
 
 
1959
  g_object_unref (call);
 
1960
}
 
1961
 
 
1962
static void
1737
1963
empathy_call_window_realized_cb (GtkWidget *widget, EmpathyCallWindow *window)
1738
1964
{
1739
1965
  EmpathyCallWindowPriv *priv = GET_PRIV (window);
 
1966
  EmpathyTpCall *call;
1740
1967
 
1741
1968
  g_signal_connect (priv->handler, "conference-added",
1742
1969
    G_CALLBACK (empathy_call_window_conference_added_cb), window);
1751
1978
  g_signal_connect (priv->handler, "stream-closed",
1752
1979
    G_CALLBACK (empathy_call_window_channel_stream_closed_cb), window);
1753
1980
 
 
1981
  g_object_get (priv->handler, "tp-call", &call, NULL);
 
1982
  if (call != NULL)
 
1983
    {
 
1984
      empathy_signal_connect_weak (call, "audio-stream-error",
 
1985
        G_CALLBACK (empathy_call_window_audio_stream_error), G_OBJECT (window));
 
1986
      empathy_signal_connect_weak (call, "video-stream-error",
 
1987
        G_CALLBACK (empathy_call_window_video_stream_error), G_OBJECT (window));
 
1988
 
 
1989
      g_object_unref (call);
 
1990
    }
 
1991
  else
 
1992
    {
 
1993
      /* tp-call doesn't exist yet, we'll connect signals once it has been
 
1994
       * set */
 
1995
      g_signal_connect (priv->handler, "notify::tp-call",
 
1996
        G_CALLBACK (call_handler_notify_tp_call_cb), window);
 
1997
    }
 
1998
 
1754
1999
  gst_element_set_state (priv->pipeline, GST_STATE_PAUSED);
1755
2000
}
1756
2001
 
1835
2080
  if (event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN)
1836
2081
    {
1837
2082
      EmpathyCallWindowPriv *priv = GET_PRIV (window);
1838
 
      gboolean set_fullscreen = event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN;
 
2083
      gboolean set_fullscreen = event->new_window_state &
 
2084
        GDK_WINDOW_STATE_FULLSCREEN;
1839
2085
 
1840
2086
      if (set_fullscreen)
1841
2087
        {
1854
2100
            {
1855
2101
              priv->video_output_motion_handler_id = g_signal_connect (
1856
2102
                  G_OBJECT (priv->video_output), "motion-notify-event",
1857
 
                  G_CALLBACK (empathy_call_window_video_output_motion_notify), window);
 
2103
                  G_CALLBACK (empathy_call_window_video_output_motion_notify),
 
2104
                  window);
1858
2105
            }
1859
2106
        }
1860
2107
      else
2214
2461
{
2215
2462
  EmpathyCallWindowPriv *priv = GET_PRIV (window);
2216
2463
 
 
2464
  if (priv->audio_output == NULL)
 
2465
    return;
 
2466
 
2217
2467
  empathy_audio_sink_set_volume (EMPATHY_GST_AUDIO_SINK (priv->audio_output),
2218
2468
    value);
2219
2469
}