summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/gui
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysalide/gui')
-rw-r--r--plugins/pychrysalide/gui/core/items.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/plugins/pychrysalide/gui/core/items.c b/plugins/pychrysalide/gui/core/items.c
index 0912bc4..bc5bbd6 100644
--- a/plugins/pychrysalide/gui/core/items.c
+++ b/plugins/pychrysalide/gui/core/items.c
@@ -68,15 +68,12 @@ static PyObject *py_items_update_project(PyObject *, PyObject *);
static PyObject *py_items_change_current_content(PyObject *self, PyObject *args)
{
- PyObject *content_obj; /* Objet pour le contenu */
- int ret; /* Bilan de lecture des args. */
GLoadedContent *content; /* Instance GLib correspondante*/
+ int ret; /* Bilan de lecture des args. */
- ret = PyArg_ParseTuple(args, "O!", get_python_loaded_content_type(), &content_obj);
+ ret = PyArg_ParseTuple(args, "O&", convert_to_loaded_content, &content);
if (!ret) return NULL;
- content = G_LOADED_CONTENT(pygobject_get(content_obj));
-
change_editor_items_current_content(content);
Py_RETURN_NONE;
@@ -99,15 +96,12 @@ static PyObject *py_items_change_current_content(PyObject *self, PyObject *args)
static PyObject *py_items_change_current_view(PyObject *self, PyObject *args)
{
- PyObject *panel_obj; /* Objet de panneau chargé */
- int ret; /* Bilan de lecture des args. */
GLoadedPanel *panel; /* Instance GLib correspondante*/
+ int ret; /* Bilan de lecture des args. */
- ret = PyArg_ParseTuple(args, "O!", get_python_loaded_panel_type(), &panel_obj);
+ ret = PyArg_ParseTuple(args, "O&", convert_to_loaded_panel, &panel);
if (!ret) return NULL;
- panel = G_LOADED_PANEL(pygobject_get(panel_obj));
-
change_editor_items_current_view(panel);
Py_RETURN_NONE;
@@ -130,15 +124,12 @@ static PyObject *py_items_change_current_view(PyObject *self, PyObject *args)
static PyObject *py_items_update_current_view(PyObject *self, PyObject *args)
{
- PyObject *panel_obj; /* Objet de panneau chargé */
- int ret; /* Bilan de lecture des args. */
GLoadedPanel *panel; /* Instance GLib correspondante*/
+ int ret; /* Bilan de lecture des args. */
- ret = PyArg_ParseTuple(args, "O!", get_python_loaded_panel_type(), &panel_obj);
+ ret = PyArg_ParseTuple(args, "O&", convert_to_loaded_panel, &panel);
if (!ret) return NULL;
- panel = G_LOADED_PANEL(pygobject_get(panel_obj));
-
update_editor_items_current_view(panel);
Py_RETURN_NONE;
@@ -163,15 +154,12 @@ static PyObject *py_items_update_current_view(PyObject *self, PyObject *args)
static PyObject *py_items_update_project(PyObject *self, PyObject *args)
{
- PyObject *project_obj; /* Objet de panneau chargé */
- int ret; /* Bilan de lecture des args. */
GStudyProject *project; /* Instance GLib correspondante*/
+ int ret; /* Bilan de lecture des args. */
- ret = PyArg_ParseTuple(args, "O!", get_python_study_project_type(), &project_obj);
+ ret = PyArg_ParseTuple(args, "O&", convert_to_study_project, &project);
if (!ret) return NULL;
- project = G_STUDY_PROJECT(pygobject_get(project_obj));
-
update_project_area(project);
Py_RETURN_NONE;