mirror of
https://github.com/c9moser/sgbackup.git
synced 2026-01-19 19:40:13 +00:00
2025.03.02 23:45:14 (desktop)
This commit is contained in:
parent
67e0aa6db0
commit
a7011df3d5
331
sgbackup/game.py
331
sgbackup/game.py
@ -927,6 +927,206 @@ class SteamMacOSGame(SteamGame):
|
|||||||
file_match,
|
file_match,
|
||||||
ignore_match)
|
ignore_match)
|
||||||
|
|
||||||
|
class SteamPlatformData(GameData):
|
||||||
|
def __init__(self,
|
||||||
|
savegame_type:SavegameType,
|
||||||
|
savegame_root:str,
|
||||||
|
savegame_dir:str,
|
||||||
|
variables:dict|None=None,
|
||||||
|
file_match:str|None=None,
|
||||||
|
ignore_match:str|None=None,
|
||||||
|
installdir:str|None=None,
|
||||||
|
librarydir:str|None=None):
|
||||||
|
|
||||||
|
if savegame_type not in (SavegameType.STEAM_WINDOWS,
|
||||||
|
SavegameType.STEAM_LINUX,
|
||||||
|
SavegameType.STEAM_MACOS):
|
||||||
|
raise TypeError("\"savegame_type\" is not valid!")
|
||||||
|
|
||||||
|
GameData.__init__(self,
|
||||||
|
savegame_type=savegame_type,
|
||||||
|
savegame_root=savegame_root,
|
||||||
|
savegame_dir=savegame_dir,
|
||||||
|
variables=variables,
|
||||||
|
file_match=file_match,
|
||||||
|
ignore_match=ignore_match)
|
||||||
|
self.installdir = installdir
|
||||||
|
self.librarydir = librarydir
|
||||||
|
|
||||||
|
@Property(type=str)
|
||||||
|
def installdir(self)->str:
|
||||||
|
return self.__installdir if self.__installdir else ""
|
||||||
|
|
||||||
|
@installdir.setter
|
||||||
|
def installdir(self,installdir:str|None):
|
||||||
|
self.__installdir = installdir
|
||||||
|
|
||||||
|
|
||||||
|
@Property(type=str)
|
||||||
|
def librarydir(self)->str:
|
||||||
|
return self.__librarydir if self.__librarydir else ""
|
||||||
|
|
||||||
|
@librarydir.setter
|
||||||
|
def librarydir(self,steam_libdir:str|None):
|
||||||
|
self.__librarydir = steam_libdir
|
||||||
|
|
||||||
|
def serialize(self)->dict:
|
||||||
|
data = super().serialize()
|
||||||
|
if self.__installdir:
|
||||||
|
data['installdir'] = self.__installdir
|
||||||
|
if self.__librarydir:
|
||||||
|
data['librarydir'] = self.__librarydir
|
||||||
|
|
||||||
|
return data
|
||||||
|
|
||||||
|
class SteamWindowsData(SteamPlatformData):
|
||||||
|
def __init__(self,
|
||||||
|
savegame_root:str,
|
||||||
|
savegame_dir:str,
|
||||||
|
variables:dict|None=None,
|
||||||
|
file_match:str|None=None,
|
||||||
|
ignore_match:str|None=None,
|
||||||
|
installdir:str|None=None,
|
||||||
|
librarydir:str|None=None):
|
||||||
|
SteamPlatformData.__init__(self,
|
||||||
|
savegame_type=SavegameType.STEAM_WINDOWS,
|
||||||
|
savegame_root=savegame_root,
|
||||||
|
savegame_dir=savegame_dir,
|
||||||
|
variables=variables,
|
||||||
|
file_match=file_match,
|
||||||
|
ignore_match=ignore_match,
|
||||||
|
installdir=installdir,
|
||||||
|
librarydir=librarydir)
|
||||||
|
|
||||||
|
class SteamLinuxData(SteamPlatformData):
|
||||||
|
def __init__(self,
|
||||||
|
savegame_root:str,
|
||||||
|
savegame_dir:str,
|
||||||
|
variables:dict|None=None,
|
||||||
|
file_match:str|None=None,
|
||||||
|
ignore_match:str|None=None,
|
||||||
|
installdir:str|None=None,
|
||||||
|
librarydir:str|None=None):
|
||||||
|
SteamPlatformData.__init__(self,
|
||||||
|
savegame_type=SavegameType.STEAM_LINUX,
|
||||||
|
savegame_root=savegame_root,
|
||||||
|
savegame_dir=savegame_dir,
|
||||||
|
variables=variables,
|
||||||
|
file_match=file_match,
|
||||||
|
ignore_match=ignore_match,
|
||||||
|
installdir=installdir,
|
||||||
|
librarydir=librarydir)
|
||||||
|
|
||||||
|
class SteamMacOSData(SteamPlatformData):
|
||||||
|
def __init__(self,
|
||||||
|
savegame_root:str,
|
||||||
|
savegame_dir:str,
|
||||||
|
variables:dict|None=None,
|
||||||
|
file_match:str|None=None,
|
||||||
|
ignore_match:str|None=None,
|
||||||
|
installdir:str|None=None,
|
||||||
|
librarydir:str|None=None):
|
||||||
|
SteamPlatformData.__init__(self,
|
||||||
|
savegame_type=SavegameType.STEAM_MACOS,
|
||||||
|
savegame_root=savegame_root,
|
||||||
|
savegame_dir=savegame_dir,
|
||||||
|
variables=variables,
|
||||||
|
file_match=file_match,
|
||||||
|
ignore_match=ignore_match,
|
||||||
|
installdir=installdir,
|
||||||
|
librarydir=librarydir)
|
||||||
|
|
||||||
|
class SteamGameData(GObject):
|
||||||
|
def __init__(self,appid:int,
|
||||||
|
windows:SteamWindowsData|None=None,
|
||||||
|
linux:SteamLinuxData|None=None,
|
||||||
|
macos:SteamMacOSData|None=None):
|
||||||
|
GObject.__init__(self)
|
||||||
|
self.__appid = int(appid)
|
||||||
|
self.windows = windows
|
||||||
|
self.linux = linux
|
||||||
|
self.macos = macos
|
||||||
|
|
||||||
|
@Property(type=int)
|
||||||
|
def appid(self)->int:
|
||||||
|
return self.__appid
|
||||||
|
|
||||||
|
@appid.setter
|
||||||
|
def appid(self,appid:int):
|
||||||
|
return self.__appid
|
||||||
|
|
||||||
|
@property
|
||||||
|
def windows(self)->SteamWindowsData|None:
|
||||||
|
return self.__windows_data
|
||||||
|
|
||||||
|
@windows.setter
|
||||||
|
def windows(self,data:SteamWindowsData|None):
|
||||||
|
self.__windows_data = data
|
||||||
|
|
||||||
|
@property
|
||||||
|
def linux(self)->SteamLinuxData|None:
|
||||||
|
return self.__linux_data
|
||||||
|
|
||||||
|
@linux.setter
|
||||||
|
def linux(self,data:SteamLinuxData|None):
|
||||||
|
self.__linux_data = data
|
||||||
|
|
||||||
|
@property
|
||||||
|
def macos(self)->SteamMacOSData|None:
|
||||||
|
return self.__macos_data
|
||||||
|
|
||||||
|
@macos.setter
|
||||||
|
def macos(self,data:SteamMacOSData|None):
|
||||||
|
self.__macos_data = data
|
||||||
|
|
||||||
|
@property
|
||||||
|
def windows_game(self)->SteamWindowsGame|None:
|
||||||
|
if self.windows:
|
||||||
|
return SteamWindowsGame(appid=self.appid,
|
||||||
|
savegame_root=self.windows.savegame_root,
|
||||||
|
savegame_dir=self.windows.savegame_dir,
|
||||||
|
variables=self.windows.variables,
|
||||||
|
installdir=self.windows.installdir,
|
||||||
|
file_match=self.windows.file_matchers,
|
||||||
|
ignore_match=self.windows.ignore_matchers)
|
||||||
|
return None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def linux_game(self)->SteamLinuxGame|None:
|
||||||
|
if self.linux:
|
||||||
|
return SteamLinuxGame(appid=self.appid,
|
||||||
|
savegame_root=self.windows.savegame_root,
|
||||||
|
savegame_dir=self.windows.savegame_dir,
|
||||||
|
variables=self.windows.variables,
|
||||||
|
installdir=self.windows.installdir,
|
||||||
|
file_match=self.windows.file_matchers,
|
||||||
|
ignore_match=self.windows.ignore_matchers)
|
||||||
|
return None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def macos_game(self)->SteamLinuxGame|None:
|
||||||
|
if self.macos:
|
||||||
|
return SteamMacOSGame(appid=self.appid,
|
||||||
|
savegame_root=self.windows.savegame_root,
|
||||||
|
savegame_dir=self.windows.savegame_dir,
|
||||||
|
variables=self.windows.variables,
|
||||||
|
installdir=self.windows.installdir,
|
||||||
|
file_match=self.windows.file_matchers,
|
||||||
|
ignore_match=self.windows.ignore_matchers)
|
||||||
|
return None
|
||||||
|
|
||||||
|
def serialize(self)->dict:
|
||||||
|
data = {
|
||||||
|
'appid': self.appid,
|
||||||
|
}
|
||||||
|
if self.windows:
|
||||||
|
data['windows'] = self.windows.serialize()
|
||||||
|
if self.linux:
|
||||||
|
data['linux'] = self.linux.serialize()
|
||||||
|
if self.macos:
|
||||||
|
data['macos'] = self.macos.serialize()
|
||||||
|
|
||||||
|
return data
|
||||||
|
|
||||||
class Game(GObject):
|
class Game(GObject):
|
||||||
__gtype_name__ = "Game"
|
__gtype_name__ = "Game"
|
||||||
@ -968,18 +1168,50 @@ class Game(GObject):
|
|||||||
|
|
||||||
return (file_match,ignore_match)
|
return (file_match,ignore_match)
|
||||||
|
|
||||||
def new_steam_game(conf,cls:SteamGame):
|
def new_steamdata(conf)->SteamGameData|None:
|
||||||
appid = conf['appid'] if 'appid' in conf else ""
|
def new_steam_platform_data(data:dict,cls:SteamPlatformData)->SteamPlatformData|None:
|
||||||
sgroot = conf['savegame_root'] if 'savegame_root' in conf else ""
|
if not 'savegame_root' in data or not 'savegame_dir' in data:
|
||||||
sgdir = conf['savegame_dir'] if 'savegame_dir' in conf else ""
|
return None
|
||||||
vars = conf['variables'] if 'variables' in conf else {}
|
|
||||||
installdir = conf['installdir'] if 'installdir' in conf else ""
|
|
||||||
file_match,ignore_match = get_file_match(conf)
|
|
||||||
|
|
||||||
if appid is not None and sgroot and sgdir:
|
file_match,ignore_match = get_file_match(data)
|
||||||
cls(appid,sgroot,sgdir,vars,installdir,file_match,ignore_match)
|
return cls(
|
||||||
return cls(appid,sgroot,sgdir,vars,installdir,file_match,ignore_match)
|
savegame_root=data['savegame_root'],
|
||||||
# new_steam_game()
|
savegame_dir=data['savegame_dir'],
|
||||||
|
variables=dict(((v['name'],v['value']) for v in data['variables'])) if ('variables' in data and config['variables']) else None,
|
||||||
|
file_match=file_match,
|
||||||
|
ignore_match=ignore_match,
|
||||||
|
installdir=data['installdir'] if ('installdir' in data and data['installdir']) else None,
|
||||||
|
librarydir=data['librarydir'] if ('librarydir' in data and data['librarydir']) else None
|
||||||
|
)
|
||||||
|
|
||||||
|
if ('steam' not in conf or not 'appid' in conf['steam']):
|
||||||
|
return None
|
||||||
|
|
||||||
|
steam=conf['steam']
|
||||||
|
|
||||||
|
if 'windows' in steam:
|
||||||
|
windows = new_steam_platform_data(steam['windows'],SteamWindowsData)
|
||||||
|
else:
|
||||||
|
windows = None
|
||||||
|
|
||||||
|
if 'linux' in steam:
|
||||||
|
linux = new_steam_platform_data(steam['linux'],SteamLinuxData)
|
||||||
|
else:
|
||||||
|
linux = None
|
||||||
|
|
||||||
|
if 'macos' in steam:
|
||||||
|
macos = new_steam_platform_data(steam['macos'],SteamMacOSData)
|
||||||
|
else:
|
||||||
|
macos = None
|
||||||
|
|
||||||
|
if windows is None and linux is None and macos is None:
|
||||||
|
return None
|
||||||
|
|
||||||
|
return SteamGameData(steam['appid'],
|
||||||
|
windows=windows,
|
||||||
|
linux=linux,
|
||||||
|
macos=macos)
|
||||||
|
# new_steamdata()
|
||||||
|
|
||||||
if not 'key' in config or not 'name' in config:
|
if not 'key' in config or not 'name' in config:
|
||||||
return None
|
return None
|
||||||
@ -1034,12 +1266,7 @@ class Game(GObject):
|
|||||||
file_match,ignore_match = get_file_match(macconf)
|
file_match,ignore_match = get_file_match(macconf)
|
||||||
game.macos = MacOSGame(sgroot,sgdir,vars,binary,file_match,ignore_match)
|
game.macos = MacOSGame(sgroot,sgdir,vars,binary,file_match,ignore_match)
|
||||||
|
|
||||||
if 'steam_windows' in config:
|
game.steam = new_steamdata(config)
|
||||||
game.steam_windows = new_steam_game(config['steam_windows'],SteamWindowsGame)
|
|
||||||
if 'steam_linux' in config:
|
|
||||||
game.steam_linux = new_steam_game(config['steam_linux'],SteamLinuxGame)
|
|
||||||
if 'steam_macos' in config:
|
|
||||||
game.steam_macos = new_steam_game(config['steam_macos'],SteamMacOSGame)
|
|
||||||
|
|
||||||
return game
|
return game
|
||||||
|
|
||||||
@ -1070,6 +1297,9 @@ class Game(GObject):
|
|||||||
self.__windows = None
|
self.__windows = None
|
||||||
self.__linux = None
|
self.__linux = None
|
||||||
self.__macos = None
|
self.__macos = None
|
||||||
|
self.__steam = None
|
||||||
|
self.__epic = None
|
||||||
|
self.__gog = None
|
||||||
self.__steam_windows = None
|
self.__steam_windows = None
|
||||||
self.__steam_linux = None
|
self.__steam_linux = None
|
||||||
self.__steam_macos = None
|
self.__steam_macos = None
|
||||||
@ -1175,11 +1405,11 @@ class Game(GObject):
|
|||||||
elif (sgtype == SavegameType.MACOS):
|
elif (sgtype == SavegameType.MACOS):
|
||||||
return self.macos
|
return self.macos
|
||||||
elif (sgtype == SavegameType.STEAM_WINDOWS):
|
elif (sgtype == SavegameType.STEAM_WINDOWS):
|
||||||
return self.steam_windows
|
return self.steam.windows_game
|
||||||
elif (sgtype == SavegameType.STEAM_LINUX):
|
elif (sgtype == SavegameType.STEAM_LINUX):
|
||||||
return self.steam_linux
|
return self.steam.linux_game
|
||||||
elif (sgtype == SavegameType.STEAM_MACOS):
|
elif (sgtype == SavegameType.STEAM_MACOS):
|
||||||
return self.steam_macos
|
return self.steam.macos_game
|
||||||
elif (sgtype == SavegameType.GOG_WINDOWS):
|
elif (sgtype == SavegameType.GOG_WINDOWS):
|
||||||
return self.__gog_windows
|
return self.__gog_windows
|
||||||
elif (sgtype == SavegameType.GOG_LINUX):
|
elif (sgtype == SavegameType.GOG_LINUX):
|
||||||
@ -1226,41 +1456,39 @@ class Game(GObject):
|
|||||||
raise TypeError("MacOSGame")
|
raise TypeError("MacOSGame")
|
||||||
self.__macos = data
|
self.__macos = data
|
||||||
|
|
||||||
|
@Property
|
||||||
|
def steam(self)->SteamGameData|None:
|
||||||
|
return self.__steam
|
||||||
|
|
||||||
|
@steam.setter
|
||||||
|
def steam(self,steam_data:SteamGameData|None):
|
||||||
|
if (not steam_data):
|
||||||
|
self.__steam = steam_data
|
||||||
|
return
|
||||||
|
|
||||||
|
if (not isinstance(steam_data,SteamGameData)):
|
||||||
|
raise TypeError("\"steam\" is not \"None\" or a \"SteamGameData\" instance!")
|
||||||
|
|
||||||
|
self.__steam = steam_data
|
||||||
|
|
||||||
@Property
|
@Property
|
||||||
def steam_windows(self)->SteamWindowsGame|None:
|
def steam_windows(self)->SteamWindowsGame|None:
|
||||||
return self.__steam_windows
|
if self.steam:
|
||||||
@steam_windows.setter
|
return self.steam.windows_game
|
||||||
def steam_windows(self,data:SteamWindowsGame|None):
|
return None
|
||||||
if not data:
|
|
||||||
self.__steam_windows = None
|
|
||||||
else:
|
|
||||||
if not isinstance(data,SteamWindowsGame):
|
|
||||||
raise TypeError("SteamWindowsGame")
|
|
||||||
self.__steam_windows = data
|
|
||||||
|
|
||||||
@Property
|
@Property
|
||||||
def steam_linux(self)->SteamLinuxGame|None:
|
def steam_linux(self)->SteamLinuxGame|None:
|
||||||
return self.__steam_linux
|
if self.steam:
|
||||||
@steam_linux.setter
|
return self.steam.linux_game
|
||||||
def steam_linux(self,data:SteamLinuxGame|None):
|
return None
|
||||||
if not data:
|
|
||||||
self.__steam_linux = None
|
|
||||||
else:
|
|
||||||
if not isinstance(data,SteamLinuxGame):
|
|
||||||
raise TypeError("SteamLinuxGame")
|
|
||||||
self.__steam_linux = data
|
|
||||||
|
|
||||||
@Property
|
@Property
|
||||||
def steam_macos(self)->SteamMacOSGame|None:
|
def steam_macos(self)->SteamMacOSGame|None:
|
||||||
return self.__steam_macos
|
if self.steam:
|
||||||
@steam_macos.setter
|
return self.steam.macos_game
|
||||||
def steam_macos(self,data:SteamMacOSGame|None):
|
return None
|
||||||
if not data:
|
|
||||||
self.__steam_macos = None
|
|
||||||
else:
|
|
||||||
if not isinstance(data,SteamMacOSGame):
|
|
||||||
raise TypeError("SteamMacOSGame")
|
|
||||||
self.__steam_macos = data
|
|
||||||
|
|
||||||
@Property
|
@Property
|
||||||
def savegame_root(self)->str|None:
|
def savegame_root(self)->str|None:
|
||||||
@ -1315,12 +1543,9 @@ class Game(GObject):
|
|||||||
ret['linux'] = self.linux.serialize()
|
ret['linux'] = self.linux.serialize()
|
||||||
if (self.macos):
|
if (self.macos):
|
||||||
ret['macos'] = self.macos.serialize()
|
ret['macos'] = self.macos.serialize()
|
||||||
if (self.steam_windows):
|
if (self.steam):
|
||||||
ret['steam_windows'] = self.steam_windows.serialize()
|
ret['steam'] = self.steam.serialize()
|
||||||
if (self.steam_linux):
|
|
||||||
ret['steam_linux'] = self.steam_linux.serialize()
|
|
||||||
if (self.steam_macos):
|
|
||||||
ret['steam_macos'] = self.steam_macos.serialize()
|
|
||||||
#if self.gog_windows:
|
#if self.gog_windows:
|
||||||
# ret['gog_windows'] = self.gog_windows.serialize()
|
# ret['gog_windows'] = self.gog_windows.serialize()
|
||||||
#if self.gog_linux:
|
#if self.gog_linux:
|
||||||
|
|||||||
@ -33,6 +33,10 @@ from ..game import (
|
|||||||
SteamLinuxGame,
|
SteamLinuxGame,
|
||||||
SteamWindowsGame,
|
SteamWindowsGame,
|
||||||
SteamMacOSGame,
|
SteamMacOSGame,
|
||||||
|
SteamGameData,
|
||||||
|
SteamLinuxData,
|
||||||
|
SteamMacOSData,
|
||||||
|
SteamWindowsData,
|
||||||
GameManager,
|
GameManager,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -355,9 +359,7 @@ class GameDialog(Gtk.Dialog):
|
|||||||
self.__windows = self.__create_windows_page()
|
self.__windows = self.__create_windows_page()
|
||||||
self.__linux = self.__create_linux_page()
|
self.__linux = self.__create_linux_page()
|
||||||
self.__macos = self.__create_macos_page()
|
self.__macos = self.__create_macos_page()
|
||||||
self.__steam_windows = self.__create_steam_page('steam-windows','Steam Windows')
|
self.__steam = self.__create_steam_page()
|
||||||
self.__steam_linux = self.__create_steam_page('steam-linux','Steam Linux')
|
|
||||||
self.__steam_macos = self.__create_steam_page('steam-macos','Steam MacOS')
|
|
||||||
|
|
||||||
|
|
||||||
for stack_page in self.__stack.get_pages():
|
for stack_page in self.__stack.get_pages():
|
||||||
@ -615,51 +617,81 @@ class GameDialog(Gtk.Dialog):
|
|||||||
|
|
||||||
return page
|
return page
|
||||||
|
|
||||||
def __create_steam_page(self,name,title):
|
def __create_steam_page(self):
|
||||||
page = Gtk.ScrolledWindow()
|
def create_notebook_page(title,icon_name):
|
||||||
vbox = Gtk.Box.new(Gtk.Orientation.VERTICAL,2)
|
label_widget = Gtk.Box.new(Gtk.Orientation.HORIZONTAL,2)
|
||||||
self.__set_widget_margin(vbox,5)
|
label_icon = Gtk.Image.new_from_icon_name(icon_name)
|
||||||
|
label_icon.set_pixel_size(12)
|
||||||
|
label=Gtk.Label.new(title)
|
||||||
|
label_widget.append(label_icon)
|
||||||
|
label_widget.append(label)
|
||||||
|
|
||||||
|
nbpage = Gtk.ScrolledWindow()
|
||||||
|
nbvbox = Gtk.Box.new(Gtk.Orientation.VERTICAL,5)
|
||||||
|
nbgrid = Gtk.Grid()
|
||||||
|
self.__set_widget_margin(nbgrid,5)
|
||||||
|
|
||||||
|
label = Gtk.Label.new("Root directory:")
|
||||||
|
nbpage.sgroot_entry = Gtk.Entry()
|
||||||
|
nbpage.sgroot_entry.set_hexpand(True)
|
||||||
|
nbpage.sgroot_entry.connect('changed',lambda w: self._on_savegame_type_changed())
|
||||||
|
nbgrid.attach(label,0,0,1,1)
|
||||||
|
nbgrid.attach(nbpage.sgroot_entry,1,0,1,1)
|
||||||
|
|
||||||
|
label = Gtk.Label.new("Backup directory:")
|
||||||
|
nbpage.sgdir_entry = Gtk.Entry()
|
||||||
|
nbpage.sgdir_entry.set_hexpand(True)
|
||||||
|
nbpage.sgdir_entry.connect('changed',lambda w: self._on_savegame_type_changed())
|
||||||
|
nbgrid.attach(label,0,1,1,1)
|
||||||
|
nbgrid.attach(nbpage.sgdir_entry,1,1,1,1)
|
||||||
|
|
||||||
|
label = Gtk.Label.new("Installation directory:")
|
||||||
|
nbpage.installdir_entry = Gtk.Entry()
|
||||||
|
nbpage.installdir_entry.set_hexpand(True)
|
||||||
|
nbgrid.attach(label,0,3,1,1)
|
||||||
|
nbgrid.attach(nbpage.installdir_entry,1,3,1,1)
|
||||||
|
|
||||||
|
nbvbox.append(nbgrid)
|
||||||
|
|
||||||
|
nbpage.filematch = self.__create_filematch_widget('Match Files')
|
||||||
|
nbvbox.append(nbpage.filematch)
|
||||||
|
|
||||||
|
nbpage.ignorematch = self.__create_filematch_widget('Ignore Files')
|
||||||
|
nbvbox.append(nbpage.ignorematch)
|
||||||
|
|
||||||
|
nbpage.variables = self.__create_variables_widget()
|
||||||
|
nbvbox.append(nbpage.variables)
|
||||||
|
|
||||||
|
nbpage.set_child(nbvbox)
|
||||||
|
return nbpage,label_widget
|
||||||
|
# create_notebook_page()
|
||||||
|
|
||||||
|
page = Gtk.Box.new(Gtk.Orientation.VERTICAL,2)
|
||||||
|
|
||||||
grid = Gtk.Grid()
|
grid = Gtk.Grid()
|
||||||
|
self.__set_widget_margin(grid,5)
|
||||||
|
|
||||||
label = Gtk.Label.new("App ID:")
|
label = Gtk.Label.new("App ID:")
|
||||||
page.appid_entry = Gtk.Entry()
|
page.appid_entry = Gtk.Entry()
|
||||||
page.appid_entry.set_hexpand(True)
|
page.appid_entry.set_hexpand(True)
|
||||||
grid.attach(label,0,0,1,1)
|
grid.attach(label,0,0,1,1)
|
||||||
grid.attach(page.appid_entry,1,0,1,1)
|
grid.attach(page.appid_entry,1,0,1,1)
|
||||||
|
page.append(grid)
|
||||||
|
|
||||||
label = Gtk.Label.new("Root directory:")
|
page.notebook = Gtk.Notebook()
|
||||||
page.sgroot_entry = Gtk.Entry()
|
page.notebook.set_hexpand(True)
|
||||||
page.sgroot_entry.set_hexpand(True)
|
page.notebook.set_vexpand(True)
|
||||||
page.sgroot_entry.connect('changed',lambda w: self._on_savegame_type_changed())
|
page.windows,nb_label = create_notebook_page('Windows','windows-svgrepo-com-symbolic')
|
||||||
grid.attach(label,0,1,1,1)
|
page.notebook.append_page(page.windows,nb_label)
|
||||||
grid.attach(page.sgroot_entry,1,1,1,1)
|
|
||||||
|
|
||||||
label = Gtk.Label.new("Backup directory:")
|
page.linux,nb_label = create_notebook_page("Linux",'linux-svgrepo-com-symbolic')
|
||||||
page.sgdir_entry = Gtk.Entry()
|
page.notebook.append_page(page.linux,nb_label)
|
||||||
page.sgdir_entry.set_hexpand(True)
|
|
||||||
page.sgdir_entry.connect('changed',lambda w: self._on_savegame_type_changed())
|
|
||||||
grid.attach(label,0,2,1,1)
|
|
||||||
grid.attach(page.sgdir_entry,1,2,1,1)
|
|
||||||
|
|
||||||
label = Gtk.Label.new("Installation directory:")
|
page.macos,nb_label = create_notebook_page("Mac OS",'apple-svgrepo-com-symbolic')
|
||||||
page.installdir_entry = Gtk.Entry()
|
page.notebook.append_page(page.macos,nb_label)
|
||||||
page.installdir_entry.set_hexpand(True)
|
|
||||||
grid.attach(label,0,3,1,1)
|
|
||||||
grid.attach(page.installdir_entry,1,3,1,1)
|
|
||||||
vbox.append(grid)
|
|
||||||
|
|
||||||
page.filematch = self.__create_filematch_widget('Match Files')
|
page.append(page.notebook)
|
||||||
vbox.append(page.filematch)
|
self.__stack.add_titled(page,'steam','Steam')
|
||||||
|
|
||||||
page.ignorematch = self.__create_filematch_widget('Ignore Files')
|
|
||||||
vbox.append(page.ignorematch)
|
|
||||||
|
|
||||||
page.variables = self.__create_variables_widget()
|
|
||||||
vbox.append(page.variables)
|
|
||||||
|
|
||||||
page.set_child(vbox)
|
|
||||||
self.__stack.add_titled(page,name,title)
|
|
||||||
stack_page = self.__stack.get_page(page)
|
stack_page = self.__stack.get_page(page)
|
||||||
stack_page.set_icon_name("steam-svgrepo-com-symbolic")
|
stack_page.set_icon_name("steam-svgrepo-com-symbolic")
|
||||||
|
|
||||||
@ -869,36 +901,31 @@ class GameDialog(Gtk.Dialog):
|
|||||||
set_game_widget_data(self.__macos,self.__game.macos if self.__game else None)
|
set_game_widget_data(self.__macos,self.__game.macos if self.__game else None)
|
||||||
self.__macos.binary_entry.set_text(self.__game.macos.binary if self.has_game and self.__game.macos else "")
|
self.__macos.binary_entry.set_text(self.__game.macos.binary if self.has_game and self.__game.macos else "")
|
||||||
|
|
||||||
#steam windows
|
#steam
|
||||||
set_game_widget_data(self.__steam_windows,self.__game.steam_windows if self.has_game else None)
|
set_game_widget_data(self.__steam.windows,self.__game.steam.windows if self.has_game and self.__game.steam else None)
|
||||||
self.__steam_windows.appid_entry.set_text(str(self.__game.steam_windows.appid)
|
set_game_widget_data(self.__steam.linux,self.__game.steam.linux if self.has_game and self.__game.steam else None)
|
||||||
if self.has_game and self.__game.steam_windows else "")
|
set_game_widget_data(self.__steam.macos,self.__game.steam.macos if self.has_game and self.__game.steam else None)
|
||||||
self.__steam_windows.installdir_entry.set_text(self.__game.steam_windows.installdir
|
|
||||||
if self.has_game
|
|
||||||
and self.__game.steam_windows
|
|
||||||
and self.__game.steam_windows.installdir
|
|
||||||
else "")
|
|
||||||
|
|
||||||
#steam linux
|
self.__steam.appid_entry.set_text(str(self.__game.steam.appid)
|
||||||
set_game_widget_data(self.__steam_linux,self.__game.steam_linux if self.has_game else None)
|
if self.has_game and self.__game.steam else "")
|
||||||
self.__steam_linux.appid_entry.set_text(str(self.__game.steam_linux.appid)
|
self.__steam.windows.installdir_entry.set_text(self.__game.steam.windows.installdir
|
||||||
if self.has_game and self.__game.steam_linux else "")
|
|
||||||
self.__steam_linux.installdir_entry.set_text(self.__game.steam_linux.installdir
|
|
||||||
if self.has_game
|
if self.has_game
|
||||||
and self.__game.steam_linux
|
and self.__game.steam
|
||||||
and self.__game.steam_linux.installdir
|
and self.__game.steam.windows
|
||||||
|
and self.__game.steam.windows.installdir
|
||||||
else "")
|
else "")
|
||||||
|
self.__steam.linux.installdir_entry.set_text(self.__game.steam.linux.installdir
|
||||||
#steam macos
|
|
||||||
set_game_widget_data(self.__steam_macos,self.__game.steam_macos if self.has_game else None)
|
|
||||||
self.__steam_macos.appid_entry.set_text(str(self.__game.steam_macos.appid)
|
|
||||||
if self.has_game and self.__game.steam_macos else "")
|
|
||||||
self.__steam_macos.installdir_entry.set_text(self.__game.steam_macos.installdir
|
|
||||||
if self.has_game
|
if self.has_game
|
||||||
and self.__game.steam_macos
|
and self.__game.steam
|
||||||
and self.__game.steam_macos.installdir
|
and self.__game.steam.linux
|
||||||
|
and self.__game.steam.linux.installdir
|
||||||
|
else "")
|
||||||
|
self.__steam.macos.installdir_entry.set_text(self.__game.steam.macos.installdir
|
||||||
|
if self.has_game
|
||||||
|
and self.__game.steam
|
||||||
|
and self.__game.steam.macos
|
||||||
|
and self.__game.steam.macos.installdir
|
||||||
else "")
|
else "")
|
||||||
|
|
||||||
# reset()
|
# reset()
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
@ -937,7 +964,6 @@ class GameDialog(Gtk.Dialog):
|
|||||||
def get_steam_data(widget):
|
def get_steam_data(widget):
|
||||||
conf = get_game_data(widget)
|
conf = get_game_data(widget)
|
||||||
conf.update({
|
conf.update({
|
||||||
'appid': int(widget.appid_entry.get_text()),
|
|
||||||
'installdir': widget.installdir_entry.get_text(),
|
'installdir': widget.installdir_entry.get_text(),
|
||||||
})
|
})
|
||||||
return conf
|
return conf
|
||||||
@ -1048,71 +1074,76 @@ class GameDialog(Gtk.Dialog):
|
|||||||
elif self.__game.macos:
|
elif self.__game.macos:
|
||||||
self.__game.macos = None
|
self.__game.macos = None
|
||||||
|
|
||||||
if self.get_is_valid_savegame_type(SavegameType.STEAM_WINDOWS):
|
if (self.get_is_valid_savegame_type(SavegameType.STEAM_WINDOWS)
|
||||||
data = get_steam_data(self.__steam_windows)
|
or self.get_is_valid_savegame_type(SavegameType.STEAM_LINUX)
|
||||||
if self.__game.steam_windows:
|
or self.get_is_valid_savegame_type(SavegameType.STEAM_MACOS)):
|
||||||
sg = self.__game.steam_windows
|
|
||||||
sg.savegame_root = data['sgroot']
|
if self.__game.steam:
|
||||||
sg.savegame_dir = data['sgdir']
|
self.__game.steam.appid = int(self.__steam.appid_entry.get_text())
|
||||||
sg.variables = data['variables']
|
|
||||||
sg.file_matchers = data["filematch"]
|
|
||||||
sg.ignore_matchers = data['ignorematch']
|
|
||||||
sg.appid = data['appid']
|
|
||||||
sg.installdir = data['installdir']
|
|
||||||
else:
|
else:
|
||||||
self.__game.steam_windows = SteamWindowsGame(data['appid'],
|
self.__game.steam = SteamGameData(int(self.__steam.appid_entry.get_text()))
|
||||||
data['sgroot'],
|
|
||||||
data['sgdir'],
|
|
||||||
data['variables'],
|
if self.get_is_valid_savegame_type(SavegameType.STEAM_WINDOWS):
|
||||||
data['installdir'],
|
data = get_steam_data(self.__steam.windows)
|
||||||
data['filematch'],
|
if self.__game.steam.windows:
|
||||||
data['ignorematch'])
|
g = self.__game.steam.windows
|
||||||
elif self.__steam_windows:
|
g.savegame_root = data['sgroot']
|
||||||
self.__steam_windows = None
|
g.savegame_dir = data['sgdir']
|
||||||
|
g.variables = data['variables']
|
||||||
|
g.file_matchers = data["filematch"]
|
||||||
|
g.ignore_matchers = data['ignorematch']
|
||||||
|
g.installdir = data['installdir']
|
||||||
|
else:
|
||||||
|
self.__game.steam.windows = SteamWindowsData(savegame_root=data['sgroot'],
|
||||||
|
savegame_dir=data['sgdir'],
|
||||||
|
variables=data['variables'],
|
||||||
|
installdir=data['installdir'],
|
||||||
|
file_match=data['filematch'],
|
||||||
|
ignore_match=data['ignorematch'])
|
||||||
|
elif self.__game.steam.windows:
|
||||||
|
self.__game.steam.windows = None
|
||||||
|
|
||||||
if self.get_is_valid_savegame_type(SavegameType.STEAM_LINUX):
|
if self.get_is_valid_savegame_type(SavegameType.STEAM_LINUX):
|
||||||
data = get_steam_data(self.__steam_linux)
|
data = get_steam_data(self.__steam.linux)
|
||||||
if self.__game.steam_linux:
|
if self.__game.steam_linux:
|
||||||
sg = self.__game.steam_linux
|
g = self.__game.steam.linux
|
||||||
sg.savegame_root = data['sgroot']
|
g.savegame_root = data['sgroot']
|
||||||
sg.savegame_dir = data['sgdir']
|
g.savegame_dir = data['sgdir']
|
||||||
sg.variables = data['variables']
|
g.variables = data['variables']
|
||||||
sg.file_matchers = data["filematch"]
|
g.file_matchers = data["filematch"]
|
||||||
sg.ignore_matchers = data['ignorematch']
|
g.ignore_matchers = data['ignorematch']
|
||||||
sg.appid = data['appid']
|
g.installdir = data['installdir']
|
||||||
sg.installdir = data['installdir']
|
|
||||||
else:
|
else:
|
||||||
self.__game.steam_linux = SteamLinuxGame(data['appid'],
|
self.__game.steam_linux = SteamLinuxData(savegame_root=data['sgroot'],
|
||||||
data['sgroot'],
|
savegame_dir=data['sgdir'],
|
||||||
data['sgdir'],
|
variables=data['variables'],
|
||||||
data['variables'],
|
installdir=data['installdir'],
|
||||||
data['installdir'],
|
file_match=data['filematch'],
|
||||||
data['filematch'],
|
ignore_match=data['ignorematch'])
|
||||||
data['ignorematch'])
|
elif self.__game.steam.linux:
|
||||||
elif self.__steam_linux:
|
self.__game.steam.linux = None
|
||||||
self.__steam_linux = None
|
|
||||||
|
|
||||||
if self.get_is_valid_savegame_type(SavegameType.STEAM_MACOS):
|
if self.get_is_valid_savegame_type(SavegameType.STEAM_MACOS):
|
||||||
data = get_steam_data(self.__steam_macos)
|
data = get_steam_data(self.__steam_macos)
|
||||||
if self.__game.steam_macos:
|
if self.__game.steam_macos:
|
||||||
sg = self.__game.steam_macos
|
g = self.__game.steam_macos
|
||||||
sg.savegame_root = data['sgroot']
|
g.savegame_root = data['sgroot']
|
||||||
sg.savegame_dir = data['sgdir']
|
g.savegame_dir = data['sgdir']
|
||||||
sg.variables = data['variables']
|
g.variables = data['variables']
|
||||||
sg.file_matchers = data["filematch"]
|
g.file_matchers = data["filematch"]
|
||||||
sg.ignore_matchers = data['ignorematch']
|
g.ignore_matchers = data['ignorematch']
|
||||||
sg.appid = data['appid']
|
g.installdir = data['installdir']
|
||||||
sg.installdir = data['installdir']
|
|
||||||
else:
|
else:
|
||||||
self.__game.steam_macos = SteamMacOSGame(data['appid'],
|
self.__game.steam_macos = SteamMacOSData(savegame_root=data['sgroot'],
|
||||||
data['sgroot'],
|
savegame_dir=data['sgdir'],
|
||||||
data['sgdir'],
|
variables=data['variables'],
|
||||||
data['variables'],
|
installdir=data['installdir'],
|
||||||
data['installdir'],
|
file_match=data['filematch'],
|
||||||
data['filematch'],
|
ignore_match=data['ignorematch'])
|
||||||
data['ignorematch'])
|
elif self.__game.steam.macos:
|
||||||
elif self.__steam_macos:
|
self.__game.steam.macos = None
|
||||||
self.__steam_macos = None
|
# bEND: steam
|
||||||
|
|
||||||
self.__game.save()
|
self.__game.save()
|
||||||
GameManager.get_global().add_game(self.__game)
|
GameManager.get_global().add_game(self.__game)
|
||||||
@ -1141,7 +1172,8 @@ class GameDialog(Gtk.Dialog):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def check_is_valid(widget):
|
def check_is_valid(widget):
|
||||||
return (bool(widget.sgroot_entry.get_text()) and bool(widget.sgdir_entry.get_text()))
|
return (len(widget.sgroot_entry.get_text().strip()) > 0
|
||||||
|
and len(widget.sgdir_entry.get_text().strip()) > 0)
|
||||||
|
|
||||||
if sgtype == SavegameType.WINDOWS:
|
if sgtype == SavegameType.WINDOWS:
|
||||||
return check_is_valid(self.__windows)
|
return check_is_valid(self.__windows)
|
||||||
@ -1150,11 +1182,11 @@ class GameDialog(Gtk.Dialog):
|
|||||||
elif sgtype == SavegameType.MACOS:
|
elif sgtype == SavegameType.MACOS:
|
||||||
return check_is_valid(self.__macos)
|
return check_is_valid(self.__macos)
|
||||||
elif sgtype == SavegameType.STEAM_WINDOWS:
|
elif sgtype == SavegameType.STEAM_WINDOWS:
|
||||||
return check_is_valid(self.__steam_windows)
|
return check_is_valid(self.__steam.windows)
|
||||||
elif sgtype == SavegameType.STEAM_LINUX:
|
elif sgtype == SavegameType.STEAM_LINUX:
|
||||||
return check_is_valid(self.__steam_linux)
|
return check_is_valid(self.__steam.linux)
|
||||||
elif sgtype == SavegameType.STEAM_MACOS:
|
elif sgtype == SavegameType.STEAM_MACOS:
|
||||||
return check_is_valid(self.__steam_macos)
|
return check_is_valid(self.__steam.macos)
|
||||||
#elif sgtype == SavegameType.EPIC_WINDOWS:
|
#elif sgtype == SavegameType.EPIC_WINDOWS:
|
||||||
# return check_is_valid(self.__epic_windows)
|
# return check_is_valid(self.__epic_windows)
|
||||||
#elif sgtype == SavegameType.EPIC_LINUX:
|
#elif sgtype == SavegameType.EPIC_LINUX:
|
||||||
@ -1248,8 +1280,6 @@ class GameDialog(Gtk.Dialog):
|
|||||||
label.grab_focus()
|
label.grab_focus()
|
||||||
label.start_editing()
|
label.start_editing()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _on_windows_regkey_setup(self,factory,item):
|
def _on_windows_regkey_setup(self,factory,item):
|
||||||
label = Gtk.EditableLabel()
|
label = Gtk.EditableLabel()
|
||||||
item.set_child(label)
|
item.set_child(label)
|
||||||
|
|||||||
@ -249,20 +249,6 @@ class NewSteamAppsDialog(Gtk.Dialog):
|
|||||||
grid.set_hexpand(True)
|
grid.set_hexpand(True)
|
||||||
grid.set_column_spacing(5)
|
grid.set_column_spacing(5)
|
||||||
|
|
||||||
vbox = Gtk.Box.new(Gtk.Orientation.VERTICAL,2)
|
|
||||||
|
|
||||||
icon = Gtk.Image.new_from_icon_name('list-add-symbolic')
|
|
||||||
grid.add_app_button = Gtk.Button()
|
|
||||||
grid.add_app_button.set_child(icon)
|
|
||||||
vbox.append(grid.add_app_button)
|
|
||||||
|
|
||||||
icon = Gtk.Image.new_from_icon_name('edit-delete-symbolic')
|
|
||||||
grid.ignore_app_button = Gtk.Button()
|
|
||||||
grid.ignore_app_button.set_child(icon)
|
|
||||||
vbox.append(grid.ignore_app_button)
|
|
||||||
|
|
||||||
grid.attach(vbox,3,0,1,3)
|
|
||||||
|
|
||||||
#label = Gtk.Label.new("Name:")
|
#label = Gtk.Label.new("Name:")
|
||||||
#label.set_xalign(0.0)
|
#label.set_xalign(0.0)
|
||||||
grid.name_label = Gtk.Label()
|
grid.name_label = Gtk.Label()
|
||||||
@ -287,6 +273,41 @@ class NewSteamAppsDialog(Gtk.Dialog):
|
|||||||
grid.attach(label,0,2,1,1)
|
grid.attach(label,0,2,1,1)
|
||||||
grid.attach(grid.installdir_label,1,2,1,1)
|
grid.attach(grid.installdir_label,1,2,1,1)
|
||||||
|
|
||||||
|
# Buttons
|
||||||
|
button_grid = Gtk.Grid()
|
||||||
|
button_grid.set_column_spacing(2)
|
||||||
|
button_grid.set_row_spacing(2)
|
||||||
|
|
||||||
|
icon = Gtk.Image.new_from_icon_name('list-add-symbolic')
|
||||||
|
icon.set_pixel_size(16)
|
||||||
|
grid.add_app_button = Gtk.Button()
|
||||||
|
grid.add_app_button.set_child(icon)
|
||||||
|
grid.add_app_button.set_tooltip_markup('Add SteamApp as new Game.')
|
||||||
|
button_grid.attach(grid.add_app_button,0,0,1,1)
|
||||||
|
|
||||||
|
icon = Gtk.Image.new_from_icon_name('edit-delete-symbolic')
|
||||||
|
icon.set_pixel_size(16)
|
||||||
|
grid.ignore_app_button = Gtk.Button()
|
||||||
|
grid.ignore_app_button.set_child(icon)
|
||||||
|
grid.ignore_app_button.set_tooltip_text('Add SteamApp to ignore list.')
|
||||||
|
button_grid.attach(grid.ignore_app_button,1,0,1,1)
|
||||||
|
|
||||||
|
icon = Gtk.Image.new_from_icon_name('edit-find-symbolic')
|
||||||
|
icon.set_pixel_size(16)
|
||||||
|
grid.lookup_button = Gtk.Button()
|
||||||
|
grid.lookup_button.set_child(icon)
|
||||||
|
grid.lookup_button.set_tooltip_text("Lookup SteamApp for already registered game.")
|
||||||
|
button_grid.attach(grid.lookup_button,0,1,1,1)
|
||||||
|
|
||||||
|
icon = Gtk.Image.new_from_icon_name('folder-download-symbolic')
|
||||||
|
icon.set_pixel_size(16)
|
||||||
|
grid.search_online_button = Gtk.Button()
|
||||||
|
grid.search_online_button.set_child(icon)
|
||||||
|
grid.search_online_button.set_tooltip_text("Lookup SteamApp online.")
|
||||||
|
button_grid.attach(grid.search_online_button,1,1,1,1)
|
||||||
|
|
||||||
|
grid.attach(button_grid,3,0,1,3)
|
||||||
|
|
||||||
item.set_child(grid)
|
item.set_child(grid)
|
||||||
|
|
||||||
def _on_listitem_bind(self,factory,item):
|
def _on_listitem_bind(self,factory,item):
|
||||||
@ -310,6 +331,15 @@ class NewSteamAppsDialog(Gtk.Dialog):
|
|||||||
child.ignore_app_button.disconnect(child.ignore_app_button._signal_clicked_connector)
|
child.ignore_app_button.disconnect(child.ignore_app_button._signal_clicked_connector)
|
||||||
child.ignore_app_button._signal_clicked_connector = child.ignore_app_button.connect('clicked',self._on_ignore_steamapp_button_clicked,data)
|
child.ignore_app_button._signal_clicked_connector = child.ignore_app_button.connect('clicked',self._on_ignore_steamapp_button_clicked,data)
|
||||||
|
|
||||||
|
if hasattr(child.lookup_button,'_signal_clicked_connector'):
|
||||||
|
child.lookup_button.disconnect(child.lookup_button._signal_clicked_connector)
|
||||||
|
#child.lookup_button._signal_clicked_connector = child.lookup_button.connect('clicked',self._on_lookup_steamapp_button_clicked,data)
|
||||||
|
child.lookup_button.set_sensitive(False)
|
||||||
|
|
||||||
|
if hasattr(child.search_online_button,'_signal_clicked_connector'):
|
||||||
|
child.search_online_button.disconnect(child.search_online_button._signal_clicked_connector)
|
||||||
|
#child.search_button._signal_clicked_connector = child.search_online_button.connect('clicked',self._on_lookup_steamapp_button_clicked,data)
|
||||||
|
child.search_online_button.set_sensitive(False)
|
||||||
|
|
||||||
def _on_add_steamapp_button_clicked(self,button,data:SteamApp,*args):
|
def _on_add_steamapp_button_clicked(self,button,data:SteamApp,*args):
|
||||||
def on_dialog_response(dialog,response):
|
def on_dialog_response(dialog,response):
|
||||||
|
|||||||
@ -470,6 +470,15 @@ class Settings(GObject.GObject):
|
|||||||
"CONFIGDIR": GLib.get_user_config_dir(),
|
"CONFIGDIR": GLib.get_user_config_dir(),
|
||||||
"CONFIG_DIR": GLib.get_user_config_dir(),
|
"CONFIG_DIR": GLib.get_user_config_dir(),
|
||||||
"STEAM_INSTALLPATH": self.steam_installpath,
|
"STEAM_INSTALLPATH": self.steam_installpath,
|
||||||
|
"DESKTOP_DIR": GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_DESKTOP),
|
||||||
|
"XDG_CONFIG_HOME": GLib.get_user_config_dir(),
|
||||||
|
"XDG_DESKTOP_DIR": GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_DESKTOP),
|
||||||
|
"XDG_DOCUMENTS_DIR": GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_DOCUMENTS),
|
||||||
|
"DOWNLOADS": GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_DOWNLOAD),
|
||||||
|
"XDG_DOWLNLOAD_DIR": GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_DOWNLOAD),
|
||||||
|
"XDG_PICTURES_DIR": GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_PICTURES),
|
||||||
|
"XDG_MUSIC_DIR": GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_MUSIC),
|
||||||
|
"XDG_DATA_DIR": GLib.get_user_data_dir(),
|
||||||
})
|
})
|
||||||
ret.update(self.variables)
|
ret.update(self.variables)
|
||||||
return ret
|
return ret
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user