comparison main.py @ 1:19c1cecdfdfd draft

"planemo upload commit b2a00d9c24285fef0fb131d1832ecf4c337e5038-dirty"
author rhohensinner
date Wed, 23 Jun 2021 10:40:19 +0000
parents 7d8912d20007
children 0641ea2f75b1
comparison
equal deleted inserted replaced
0:7d8912d20007 1:19c1cecdfdfd
61 iRODSCredentials["host"] = params["irods_host"] 61 iRODSCredentials["host"] = params["irods_host"]
62 iRODSCredentials["port"] = params["irods_port"] 62 iRODSCredentials["port"] = params["irods_port"]
63 iRODSCredentials["zone"] = params["irods_zone"] 63 iRODSCredentials["zone"] = params["irods_zone"]
64 64
65 # create login window 65 # create login window
66 make_login_window() 66 make_login_window(params)
67 # check tool settings and start tool execution 67 # check tool settings and start tool execution
68 if session_success: 68 if session_success:
69 # initialize download tool 69 # initialize download tool
70 if params["tool_type"] == "down": 70 if params["tool_type"] == "down":
71 71
248 # IN: 248 # IN:
249 # 249 #
250 # OUT: 250 # OUT:
251 # 251 #
252 ######################################################################################################################## 252 ########################################################################################################################
253 def make_login_window(): 253 def make_login_window(params):
254 #get login icon
255 log_img = ""
256 for dirpath, dirnames, filenames in os.walk(params["galaxy_root"]):
257 for fn in filenames:
258 if fn == "irods_galaxy_login.png":
259 log_img = os.path.join(dirpath, fn)
260 if log_img != "":
261 break
262 if log_img != "":
263 break
264 print(log_img)
265
254 window = Tk() 266 window = Tk()
255 LoginWindow(window) 267 LoginWindow(window)
256 window.title('iRODS Login') 268 window.title('iRODS Login')
257 window.geometry("450x225+10+10") 269 window.geometry("450x225+10+10")
258 window.minsize(450, 225) 270 window.minsize(450, 225)
259 window.tk.call('wm', 'iconphoto', window._w, PhotoImage(file='/home/richard/git/galaxy_irods_tools/login.png')) 271 window.tk.call('wm', 'iconphoto', window._w, PhotoImage(file=log_img))
260 # alternative options: 272 # alternative options:
261 # window.iconphoto(False, PhotoImage(file='/path/to/ico/icon.png')) 273 # window.iconphoto(False, PhotoImage(file='/path/to/ico/icon.png'))
262 # window.iconbitmap("/home/richard/git/galaxy_irods_tools/login.ico") 274 # window.iconbitmap("/home/richard/git/galaxy_irods_tools/login.ico")
263 window.mainloop() 275 window.mainloop()
264 # -------------------------------------------------------------------------------------------------------------------- # 276 # -------------------------------------------------------------------------------------------------------------------- #