mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix the bin path preferences.
This commit is contained in:
parent
757500c478
commit
633d2ad28c
@ -45,27 +45,23 @@ class ServerType(object):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def register_preferences(cls):
|
def register_preferences(cls):
|
||||||
# Introduce inner function as we need to register the preferences after
|
paths = Preferences('paths', _('Paths'))
|
||||||
# we get the user language and its translation.
|
|
||||||
def register_paths():
|
|
||||||
paths = Preferences('paths', _('Paths'))
|
|
||||||
|
|
||||||
for key in cls.registry:
|
for key in cls.registry:
|
||||||
st = cls.registry[key]
|
st = cls.registry[key]
|
||||||
default_path = config.DEFAULT_BINARY_PATHS[st.stype] or ""
|
default_path = config.DEFAULT_BINARY_PATHS[st.stype] or ""
|
||||||
|
|
||||||
st.utility_path = paths.register(
|
st.utility_path = paths.register(
|
||||||
'bin_paths', st.stype + '_bin_dir',
|
'bin_paths', st.stype + '_bin_dir',
|
||||||
_("{0} Binary Path").format(st.desc),
|
_("{0} Binary Path").format(st.desc),
|
||||||
'text', default_path, category_label=_('Binary paths'),
|
'text', default_path, category_label=_('Binary paths'),
|
||||||
help_str=_(
|
help_str=_(
|
||||||
"Path to the directory containing the {0} utility"
|
"Path to the directory containing the {0} utility"
|
||||||
" programs (pg_dump, pg_restore etc).".format(
|
" programs (pg_dump, pg_restore etc).".format(
|
||||||
st.desc
|
st.desc
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return register_paths
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def priority(self):
|
def priority(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user