[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9.0-129-gca8644f

Pierre Biava nobody at users.sourceforge.net
Sun Apr 17 12:39:03 CEST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".

The branch, master has been updated
       via  ca8644fe653c06a9ce9cbfd64a7aa2520c057fa0 (commit)
      from  5b2a3de65b76f667f16e046b5045801a354ec603 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ca8644fe653c06a9ce9cbfd64a7aa2520c057fa0
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Apr 17 12:31:08 2011 +0200

    removal of some global variables and functions homogenization

-----------------------------------------------------------------------

Changes:
diff --git a/src/bet_config.c b/src/bet_config.c
index 9c58927..4391a9a 100644
--- a/src/bet_config.c
+++ b/src/bet_config.c
@@ -87,7 +87,6 @@ static void bet_config_initialise_select_historical_data ( gint account_number,
 extern GtkWidget *account_page;
 extern GtkTreeModel *bet_fyear_model;
 extern GtkTreeModel *bet_fyear_model_filter;
-extern GtkWidget *notebook_general;
 /*END_EXTERN*/
 
 static gchar* bet_duration_array[] = {
diff --git a/src/bet_data.c b/src/bet_data.c
index 7704805..2f083af 100644
--- a/src/bet_data.c
+++ b/src/bet_data.c
@@ -72,7 +72,6 @@ static SH *struct_initialise_bet_historical ( void );
 
 /*START_EXTERN*/
 extern GtkWidget *account_page;
-extern GtkWidget *notebook_general;
 extern gsb_real null_real;
 /*END_EXTERN*/
 
diff --git a/src/bet_hist.c b/src/bet_hist.c
index 201d972..4a0a572 100644
--- a/src/bet_hist.c
+++ b/src/bet_hist.c
@@ -105,7 +105,6 @@ static gboolean bet_historical_set_full_sub_div ( GtkTreeModel *model, GtkTreeIt
 extern GtkWidget *account_page;
 extern GdkColor couleur_fond[2];
 extern GdkColor couleur_selection;
-extern GtkWidget *notebook_general;
 extern gsb_real null_real;
 /*END_EXTERN*/
 
diff --git a/src/bet_tab.c b/src/bet_tab.c
index dbcaa46..aeb2230 100644
--- a/src/bet_tab.c
+++ b/src/bet_tab.c
@@ -155,7 +155,6 @@ extern GdkColor couleur_bet_solde;
 extern GdkColor couleur_bet_transfert;
 extern GdkColor couleur_fond[2];
 extern gint mise_a_jour_liste_echeances_auto_accueil;
-extern GtkWidget *notebook_general;
 extern gsb_real null_real;
 extern const gdouble prev_month_max;
 extern gint valeur_echelle_recherche_date_import;
diff --git a/src/etats_calculs.c b/src/etats_calculs.c
index 0dde5c0..47eff39 100644
--- a/src/etats_calculs.c
+++ b/src/etats_calculs.c
@@ -127,7 +127,6 @@ extern const gchar *nom_ib_en_cours;
 extern const gchar *nom_ss_categ_en_cours;
 extern const gchar *nom_ss_ib_en_cours;
 extern const gchar *nom_tiers_en_cours;
-extern GtkWidget *notebook_general;
 extern gsb_real null_real;
 /*END_EXTERN*/
 
diff --git a/src/etats_config.c b/src/etats_config.c
index 344d995..71d8f4f 100644
--- a/src/etats_config.c
+++ b/src/etats_config.c
@@ -375,7 +375,6 @@ static GtkTreeIter parent_iter;
 extern GtkWidget * navigation_tree_view;
 extern GtkWidget *notebook_config_etat;
 extern GtkWidget *notebook_etats;
-extern GtkWidget *notebook_general;
 /*END_EXTERN*/
 
 
@@ -387,6 +386,7 @@ extern GtkWidget *notebook_general;
 void personnalisation_etat (void)
 {
     GtkWidget * dialog, *sw, *paned;
+    GtkWidget *notebook_general;
     GtkCTreeNode *parent;
     GSList *list_tmp;
     gint current_report_number, page = 0;
@@ -398,9 +398,9 @@ void personnalisation_etat (void)
     if ( !(current_report_number = gsb_gui_navigation_get_current_report()))
 	return;
 
-    if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
-	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general),
-				GSB_REPORTS_PAGE );
+    notebook_general = gsb_gui_get_general_notebook ( );
+    if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general ) ) != GSB_REPORTS_PAGE )
+        gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
 
     dialog = gtk_dialog_new_with_buttons ( _("Report properties"),
 					   GTK_WINDOW ( run.window ),
diff --git a/src/etats_onglet.c b/src/etats_onglet.c
index 3326805..683c255 100644
--- a/src/etats_onglet.c
+++ b/src/etats_onglet.c
@@ -85,7 +85,6 @@ static GtkWidget *reports_toolbar = NULL;
 /*START_EXTERN*/
 extern struct struct_etat_affichage csv_affichage;
 extern struct struct_etat_affichage html_affichage;
-extern GtkWidget *notebook_general;
 /*END_EXTERN*/
 
 /** Different formats supported.  */
@@ -238,8 +237,9 @@ gboolean ajout_etat ( void )
     gint report_number, amount_comparison_number, resultat;
     GtkWidget *dialog, *frame, *combobox, *label_description;
     GtkWidget *scrolled_window;
+    GtkWidget *notebook_general;
 
-
+    notebook_general = gsb_gui_get_general_notebook ( );
     if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general ) ) != GSB_REPORTS_PAGE )
 	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), GSB_REPORTS_PAGE );
 
