[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_4-97-g2b5a21d

Pierre Biava nobody at users.sourceforge.net
Wed Oct 26 21:18:40 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  2b5a21d94426599b2722d0a2ca9fbb4f4f4306ca (commit)
      from  a54495db272590af07772dc611940773cbd719f0 (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 2b5a21d94426599b2722d0a2ca9fbb4f4f4306ca
Author: pbiava <pierre.biava at nerim.net>
Date:   Wed Oct 26 21:16:47 2011 +0200

    Fixed bug 1416: Reset column widths with the original values

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

Changes:
diff --git a/src/menu.c b/src/menu.c
index 805a261..0d9ec0d 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -844,15 +844,13 @@ gboolean gsb_menu_reinit_largeur_col_menu ( void )
 
     if ( current_page == GSB_ACCOUNT_PAGE )
     {
-        initialise_largeur_colonnes_tab_affichage_ope ( GSB_ACCOUNT_PAGE,
-                        etat.transaction_column_width );
+        initialise_largeur_colonnes_tab_affichage_ope ( GSB_ACCOUNT_PAGE, NULL );
 
         gsb_transactions_list_set_largeur_col ( );
     }
     else if ( current_page == GSB_SCHEDULER_PAGE )
     {
-        initialise_largeur_colonnes_tab_affichage_ope ( GSB_SCHEDULER_PAGE,
-                        etat.scheduler_column_width );
+        initialise_largeur_colonnes_tab_affichage_ope ( GSB_SCHEDULER_PAGE, NULL );
 
         gsb_scheduler_list_set_largeur_col ( );
     }
diff --git a/src/traitement_variables.c b/src/traitement_variables.c
index cbddc97..bcfa7ef 100644
--- a/src/traitement_variables.c
+++ b/src/traitement_variables.c
@@ -126,7 +126,9 @@ extern gint transaction_col_width[CUSTOM_MODEL_VISIBLE_COLUMNS];
 extern gint valeur_echelle_recherche_date_import;
 /*END_EXTERN*/
 
-
+/* the total of % of scheduled columns can be > 100 because all the columns are not showed at the same time */
+static const gchar *scheduler_col_width_init = "10-12-36-12-12-12-12";
+static const gchar *transaction_col_width_init = "10-12-30-12-12-12-12";
 
 /**
  * initialisation of all the variables of grisbi
@@ -138,9 +140,6 @@ extern gint valeur_echelle_recherche_date_import;
  * */
 void init_variables ( void )
 {
-    /* the total of % of scheduled columns can be > 100 because all the columns are not showed at the same time */
-    gint scheduler_col_width_init[SCHEDULER_COL_VISIBLE_COLUMNS] = {10, 12, 36, 12, 12, 12, 12 };
-    gint transaction_col_width_init[CUSTOM_MODEL_VISIBLE_COLUMNS] = {10, 12, 36, 6, 12, 12, 12 };
     gint bet_array_col_width_init[BET_ARRAY_COLUMNS] = {15, 40, 15, 15, 15 };
     gint transaction_col_align_init[CUSTOM_MODEL_VISIBLE_COLUMNS] = { 1, 1, 0, 1, 2, 2, 2 };
     gint i;
@@ -267,12 +266,10 @@ void init_variables ( void )
     detail_devise_compte = NULL;
 
     /* defaut value for width and align of columns */
-    for ( i = 0 ; i < CUSTOM_MODEL_VISIBLE_COLUMNS ; i++ )
-        transaction_col_width[i] = transaction_col_width_init[i];
+    initialise_largeur_colonnes_tab_affichage_ope ( GSB_ACCOUNT_PAGE, transaction_col_width_init );
+    initialise_largeur_colonnes_tab_affichage_ope ( GSB_SCHEDULER_PAGE, scheduler_col_width_init );
     for ( i = 0 ; i < CUSTOM_MODEL_VISIBLE_COLUMNS ; i++ )
         transaction_col_align[i] = transaction_col_align_init[i];
-    for ( i = 0 ; i < SCHEDULER_COL_VISIBLE_COLUMNS ; i++ )
-        scheduler_col_width[i] = scheduler_col_width_init[i];
 
     if ( etat.transaction_column_width && strlen ( etat.transaction_column_width ) )
     {
@@ -430,6 +427,13 @@ void initialise_largeur_colonnes_tab_affichage_ope ( gint type_operation, const
     gchar **pointeur_char;
     gint j;
 
+    if ( description == NULL )
+    {
+        if ( type_operation == GSB_ACCOUNT_PAGE )
+            description = transaction_col_width_init;
+        else if ( type_operation == GSB_SCHEDULER_PAGE )
+            description = scheduler_col_width_init;
+    }
 
     /* the transactions columns are xx-xx-xx-xx and we want to set in transaction_col_width[1-2-3...] */
     pointeur_char = g_strsplit ( description, "-", 0 );


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list