mirror of
https://github.com/Steve-Tech/YAFI.git
synced 2026-04-19 16:50:36 +00:00
Add support for pip again
This commit is contained in:
@@ -1 +1,9 @@
|
||||
from . import main
|
||||
import os
|
||||
|
||||
# Register resources if not running in Flatpak
|
||||
if not os.environ.get('FLATPAK_ID'):
|
||||
from gi.repository import Gio
|
||||
resource = Gio.Resource.load(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'yafi.gresource'))
|
||||
resource._register()
|
||||
|
||||
from .main import main
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
from . import main
|
||||
|
||||
main.main()
|
||||
@@ -62,6 +62,8 @@ class HardwarePage(Gtk.Box):
|
||||
else:
|
||||
self.hw_fp_pwr.set_visible(False)
|
||||
|
||||
self._update_hardware(app)
|
||||
|
||||
# Schedule _update_hardware to run every second
|
||||
GLib.timeout_add_seconds(1, self._update_hardware, app)
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ from .hardware import HardwarePage
|
||||
|
||||
from cros_ec_python import get_cros_ec
|
||||
|
||||
|
||||
class YafiApplication(Adw.Application):
|
||||
"""The main application singleton class."""
|
||||
|
||||
@@ -134,7 +135,7 @@ class YafiApplication(Adw.Application):
|
||||
dialog.present(self.win)
|
||||
|
||||
|
||||
def main(version):
|
||||
def main():
|
||||
"""The application's entry point."""
|
||||
app = YafiApplication()
|
||||
return app.run(sys.argv)
|
||||
|
||||
BIN
yafi/yafi.gresource
Normal file
BIN
yafi/yafi.gresource
Normal file
Binary file not shown.
@@ -26,7 +26,7 @@ import signal
|
||||
import locale
|
||||
import gettext
|
||||
|
||||
VERSION = '@VERSION@'
|
||||
# VERSION = '@VERSION@'
|
||||
pkgdatadir = '@pkgdatadir@'
|
||||
localedir = '@localedir@'
|
||||
|
||||
@@ -44,4 +44,4 @@ if __name__ == '__main__':
|
||||
resource._register()
|
||||
|
||||
from yafi import main
|
||||
sys.exit(main.main(VERSION))
|
||||
sys.exit(main.main())
|
||||
|
||||
Reference in New Issue
Block a user