>From aa25963426c3f909ef934392bc32e94c3b6ecb08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Cardona?= Date: Sun, 27 Jun 2010 23:13:46 +0200 Subject: [PATCH] declare global variable "etat" in only one .c file, declare it extern in headers --- src/parametres.c | 4 ++++ src/structures.h | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/parametres.c b/src/parametres.c index 1b5b274..e046c57 100644 --- a/src/parametres.c +++ b/src/parametres.c @@ -85,6 +85,10 @@ static gboolean selectionne_liste_preference ( GtkTreeSelection *selection, /*END_STATIC*/ +/* global "etat" structure shared in the entire program */ +struct gsb_etat_t etat; + + GtkWidget *fenetre_preferences = NULL; static GtkTreeStore *preference_tree_model = NULL; diff --git a/src/structures.h b/src/structures.h index 00b59ea..0d637f6 100644 --- a/src/structures.h +++ b/src/structures.h @@ -36,7 +36,7 @@ * la partie configurée par la conf * la partie configurée pendant le fonctionnement de grisbi * */ -struct +struct gsb_etat_t { time_t modification_fichier; gint is_archive; /** TRUE if the file is an archive, FALSE else */ @@ -115,7 +115,10 @@ struct /* variables for the module estimate balance */ gint bet_deb_period; -} etat; +}; + +/* declared in parametres.c */ +extern struct gsb_etat_t etat; /** structure conf -- 1.7.1