[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9.0-130-g13bac59

Pierre Biava nobody at users.sourceforge.net
Sun Apr 17 16:07:21 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  13bac591896626c2521138b146a6798ce89f649c (commit)
      from  ca8644fe653c06a9ce9cbfd64a7aa2520c057fa0 (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 13bac591896626c2521138b146a6798ce89f649c
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Apr 17 16:05:13 2011 +0200

    removal of global variables: navigation_tree_view and navigation_model

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

Changes:
diff --git a/src/etats_config.c b/src/etats_config.c
index 71d8f4f..4cef5c4 100644
--- a/src/etats_config.c
+++ b/src/etats_config.c
@@ -372,7 +372,6 @@ static GtkTreeIter parent_iter;
 
 
 /*START_EXTERN*/
-extern GtkWidget * navigation_tree_view;
 extern GtkWidget *notebook_config_etat;
 extern GtkWidget *notebook_etats;
 /*END_EXTERN*/
@@ -1911,7 +1910,7 @@ void recuperation_info_perso_etat ( void )
     /* on repasse à la 1ère page du notebook */
     gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_etats ),
 			    0 );
-    gtk_widget_set_sensitive ( navigation_tree_view, TRUE );
+    gtk_widget_set_sensitive ( gsb_gui_get_navigation_tree_view ( ), TRUE );
 
     gsb_gui_navigation_update_report ( gsb_gui_navigation_get_current_report ());
 }
diff --git a/src/gsb_file.c b/src/gsb_file.c
index c08a277..9247c92 100644
--- a/src/gsb_file.c
+++ b/src/gsb_file.c
@@ -94,7 +94,6 @@ gint id_timeout = 0;
 
 /*START_EXTERN*/
 extern gchar *copy_old_filename;
-extern GtkWidget * navigation_tree_view;
 extern gsize nb_derniers_fichiers_ouverts;
 extern gint nb_max_derniers_fichiers_ouverts;
 extern gchar *nom_fichier_comptes;
@@ -492,7 +491,7 @@ gboolean gsb_file_open_file ( gchar *filename )
     gsb_gui_navigation_set_selection ( GSB_HOME_PAGE, -1, NULL );
 
     /* set the focus to the selection tree at left */
-    gtk_widget_grab_focus (navigation_tree_view);
+    gtk_widget_grab_focus ( gsb_gui_get_navigation_tree_view ( ) );
 
     return TRUE;
 }