@@ -923,15 +923,16 @@ void change_choix_nouvel_etat ( GtkWidget *combobox, GtkWidget *label_descriptio
 void efface_etat ( void )
 {
     gint current_report_number;
+    GtkWidget *notebook_general;
 
     current_report_number = gsb_gui_navigation_get_current_report ();
 
     if ( !current_report_number )
 	return;
 
-     if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
-	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general),
-				GSB_REPORTS_PAGE );
+    notebook_general = gsb_gui_get_general_notebook ( );
+    if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
+        gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
 
    if ( !question_yes_no_hint ( g_strdup_printf (_("Delete report \"%s\"?"),
 						  gsb_data_report_get_report_name (current_report_number) ),
@@ -1009,8 +1010,11 @@ void gsb_gui_update_gui_to_report ( gint report_number )
  */
 void export_etat_courant_vers_html ( gchar * filename )
 {
+    GtkWidget *notebook_general;
+
+    notebook_general = gsb_gui_get_general_notebook ( );
     if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
-	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
+        gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
 
     affichage_etat ( gsb_gui_navigation_get_current_report (), &html_affichage, filename );
 }
@@ -1025,8 +1029,11 @@ void export_etat_courant_vers_html ( gchar * filename )
  */
 void export_etat_courant_vers_csv ( gchar * filename )
 {
+    GtkWidget *notebook_general;
+
+    notebook_general = gsb_gui_get_general_notebook ( );
     if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
-	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
+        gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
 
     affichage_etat ( gsb_gui_navigation_get_current_report (), &csv_affichage, filename );
 }
@@ -1091,11 +1098,13 @@ void exporter_etat ( void )
     GtkWidget *fenetre_nom, *hbox, * combo;
     gint resultat, current_report_number;
     gchar * nom_etat;
+    GtkWidget *notebook_general;
 
     current_report_number = gsb_gui_navigation_get_current_report ();
 
+    notebook_general = gsb_gui_get_general_notebook ( );
     if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
-	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
+        gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
 
     fenetre_nom = gtk_file_chooser_dialog_new ( _("Export report"),
 					   GTK_WINDOW ( run.window ),
@@ -1174,10 +1183,12 @@ void exporter_etat ( void )
 void importer_etat ( void )
 {
     GtkWidget *fenetre_nom;
+    GtkWidget *notebook_general;
     gint resultat;
     gchar *nom_etat;
     GtkFileFilter * filter;
 
+    notebook_general = gsb_gui_get_general_notebook ( );
     if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
 	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
 
@@ -1232,11 +1243,13 @@ void importer_etat ( void )
 void dupliquer_etat ( void )
 {
     gint report_number, current_report_number;
+    GtkWidget *notebook_general;
 
     current_report_number = gsb_gui_navigation_get_current_report ();
 
+    notebook_general = gsb_gui_get_general_notebook ( );
     if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
-	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
+        gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
 
     report_number = gsb_data_report_dup (current_report_number);
 
diff --git a/src/fenetre_principale.c b/src/fenetre_principale.c
index 965b416..6eb8949 100644
--- a/src/fenetre_principale.c
+++ b/src/fenetre_principale.c
@@ -52,8 +52,8 @@
 /*END_INCLUDE*/
 
 /*START_STATIC*/
-static GtkWidget *create_main_notebook (void );
-static gboolean gsb_gui_fill_main_notebook ( GtkWidget *notebook );
+static GtkWidget *gsb_gui_create_general_notebook (void );
+static gboolean gsb_gui_fill_general_notebook ( GtkWidget *notebook );
 static void gsb_gui_headings_private_update_label_markup ( GtkLabel *label,
                         const gchar *text,
                         gboolean escape_text );
@@ -65,14 +65,14 @@ static gboolean on_simpleclick_event_run ( GtkWidget * button, GdkEvent * button
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern gint mini_paned_width;
 /*END_EXTERN*/
 
 
-/* adr du notebook de base */
-GtkWidget *notebook_general = NULL;
-GtkWidget *main_hpaned = NULL;
-GtkWidget *main_vbox = NULL;
+/* données des widgets généraux */
+static GtkWidget *vbox_general = NULL;
+static GtkWidget *hpaned_general = NULL;
+static GtkWidget *notebook_general = NULL;
+static gint hpaned_left_width;
 
 /** Notebook of the account pane. */
 GtkWidget *account_page = NULL;
@@ -91,14 +91,14 @@ static GtkWidget * headings_suffix = NULL;
  *
  * \return A newly-allocated vbox holding all elements.
  */
-GtkWidget * create_main_widget ( void )
+GtkWidget *gsb_gui_create_general_widgets ( void )
 {
     GtkWidget * hbox, * arrow_eb, * arrow_left, * arrow_right;
     GtkStyle * style;
 
     /* All stuff will be put in a huge vbox, with an hbox containing
      * quick summary. */
-    main_vbox = gtk_vbox_new ( FALSE, 0 );
+    vbox_general = gtk_vbox_new ( FALSE, 0 );
 
     headings_eb = gtk_event_box_new ();
     style = gtk_widget_get_style ( headings_eb );
@@ -137,38 +137,39 @@ GtkWidget * create_main_widget ( void )
     gtk_widget_modify_bg ( headings_eb, 0, &(style -> bg[GTK_STATE_ACTIVE]) );
     gtk_container_set_border_width ( GTK_CONTAINER ( hbox ), 6 );
 
-    gtk_box_pack_start ( GTK_BOX(main_vbox), headings_eb, FALSE, FALSE, 0 );
+    gtk_box_pack_start ( GTK_BOX( vbox_general ), headings_eb, FALSE, FALSE, 0 );
     gsb_gui_update_show_headings ();
 
     /* Then create and fill the main hpaned. */
-    main_hpaned = gtk_hpaned_new ();
-    g_signal_connect ( G_OBJECT ( main_hpaned ),
+    hpaned_general = gtk_hpaned_new ();
+    g_signal_connect ( G_OBJECT ( hpaned_general ),
 		       "size_allocate",
 		       G_CALLBACK ( gsb_gui_hpaned_size_allocate ),
 		       NULL );
-    gtk_box_pack_start ( GTK_BOX(main_vbox), main_hpaned, TRUE, TRUE, 0 );
-    gtk_paned_add1 ( GTK_PANED( main_hpaned ), create_navigation_pane ( ) );
-    gtk_paned_add2 ( GTK_PANED( main_hpaned ), create_main_notebook ( ) );
-    gtk_container_set_border_width ( GTK_CONTAINER ( main_hpaned ), 6 );
-    if ( conf.largeur_colonne_comptes_operation )
+    gtk_box_pack_start ( GTK_BOX ( vbox_general ), hpaned_general, TRUE, TRUE, 0 );
+    gtk_paned_add1 ( GTK_PANED ( hpaned_general ), gsb_gui_navigation_create_navigation_pane ( ) );
+    gtk_paned_add2 ( GTK_PANED ( hpaned_general ), gsb_gui_create_general_notebook ( ) );
+    gtk_container_set_border_width ( GTK_CONTAINER ( hpaned_general ), 6 );
+    if ( hpaned_left_width == -1 )
     {
-	gtk_paned_set_position ( GTK_PANED ( main_hpaned ),
-                        conf.largeur_colonne_comptes_operation );
+        gint width, height;
+
+        gtk_window_get_size ( GTK_WINDOW ( run.window ), &width, &height );
+        gtk_paned_set_position ( GTK_PANED ( hpaned_general ), (gint) width / 4 );
     }
     else
     {
-	gint width, height;
-
-	gtk_window_get_size ( GTK_WINDOW ( run.window ), &width, &height );
-    if ( height < mini_paned_width )
-        height = mini_paned_width;
-	gtk_paned_set_position ( GTK_PANED ( main_hpaned ), (gint) width / 4 );
+        if ( hpaned_left_width )
+            gtk_paned_set_position ( GTK_PANED ( hpaned_general ), hpaned_left_width );
+        else
+            gtk_paned_set_position ( GTK_PANED ( hpaned_general ), 1 );
     }
-    gtk_widget_show ( main_hpaned );
 
-    gtk_widget_show ( main_vbox );
+    gtk_widget_show ( hpaned_general );
 
-    return main_vbox;
+    gtk_widget_show ( vbox_general );
+
+    return vbox_general;
 }
 
 
@@ -181,7 +182,7 @@ GtkWidget * create_main_widget ( void )
  *
  * \return the notebook
  */
-GtkWidget *create_main_notebook (void )
+GtkWidget *gsb_gui_create_general_notebook (void )
 {
     GtkWidget * vbox, * form;
 
@@ -205,7 +206,7 @@ GtkWidget *create_main_notebook (void )
     gtk_widget_hide ( form );
 
     /* fill the notebook */
-    gsb_gui_fill_main_notebook ( notebook_general );
+    gsb_gui_fill_general_notebook ( notebook_general );
 
     gtk_widget_show ( vbox );
 
@@ -214,13 +215,23 @@ GtkWidget *create_main_notebook (void )
 
 
 /**
+ *
+ *
+ */
+GtkWidget *gsb_gui_get_general_notebook (void )
+{
+    return notebook_general;
+}
+
+
+/**
  * fill the notebook given in param
  *
  * \param notebook a notebook (usually the main_notebook...)
  *
  * \return FALSE
  * */
-gboolean gsb_gui_fill_main_notebook ( GtkWidget *notebook )
+gboolean gsb_gui_fill_general_notebook ( GtkWidget *notebook )
 {
     /* append the main page */
     gtk_notebook_append_page ( GTK_NOTEBOOK ( notebook ),
@@ -467,21 +478,84 @@ gboolean on_simpleclick_event_run ( GtkWidget * button, GdkEvent * button_event,
 }
 
 
+/**
+ *
+ *
+ *
+ */
 gboolean gsb_gui_hpaned_size_allocate ( GtkWidget *hpaned,
                         GtkAllocation *allocation,
                         gpointer null )
 {
-    gint paned_width;
-
-    paned_width = gtk_paned_get_position ( GTK_PANED ( hpaned ) );
+    hpaned_left_width = gtk_paned_get_position ( GTK_PANED ( hpaned ) );
     
-    if ( paned_width  < mini_paned_width )
-        gtk_paned_set_position ( GTK_PANED ( hpaned ), mini_paned_width );
-
     return FALSE;
 }
 
 
+/**
+ * initialise notebook_general, hpaned_general et vbox_general
+ *
+ *
+ */
+void gsb_gui_init_general_vbox ( void )
+{
+    if ( vbox_general )
+    {
+        gtk_widget_destroy ( vbox_general );
+        vbox_general = NULL;
+    }
+}
+
+
+/**
+ * initialise notebook_general, hpaned_general et vbox_general
+ *
+ *
+ */
+void gsb_gui_init_general_notebook ( void )
+{
+        notebook_general = NULL;
+}
+
+
+/**
+ * test l'existence de hpaned_general
+ *
+ *
+ */
+gboolean gsb_gui_is_hpaned_general ( void )
+{
+    if ( hpaned_general && GTK_IS_WIDGET ( hpaned_general ) )
+        return TRUE;
+    else
+        return FALSE;
+}
+
+
+/**
+ * renvoie la largeur de la partie gauche du hpaned
+ *
+ *
+ */
+gint gsb_gui_get_hpaned_left_width ( void )
+{
+    return hpaned_left_width;
+}
+
+
+/**
+ * fixe la largeur de la partie gauche du hpaned
+ *
+ *
+ */
+gboolean gsb_gui_set_hpaned_left_width ( gint width )
+{
+    hpaned_left_width = width;
+
+    return TRUE;
+}
+
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/fenetre_principale.h b/src/fenetre_principale.h
index c9d5e2a..8398f6d 100644
--- a/src/fenetre_principale.h
+++ b/src/fenetre_principale.h
@@ -29,9 +29,14 @@ typedef enum GSB_ACCOUNT_NOTEBOOK_PAGES {
 
 
 /* START_DECLARATION */
-GtkWidget * create_main_widget ( void );
+GtkWidget *gsb_gui_create_general_widgets ( void );
+GtkWidget *gsb_gui_get_general_notebook (void );
 void gsb_gui_headings_update_suffix ( gchar * suffix );
 void gsb_gui_headings_update_title ( gchar * title );
+void gsb_gui_init_general_notebook ( void );
+void gsb_gui_init_general_vbox ( void );
+gint gsb_gui_get_hpaned_left_width ( void );
+gboolean gsb_gui_is_hpaned_general ( void );
 void gsb_gui_notebook_change_page ( GsbGeneralNotebookPages page );
 void gsb_gui_on_account_change_page ( GsbaccountNotebookPages page );
 gboolean gsb_gui_on_account_switch_page ( GtkNotebook *notebook,
@@ -39,6 +44,7 @@ gboolean gsb_gui_on_account_switch_page ( GtkNotebook *notebook,
                         guint page_number,
                         gpointer null );
 void gsb_gui_sensitive_headings ( gboolean sensitive );
+gboolean gsb_gui_set_hpaned_left_width ( gint width );
 gboolean gsb_gui_update_show_headings ();
 /*END_DECLARATION*/
 
diff --git a/src/gsb_account.c b/src/gsb_account.c
index f822607..42d4b09 100644
--- a/src/gsb_account.c
+++ b/src/gsb_account.c
@@ -67,7 +67,6 @@ extern gint mise_a_jour_fin_comptes_passifs;
 extern gint mise_a_jour_liste_comptes_accueil;
 extern gint mise_a_jour_liste_echeances_manuelles_accueil;
 extern gint mise_a_jour_soldes_minimaux;
-extern GtkWidget *notebook_general;
 /*END_EXTERN*/
 
 
@@ -90,8 +89,9 @@ gboolean gsb_account_new ( kind_account account_type,
                gchar *name_icon )
 {
     gint account_number;
+    GtkWidget *notebook_general;
 
-    /*     create the new account */ 
+    /*     create the new account */
     account_number = gsb_data_account_new (account_type);
     if ( account_number == -1 )
     {
@@ -117,21 +117,22 @@ gboolean gsb_account_new ( kind_account account_type,
 								 gsb_data_currency_get_floating_point (currency_number) ) );
     gsb_data_account_set_name (account_number, name);
 
-    /* update the combofix for categ */ 
+    /* update the combofix for categ */
     gsb_category_update_combofix ( FALSE );
 
     /* update the name of accounts in form */
     gsb_account_update_combo_list ( gsb_form_scheduler_get_element_widget (SCHEDULED_FORM_ACCOUNT),
 				    FALSE );
 
-    /* update the main page */ 
+    /* update the main page */
     mise_a_jour_liste_comptes_accueil = 1;
 
-    /* update the accounts lists */ 
+    /* update the accounts lists */
     gsb_menu_update_accounts_in_menus (); 
 
-    /* do the next part only if the widgets are created 
+    /* do the next part only if the widgets are created
      * (can come here at the end of the new file assistant...) */
+    notebook_general = gsb_gui_get_general_notebook ( );
     if (notebook_general)
     {
         /* Add an entry in navigation pane. */
@@ -252,9 +253,11 @@ gboolean gsb_account_delete ( void )
 
     if ( gsb_gui_navigation_get_current_account () == deleted_account )
     {
-	/* update the transaction list */
+        GtkWidget *notebook_general;
 
-	page_number = gtk_notebook_get_current_page (GTK_NOTEBOOK(notebook_general));
+	/* update the transaction list */
+    notebook_general = gsb_gui_get_general_notebook ( );
+	page_number = gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general ) );
 
 	navigation_change_account ( GINT_TO_POINTER ( gsb_data_account_first_number () ));
 
diff --git a/src/gsb_file.c b/src/gsb_file.c
index 85f16d5..c08a277 100644
--- a/src/gsb_file.c
+++ b/src/gsb_file.c
@@ -94,13 +94,10 @@ gint id_timeout = 0;
 
 /*START_EXTERN*/
 extern gchar *copy_old_filename;
-extern GtkWidget *main_hpaned;
-extern GtkWidget *main_vbox;
 extern GtkWidget * navigation_tree_view;
 extern gsize nb_derniers_fichiers_ouverts;
 extern gint nb_max_derniers_fichiers_ouverts;
 extern gchar *nom_fichier_comptes;
-extern GtkWidget *notebook_general;
 extern gchar **tab_noms_derniers_fichiers_ouverts;
 extern GtkWidget *table_etat;
 extern gchar *titre_fichier;
@@ -168,8 +165,9 @@ gboolean gsb_file_new_finish ( void )
  */
 void gsb_file_new_gui ( void )
 {
-    GtkWidget *window_vbox_principale;
-    GtkWidget * tree_view_widget;
+    GtkWidget *main_vbox;
+    GtkWidget *tree_view_widget;
+    GtkWidget *notebook_general;
 
     /* dégrise les menus nécessaire */
     menus_sensitifs ( TRUE );
@@ -178,9 +176,9 @@ void gsb_file_new_gui ( void )
     recuperation_noms_colonnes_et_tips ();
 
     /* Create main widget. */
-    gsb_status_message ( _("Creating main window"));
-    window_vbox_principale = g_object_get_data ( G_OBJECT ( run.window ), "window_vbox_principale" );
-    gtk_box_pack_start ( GTK_BOX ( window_vbox_principale), create_main_widget(), TRUE, TRUE, 0 );
+    gsb_status_message ( _("Creating main window") );
+    main_vbox = g_object_get_data ( G_OBJECT ( run.window ), "main_vbox" );
+    gtk_box_pack_start ( GTK_BOX ( main_vbox ), gsb_gui_create_general_widgets ( ), TRUE, TRUE, 0 );
 
     /* create the model */
     if (!transaction_list_create ())
@@ -204,6 +202,7 @@ void gsb_file_new_gui ( void )
     /* Display accounts in menus */
     gsb_menu_update_accounts_in_menus ();
 
+    notebook_general = gsb_gui_get_general_notebook ( );
     gtk_notebook_set_current_page ( GTK_NOTEBOOK( notebook_general ), GSB_HOME_PAGE );
 
     gtk_widget_show ( notebook_general );
@@ -972,8 +971,7 @@ gboolean gsb_file_close ( void )
 		 &&
 		 nom_fichier_comptes )
 		gsb_file_util_modify_lock ( FALSE );
-
-	    gtk_widget_destroy (main_vbox);
+        gsb_gui_init_general_vbox ( );
 
 	    /* free all the variables */
  	    init_variables ();
@@ -983,8 +981,7 @@ gboolean gsb_file_close ( void )
 
 	    menus_sensitifs ( FALSE );
 
-	    main_hpaned = NULL;
-	    table_etat = NULL;
+        table_etat = NULL;
 
 	    return ( TRUE );
 
diff --git a/src/gsb_file_config.c b/src/gsb_file_config.c
index f7ae2a8..b397e30 100644
--- a/src/gsb_file_config.c
+++ b/src/gsb_file_config.c
@@ -40,6 +40,7 @@
 /*START_INCLUDE*/
 #include "gsb_file_config.h"
 #include "dialog.h"
+#include "fenetre_principale.h"
 #include "gsb_dirs.h"
 #include "gsb_file.h"
 #include "main.h"
@@ -66,7 +67,6 @@ static void gsb_file_config_remove_old_config_file ( gchar *filename );
 /*START_EXTERN*/
 extern struct conditional_message delete_msg[];
 extern gboolean execute_scheduled_of_month;
-extern GtkWidget *main_hpaned;
 extern struct conditional_message messages[];
 extern gint nb_days_before_scheduled;
 extern gchar *nom_fichier_comptes;
@@ -75,8 +75,6 @@ extern gchar *nom_fichier_comptes;
 /* global variable, see structures.h */
 struct gsb_conf_t conf;
 
-gint mini_paned_width = 0;
-
 /* contient le nb de derniers fichiers ouverts */
 gsize nb_derniers_fichiers_ouverts = 0;
 
@@ -213,12 +211,11 @@ devel_debug (NULL);
                         "Full screen",
                         NULL );
 
-    conf.largeur_colonne_comptes_operation = g_key_file_get_integer ( config,
+    int_ret = g_key_file_get_integer ( config,
                         "Geometry",
-                        "Panel width",
+                        "Panel_width",
                         NULL );
-    if ( conf.largeur_colonne_comptes_operation < mini_paned_width )
-        conf.largeur_colonne_comptes_operation = mini_paned_width;
+    gsb_gui_set_hpaned_left_width ( int_ret );
 
     conf.prefs_width = g_key_file_get_integer ( config,
                         "Geometry",
@@ -516,6 +513,7 @@ gboolean gsb_file_config_save_config ( void )
     gsize length;
     FILE *conf_file;
     gint i;
+    gint tmp_int = 0;
     
     devel_debug (NULL);
 
@@ -571,13 +569,12 @@ gboolean gsb_file_config_save_config ( void )
                         conf.prefs_width );
 
     /* Remember size of main panel */
-    if (main_hpaned && GTK_IS_WIDGET (main_hpaned))
-        conf.largeur_colonne_comptes_operation = gtk_paned_get_position (
-                        GTK_PANED ( main_hpaned ) );
+    if ( gsb_gui_is_hpaned_general ( ) )
+        tmp_int = gsb_gui_get_hpaned_left_width ( );
     g_key_file_set_integer ( config,
                         "Geometry",
-                        "Panel width",
-                        conf.largeur_colonne_comptes_operation );
+                        "Panel_width",
+                        tmp_int );
 
     /* save general */
     g_key_file_set_integer ( config,
@@ -1050,13 +1047,6 @@ void gsb_file_config_get_xml_text_element ( GMarkupParseContext *context,
     }
  
     if ( !strcmp ( element_name,
-		   "Largeur_colonne_comptes_operation" ))
-    {
-	conf.largeur_colonne_comptes_operation = utils_str_atoi (text);
-	return;
-    }
-
-    if ( !strcmp ( element_name,
 		   "Largeur_colonne_echeancier" ))
     {
 	etat.largeur_colonne_echeancier = utils_str_atoi (text);
@@ -1215,7 +1205,7 @@ void gsb_file_config_clean_config ( void )
 
     conf.main_width = 0;
     conf.main_height = 0;
-    conf.largeur_colonne_comptes_operation = mini_paned_width;
+    gsb_gui_set_hpaned_left_width ( -1 );
     conf.prefs_width = 600;
 
     conf.force_enregistrement = 1;
diff --git a/src/gsb_transactions_list.c b/src/gsb_transactions_list.c
index 1895a42..b1f5b01 100644
--- a/src/gsb_transactions_list.c
+++ b/src/gsb_transactions_list.c
@@ -176,7 +176,6 @@ extern gint mise_a_jour_liste_comptes_accueil;
 extern gint mise_a_jour_liste_echeances_auto_accueil;
 extern gint mise_a_jour_soldes_minimaux;
 extern GtkWidget * navigation_tree_view;
-extern GtkWidget *notebook_general;
 extern GtkWidget *reconcile_sort_list_button;
 extern gint tab_affichage_ope[TRANSACTION_LIST_ROWS_NB][CUSTOM_MODEL_VISIBLE_COLUMNS];
 /*END_EXTERN*/
@@ -2432,7 +2431,7 @@ gboolean new_transaction ()
 	if ( gsb_gui_navigation_get_current_account ( ) == -1 )
 		return FALSE;
 
-    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
+    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( gsb_gui_get_general_notebook ( ) ), 1 );
     gsb_form_escape_form();
     gsb_form_show (TRUE);
     transaction_list_select ( -1 );
@@ -2452,7 +2451,7 @@ void remove_transaction ()
 
     gsb_transactions_list_delete_transaction (gsb_data_account_get_current_transaction_number (gsb_gui_navigation_get_current_account ()),
 					      TRUE );
-    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
+    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( gsb_gui_get_general_notebook ( ) ), 1 );
 }
 
 
@@ -2480,7 +2479,7 @@ gboolean clone_selected_transaction ( GtkWidget *menu_item,
 
     update_transaction_in_trees (new_transaction_number);
 
-    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
+    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( gsb_gui_get_general_notebook ( ) ), 1 );
 
     /* force the update module budget */
     gsb_data_account_set_bet_maj ( gsb_gui_navigation_get_current_account ( ), BET_MAJ_ALL );
@@ -2628,7 +2627,7 @@ gboolean move_selected_operation_to_account ( GtkMenuItem * menu_item,
     if ( gsb_transactions_list_move_transaction_to_account ( gsb_data_account_get_current_transaction_number (source_account),
 							     target_account ))
     {
-	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
+	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( gsb_gui_get_general_notebook ( ) ), 1 );
 
 	update_transaction_in_trees (gsb_data_account_get_current_transaction_number (source_account));
 
@@ -2662,7 +2661,7 @@ void move_selected_operation_to_account_nb ( gint *account )
     if ( gsb_transactions_list_move_transaction_to_account ( gsb_data_account_get_current_transaction_number (source_account),
 							     target_account ))
     {
-	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
+	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( gsb_gui_get_general_notebook ( ) ), 1 );
 
 	update_transaction_in_trees ( gsb_data_account_get_current_transaction_number (
                         source_account ) ) ;
diff --git a/src/main.c b/src/main.c
index 06de888..15aa949 100644
--- a/src/main.c
+++ b/src/main.c
@@ -40,6 +40,7 @@
 #include "dialog.h"
 #include "gsb_assistant_first.h"
 #include "gsb_data_account.h"
+#include "gsb_dirs.h"
 #include "gsb_file.h"
 #include "gsb_file_config.h"
 #include "gsb_plugins.h"
@@ -52,7 +53,6 @@
 #include "traitement_variables.h"
 #include "utils.h"
 #include "erreur.h"
-#include "gsb_dirs.h"
 /*END_INCLUDE*/
 
 #ifdef GTKOSXAPPLICATION
@@ -90,7 +90,7 @@ static gboolean gsb_grisbi_change_state_window ( GtkWidget *window,
                         GdkEventWindowState *event,
                         gpointer null );
 static GtkWidget *gsb_grisbi_create_main_menu ( GtkWidget *vbox );
-static GtkWidget *gsb_grisbi_create_top_window ( void );
+static GtkWidget *gsb_main_create_main_window ( void );
 static gboolean gsb_grisbi_init_app ( void );
 static void gsb_grisbi_load_file_if_necessary ( cmdline_options *opt );
 static gboolean gsb_grisbi_print_environment_var ( void );
@@ -101,12 +101,11 @@ static void main_win_32 (  int argc, char **argv );
 static gboolean main_window_delete_event (GtkWidget *window, gpointer data);
 static void main_window_destroy_event ( GObject* obj, gpointer data);
 static void main_window_set_size_and_position ( void );
-static void gsb_main_struct_run_free ( void );
-static void gsb_main_struct_run_init ( void );
+static void gsb_main_init_main_window ( void );
 /*END_STATIC*/
 
 /* Fenetre principale de grisbi */
-/* G_MODULE_EXPORT GtkWidget *window = NULL;  */
+static GtkWidget *main_window = NULL;
 
 /*START_EXTERN*/
 extern gchar *nom_fichier_comptes;
@@ -134,7 +133,7 @@ int main ( int argc, char **argv )
     g_mem_set_vtable(glib_mem_profiler_table);
 #endif
 
-    gsb_main_struct_run_init ( );
+    gsb_main_init_main_window ( );
     gsb_dirs_init ( );
 
 #ifdef _WIN32
@@ -192,11 +191,11 @@ void main_linux ( int argc, char **argv )
     first_use = gsb_grisbi_init_app ( );
 
     /* create the toplevel window and the main menu */
-    vbox = gsb_grisbi_create_top_window ( );
+    vbox = gsb_main_create_main_window ( );
     gsb_grisbi_create_main_menu ( vbox );
     main_window_set_size_and_position ( );
 
-    gtk_widget_show ( run.window );
+    gtk_widget_show ( main_window );
 
 #if IS_DEVELOPMENT_VERSION == 1
     dialog_message ( "development-version", VERSION );
@@ -262,7 +261,7 @@ void main_mac_osx ( int argc, char **argv )
     /* initialise les données de l'application */
     first_use = gsb_grisbi_init_app ( );
 
-    vbox = gsb_grisbi_create_top_window ( );
+    vbox = gsb_main_create_main_window ( );
     {
         gboolean falseval = FALSE;
         gboolean trueval = TRUE;
@@ -277,7 +276,7 @@ void main_mac_osx ( int argc, char **argv )
                         &falseval);
         g_signal_connect ( theApp,
                         "NSApplicationBlockTermination",
-                        G_CALLBACK ( gsb_grisbi_close ),
+                        G_CALLBACK ( gsb_main_grisbi_close ),
                         NULL);
         g_signal_connect ( theApp,
                         "NSApplicationWillTerminate",
@@ -285,10 +284,10 @@ void main_mac_osx ( int argc, char **argv )
                         NULL );
     }
     menubar = gsb_grisbi_create_main_menu ( vbox );
-    grisbi_osx_init_menus ( run.window, menubar );
+    grisbi_osx_init_menus ( main_window, menubar );
     main_window_set_size_and_position ( );
 
-    gtk_widget_show ( run.window );
+    gtk_widget_show ( main_window );
 
 #if IS_DEVELOPMENT_VERSION == 1
     dialog_message ( "development-version", VERSION );
@@ -367,11 +366,11 @@ void main_win_32 (  int argc, char **argv )
     first_use = gsb_grisbi_init_app ( );
 
     /* create the toplevel window and the main menu */
-    vbox = gsb_grisbi_create_top_window ( );
+    vbox = gsb_main_create_main_window ( );
     gsb_grisbi_create_main_menu ( vbox );
     main_window_set_size_and_position ( );
 
-    gtk_widget_show ( run.window );
+    gtk_widget_show ( main_window );
 
 #if IS_DEVELOPMENT_VERSION == 1
     dialog_message ( "development-version", VERSION );
@@ -465,31 +464,33 @@ gboolean gsb_grisbi_init_app ( void )
  *
  *
  * */
-GtkWidget *gsb_grisbi_create_top_window ( void )
+GtkWidget *gsb_main_create_main_window ( void )
 {
     GtkWidget *vbox;
-    GtkWidget *statusbar;
+    GtkWidget *status_bar;
 
     /* create the toplevel window */
-    run.window = gtk_window_new ( GTK_WINDOW_TOPLEVEL );
-    g_signal_connect ( G_OBJECT ( run.window ),
+    main_window = gtk_window_new ( GTK_WINDOW_TOPLEVEL );
+    run.window = main_window;
+
+    g_signal_connect ( G_OBJECT ( main_window ),
                         "delete_event",
                         G_CALLBACK ( main_window_delete_event ),
                         NULL);
-    g_signal_connect ( G_OBJECT ( run.window ),
+    g_signal_connect ( G_OBJECT ( main_window ),
                         "destroy",
                         G_CALLBACK ( main_window_destroy_event ),
                         NULL);
-    g_signal_connect ( G_OBJECT ( run.window ),
+    g_signal_connect ( G_OBJECT ( main_window ),
                         "window-state-event",
                         G_CALLBACK (gsb_grisbi_change_state_window),
                         NULL );
-    gtk_window_set_policy ( GTK_WINDOW ( run.window ), TRUE, TRUE, FALSE );
+    gtk_window_set_policy ( GTK_WINDOW ( main_window ), TRUE, TRUE, FALSE );
 
     /* create the main window : a vbox */
     vbox = gtk_vbox_new ( FALSE, 0 );
-    g_object_set_data ( G_OBJECT ( run.window ), "window_vbox_principale", vbox );
-    gtk_container_add ( GTK_CONTAINER ( run.window ), vbox );
+    g_object_set_data ( G_OBJECT ( main_window ), "main_vbox", vbox );
+    gtk_container_add ( GTK_CONTAINER ( main_window ), vbox );
     g_signal_connect ( G_OBJECT ( vbox ),
                         "destroy",
                         G_CALLBACK ( gtk_widget_destroyed ),
@@ -497,8 +498,8 @@ GtkWidget *gsb_grisbi_create_top_window ( void )
     gtk_widget_show ( vbox );
 
     /* We create the statusbar first. */
-    statusbar = gsb_new_statusbar ( );
-    gtk_box_pack_end ( GTK_BOX ( vbox ), statusbar, FALSE, FALSE, 0 );
+    status_bar = gsb_new_statusbar ( );
+    gtk_box_pack_end ( GTK_BOX ( vbox ), status_bar, FALSE, FALSE, 0 );
 
     return vbox;
 }
@@ -511,10 +512,10 @@ GtkWidget *gsb_grisbi_create_top_window ( void )
  * */
 GtkWidget *gsb_grisbi_create_main_menu ( GtkWidget *vbox )
 {
-    GtkWidget *menubar;
+    GtkWidget *menu_bar;
 
     /* create the menus */
-    menubar = init_menus ( vbox );
+    menu_bar = init_menus ( vbox );
 
     /* unsensitive the necessaries menus */
     menus_sensitifs ( FALSE );
@@ -525,7 +526,7 @@ GtkWidget *gsb_grisbi_create_main_menu ( GtkWidget *vbox )
     /* set the last opened files */
     affiche_derniers_fichiers_ouverts ( );
 
-    return menubar;
+    return menu_bar;
 }
 
 /**
@@ -538,16 +539,16 @@ void main_window_set_size_and_position ( void )
 {
     /* set the size of the window */
     if ( conf.main_width && conf.main_height )
-        gtk_window_set_default_size ( GTK_WINDOW ( run.window ), conf.main_width, conf.main_height );
+        gtk_window_set_default_size ( GTK_WINDOW ( main_window ), conf.main_width, conf.main_height );
     else
-        gtk_window_set_default_size ( GTK_WINDOW ( run.window ), 900, 600 );
+        gtk_window_set_default_size ( GTK_WINDOW ( main_window ), 900, 600 );
 
     /* display window at position */
-    gtk_window_move ( GTK_WINDOW ( run.window ), conf.root_x, conf.root_y );
+    gtk_window_move ( GTK_WINDOW ( main_window ), conf.root_x, conf.root_y );
 
     /* set the full screen if necessary */
     if ( conf.full_screen )
-        gtk_window_maximize ( GTK_WINDOW ( run.window ) );
+        gtk_window_maximize ( GTK_WINDOW ( main_window ) );
 }
 
 
@@ -647,22 +648,19 @@ gboolean gsb_grisbi_change_state_window ( GtkWidget *window,
  *
  * \return FALSE
  * */
-gboolean gsb_grisbi_close ( void )
+gboolean gsb_main_grisbi_close ( void )
 {
     devel_debug (NULL);
     /* sauvegarde la position de la fenetre principale */
-    gtk_window_get_position ( GTK_WINDOW ( run.window ), &conf.root_x, &conf.root_y  );
+    gtk_window_get_position ( GTK_WINDOW ( main_window ), &conf.root_x, &conf.root_y  );
 
-    if ( !main_window_delete_event ( run.window, NULL ) )
-        gtk_widget_destroy ( run.window );
+    if ( !main_window_delete_event ( main_window, NULL ) )
+        gtk_widget_destroy ( main_window );
 
     /* clean finish of the debug file */
     if ( etat.debug_mode )
         gsb_debug_finish_log ( );
 
-    /* clean the run.xxxx vars */
-    gsb_main_struct_run_free ( );
-
     return FALSE;
 }
 
@@ -686,7 +684,7 @@ static gboolean main_window_delete_event (GtkWidget *window, gpointer data)
 static void main_window_destroy_event ( GObject* obj, gpointer data)
 {
     free_variables();
-    run.window = NULL;
+    main_window = NULL;
     gtk_main_quit();
 }
 
@@ -759,7 +757,7 @@ gboolean gsb_main_set_grisbi_title ( gint account_number )
             return_value = FALSE;
         }
     }
-    gtk_window_set_title ( GTK_WINDOW ( run.window ), titre_grisbi );
+    gtk_window_set_title ( GTK_WINDOW ( main_window ), titre_grisbi );
 
     gsb_main_page_update_homepage_title ( titre_grisbi );
 
@@ -853,25 +851,27 @@ gchar *gsb_main_get_print_dir_var ( void )
 
 
 /**
- * libère la mémoire de la structure run
+ * renvoie la fenêtre principale de Grisbi
  *
  *
  */
-void  gsb_main_struct_run_free ( void )
+GtkWidget *gsb_main_get_main_window ( void )
 {
-/*    g_free ( run.xxxx ); */
+    return main_window;
 }
 
 
 /**
- * initialise la structure run
+ * initialise la fenêtre principale de Grisbi
  *
  *
  */
-void gsb_main_struct_run_init ( void )
+void gsb_main_init_main_window ( void )
 {
-    run.window = NULL;
+    main_window = NULL;
 }
+
+
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/main.h b/src/main.h
index fee8b38..04d2ef2 100644
--- a/src/main.h
+++ b/src/main.h
@@ -2,15 +2,17 @@
 #define _MAIN_H (1)
 
 #include <glib.h>
+#include <gtk/gtk.h>
 
 /* START_INCLUDE_H */
 /* END_INCLUDE_H */
 
 /* START_DECLARATION */
-gboolean gsb_grisbi_close ( void );
+gboolean gsb_main_grisbi_close ( void );
 int main (int argc, char **argv);
 gchar *gsb_main_get_print_locale_var ( void );
 gchar *gsb_main_get_print_dir_var ( void );
+GtkWidget *gsb_main_get_main_window ( void );
 gboolean gsb_main_set_grisbi_title ( gint account_number );
 /* END_DECLARATION */
 #endif
diff --git a/src/menu.c b/src/menu.c
index 1b7e339..73ee133 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -210,7 +210,7 @@ GtkWidget *init_menus ( GtkWidget *vbox )
          G_CALLBACK ( gsb_file_close ) },
 	#endif
         {"QuitAction", GTK_STOCK_QUIT, _("_Quit"), NULL, NULL,
-         G_CALLBACK ( gsb_grisbi_close ) },
+         G_CALLBACK ( gsb_main_grisbi_close ) },
 
         /* Editmenu */
         {"EditMenuAction", NULL, _("_Edit"), NULL, NULL, NULL },
@@ -659,7 +659,7 @@ gboolean gsb_gui_toggle_show_closed_accounts ( void )
 {
     etat.show_closed_accounts = ! etat.show_closed_accounts;
 
-    create_account_list ( navigation_model );
+    gsb_gui_navigation_create_account_list ( navigation_model );
     gsb_gui_navigation_update_home_page ( );
 
     if ( etat.modification_fichier == 0 )
diff --git a/src/navigation.c b/src/navigation.c
index 8a2fc2a..a61dc01 100644
--- a/src/navigation.c
+++ b/src/navigation.c
@@ -110,7 +110,6 @@ extern GtkWidget *account_page;
 extern GtkWidget *label_last_statement;
 extern GtkWidget *menu_import_rules;
 extern gint mise_a_jour_liste_comptes_accueil;
-extern GtkWidget *notebook_general;
 /*END_EXTERN*/
 
 
@@ -138,7 +137,7 @@ static gint buffer_last_account = -1;
  *
  * \return The newly allocated pane.
  */
-GtkWidget * create_navigation_pane ( void )
+GtkWidget *gsb_gui_navigation_create_navigation_pane ( void )
 {
     GtkWidget * sw, *vbox;
     GdkPixbuf * pixbuf;
@@ -259,7 +258,7 @@ GtkWidget * create_navigation_pane ( void )
 		       NAVIGATION_REPORT, -1,
 		       NAVIGATION_SENSITIVE, 1,
 		       -1);
-    create_account_list ( GTK_TREE_MODEL(navigation_model) );
+    gsb_gui_navigation_create_account_list ( GTK_TREE_MODEL( navigation_model ) );
 
     /* Scheduler */
     tmpstr = g_build_filename( gsb_dirs_get_pixmaps_dir ( ), "scheduler.png", NULL );
@@ -516,7 +515,7 @@ gint gsb_gui_navigation_get_current_report ( void )
  * \param model		Tree model to insert items into.
  * \param account_iter	Parent iter.
  */
-void create_account_list ( GtkTreeModel * model )
+void gsb_gui_navigation_create_account_list ( GtkTreeModel * model )
 {
     GSList *list_tmp;
     GtkTreeIter parent, child;
@@ -1115,7 +1114,7 @@ gboolean gsb_gui_navigation_select_line ( GtkTreeSelection *selection,
     devel_debug (NULL);
 
     page_number = gsb_gui_navigation_get_current_page ();
-    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), page_number );
+    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( gsb_gui_get_general_notebook ( ) ), page_number );
 
     if ( page_number != GSB_ACCOUNT_PAGE )
     {
diff --git a/src/navigation.h b/src/navigation.h
index d0b7933..7498888 100644
--- a/src/navigation.h
+++ b/src/navigation.h
@@ -18,15 +18,17 @@ enum navigation_cols {
 
 
 /* START_DECLARATION */
-void create_account_list ( GtkTreeModel * model );
-GtkWidget * create_navigation_pane ( void );
 void gsb_gui_navigation_add_account ( gint account_number,
                         gboolean switch_to_account );
 void gsb_gui_navigation_add_report ( gint report_number );
+void gsb_gui_navigation_create_account_list ( GtkTreeModel *model );
+GtkWidget *gsb_gui_navigation_create_navigation_pane ( void );
 gint gsb_gui_navigation_get_current_account ( void );
 gint gsb_gui_navigation_get_current_page ( void );
 gint gsb_gui_navigation_get_current_report ( void );
 gint gsb_gui_navigation_get_last_account ( void );
+GQueue *gsb_gui_navigation_get_pages_list ( void );
+void gsb_gui_navigation_init_pages_list ( void );
 void gsb_gui_navigation_remove_account ( gint account_number );
 void gsb_gui_navigation_remove_report ( gint report_number );
 gboolean gsb_gui_navigation_select_next ();
diff --git a/src/structures.h b/src/structures.h
index 6c7a66c..b67973c 100644
--- a/src/structures.h
+++ b/src/structures.h
@@ -138,7 +138,6 @@ struct gsb_conf_t
     gint main_width;                                /* main_window width */
     gint main_height;                               /* main_window height */
     gint full_screen;                               /* 1 to full screen, 0 else */
-    gint largeur_colonne_comptes_operation;
     gint prefs_width;                               /* preferences width */
 
     /* general part */
diff --git a/src/tests/main_cunit.c b/src/tests/main_cunit.c
index 25208e7..fb476bb 100644
--- a/src/tests/main_cunit.c
+++ b/src/tests/main_cunit.c
@@ -53,7 +53,7 @@
 GtkWidget *window = NULL;
 struct gsb_run_t run;
 extern gchar *nom_fichier_comptes;
-gboolean gsb_grisbi_close( void )
+gboolean gsb_main_grisbi_close( void )
 {
 	return FALSE;
 }
diff --git a/src/traitement_variables.c b/src/traitement_variables.c
index de5c64a..fd036d9 100644
--- a/src/traitement_variables.c
+++ b/src/traitement_variables.c
@@ -230,7 +230,6 @@ extern GtkWidget * navigation_tree_view;
 extern gint no_devise_totaux_categ;
 extern gint no_devise_totaux_ib;
 extern gint no_devise_totaux_tiers;
-extern GtkWidget *notebook_general;
 extern GSList *orphan_child_transactions;
 extern gint scheduler_col_width[SCHEDULER_COL_VISIBLE_COLUMNS];
 extern gint scheduler_current_tree_view_width;
@@ -353,7 +352,7 @@ void init_variables ( void )
     /* the main notebook is set to NULL,
      * important because it's the checked variable in a new file
      * to know if the widgets are created or not */
-    notebook_general = NULL;
+    gsb_gui_init_general_notebook ( );
 
     if ( nom_fichier_comptes )
         g_free ( nom_fichier_comptes );


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list