vinagre r307 - in trunk: . data src
- From: jwendell svn gnome org
- To: svn-commits-list gnome org
- Subject: vinagre r307 - in trunk: . data src
- Date: Tue, 29 Apr 2008 14:17:11 +0100 (BST)
Author: jwendell
Date: Tue Apr 29 13:17:11 2008
New Revision: 307
URL: http://svn.gnome.org/viewvc/vinagre?rev=307&view=rev
Log:
2008-04-29 Jonh Wendell <jwendell gnome org>
* Added "Send ctrl-alt-del" option to menu and toolbar.
Closes #490841. Patch from Henrik Holst.
Modified:
trunk/ChangeLog
trunk/data/vinagre-ui.xml
trunk/src/vinagre-commands.c
trunk/src/vinagre-commands.h
trunk/src/vinagre-tab.c
trunk/src/vinagre-tab.h
trunk/src/vinagre-ui.h
trunk/src/vinagre-window.c
Modified: trunk/data/vinagre-ui.xml
==============================================================================
--- trunk/data/vinagre-ui.xml (original)
+++ trunk/data/vinagre-ui.xml Tue Apr 29 13:17:11 2008
@@ -27,6 +27,7 @@
<separator/>
<menuitem name="MachineCloseMenu" action="MachineClose"/>
<menuitem name="MachineTakeScreenshotMenu" action="MachineTakeScreenshot"/>
+ <menuitem name="MachineSendCtrlAltDelMenu" action="MachineSendCtrlAltDel"/>
<placeholder name="FileRecentsPlaceholder">
<separator/>
</placeholder>
@@ -68,6 +69,7 @@
<separator/>
<toolitem action="ViewFullScreen"/>
<toolitem action="MachineTakeScreenshot"/>
+ <toolitem action="MachineSendCtrlAltDel"/>
</toolbar>
<popup name="FavPopup" action="FavPopupAction">
Modified: trunk/src/vinagre-commands.c
==============================================================================
--- trunk/src/vinagre-commands.c (original)
+++ trunk/src/vinagre-commands.c Tue Apr 29 13:17:11 2008
@@ -155,6 +155,13 @@
}
void
+vinagre_cmd_machine_send_ctrlaltdel (GtkAction *action,
+ VinagreWindow *window)
+{
+ vinagre_tab_send_ctrlaltdel (vinagre_window_get_active_tab (window));
+}
+
+void
vinagre_cmd_machine_close_all (GtkAction *action,
VinagreWindow *window)
{
Modified: trunk/src/vinagre-commands.h
==============================================================================
--- trunk/src/vinagre-commands.h (original)
+++ trunk/src/vinagre-commands.h Tue Apr 29 13:17:11 2008
@@ -38,6 +38,8 @@
VinagreWindow *window);
void vinagre_cmd_machine_take_screenshot (GtkAction *action,
VinagreWindow *window);
+void vinagre_cmd_machine_send_ctrlaltdel (GtkAction *action,
+ VinagreWindow *window);
void vinagre_cmd_machine_close_all (GtkAction *action,
VinagreWindow *window);
Modified: trunk/src/vinagre-tab.c
==============================================================================
--- trunk/src/vinagre-tab.c (original)
+++ trunk/src/vinagre-tab.c Tue Apr 29 13:17:11 2008
@@ -22,6 +22,7 @@
#include <config.h>
#endif
+#include <gdk/gdkkeysyms.h>
#include <glib/gi18n.h>
#include <glade/glade.h>
#include <gnome-keyring.h>
@@ -782,6 +783,16 @@
}
void
+vinagre_tab_send_ctrlaltdel (VinagreTab *tab)
+{
+ guint keys[] = { GDK_Control_L, GDK_Alt_L, GDK_Delete };
+
+ g_return_if_fail (VINAGRE_IS_TAB (tab));
+
+ vnc_display_send_keys_ex (VNC_DISPLAY (tab->priv->vnc), keys, sizeof (keys) / sizeof (keys[0]), VNC_DISPLAY_KEY_EVENT_CLICK);
+}
+
+void
vinagre_tab_paste_text (VinagreTab *tab, const gchar *text)
{
gchar *out;
Modified: trunk/src/vinagre-tab.h
==============================================================================
--- trunk/src/vinagre-tab.h (original)
+++ trunk/src/vinagre-tab.h Tue Apr 29 13:17:11 2008
@@ -84,6 +84,7 @@
VinagreNotebook *vinagre_tab_get_notebook (VinagreTab *tab);
void vinagre_tab_take_screenshot (VinagreTab *tab);
+void vinagre_tab_send_ctrlaltdel (VinagreTab *tab);
void vinagre_tab_paste_text (VinagreTab *tab,
const gchar *text);
Modified: trunk/src/vinagre-ui.h
==============================================================================
--- trunk/src/vinagre-ui.h (original)
+++ trunk/src/vinagre-ui.h Tue Apr 29 13:17:11 2008
@@ -79,6 +79,9 @@
{ "MachineTakeScreenshot", "applets-screenshooter", N_("Take screenshot"), NULL,
N_("Take a screenshot of active connection"), G_CALLBACK (vinagre_cmd_machine_take_screenshot) },
+ { "MachineSendCtrlAltDel", "preferences-desktop-keyboard-shortcuts", N_("Send Ctrl-Alt-Del"), NULL,
+ N_("Send Ctrl+Alt+Del to active connection"), G_CALLBACK (vinagre_cmd_machine_send_ctrlaltdel) },
+
/* View menu */
{ "ViewFullScreen", GTK_STOCK_FULLSCREEN, NULL, "F11",
N_("View the current machine in full screen"), G_CALLBACK (vinagre_cmd_view_fullscreen) },
Modified: trunk/src/vinagre-window.c
==============================================================================
--- trunk/src/vinagre-window.c (original)
+++ trunk/src/vinagre-window.c Tue Apr 29 13:17:11 2008
@@ -396,6 +396,8 @@
g_object_set (action, "is_important", TRUE, NULL);
action = gtk_action_group_get_action (action_group, "MachineTakeScreenshot");
g_object_set (action, "is_important", TRUE, NULL);
+ action = gtk_action_group_get_action (action_group, "MachineSendCtrlAltDel");
+ g_object_set (action, "is_important", TRUE, NULL);
/* now load the UI definition */
gtk_ui_manager_add_ui_from_file (manager, vinagre_utils_get_ui_xml_filename (), &error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]