[grisbi-cvs] grisbi/src affichage.c, 1.147, 1.148 affichage.h, 1.18, 1.19 balance_estimate_tab.c, 1.17, 1.18 categories_onglet.c, 1.183, 1.184 etats_calculs.c, 1.127, 1.128 etats_config.c, 1.162, 1.163 etats_onglet.c, 1.125, 1.126 export.c, 1.22, 1.23 fenetre_principale.c, 1.104, 1.105 file_obfuscate_qif.c, 1.4, 1.5 gsb_account_property.c, 1.14, 1.15 gsb_assistant.c, 1.42, 1.43 gsb_assistant_account.c, 1.22, 1.23 gsb_assistant_archive_export.c, 1.13, 1.14 gsb_data_account.c, 1.58, 1.59 gsb_data_account.h, 1.26, 1.27 gsb_file.c, 1.37, 1.38 gsb_file_load.c, 1.143, 1.144 gsb_file_save.c, 1.106, 1.107 gsb_plugins.c, 1.16, 1.17 gsb_transactions_list.c, 1.144, 1.145 import.c, 1.258, 1.259 import.h, 1.37, 1.38 imputation_budgetaire.c, 1.148, 1.149 parametres.c, 1.185, 1.186 utils_file_selection.c, 1.29, 1.30 utils_file_selection.h, 1.12, 1.13

Pierre Biava pbiava at users.sourceforge.net
Thu Jan 1 21:43:51 CET 2009


Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10337/src

Modified Files:
	affichage.c affichage.h balance_estimate_tab.c 
	categories_onglet.c etats_calculs.c etats_config.c 
	etats_onglet.c export.c fenetre_principale.c 
	file_obfuscate_qif.c gsb_account_property.c gsb_assistant.c 
	gsb_assistant_account.c gsb_assistant_archive_export.c 
	gsb_data_account.c gsb_data_account.h gsb_file.c 
	gsb_file_load.c gsb_file_save.c gsb_plugins.c 
	gsb_transactions_list.c import.c import.h 
	imputation_budgetaire.c parametres.c utils_file_selection.c 
	utils_file_selection.h 
Log Message:
sorry error of file
addition selection of a specific icon by account (ongoing)
replacement gtk_notebook_set_page by gtk_notebook_set_current_page
fr.po updates string

Index: etats_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/etats_config.c,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -d -r1.162 -r1.163
--- etats_config.c	25 Dec 2008 23:14:58 -0000	1.162
+++ etats_config.c	1 Jan 2009 20:43:49 -0000	1.163
@@ -393,7 +393,7 @@
 	return;
 
     if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
-	gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_general),
+	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general),
 				GSB_REPORTS_PAGE );
 
     dialog = gtk_dialog_new_with_buttons ( _("Report properties"),
@@ -1136,7 +1136,7 @@
 	return(FALSE);
 
     gtk_tree_model_get ( model, &iter, 1, &selected, -1 );
-    gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_config_etat ), selected);
+    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_config_etat ), selected);
 
     return FALSE;
 }
@@ -1905,7 +1905,7 @@
     rafraichissement_etat ( gsb_gui_navigation_get_current_report ());
 
     /* on repasse à la 1ère page du notebook */
-    gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_etats ),
+    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_etats ),
 			    0 );
     gtk_widget_set_sensitive ( navigation_tree_view, TRUE );
 

Index: gsb_assistant_archive_export.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_archive_export.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- gsb_assistant_archive_export.c	26 Dec 2008 20:06:55 -0000	1.13
+++ gsb_assistant_archive_export.c	1 Jan 2009 20:43:49 -0000	1.14
@@ -34,6 +34,7 @@
 #include "./export_csv.h"
 #include "./gsb_data_archive.h"
 #include "./gsb_data_fyear.h"
+#include "./gsb_file.h"
 #include "./gsb_file_save.h"
 #include "./gsb_file_util.h"
 #include "./utils_dates.h"
@@ -43,7 +44,6 @@
 #include "./structures.h"
 #include "./gsb_transactions_list.h"
 #include "./include.h"
-#include "./gsb_file.h"
 /*END_INCLUDE*/
 
 

Index: gsb_file_save.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_save.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- gsb_file_save.c	27 Oct 2008 23:40:59 -0000	1.106
+++ gsb_file_save.c	1 Jan 2009 20:43:49 -0000	1.107
@@ -918,6 +918,7 @@
 					       "\t\tOwner=\"%s\"\n"
 					       "\t\tKind=\"%d\"\n"
 					       "\t\tCurrency=\"%d\"\n"
