[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_5-188-g3593cff

Pierre Biava nobody at users.sourceforge.net
Sun Nov 4 08:43:59 CET 2012


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  3593cff8c405a886c0314de730d4c8fe963ca8cd (commit)
       via  83cd48ad222f9ba37250deb45c53eeb07e5ebb84 (commit)
      from  596ecfe4394e04797b3ef7e148f3aba9d041b7f3 (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 3593cff8c405a886c0314de730d4c8fe963ca8cd
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Nov 4 08:34:35 2012 +0100

    transferred the function: gsb_utils_edit_calculate_entry () in utils-real.c

commit 83cd48ad222f9ba37250deb45c53eeb07e5ebb84
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Nov 4 08:07:40 2012 +0100

    Additional correction of bug 1470

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

Changes:
diff --git a/src/bet_future.c b/src/bet_future.c
index 17eace6..665e46f 100644
--- a/src/bet_future.c
+++ b/src/bet_future.c
@@ -36,29 +36,29 @@
 #include "bet_tab.h"
 #include "dialog.h"
 #include "fenetre_principale.h"
-#include "utils_dates.h"
 #include "gsb_calendar_entry.h"
 #include "gsb_combo_box.h"
 #include "gsb_data_account.h"
 #include "gsb_data_budget.h"
 #include "gsb_data_category.h"
 #include "gsb_data_currency_link.h"
+#include "gsb_data_form.h"
 #include "gsb_data_partial_balance.h"
 #include "gsb_data_payee.h"
+#include "gsb_data_payment.h"
 #include "gsb_form.h"
 #include "gsb_form_scheduler.h"
 #include "gsb_form_widget.h"
 #include "gsb_fyear.h"
-#include "navigation.h"
 #include "gsb_payment_method.h"
-#include "utils_editables.h"
 #include "gtk_combofix.h"
+#include "navigation.h"
+#include "structures.h"
 #include "utils.h"
+#include "utils_dates.h"
+#include "utils_editables.h"
 #include "utils_real.h"
 #include "utils_str.h"
-#include "structures.h"
-#include "gsb_data_payment.h"
-#include "gsb_data_form.h"
 #include "erreur.h"
 /*END_INCLUDE*/
 
@@ -1751,7 +1751,7 @@ gboolean bet_future_take_data_from_form (  struct_futur_data *scheduled )
     if ( gsb_form_widget_check_empty ( widget ) == FALSE )
     {
         gsb_form_check_auto_separator ( widget );
-        scheduled -> amount = gsb_real_opposite ( gsb_utils_edit_calculate_entry ( widget ) );
+        scheduled -> amount = gsb_real_opposite ( utils_real_get_calculate_entry ( widget ) );
     }
     else
     {
@@ -1759,7 +1759,7 @@ gboolean bet_future_take_data_from_form (  struct_futur_data *scheduled )
         if ( gsb_form_widget_check_empty ( widget ) == FALSE )
         {
             gsb_form_check_auto_separator ( widget );
-            scheduled -> amount = gsb_utils_edit_calculate_entry ( widget );
+            scheduled -> amount = utils_real_get_calculate_entry ( widget );
         }
         else
             return FALSE;
diff --git a/src/gsb_account_property.c b/src/gsb_account_property.c
index 1ec1a3d..be88cfd 100644
--- a/src/gsb_account_property.c
+++ b/src/gsb_account_property.c
@@ -342,6 +342,7 @@ GtkWidget *gsb_account_property_create_page ( void )
                         NULL,
                         G_CALLBACK (gsb_data_account_set_holder_address),
                         0 );
+    gtk_widget_set_size_request ( detail_adresse_titulaire, -1, 70 );
 
     /* now the checkbutton for different address */
     button_holder_address = gsb_autofunc_checkbutton_new (
diff --git a/src/gsb_bank.c b/src/gsb_bank.c
index 33d134e..c37afe2 100644
--- a/src/gsb_bank.c
+++ b/src/gsb_bank.c
@@ -761,6 +761,7 @@ static GtkWidget *gsb_bank_create_form ( GtkWidget *parent,
                         NULL,
                         G_CALLBACK ( gsb_data_bank_set_bank_address ),
                         0 );
+    gtk_widget_set_size_request ( bank_adr, -1, 70 );
     gtk_container_add ( GTK_CONTAINER ( scrolled_window ), bank_adr );
     gtk_size_group_add_widget ( size_group, bank_adr );
     gtk_table_attach ( GTK_TABLE ( table ),
diff --git a/src/gsb_form.c b/src/gsb_form.c
index e50a963..3f23f3c 100644
--- a/src/gsb_form.c
+++ b/src/gsb_form.c
@@ -40,8 +40,9 @@
 #include "accueil.h"
 #include "bet_data.h"
 #include "dialog.h"
-#include "gsb_calendar_entry.h"
+#include "fenetre_principale.h"
 #include "gsb_calendar.h"
+#include "gsb_calendar_entry.h"
 #include "gsb_currency.h"
 #include "gsb_data_account.h"
 #include "gsb_data_budget.h"
@@ -55,35 +56,34 @@
 #include "gsb_data_report.h"
 #include "gsb_data_scheduled.h"
 #include "gsb_data_transaction.h"
-#include "utils_dates.h"
 #include "gsb_file.h"
 #include "gsb_form_scheduler.h"
 #include "gsb_form_transaction.h"
 #include "gsb_form_widget.h"
 #include "gsb_fyear.h"
 #include "gsb_locale.h"
-#include "navigation.h"
-#include "menu.h"
-#include "tiers_onglet.h"
 #include "gsb_payment_method.h"
-#include "parametres.h"
 #include "gsb_real.h"
 #include "gsb_reconcile.h"
 #include "gsb_report.h"
 #include "gsb_scheduler.h"
 #include "gsb_scheduler_list.h"
 #include "gsb_transactions_l h"    b_form.c  ank_adr );  , bank_adr );  arent,  a *scheduled )        ’rFõ¾*          rùFõ¾*  Ðҍÿ         @Ӎÿ  uzFõ¾*  €ºGõ¾*  •gõ¾*                          ’ˆcö¾*  @Ӎÿ  € …ö¾*          0ȍÿ          Ǎÿ  kFõ¾*  6                    è     è!     è!     Ðҍÿ  @Ӎÿ  xDcö¾*          0ɍÿ          ’rFõ¾*          †Fõ¾*  Ðҍÿ  `rFõ¾*  Ӎÿ         À?Çö¾*  uzFõ¾*   0Çö¾*  Ø4Çö¾*  ¨9Çö¾*  €ºGõ¾*          xDcö¾*          0ɍÿ           ȍÿ  kFõ¾*  à!     à!     Ðҍÿ  @Ӎÿ  HCö¾*          ʍÿ         ’rFõ¾*          †Fõ¾*  Ðҍÿ  `rFõ¾*  Ӎÿ   Ӎÿ  øҍÿ  8›gõ¾*  Œp˜        @Ӎÿ  uzFõ¾*  €ºGõ¾*                  ʍÿ         àȍÿ  kFõ¾*          G       H   I       J   K           M   N   O       P   Ðҍÿ  @Ӎÿ  HÅö¾*          °Ëÿ         ’rFõ¾*          †Fõ¾*  Ðҍÿ         0?Çö¾*  uzFõ¾*   Pcö¾*   ùöõ¾*   0Çö¾*  Ø4Çö¾*  ¨9Çö¾*  €ºGõ¾*          HÅö¾*          °Ëÿ        
  ðɍÿ  kFõ¾*  8Åö¾*          °Ëÿ          ʍÿ  kFõ¾*  (Åö¾*          °Ëÿ         Pʍÿ  kFõ¾*  Åö¾*          °Ëÿ         €Êÿ  kFõ¾*  	       ¨>Çö¾*  uzFõ¾*         ¨9Çö¾*   ōÿ          ŠH÷õ¾*  eyFõ¾*         Ø4Çö¾*   ˍÿ          yH÷õ¾*  eyFõ¾*          0Çö¾*  Pˍÿ          ZH÷õ¾*  eyFõ¾*  Øôöõ¾*   Pcö¾*   ùöõ¾*   0Çö¾*  ØTcö¾*  Ø4Çö¾*  ¨9Çö¾*  €ºGõ¾*          8›gõ¾*                        ½Âõ¾*  @Ӎÿ  p‹öõ¾*           ͍ÿ          Ðˍÿ  kFõ¾*      5   6   7   8   :   <   =   >       ?       @   B   D       Ðҍÿ  @Ӎÿ  ཿõ¾*                 @Ӎÿ  uzFõ¾*         •gõ¾*  €Ëÿ          ½Âõ¾*  eyFõ¾*  •gõ¾*          Õ_ at fÆS         Qöl±íÁӎõ¾*  @Ӎÿ  ཿõ¾*          ΍ÿ         à̍ÿ  kFõ¾*  u]ÞÓ	4Q ÷U^Qʉ§ ¶uª¹ñìò*ēvÐҍÿ  @Ӎÿ  HŒõ¾*          TÈõ¾*          €Ôÿ  ¦`*÷¾*  ¦`*÷¾*         ¦Åõ¾*  Ӎÿ  @ԍÿ  øҍÿ  `ύÿ  _cö¾*  uzFõ¾*  ØTcö¾*  ÀՍÿ  ¢`*÷¾*  Ôÿ           Ѝÿ             
     ÿÿÿÿÿÿÿÿ¢`*÷¾*          HӍÿ                 ist.h"
-#include "utils_editables.h"
 #include "gtk_combofix.h"
+#include "menu.h"
+#include "mouse.h"
+#include "navigation.h"
+#include "parametres.h"
+#include "structures.h"
+#include "tiers_onglet.h"
 #include "traitement_variables.h"
-#include "utils_real.h"
-#include "utils_str.h"
 #include "transaction_list.h"
 #include "transaction_list_select.h"
+#include "utils_dates.h"
+#include "utils_editables.h"
 #include "utils_operations.h"
-#include "fenetre_principale.h"
-#include "mouse.h"
-#include "structures.h"
+#include "utils_real.h"
+#include "utils_str.h"
 #include "erreur.h"
 /*END_INCLUDE*/
 
@@ -3170,7 +3170,7 @@ void gsb_form_take_datas_from_form ( gint transaction_number,
         {
             gsb_form_check_auto_separator (element -> element_widget);
 		    gsb_data_mix_set_amount ( transaction_number, gsb_real_opposite (
-                        gsb_utils_edit_calculate_entry ( element -> element_widget )),
+                        utils_real_get_calculate_entry ( element -> element_widget )),
                         is_transaction);
         }
 		break;
@@ -3180,7 +3180,7 @@ void gsb_form_take_datas_from_form ( gint transaction_number,
         {
             gsb_form_check_auto_separator (element -> element_widget);
 		    gsb_data_mix_set_amount ( transaction_number,
-                        gsb_utils_edit_calculate_entry ( element -> element_widget ),
+                        utils_real_get_calculate_entry ( element -> element_widget ),
                         is_transaction);
         }
 		break;
diff --git a/src/gsb_reconcile.c b/src/gsb_reconcile.c
index 7e47229..1e2c5c5 100644
--- a/src/gsb_reconcile.c
+++ b/src/gsb_reconcile.c
@@ -59,7 +59,6 @@
 #include "transaction_list.h"
 #include "transaction_list_sort.h"
 #include "utils_dates.h"
-#include "utils_editables.h"
 #include "utils_real.h"
 #include "utils_str.h"
 /*END_INCLUDE*/
@@ -799,7 +798,7 @@ gboolean gsb_reconcile_update_amounts ( GtkWidget *entry,
     }
 
     currency_number = gsb_data_account_get_currency ( account_number );
-    amount = gsb_utils_edit_calculate_entry ( reconcile_final_balance_entry );
+    amount = utils_real_get_calculate_entry ( reconcile_final_balance_entry );
     final_balance = utils_real_get_string_with_currency ( amount, currency_number, FALSE );
     gtk_label_set_text ( GTK_LABEL ( reconcile_final_balance_label ), final_balance );
 
diff --git a/src/utils_editables.c b/src/utils_editables.c
index ba8b8b1..ec8c03b 100644
--- a/src/utils_editables.c
+++ b/src/utils_editables.c
@@ -31,7 +31,6 @@
 
 /*START_INCLUDE*/
 #include "utils_editables.h"
-#include "gsb_real.h"
 #include "utils_real.h"
 #include "utils_str.h"
 /*END_INCLUDE*/
@@ -137,88 +136,6 @@ void increment_decrement_champ ( GtkWidget *entry, gint increment )
 }
 
 
-/**
- * calcule le total du contenu de l'entrée donnée en argument 
- * accepte les + et les - 
- * 
- * \param entry entrée d'un montant 
- * 
- * \return gsb_real total de ce qui est dans l'entrée 
- */
-gsb_real gsb_utils_edit_calculate_entry ( GtkWidget *entry )
-{
-    gchar *string;
-    gchar *pointeur;
-    gsb_real total = null_real;
-	
-    string = my_strdup ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ) );
-
-    if ( string && strlen ( string ) )
-        pointeur = string + strlen ( string );
-    else
-    {
-        if ( string )
-            g_free ( string );
-        return total;
-    }
-
-    if ( g_utf8_strchr ( string, -1, '-' ) || g_utf8_strchr ( string, -1, '+' ) )
-    {
-        while ( pointeur != string )
-        {
-            if ( pointeur[0] == '+'
-                 ||
-                 pointeur[0] == '-' )
-            {
-                total = gsb_real_add ( total,
-                            utils_real_get_from_string ( pointeur ) );
-                pointeur[0] = 0;
-            }
-            
-            pointeur--;
-        }
-        total = gsb_real_add ( total,
-                        utils_real_get_from_string ( pointeur ) );
-    }
-    else if ( g_utf8_strchr ( string, -1, '*' ) )
-    {
-        total.mantissa = 1;
-        total.exponent = 0;
-
-        while ( pointeur != string )
-        {
-            if ( pointeur[0] == '*' )
-            {
-                total = gsb_real_mul ( total,
-                            utils_real_get_from_string ( pointeur + 1 ) );
-                pointeur[0] = 0;
-            }
-            
-            pointeur--;
-        }
-        total = gsb_real_mul ( total,
-                        utils_real_get_from_string ( pointeur ) );
-    }
-    else if ( g_utf8_strchr ( string, -1, '/' ) )
-    {
-        gchar **tab;
-
-        tab = g_strsplit ( string, "/", 2 );
-
-        total = gsb_real_div ( utils_real_get_from_string ( tab[0] ),
-                        utils_real_get_from_string ( tab[1] ) );
-
-        g_strfreev ( tab );
-    }
-    else
-        total = utils_real_get_from_string ( string );
-
-    g_free ( string );
-
-    return total;
-}
-
-
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/utils_editables.h b/src/utils_editables.h
index 13f010e..a564b7a 100644
--- a/src/utils_editables.h
+++ b/src/utils_editables.h
@@ -4,7 +4,6 @@
 #include <gtk/gtk.h>
 
 /* START_INCLUDE_H */
-#include "gsb_real.h"
 /* END_INCLUDE_H */
 
 
@@ -13,7 +12,6 @@ gboolean gsb_editable_erase_text_view ( GtkWidget *button,
 					GtkWidget *text_view );
 gchar *gsb_editable_text_view_get_content ( GtkWidget *text_view );
 GtkWidget *gsb_editable_text_view_new ( const gchar *value );
-gsb_real gsb_utils_edit_calculate_entry ( GtkWidget *entry );
 void increment_decrement_champ ( GtkWidget *entry, gint increment );
 /* END_DECLARATION */
 #endif
diff --git a/src/utils_real.c b/src/utils_real.c
index 6943f8e..b7cfb1b 100644
--- a/src/utils_real.c
+++ b/src/utils_real.c
@@ -24,11 +24,13 @@
 #endif
 
 #include "include.h"
+#include <string.h>
 
 /*START_INCLUDE*/
 #include "utils_real.h"
 #include "gsb_data_currency.h"
 #include "gsb_locale.h"
+#include "utils_str.h"
 /*END_INCLUDE*/
 
 /*START_EXTERN*/
@@ -153,6 +155,88 @@ gchar *utils_real_get_string_with_currency_from_double ( gdouble number,
 }
 
 
+/**
+ * calcule le total du contenu de l'entrée donnée en argument
+ * accepte les + et les - * /
+ *
+ * \param entry         entrée d'un montant
+ *
+ * \return gsb_real     total de ce qui est dans l'entrée
+ */
+gsb_real utils_real_get_calculate_entry ( GtkWidget *entry )
+{
+    gchar *string;
+    gchar *pointeur;
+    gsb_real total = null_real;
+	
+    string = my_strdup ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ) );
+
+    if ( string && strlen ( string ) )
+        pointeur = string + strlen ( string );
+    else
+    {
+        if ( string )
+            g_free ( string );
+        return total;
+    }
+
+    if ( g_utf8_strchr ( string, -1, '-' ) || g_utf8_strchr ( string, -1, '+' ) )
+    {
+        while ( pointeur != string )
+        {
+            if ( pointeur[0] == '+'
+                 ||
+                 pointeur[0] == '-' )
+            {
+                total = gsb_real_add ( total,
+                            utils_real_get_from_string ( pointeur ) );
+                pointeur[0] = 0;
+            }
+            
+            pointeur--;
+        }
+        total = gsb_real_add ( total,
+                        utils_real_get_from_string ( pointeur ) );
+    }
+    else if ( g_utf8_strchr ( string, -1, '*' ) )
+    {
+        total.mantissa = 1;
+        total.exponent = 0;
+
+        while ( pointeur != string )
+        {
+            if ( pointeur[0] == '*' )
+            {
+                total = gsb_real_mul ( total,
+                            utils_real_get_from_string ( pointeur + 1 ) );
+                pointeur[0] = 0;
+            }
+            
+            pointeur--;
+        }
+        total = gsb_real_mul ( total,
+                        utils_real_get_from_string ( pointeur ) );
+    }
+    else if ( g_utf8_strchr ( string, -1, '/' ) )
+    {
+        gchar **tab;
+
+        tab = g_strsplit ( string, "/", 2 );
+
+        total = gsb_real_div ( utils_real_get_from_string ( tab[0] ),
+                        utils_real_get_from_string ( tab[1] ) );
+
+        g_strfreev ( tab );
+    }
+    else
+        total = utils_real_get_from_string ( string );
+
+    g_free ( string );
+
+    return total;
+}
+
+
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */
diff --git a/src/utils_real.h b/src/utils_real.h
index 5345a9b..bfd29ef 100644
--- a/src/utils_real.h
+++ b/src/utils_real.h
@@ -1,8 +1,11 @@
 #ifndef _UTILS_REAL_H
 #define _UTILS_REAL_H
 
-#include <glib.h>
+#include <gtk/gtk.h>
+
+/* START_INCLUDE_H */
 #include "gsb_real.h"
+/* END_INCLUDE_H */
 
 gchar *utils_real_get_string ( gsb_real number );
 
@@ -13,6 +16,7 @@ gchar *utils_real_get_string_with_currency ( gsb_real number,
 gchar *utils_real_get_string_with_currency_from_double ( gdouble number,
                         gint account_number );
 
+gsb_real utils_real_get_calculate_entry ( GtkWidget *entry );
 gsb_real utils_real_get_from_string ( const gchar *string );
 
 #endif


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list