summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-02-15 13:27:35 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-02-15 13:27:35 (GMT)
commitef90ffc686eb0dc1aa1567c6ceaff3843970a597 (patch)
treec26f7a17fd89f1558bc1775183d6b905d21bccd0 /plugins/pychrysalide/analysis
parent04b1ee00d25383f977f59703e4c0bc66ad1faa81 (diff)
Chosen the default view displayed after a binary loading.
Diffstat (limited to 'plugins/pychrysalide/analysis')
-rw-r--r--plugins/pychrysalide/analysis/loaded.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/plugins/pychrysalide/analysis/loaded.c b/plugins/pychrysalide/analysis/loaded.c
index a5486a6..4a762ef 100644
--- a/plugins/pychrysalide/analysis/loaded.c
+++ b/plugins/pychrysalide/analysis/loaded.c
@@ -54,6 +54,9 @@ static PyObject *py_loaded_content_detect_obfuscators(PyObject *, PyObject *);
/* Détermine le nombre de vues disponibles pour un contenu. */
static PyObject *py_loaded_content_count_views(PyObject *, PyObject *);
+/* Met en place la vue initiale pour un contenu chargé. */
+static PyObject *py_loaded_content_build_default_view(PyObject *, PyObject *);
+
/* Fournit le contenu représenté de l'élément chargé. */
static PyObject *py_loaded_content_get_content(PyObject *, void *);
@@ -264,6 +267,49 @@ static PyObject *py_loaded_content_count_views(PyObject *self, PyObject *args)
/******************************************************************************
* *
+* Paramètres : self = contenu chargé à manipuler. *
+* args = non utilisé ici. *
+* *
+* Description : Met en place la vue initiale pour un contenu chargé. *
+* *
+* Retour : Composant graphique nouveau. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static PyObject *py_loaded_content_build_default_view(PyObject *self, PyObject *args)
+{
+ PyObject *result; /* Instance à retourner */
+ GLoadedContent *content; /* Version GLib de l'élément */
+ GtkWidget *view; /* Composant GTK à transposer */
+
+#define LOADED_CONTENT_BUILD_DEFAULT_VIEW_METHOD PYTHON_METHOD_DEF \
+( \
+ build_default_view, "$self", \
+ METH_NOARGS, py_loaded_content, \
+ "Build a new widget for the default graphical view of the loaded content." \
+ "\n" \
+ "This method is aimed to only be called from the GUI internals." \
+ " It provides the first view displayed in the main Chrysalide window" \
+ " after a binary loading." \
+)
+
+ content = G_LOADED_CONTENT(pygobject_get(self));
+
+ view = g_loaded_content_build_default_view(content);
+
+ result = new_pygobject_widget(view);
+
+ g_object_unref(G_OBJECT(view));
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : self = objet Python concerné par l'appel. *
* closure = non utilisé ici. *
* *
@@ -327,6 +373,7 @@ PyTypeObject *get_python_loaded_content_type(void)
METH_NOARGS,
"count_views($self, /)\n--\n\nCompute the quantity of available views."
},
+ LOADED_CONTENT_BUILD_DEFAULT_VIEW_METHOD,
{ NULL }
};