[gtk-vnc] Do not send clipboard messages when in View Only state
- From: Jonh Wendell S. Santana <jwendell src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk-vnc] Do not send clipboard messages when in View Only state
- Date: Tue, 17 Mar 2009 10:46:36 -0400 (EDT)
commit 4cb8a6d1d6fcb31d4ae18d369548e4cb1ed2afd3
Author: Jonh Wendell <jwendell gnome org>
Date: Tue Mar 17 09:06:59 2009 -0300
Do not send clipboard messages when in View Only state
---
src/vncdisplay.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/vncdisplay.c b/src/vncdisplay.c
index f1082da..6c608ca 100644
--- a/src/vncdisplay.c
+++ b/src/vncdisplay.c
@@ -1163,9 +1163,13 @@ static gboolean on_auth_unsupported(void *opaque, unsigned int auth_type)
static gboolean on_server_cut_text(void *opaque, const void* text, size_t len)
{
VncDisplay *obj = VNC_DISPLAY(opaque);
- GString *str = g_string_new_len ((const gchar *)text, len);
+ GString *str;
struct signal_data s;
+ if (obj->priv->read_only)
+ return TRUE;
+
+ str = g_string_new_len ((const gchar *)text, len);
s.str = str;
emit_signal_delayed(obj, VNC_SERVER_CUT_TEXT, &s);
@@ -2112,7 +2116,8 @@ void vnc_display_client_cut_text(VncDisplay *obj, const gchar *text)
{
g_return_if_fail (VNC_IS_DISPLAY (obj));
- gvnc_client_cut_text(obj->priv->gvnc, text, strlen (text));
+ if (!obj->priv->read_only)
+ gvnc_client_cut_text(obj->priv->gvnc, text, strlen (text));
}
void vnc_display_set_lossy_encoding(VncDisplay *obj, gboolean enable)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]