Commit bf079525 by Csók Tamás

client: custom urls got circle: prefix

parent 0f004e30
...@@ -141,8 +141,8 @@ def main(): ...@@ -141,8 +141,8 @@ def main():
args = parse_arguments() args = parse_arguments()
if args.uri is not None: if args.uri is not None:
vm = Struct() vm = Struct()
vm.protocol, vm.user, vm.password, vm.host, vm.port = \ x, vm.protocol, vm.user, vm.password, vm.host, vm.port = \
args.uri.split(':', 4) args.uri.split(':', 5)
vm.protocol = vm.protocol.upper() vm.protocol = vm.protocol.upper()
vm.state = "RUN" vm.state = "RUN"
else: else:
......
...@@ -136,39 +136,17 @@ def main(): ...@@ -136,39 +136,17 @@ def main():
shutil.copy(location, args.location) shutil.copy(location, args.location)
print "Creating custom URL protocol handlers" print "Creating custom URL protocol handlers"
try: try:
custom_ssh = OrderedDict([ custom_protocol = OrderedDict([
('ssh', ["default", ('circle', ["default",
"URL:ssh Protocol", "URL:circle Protocol",
"URL Protocol", "URL Protocol",
""]), ""]),
('ssh\\URL Protocol', ""), ('circle\\URL Protocol', ""),
('ssh\\DefaultIcon', args.location+"cloud.ico"), ('circle\\DefaultIcon', args.location+"cloud.ico"),
('ssh\\shell', {'open': { ('circle\\shell', {'open': {
'command': "\"pythonw.exe\" \"%s" % args.location 'command': "\"pythonw.exe\" \"%s" % args.location
+ "cloud.py\" \"%1\""}})]) + "cloud.py\" \"%1\""}})])
custom_protocol_register(custom_ssh) custom_protocol_register(custom_protocol)
custom_rdp = OrderedDict([
('rdp', ["default",
"URL:rdp Protocol",
"URL Protocol",
""]),
('rdp\\URL Protocol', ""),
('rdp\\DefaultIcon', args.location + "cloud.ico"),
('rdp\\shell', {'open': {
'command': "\"pythonw.exe\" \"%s" % args.location
+ "cloud.py\" \"%1\""}})])
custom_protocol_register(custom_rdp)
custom_nx = OrderedDict([
('nx', ["default",
"URL:nx Protocol",
"URL Protocol",
""]),
('nx\\URL Protocol', ""),
('nx\\DefaultIcon', args.location + "cloud.ico"),
('nx\\shell', {'open': {
'command': "\"pythonw.exe\" \"%s" % args.location
+ "cloud.py\" \"%1\""}})])
custom_protocol_register(custom_nx)
except: except:
print "Error! URL Protocol handler installation aborted!" print "Error! URL Protocol handler installation aborted!"
except: except:
......
...@@ -141,8 +141,8 @@ def main(): ...@@ -141,8 +141,8 @@ def main():
args = parse_arguments() args = parse_arguments()
if args.uri is not None: if args.uri is not None:
vm = Struct() vm = Struct()
vm.protocol, vm.user, vm.password, vm.host, vm.port = \ x, vm.protocol, vm.user, vm.password, vm.host, vm.port = \
args.uri.split(':', 4) args.uri.split(':', 5)
vm.protocol = vm.protocol.upper() vm.protocol = vm.protocol.upper()
vm.state = "RUN" vm.state = "RUN"
else: else:
......
...@@ -136,39 +136,17 @@ def main(): ...@@ -136,39 +136,17 @@ def main():
shutil.copy(location, args.location) shutil.copy(location, args.location)
print "Creating custom URL protocol handlers" print "Creating custom URL protocol handlers"
try: try:
custom_ssh = OrderedDict([ custom_protocol = OrderedDict([
('ssh', ["default", ('circle', ["default",
"URL:ssh Protocol", "URL:circle Protocol",
"URL Protocol", "URL Protocol",
""]), ""]),
('ssh\\URL Protocol', ""), ('circle\\URL Protocol', ""),
('ssh\\DefaultIcon', args.location+"cloud.ico"), ('circle\\DefaultIcon', args.location+"cloud.ico"),
('ssh\\shell', {'open': { ('circle\\shell', {'open': {
'command': "\"pythonw.exe\" \"%s" % args.location 'command': "\"pythonw.exe\" \"%s" % args.location
+ "cloud.py\" \"%1\""}})]) + "cloud.py\" \"%1\""}})])
custom_protocol_register(custom_ssh) custom_protocol_register(custom_protocol)
custom_rdp = OrderedDict([
('rdp', ["default",
"URL:rdp Protocol",
"URL Protocol",
""]),
('rdp\\URL Protocol', ""),
('rdp\\DefaultIcon', args.location + "cloud.ico"),
('rdp\\shell', {'open': {
'command': "\"pythonw.exe\" \"%s" % args.location
+ "cloud.py\" \"%1\""}})])
custom_protocol_register(custom_rdp)
custom_nx = OrderedDict([
('nx', ["default",
"URL:nx Protocol",
"URL Protocol",
""]),
('nx\\URL Protocol', ""),
('nx\\DefaultIcon', args.location + "cloud.ico"),
('nx\\shell', {'open': {
'command': "\"pythonw.exe\" \"%s" % args.location
+ "cloud.py\" \"%1\""}})])
custom_protocol_register(custom_nx)
except: except:
print "Error! URL Protocol handler installation aborted!" print "Error! URL Protocol handler installation aborted!"
except: except:
......
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 sign in to comment