gitso

gitso Commit Details


Date:2012-09-26 15:48:13 (12 years 2 months ago)
Author:herr.biber
Branch:master
Commit:98cd008fb1a1f1410158a3adb9cd404c0063ae1d
Parents: 106d667fd78ed6ed62cea162a8d639a68f18b5b2
Message:Added 8 bit color compression.

Currently, it works only with vncviewer under linux.
--low-colors command line argument added.
Includes checkbox in GUI.

Fixes issue 9 and issue 52 for linux.
Changes:

File differences

gitso/trunk/ArgsParser.py
4141
4242
4343
44
44
4545
4646
4747
......
106106
107107
108108
109
110
111
109112
110113
111114
......
142145
143146
144147
148
145149
146150
147151
self.paths['connect'] = ''
self.paths['list'] = []
self.paths['mode'] = ''
self.paths['low-colors'] = False
if sys.platform.find('linux') != -1:
self.paths['main'] = os.path.join(sys.path[0], '..', 'share', 'gitso')
print "Error: '" + sys.argv[i] + "' is not a valid host with '--connect'."
self.HelpMenu()
elif sys.argv[i] == '--low-colors': # --low-colors
self.paths['low-colors'] = True;
elif sys.argv[i] == '--list': # --list
i = i + 1
if i >= len(sys.argv):
print " --listen\t\tListen for incoming connections."
print " --connect {IP|DN}\tConnects to host (support giver)."
print " --list {URL|FILE}\tAlternative Support list."
print " --low-colors\t\tUse 8bit colors (for slow connections). Linux only."
print " --version\t\tThe current Gitso version."
print " --help\t\tThis Menu."
exit(1)
gitso/trunk/ConnectionWindow.py
4040
4141
4242
43
4344
4445
4546
......
7172
7273
7374
74
75
7576
7677
77
78
7879
7980
8081
......
9293
9394
9495
95
96
97
98
99
100
101
96102
97103
98104
......
162168
163169
164170
171
165172
166173
167174
168175
176
169177
170178
171179
172180
173181
174182
183
175184
176185
177186
178
179
187
188
180189
181190
182191
......
342351
343352
344353
354
345355
346356
347357
@author: Derek Buranen
@author: Aaron Gerber
@author: Markus Roth
"""
self.ToggleValue = 0
self.paths = paths
self.SetIcon(icon)
#Buttons
self.connectButton = wx.Button(self, 10, "Start", wx.Point(xval1, 70))
self.connectButton = wx.Button(self, 10, "Start", wx.Point(xval1, 81))
self.connectButton.SetDefault()
wx.EVT_BUTTON(self, 10, self.ConnectSupport)
self.stopButton = wx.Button(self, wx.ID_STOP, "", wx.Point(xval2, 70))
self.stopButton = wx.Button(self, wx.ID_STOP, "", wx.Point(xval2, 81))
self.stopButton.Enable(False)
wx.EVT_BUTTON(self, wx.ID_STOP, self.KillPID)
self.cb1 = wx.CheckBox(self, -1, 'Use NAT-PMP', (130, 48))
self.cb1.Enable(False)
# Checkbox for low color
self.cb2 = wx.CheckBox(self, -1, 'Use low colors', (10, 81))
self.cb2.Set3StateValue(False)
self.cb2.SetValue(self.paths['low-colors']) # Use value of --low-colors from command line
self.cb2.Enable(False)
# the combobox Control
self.sampleList = self.paths['list']
@author: Derek Buranen
@author: Aaron Gerber
@author: Markus Roth
"""
if self.rb1.GetValue():
self.ToggleValue = 0
self.hostField.Enable(True)
self.cb2.Enable(False)
if sys.platform == 'darwin' or sys.platform.find('linux') != -1:
if self.enablePMP:
self.cb1.Enable(False)
else:
self.ToggleValue = 1
self.hostField.Enable(False)
self.cb2.Enable(True)
if sys.platform == 'darwin' or sys.platform.find('linux') != -1:
if self.enablePMP:
self.cb1.Enable(True)
def ConnectSupport(self, event):
"""
Call VNC in a thread.
self.threadLock.release()
def createThread(self, host=""):
self.paths['low-colors'] = self.cb2.GetValue() # Set low-colors to value of checkbox
self.KillPID(False)
self.thread = GitsoThread.GitsoThread(self, self.paths)
self.thread.setHost(host)
gitso/trunk/Processes.py
6060
6161
6262
63
6463
6564
6665
67
66
67
68
69
70
6871
6972
7073
vncviewer = '%scotvnc.app/Contents/MacOS/cotvnc' % self.paths['resources']
self.returnPID = os.spawnlp(os.P_NOWAIT, vncviewer, vncviewer, '--listen')
elif sys.platform.find('linux') != -1:
self.returnPID = os.spawnlp(os.P_NOWAIT, 'vncviewer', 'vncviewer', '-listen')
# These are the options for low-res connections.
# In the future, I'd like to support cross-platform low-res options.
# self.returnPID = os.spawnlp(os.P_NOWAIT, 'vncviewer', 'vncviewer', '-bgr233', '-listen')
# What aboot a checkbox in the gui
if self.paths['low-colors'] == False:
self.returnPID = os.spawnlp(os.P_NOWAIT, 'vncviewer', 'vncviewer', '-listen')
else:
self.returnPID = os.spawnlp(os.P_NOWAIT, 'vncviewer', 'vncviewer', '-bgr233', '-listen')
elif sys.platform == 'win32':
import subprocess
if self.paths['mode'] == 'dev':
gitso/trunk/arch/linux/gitso.1
1414
1515
1616
17
18
1719
1820
1921
......
3840
3941
4042
43
44
45
4146
4247
4348
.B --list
.I list
|
.B --low-colors
|
.B --version
|
.B --help
.I list
is either a URL of a remote file or path to local file.
.TP
.B --low-colors
Use 8bit colors (for slow connections).
.TP
.B --version
The current Gitso version.
.TP

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.06332s using 15 queries.