[grisbi-cvs] [SCM] grisbi branch, master, updated. 487fc9371bbab80db7528b0b623f4f47564a81d7

Pierre Biava nobody at users.sourceforge.net
Tue Aug 10 22:13:28 CEST 2010


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  487fc9371bbab80db7528b0b623f4f47564a81d7 (commit)
      from  2f6d8022481b539c318c866c214d08cb2ad71d2b (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 487fc9371bbab80db7528b0b623f4f47564a81d7
Author: pbiava <pierre.biava at nerim.net>
Date:   Tue Aug 10 22:11:41 2010 +0200

    fixed bug 1147

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

Changes:
diff --git a/src/gsb_data_form.c b/src/gsb_data_form.c
index b77795c..ffc89ae 100644
--- a/src/gsb_data_form.c
+++ b/src/gsb_data_form.c
@@ -482,39 +482,52 @@ gint gsb_data_form_get_values_total ( gint account_number )
 gboolean gsb_form_config_update_from_account (gint account_number)
 {
     form_organization *form;
-    gint no_account;
+    GSList *tmp_list;
 
     if (account_number == -1)
 	return FALSE;
 
     form = gsb_data_account_get_form_organization ( account_number );
-
     if ( !form)
-	return FALSE;
-
-    for (no_account = 0 ; no_account < gsb_data_account_get_accounts_amount (); no_account++)
-    {
-	form_organization *tmp_form;
-	gint col;
-
-	if (no_account == account_number)
-	    continue;
-
-	tmp_form = gsb_data_account_get_form_organization (no_account);
-    if ( tmp_form == NULL )
-        continue;
-
-	for (col = 0 ; col<MAX_WIDTH ; col++)
-	{
-	    gint line;
+    return FALSE;
 
-	    for (line=0 ; line <MAX_HEIGHT ; line++)
-		tmp_form -> form_table[line][col] = form -> form_table[line][col];
-	    tmp_form -> width_columns_percent[col] = form -> width_columns_percent[col];
-	}
+    tmp_list = gsb_data_account_get_list_accounts ( );
 
-	tmp_form -> columns = form -> columns;
-	tmp_form -> rows = form -> rows;
+    while ( tmp_list )
+    {
+        form_organization *tmp_form;
+        gint col;
+        gint no_account;
+
+        no_account = gsb_data_account_get_no_account ( tmp_list -> data );
+
+        if (no_account == account_number)
+        {
+            tmp_list = tmp_list -> next;
+            continue;
+        }
+
+        tmp_form = gsb_data_account_get_form_organization (no_account);
+        if ( tmp_form == NULL )
+        {
+            tmp_list = tmp_list -> next;
+            continue;
+        }
+
+        for (col = 0 ; col<MAX_WIDTH ; col++)
+        {
+            gint line;
+
+            for (line=0 ; line <MAX_HEIGHT ; line++)
+            tmp_form -> form_table[line][col] = form -> form_table[line][col];
+            tmp_form -> width_columns_percent[col] = form -> width_columns_percent[col];
+        }
+
+        tmp_form -> columns = form -> columns;
+        tmp_form -> rows = form -> rows;
+
+        tmp_list = tmp_list -> next;
     }
+
     return TRUE;
 }
diff --git a/src/gsb_form.c b/src/gsb_form.c
index a3db784..470fbac 100644
--- a/src/gsb_form.c
+++ b/src/gsb_form.c
@@ -82,7 +82,6 @@
 #include "include.h"
 #include "structures.h"
 #include "erreur.h"
-#include "gsb_form_widget.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
diff --git a/src/gsb_form_config.c b/src/gsb_form_config.c
index da8eb26..0343630 100644
--- a/src/gsb_form_config.c
+++ b/src/gsb_form_config.c
@@ -664,11 +664,14 @@ gboolean gsb_form_config_toggle_element_button ( GtkWidget *toggle_button )
 						NULL );
 
 	    if ( no_second_element == -1 )
-		dialogue_hint ( _("There is no place enough to put the element. You need to increase the number of rows or columns to add an element."),
-				_("The table is full"));
+		dialogue_hint ( _("There is no place enough to put the element. You need to increase "
+                          "the number of rows or columns to add an element."),
+                        _("The table is full"));
 	    else
-		dialogue_hint ( _("There is no place enough to put the two elements (you have clicked on an element which contains two). You need to increase the number of rows or columns to add the elements."),
-				_("The table is full"));
+		dialogue_hint ( _("There is no place enough to put the two elements (you have clicked on "
+                          "an element which contains two). You need to increase the number of rows "
+                          "or columns to add the elements."),
+                        _("The table is full"));
 
 	    return TRUE;
 	}
@@ -719,6 +722,10 @@ gboolean gsb_form_config_toggle_element_button ( GtkWidget *toggle_button )
 
     gsb_form_config_update_from_account (
                         gsb_account_get_combo_account_number ( accounts_combobox ) );
+    /* update the form */
+    gsb_form_config_fill_store (account_number);
+    gsb_form_create_widgets ();
+
     if ( etat.modification_fichier == 0 )
         modification_fichier ( TRUE );
     return FALSE;
@@ -843,6 +850,7 @@ gboolean gsb_form_config_change_column_size ( GtkWidget *tree_view,
     /* update the form if needed */
 	saved_allocation_size = 0;
 	gsb_form_allocate_size ( NULL, &(form_transaction_part -> allocation), NULL );
+    gsb_form_create_widgets ();
 
     return FALSE;
 }


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list