diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2017-12-26 11:08:23 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2017-12-26 11:08:23 (GMT) |
commit | 181e3a9a8819ba50c74f4864c0fca111e375aa5e (patch) | |
tree | 216f46f42175618bb717659fd44d5b0cad38dd70 /src/gui/editor.c | |
parent | 9b5cd85f783f0174e81f22bb3333d4dfcec76532 (diff) |
Registered the current project as a real global variable.
Diffstat (limited to 'src/gui/editor.c')
-rw-r--r-- | src/gui/editor.c | 57 |
1 files changed, 56 insertions, 1 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); + + + + } + + + +} |