diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-accounts-dialog.c | 2 | ||||
-rw-r--r-- | src/empathy-audio-sink.c | 23 | ||||
-rw-r--r-- | src/empathy-audio-src.c | 8 | ||||
-rw-r--r-- | src/empathy-call-observer.c | 14 | ||||
-rw-r--r-- | src/empathy-call-window.c | 42 | ||||
-rw-r--r-- | src/empathy-chat-window.c | 7 | ||||
-rw-r--r-- | src/empathy-event-manager.c | 12 | ||||
-rw-r--r-- | src/empathy-roster-window.c | 2 | ||||
-rw-r--r-- | src/empathy-video-src.c | 26 |
9 files changed, 11 insertions, 125 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index 83f1334cb..76b460a7e 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -279,6 +279,8 @@ account_is_selected (EmpathyAccountsDialog *dialog, return FALSE; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview)); + if (selection == NULL) + return FALSE; if (!gtk_tree_selection_get_selected (selection, &model, &iter)) return FALSE; diff --git a/src/empathy-audio-sink.c b/src/empathy-audio-sink.c index e0e43e440..f3a78bf3f 100644 --- a/src/empathy-audio-sink.c +++ b/src/empathy-audio-sink.c @@ -21,12 +21,7 @@ #include "config.h" #include "empathy-audio-sink.h" -#ifdef HAVE_GST1 #include <gst/audio/streamvolume.h> -#else -#include <gst/audio/audio.h> -#include <gst/interfaces/streamvolume.h> -#endif #include "empathy-audio-utils.h" @@ -49,12 +44,7 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE( "sink%d", GST_PAD_SINK, GST_PAD_REQUEST, -#ifdef HAVE_GST1 GST_STATIC_CAPS ( "audio/x-raw" ) -#else - GST_STATIC_CAPS ( GST_AUDIO_INT_PAD_TEMPLATE_CAPS " ; " - GST_AUDIO_FLOAT_PAD_TEMPLATE_CAPS) -#endif ); enum { @@ -82,16 +72,10 @@ empathy_audio_sink_init (EmpathyGstAudioSink *self) g_mutex_init (&self->priv->volume_mutex); } -#ifdef HAVE_GST1 static GstPad * empathy_audio_sink_request_new_pad (GstElement *self, GstPadTemplate *templ, const gchar* name, const GstCaps *caps); -#else -static GstPad * empathy_audio_sink_request_new_pad (GstElement *self, - GstPadTemplate *templ, - const gchar* name); -#endif static void empathy_audio_sink_release_pad (GstElement *self, GstPad *pad); @@ -302,18 +286,11 @@ empathy_audio_sink_volume_idle_setup (gpointer user_data) return FALSE; } -#ifdef HAVE_GST1 static GstPad * empathy_audio_sink_request_new_pad (GstElement *element, GstPadTemplate *templ, const gchar* name, const GstCaps *caps) -#else -static GstPad * -empathy_audio_sink_request_new_pad (GstElement *element, - GstPadTemplate *templ, - const gchar* name) -#endif { EmpathyGstAudioSink *self = EMPATHY_GST_AUDIO_SINK (element); GstElement *bin, *resample, *audioconvert0, *audioconvert1; diff --git a/src/empathy-audio-src.c b/src/empathy-audio-src.c index fcca6621d..86d197d26 100644 --- a/src/empathy-audio-src.c +++ b/src/empathy-audio-src.c @@ -23,11 +23,7 @@ #include <tp-account-widgets/tpaw-utils.h> -#ifdef HAVE_GST1 #include <gst/audio/streamvolume.h> -#else -#include <gst/interfaces/streamvolume.h> -#endif #include "empathy-audio-utils.h" #include "empathy-mic-monitor.h" @@ -314,7 +310,6 @@ empathy_audio_src_init (EmpathyGstAudioSrc *obj) priv->volume_element = gst_element_factory_make ("volume", NULL); gst_bin_add (GST_BIN (obj), priv->volume_element); -#ifndef HAVE_GST1 { GstElement *capsfilter; GstCaps *caps; @@ -336,9 +331,6 @@ empathy_audio_src_init (EmpathyGstAudioSrc *obj) gst_element_link (priv->src, capsfilter); gst_element_link (capsfilter, priv->volume_element); } -#else - gst_element_link (priv->src, priv->volume_element); -#endif src = gst_element_get_static_pad (priv->volume_element, "src"); diff --git a/src/empathy-call-observer.c b/src/empathy-call-observer.c index 93f2515f5..82887b009 100644 --- a/src/empathy-call-observer.c +++ b/src/empathy-call-observer.c @@ -147,8 +147,7 @@ find_main_channel (GList *channels) channel_type = tp_channel_get_channel_type_id (channel); - if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_STREAMED_MEDIA || - channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL) + if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL) return channel; } @@ -220,7 +219,7 @@ observe_channels (TpSimpleObserver *observer, GError err = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Unknown channel type" }; - DEBUG ("Didn't find any Call or StreamedMedia channel; ignoring"); + DEBUG ("Didn't find any Call channel; ignoring"); tp_observe_channels_context_fail (context, &err); return; @@ -324,14 +323,7 @@ empathy_call_observer_init (EmpathyCallObserver *self) "Empathy.CallObserver", FALSE, observe_channels, self, NULL); - /* Observe Call and StreamedMedia channels */ - tp_base_client_take_observer_filter (self->priv->observer, - tp_asv_new ( - TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, - TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, - TP_HANDLE_TYPE_CONTACT, - NULL)); + /* Observe Call channels */ tp_base_client_take_observer_filter (self->priv->observer, tp_asv_new ( TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index c54c4dfd8..077cbe312 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -2818,11 +2818,7 @@ empathy_call_window_get_video_sink_pad (EmpathyCallWindow *self) if (priv->funnel == NULL) { output = priv->video_output_sink; -#ifdef HAVE_GST1 priv->funnel = gst_element_factory_make ("funnel", NULL); -#else - priv->funnel = gst_element_factory_make ("fsfunnel", NULL); -#endif if (!priv->funnel) { @@ -2862,11 +2858,7 @@ empathy_call_window_get_video_sink_pad (EmpathyCallWindow *self) goto error_output_added; } } -#ifdef HAVE_GST1 pad = gst_element_get_request_pad (priv->funnel, "sink_%u"); -#else - pad = gst_element_get_request_pad (priv->funnel, "sink%d"); -#endif if (!pad) g_warning ("Could not get request pad from funnel"); @@ -3347,7 +3339,6 @@ empathy_call_window_check_video_cb (gpointer data) } /* Called from the streaming thread */ -#ifdef HAVE_GST1 static GstPadProbeReturn empathy_call_window_video_probe_cb (GstPad *pad, GstPadProbeInfo *info, @@ -3367,29 +3358,6 @@ empathy_call_window_video_probe_cb (GstPad *pad, return GST_PAD_PROBE_OK; } -#else -static gboolean -empathy_call_window_video_probe_cb (GstPad *pad, - GstMiniObject *mini_obj, - EmpathyCallWindow *self) -{ - /* Ignore events */ - if (GST_IS_EVENT (mini_obj)) - return TRUE; - - if (G_UNLIKELY (!self->priv->got_video)) - { - /* show the remote video */ - g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, - empathy_call_window_show_video_output_cb, - g_object_ref (self), g_object_unref); - - self->priv->got_video = TRUE; - } - - return TRUE; -} -#endif /* Called from the streaming thread */ static gboolean @@ -3416,14 +3384,10 @@ empathy_call_window_src_added_cb (EmpathyCallHandler *handler, g_idle_add (empathy_call_window_show_video_output_cb, self); pad = empathy_call_window_get_video_sink_pad (self); -#ifdef HAVE_GST1 gst_pad_add_probe (src, GST_PAD_PROBE_TYPE_BUFFER | GST_PAD_PROBE_TYPE_BUFFER_LIST, empathy_call_window_video_probe_cb, self, NULL); -#else - gst_pad_add_data_probe (src, - G_CALLBACK (empathy_call_window_video_probe_cb), self); -#endif + if (priv->got_video_src > 0) g_source_remove (priv->got_video_src); priv->got_video_src = g_timeout_add_seconds (1, @@ -3602,11 +3566,7 @@ empathy_call_window_content_added_cb (EmpathyCallHandler *handler, case FS_MEDIA_TYPE_VIDEO: if (priv->video_tee != NULL) { -#ifdef HAVE_GST1 pad = gst_element_get_request_pad (priv->video_tee, "src_%u"); -#else - pad = gst_element_get_request_pad (priv->video_tee, "src%d"); -#endif if (GST_PAD_LINK_FAILED (gst_pad_link (pad, sink))) { g_warning ("Could not link video source input pipeline"); diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index f7c8707eb..b49635629 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -42,7 +42,6 @@ #include "empathy-invite-participant-dialog.h" #include "empathy-notify-manager.h" #include "empathy-request-util.h" -#include "empathy-smiley-manager.h" #include "empathy-sound-manager.h" #include "empathy-ui-utils.h" #include "empathy-utils.h" @@ -1075,13 +1074,11 @@ chat_window_insert_smiley_activate_cb (EmpathySmileyManager *manager, EmpathyChatWindow *self = user_data; EmpathyChat *chat; GtkTextBuffer *buffer; - GtkTextIter iter; chat = self->priv->current_chat; - buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (chat->input_text_view)); - gtk_text_buffer_get_end_iter (buffer, &iter); - gtk_text_buffer_insert (buffer, &iter, smiley->str, -1); + + empathy_chat_insert_smiley (buffer, smiley); } static void diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c index b8f1a477b..dbb6a35bf 100644 --- a/src/empathy-event-manager.c +++ b/src/empathy-event-manager.c @@ -612,8 +612,7 @@ event_manager_approval_done (EventManagerApproval *approval) channel_type = tp_channel_get_channel_type_id (approval->main_channel); - if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_STREAMED_MEDIA || - channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL) + if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL) { priv->ringing--; if (priv->ringing == 0) @@ -797,8 +796,7 @@ find_main_channel (GList *channels) channel_type = tp_channel_get_channel_type_id (channel); - if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_STREAMED_MEDIA || - channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL || + if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL || channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER || channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_SERVER_AUTHENTICATION) return channel; @@ -1408,12 +1406,6 @@ empathy_event_manager_init (EmpathyEventManager *manager) tp_base_client_take_approver_filter (priv->approver, tp_asv_new ( TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, - TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT, - NULL)); - tp_base_client_take_approver_filter (priv->approver, - tp_asv_new ( - TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_CALL, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT, NULL)); diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c index e06ea9333..831922760 100644 --- a/src/empathy-roster-window.c +++ b/src/empathy-roster-window.c @@ -1726,7 +1726,7 @@ set_notebook_page (EmpathyRosterWindow *self) { if (g_settings_get_boolean (self->priv->gsettings_ui, EMPATHY_PREFS_UI_SHOW_OFFLINE)) - display_page_message (self, _("You haven't added any contact yet"), + display_page_message (self, _("You haven't added any contacts yet"), PAGE_MESSAGE_FLAG_ADD_CONTACT); else display_page_message (self, _("No online contacts"), diff --git a/src/empathy-video-src.c b/src/empathy-video-src.c index 9856efed9..41dea2377 100644 --- a/src/empathy-video-src.c +++ b/src/empathy-video-src.c @@ -21,11 +21,7 @@ #include "config.h" #include "empathy-video-src.h" -#ifdef HAVE_GST1 #include <gst/video/colorbalance.h> -#else -#include <gst/interfaces/colorbalance.h> -#endif #define DEBUG_FLAG EMPATHY_DEBUG_VOIP #include "empathy-debug.h" @@ -112,7 +108,6 @@ error: return NULL; } -#ifdef HAVE_GST1 static GstPadProbeReturn empathy_video_src_drop_eos (GstPad *pad, GstPadProbeInfo *info, @@ -123,13 +118,6 @@ empathy_video_src_drop_eos (GstPad *pad, return GST_PAD_PROBE_OK; } -#else -static gboolean -empathy_video_src_drop_eos (GstPad *pad, GstEvent *event, gpointer user_data) -{ - return GST_EVENT_TYPE (event) != GST_EVENT_EOS; -} -#endif static void empathy_video_src_init (EmpathyGstVideoSrc *obj) @@ -141,11 +129,7 @@ empathy_video_src_init (EmpathyGstVideoSrc *obj) gchar *str; /* allocate caps here, so we can update it by optional elements */ -#ifdef HAVE_GST1 caps = gst_caps_new_simple ("video/x-raw", -#else - caps = gst_caps_new_simple ("video/x-raw-yuv", -#endif "width", G_TYPE_INT, 320, "height", G_TYPE_INT, 240, NULL); @@ -162,12 +146,8 @@ empathy_video_src_init (EmpathyGstVideoSrc *obj) * source (triggering an EOS) */ src = gst_element_get_static_pad (element, "src"); -#ifdef HAVE_GST1 gst_pad_add_probe (src, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, empathy_video_src_drop_eos, NULL, NULL); -#else - gst_pad_add_event_probe (src, G_CALLBACK (empathy_video_src_drop_eos), NULL); -#endif gst_object_unref (src); @@ -202,15 +182,9 @@ empathy_video_src_init (EmpathyGstVideoSrc *obj) DEBUG ("Current video src caps are : %s", str); g_free (str); -#ifdef HAVE_GST1 if ((element = empathy_gst_add_to_bin (GST_BIN (obj), element, "videoconvert")) == NULL) g_error ("Failed to add \"videoconvert\" (gst-plugins-base missing?)"); -#else - if ((element = empathy_gst_add_to_bin (GST_BIN (obj), - element, "ffmpegcolorspace")) == NULL) - g_error ("Failed to add \"ffmpegcolorspace\" (gst-plugins-base missing?)"); -#endif if ((element = empathy_gst_add_to_bin (GST_BIN (obj), element, "videoscale")) == NULL) |