[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9.0-75-g68d4a83

Rémi Cardona nobody at users.sourceforge.net
Wed Mar 16 00:14:25 CET 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  68d4a83f758b5b268ad78d47b2d0411c2b9121cd (commit)
       via  07330616ba510f6bb5a05373df4361bc5002a4ca (commit)
      from  8df2c5d33cf0b981d11c4cf37ca845e9fb8c19e4 (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 68d4a83f758b5b268ad78d47b2d0411c2b9121cd
Author: Rémi Cardona <remi at gentoo.org>
Date:   Tue Mar 15 08:53:13 2011 +0100

    Merge 2 identically #defined variables as one
    
    Both CUSTOM_MODEL_VISIBLE_COLUMNS and CUSTOM_MODEL_N_VISIBLES_COLUMN are
    set to 7, both are global constants, there's no good reason to keep both
    around.

commit 07330616ba510f6bb5a05373df4361bc5002a4ca
Author: Rémi Cardona <remi at gentoo.org>
Date:   Sun Mar 13 16:33:03 2011 +0100

    Declare 'labels_titres_colonnes_liste_ope' static as it's only used within traitement_variables.c

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

Changes:
diff --git a/src/affichage_liste.c b/src/affichage_liste.c
index d0bbbfb..55208da 100644
--- a/src/affichage_liste.c
+++ b/src/affichage_liste.c
@@ -80,8 +80,8 @@ gint display_three_lines;
 
 /*START_EXTERN*/
 extern GSList *liste_labels_titres_colonnes_liste_ope;
-extern gchar *tips_col_liste_operations[CUSTOM_MODEL_N_VISIBLES_COLUMN];
-extern gchar *titres_colonnes_liste_operations[CUSTOM_MODEL_N_VISIBLES_COLUMN];
+extern gchar *tips_col_liste_operations[CUSTOM_MODEL_VISIBLE_COLUMNS];
+extern gchar *titres_colonnes_liste_operations[CUSTOM_MODEL_VISIBLE_COLUMNS];
 /*END_EXTERN*/
 
 
diff --git a/src/custom_list.h b/src/custom_list.h
index 9609902..c634c34 100644
--- a/src/custom_list.h
+++ b/src/custom_list.h
@@ -54,9 +54,6 @@ typedef struct _CustomRecord     CustomRecord;
 typedef struct _CustomList       CustomList;
 typedef struct _CustomListClass  CustomListClass;
 
-/* number of visibles columns */
-#define CUSTOM_MODEL_N_VISIBLES_COLUMN 7
-
 /* CustomRecord: this structure represents a row */
 struct _CustomRecord
 {
diff --git a/src/gsb_file_load.c b/src/gsb_file_load.c
index 7c2f624..d6d47db 100644
--- a/src/gsb_file_load.c
+++ b/src/gsb_file_load.c
@@ -193,8 +193,8 @@ extern GdkColor split_background;
 extern gint tab_affichage_ope[TRANSACTION_LIST_ROWS_NB][CUSTOM_MODEL_VISIBLE_COLUMNS];
 extern GdkColor text_color[2];
 extern gchar *titre_fichier;
-extern gint transaction_col_align[CUSTOM_MODEL_N_VISIBLES_COLUMN];
-extern gint transaction_col_width[CUSTOM_MODEL_N_VISIBLES_COLUMN];
+extern gint transaction_col_align[CUSTOM_MODEL_VISIBLE_COLUMNS];
+extern gint transaction_col_width[CUSTOM_MODEL_VISIBLE_COLUMNS];
 extern gint valeur_echelle_recherche_date_import;
 /*END_EXTERN*/
 
diff --git a/src/gsb_file_save.c b/src/gsb_file_save.c
index 2e925d5..6f5cc98 100644
--- a/src/gsb_file_save.c
+++ b/src/gsb_file_save.c
@@ -172,8 +172,8 @@ extern GdkColor split_background;
 extern gint tab_affichage_ope[TRANSACTION_LIST_ROWS_NB][CUSTOM_MODEL_VISIBLE_COLUMNS];
 extern GdkColor text_color[2];
 extern gchar *titre_fichier;
-extern gint transaction_col_align[CUSTOM_MODEL_N_VISIBLES_COLUMN];
-extern gint transaction_col_width[CUSTOM_MODEL_N_VISIBLES_COLUMN];
+extern gint transaction_col_align[CUSTOM_MODEL_VISIBLE_COLUMNS];
+extern gint transaction_col_width[CUSTOM_MODEL_VISIBLE_COLUMNS];
 extern gint valeur_echelle_recherche_date_import;
 /*END_EXTERN*/
 
diff --git a/src/gsb_transactions_list.c b/src/gsb_transactions_list.c
index 90afa4f..0bc4775 100644
--- a/src/gsb_transactions_list.c
+++ b/src/gsb_transactions_list.c
@@ -122,20 +122,20 @@ static void update_titres_tree_view ( void );
 GtkWidget *tree_view_vbox = NULL;
 
 /* the columns of the tree_view */
-GtkTreeViewColumn *transactions_tree_view_columns[CUSTOM_MODEL_N_VISIBLES_COLUMN];
+GtkTreeViewColumn *transactions_tree_view_columns[CUSTOM_MODEL_VISIBLE_COLUMNS];
 
 /* the initial width of each column */
-gint transaction_col_width[CUSTOM_MODEL_N_VISIBLES_COLUMN];
+gint transaction_col_width[CUSTOM_MODEL_VISIBLE_COLUMNS];
 
 /* the initial alignment of each column */
-gint transaction_col_align[CUSTOM_MODEL_N_VISIBLES_COLUMN];
+gint transaction_col_align[CUSTOM_MODEL_VISIBLE_COLUMNS];
 
 /* adr de la barre d'outils */
 GtkWidget *barre_outils;
 
 /* contient les tips et titres des colonnes des listes d'opé */
-gchar *tips_col_liste_operations[CUSTOM_MODEL_N_VISIBLES_COLUMN];
-gchar *titres_colonnes_liste_operations[CUSTOM_MODEL_N_VISIBLES_COLUMN];
+gchar *tips_col_liste_operations[CUSTOM_MODEL_VISIBLE_COLUMNS];
+gchar *titres_colonnes_liste_operations[CUSTOM_MODEL_VISIBLE_COLUMNS];
 
 static GtkWidget *transactions_tree_view = NULL;
 
@@ -361,7 +361,7 @@ void gsb_transactions_list_create_tree_view_columns ( void )
     column_balance = find_element_col (ELEMENT_BALANCE);
 
     /* create the columns */
-    for ( i = 0 ; i < CUSTOM_MODEL_N_VISIBLES_COLUMN ; i++ )
+    for ( i = 0 ; i < CUSTOM_MODEL_VISIBLE_COLUMNS ; i++ )
     {
 	GtkCellRenderer *cell_renderer;
 
@@ -429,7 +429,7 @@ void update_titres_tree_view ( void )
 {
     gint i;
 
-    for ( i = 0 ; i < CUSTOM_MODEL_N_VISIBLES_COLUMN ; i++ )
+    for ( i = 0 ; i < CUSTOM_MODEL_VISIBLE_COLUMNS ; i++ )
     {
         gtk_tree_view_column_set_title ( GTK_TREE_VIEW_COLUMN (
                         transactions_tree_view_columns[i] ),
@@ -487,7 +487,7 @@ GtkWidget *gsb_transactions_list_create_tree_view ( GtkTreeModel *model )
     /* we create the columns of the tree view */
     gsb_transactions_list_create_tree_view_columns ();
 
-    for ( i = 0 ; i < CUSTOM_MODEL_N_VISIBLES_COLUMN ; i++ )
+    for ( i = 0 ; i < CUSTOM_MODEL_VISIBLE_COLUMNS ; i++ )
     {
 	    gtk_tree_view_append_column ( GTK_TREE_VIEW ( tree_view ),
 				        transactions_tree_view_columns[i] );
@@ -1018,7 +1018,7 @@ gint find_element_col ( gint element_number )
 
     for ( i=0 ; i<TRANSACTION_LIST_ROWS_NB ; i++ )
     {
-	for ( j=0 ; j<CUSTOM_MODEL_N_VISIBLES_COLUMN ; j++ )
+	for ( j=0 ; j<CUSTOM_MODEL_VISIBLE_COLUMNS ; j++ )
 	{
 	    if ( tab_affichage_ope[i][j] == element_number )
 		return j;
@@ -1041,7 +1041,7 @@ gint find_element_line ( gint element_number )
 
     for ( i=0 ; i<TRANSACTION_LIST_ROWS_NB ; i++ )
     {
-	for ( j=0 ; j<CUSTOM_MODEL_N_VISIBLES_COLUMN ; j++ )
+	for ( j=0 ; j<CUSTOM_MODEL_VISIBLE_COLUMNS ; j++ )
 	{
 	    if ( tab_affichage_ope[i][j] == element_number )
 		return i;
@@ -3682,7 +3682,7 @@ gboolean gsb_transactions_list_size_allocate ( GtkWidget *tree_view,
         if ( gtk_tree_view_column_get_width ( transactions_tree_view_columns[0]) == 1 )
             return FALSE;
 
-        for ( i = 0 ; i<CUSTOM_MODEL_N_VISIBLES_COLUMN ; i++ )
+        for ( i = 0 ; i<CUSTOM_MODEL_VISIBLE_COLUMNS ; i++ )
             transaction_col_width[i] = ( gtk_tree_view_column_get_width (
                         transactions_tree_view_columns[i]) * 100) / allocation -> width + 1;
 
diff --git a/src/print_transactions_list.c b/src/print_transactions_list.c
index 1c8bb1e..ad35d79 100644
--- a/src/print_transactions_list.c
+++ b/src/print_transactions_list.c
@@ -79,8 +79,8 @@ static GtkWidget * print_transactions_list_layout_config ( GtkPrintOperation * o
 /*START_EXTERN*/
 extern GdkColor archive_background_color;
 extern GdkColor couleur_fond[2];
-extern gchar *titres_colonnes_liste_operations[CUSTOM_MODEL_N_VISIBLES_COLUMN];
-extern gint transaction_col_width[CUSTOM_MODEL_N_VISIBLES_COLUMN];
+extern gchar *titres_colonnes_liste_operations[CUSTOM_MODEL_VISIBLE_COLUMNS];
+extern gint transaction_col_width[CUSTOM_MODEL_VISIBLE_COLUMNS];
 /*END_EXTERN*/
 
 
diff --git a/src/traitement_variables.c b/src/traitement_variables.c
index 875e904..c542b31 100644
--- a/src/traitement_variables.c
+++ b/src/traitement_variables.c
@@ -86,7 +86,7 @@ static void initialise_number_separators ( void );
 static void initialise_tab_affichage_ope ( void );
 /*END_STATIC*/
 
-gchar *labels_titres_colonnes_liste_ope[] = {
+static gchar *labels_titres_colonnes_liste_ope[] = {
     N_("Date"),
     N_("Value date"),
     N_("Payee"),
@@ -235,8 +235,8 @@ extern GSList *orphan_child_transactions;
 extern gint scheduler_col_width[SCHEDULER_COL_VISIBLE_COLUMNS];
 extern gint scheduler_current_tree_view_width;
 extern gint tab_affichage_ope[TRANSACTION_LIST_ROWS_NB][CUSTOM_MODEL_VISIBLE_COLUMNS];
-extern gint transaction_col_align[CUSTOM_MODEL_N_VISIBLES_COLUMN];
-extern gint transaction_col_width[CUSTOM_MODEL_N_VISIBLES_COLUMN];
+extern gint transaction_col_align[CUSTOM_MODEL_VISIBLE_COLUMNS];
+extern gint transaction_col_width[CUSTOM_MODEL_VISIBLE_COLUMNS];
 extern gint valeur_echelle_recherche_date_import;
 /*END_EXTERN*/
 
diff --git a/src/transaction_list.c b/src/transaction_list.c
index 07319b6..fcba551 100644
--- a/src/transaction_list.c
+++ b/src/transaction_list.c
@@ -407,7 +407,7 @@ gboolean transaction_list_remove_transaction ( gint transaction_number )
                         record -> children_rows[0] -> transaction_pointer ) );
 
     /* now we can delete the rows */
-    for (i=0 ; i<CUSTOM_MODEL_N_VISIBLES_COLUMN ; i++)
+    for (i=0 ; i<CUSTOM_MODEL_VISIBLE_COLUMNS ; i++)
 	if (record -> visible_col[i])
 	    g_free (record -> visible_col[i]);
 
@@ -547,7 +547,7 @@ gboolean transaction_list_remove_archive ( gint archive_number )
         /* we are on a good archive store, delete it */
 
         /* delete the rows */
-        for ( j=0 ; j<CUSTOM_MODEL_N_VISIBLES_COLUMN ; j++ )
+        for ( j=0 ; j<CUSTOM_MODEL_VISIBLE_COLUMNS ; j++ )
             if (record -> visible_col[j])
                 g_free (record -> visible_col[j]);
         
@@ -1090,7 +1090,7 @@ gboolean transaction_list_update_transaction ( gint transaction_number )
         /* the tmp record will contain the new gchars of columns */
         tmp_record = transaction_list_create_record (transaction_number, i);
 
-        for (j=0 ; j<CUSTOM_MODEL_N_VISIBLES_COLUMN ; j++)
+        for (j=0 ; j<CUSTOM_MODEL_VISIBLE_COLUMNS ; j++)
         {
             if (record -> visible_col[j])
                 g_free (record -> visible_col[j]);
@@ -1232,7 +1232,7 @@ gboolean transaction_list_update_element ( gint element_number )
     /* for now, this is the same position for all accounts, so no problem */
 
     /* get the position of the element */
-    column_element = find_element_col (element_number);        /*  0 to CUSTOM_MODEL_N_VISIBLES_COLUMN */
+    column_element = find_element_col (element_number);        /*  0 to CUSTOM_MODEL_VISIBLE_COLUMNS */
     line_element = find_element_line (element_number);        /*  0 to TRANSACTION_LIST_ROWS_NB */
 
     if ( column_element == -1
@@ -1902,7 +1902,7 @@ static CustomRecord *transaction_list_create_record ( gint transaction_number,
     newrecord = g_malloc0 (sizeof (CustomRecord));
 
     /* fill the row with the visibles columns */
-    for ( column = 0 ; column < CUSTOM_MODEL_N_VISIBLES_COLUMN ; column++ )
+    for ( column = 0 ; column < CUSTOM_MODEL_VISIBLE_COLUMNS ; column++ )
 	newrecord -> visible_col[column] = gsb_transactions_list_grep_cell_content ( transaction_number,
 										     tab_affichage_ope[line_in_transaction][column]);
 
diff --git a/src/transaction_list_sort.c b/src/transaction_list_sort.c
index f083728..fcac605 100644
--- a/src/transaction_list_sort.c
+++ b/src/transaction_list_sort.c
@@ -53,7 +53,7 @@ static gboolean transaction_list_sort_get_initial_sort ( void );
 /*END_STATIC*/
 
 /*START_EXTERN*/
-extern GtkTreeViewColumn *transactions_tree_view_columns[CUSTOM_MODEL_N_VISIBLES_COLUMN];
+extern GtkTreeViewColumn *transactions_tree_view_columns[CUSTOM_MODEL_VISIBLE_COLUMNS];
 /*END_EXTERN*/
 
 
diff --git a/src/transaction_model.c b/src/transaction_model.c
index 3ac927f..606db49 100644
--- a/src/transaction_model.c
+++ b/src/transaction_model.c
@@ -77,7 +77,7 @@ void transaction_model_initialize ( void )
 	gint j;
 
 	record = custom_list -> rows[i];
-	for (j=0 ; j<CUSTOM_MODEL_N_VISIBLES_COLUMN ; j++)
+	for (j=0 ; j<CUSTOM_MODEL_VISIBLE_COLUMNS ; j++)
 	    if (record -> visible_col[j])
 		g_free (record -> visible_col[j]);
 
@@ -90,7 +90,7 @@ void transaction_model_initialize ( void )
 
 		child_record = record -> children_rows[k];
 
-		for (j=0 ; j<CUSTOM_MODEL_N_VISIBLES_COLUMN ; j++)
+		for (j=0 ; j<CUSTOM_MODEL_VISIBLE_COLUMNS ; j++)
 		    if (child_record -> visible_col[j])
 			g_free (child_record -> visible_col[j]);
 		g_free (child_record);


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list