Commit cfa7cefe authored by Felix Häcker's avatar Felix Häcker

new option to send ctrl alt del to host

parent 239e70a6
......@@ -128,7 +128,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="text" translatable="yes">Strg + Alt + Entf</property>
<property name="text" translatable="yes">Ctrl + Alt + Del</property>
<signal name="clicked" handler="ctrlaltdel_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
......@@ -138,9 +139,9 @@
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="text" translatable="yes">Strg + Alt + F1</property>
</object>
<packing>
......@@ -151,9 +152,9 @@
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="text" translatable="yes">Strg + Alt + F2</property>
</object>
<packing>
......@@ -164,9 +165,9 @@
</child>
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="text" translatable="yes">Strg + Alt + F3</property>
</object>
<packing>
......@@ -430,9 +431,9 @@
</child>
<child>
<object class="GtkMenuButton" id="send_keyboardshortcut_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="popover">send_keyboardshortcut_popover</property>
<child>
<object class="GtkImage">
......
......@@ -109,6 +109,10 @@ public class Remotely.VncBox : Box {
display.read_only = b;
}
public void send_keys(uint[] keys){
display.send_keys(keys);
}
public void set_zoom_mode(ZoomMode mode){
switch(mode){
case ZoomMode.FIT_WINDOW: {
......
......@@ -104,12 +104,22 @@ public class Remotely.Window : Gtk.ApplicationWindow {
cbox.set_view_only(view_only_checkbutton.active);
}
[GtkCallback]
private void ctrlaltdel_clicked(){
VncBox cbox = (VncBox)vnc_notebook.get_nth_page(vnc_notebook.get_current_page());
uint[] keys = {0xFFE3, 0xFFE9, 0xFFFF};
cbox.send_keys(keys);
}
private void update_view(){
if(vnc_notebook.get_n_pages() > 1) vnc_notebook.show_tabs = true;
else vnc_notebook.show_tabs = false;
if(vnc_notebook.get_n_pages() == 0){
vnc_stack.set_visible_child_name("no-connection");
header_bar.set_subtitle("");
connection_revealer.set_reveal_child(false);
}else{
vnc_stack.set_visible_child_name("notebook");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment