[grisbi-cvs] grisbi/src accueil.c, 1.226, 1.227 balance_estimate_data.c, 1.21, 1.22 balance_estimate_tab.c, 1.64, 1.65 gsb_autofunc.c, 1.26, 1.27 gsb_file_load.c, 1.219, 1.220 gsb_file_save.c, 1.164, 1.165 utils_str.h, 1.48, 1.49
Pierre Biava
pbiava at users.sourceforge.net
Tue Apr 20 23:34:35 CEST 2010
- Previous message: [grisbi-cvs] grisbi/po es.po,1.191,1.192
- Next message: [grisbi-cvs] grisbi/src accueil.c, 1.227, 1.228 balance_estimate_tab.c, 1.65, 1.66 gsb_account_property.c, 1.52, 1.53 gsb_data_transaction.c, 1.87, 1.88 gsb_file_load.c, 1.220, 1.221 structures.h, 1.245, 1.246
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/grisbi/grisbi/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv15460/src
Modified Files:
accueil.c balance_estimate_data.c balance_estimate_tab.c
gsb_autofunc.c gsb_file_load.c gsb_file_save.c utils_str.h
Log Message:
Add multiline in address of the account owner
Index: utils_str.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_str.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- utils_str.h 5 Apr 2010 21:24:53 -0000 1.48
+++ utils_str.h 20 Apr 2010 21:34:33 -0000 1.49
@@ -1,5 +1,13 @@
#ifndef _UTILS_STR_H
#define _UTILS_STR_H (1)
+
+#ifdef _WIN32
+#define NEW_LINE "\r\n"
+#else
+#define NEW_LINE "\n"
+#endif
+
+
/* START_INCLUDE_H */
/* END_INCLUDE_H */
Index: gsb_file_save.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_save.c,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -d -r1.164 -r1.165
--- gsb_file_save.c 17 Apr 2010 15:37:03 -0000 1.164
+++ gsb_file_save.c 20 Apr 2010 21:34:33 -0000 1.165
@@ -935,6 +935,8 @@
gchar *init_balance;
gchar *mini_wanted;
gchar *mini_auto;
+ gchar **owner_tab;
+ gchar *owner_str;
account_number = gsb_data_account_get_no_account ( list_tmp -> data );
@@ -1026,9 +1028,21 @@
mini_auto = gsb_real_save_real_to_string (
gsb_data_account_get_mini_balance_authorized ( account_number ), 2 );
+ /* protect the owner adress */
+ owner_str = g_strdup ( my_safe_null_str (
+ gsb_data_account_get_holder_address ( account_number ) ) );
+ if ( g_strstr_len ( owner_str, -1, NEW_LINE ) )
+ {
+ owner_tab = g_strsplit ( owner_str, NEW_LINE, 0 );
+ g_free ( owner_str );
+ owner_str = g_strjoinv ( "
", owner_tab );
+
+ g_strfreev ( owner_tab );
+ }
+
/* now we can fill the file content */
new_string = g_markup_printf_escaped ( "\t<Account\n"
- "\t\tName=\"%s\"\n"
+ "\t\tName=\"%s\"\n"
"\t\tId=\"%s\"\n"
"\t\tNumber=\"%d\"\n"
"\t\tOwner=\"%s\"\n"
@@ -1090,7 +1104,7 @@
gsb_data_account_get_l ( account_number ),
gsb_data_account_get_nb_rows (account_number),
my_safe_null_str(gsb_data_account_get_comment (account_number)),
- my_safe_null_str(gsb_data_account_get_holder_address (account_number)),
+ owner_str,
gsb_data_account_get_default_debit (account_number),
gsb_data_account_get_default_credit (account_number),
gsb_data_account_get_reconcile_sort_type (account_number),
@@ -1121,6 +1135,7 @@
g_free (init_balance);
g_free (mini_auto);
g_free (mini_wanted);
+ g_free ( owner_str );
/* append the new string to the file content
* and take the new iterator */
Index: accueil.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/accueil.c,v
retrieving revision 1.226
retrieving revision 1.227
diff -u -d -r1.226 -r1.227
--- accueil.c 5 Apr 2010 21:24:52 -0000 1.226
+++ accueil.c 20 Apr 2010 21:34:33 -0000 1.227
@@ -1602,8 +1602,6 @@
if ( !mise_a_jour_soldes_minimaux )
return;
- devel_debug ( "affiche_dialogue_soldes_minimaux" );
-
liste_autorise = NULL;
liste_voulu = NULL;
liste_autorise_et_voulu = NULL;
Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.219
retrieving revision 1.220
diff -u -d -r1.219 -r1.220
--- gsb_file_load.c 18 Apr 2010 12:47:05 -0000 1.219
+++ gsb_file_load.c 20 Apr 2010 21:34:33 -0000 1.220
@@ -1610,7 +1610,21 @@
if ( !strcmp ( attribute_names[i],
"Owner_address" ))
{
- gsb_data_account_set_holder_address ( account_number,
+ printf ("attribute_values[i] = %s\n",attribute_values[i]);
+ if ( g_strstr_len ( attribute_values[i], -1, "
" ) )
+ {
+ gchar **owner_tab;
+ gchar *owner_str;
+
+ owner_tab = g_strsplit ( attribute_values[i], "
", 0 );
+ owner_str = g_strjoinv ( NEW_LINE, owner_tab );
+ gsb_data_account_set_holder_address ( account_number, owner_str );
+
+ g_free ( owner_str );
+ g_strfreev ( owner_tab );
+ }
+ else
+ gsb_data_account_set_holder_address ( account_number,
attribute_values[i]);
i++;
continue;
Index: balance_estimate_data.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_data.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- balance_estimate_data.c 18 Apr 2010 07:53:06 -0000 1.21
+++ balance_estimate_data.c 20 Apr 2010 21:34:33 -0000 1.22
@@ -134,7 +134,7 @@
GtkWidget *child;
const gchar *label;
- devel_debug_int (account_number);
+ //~ devel_debug_int (account_number);
if ( type_maj != bet_maj )
{
switch ( type_maj )
Index: balance_estimate_tab.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_tab.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- balance_estimate_tab.c 18 Apr 2010 07:53:06 -0000 1.64
+++ balance_estimate_tab.c 20 Apr 2010 21:34:33 -0000 1.65
@@ -330,7 +330,7 @@
SBR *tmp_range;
GValue date_value = {0, };
- devel_debug (NULL);
+ //~ devel_debug (NULL);
notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook");
tmp_range = struct_initialise_bet_range ( );
@@ -1103,7 +1103,7 @@
gpointer key, value;
gint account_number;
- devel_debug (NULL);
+ //~ devel_debug (NULL);
account_number = gsb_gui_navigation_get_current_account ( );
future_list = bet_data_future_get_list ( );
@@ -1270,6 +1270,7 @@
gtk_menu_shell_append ( GTK_MENU_SHELL ( menu ), gtk_separator_menu_item_new ( ) );
gtk_widget_show ( menu_item );
+ /* Insert Row */
menu_item = gtk_image_menu_item_new_with_label ( _("Insert Row") );
gtk_image_menu_item_set_image ( GTK_IMAGE_MENU_ITEM ( menu_item ),
gtk_image_new_from_stock ( GTK_STOCK_ADD,
@@ -1864,7 +1865,7 @@
gint param;
gint months;
- devel_debug_int ( account_number );
+ //~ devel_debug_int ( account_number );
notebook = g_object_get_data ( G_OBJECT ( notebook_general ), "account_notebook" );
button = g_object_get_data ( G_OBJECT ( notebook ), "bet_account_spin_button" );
Index: gsb_autofunc.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_autofunc.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- gsb_autofunc.c 4 Feb 2010 20:04:51 -0000 1.26
+++ gsb_autofunc.c 20 Apr 2010 21:34:33 -0000 1.27
@@ -242,12 +242,7 @@
GtkWidget *text_view;
GtkTextBuffer *buffer;
- text_view = gsb_editable_text_view_new(value);
- gtk_text_view_set_pixels_above_lines (GTK_TEXT_VIEW (text_view), 3);
- gtk_text_view_set_pixels_below_lines (GTK_TEXT_VIEW (text_view), 3);
- gtk_text_view_set_left_margin (GTK_TEXT_VIEW (text_view), 3);
- gtk_text_view_set_right_margin (GTK_TEXT_VIEW (text_view), 3);
- gtk_text_view_set_wrap_mode ( GTK_TEXT_VIEW (text_view), GTK_WRAP_WORD );
+ text_view = gsb_editable_text_view_new ( value );
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
- Previous message: [grisbi-cvs] grisbi/po es.po,1.191,1.192
- Next message: [grisbi-cvs] grisbi/src accueil.c, 1.227, 1.228 balance_estimate_tab.c, 1.65, 1.66 gsb_account_property.c, 1.52, 1.53 gsb_data_transaction.c, 1.87, 1.88 gsb_file_load.c, 1.220, 1.221 structures.h, 1.245, 1.246
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list