summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-07-16 20:11:21 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-07-16 20:11:21 (GMT)
commitf6e56cebfa878dd32a2405fd0c916a40140a1ff0 (patch)
tree3e364d2e2b2de19b85ab6d14f856d4b8db11737a /plugins/pychrysalide
parente0d03e3eddb9d240cc21ac1b7a7ade915fd17942 (diff)
Applied a new GUI update with the new loaded panels features.
Diffstat (limited to 'plugins/pychrysalide')
-rw-r--r--plugins/pychrysalide/gui/editem.c84
1 files changed, 44 insertions, 40 deletions
diff --git a/plugins/pychrysalide/gui/editem.c b/plugins/pychrysalide/gui/editem.c
index 91f5246..8fd2c17 100644
--- a/plugins/pychrysalide/gui/editem.c
+++ b/plugins/pychrysalide/gui/editem.c
@@ -40,22 +40,22 @@
/* Réagit à un changement du binaire courant. */
-static void _update_editor_item_for_binary_python_wrapper(GEditorItem *, GLoadedBinary *);
+static void _change_editor_item_content_python_wrapper(GEditorItem *, GLoadedContent *, GLoadedContent *);
/* Réagit à un changement de vue. */
-static void _update_editor_item_for_view_python_wrapper(GEditorItem *, GtkDisplayPanel *);
+static void _change_editor_item_view_python_wrapper(GEditorItem *, GLoadedPanel *, GLoadedPanel *);
/* Réagit à un changement de contenu. */
-static void _update_editor_item_for_view_content_python_wrapper(GEditorItem *, GtkDisplayPanel *);
+static void _update_editor_item_view_python_wrapper(GEditorItem *, GLoadedPanel *);
-/* Réagit à un changement du binaire courant. */
-static PyObject *py_editor_item_update_for_binary(PyObject *, PyObject *);
+/* Réagit à un changement de contenu chargé en cours d'analyse. */
+static PyObject *py_editor_item_change_content(PyObject *, PyObject *);
-/* Réagit à un changement d'affichage principal de contenu. */
-static PyObject *py_editor_item_update_for_view(PyObject *, PyObject *);
+/* Réagit à un changement de vue du contenu en cours d'analyse. */
+static PyObject *py_editor_item_change_view(PyObject *, PyObject *);
-/* Réagit à un changement d'affichage principal de contenu. */
-static PyObject *py_editor_item_update_for_content(PyObject *, PyObject *);
+/* Réagit à une modification de la vue du contenu analysé. */
+static PyObject *py_editor_item_update_view(PyObject *, PyObject *);
/* Procède à l'enregistrement d'un élément reactif de l'éditeur. */
static PyObject *py_editor_item_register(PyObject *, PyObject *);
@@ -64,8 +64,9 @@ static PyObject *py_editor_item_register(PyObject *, PyObject *);
/******************************************************************************
* *
-* Paramètres : item = élément à actualiser. *
-* binary = nouvelle instance de binaire analysé. *
+* Paramètres : item = élément à actualiser. *
+* old = ancien contenu chargé analysé. *
+* new = nouveau contenu chargé à analyser. *
* *
* Description : Réagit à un changement du binaire courant. *
* *
@@ -75,7 +76,7 @@ static PyObject *py_editor_item_register(PyObject *, PyObject *);
* *
******************************************************************************/
-static void _update_editor_item_for_binary_python_wrapper(GEditorItem *item, GLoadedBinary *binary)
+static void _change_editor_item_content_python_wrapper(GEditorItem *item, GLoadedContent *old, GLoadedContent *new)
{
PyObject *target; /* Version Python de l'élément */
PyObject *args; /* Arguments pour l'appel */
@@ -92,10 +93,11 @@ static void _update_editor_item_for_binary_python_wrapper(GEditorItem *item, GLo
*/
target = pygobject_new(G_OBJECT(item));
- args = PyTuple_New(1);
- PyTuple_SetItem(args, 0, pygobject_new(G_OBJECT(binary)));
+ args = PyTuple_New(2);
+ PyTuple_SetItem(args, 0, pygobject_new(G_OBJECT(old)));
+ PyTuple_SetItem(args, 1, pygobject_new(G_OBJECT(new)));
- value = run_python_method(target, "update_for_binary", args);
+ value = run_python_method(target, "change_content", args);
Py_XDECREF(value);
Py_DECREF(args);
@@ -106,8 +108,9 @@ static void _update_editor_item_for_binary_python_wrapper(GEditorItem *item, GLo
/******************************************************************************
* *
-* Paramètres : item = élément à actualiser. *
-* panel = nouveau panneau d'affichage actif. *
+* Paramètres : item = élément à actualiser. *
+* old = ancienne vue du contenu chargé analysé. *
+* new = nouvelle vue du contenu chargé analysé. *
* *
* Description : Réagit à un changement de vue. *
* *
@@ -117,7 +120,7 @@ static void _update_editor_item_for_binary_python_wrapper(GEditorItem *item, GLo
* *
******************************************************************************/
-static void _update_editor_item_for_view_python_wrapper(GEditorItem *item, GtkDisplayPanel *panel)
+static void _change_editor_item_view_python_wrapper(GEditorItem *item, GLoadedPanel *old, GLoadedPanel *new)
{
PyObject *target; /* Version Python de l'élément */
PyObject *args; /* Arguments pour l'appel */
@@ -134,10 +137,11 @@ static void _update_editor_item_for_view_python_wrapper(GEditorItem *item, GtkDi
*/
target = pygobject_new(G_OBJECT(item));
- args = PyTuple_New(1);
- PyTuple_SetItem(args, 0, pygobject_new(G_OBJECT(panel)));
+ args = PyTuple_New(2);
+ PyTuple_SetItem(args, 0, pygobject_new(G_OBJECT(old)));
+ PyTuple_SetItem(args, 1, pygobject_new(G_OBJECT(new)));
- value = run_python_method(target, "update_for_view", args);
+ value = run_python_method(target, "change_view", args);
Py_XDECREF(value);
Py_DECREF(args);
@@ -149,7 +153,7 @@ static void _update_editor_item_for_view_python_wrapper(GEditorItem *item, GtkDi
/******************************************************************************
* *
* Paramètres : item = élément à actualiser. *
-* panel = nouveau panneau d'affichage actif. *
+* panel = vue du contenu chargé analysé modifiée. *
* *
* Description : Réagit à un changement de contenu. *
* *
@@ -159,7 +163,7 @@ static void _update_editor_item_for_view_python_wrapper(GEditorItem *item, GtkDi
* *
******************************************************************************/
-static void _update_editor_item_for_view_content_python_wrapper(GEditorItem *item, GtkDisplayPanel *panel)
+static void _update_editor_item_view_python_wrapper(GEditorItem *item, GLoadedPanel *panel)
{
PyObject *target; /* Version Python de l'élément */
PyObject *args; /* Arguments pour l'appel */
@@ -179,7 +183,7 @@ static void _update_editor_item_for_view_content_python_wrapper(GEditorItem *ite
args = PyTuple_New(1);
PyTuple_SetItem(args, 0, pygobject_new(G_OBJECT(panel)));
- value = run_python_method(target, "update_for_content", args);
+ value = run_python_method(target, "update_view", args);
Py_XDECREF(value);
Py_DECREF(args);
@@ -193,7 +197,7 @@ static void _update_editor_item_for_view_content_python_wrapper(GEditorItem *ite
* Paramètres : self = classe représentant un binaire. *
* args = arguments fournis à l'appel. *
* *
-* Description : Réagit à un changement du binaire courant. *
+* Description : Réagit à un changement de contenu chargé en cours d'analyse. *
* *
* Retour : - *
* *
@@ -201,7 +205,7 @@ static void _update_editor_item_for_view_content_python_wrapper(GEditorItem *ite
* *
******************************************************************************/
-static PyObject *py_editor_item_update_for_binary(PyObject *self, PyObject *args)
+static PyObject *py_editor_item_change_content(PyObject *self, PyObject *args)
{
Py_RETURN_NONE;
@@ -213,7 +217,7 @@ static PyObject *py_editor_item_update_for_binary(PyObject *self, PyObject *args
* Paramètres : self = classe représentant un binaire. *
* args = arguments fournis à l'appel. *
* *
-* Description : Réagit à un changement d'affichage principal de contenu. *
+* Description : Réagit à un changement de vue du contenu en cours d'analyse. *
* *
* Retour : - *
* *
@@ -221,7 +225,7 @@ static PyObject *py_editor_item_update_for_binary(PyObject *self, PyObject *args
* *
******************************************************************************/
-static PyObject *py_editor_item_update_for_view(PyObject *self, PyObject *args)
+static PyObject *py_editor_item_change_view(PyObject *self, PyObject *args)
{
Py_RETURN_NONE;
@@ -233,7 +237,7 @@ static PyObject *py_editor_item_update_for_view(PyObject *self, PyObject *args)
* Paramètres : self = classe représentant un binaire. *
* args = arguments fournis à l'appel. *
* *
-* Description : Réagit à un changement d'affichage principal de contenu. *
+* Description : Réagit à une modification de la vue du contenu analysé. *
* *
* Retour : - *
* *
@@ -241,7 +245,7 @@ static PyObject *py_editor_item_update_for_view(PyObject *self, PyObject *args)
* *
******************************************************************************/
-static PyObject *py_editor_item_update_for_content(PyObject *self, PyObject *args)
+static PyObject *py_editor_item_update_view(PyObject *self, PyObject *args)
{
Py_RETURN_NONE;
@@ -263,16 +267,16 @@ static PyObject *py_editor_item_update_for_content(PyObject *self, PyObject *arg
static PyObject *py_editor_item_register(PyObject *self, PyObject *args)
{
- GEditorItem *item; /* Version GLib de l'élément */
+ //GEditorItem *item; /* Version GLib de l'élément */
- item = G_EDITOR_ITEM(pygobject_get(self));
+ //item = G_EDITOR_ITEM(pygobject_get(self));
- //item->update_binary = _update_editor_item_for_binary_python_wrapper;
- //item->update_view = _update_editor_item_for_view_python_wrapper;
- //item->update_content = _update_editor_item_for_view_content_python_wrapper;
+ //item->update_binary = _change_editor_item_content_python_wrapper;
+ //item->update_view = _change_editor_item_view_python_wrapper;
+ //item->update_content = _update_editor_item_view_python_wrapper;
Py_INCREF(self);
- register_editor_item(item);
+ //register_editor_item(item);
Py_RETURN_NONE;
@@ -295,17 +299,17 @@ PyTypeObject *get_python_editor_item_type(void)
{
static PyMethodDef py_editor_item_methods[] = {
{
- "update_for_binary", (PyCFunction)py_editor_item_update_for_binary,
+ "change_content", (PyCFunction)py_editor_item_change_content,
METH_VARARGS,
- "Called by Chrysalide on each binary change, if the item is registered."
+ "Called by Chrysalide on each content change, if the item is registered."
},
{
- "update_for_view", (PyCFunction)py_editor_item_update_for_view,
+ "change_view", (PyCFunction)py_editor_item_change_view,
METH_VARARGS,
"Called by Chrysalide on each view change, if the item is registered."
},
{
- "update_for_content", (PyCFunction)py_editor_item_update_for_content,
+ "update_view", (PyCFunction)py_editor_item_update_view,
METH_VARARGS,
"Called by Chrysalide on each view content change, if the item is registered."
},