mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-21 18:50:38 +03:00
Added saving the preference to dconf
This commit is contained in:
parent
518685f361
commit
82bb88ca34
@ -19,6 +19,7 @@
|
||||
import json
|
||||
from base64 import b64decode
|
||||
from Crypto.Cipher import AES
|
||||
from storage.dconf_registry import Dconf_registry
|
||||
|
||||
from util.xml import get_xml_root
|
||||
|
||||
@ -76,6 +77,7 @@ def read_drives(drives_file):
|
||||
|
||||
drives.append(drive_obj)
|
||||
|
||||
Dconf_registry.drives.append(drives)
|
||||
return drives
|
||||
|
||||
def merge_drives(storage, sid, drive_objects, policy_name):
|
||||
|
@ -17,6 +17,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from util.xml import get_xml_root
|
||||
from storage.dconf_registry import Dconf_registry
|
||||
|
||||
from enum import Enum
|
||||
|
||||
@ -48,6 +49,7 @@ def read_envvars(envvars_file):
|
||||
|
||||
variables.append(var_obj)
|
||||
|
||||
Dconf_registry.environmentvariables.append(variables)
|
||||
return variables
|
||||
|
||||
def merge_envvars(storage, sid, envvar_objects, policy_name):
|
||||
|
@ -17,6 +17,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from util.xml import get_xml_root
|
||||
from storage.dconf_registry import Dconf_registry
|
||||
|
||||
def read_files(filesxml):
|
||||
files = list()
|
||||
@ -33,6 +34,7 @@ def read_files(filesxml):
|
||||
fil_obj.set_executable(props.get('executable', default=None))
|
||||
files.append(fil_obj)
|
||||
|
||||
Dconf_registry.files.append(files)
|
||||
return files
|
||||
|
||||
def merge_files(storage, sid, file_objects, policy_name):
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
|
||||
from enum import Enum
|
||||
from storage.dconf_registry import Dconf_registry
|
||||
|
||||
|
||||
from util.xml import get_xml_root
|
||||
@ -70,6 +71,7 @@ def read_folders(folders_file):
|
||||
|
||||
folders.append(fld_obj)
|
||||
|
||||
Dconf_registry.folders.append(folders)
|
||||
return folders
|
||||
|
||||
def merge_folders(storage, sid, folder_objects, policy_name):
|
||||
|
@ -17,6 +17,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from util.xml import get_xml_root
|
||||
from storage.dconf_registry import Dconf_registry
|
||||
|
||||
def read_inifiles(inifiles_file):
|
||||
inifiles = list()
|
||||
|
@ -17,6 +17,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from util.xml import get_xml_root
|
||||
from storage.dconf_registry import Dconf_registry
|
||||
|
||||
def read_networkshares(networksharesxml):
|
||||
networkshares = list()
|
||||
@ -32,6 +33,7 @@ def read_networkshares(networksharesxml):
|
||||
networkshare_obj.set_abe(props.get('abe', default=None))
|
||||
networkshares.append(networkshare_obj)
|
||||
|
||||
Dconf_registry.networkshares.append(networkshares)
|
||||
return networkshares
|
||||
|
||||
def merge_networkshares(storage, sid, networkshares_objects, policy_name):
|
||||
|
@ -17,6 +17,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import json
|
||||
from storage.dconf_registry import Dconf_registry
|
||||
|
||||
from util.xml import get_xml_root
|
||||
|
||||
@ -39,6 +40,7 @@ def read_printers(printers_file):
|
||||
|
||||
printers.append(prn_obj)
|
||||
|
||||
Dconf_registry.printers.append(printers)
|
||||
return printers
|
||||
|
||||
def merge_printers(storage, sid, printer_objects, policy_name):
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
import configparser
|
||||
import os
|
||||
from storage.dconf_registry import Dconf_registry
|
||||
|
||||
|
||||
def read_scripts(scripts_file):
|
||||
@ -76,6 +77,7 @@ def read_scripts(scripts_file):
|
||||
scripts.add_script('SHUTDOWN', shutdown_scripts[i])
|
||||
|
||||
|
||||
Dconf_registry.scripts.append(scripts)
|
||||
return scripts
|
||||
|
||||
def merge_scripts(storage, sid, scripts_objects, policy_name):
|
||||
|
@ -17,6 +17,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from util.xml import get_xml_root
|
||||
from storage.dconf_registry import Dconf_registry
|
||||
|
||||
def read_services(service_file):
|
||||
'''
|
||||
@ -37,6 +38,7 @@ def read_services(service_file):
|
||||
|
||||
services.append(srv_obj)
|
||||
|
||||
Dconf_registry.services.append(services)
|
||||
return services
|
||||
|
||||
def merge_services(storage, sid, service_objects, policy_name):
|
||||
|
@ -24,6 +24,7 @@ from enum import Enum
|
||||
from xml.etree import ElementTree
|
||||
from xdg.DesktopEntry import DesktopEntry
|
||||
import json
|
||||
from storage.dconf_registry import Dconf_registry
|
||||
|
||||
from util.windows import transform_windows_path
|
||||
from util.xml import get_xml_root
|
||||
@ -90,6 +91,7 @@ def read_shortcuts(shortcuts_file):
|
||||
|
||||
shortcuts.append(sc)
|
||||
|
||||
Dconf_registry.shortcuts.append(shortcuts)
|
||||
return shortcuts
|
||||
|
||||
def merge_shortcuts(storage, sid, shortcut_objects, policy_name):
|
||||
|
Loading…
x
Reference in New Issue
Block a user