[grisbi-cvs] [SCM] grisbi branch, grisbi-0.8.x, updated. upstream_version_0_8_7-23-g067b3a1

Pierre Biava nobody at users.sourceforge.net
Wed Oct 26 21:26:39 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, grisbi-0.8.x has been updated
       via  067b3a198c416e399e2c1cf77ad7619ea08516ab (commit)
      from  63b203bd4091e23d27d57f4e83fa35aff12c68c7 (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 067b3a198c416e399e2c1cf77ad7619ea08516ab
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 c200de2..98f1534 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -915,15 +915,13 @@ gboolean gsb_menu_reinit_largeur_col_menu ( void )
 
     if ( current_page == GSB_ACCOUNT_PAGE )
     {
-        initialise_largeur_colonnes_tab_affichage_ope ( GSB_ACCOUNT_PAGE,
-                        run.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,
-                        run.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 fbe7e02..4cb994a 100644
--- a/src/traitement_variables.c
+++ b/src/traitement_variables.c
@@ -194,7 +194,9 @@ extern gint transaction_col_width[CUSTOM_MODEL_N_VISIBLES_COLUMN];
 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";
 
 /**
  * set or unset the modified flag
@@ -241,9 +243,6 @@ void modification_fichier ( gboolean modif )
  * */
 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;
@@ -383,12 +382,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 ( run.transaction_column_width && strlen ( run.transaction_column_width ) )
     {
@@ -696,6 +693,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