summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/editor.c57
-rw-r--r--src/gui/menus/file.c1
-rw-r--r--src/gui/menus/project.c1
-rw-r--r--src/gui/panels/welcome.c2
4 files changed, 59 insertions, 2 deletions
diff --git a/src/gui/editor.c b/src/gui/editor.c
index 2488a27..6785753 100644
--- a/src/gui/editor.c
+++ b/src/gui/editor.c
@@ -43,8 +43,8 @@
#include "panels/panel.h"
#include "panels/welcome.h"
#include "tb/portions.h"
-#include "../analysis/project.h"
#include "../common/extstr.h"
+#include "../core/global.h"
#include "../core/params.h"
#include "../gtkext/easygtk.h"
#include "../gtkext/gtkdockable.h"
@@ -208,6 +208,15 @@ static void notify_paned_handle_position_change(GObject *, GParamSpec *, gpointe
+/* ------------------------- INTEGRATION ET SUIVI DE PROJET ------------------------- */
+
+
+/* Réagit à un changement du projet principal. */
+static void notify_editor_project_change(GStudyProject *, bool);
+
+
+
+
@@ -372,6 +381,8 @@ GtkWidget *create_editor(void)
/* Actualisation des contenus */
+ register_project_change_notification(notify_editor_project_change);
+
change_editor_items_current_binary(NULL);
@@ -1574,3 +1585,47 @@ static void notify_paned_handle_position_change(GObject *obj, GParamSpec *pspec,
free(key);
}
+
+
+
+/* ---------------------------------------------------------------------------------- */
+/* INTEGRATION ET SUIVI DE PROJET */
+/* ---------------------------------------------------------------------------------- */
+
+
+/******************************************************************************
+* *
+* Paramètres : project = projet concerné par la procédure. *
+* new = indique si le projet est le nouvel actif ou non. *
+* *
+* Description : Réagit à un changement du projet principal. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static void notify_editor_project_change(GStudyProject *project, bool new)
+{
+
+ if (new)
+ {
+
+ /* ... */
+
+
+ }
+
+ else
+ {
+
+ g_study_project_hide(project);
+
+
+
+ }
+
+
+
+}
diff --git a/src/gui/menus/file.c b/src/gui/menus/file.c
index 6e64357..c0c031c 100644
--- a/src/gui/menus/file.c
+++ b/src/gui/menus/file.c
@@ -30,6 +30,7 @@
#include "../core/global.h"
#include "../../analysis/project.h"
+#include "../../core/global.h"
#include "../../gtkext/easygtk.h"
diff --git a/src/gui/menus/project.c b/src/gui/menus/project.c
index 8c60f72..2930a95 100644
--- a/src/gui/menus/project.c
+++ b/src/gui/menus/project.c
@@ -35,6 +35,7 @@
#include "../dialogs/shellcode.h"
#include "../../analysis/loading.h"
#include "../../analysis/contents/file.h"
+#include "../../core/global.h"
#include "../../gtkext/easygtk.h"
diff --git a/src/gui/panels/welcome.c b/src/gui/panels/welcome.c
index f69b81d..0edeb41 100644
--- a/src/gui/panels/welcome.c
+++ b/src/gui/panels/welcome.c
@@ -38,11 +38,11 @@
#include "panel-int.h"
#include "../core/global.h"
-#include "../../analysis/project.h"
#include "../../common/cpp.h"
#include "../../common/io.h"
#include "../../common/net.h"
#include "../../common/shuffle.h"
+#include "../../core/global.h"
#include "../../core/params.h"
#include "../../gtkext/support.h"