[X2Go-Commits] [pyhoca-gui] 02/02: Make the clipboard mode configurable through the session profile manager window. (Fixes: #507).
git-admin at x2go.org
git-admin at x2go.org
Sun Jun 29 14:26:24 CEST 2014
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository pyhoca-gui.
commit d9d413b00fc92e35e4c9f752c853ba72c1399384
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Sun Jun 29 14:25:00 2014 +0200
Make the clipboard mode configurable through the session profile manager window. (Fixes: #507).
---
debian/changelog | 2 ++
pyhoca/wxgui/profilemanager.py | 70 +++++++++++++++++++++++++++-------------
2 files changed, 50 insertions(+), 22 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 3c45a55..d54f82f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -61,6 +61,8 @@ pyhoca-gui (0.5.0.0-0x2go1) UNRELEASED; urgency=low
- Add subsystem string support for HOOK_forward_tunnel_setup_failed hook.
- Improve NX performance by reducing reactivity of wx widgets.
- Grey-out all SSH related options for DirectRDP sessions.
+ - Make the clipboard mode configurable through the session profile manager
+ window. (Fixes: #507).
* debian/control:
+ Add D (bin:package pyhoca-gui): python-cups. (Fixes: #460).
diff --git a/pyhoca/wxgui/profilemanager.py b/pyhoca/wxgui/profilemanager.py
index 87080f2..36af68c 100644
--- a/pyhoca/wxgui/profilemanager.py
+++ b/pyhoca/wxgui/profilemanager.py
@@ -103,6 +103,12 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
'OFFICE': _(u'Office'),
'TERMINAL': _(u'Terminal'),
}
+ self.clipboardModeChoices = {
+ 'both': _(u'between client and server'),
+ 'server': _(u'from server to client only'),
+ 'client': _(u'from client to server only'),
+ 'none': _(u'not at all')
+ }
self.rdpclientChoices = {
'rdesktop': u'rdesktop',
'xfreerdp': u'xfreerdp',
@@ -205,6 +211,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
self.staticbox_LinkSpeed = wx.StaticBox(self.tab_LinkQuality, -1, ' %s ' % _(u"Connection Link Speed"))
self.staticbox_Compression = wx.StaticBox(self.tab_LinkQuality, -1, ' %s ' % _(u"Compression"))
self.staticbox_Display = wx.StaticBox(self.tab_IO, -1, ' %s ' % _(u"Display"))
+ self.staticbox_Clipboard = wx.StaticBox(self.tab_IO, -1, ' %s ' % _(u"Clipboard"))
self.staticbox_Keyboard = wx.StaticBox(self.tab_IO, -1, ' %s ' % _(u"Keyboard"))
self.staticbox_Sound = wx.StaticBox(self.tab_MediaResources, -1, ' %s ' % _(u"Sound"))
self.staticbox_Printing = wx.StaticBox(self.tab_MediaResources, -1, ' %s ' % _(u"Printing"))
@@ -321,6 +328,8 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
self.ScreenHeight = wx.SpinCtrl(self.tab_IO, -1, "600", min=500, max=3000)
self.SetDisplayDPI = wx.CheckBox(self.tab_IO, -1, _(u"Set display DPI")+": ")
self.DisplayDPI = wx.SpinCtrl(self.tab_IO, -1, "96", min=32, max=512)
+ self.ClipboardModeLabel = wx.StaticText(self.tab_IO, -1, _(u"Allow copy'n'paste")+": ")
+ self.ClipboardMode = wx.ComboBox(self.tab_IO, -1, choices=self.clipboardModeChoices.values(), style=wx.CB_DROPDOWN|wx.CB_READONLY)
self.DontSetKeyboard = wx.RadioButton(self.tab_IO, -1, label=_(u"Do not set (use server-side tools to configure the keyboard)"), style=wx.RB_GROUP)
self.AutoSetKeyboard = wx.RadioButton(self.tab_IO, -1, label=_(u"Automatically detect and use client-side keyboard configuration inside the session"))
self.CustomSetKeyboard = wx.RadioButton(self.tab_IO, -1, label=_(u"Use custom keyboard settings as provided below") + ": ")
@@ -330,7 +339,6 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
self.KeyboardLayout = wx.TextCtrl(self.tab_IO, -1, "")
self.KeyboardVariantLabel = wx.StaticText(self.tab_IO, -1, _(u"Layout variant")+": ")
self.KeyboardVariant = wx.TextCtrl(self.tab_IO, -1, "")
-
###
### wigdets for the MEDIA tab
###
@@ -532,6 +540,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
self.DontSetKeyboard.SetMinSize((-1, self._textfield_height))
self.AutoSetKeyboard.SetMinSize((-1, self._textfield_height))
self.CustomSetKeyboard.SetMinSize((-1, self._textfield_height))
+ self.ClipboardMode.SetMinSize((220, -1))
self.KeyboardModelLabel.SetMinSize((-1, 16))
self.KeyboardModel.SetMinSize((-1, self._textfield_height))
self.KeyboardLayoutLabel.SetMinSize((-1, 16))
@@ -717,31 +726,41 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
sizer_5_1_1.Add(sizer_5_1_1_2)
sizer_5_1.Add(sizer_5_1_1, flag=wx.EXPAND|wx.ALL, border=7)
- sizer_5_2 = wx.StaticBoxSizer(self.staticbox_Keyboard, wx.VERTICAL)
- sizer_5_2_1 = wx.BoxSizer(wx.VERTICAL)
- sizer_5_2_1_1 = wx.BoxSizer(wx.VERTICAL)
- sizer_5_2_1_1.Add(self.DontSetKeyboard, )
- sizer_5_2_1_1.Add(self.AutoSetKeyboard, )
- sizer_5_2_1_1.Add(self.CustomSetKeyboard, )
- sizer_5_2_1_1.Add((0,8))
- sizer_5_2_1_2 = wx.BoxSizer(wx.HORIZONTAL)
- sizer_5_2_1_2.Add((32,0))
- sizer_5_2_1_2_1 = wx.GridBagSizer(hgap=2, vgap=2)
- sizer_5_2_1_2_1.Add(self.KeyboardModelLabel, pos=(0,0),)
- sizer_5_2_1_2_1.Add(self.KeyboardModel, flag=wx.EXPAND, pos=(1,0),)
- sizer_5_2_1_2_1.Add((32,0), pos=(0,1), span=(2,1))
- sizer_5_2_1_2_1.Add(self.KeyboardLayoutLabel, flag=wx.ALIGN_CENTRE_VERTICAL, pos=(0,2), )
- sizer_5_2_1_2_1.Add(self.KeyboardLayout, flag=wx.EXPAND, pos=(1,2), )
- sizer_5_2_1_2_1.Add((32,0), pos=(0,3), span=(2,1))
- sizer_5_2_1_2_1.Add(self.KeyboardVariantLabel, pos=(0,4),)
- sizer_5_2_1_2_1.Add(self.KeyboardVariant, flag=wx.EXPAND, pos=(1,4),)
- sizer_5_2_1_2.Add(sizer_5_2_1_2_1)
+ sizer_5_2 = wx.StaticBoxSizer(self.staticbox_Clipboard, wx.VERTICAL)
+ sizer_5_2_1 = wx.BoxSizer(wx.HORIZONTAL)
+ sizer_5_2_1_1 = wx.GridBagSizer(hgap=1, vgap=3)
+ sizer_5_2_1_1.Add(self.ClipboardModeLabel, flag=wx.ALIGN_CENTRE_VERTICAL, pos=(0,0),)
+ sizer_5_2_1_1.Add((8,0), pos=(0,1),)
+ sizer_5_2_1_1.Add(self.ClipboardMode, flag=wx.EXPAND|wx.ALIGN_CENTRE_VERTICAL, pos=(0,2),)
sizer_5_2_1.Add(sizer_5_2_1_1)
- sizer_5_2_1.Add(sizer_5_2_1_2)
sizer_5_2.Add(sizer_5_2_1, flag=wx.EXPAND|wx.ALL, border=7)
+ sizer_5_3 = wx.StaticBoxSizer(self.staticbox_Keyboard, wx.VERTICAL)
+ sizer_5_3_1 = wx.BoxSizer(wx.VERTICAL)
+ sizer_5_3_1_1 = wx.BoxSizer(wx.VERTICAL)
+ sizer_5_3_1_1.Add(self.DontSetKeyboard, )
+ sizer_5_3_1_1.Add(self.AutoSetKeyboard, )
+ sizer_5_3_1_1.Add(self.CustomSetKeyboard, )
+ sizer_5_3_1_1.Add((0,8))
+ sizer_5_3_1_2 = wx.BoxSizer(wx.HORIZONTAL)
+ sizer_5_3_1_2.Add((32,0))
+ sizer_5_3_1_2_1 = wx.GridBagSizer(hgap=2, vgap=2)
+ sizer_5_3_1_2_1.Add(self.KeyboardModelLabel, pos=(0,0),)
+ sizer_5_3_1_2_1.Add(self.KeyboardModel, flag=wx.EXPAND, pos=(1,0),)
+ sizer_5_3_1_2_1.Add((32,0), pos=(0,1), span=(2,1))
+ sizer_5_3_1_2_1.Add(self.KeyboardLayoutLabel, flag=wx.ALIGN_CENTRE_VERTICAL, pos=(0,2), )
+ sizer_5_3_1_2_1.Add(self.KeyboardLayout, flag=wx.EXPAND, pos=(1,2), )
+ sizer_5_3_1_2_1.Add((32,0), pos=(0,3), span=(2,1))
+ sizer_5_3_1_2_1.Add(self.KeyboardVariantLabel, pos=(0,4),)
+ sizer_5_3_1_2_1.Add(self.KeyboardVariant, flag=wx.EXPAND, pos=(1,4),)
+ sizer_5_3_1_2.Add(sizer_5_3_1_2_1)
+ sizer_5_3_1.Add(sizer_5_3_1_1)
+ sizer_5_3_1.Add(sizer_5_3_1_2)
+ sizer_5_3.Add(sizer_5_3_1, flag=wx.EXPAND|wx.ALL, border=7)
+
sizer_5.Add(sizer_5_1, flag=wx.EXPAND|wx.ALL, border=5)
- sizer_5.Add(sizer_5_2, proportion=1, flag=wx.EXPAND|wx.ALL, border=5)
+ sizer_5.Add(sizer_5_2, flag=wx.EXPAND|wx.ALL, border=5)
+ sizer_5.Add(sizer_5_3, proportion=1, flag=wx.EXPAND|wx.ALL, border=5)
self.tab_IO.SetSizerAndFit(sizer_5)
self.tab_IO.Layout()
@@ -1031,6 +1050,11 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
self.KeyboardLayout.SetValue(self.profile_config['layout'])
self.KeyboardVariant.SetValue(self.profile_config['variant'])
+ if self.profile_config['clipboard'] in self.clipboardModeChoices.keys():
+ self.ClipboardMode.SetValue(self.clipboardModeChoices[self.profile_config['clipboard']])
+ else:
+ self.ClipboardMode.SetValue(self.clipboardModeChoices['both'])
+
if self.DontSetKeyboard.GetValue() or self.AutoSetKeyboard.GetValue():
self.KeyboardModelLabel.Enable(False)
self.KeyboardLayoutLabel.Enable(False)
@@ -1392,6 +1416,8 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
self.profile_config['setdpi'] = self.SetDisplayDPI.GetValue()
self.profile_config['dpi'] = self.DisplayDPI.GetValue()
+ self.profile_config['clipboard'] = [ m for m in self.clipboardModeChoices.keys() if self.clipboardModeChoices[m] == self.ClipboardMode.GetValue() ][0]
+
self.profile_config['usekbd'] = self.CustomSetKeyboard.GetValue() or self.AutoSetKeyboard.GetValue()
self.profile_config['type'] = self.AutoSetKeyboard.GetValue() and "auto" or self.KeyboardModel.GetValue()
self.profile_config['layout'] = self.AutoSetKeyboard.GetValue() and "null" or self.KeyboardLayout.GetValue()
--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git
More information about the x2go-commits
mailing list