mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-21 18:50:38 +03:00
Corrected the interpretation of the terminal attribute for shortcuts
This commit is contained in:
parent
e413f95633
commit
b439e04a2f
@ -273,7 +273,9 @@ class shortcut:
|
||||
if self.type == TargetType.URL:
|
||||
self.desktop_file.set('URL', desktop_path)
|
||||
else:
|
||||
terminal_state = bool(self.desktop_file.get('Terminal'))
|
||||
str2bool_lambda = (lambda boolstr: boolstr if isinstance(boolstr, bool)
|
||||
else boolstr and boolstr.lower() in ['True', 'true', 'yes', '1'])
|
||||
terminal_state = str2bool_lambda(self.desktop_file.get('Terminal'))
|
||||
self.desktop_file.set('Terminal', 'true' if terminal_state else 'false')
|
||||
self.desktop_file.set('Exec', '{} {}'.format(desktop_path, self.arguments))
|
||||
self.desktop_file.set('Comment', self.comment)
|
||||
|
Loading…
x
Reference in New Issue
Block a user