summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-12-26 11:08:23 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-12-26 11:08:23 (GMT)
commit181e3a9a8819ba50c74f4864c0fca111e375aa5e (patch)
tree216f46f42175618bb717659fd44d5b0cad38dd70 /src/analysis
parent9b5cd85f783f0174e81f22bb3333d4dfcec76532 (diff)
Registered the current project as a real global variable.
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/project.c38
-rw-r--r--src/analysis/project.h9
2 files changed, 4 insertions, 43 deletions
diff --git a/src/analysis/project.c b/src/analysis/project.c
index 5fe7ab3..66f6b0f 100644
--- a/src/analysis/project.c
+++ b/src/analysis/project.c
@@ -103,9 +103,6 @@ static void g_study_project_class_init(GStudyProjectClass *);
/*Initialise une instance de projet d'étude. */
static void g_study_project_init(GStudyProject *);
-/* Supprime de l'écran un projet en place. */
-static void g_study_project_hide(const GStudyProject *);
-
/* Assure un positionnement initial idéal. */
static gboolean scroll_for_the_first_time(GtkWidget *, GdkEvent *, GLoadedBinary *);
@@ -722,7 +719,7 @@ void g_study_project_display(const GStudyProject *project)
* *
******************************************************************************/
-static void g_study_project_hide(const GStudyProject *project)
+void g_study_project_hide(const GStudyProject *project)
{
size_t i; /* Boucle de parcours #1 */
loaded_binary *handled; /* Binaire prise en compte */
@@ -1039,39 +1036,6 @@ GtkDisplayPanel *get_alt_view_for_view_panel(GtkDisplayPanel *panel, BinaryView
/******************************************************************************
* *
-* Paramètres : project = éventuel adresse à renvoyer désormais. *
-* *
-* Description : Fournit l'adresse du projet courant. *
-* *
-* Retour : Adresse du projet ouvert ou NULL si aucun (!). *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GStudyProject *_get_current_study_project(GStudyProject *project)
-{
- static GStudyProject *result = NULL; /* Adresse à retourner */
-
- if (project != NULL)
- {
- if (result != NULL)
- {
- g_study_project_hide(result);
- g_object_unref(G_OBJECT(result));
- }
-
- result = project;
-
- }
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
* Paramètres : - *
* *
* Description : Fournit le gestionnaire des projets connus. *
diff --git a/src/analysis/project.h b/src/analysis/project.h
index 34dd976..b331b1f 100644
--- a/src/analysis/project.h
+++ b/src/analysis/project.h
@@ -111,6 +111,9 @@ void g_study_project_detach_binary(GStudyProject *, GLoadedBinary *);
/* Met en place un projet à l'écran. */
void g_study_project_display(const GStudyProject *);
+/* Supprime de l'écran un projet en place. */
+void g_study_project_hide(const GStudyProject *);
+
/* Fournit l'ensemble des binaires associés à un projet. */
GLoadedBinary **g_study_project_get_binaries(const GStudyProject *, size_t *);
@@ -136,12 +139,6 @@ GtkDisplayPanel *get_alt_view_for_view_panel(GtkDisplayPanel *, BinaryView);
/* ------------------------- GESTION GLOBALISEE DES PROJETS ------------------------- */
-/* Fournit l'adresse du projet courant. */
-GStudyProject *_get_current_study_project(GStudyProject *);
-
-#define set_current_project(prj) _get_current_study_project(prj)
-#define get_current_project() _get_current_study_project(NULL)
-
/* Fournit le gestionnaire des projets connus. */
GtkRecentManager *get_project_manager(void);