+                           "\t\tPath_icon=\"%s\"\n"
 					       "\t\tBank=\"%d\"\n"
 					       "\t\tBank_branch_code=\"%s\"\n"
 					       "\t\tBank_account_number=\"%s\"\n"
@@ -948,6 +949,7 @@
 	    gsb_data_account_get_holder_name (account_number),
 	    gsb_data_account_get_kind (account_number),
 	    gsb_data_account_get_currency (account_number),
+        gsb_data_account_get_path_icon (account_number),
 	    gsb_data_account_get_bank (account_number),
 	    gsb_data_account_get_bank_branch_code (account_number),
 	    gsb_data_account_get_bank_account_number (account_number),

Index: utils_file_selection.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_file_selection.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- utils_file_selection.h	17 Sep 2007 21:53:57 -0000	1.12
+++ utils_file_selection.h	1 Jan 2009 20:43:49 -0000	1.13
@@ -53,7 +53,6 @@
 gchar* file_selection_get_filename(GtkFileChooser* filesel);
 gchar* file_selection_get_last_directory(GtkFileChooser* filesel,gboolean ended) ;
 GtkWidget* file_selection_new ( const gchar *title, const gint properties );
-void file_selection_set_entry(GtkFileChooser* filesel,const gchar* utf8string);
 /*END_DECLARATION*/
 
 #endif

Index: utils_file_selection.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_file_selection.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- utils_file_selection.c	21 Oct 2008 08:05:18 -0000	1.29
+++ utils_file_selection.c	1 Jan 2009 20:43:49 -0000	1.30
@@ -48,6 +48,7 @@
 /*END_INCLUDE*/
 
 /*START_STATIC*/
+static void file_selection_set_entry(GtkFileChooser* filesel,const gchar* utf8string);
 /*END_STATIC*/
 
 /*START_EXTERN*/

Index: export.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/export.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- export.c	26 Dec 2008 20:06:55 -0000	1.22
+++ export.c	1 Jan 2009 20:43:49 -0000	1.23
@@ -29,16 +29,16 @@
 #include "./gsb_assistant.h"
 #include "./export_csv.h"
 #include "./gsb_data_account.h"
+#include "./gsb_file.h"
 #include "./utils.h"
 #include "./qif.h"
 #include "./structures.h"
 #include "./include.h"
-#include "./gsb_file.h"
 /*END_INCLUDE*/
 
 
 /*START_STATIC*/
-static GtkWidget * create_export_account_resume_page ( struct exported_account * account ) ;
+static GtkWidget * create_export_account_resume_page ( struct exported_account * account );
 static gboolean export_account_change_format ( GtkWidget * combo,
 					struct exported_account * account );
 static void export_account_toggled ( GtkCellRendererToggle *cell, gchar *path_str,

Index: import.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/import.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- import.h	16 Nov 2008 20:34:25 -0000	1.37
+++ import.h	1 Jan 2009 20:43:49 -0000	1.38
@@ -120,7 +120,6 @@
 GtkWidget *onglet_importation (void);
 void register_import_format ( struct import_format * format );
 void register_import_formats ();
-void traitement_operations_importees ( void );
 gchar * unique_imported_name ( gchar * account_name );
 /* END_DECLARATION */
 

Index: categories_onglet.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/categories_onglet.c,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -d -r1.183 -r1.184
--- categories_onglet.c	26 Dec 2008 20:06:55 -0000	1.183
+++ categories_onglet.c	1 Jan 2009 20:43:49 -0000	1.184
@@ -38,7 +38,6 @@
 #include "./utils_buttons.h"
 #include "./transaction_list.h"
 #include "./gsb_transactions_list.h"
-#include "./utils_file_selection.h"
 #include "./metatree.h"
 #include "./structures.h"
 #include "./include.h"

Index: gsb_data_account.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- gsb_data_account.c	11 Nov 2008 14:44:29 -0000	1.58
+++ gsb_data_account.c	1 Jan 2009 20:43:49 -0000	1.59
@@ -56,6 +56,7 @@
     kind_account account_kind;
     gchar 	*account_name;
     gint 	currency;
+    gchar   *path_icon;                         /* path for not standard icon ajout pbiava 31/12/2008 */
     gint 	closed_account;                     /**< if 1 => closed */
     gchar 	*comment;
     gchar 	*holder_name;
@@ -2449,3 +2450,55 @@
     return TRUE;
 }
 
+
+/**
+ * get the icon_path of the account
+ * 
+ * \param account_number no of the account
+ * 
+ * \return icon_path or NULL if the account doesn't exist
+ * */
+gchar *gsb_data_account_get_path_icon (gint account_number)
+{
+    struct_account *account;
+
+    account = gsb_data_account_get_structure ( account_number );
+
+    if (!account )
+	return NULL;
+
+    return account -> path_icon;
+}
+
+
+/**
+ * set the icon_path of the account
+ * the address is copied in memory
+ * 
+ * \param account_number no of the account
+ * \param filename name of file to set
+ * 
+ * \return TRUE, ok ; FALSE, problem
+ * */
+gboolean gsb_data_account_set_path_icon ( gint account_number,
+					       const gchar *filename )
+{
+    struct_account *account;
+
+    account = gsb_data_account_get_structure ( account_number );
+
+    if (!account )
+	return FALSE;
+
+    if ( account -> path_icon )
+        g_free ( account -> path_icon );
+
+    if (!filename || !strlen (filename))
+	account -> path_icon = NULL;
+    else
+	account -> path_icon = my_strdup (filename);
+
+    return TRUE;
+}
+
+

Index: balance_estimate_tab.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/balance_estimate_tab.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- balance_estimate_tab.c	21 Oct 2008 08:05:18 -0000	1.17
+++ balance_estimate_tab.c	1 Jan 2009 20:43:49 -0000	1.18
@@ -17,6 +17,9 @@
  *     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/* Ajout du 18/12/2008 Pierre Biava option de compilation :
+ * ./configure --with-balance-estimate */
+
 /*
  * prefix bet : Balance Estimate Tab
  *
@@ -26,6 +29,7 @@
  * TODO : add a select button to display the selected line in the array
  * in the scheduler tab or in the account tab.
  */
+
 #include "include.h"
 #include <config.h>
 
@@ -554,7 +558,7 @@
     {
 	/* no selection, select the first account
 	 * (no warning here because cause a conflict with the tree of navigation */
-	gtk_notebook_set_page ( GTK_NOTEBOOK (bet_container),
+	gtk_notebook_set_current_page ( GTK_NOTEBOOK (bet_container),
 				0 );
 	return;
     }

Index: gsb_data_account.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- gsb_data_account.h	28 Aug 2008 21:49:36 -0000	1.26
+++ gsb_data_account.h	1 Jan 2009 20:43:49 -0000	1.27
@@ -61,6 +61,7 @@
 gint gsb_data_account_get_nb_rows ( gint account_number );
 gint gsb_data_account_get_no_account ( gpointer account_ptr );
 gint gsb_data_account_get_no_account_by_name ( const gchar *account_name );
+gchar *gsb_data_account_get_path_icon (gint account_number);
 gboolean gsb_data_account_get_r ( gint account_number );
 gint gsb_data_account_get_reconcile_sort_type ( gint account_number );
 gfloat gsb_data_account_get_row_align ( gint account_number );
@@ -126,6 +127,8 @@
 				     const gchar *name );
 gboolean gsb_data_account_set_nb_rows ( gint account_number,
 					gint nb_rows );
+gboolean gsb_data_account_set_path_icon ( gint account_number,
+					       const gchar *filename );
 gboolean gsb_data_account_set_r ( gint account_number,
 				  gboolean show_r );
 gboolean gsb_data_account_set_reconcile_sort_type ( gint account_number,

Index: etats_onglet.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/etats_onglet.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- etats_onglet.c	26 Dec 2008 20:06:55 -0000	1.125
+++ etats_onglet.c	1 Jan 2009 20:43:49 -0000	1.126
@@ -48,7 +48,6 @@
 #include "./print_report.h"
 #include "./utils_files.h"
 #include "./structures.h"
-#include "./utils_file_selection.h"
 #include "./fenetre_principale.h"
 #include "./print_config.h"
 #include "./include.h"
@@ -269,7 +268,7 @@
 
 
     if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general ) ) != GSB_REPORTS_PAGE )
-	gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_general ), GSB_REPORTS_PAGE );
+	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), GSB_REPORTS_PAGE );
 
     dialog = dialogue_special_no_run ( GTK_MESSAGE_QUESTION,
 				       GTK_BUTTONS_OK_CANCEL,
@@ -1008,7 +1007,7 @@
 	return;
 
      if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
-	gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_general),
+	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general),
 				GSB_REPORTS_PAGE );
 
    if ( !question_yes_no_hint ( g_strdup_printf (_("Delete report \"%s\"?"),
@@ -1084,7 +1083,7 @@
 void export_etat_courant_vers_html ( gchar * filename )
 {
     if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
-	gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
+	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
 
     affichage_etat ( gsb_gui_navigation_get_current_report (), &html_affichage, filename );
 }
@@ -1100,7 +1099,7 @@
 void export_etat_courant_vers_csv ( gchar * filename )
 {
     if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
-	gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
+	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
 
     affichage_etat ( gsb_gui_navigation_get_current_report (), &csv_affichage, filename );
 }
@@ -1178,7 +1177,7 @@
     current_report_number = gsb_gui_navigation_get_current_report ();
 
     if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
-	gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
+	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
 
     fenetre_nom = gtk_file_chooser_dialog_new ( _("Export report"),
 					   GTK_WINDOW ( window ),
@@ -1284,7 +1283,7 @@
     GtkFileFilter * filter;
 
     if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
-	gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
+	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
 
     fenetre_nom = gtk_file_chooser_dialog_new ( _("Import a report"),
 					   GTK_WINDOW ( window ),
@@ -1341,7 +1340,7 @@
     current_report_number = gsb_gui_navigation_get_current_report ();
 
     if ( gtk_notebook_get_current_page ( GTK_NOTEBOOK ( notebook_general)) != GSB_REPORTS_PAGE )
-	gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
+	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general), GSB_REPORTS_PAGE );
 
     report_number = gsb_data_report_dup (current_report_number);
 

Index: affichage.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/affichage.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- affichage.h	26 Oct 2008 21:40:37 -0000	1.18
+++ affichage.h	1 Jan 2009 20:43:49 -0000	1.19
@@ -9,7 +9,7 @@
 GtkWidget *onglet_display_addresses ( void );
 GtkWidget * onglet_display_fonts ( void );
 GtkWidget *tab_display_toolbar ( void );
-gboolean update_homepage_title (GtkEntry *entry, gchar *value, 
+gboolean update_homepage_title (GtkEntry *entry, gchar *value,
 				gint length, gint * position);
 /* END_DECLARATION */
 #endif

Index: imputation_budgetaire.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/imputation_budgetaire.c,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -d -r1.148 -r1.149
--- imputation_budgetaire.c	26 Dec 2008 20:06:55 -0000	1.148
+++ imputation_budgetaire.c	1 Jan 2009 20:43:49 -0000	1.149
@@ -45,7 +45,6 @@
 #include "./utils_buttons.h"
 #include "./transaction_list.h"
 #include "./gsb_transactions_list.h"
-#include "./utils_file_selection.h"
 #include "./gtk_combofix.h"
 #include "./metatree.h"
 #include "./structures.h"

Index: affichage.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/affichage.c,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -r1.147 -r1.148
--- affichage.c	26 Dec 2008 20:06:55 -0000	1.147
+++ affichage.c	1 Jan 2009 20:43:49 -0000	1.148
@@ -39,7 +39,6 @@
 #include "./utils_font.h"
 #include "./structures.h"
 #include "./custom_list.h"
-#include "./utils_file_selection.h"
 #include "./utils_buttons.h"
 #include "./include.h"
 #include "./erreur.h"

Index: import.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/import.c,v
retrieving revision 1.258
retrieving revision 1.259
diff -u -d -r1.258 -r1.259
--- import.c	26 Dec 2008 20:06:55 -0000	1.258
+++ import.c	1 Jan 2009 20:43:49 -0000	1.259
@@ -116,6 +116,7 @@
 static gboolean import_switch_type ( GtkCellRendererText *cell, const gchar *path,
 			      const gchar *value, GtkListStore * model );
 static void pointe_opes_importees ( struct struct_compte_importation *imported_account );
+static void traitement_operations_importees ( void );
 /*END_STATIC*/
 
 /*START_EXTERN*/

Index: etats_calculs.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/etats_calculs.c,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- etats_calculs.c	25 Oct 2008 13:47:22 -0000	1.127
+++ etats_calculs.c	1 Jan 2009 20:43:49 -0000	1.128
@@ -2645,7 +2645,7 @@
 
 
 /*****************************************************************************************************/
-/* Fonction d'impression de l'état */
+/* Fonction d'impression de l'état */
 /*****************************************************************************************************/
 void impression_etat ( gint report_number )
 {

Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -d -r1.143 -r1.144
--- gsb_file_load.c	23 Nov 2008 17:49:56 -0000	1.143
+++ gsb_file_load.c	1 Jan 2009 20:43:49 -0000	1.144
@@ -1281,6 +1281,15 @@
 	    continue;
 	}
 
+    if ( !strcmp ( attribute_names[i],
+		       "Path_icon" ))
+	{
+	    gsb_data_account_set_path_icon ( account_number,
+					    attribute_values[i]);
+	    i++;
+	    continue;
+	}
+
 	if ( !strcmp ( attribute_names[i],
 		       "Bank" ))
 	{

Index: gsb_plugins.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_plugins.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- gsb_plugins.c	4 Sep 2008 21:04:44 -0000	1.16
+++ gsb_plugins.c	1 Jan 2009 20:43:49 -0000	1.17
@@ -31,7 +31,6 @@
 extern G_MODULE_EXPORT const gchar plugin_name[] ;
 extern G_MODULE_EXPORT const gchar plugin_name[] ;
 extern G_MODULE_EXPORT const gchar plugin_name[] ;
-extern G_MODULE_EXPORT const gchar plugin_name[] ;
 /*END_EXTERN*/
 
 /*START_STATIC*/

Index: gsb_file.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- gsb_file.c	26 Dec 2008 20:06:55 -0000	1.37
+++ gsb_file.c	1 Jan 2009 20:43:49 -0000	1.38
@@ -54,7 +54,6 @@
 #include "./parametres.h"
 #include "./affichage_liste.h"
 #include "./transaction_list.h"
-#include "./utils_file_selection.h"
 #include "./fenetre_principale.h"
 #include "./include.h"
 #include "./erreur.h"
@@ -196,7 +195,7 @@
 
     /* Affiche le nom du fichier de comptes dans le titre de la fenetre */
     gsb_file_update_window_title();
-    gtk_notebook_set_page ( GTK_NOTEBOOK( notebook_general ), GSB_HOME_PAGE );
+    gtk_notebook_set_current_page ( GTK_NOTEBOOK( notebook_general ), GSB_HOME_PAGE );
 
     gtk_widget_show ( notebook_general );
 }

Index: parametres.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/parametres.c,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -d -r1.185 -r1.186
--- parametres.c	8 Dec 2008 14:39:00 -0000	1.185
+++ parametres.c	1 Jan 2009 20:43:49 -0000	1.186
@@ -530,7 +530,7 @@
     gtk_tree_model_get_value (model, &iter, 1, &value);
 
     preference_selected = g_value_get_int(&value);
-    gtk_notebook_set_page (preference_frame, preference_selected);
+    gtk_notebook_set_current_page (preference_frame, preference_selected);
 
     g_value_unset (&value);
 

Index: fenetre_principale.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/fenetre_principale.c,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -d -r1.104 -r1.105
--- fenetre_principale.c	26 Dec 2008 16:07:27 -0000	1.104
+++ fenetre_principale.c	1 Jan 2009 20:43:49 -0000	1.105
@@ -32,7 +32,6 @@
 #include "./comptes_onglet.h"
 #include "./etats_onglet.h"
 #include "./gsb_form.h"
-#include "./gsb_plugins.h"
 #include "./gsb_scheduler_list.h"
 #include "./main.h"
 #include "./categories_onglet.h"
@@ -41,7 +40,6 @@
 #include "./structures.h"
 #include "./include.h"
 #include "./erreur.h"
-#include "./gsb_plugins.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -404,7 +402,7 @@
  */
 void gsb_gui_notebook_change_page ( GsbGeneralNotebookPages page )
 {
-    gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_general ), page );
+    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), page );
 }
 
 

Index: gsb_transactions_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list.c,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- gsb_transactions_list.c	8 Dec 2008 14:39:00 -0000	1.144
+++ gsb_transactions_list.c	1 Jan 2009 20:43:49 -0000	1.145
@@ -2293,7 +2293,7 @@
  */
 gboolean new_transaction ()
 {
-    gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
+    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
     gsb_form_escape_form();
     gsb_form_show (TRUE);
     transaction_list_select ( -1 );
@@ -2313,7 +2313,7 @@
 
     gsb_transactions_list_delete_transaction (gsb_data_account_get_current_transaction_number (gsb_gui_navigation_get_current_account ()),
 					      TRUE );
-    gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
+    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
 }
 
 
@@ -2338,7 +2338,7 @@
 
     update_transaction_in_trees (new_transaction_number);
 
-    gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
+    gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
 
     modification_fichier ( TRUE );
     return FALSE;
@@ -2459,7 +2459,7 @@
     if ( gsb_transactions_list_move_transaction_to_account ( gsb_data_account_get_current_transaction_number (source_account),
 							     target_account ))
     {
-	gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
+	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
 
 	update_transaction_in_trees (gsb_data_account_get_current_transaction_number (source_account));
 
@@ -2502,7 +2502,7 @@
 							     target_account ))
     {
 	gchar *string;
-	gtk_notebook_set_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
+	gtk_notebook_set_current_page ( GTK_NOTEBOOK ( notebook_general ), 1 );
 
 	update_transaction_in_trees (gsb_data_account_get_current_transaction_number (source_account));
 

Index: gsb_assistant_account.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_account.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- gsb_assistant_account.c	25 Dec 2008 23:14:58 -0000	1.22
+++ gsb_assistant_account.c	1 Jan 2009 20:43:49 -0000	1.23
@@ -32,6 +32,7 @@
 #include "gsb_assistant_account.h"
 #include "./gsb_account.h"
 #include "./gsb_assistant.h"
+#include "./gsb_automem.h"
 #include "./gsb_bank.h"
 #include "./gsb_currency_config.h"
 #include "./gsb_currency.h"
@@ -40,6 +41,7 @@
 #include "./gsb_real.h"
 #include "./utils.h"
 #include "./structures.h"
+#include "./utils_buttons.h"
 #include "./gsb_data_account.h"
 #include "./include.h"
 /*END_INCLUDE*/
@@ -209,13 +211,14 @@
 static GtkWidget *gsb_assistant_account_page_3 ( GtkWidget *assistant )
 {
     GtkWidget *page, *label, *button, *table;
+    GtkWidget *align;
     struct lconv * conv = localeconv();
 
     page = gtk_hbox_new (FALSE, 15);
     gtk_container_set_border_width ( GTK_CONTAINER (page),
 				     10 );
 
-    table = gtk_table_new ( 0, 3, FALSE );
+    table = gtk_table_new ( 3, 4, FALSE );
     gtk_table_set_row_spacings ( GTK_TABLE ( table ), 6 );
     gtk_table_set_col_spacings ( GTK_TABLE ( table ), 6 );
 
@@ -306,6 +309,25 @@
 		       GTK_SHRINK | GTK_FILL,
 		       GTK_SHRINK | GTK_FILL,
 		       0, 0 );
+    
+    /* création du choix de l'icône du compte */
+    /* Récupération de l'icône par défaut */
+    align = gtk_alignment_new (0.5,0.5,1,1);
+    gtk_alignment_set_padding ( GTK_ALIGNMENT ( align ), 0, 0, 20, 20 );
+    button = gsb_automem_imagefile_button_new ( GSB_BUTTON_ICON,
+					       NULL,
+					       "ac_bank.png",
+					       NULL,
+					       NULL );
+    gtk_button_set_relief ( GTK_BUTTON ( button ), GTK_RELIEF_NORMAL );
+    gtk_container_add (GTK_CONTAINER (align), button);
+    gtk_table_attach ( GTK_TABLE ( table ), align, 
+		       3, 4, 0, 3,
+		       GTK_FILL | GTK_FILL,
+		       GTK_FILL | GTK_FILL,
+		       0, 0 );
+    gtk_widget_set_size_request ( button, 80, 80 );
+    g_object_set_data ( G_OBJECT (assistant), "bouton_icon", button );
 
     gtk_widget_show_all (page);
     return page;
@@ -434,8 +456,41 @@
 gboolean gsb_assistant_account_toggled_kind_account ( GtkWidget *button,
 						      GtkWidget *assistant )
 {
+    GtkWidget *bouton_icon, *image;
+    kind_account account_kind;
+    gchar * account_icon;
+
+    account_kind = GPOINTER_TO_INT ( g_object_get_data 
+                ( G_OBJECT (button), "account_kind"));
     g_object_set_data ( G_OBJECT (assistant),
-			"account_kind", g_object_get_data ( G_OBJECT (button),
-							    "account_kind" ));
+			"account_kind", GINT_TO_POINTER ( account_kind ) );
+
+    switch ( account_kind )
+    {
+	case GSB_TYPE_BANK:
+	    account_icon = "ac_bank.png";
+	    break;
+
+	case GSB_TYPE_CASH:
+	    account_icon = "ac_cash.png";
+	    break;
+
+	case GSB_TYPE_ASSET:
+    account_icon = "ac_asset.png";
+	    break;
+
+	case GSB_TYPE_LIABILITIES:
+	    account_icon = "ac_liability.png";
+	    break;
+
+	default:
+	    account_icon = "ac_bank.png";
+	    break;
+    }
+
+    bouton_icon = g_object_get_data ( G_OBJECT (assistant), "bouton_icon" );
+    image = gtk_image_new_from_file (g_build_filename (PIXMAPS_DIR,
+							   account_icon, NULL));
+    gtk_button_set_image ( GTK_BUTTON ( bouton_icon ), image);
     return FALSE;
 }

Index: gsb_assistant.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- gsb_assistant.c	7 Dec 2008 21:40:06 -0000	1.42
+++ gsb_assistant.c	1 Jan 2009 20:43:49 -0000	1.43
@@ -208,7 +208,7 @@
     gtk_widget_show_all ( assistant );
 
     notebook = g_object_get_data ( G_OBJECT(assistant), "notebook" );
-    gtk_notebook_set_page ( GTK_NOTEBOOK (notebook),
+    gtk_notebook_set_current_page ( GTK_NOTEBOOK (notebook),
 			    0 );
     gtk_widget_grab_focus (GTK_WIDGET (g_object_get_data (G_OBJECT (assistant),
 							  "button_next")));
@@ -248,7 +248,7 @@
 							  FALSE );
 		}
 
-		gtk_notebook_set_page ( GTK_NOTEBOOK(notebook), next );
+		gtk_notebook_set_current_page ( GTK_NOTEBOOK(notebook), next );
 		break;
 
 	    case GTK_RESPONSE_NO:
@@ -265,7 +265,7 @@
 		    gtk_widget_set_sensitive ( button_prev, FALSE );
 		}
 
-		gtk_notebook_set_page ( GTK_NOTEBOOK(notebook), prev );
+		gtk_notebook_set_current_page ( GTK_NOTEBOOK(notebook), prev );
 		break;
 
 	    case GTK_RESPONSE_APPLY:

Index: file_obfuscate_qif.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/file_obfuscate_qif.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- file_obfuscate_qif.c	26 Dec 2008 20:06:55 -0000	1.4
+++ file_obfuscate_qif.c	1 Jan 2009 20:43:49 -0000	1.5
@@ -34,7 +34,6 @@
 #include "./gsb_assistant.h"
 #include "./gsb_file.h"
 #include "./gsb_status.h"
-#include "./utils_file_selection.h"
 #include "./include.h"
 /*END_INCLUDE*/
 

Index: gsb_account_property.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_account_property.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- gsb_account_property.c	13 Dec 2008 20:33:42 -0000	1.14
+++ gsb_account_property.c	1 Jan 2009 20:43:49 -0000	1.15
@@ -35,6 +35,7 @@
 #include "gsb_account_property.h"
 #include "./gsb_account.h"
 #include "./gsb_autofunc.h"
+#include "./gsb_automem.h"
 #include "./gsb_bank.h"
 #include "./utils_buttons.h"
 #include "./gsb_currency.h"
@@ -59,6 +60,8 @@
 #include "./transaction_list.h"
 #include "./structures.h"
 #include "./gsb_transactions_list.h"
+#include "./utils_buttons.h"
+#include "./gsb_data_account.h"
 #include "./accueil.h"
 #include "./gsb_data_transaction.h"
 #include "./gsb_form_scheduler.h"
@@ -94,6 +97,7 @@
 static GtkWidget *detail_solde_mini_voulu = NULL;
 static GtkWidget *detail_commentaire = NULL;
 static GtkWidget *button_holder_address = NULL;
