aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-05 20:38:28 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-05 21:34:58 +0800
commit20777152d7bfeca11a1477e4b472e3a3606c9de9 (patch)
tree0ed0d7b2cb67ea546211e91c7f269622e707a564
parentada2797e29180cea03fbb5c2a7d6c74d022b14c2 (diff)
downloadgsoc2013-empathy-20777152d7bfeca11a1477e4b472e3a3606c9de9.tar
gsoc2013-empathy-20777152d7bfeca11a1477e4b472e3a3606c9de9.tar.gz
gsoc2013-empathy-20777152d7bfeca11a1477e4b472e3a3606c9de9.tar.bz2
gsoc2013-empathy-20777152d7bfeca11a1477e4b472e3a3606c9de9.tar.lz
gsoc2013-empathy-20777152d7bfeca11a1477e4b472e3a3606c9de9.tar.xz
gsoc2013-empathy-20777152d7bfeca11a1477e4b472e3a3606c9de9.tar.zst
gsoc2013-empathy-20777152d7bfeca11a1477e4b472e3a3606c9de9.zip
factor out empathy_call_window_stream_error
-rw-r--r--src/empathy-call-window.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 64e72b130..8bbc9c391 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -1526,10 +1526,11 @@ media_stream_error_to_txt (EmpathyCallWindow *self,
}
static void
-empathy_call_window_audio_stream_error (EmpathyTpCall *call,
+empathy_call_window_stream_error (EmpathyCallWindow *self,
guint code,
const gchar *msg,
- EmpathyCallWindow *self)
+ const gchar *icon,
+ const gchar *title)
{
gchar *desc;
@@ -1537,26 +1538,28 @@ empathy_call_window_audio_stream_error (EmpathyTpCall *call,
if (desc == NULL)
return;
- display_error (self, "gnome-stock-mic", _("Can't establish audio stream"),
- desc);
+ display_error (self, icon, title, desc);
g_free (desc);
}
static void
-empathy_call_window_video_stream_error (EmpathyTpCall *call,
+empathy_call_window_audio_stream_error (EmpathyTpCall *call,
guint code,
const gchar *msg,
EmpathyCallWindow *self)
{
- gchar *desc;
-
- desc = media_stream_error_to_txt (self, code);
- if (desc == NULL)
- return;
+ empathy_call_window_stream_error (self, code, msg,
+ "gnome-stock-mic", _("Can't establish audio stream"));
+}
- display_error (self, "camera-web", _("Can't establish video stream"),
- desc);
- g_free (desc);
+static void
+empathy_call_window_video_stream_error (EmpathyTpCall *call,
+ guint code,
+ const gchar *msg,
+ EmpathyCallWindow *self)
+{
+ empathy_call_window_stream_error (self, code, msg,
+ "camera-web", _("Can't establish video stream"));
}
static gboolean