Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatryk Nowak <pnowak43@proton.me>2024-01-02 21:19:21 +0300
committerPatryk Nowak <pnowak43@proton.me>2024-01-02 21:19:21 +0300
commit3b5fe74069fad29d53eb25be74d8ea807cce0c0e (patch)
treefd2b21947fb039f2aadba11b2cf1e518a288daa0 /plugins
parent724d0d0e6f0e280129f5ada0e5a2b3c90b074b72 (diff)
Add unlocking code to let plugins use passwords
Diffstat (limited to 'plugins')
-rw-r--r--plugins/python_wrapper/python_wrapper_remmina.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/python_wrapper/python_wrapper_remmina.c b/plugins/python_wrapper/python_wrapper_remmina.c
index 955be8ef0..7a4a7711d 100644
--- a/plugins/python_wrapper/python_wrapper_remmina.c
+++ b/plugins/python_wrapper/python_wrapper_remmina.c
@@ -67,6 +67,7 @@ static PyObject* python_wrapper_debug_wrapper(PyObject* self, PyObject* msg);
static PyObject* remmina_register_plugin_wrapper(PyObject* self, PyObject* plugin);
static PyObject* remmina_file_get_datadir_wrapper(PyObject* self, PyObject* plugin);
static PyObject* remmina_file_new_wrapper(PyObject* self, PyObject* args, PyObject* kwargs);
+static PyObject* remmina_unlock_new_wrapper(PyObject* self, PyObject* args, PyObject* kwargs);
static PyObject* remmina_pref_set_value_wrapper(PyObject* self, PyObject* args, PyObject* kwargs);
static PyObject* remmina_pref_get_value_wrapper(PyObject* self, PyObject* args, PyObject* kwargs);
static PyObject* remmina_pref_get_scale_quality_wrapper(PyObject* self, PyObject* plugin);
@@ -133,6 +134,11 @@ static PyMethodDef remmina_python_module_type_methods[] = {
{ "file_new", (PyCFunction)remmina_file_new_wrapper, METH_VARARGS | METH_KEYWORDS, NULL },
/**
+ * Calls remmina_unlock_new and returns its result.
+ */
+ { "unlock_new", (PyCFunction)remmina_unlock_new_wrapper, METH_VARARGS | METH_KEYWORDS, NULL },
+
+ /**
* Calls remmina_pref_set_value and returns its result.
*/
{ "pref_set_value", (PyCFunction)remmina_pref_set_value_wrapper, METH_VARARGS | METH_KEYWORDS, NULL },
@@ -854,6 +860,21 @@ static PyObject* remmina_file_new_wrapper(PyObject* self, PyObject* args, PyObje
return Py_None;
}
+static PyObject* remmina_unlock_new_wrapper(PyObject* self, PyObject* args, PyObject* kwargs)
+{
+ TRACE_CALL(__func__);
+
+ static char* kwlist[] = { "window", NULL};
+ GtkWindow* window = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|0", kwlist, &window))
+ {
+ return Py_None;
+ }
+
+ return PyBool_FromLong(python_wrapper_get_service()->plugin_unlock_new(window));
+}
+
static PyObject* remmina_pref_set_value_wrapper(PyObject* self, PyObject* args, PyObject* kwargs)
{
TRACE_CALL(__func__);