[grisbi-cvs] grisbi/src gsb_account_property.c, 1.29, 1.30 gsb_account_property.h, 1.3, 1.4 gsb_bank.c, 1.17, 1.18 gsb_data_account.c, 1.67, 1.68 gsb_data_bank.c, 1.9, 1.10 gsb_data_bank.h, 1.3, 1.4 gsb_data_budget.c, 1.46, 1.47 gsb_data_category.c, 1.65, 1.66 gsb_data_payee.c, 1.42, 1.43 gsb_file_load.c, 1.160, 1.161 gsb_file_save.c, 1.120, 1.121 navigation.c, 1.113, 1.114 tiers_onglet.c, 1.156, 1.157
Pierre Biava
pbiava at users.sourceforge.net
Tue Apr 7 23:07:42 CEST 2009
- Previous message: [grisbi-cvs] grisbi/po cs.po, 1.28, 1.29 da.po, 1.35, 1.36 de.po, 1.78, 1.79 es.po, 1.71, 1.72 fa.po, 1.22, 1.23 fr.po, 1.150, 1.151 grisbi.pot, 1.70, 1.71 he.po, 1.28, 1.29 it.po, 1.28, 1.29 nl.po, 1.27, 1.28 pl.po, 1.33, 1.34 pt_BR.po, 1.30, 1.31 ro.po, 1.28, 1.29 ru.po, 1.27, 1.28 zh_CN.po, 1.22, 1.23
- Next message: [grisbi-cvs] grisbi/po es.po,1.72,1.73
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29615/src
Modified Files:
gsb_account_property.c gsb_account_property.h gsb_bank.c
gsb_data_account.c gsb_data_bank.c gsb_data_bank.h
gsb_data_budget.c gsb_data_category.c gsb_data_payee.c
gsb_file_load.c gsb_file_save.c navigation.c tiers_onglet.c
Log Message:
Addition of the number BIC for Martin and correction of bugs miners. update strings fr.po
Index: gsb_data_budget.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_budget.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- gsb_data_budget.c 19 Mar 2009 22:31:38 -0000 1.46
+++ gsb_data_budget.c 7 Apr 2009 21:07:40 -0000 1.47
@@ -1300,9 +1300,10 @@
if ( budget )
{
budget -> budget_nb_transactions ++;
- budget -> budget_balance = gsb_real_add ( budget -> budget_balance,
- gsb_data_transaction_get_adjusted_amount_for_currency ( transaction_number,
- budgetary_line_tree_currency (), -1));
+ if ( ! gsb_data_transaction_get_split_of_transaction ( transaction_number ) )
+ budget -> budget_balance = gsb_real_add ( budget -> budget_balance,
+ gsb_data_transaction_get_adjusted_amount_for_currency (
+ transaction_number, budgetary_line_tree_currency (), -1));
}
/* if we are on empty_budget, no sub-budget */
@@ -1312,16 +1313,20 @@
if ( sub_budget )
{
sub_budget -> sub_budget_nb_transactions ++;
- sub_budget -> sub_budget_balance = gsb_real_add ( sub_budget -> sub_budget_balance,
- gsb_data_transaction_get_adjusted_amount_for_currency ( transaction_number,
- budgetary_line_tree_currency (), -1));
+ if ( ! gsb_data_transaction_get_split_of_transaction ( transaction_number ) )
+ sub_budget -> sub_budget_balance = gsb_real_add (
+ sub_budget -> sub_budget_balance,
+ gsb_data_transaction_get_adjusted_amount_for_currency (
+ transaction_number, budgetary_line_tree_currency (), -1));
}
else
{
budget -> budget_nb_direct_transactions ++;
- budget -> budget_direct_balance = gsb_real_add ( budget -> budget_direct_balance,
- gsb_data_transaction_get_adjusted_amount_for_currency ( transaction_number,
- budgetary_line_tree_currency (), -1));
+ if ( ! gsb_data_transaction_get_split_of_transaction ( transaction_number ) )
+ budget -> budget_direct_balance = gsb_real_add (
+ budget -> budget_direct_balance,
+ gsb_data_transaction_get_adjusted_amount_for_currency (
+ transaction_number, budgetary_line_tree_currency (), -1));
}
}
Index: gsb_data_payee.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_payee.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- gsb_data_payee.c 22 Mar 2009 18:53:25 -0000 1.42
+++ gsb_data_payee.c 7 Apr 2009 21:07:40 -0000 1.43
@@ -1,9 +1,9 @@
/* ************************************************************************** */
/* */
/* */
-/* Copyright (C) 2000-2008 Cédric Auger (cedric at grisbi.org) */
-/* 2003-2008 Benjamin Drieu (bdrieu at april.org) */
-/* http://www.grisbi.org */
+/* Copyright (C) 2000-2008 Cédric Auger (cedric at grisbi.org) */
+/* 2003-2008 Benjamin Drieu (bdrieu at april.org) */
+/* http://www.grisbi.org */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
@@ -266,6 +266,8 @@
g_free ( payee -> payee_name);
if ( payee -> payee_description)
g_free ( payee -> payee_description);
+ if ( payee -> payee_search_string)
+ g_free ( payee -> payee_search_string);
g_free ( payee );
if ( payee_buffer == payee )
payee_buffer = NULL;
Index: gsb_data_bank.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_bank.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- gsb_data_bank.c 4 Oct 2008 14:40:12 -0000 1.9
+++ gsb_data_bank.c 7 Apr 2009 21:07:40 -0000 1.10
@@ -1,8 +1,8 @@
/* ************************************************************************** */
/* */
-/* Copyright (C) 2000-2008 Cédric Auger (cedric at grisbi.org) */
-/* 2003-2008 Benjamin Drieu (bdrieu at april.org) */
-/* http://www.grisbi.org */
+/* Copyright (C) 2000-2008 Cédric Auger (cedric at grisbi.org) */
+/* 2003-2008 Benjamin Drieu (bdrieu at april.org) */
+/* http://www.grisbi.org */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
@@ -46,6 +46,7 @@
gint bank_number;
gchar *bank_name;
gchar *bank_code;
+ gchar *bank_BIC; /* BIC number */
gchar *bank_address;
gchar *bank_tel;
@@ -237,6 +238,8 @@
g_free ( bank -> bank_name );
if ( bank -> bank_code )
g_free ( bank -> bank_code );
+ if ( bank -> bank_BIC )
+ g_free ( bank -> bank_BIC );
if ( bank -> bank_address )
g_free ( bank -> bank_address );
if ( bank -> bank_web )
@@ -868,4 +871,51 @@
}
+/**
+ * return the BIC code of the bank
+ *
+ * \param bank_number the number of the bank
+ *
+ * \return the bank_BIC of the bank or NULL if problem
+ * */
+const gchar *gsb_data_bank_get_bic ( gint bank_number )
+{
+ struct_bank *bank;
+
+ bank = gsb_data_bank_get_structure ( bank_number );
+
+ if (!bank)
+ return NULL;
+
+ return bank -> bank_BIC;
+}
+
+
+/**
+ * set the BIC code of the bank
+ * the value is dupplicate in memory
+ *
+ * \param bank_number the number of the bank
+ * \param the BIC of the bank
+ *
+ * \return TRUE if ok or FALSE if problem
+ * */
+gboolean gsb_data_bank_set_bic ( gint bank_number, const gchar *bank_BIC )
+{
+ struct_bank *bank;
+
+ bank = gsb_data_bank_get_structure ( bank_number );
+
+ if (!bank)
+ return FALSE;
+
+ /* we free the last */
+ if ( bank -> bank_BIC )
+ g_free (bank -> bank_BIC);
+
+ /* and copy the new one */
+ bank -> bank_BIC = my_strdup (bank_BIC);
+
+ return TRUE;
+}
Index: gsb_file_save.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_save.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -d -r1.120 -r1.121
--- gsb_file_save.c 4 Apr 2009 19:51:41 -0000 1.120
+++ gsb_file_save.c 7 Apr 2009 21:07:40 -0000 1.121
@@ -1563,19 +1563,20 @@
bank_number = gsb_data_bank_get_no_bank (list_tmp -> data);
/* now we can fill the file content */
- new_string = g_markup_printf_escaped ( "\t<Bank Nb=\"%d\" Na=\"%s\" Co=\"%s\" Adr=\"%s\" Tel=\"%s\" Mail=\"%s\" Web=\"%s\" Nac=\"%s\" Faxc=\"%s\" Telc=\"%s\" Mailc=\"%s\" Rem=\"%s\" />\n",
- bank_number,
- gsb_data_bank_get_name (bank_number),
- gsb_data_bank_get_code (bank_number),
- gsb_data_bank_get_bank_address (bank_number),
- gsb_data_bank_get_bank_tel (bank_number),
- gsb_data_bank_get_bank_mail (bank_number),
- gsb_data_bank_get_bank_web (bank_number),
- gsb_data_bank_get_correspondent_name (bank_number),
- gsb_data_bank_get_correspondent_fax (bank_number),
- gsb_data_bank_get_correspondent_tel (bank_number),
- gsb_data_bank_get_correspondent_mail (bank_number),
- gsb_data_bank_get_bank_note (bank_number));
+ new_string = g_markup_printf_escaped ( "\t<Bank Nb=\"%d\" Na=\"%s\" Co=\"%s\" BIC=\"%s\" Adr=\"%s\" Tel=\"%s\" Mail=\"%s\" Web=\"%s\" Nac=\"%s\" Faxc=\"%s\" Telc=\"%s\" Mailc=\"%s\" Rem=\"%s\" />\n",
+ bank_number,
+ gsb_data_bank_get_name (bank_number),
+ gsb_data_bank_get_code (bank_number),
+ gsb_data_bank_get_bic (bank_number),
+ gsb_data_bank_get_bank_address (bank_number),
+ gsb_data_bank_get_bank_tel (bank_number),
+ gsb_data_bank_get_bank_mail (bank_number),
+ gsb_data_bank_get_bank_web (bank_number),
+ gsb_data_bank_get_correspondent_name (bank_number),
+ gsb_data_bank_get_correspondent_fax (bank_number),
+ gsb_data_bank_get_correspondent_tel (bank_number),
+ gsb_data_bank_get_correspondent_mail (bank_number),
+ gsb_data_bank_get_bank_note (bank_number));
/* append the new string to the file content
* and take the new iterator */
Index: navigation.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/navigation.c,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -d -r1.113 -r1.114
--- navigation.c 5 Mar 2009 19:12:30 -0000 1.113
+++ navigation.c 7 Apr 2009 21:07:40 -0000 1.114
@@ -1,8 +1,8 @@
/* ************************************************************************** */
/* */
-/* Copyright (C) 2000-2008 Cédric Auger (cedric at grisbi.org) */
-/* 2003-2008 Benjamin Drieu (bdrieu at april.org) */
-/* http://www.grisbi.org */
+/* Copyright (C) 2000-2008 Cédric Auger (cedric at grisbi.org) */
+/* 2003-2008 Benjamin Drieu (bdrieu at april.org) */
+/* http://www.grisbi.org */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
Index: gsb_data_bank.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_bank.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- gsb_data_bank.h 1 Sep 2007 09:25:56 -0000 1.3
+++ gsb_data_bank.h 7 Apr 2009 21:07:40 -0000 1.4
@@ -12,6 +12,7 @@
const gchar *gsb_data_bank_get_bank_note ( gint bank_number );
const gchar *gsb_data_bank_get_bank_tel ( gint bank_number );
const gchar *gsb_data_bank_get_bank_web ( gint bank_number );
+const gchar *gsb_data_bank_get_bic ( gint bank_number );
const gchar *gsb_data_bank_get_code ( gint bank_number );
const gchar *gsb_data_bank_get_correspondent_fax ( gint bank_number );
const gchar *gsb_data_bank_get_correspondent_mail ( gint bank_number );
@@ -33,6 +34,7 @@
const gchar *bank_tel );
gboolean gsb_data_bank_set_bank_web ( gint bank_number,
const gchar *bank_web );
+gboolean gsb_data_bank_set_bic ( gint bank_number, const gchar *bank_BIC );
gboolean gsb_data_bank_set_code ( gint bank_number,
const gchar *bank_code );
gboolean gsb_data_bank_set_correspondent_fax ( gint bank_number,
Index: gsb_data_category.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_category.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- gsb_data_category.c 5 Mar 2009 19:12:29 -0000 1.65
+++ gsb_data_category.c 7 Apr 2009 21:07:40 -0000 1.66
@@ -1400,9 +1400,10 @@
if ( category )
{
category -> category_nb_transactions ++;
- category -> category_balance = gsb_real_add ( category -> category_balance,
- gsb_data_transaction_get_adjusted_amount_for_currency ( transaction_number,
- category_tree_currency (), -1));
+ if ( ! gsb_data_transaction_get_split_of_transaction ( transaction_number ) )
+ category -> category_balance = gsb_real_add ( category -> category_balance,
+ gsb_data_transaction_get_adjusted_amount_for_currency (
+ transaction_number, category_tree_currency (), -1));
}
/* if we were on empty category, no sub-category */
@@ -1412,16 +1413,20 @@
if ( sub_category )
{
sub_category -> sub_category_nb_transactions ++;
- sub_category -> sub_category_balance = gsb_real_add ( sub_category -> sub_category_balance,
- gsb_data_transaction_get_adjusted_amount_for_currency ( transaction_number,
- category_tree_currency (), -1));
+ if ( ! gsb_data_transaction_get_split_of_transaction ( transaction_number ) )
+ sub_category -> sub_category_balance = gsb_real_add (
+ sub_category -> sub_category_balance,
+ gsb_data_transaction_get_adjusted_amount_for_currency (
+ transaction_number, category_tree_currency (), -1));
}
else
{
category -> category_nb_direct_transactions ++;
- category -> category_direct_balance = gsb_real_add ( category -> category_direct_balance,
- gsb_data_transaction_get_adjusted_amount_for_currency ( transaction_number,
- category_tree_currency (), -1));
+ if ( ! gsb_data_transaction_get_split_of_transaction ( transaction_number ) )
+ category -> category_direct_balance = gsb_real_add (
+ category -> category_direct_balance,
+ gsb_data_transaction_get_adjusted_amount_for_currency (
+ transaction_number, category_tree_currency (), -1));
}
}
Index: gsb_account_property.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_account_property.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- gsb_account_property.c 5 Apr 2009 20:03:25 -0000 1.29
+++ gsb_account_property.c 7 Apr 2009 21:07:40 -0000 1.30
@@ -97,7 +97,7 @@
gpointer data );
static gboolean gsb_account_property_iban_set_bank_from_iban ( gchar *iban );
static void gsb_account_property_iban_set_iban ( const gchar *iban );
-static void gsb_account_property_iban_set_sensitive_bank_data ( gboolean sensitive );
+static void gsb_account_property_iban_switch_bank_data ( gboolean sensitive );
/*END_STATIC*/
struct iso_13616_iban iso_13616_ibans [] = {
@@ -123,9 +123,9 @@
static GtkWidget *detail_titulaire_compte = NULL;
static GtkWidget *detail_adresse_titulaire = NULL;
static GtkWidget *bank_list_combobox = NULL;
-static GtkWidget *detail_no_compte = NULL;
static GtkWidget *label_code_banque = NULL;
static GtkWidget *detail_guichet = NULL;
+static GtkWidget *detail_no_compte = NULL;
static GtkWidget *detail_cle_compte = NULL;
GtkWidget *detail_devise_compte = NULL;
static GtkWidget *detail_compte_cloture = NULL;
@@ -136,6 +136,11 @@
static GtkWidget *button_holder_address = NULL;
static GtkWidget *bouton_icon = NULL;
static GtkWidget *detail_IBAN = NULL;
+static GtkWidget *label_code_bic = NULL;
+static GtkWidget *label_guichet = NULL;
+static GtkWidget *label_no_compte = NULL;
+static GtkWidget *label_cle_compte = NULL;
+
enum origin
{
@@ -370,6 +375,23 @@
bank_list_combobox );
gtk_box_pack_start ( GTK_BOX ( hbox ), edit_bank_button, FALSE, FALSE, 0 );
+ /* création du numéro BIC */
+ hbox = gtk_hbox_new ( FALSE, 6 );
+ gtk_box_pack_start ( GTK_BOX(paddingbox), hbox, FALSE, FALSE, 0 );
+
+ label = gtk_label_new ( COLON(_("BIC code")) );
+ gtk_misc_set_alignment ( GTK_MISC(label), MISC_LEFT, MISC_VERT_CENTER );
+ gtk_size_group_add_widget ( GTK_SIZE_GROUP ( size_group ), label );
+ gtk_box_pack_start ( GTK_BOX(hbox), label, FALSE, FALSE, 0);
+
+ label_code_bic = gtk_label_new ( NULL );
+ g_signal_connect ( G_OBJECT (label_code_bic ), "destroy",
+ G_CALLBACK ( gtk_widget_destroyed), &label_code_bic );
+ gtk_misc_set_alignment ( GTK_MISC(label), MISC_LEFT, MISC_VERT_CENTER );
+ gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_RIGHT );
+ gtk_box_pack_start ( GTK_BOX(hbox), label_code_bic, FALSE, FALSE, 0 );
+ g_object_set_data ( G_OBJECT (label_code_bic), "label", label );
+
/* création de la ligne du numéro IBAN */
hbox = gtk_hbox_new ( FALSE, 6 );
gtk_box_pack_start ( GTK_BOX(paddingbox), hbox, FALSE, FALSE, 0 );
@@ -398,7 +420,7 @@
g_signal_connect ( G_OBJECT (detail_IBAN ), "destroy",
G_CALLBACK ( gtk_widget_destroyed), &detail_IBAN );
- gtk_widget_set_size_request ( detail_IBAN, 280, -1 );
+ gtk_widget_set_size_request ( detail_IBAN, 350, -1 );
gtk_box_pack_start ( GTK_BOX ( hbox ), detail_IBAN, FALSE, FALSE, 0 );
/* create the code of bank */
@@ -433,6 +455,13 @@
G_CALLBACK ( gtk_widget_destroyed), &detail_guichet );
gtk_box_pack_start ( GTK_BOX(hbox), detail_guichet, TRUE, TRUE, 0);
+ label_guichet = gtk_label_new ( NULL );
+ g_signal_connect ( G_OBJECT (label_guichet ), "destroy",
+ G_CALLBACK ( gtk_widget_destroyed), &label_guichet );
+ gtk_misc_set_alignment ( GTK_MISC(label), MISC_LEFT, MISC_VERT_CENTER );
+ gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_RIGHT );
+ gtk_box_pack_start ( GTK_BOX(hbox), label_guichet, FALSE, FALSE, 0 );
+
/* création de la ligne du numéro du compte */
hbox = gtk_hbox_new ( FALSE, 6 );
gtk_box_pack_start ( GTK_BOX(paddingbox), hbox, FALSE, FALSE, 0 );
@@ -449,6 +478,13 @@
G_CALLBACK ( gtk_widget_destroyed), &detail_no_compte );
gtk_box_pack_start ( GTK_BOX ( hbox ), detail_no_compte, TRUE, TRUE, 0 );
+ label_no_compte = gtk_label_new ( NULL );
+ g_signal_connect ( G_OBJECT (label_no_compte ), "destroy",
+ G_CALLBACK ( gtk_widget_destroyed), &label_no_compte );
+ gtk_misc_set_alignment ( GTK_MISC(label), MISC_LEFT, MISC_VERT_CENTER );
+ gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_RIGHT );
+ gtk_box_pack_start ( GTK_BOX(hbox), label_no_compte, FALSE, FALSE, 0 );
+
detail_cle_compte = gsb_autofunc_entry_new ( NULL,
NULL, NULL,
G_CALLBACK (gsb_data_account_set_bank_account_key), 0);
@@ -457,6 +493,13 @@
gtk_widget_set_size_request ( detail_cle_compte, 30, -1 );
gtk_box_pack_start ( GTK_BOX ( hbox ), detail_cle_compte, FALSE, FALSE, 0 );
+ label_cle_compte = gtk_label_new ( NULL );
+ g_signal_connect ( G_OBJECT (label_cle_compte ), "destroy",
+ G_CALLBACK ( gtk_widget_destroyed), &label_cle_compte );
+ gtk_misc_set_alignment ( GTK_MISC(label), MISC_LEFT, MISC_VERT_CENTER );
+ gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_RIGHT );
+ gtk_box_pack_start ( GTK_BOX(hbox), label_cle_compte, FALSE, FALSE, 0 );
+
/* création de la ligne du solde initial */
paddingbox = new_paddingbox_with_title ( vbox, FALSE, _("Balances"));
@@ -577,14 +620,16 @@
/* fill bank informations */
bank_number = gsb_data_account_get_bank (current_account);
+ gsb_account_property_set_label_code_bic ( bank_number );
+
gsb_account_property_iban_set_iban (
gsb_data_account_get_bank_account_iban (current_account) );
if ( gsb_account_property_iban_set_bank_from_iban (
gsb_data_account_get_bank_account_iban (current_account)) )
- gsb_account_property_iban_set_sensitive_bank_data ( FALSE );
+ gsb_account_property_iban_switch_bank_data ( FALSE );
else
- gsb_account_property_iban_set_sensitive_bank_data ( TRUE );
+ gsb_account_property_iban_switch_bank_data ( TRUE );
gsb_autofunc_real_set ( detail_solde_init,
gsb_data_account_get_init_balance (current_account,
@@ -847,7 +892,33 @@
*
*
*
- * */
+ **/
+void gsb_account_property_set_label_code_bic ( gint bank_number )
+{
+ GtkWidget *label;
+
+ label = g_object_get_data ( G_OBJECT (label_code_bic), "label" );
+ if ( gsb_data_bank_get_bic ( bank_number ) )
+ {
+ gtk_label_set_text ( GTK_LABEL (label_code_bic),
+ gsb_data_bank_get_bic ( bank_number ) );
+ gtk_widget_show ( GTK_WIDGET (label) );
+ gtk_widget_show ( GTK_WIDGET (label_code_bic) );
+ }
+ else
+ {
+ gtk_widget_hide ( GTK_WIDGET (label) );
+ gtk_widget_hide ( GTK_WIDGET (label_code_bic) );
+ }
+}
+
+
+/**
+ *
+ *
+ *
+ *
+ **/
void gsb_account_property_iban_insert_text ( GtkEditable *entry,
gchar *text,
gint length,
@@ -874,9 +945,9 @@
/* on autorise ou pas la saisie des données banquaires */
if ( g_utf8_strlen (iban, -1) == 0 )
- gsb_account_property_iban_set_sensitive_bank_data ( TRUE );
+ gsb_account_property_iban_switch_bank_data ( TRUE );
else if ( GTK_WIDGET_IS_SENSITIVE ( bank_list_combobox ) )
- gsb_account_property_iban_set_sensitive_bank_data ( FALSE );
+ gsb_account_property_iban_switch_bank_data ( FALSE );
/* on contrôle l'existence d'un modèle pour le numéro IBAN */
if ( g_utf8_strlen (iban, -1) >= 2 )
@@ -914,9 +985,9 @@
{
/* on autorise ou pas la saisie des données banquaires */
if ( start_pos == 0 )
- gsb_account_property_iban_set_sensitive_bank_data ( TRUE );
+ gsb_account_property_iban_switch_bank_data ( TRUE );
else if ( GTK_WIDGET_IS_SENSITIVE ( bank_list_combobox ) )
- gsb_account_property_iban_set_sensitive_bank_data ( FALSE );
+ gsb_account_property_iban_switch_bank_data ( FALSE );
}
@@ -1105,7 +1176,7 @@
{
gsb_bank_list_set_bank (bank_list_combobox, 0, current_account );
gtk_label_set_text ( GTK_LABEL (label_code_banque), "" );
- gsb_account_property_iban_set_sensitive_bank_data ( TRUE );
+ gsb_account_property_iban_switch_bank_data ( TRUE );
return FALSE;
}
@@ -1143,7 +1214,6 @@
code = g_utf8_strncpy ( code, ptr_1, (pos_char_2 - pos_char_1) + 1 );
gtk_label_set_text ( GTK_LABEL (label_code_banque), code );
- set_label = TRUE;
}
/* set bank_branch_code */
@@ -1166,16 +1236,7 @@
}
else
code = g_strdup ( "" );
-
- if ( g_object_get_data (G_OBJECT (detail_guichet), "changed") > 0 )
- g_signal_handler_block ( (gpointer *) detail_guichet,
- (gulong) g_object_get_data ( G_OBJECT
- (detail_guichet), "changed" ) );
- gtk_entry_set_text ( GTK_ENTRY (detail_guichet), code );
- if ( g_object_get_data (G_OBJECT (detail_guichet), "changed") > 0 )
- g_signal_handler_unblock ( (gpointer *) detail_guichet,
- (gulong) g_object_get_data ( G_OBJECT
- (detail_guichet), "changed" ) );
+ gtk_label_set_text ( GTK_LABEL (label_guichet), code );
/* set bank_account_number */
c = 'C';
@@ -1189,15 +1250,7 @@
pos_char_2 = g_utf8_pointer_to_offset ( model, ptr_2 );
code = g_utf8_strncpy ( code, ptr_1, (pos_char_2 - pos_char_1) + 1 );
- if ( g_object_get_data (G_OBJECT (detail_no_compte), "changed") > 0 )
- g_signal_handler_block ( (gpointer *) detail_no_compte,
- (gulong) g_object_get_data ( G_OBJECT
- (detail_no_compte), "changed" ) );
- gtk_entry_set_text ( GTK_ENTRY (detail_no_compte), code );
- if ( g_object_get_data (G_OBJECT (detail_no_compte), "changed") > 0 )
- g_signal_handler_unblock ( (gpointer *) detail_no_compte,
- (gulong) g_object_get_data ( G_OBJECT
- (detail_no_compte), "changed" ) );
+ gtk_label_set_text ( GTK_LABEL (label_no_compte), code );
}
/* set bank_account_key */
@@ -1215,15 +1268,7 @@
}
else
code = g_strdup ( "" );
- if ( g_object_get_data (G_OBJECT (detail_cle_compte), "changed") > 0 )
- g_signal_handler_block ( (gpointer *) detail_cle_compte,
- (gulong) g_object_get_data ( G_OBJECT
- (detail_cle_compte), "changed" ) );
- gtk_entry_set_text ( GTK_ENTRY (detail_cle_compte), code );
- if ( g_object_get_data (G_OBJECT (detail_cle_compte), "changed") > 0 )
- g_signal_handler_unblock ( (gpointer *) detail_cle_compte,
- (gulong) g_object_get_data ( G_OBJECT
- (detail_cle_compte), "changed" ) );
+ gtk_label_set_text ( GTK_LABEL (label_cle_compte), code );
g_free ( model );
g_free ( tmpstr );
@@ -1259,13 +1304,28 @@
*
*
* */
-void gsb_account_property_iban_set_sensitive_bank_data ( gboolean sensitive )
+void gsb_account_property_iban_switch_bank_data ( gboolean sensitive )
{
- gtk_widget_set_sensitive ( GTK_WIDGET (bank_list_combobox), sensitive );
- gtk_widget_set_sensitive ( GTK_WIDGET (label_code_banque), sensitive );
- gtk_widget_set_sensitive ( GTK_WIDGET (detail_guichet), sensitive );
- gtk_widget_set_sensitive ( GTK_WIDGET (detail_no_compte), sensitive );
- gtk_widget_set_sensitive ( GTK_WIDGET (detail_cle_compte), sensitive );
+ if ( sensitive )
+ {
+ gtk_widget_set_sensitive ( GTK_WIDGET (bank_list_combobox), sensitive );
+ gtk_widget_show ( GTK_WIDGET (detail_guichet) );
+ gtk_widget_hide ( GTK_WIDGET (label_guichet) );
+ gtk_widget_show ( GTK_WIDGET (detail_no_compte) );
+ gtk_widget_hide ( GTK_WIDGET (label_no_compte) );
+ gtk_widget_show ( GTK_WIDGET (detail_cle_compte) );
+ gtk_widget_hide ( GTK_WIDGET (label_cle_compte) );
+ }
+ else
+ {
+ gtk_widget_set_sensitive ( GTK_WIDGET (bank_list_combobox), sensitive );
+ gtk_widget_hide ( GTK_WIDGET (detail_guichet) );
+ gtk_widget_show ( GTK_WIDGET (label_guichet) );
+ gtk_widget_hide ( GTK_WIDGET (detail_no_compte) );
+ gtk_widget_show ( GTK_WIDGET (label_no_compte) );
+ gtk_widget_hide ( GTK_WIDGET (detail_cle_compte) );
+ gtk_widget_show ( GTK_WIDGET (label_cle_compte) );
+ }
}
@@ -1307,9 +1367,9 @@
return 0;
}
}
-
+
/* mise en forme de l'IBAN avant contrôle */
- tmpstr = g_strconcat ( tmpstr + 4, g_strndup (tmpstr, 4), NULL );
+ tmpstr = g_strconcat ( tmpstr + 4, g_strndup (tmpstr, 2), "00", NULL );
ptr = tmpstr;
while ( ptr[i] )
Index: gsb_data_account.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- gsb_data_account.c 4 Apr 2009 19:51:41 -0000 1.67
+++ gsb_data_account.c 7 Apr 2009 21:07:40 -0000 1.68
@@ -271,6 +271,8 @@
g_free ( account -> account_id );
if ( account -> account_name );
g_free ( account -> account_name );
+ if ( account -> name_icon );
+ g_free ( account -> name_icon );
if ( account -> comment );
g_free ( account -> comment );
if ( account -> holder_name );
@@ -283,6 +285,8 @@
g_free ( account -> bank_account_number );
if ( account -> bank_account_key );
g_free ( account -> bank_account_key );
+ if ( account -> bank_account_iban );
+ g_free ( account -> bank_account_iban );
/* TODO dOm : free row_align */
/* TODO dOm : free sort_list */
g_free ( account );
Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -d -r1.160 -r1.161
--- gsb_file_load.c 4 Apr 2009 19:51:41 -0000 1.160
+++ gsb_file_load.c 7 Apr 2009 21:07:40 -0000 1.161
@@ -2823,6 +2823,15 @@
continue;
}
+ if ( !strcmp ( attribute_names[i],
+ "BIC" ))
+ {
+ gsb_data_bank_set_bic ( bank_number,
+ attribute_values[i] );
+ i++;
+ continue;
+ }
+
if ( !strcmp ( attribute_names[i],
"Adr" ))
{
Index: gsb_account_property.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_account_property.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- gsb_account_property.h 24 Mar 2009 20:24:41 -0000 1.3
+++ gsb_account_property.h 7 Apr 2009 21:07:40 -0000 1.4
@@ -15,5 +15,6 @@
GtkWidget *gsb_account_property_create_page ( void );
void gsb_account_property_fill_page ( void );
void gsb_account_property_set_label_code_banque ( void );
+void gsb_account_property_set_label_code_bic ( gint bank_number );
/* END_DECLARATION */
#endif
Index: gsb_bank.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_bank.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- gsb_bank.c 5 Mar 2009 19:12:29 -0000 1.17
+++ gsb_bank.c 7 Apr 2009 21:07:40 -0000 1.18
@@ -33,6 +33,7 @@
/*START_INCLUDE*/
#include "gsb_bank.h"
#include "./dialog.h"
+#include "./gsb_account_property.h"
#include "./gsb_autofunc.h"
#include "./gsb_data_account.h"
#include "./gsb_data_bank.h"
@@ -45,25 +46,26 @@
/*START_STATIC*/
static gboolean gsb_bank_add ( GtkWidget *button,
- gpointer null );
+ gpointer null );
+static void gsb_bank_bic_code_changed ( GtkEntry *entry, gpointer data );
static gboolean gsb_bank_combobox_changed ( GtkWidget *combobox,
gboolean default_func (gint, gint));
static gboolean gsb_bank_create_combobox_model ( void );
static GtkWidget *gsb_bank_create_form ( GtkWidget *parent,
- GtkWidget *combobox );
+ GtkWidget *combobox );
static gboolean gsb_bank_delete ( GtkWidget *button,
- gpointer null );
+ gpointer null );
static gboolean gsb_bank_edit_bank ( gint bank_number,
- GtkWidget *combobox );
+ GtkWidget *combobox );
static gboolean gsb_bank_list_change_selection ( GtkTreeSelection *selection,
- GtkWidget *container );
+ GtkWidget *container );
static gboolean gsb_bank_list_changed ( GtkWidget *combobox,
- gpointer null );
+ gpointer null );
static gboolean gsb_bank_list_check_separator ( GtkTreeModel *model,
GtkTreeIter *iter,
gpointer null );
static gboolean gsb_bank_update_form ( gint bank_number,
- GtkWidget *frame );
+ GtkWidget *frame );
static gboolean gsb_bank_update_selected_line ( GtkEntry *entry,
GtkWidget *combobox );
static gboolean gsb_bank_update_selected_line_model ( GtkWidget *combobox );
@@ -93,6 +95,7 @@
static GtkWidget *delete_bank_button;
static GtkWidget *bank_name;
static GtkWidget *bank_code;
+static GtkWidget *bank_BIC;
static GtkWidget *bank_tel;
static GtkWidget *bank_adr;
static GtkWidget *bank_mail;
@@ -127,10 +130,10 @@
* \return GtkWidget * the combo_box
* */
GtkWidget *gsb_bank_create_combobox ( gint index,
- GCallback hook,
- gpointer data,
- GCallback default_func,
- gint number_for_func )
+ GCallback hook,
+ gpointer data,
+ GCallback default_func,
+ gint number_for_func )
{
GtkWidget *combo_box;
GtkCellRenderer *renderer;
@@ -215,8 +218,8 @@
* \return FALSE
* */
gboolean gsb_bank_list_set_bank ( GtkWidget *combobox,
- gint bank_number,
- gint number_for_func )
+ gint bank_number,
+ gint number_for_func )
{
GtkTreeIter iter;
@@ -313,7 +316,7 @@
* \return FALSE
* */
gboolean gsb_bank_edit_from_button ( GtkWidget *button,
- GtkWidget *combobox )
+ GtkWidget *combobox )
{
gint bank_number;
@@ -435,7 +438,7 @@
* \return TRUE if separator, FALSE if not
* */
static gboolean gsb_bank_list_check_separator ( GtkTreeModel *model,
- GtkTreeIter *iter,
+ GtkTreeIter *iter,
gpointer null )
{
gchar *value;
@@ -461,7 +464,7 @@
* \return FALSE
* */
static gboolean gsb_bank_list_changed ( GtkWidget *combobox,
- gpointer null )
+ gpointer null )
{
gint bank_number;
@@ -673,7 +676,7 @@
* \return FALSE
*/
static gboolean gsb_bank_list_change_selection ( GtkTreeSelection *selection,
- GtkWidget *container )
+ GtkWidget *container )
{
GtkTreeIter iter;
GtkTreeModel *model;
@@ -705,7 +708,7 @@
* \return the new widget
* */
static GtkWidget *gsb_bank_create_form ( GtkWidget *parent,
- GtkWidget *combobox )
+ GtkWidget *combobox )
{
GtkWidget * paddingbox, *table, *label, *scrolled_window;
GtkSizeGroup * size_group;
@@ -715,7 +718,7 @@
_("Bank details") );
/* Create a table to align things nicely */
- table = gtk_table_new ( 2, 2, FALSE );
+ table = gtk_table_new ( 10, 2, FALSE );
gtk_table_set_col_spacings ( GTK_TABLE ( table ), 5 );
gtk_table_set_row_spacings ( GTK_TABLE ( table ), 5 );
gtk_box_pack_start ( GTK_BOX ( paddingbox ), table,
@@ -752,12 +755,29 @@
GTK_EXPAND | GTK_FILL, 0,
0, 0 );
+ /* Bank BIC code item */
+ label = gtk_label_new ( COLON(_("BIC code")) );
+ gtk_misc_set_alignment (GTK_MISC (label), 0, 1);
+ gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_RIGHT );
+ gtk_table_attach ( GTK_TABLE ( table ),
+ label, 0, 1, 2, 3,
+ GTK_SHRINK | GTK_FILL, 0,
+ 0, 0 );
+ bank_BIC = gsb_autofunc_entry_new ( NULL,
+ G_CALLBACK (gsb_bank_bic_code_changed), NULL,
+ G_CALLBACK (gsb_data_bank_set_bic), 0);
+ gtk_size_group_add_widget ( size_group, bank_BIC );
+ gtk_table_attach ( GTK_TABLE ( table ),
+ bank_BIC, 1, 2, 2, 3,
+ GTK_EXPAND | GTK_FILL, 0,
+ 0, 0 );
+
/* Bank address */
label = gtk_label_new ( COLON(_("Address")) );
gtk_misc_set_alignment (GTK_MISC (label), 0, 1);
gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_RIGHT );
gtk_table_attach ( GTK_TABLE ( table ),
- label, 0, 1, 2, 3,
+ label, 0, 1, 4, 5,
GTK_SHRINK | GTK_FILL, 0,
0, 0 );
scrolled_window = gtk_scrolled_window_new ( FALSE, FALSE );
@@ -771,7 +791,7 @@
gtk_container_add ( GTK_CONTAINER ( scrolled_window ), bank_adr );
gtk_size_group_add_widget ( size_group, bank_adr );
gtk_table_attach ( GTK_TABLE ( table ),
- scrolled_window, 1, 2, 2, 3,
+ scrolled_window, 1, 2, 4, 5,
GTK_EXPAND | GTK_FILL, 0,
0, 0 );
@@ -780,13 +800,13 @@
gtk_misc_set_alignment (GTK_MISC (label), 0, 1);
gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_RIGHT );
gtk_table_attach ( GTK_TABLE ( table ),
- label, 0, 1, 4, 5,
+ label, 0, 1, 5, 6,
GTK_SHRINK | GTK_FILL, 0,
0, 0 );
bank_tel = gsb_autofunc_entry_new ( NULL, NULL, NULL, G_CALLBACK (gsb_data_bank_set_bank_tel), 0);
gtk_size_group_add_widget ( size_group, bank_tel );
gtk_table_attach ( GTK_TABLE ( table ),
- bank_tel, 1, 2, 4, 5,
+ bank_tel, 1, 2, 5, 6,
GTK_EXPAND | GTK_FILL, 0,
0, 0 );
@@ -795,13 +815,13 @@
gtk_misc_set_alignment (GTK_MISC (label), 0, 1);
gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_RIGHT );
gtk_table_attach ( GTK_TABLE ( table ),
- label, 0, 1, 3, 4,
+ label, 0, 1, 7, 8,
GTK_SHRINK | GTK_FILL, 0,
0, 0 );
bank_mail = gsb_autofunc_entry_new ( NULL, NULL, NULL, G_CALLBACK (gsb_data_bank_set_bank_mail), 0);
gtk_size_group_add_widget ( size_group, bank_mail );
gtk_table_attach ( GTK_TABLE ( table ),
- bank_mail, 1, 2, 3, 4,
+ bank_mail, 1, 2, 7, 8,
GTK_EXPAND | GTK_FILL, 0,
0, 0 );
@@ -810,13 +830,13 @@
gtk_misc_set_alignment (GTK_MISC (label), 0, 1);
gtk_label_set_justify ( GTK_LABEL(label), GTK_JUSTIFY_RIGHT );
gtk_table_attach ( GTK_TABLE ( table ),
- label, 0, 1, 5, 6,
+ label, 0, 1, 9, 10,
GTK_SHRINK | GTK_FILL, 0,
0, 0 );
bank_web = gsb_autofunc_entry_new ( NULL, NULL, NULL, G_CALLBACK (gsb_data_bank_set_bank_web), 0);
gtk_size_group_add_widget ( size_group, bank_web );
gtk_table_attach ( GTK_TABLE ( table ),
- bank_web, 1, 2, 5, 6,
+ bank_web, 1, 2, 9, 10,
GTK_EXPAND | GTK_FILL, 0,
0, 0 );
@@ -915,7 +935,7 @@
* \return FALSE
* */
static gboolean gsb_bank_update_form ( gint bank_number,
- GtkWidget *frame )
+ GtkWidget *frame )
{
gboolean value;
@@ -923,6 +943,8 @@
* will return NULL, and that's we want... */
gsb_autofunc_entry_set_value ( bank_name, gsb_data_bank_get_name (bank_number), bank_number);
gsb_autofunc_entry_set_value ( bank_code, gsb_data_bank_get_code (bank_number), bank_number);
+ gsb_autofunc_entry_set_value ( bank_BIC, gsb_data_bank_get_bic (bank_number), bank_number);
+
gsb_autofunc_entry_set_value ( bank_tel, gsb_data_bank_get_bank_tel (bank_number), bank_number);
gsb_autofunc_entry_set_value ( bank_mail, gsb_data_bank_get_bank_mail (bank_number), bank_number);
gsb_autofunc_entry_set_value ( bank_web, gsb_data_bank_get_bank_web (bank_number), bank_number);
@@ -960,7 +982,7 @@
* \return FALSE
* */
static gboolean gsb_bank_edit_bank ( gint bank_number,
- GtkWidget *combobox )
+ GtkWidget *combobox )
{
GtkWidget *dialog, *form, * scrolled_window, *vbox;
@@ -1062,7 +1084,7 @@
* \return FALSE
* */
static gboolean gsb_bank_add ( GtkWidget *button,
- gpointer null )
+ gpointer null )
{
gint bank_number;
/* create the new bank */
@@ -1128,7 +1150,7 @@
* \return FALSE
* */
static gboolean gsb_bank_delete ( GtkWidget *button,
- gpointer null )
+ gpointer null )
{
gint bank_number;
gboolean result;
@@ -1200,6 +1222,21 @@
}
+/**
+ * met à jour le label code BIC dans la vue account_property
+ *
+ * \param entry
+ * \param null
+ *
+ * */
+static void gsb_bank_bic_code_changed ( GtkEntry *entry, gpointer data )
+{
+ gint bank_number;
+
+ bank_number = GPOINTER_TO_INT ( g_object_get_data ( G_OBJECT (entry),
+ "number_for_func") );
+ gsb_account_property_set_label_code_bic ( bank_number );
+}
/* Local Variables: */
/* c-basic-offset: 4 */
Index: tiers_onglet.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/tiers_onglet.c,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- tiers_onglet.c 3 Apr 2009 19:42:11 -0000 1.156
+++ tiers_onglet.c 7 Apr 2009 21:07:40 -0000 1.157
@@ -709,7 +709,6 @@
}
-/* pbiava le 03/01/09*/
/* ******************************************************************************/
/* assistant de gestion des tiers : */
/* permet de modifier en masse le nom d'un tiers contenant une chaine */
- Previous message: [grisbi-cvs] grisbi/po cs.po, 1.28, 1.29 da.po, 1.35, 1.36 de.po, 1.78, 1.79 es.po, 1.71, 1.72 fa.po, 1.22, 1.23 fr.po, 1.150, 1.151 grisbi.pot, 1.70, 1.71 he.po, 1.28, 1.29 it.po, 1.28, 1.29 nl.po, 1.27, 1.28 pl.po, 1.33, 1.34 pt_BR.po, 1.30, 1.31 ro.po, 1.28, 1.29 ru.po, 1.27, 1.28 zh_CN.po, 1.22, 1.23
- Next message: [grisbi-cvs] grisbi/po es.po,1.72,1.73
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list