mirror of
https://github.com/c9moser/sgbackup.git
synced 2026-01-19 11:30:13 +00:00
fixed winreg error in settings.py
This commit is contained in:
parent
ca46e30973
commit
5d5e8f0030
@ -175,8 +175,13 @@ class Epic(GObject):
|
||||
return None
|
||||
|
||||
def parse_all_manifests(self)->list[EpicGameInfo]:
|
||||
manifest_dir=os.path.join(settings.epic_datadir,'Manifests')
|
||||
ret = []
|
||||
if not settings.epic_datadir:
|
||||
print("NO EPIC DATADIR")
|
||||
return ret
|
||||
|
||||
manifest_dir=os.path.join(settings.epic_datadir,'Manifests')
|
||||
|
||||
for item in [ i for i in os.listdir(manifest_dir) if i.endswith('.item') ]:
|
||||
manifest_file = os.path.join(manifest_dir,item)
|
||||
info = self.parse_manifest(manifest_file)
|
||||
|
||||
@ -1217,7 +1217,7 @@ class AppWindow(Gtk.ApplicationWindow):
|
||||
|
||||
Gtk.ApplicationWindow.__init__(self,**kwargs)
|
||||
self.set_default_size(800,700)
|
||||
self.set_icon_name('org.sgbackup.sgbackup-symbolic')
|
||||
self.set_icon_name('sgbackup-symbolic')
|
||||
|
||||
self.__builder = builder
|
||||
self.builder.add_from_file(os.path.join(os.path.dirname(__file__),'appmenu.ui'))
|
||||
@ -1457,6 +1457,7 @@ class Application(Gtk.Application):
|
||||
"""
|
||||
do_activate This method is called, when the application is activated.
|
||||
"""
|
||||
self.set_default()
|
||||
self._logger.debug('do_activate()')
|
||||
if not (self.__appwindow):
|
||||
self.__appwindow = AppWindow(application=self)
|
||||
|
||||
@ -55,6 +55,8 @@ del _zc
|
||||
del _zs
|
||||
|
||||
|
||||
if PLATFORM_WINDOWS:
|
||||
import winreg
|
||||
class Settings(GObject.GObject):
|
||||
__gtype_name__ = "Settings"
|
||||
|
||||
|
||||
@ -33,9 +33,9 @@ def _platform_is_unix():
|
||||
return True
|
||||
return False
|
||||
|
||||
PLATFORM_WINDOWS = (sys.platform == 'win32')
|
||||
PLATFORM_WINDOWS = bool(sys.platform == 'win32')
|
||||
PLATFORM_LINUX = _platform_is_linux()
|
||||
PLATFORM_MACOS = (sys.platform == 'darwin')
|
||||
PLATFORM_MACOS = bool(sys.platform == 'darwin')
|
||||
PLATFORM_UNIX = _platform_is_unix()
|
||||
|
||||
del _platform_is_unix
|
||||
|
||||
Loading…
Reference in New Issue
Block a user