aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-event-manager.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-17 21:45:11 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-17 21:45:11 +0800
commit0b1118ceffb8320a75182c322a7942c8488cedc3 (patch)
tree0c25bd288ccd31ceb143c128b5d6a29709046556 /src/empathy-event-manager.c
parenteb0e906fdf31444a970cd907357cb383a61949c7 (diff)
downloadgsoc2013-empathy-0b1118ceffb8320a75182c322a7942c8488cedc3.tar
gsoc2013-empathy-0b1118ceffb8320a75182c322a7942c8488cedc3.tar.gz
gsoc2013-empathy-0b1118ceffb8320a75182c322a7942c8488cedc3.tar.bz2
gsoc2013-empathy-0b1118ceffb8320a75182c322a7942c8488cedc3.tar.lz
gsoc2013-empathy-0b1118ceffb8320a75182c322a7942c8488cedc3.tar.xz
gsoc2013-empathy-0b1118ceffb8320a75182c322a7942c8488cedc3.tar.zst
gsoc2013-empathy-0b1118ceffb8320a75182c322a7942c8488cedc3.zip
approve_channels: use quarks to compare channel types
Diffstat (limited to 'src/empathy-event-manager.c')
-rw-r--r--src/empathy-event-manager.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index c295f6b99..b604c3a08 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -791,7 +791,7 @@ approve_channels (TpSimpleApprover *approver,
EmpathyEventManagerPriv *priv = GET_PRIV (self);
TpChannel *channel;
EventManagerApproval *approval;
- const gchar *channel_type;
+ GQuark channel_type;
channel = find_main_channel (channels);
if (channel == NULL)
@@ -811,9 +811,9 @@ approve_channels (TpSimpleApprover *approver,
approval->invalidated_handler = g_signal_connect (dispatch_operation,
"invalidated", G_CALLBACK (cdo_invalidated_cb), approval);
- channel_type = tp_channel_get_channel_type (channel);
+ channel_type = tp_channel_get_channel_type_id (channel);
- if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TEXT))
+ if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_TEXT)
{
EmpathyTpChat *tp_chat;
@@ -845,7 +845,7 @@ approve_channels (TpSimpleApprover *approver,
approval->handler = g_signal_connect (tp_chat, "message-received",
G_CALLBACK (event_manager_chat_message_received_cb), approval);
}
- else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA))
+ else if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_STREAMED_MEDIA)
{
EmpathyContact *contact;
EmpathyTpCall *call = empathy_tp_call_new (channel);
@@ -867,7 +867,7 @@ approve_channels (TpSimpleApprover *approver,
}
}
- else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER))
+ else if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER)
{
TpHandle handle;
@@ -882,7 +882,8 @@ approve_channels (TpSimpleApprover *approver,
GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
"Invalid channel type" };
- DEBUG ("Unknown channel type (%s), ignoring..", channel_type);
+ DEBUG ("Unknown channel type (%s), ignoring..",
+ g_quark_to_string (channel_type));
tp_add_dispatch_operation_context_fail (context, &error);
return;