diff --git a/src/gsb_form.c b/src/gsb_form.c
index 51e81ae..2b386d9 100644
--- a/src/gsb_form.c
+++ b/src/gsb_form.c
@@ -108,7 +108,6 @@ static gboolean gsb_form_validate_form_transaction ( gint transaction_number,
 /*START_EXTERN*/
 extern GdkColor calendar_entry_color;
 extern gint mise_a_jour_liste_comptes_accueil;
-extern GtkWidget *navigation_tree_view;
 extern gsb_real null_real;
 /*END_EXTERN*/
 
@@ -3477,7 +3476,7 @@ gboolean gsb_form_escape_form ( void )
     {
 	case ORIGIN_VALUE_OTHER:
 	    notice_debug ("Should not come here... (gsb_form_escape_form)");
-	    gtk_widget_grab_focus (navigation_tree_view);
+	    gtk_widget_grab_focus ( gsb_gui_get_navigation_tree_view ( ) );
 	    break;
 
 	case ORIGIN_VALUE_HOME:
diff --git a/src/gsb_reconcile.c b/src/gsb_reconcile.c
index 579c701..ae76997 100644
--- a/src/gsb_reconcile.c
+++ b/src/gsb_reconcile.c
@@ -76,7 +76,6 @@ static void gsb_reconcile_sensitive ( gboolean sensitive );
 extern GdkColor calendar_entry_color;
 extern GtkWidget *label_last_statement;
 extern gint mise_a_jour_liste_comptes_accueil;
-extern GtkWidget * navigation_tree_view;
 extern GtkWidget * reconcile_panel;
 /*END_EXTERN*/
 
@@ -667,8 +666,10 @@ gboolean gsb_reconcile_finish_reconciliation ( GtkWidget *button,
  * */
 void gsb_reconcile_sensitive ( gboolean sensitive )
 {
-    GtkUIManager *ui_manager = gsb_menu_get_ui_manager ( );
-    gtk_widget_set_sensitive ( navigation_tree_view, sensitive );
+    GtkUIManager *ui_manager;
+
+    ui_manager = gsb_menu_get_ui_manager ( );
+    gtk_widget_set_sensitive ( gsb_gui_get_navigation_tree_view ( ), sensitive );
     gsb_gui_sensitive_headings (sensitive);
     /* add by pbiava 02/11/2009 */
     gtk_widget_set_sensitive ( gtk_ui_manager_get_widget ( ui_manager, 
diff --git a/src/gsb_scheduler_list.c b/src/gsb_scheduler_list.c
index e53b1a3..9f3720f 100644
--- a/src/gsb_scheduler_list.c
+++ b/src/gsb_scheduler_list.c
@@ -121,7 +121,6 @@ extern GdkColor couleur_grise;
 extern GdkColor couleur_selection;
 extern struct conditional_message delete_msg[];
 extern gint mise_a_jour_liste_echeances_manuelles_accueil;
-extern GtkWidget * navigation_tree_view;
 extern gsb_real null_real;
 extern GtkWidget *scheduler_button_delete;
 extern GtkWidget *scheduler_button_edit;
@@ -1647,7 +1646,7 @@ gboolean gsb_scheduler_list_key_press ( GtkWidget *tree_view,
 
 	case GDK_Left:
 	    /* if we press left, give back the focus to the tree at left */
-	    gtk_widget_grab_focus (navigation_tree_view);
+	    gtk_widget_grab_focus ( gsb_gui_get_navigation_tree_view ( ) );
 	    break;
 
 	case GDK_space:
diff --git a/src/gsb_transactions_list.c b/src/gsb_transactions_list.c
index b1f5b01..1ad8dd3 100644
--- a/src/gsb_transactions_list.c
+++ b/src/gsb_transactions_list.c
@@ -175,7 +175,6 @@ extern gint mise_a_jour_fin_comptes_passifs;
 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 *reconcile_sort_list_button;
 extern gint tab_affichage_ope[TRANSACTION_LIST_ROWS_NB][CUSTOM_MODEL_VISIBLE_COLUMNS];
 /*END_EXTERN*/
@@ -1354,7 +1353,7 @@ gboolean gsb_transactions_list_key_press ( GtkWidget *widget,
 
     case GDK_Left:
         /* if we press left, give back the focus to the tree at left */
-        gtk_widget_grab_focus ( navigation_tree_view );
+        gtk_widget_grab_focus ( gsb_gui_get_navigation_tree_view ( ) );
         break;
 
     case GDK_Home:
diff --git a/src/menu.c b/src/menu.c
index 73ee133..4fbda3e 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -75,7 +75,6 @@ static gboolean gsb_menu_reinit_largeur_col_menu ( void );
 
 
 /*START_EXTERN*/
-extern GtkTreeModel * navigation_model;
 extern gsize nb_derniers_fichiers_ouverts;
 extern gint nb_max_derniers_fichiers_ouverts;
 extern gchar **tab_noms_derniers_fichiers_ouverts;
@@ -659,7 +658,7 @@ gboolean gsb_gui_toggle_show_closed_accounts ( void )
 {
     etat.show_closed_accounts = ! etat.show_closed_accounts;
 
-    gsb_gui_navigation_create_account_list ( navigation_model );
+    gsb_gui_navigation_create_account_list ( gsb_gui_get_navigation_model ( ) );
     gsb_gui_navigation_update_home_page ( );
 
     if ( etat.modification_fichier == 0 )
diff --git a/src/metatree.c b/src/metatree.c
index 50466e0..9167c34 100644
--- a/src/metatree.c
+++ b/src/metatree.c
@@ -173,7 +173,6 @@ static void supprimer_sub_division ( GtkTreeView * tree_view, GtkTreeModel * mod
 
 
 /*START_EXTERN*/
-extern GtkTreeModel * navigation_model;
 /*END_EXTERN*/
 
 /* Save the choice for the deleting of division */
@@ -1190,7 +1189,7 @@ gboolean division_row_drop_possible ( GtkTreeDragDest *drag_dest,
 
 	gtk_tree_get_row_drag_data (selection_data, &model, &orig_path);
 
-	if ( model == GTK_TREE_MODEL(navigation_model) )
+	if ( model == GTK_TREE_MODEL( gsb_gui_get_navigation_model ( ) ) )
 	{
 	    return navigation_row_drop_possible ( drag_dest, dest_path, selection_data );
 	}
@@ -1268,7 +1267,7 @@ gboolean division_drag_data_received ( GtkTreeDragDest *drag_dest,
 	gtk_tree_get_row_drag_data (selection_data, &model, &orig_path);
 
 	/* if we are on the navigation list, work with it */
-	if ( model == GTK_TREE_MODEL(navigation_model) )
+	if ( model == GTK_TREE_MODEL( gsb_gui_get_navigation_model ( ) ) )
 	{
 	    return navigation_drag_data_received ( drag_dest, dest_path, selection_data );
 	}
diff --git a/src/navigation.c b/src/navigation.c
index a61dc01..2e87692 100644
--- a/src/navigation.c
+++ b/src/navigation.c
@@ -31,38 +31,38 @@
 
 /*START_INCLUDE*/
 #include "navigation.h"
+#include "accueil.h"
 #include "bet_data.h"
+#include "bet_finance_ui.h"
+#include "categories_onglet.h"
+#include "etats_onglet.h"
+#include "fenetre_principale.h"
 #include "gsb_account_property.h"
 #include "gsb_calendar.h"
 #include "gsb_data_account.h"
 #include "gsb_data_import_rule.h"
 #include "gsb_data_reconcile.h"
 #include "gsb_data_report.h"
-#include "utils_dates.h"
+#include "gsb_dirs.h"
 #include "gsb_file.h"
 #include "gsb_form.h"
 #include "gsb_form_scheduler.h"
-#include "fenetre_principale.h"
-#include "bet_finance_ui.h"
-#include "menu.h"
-#include "etats_onglet.h"
-#include "accueil.h"
 #include "gsb_real.h"
 #include "gsb_reconcile.h"
 #include "gsb_scheduler_list.h"
 #include "gsb_transactions_list.h"
+#include "imputation_budgetaire.h"
 #include "main.h"
-#include "traitement_variables.h"
-#include "utils_str.h"
+#include "menu.h"
+#include "structures.h"
 #include "tiers_onglet.h"
-#include "categories_onglet.h"
-#include "imputation_budgetaire.h"
+#include "traitement_variables.h"
 #include "transaction_list_select.h"
 #include "transaction_list_sort.h"
-#include "erreur.h"
-#include "structures.h"
 #include "utils.h"
-#include "gsb_dirs.h"
+#include "utils_dates.h"
+#include "utils_str.h"
+#include "erreur.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -114,16 +114,16 @@ extern gint mise_a_jour_liste_comptes_accueil;
 
 
 /** Navigation tree view. */
-GtkWidget * navigation_tree_view = NULL;
+static GtkWidget *navigation_tree_view = NULL;
 
 /** Model of the navigation tree. */
-GtkTreeModel * navigation_model = NULL;
+static GtkTreeModel *navigation_model = NULL;
 
 /** Widget that hold the scheduler calendar. */
-static GtkWidget * scheduler_calendar = NULL;
+static GtkWidget *scheduler_calendar = NULL;
 
 /** Widget that hold all reconciliation widgets. */
-GtkWidget * reconcile_panel;
+GtkWidget *reconcile_panel;
 
 /* contains the number of the last account
  * when switching between 2 accounts
@@ -1686,6 +1686,35 @@ void gsb_gui_navigation_update_home_page ( void )
 }
 
 
+/**
+ *
+ *
+ *
+ */
+GtkWidget *gsb_gui_get_navigation_tree_view ( void )
+{
+    return navigation_tree_view;
+}
+
+
+/**
+ *
+ *
+ *
+ */
+void gsb_gui_navigation_init_tree_view ( void )
+{
+    navigation_tree_view = NULL;
+}
+
+GtkTreeModel *gsb_gui_get_navigation_model ( void )
+{
+    if ( navigation_model )
+        return navigation_model;
+    else
+        return NULL;
+}
+
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/navigation.h b/src/navigation.h
index 7498888..dabedd7 100644
--- a/src/navigation.h
+++ b/src/navigation.h
@@ -27,7 +27,10 @@ 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 );
+GtkTreeModel *gsb_gui_get_navigation_model ( void );
+GtkWidget *gsb_gui_get_navigation_tree_view ( void );
 GQueue *gsb_gui_navigation_get_pages_list ( void );
+void gsb_gui_navigation_init_tree_view ( 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 );
diff --git a/src/traitement_variables.c b/src/traitement_variables.c
index fd036d9..05eaae1 100644
--- a/src/traitement_variables.c
+++ b/src/traitement_variables.c
@@ -73,6 +73,7 @@
 #include "import.h"
 #include "main.h"
 #include "menu.h"
+#include "navigation.h"
 #include "structures.h"
 #include "transaction_model.h"
 #include "utils_dates.h"
@@ -226,7 +227,6 @@ extern gint mise_a_jour_liste_comptes_accueil;
 extern gint mise_a_jour_liste_echeances_auto_accueil;
 extern gint mise_a_jour_liste_echeances_manuelles_accueil;
 extern gint mise_a_jour_soldes_minimaux;
-extern GtkWidget * navigation_tree_view;
 extern gint no_devise_totaux_categ;
 extern gint no_devise_totaux_ib;
 extern gint no_devise_totaux_tiers;
@@ -443,7 +443,7 @@ void init_variables ( void )
         run.scheduler_column_width = NULL;
     }
     
-    navigation_tree_view = NULL;
+    gsb_gui_navigation_init_tree_view ( );
 
     /* free the form */
     gsb_form_widget_free_list ();


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list