App: add new config key UserConfigPath to store the path to the config files
This commit is contained in:
@@ -88,8 +88,10 @@ PyMethodDef Application::Methods[] = {
|
||||
"Get the name of the module that can export the filetype"},
|
||||
{"getResourceDir", (PyCFunction) Application::sGetResourceDir, METH_VARARGS,
|
||||
"Get the root directory of all resources"},
|
||||
{"getUserConfigDir", (PyCFunction) Application::sGetUserConfigDir, METH_VARARGS,
|
||||
"Get the root directory of user config files"},
|
||||
{"getUserAppDataDir", (PyCFunction) Application::sGetUserAppDataDir, METH_VARARGS,
|
||||
"Get the root directory of user settings"},
|
||||
"Get the root directory of application data"},
|
||||
{"getUserMacroDir", (PyCFunction) Application::sGetUserMacroDir, METH_VARARGS,
|
||||
"getUserMacroDir(bool=False) -> string"
|
||||
"Get the directory of the user's macro directory\n"
|
||||
@@ -651,6 +653,15 @@ PyObject* Application::sGetResourceDir(PyObject * /*self*/, PyObject *args)
|
||||
return Py::new_reference_to(datadir);
|
||||
}
|
||||
|
||||
PyObject* Application::sGetUserConfigDir(PyObject * /*self*/, PyObject *args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return nullptr;
|
||||
|
||||
Py::String datadir(Application::getUserConfigDir(),"utf-8");
|
||||
return Py::new_reference_to(datadir);
|
||||
}
|
||||
|
||||
PyObject* Application::sGetUserAppDataDir(PyObject * /*self*/, PyObject *args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, "")) // convert args: Python->C
|
||||
|
||||
Reference in New Issue
Block a user