mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-10-04 16:57:52 +00:00
feat: add system plugin dir
This commit is contained in:
parent
12b525f11f
commit
8f279f6ccb
2 changed files with 9 additions and 1 deletions
|
@ -26,3 +26,5 @@ project_url = '@PROJECT_URL@'
|
|||
bugtracker_url = '@BUGTRACKER_URL@'
|
||||
help_url = '@HELP_URL@'
|
||||
translate_url = '@TRANSLATE_URL@'
|
||||
pkgdatadir = '@PKGDATA_DIR@'
|
||||
localedir = '@LOCALE_DIR@'
|
||||
|
|
|
@ -21,7 +21,8 @@ import os
|
|||
from gi.repository import Adw, GLib
|
||||
from yapsy.PluginManager import PluginManager
|
||||
from .plugin_row import GradiencePluginRow
|
||||
|
||||
from .constants import pkgdatadir
|
||||
from .modules.utils import buglog
|
||||
|
||||
USER_PLUGIN_DIR = os.path.join(
|
||||
os.environ.get("XDG_DATA_HOME", os.environ["HOME"] + "/.local/share"),
|
||||
|
@ -29,6 +30,10 @@ USER_PLUGIN_DIR = os.path.join(
|
|||
"plugins",
|
||||
)
|
||||
|
||||
SYSTEM_PLUGIN_DIR = os.path.join(
|
||||
pkgdatadir,
|
||||
"plugins",
|
||||
)
|
||||
|
||||
class GradiencePluginsList:
|
||||
"""Represent the plugin group in Advanced"""
|
||||
|
@ -52,6 +57,7 @@ class GradiencePluginsList:
|
|||
self.pm.setPluginPlaces(
|
||||
[
|
||||
USER_PLUGIN_DIR,
|
||||
SYSTEM_PLUGIN_DIR
|
||||
]
|
||||
)
|
||||
self.pm.collectPlugins()
|
||||
|
|
Loading…
Reference in a new issue