summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/gui
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2023-05-22 20:56:32 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2023-05-22 20:56:32 (GMT)
commite1a2823b5d831349467d309ce42d56055ec9c04f (patch)
treebc4dd464d10cd379622ceb361398895d59849409 /plugins/pychrysalide/gui
parent15fb909bdd8ca0f37dd71da7427ea6bc6bb71cbb (diff)
Rely on GObject-introspection implementation for some registrations.
Diffstat (limited to 'plugins/pychrysalide/gui')
-rw-r--r--plugins/pychrysalide/gui/item.c2
-rw-r--r--plugins/pychrysalide/gui/menubar.c5
-rw-r--r--plugins/pychrysalide/gui/panel.c5
3 files changed, 7 insertions, 5 deletions
diff --git a/plugins/pychrysalide/gui/item.c b/plugins/pychrysalide/gui/item.c
index eb140fb..0c604b5 100644
--- a/plugins/pychrysalide/gui/item.c
+++ b/plugins/pychrysalide/gui/item.c
@@ -691,7 +691,7 @@ bool ensure_python_editor_item_is_registered(void)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_EDITOR_ITEM, type, &PyGObject_Type))
+ if (!register_class_for_pygobject(dict, G_TYPE_EDITOR_ITEM, type))
return false;
}
diff --git a/plugins/pychrysalide/gui/menubar.c b/plugins/pychrysalide/gui/menubar.c
index 5c6270e..29b76ac 100644
--- a/plugins/pychrysalide/gui/menubar.c
+++ b/plugins/pychrysalide/gui/menubar.c
@@ -160,7 +160,10 @@ bool ensure_python_menu_bar_is_registered(void)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_MENU_BAR, type, get_python_editor_item_type()))
+ if (!ensure_python_editor_item_is_registered())
+ return false;
+
+ if (!register_class_for_pygobject(dict, G_TYPE_MENU_BAR, type))
return false;
}
diff --git a/plugins/pychrysalide/gui/panel.c b/plugins/pychrysalide/gui/panel.c
index 2afb2a1..d0cbdf7 100644
--- a/plugins/pychrysalide/gui/panel.c
+++ b/plugins/pychrysalide/gui/panel.c
@@ -164,7 +164,7 @@ static PyObject *py_panel_item_new(PyTypeObject *type, PyObject *args, PyObject
if (first_time)
{
- status = register_class_for_dynamic_pygobject(gtype, type, base);
+ status = register_class_for_dynamic_pygobject(gtype, type);
if (!status)
{
@@ -1188,8 +1188,7 @@ bool ensure_python_panel_item_is_registered(void)
if (!ensure_python_dockable_is_registered())
return false;
- if (!_register_class_for_pygobject(dict, G_TYPE_PANEL_ITEM, type,
- get_python_editor_item_type(), get_python_dockable_type(), NULL))
+ if (!_register_class_for_pygobject(dict, G_TYPE_PANEL_ITEM, type))
return false;
if (!define_panel_item_constants(type))