mirror of
https://github.com/sezanzeb/input-remapper
synced 2024-11-02 15:40:19 +00:00
Still moving stuff around
This commit is contained in:
parent
f7db8b4a26
commit
d4ad001560
@ -33,7 +33,7 @@ from gi.repository import Gtk
|
|||||||
|
|
||||||
from keymapper.logger import logger, update_verbosity, log_info
|
from keymapper.logger import logger, update_verbosity, log_info
|
||||||
from keymapper.gtk.error import ErrorDialog
|
from keymapper.gtk.error import ErrorDialog
|
||||||
from keymapper.gtk.window import launch
|
from keymapper.gtk.window import Window
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
@ -48,7 +48,7 @@ if __name__ == '__main__':
|
|||||||
update_verbosity(options.debug)
|
update_verbosity(options.debug)
|
||||||
log_info()
|
log_info()
|
||||||
|
|
||||||
window = launch()
|
window = Window()
|
||||||
|
|
||||||
if getpass.getuser() != 'root' and 'unittest' not in sys.modules.keys():
|
if getpass.getuser() != 'root' and 'unittest' not in sys.modules.keys():
|
||||||
# TODO add a polkit thing like
|
# TODO add a polkit thing like
|
||||||
|
@ -163,7 +163,7 @@ class Window:
|
|||||||
f'Saved "{self.selected_preset}"'
|
f'Saved "{self.selected_preset}"'
|
||||||
)
|
)
|
||||||
except PermissionError as e:
|
except PermissionError as e:
|
||||||
window.get('status_bar').push(
|
self.get('status_bar').push(
|
||||||
CTX_ERROR,
|
CTX_ERROR,
|
||||||
'Error: Permission denied!'
|
'Error: Permission denied!'
|
||||||
)
|
)
|
||||||
@ -269,16 +269,3 @@ class Window:
|
|||||||
self.selected_device,
|
self.selected_device,
|
||||||
self.selected_preset
|
self.selected_preset
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
window = None
|
|
||||||
|
|
||||||
|
|
||||||
def launch():
|
|
||||||
"""Construct the window and prepare it for other modules to import.
|
|
||||||
|
|
||||||
You still have to run the GTK main loop.
|
|
||||||
"""
|
|
||||||
global window
|
|
||||||
window = Window()
|
|
||||||
return window
|
|
||||||
|
Loading…
Reference in New Issue
Block a user