+static GtkWidget *bouton_icon = NULL;
 
 enum origin
 {
@@ -128,6 +132,7 @@
 {
     GtkWidget *onglet, *vbox, *scrolled_window, *hbox, *vbox2;
     GtkWidget *label, *scrolled_window_text, *paddingbox;
+    GtkWidget *hbox_account, *vbox_account, *align;
     GtkSizeGroup * size_group;
 
     /* la fenetre ppale est une vbox avec les détails en haut et appliquer en bas */
@@ -149,11 +154,27 @@
 				   GTK_SHADOW_NONE );
 
     paddingbox = new_paddingbox_with_title (vbox, TRUE, _("Account details"));
+    
+    hbox_account = hbox = gtk_hbox_new ( FALSE, 6 );
+    gtk_box_pack_start ( GTK_BOX(paddingbox), hbox_account, FALSE, FALSE, 0 );
 
+    /* Ajout d'un sélecteur d'icône pour les comptes */    
+    align = gtk_alignment_new (0.5,0.5,0.5,0.5);
+    gtk_size_group_add_widget ( GTK_SIZE_GROUP ( size_group ), align );
+    gtk_box_pack_start ( GTK_BOX(hbox_account), align, FALSE, FALSE, 0);
+    bouton_icon = gsb_automem_imagefile_button_new ( GSB_BUTTON_ICON,
+					       NULL,
+					       "ac_bank.png",
+					       NULL,
+					       NULL );
+    gtk_button_set_relief ( GTK_BUTTON ( bouton_icon ), GTK_RELIEF_NORMAL );
+    gtk_container_add (GTK_CONTAINER (align), bouton_icon);
+    vbox_account = gtk_vbox_new ( FALSE, 5 );
+    gtk_box_pack_start ( GTK_BOX(hbox_account), vbox_account, TRUE, TRUE, 0);
 
     /* création de la ligne du nom du compte */
     hbox = gtk_hbox_new ( FALSE, 6 );
-    gtk_box_pack_start ( GTK_BOX(paddingbox), hbox, FALSE, FALSE, 0 );
+    gtk_box_pack_start ( GTK_BOX(vbox_account), hbox, FALSE, FALSE, 0 );
 
     label = gtk_label_new ( COLON(_("Account name")) );
     gtk_misc_set_alignment ( GTK_MISC(label), MISC_LEFT, MISC_VERT_CENTER );
@@ -170,7 +191,7 @@
 
     /* create the box of kind of account */
     hbox = gtk_hbox_new ( FALSE, 6 );
-    gtk_box_pack_start ( GTK_BOX(paddingbox), hbox, FALSE, FALSE, 0 );
+    gtk_box_pack_start ( GTK_BOX(vbox_account), hbox, FALSE, FALSE, 0 );
 
     label = gtk_label_new ( COLON(_("Account type")) );
     gtk_misc_set_alignment ( GTK_MISC(label), MISC_LEFT, MISC_VERT_CENTER );
@@ -188,7 +209,7 @@
 
     /* create the currency line */
     hbox = gtk_hbox_new ( FALSE, 6 );
-    gtk_box_pack_start ( GTK_BOX(paddingbox), hbox, FALSE, FALSE, 0 );
+    gtk_box_pack_start ( GTK_BOX(vbox_account), hbox, FALSE, FALSE, 0 );
 
     label = gtk_label_new ( COLON(_("Account currency")) );
     gtk_misc_set_alignment ( GTK_MISC(label), MISC_LEFT, MISC_VERT_CENTER );
@@ -209,7 +230,7 @@
 							  G_CALLBACK (gsb_data_account_set_closed_account), 0 );
     g_signal_connect ( G_OBJECT (detail_compte_cloture ), "destroy",
 		       G_CALLBACK ( gtk_widget_destroyed), &detail_compte_cloture );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), detail_compte_cloture, FALSE, FALSE, 0 );
+    gtk_box_pack_start ( GTK_BOX ( vbox_account ), detail_compte_cloture, FALSE, FALSE, 0 );
 
     /* création de la ligne du titulaire du compte */
     paddingbox = new_paddingbox_with_title ( vbox, FALSE, _("Account holder"));
@@ -447,6 +468,9 @@
 {
     gint bank_number;
     gint current_account;
+    kind_account account_kind;
+    gchar * account_icon;
+    GtkWidget *image;
 
     devel_debug (NULL);
 
@@ -455,9 +479,43 @@
     gsb_autofunc_entry_set_value (detail_nom_compte,
 				  gsb_data_account_get_name (current_account), current_account);
 
-    gsb_autofunc_combobox_set_index (detail_type_compte,
-				     gsb_data_account_get_kind (current_account), current_account);
-
+    /* modification pour mettre à jour l'icône du sélecteur d'icône du compte */
+    account_kind = gsb_data_account_get_kind ( current_account );
+    gsb_autofunc_combobox_set_index (detail_type_compte, account_kind, current_account);
+    
+    if ( (account_icon = gsb_data_account_get_path_icon ( current_account ) ) )
+    {
+        GdkPixbuf * pixbuf;
+        
+        pixbuf = gdk_pixbuf_new_from_file_at_size ( account_icon , 32, 32, NULL );
+        image = gtk_image_new_from_pixbuf ( pixbuf );
+    }
+    else 
+    {
+        switch ( account_kind )
+        {
+        case GSB_TYPE_BANK:
+            account_icon = "ac_bank.png";
+            break;
+        case GSB_TYPE_CASH:
+            account_icon = "ac_cash.png";
+            break;
+        case GSB_TYPE_ASSET:
+        account_icon = "ac_asset.png";
+            break;
+        case GSB_TYPE_LIABILITIES:
+            account_icon = "ac_liability.png";
+            break;
+        default:
+            account_icon = "ac_bank.png";
+            break;
+        }
+        image = gtk_image_new_from_file (g_build_filename (PIXMAPS_DIR,
+							   account_icon, NULL));
+    }
+    if ( image )
+        gtk_button_set_image ( GTK_BUTTON ( bouton_icon ), image );
+    
     gsb_autofunc_currency_set_currency_number (detail_devise_compte,
 					       gsb_data_account_get_currency (current_account), current_account);
 



More information about the cvs mailing list