[vinagre] Disable Ctrl-Alt-Del action in view-only mode



commit ecb09071fb4e6e5e3edf3bbbb118114ebd2151d3
Author: David King <amigadave amigadave com>
Date:   Sat Aug 13 09:49:26 2011 +0200

    Disable Ctrl-Alt-Del action in view-only mode
    
    Fixes bug 656451.

 plugins/vnc/vinagre-vnc-tab.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/vnc/vinagre-vnc-tab.c b/plugins/vnc/vinagre-vnc-tab.c
index 27ff6bf..914cdea 100644
--- a/plugins/vnc/vinagre-vnc-tab.c
+++ b/plugins/vnc/vinagre-vnc-tab.c
@@ -39,7 +39,7 @@ struct _VinagreVncTabPrivate
   gchar      *clipboard_str;
   GSList     *connected_actions, *initialized_actions;
   GtkWidget  *viewonly_button, *scaling_button;
-  GtkAction  *scaling_action, *viewonly_action, *original_size_action, *keep_ratio_action;
+  GtkAction  *scaling_action, *viewonly_action, *original_size_action, *keep_ratio_action, *ctrlaltdel_action;
   gulong     signal_clipboard, signal_align;
 };
 
@@ -673,6 +673,7 @@ create_initialized_actions (VinagreVncTab *tab)
   gtk_action_set_icon_name (a->action, "preferences-desktop-keyboard-shortcuts");
   g_signal_connect (a->action, "activate", G_CALLBACK (send_ctrlaltdel_cb), tab);
   list = g_slist_append (list, a);
+  tab->priv->ctrlaltdel_action = a->action;
 
   return list;
 }
@@ -936,6 +937,8 @@ vinagre_vnc_tab_set_viewonly (VinagreVncTab *tab, gboolean active) {
   vnc_display_set_read_only (VNC_DISPLAY (tab->priv->vnc), active);
   gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (tab->priv->viewonly_button),
 				     active);
+
+    gtk_action_set_sensitive (tab->priv->ctrlaltdel_action, !active);
 }
 
 gboolean



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]