changeset 22:88b0f704e2ab

use settings from the connection object when connecting to via RDP
author Dirk Olmes <dirk@xanthippe.ping.de>
date Fri, 26 Sep 2014 04:09:37 +0200
parents 3190c60927e5
children 8f93457656b4
files RemoteViewer/Viewer.py
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/RemoteViewer/Viewer.py	Fri Sep 26 03:35:49 2014 +0200
+++ b/RemoteViewer/Viewer.py	Fri Sep 26 04:09:37 2014 +0200
@@ -44,8 +44,14 @@
 
 class FreeRdp(AbstractViewer):
     def buildCommand(self):
-        command = ['xfreerdp', '/v:' + self.connection.host]
-        user = self.connection.user
-        if user is not None:
-            command.append('/u:' + user)
-        return command
+        self.command = ['xfreerdp', '+clipboard' ]
+        self.append('/v:', self.connection.host)
+        self.append('/t:', self.connection.displayString())
+        self.append('/u:', self.connection.user)
+        self.append('/size:', self.connection.geometry)
+        print(self.command)
+        return self.command
+
+    def append(self, option, value):
+        if value is not None:
+            self.command.append(option + value)