[vinagre] Default to 8 bit color depth for Telepathy tubes
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vinagre] Default to 8 bit color depth for Telepathy tubes
- Date: Tue, 2 Aug 2011 15:52:36 +0000 (UTC)
commit b2ab39a6be0894dee93721a18fa028166da437f2
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Aug 2 10:07:26 2011 +0200
Default to 8 bit color depth for Telepathy tubes
For connections initiated via Telepathy tubes, it makes sense to use a
lower colour depth by default, as those connections are often slower
than local connections. Link-local connections are excluded, as those
are expected to be over the local network, and should use whatever color
depth settings the server provides. Fixes bug 655415.
vinagre/vinagre-tube-handler.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/vinagre/vinagre-tube-handler.c b/vinagre/vinagre-tube-handler.c
index d478113..6b4d767 100644
--- a/vinagre/vinagre-tube-handler.c
+++ b/vinagre/vinagre-tube-handler.c
@@ -223,6 +223,7 @@ vinagre_tube_handler_call_service_cb (TpProxy *channel,
gchar *host;
const gchar *service_s;
VinagreProtocol *plugin;
+ TpConnection *tp_conn;
if (error != NULL)
{
@@ -279,6 +280,15 @@ vinagre_tube_handler_call_service_cb (TpProxy *channel,
conn = vinagre_connection_new_from_string (host, &error_conn_msg,
TRUE);
+ /* Use 8 bits color depth to reduce bandwidth when using XMPP. We don't want
+ * this when using link-local XMPP as then the connection is local.
+ */
+ tp_conn = tp_channel_borrow_connection ((TpChannel *) channel);
+ if (!tp_strdiff (tp_connection_get_protocol_name (tp_conn), "jabber"))
+ {
+ vinagre_vnc_connection_set_depth_profile (conn, 3);
+ }
+
g_free (host);
if (conn == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]