[grisbi-cvs] grisbi/src gsb_assistant_first.c, 1.20, 1.21 gsb_autofunc.c, 1.18, 1.19 gsb_file_config.c, 1.72, 1.73 gsb_file_load.c, 1.157, 1.158 gsb_file_save.c, 1.117, 1.118 import.c, 1.269, 1.270 import.h, 1.39, 1.40 menu.c, 1.143, 1.144 parametres.c, 1.188, 1.189 parametres.h, 1.27, 1.28

Benjamin Drieu benj2 at users.sourceforge.net
Mon Mar 30 17:11:10 CEST 2009


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

Modified Files:
	gsb_assistant_first.c gsb_autofunc.c gsb_file_config.c 
	gsb_file_load.c gsb_file_save.c import.c import.h menu.c 
	parametres.c parametres.h 
Log Message:
Various UI improvements and small bug fixes

Index: gsb_assistant_first.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_assistant_first.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- gsb_assistant_first.c	5 Mar 2009 19:12:29 -0000	1.20
+++ gsb_assistant_first.c	30 Mar 2009 15:11:08 -0000	1.21
@@ -1,7 +1,7 @@
 /* ************************************************************************** */
 /*                                                                            */
 /*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	      */
-/*			2003-2008 Benjamin Drieu (bdrieu at april.org)	      */
+/*			2003-2009 Benjamin Drieu (bdrieu at april.org)	      */
 /* 			http://www.grisbi.org				      */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
@@ -140,6 +140,8 @@
 				      "Also, we advise you to configure your web browser "
 				      "to your system configuration and to configure various settings "
 				      "in next screen.\n\n" 
+				      "If you want to make backups of your Grisbi file in case you want to revert "
+				      "to old version of Grisbi, we would advise you to do that right now.\n\n"
 				      "You can find out other improvements on http://www.grisbi.org/."),
 				    "grisbi.png",
 				    NULL );

Index: import.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/import.c,v
retrieving revision 1.269
retrieving revision 1.270
diff -u -d -r1.269 -r1.270
--- import.c	24 Mar 2009 22:39:34 -0000	1.269
+++ import.c	30 Mar 2009 15:11:08 -0000	1.270
@@ -1,9 +1,9 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	          */
-/*			2004-2008 Benjamin Drieu (bdrieu at april.org)	                      */
-/*          2008-2009 Pierre Biava (pierre at pierre.biava.name)                 */
-/* 			http://www.grisbi.org				                              */
+/*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	      */
+/*			2004-2008 Benjamin Drieu (bdrieu at april.org)           */
+/*                      2008-2009 Pierre Biava (pierre at pierre.biava.name)     */
+/* 			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      */
@@ -70,7 +70,6 @@
 #include "./structures.h"
 #include "./gsb_transactions_list.h"
 #include "./go-charmap-sel.h"
-#include "./utils_buttons.h"
 #include "./gsb_data_payment.h"
 #include "./gsb_data_account.h"
 #include "./gtk_combofix.h"
@@ -97,24 +96,24 @@
 static GtkWidget * cree_ligne_recapitulatif ( struct struct_compte_importation * compte );
 static void gsb_import_add_imported_transactions ( struct struct_compte_importation *imported_account,
 					    gint account_number );
-static void gsb_import_associations_add_assoc ( GtkWidget *button, GtkWidget *dialog );
+static void gsb_import_associations_add_assoc ( GtkWidget *button, GtkWidget *main_widget );
 static  void gsb_import_associations_cell_edited (GtkCellRendererText *cell,
-                        const gchar *path_string,
-                        const gchar *new_text,
-                        gpointer data);
+						 const gchar *path_string,
+						 const gchar *new_text,
+						 GObject * main_widget );
+static gboolean gsb_import_associations_check_add_button ( GObject * main_widget );
 static gint gsb_import_associations_cmp_assoc (struct struct_payee_asso *assoc_1,
                                         struct struct_payee_asso *assoc_2);
 static void gsb_import_associations_combo_changed ( GtkEditable *editable,
-                        GtkDialog *dialog );
-static void gsb_import_associations_del_assoc ( GtkWidget *button, GtkWidget *dialog );
+					     GObject * main_widget );
+static void gsb_import_associations_del_assoc ( GtkWidget *button, GtkWidget *main_widget );
 static void gsb_import_associations_fill_model ( GtkListStore *list_store );
 static gint gsb_import_associations_find_payee ( gchar *imported_tiers);
-static void gsb_import_associations_gere_tiers (GtkWidget *button, gpointer data );
 static gboolean gsb_import_associations_select_func ( GtkTreeSelection *selection,
-                        GtkTreeModel *model,
-                        GtkTreePath *path,
-                        gboolean path_currently_selected,
-                        gpointer data );
+					       GtkTreeModel *model,
+					       GtkTreePath *path,
+					       gboolean path_currently_selected,
+					       GObject * main_widget );
 static gchar **gsb_import_by_rule_ask_filename ( gint rule );
 static gboolean gsb_import_by_rule_get_file ( GtkWidget *button,
 				       GtkWidget *entry );
@@ -3231,22 +3230,6 @@
 
     gtk_box_pack_start ( GTK_BOX (hbox ), button, FALSE, FALSE, 0 );
 
-    /* button manage payees */
-    hbox = gtk_hbox_new ( FALSE, 0 );
-    gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, FALSE, FALSE, 0);
-
-    button = gsb_automem_stock_button_new ( GSB_BUTTON_BOTH_HORIZ,
-                        GTK_STOCK_PREFERENCES,
-                        _("Manage payees"),
-                        G_CALLBACK (gsb_import_associations_gere_tiers), NULL );
-#if GTK_CHECK_VERSION(2,12,0)
-    gtk_widget_set_tooltip_text ( GTK_WIDGET (button),
-                        SPACIFY(_("create an association between two payees "
-                        "to simplify the list")));
-#endif
-
-    gtk_box_pack_start ( GTK_BOX (hbox ), button, FALSE, FALSE, 0 );
-
     /* propose to choose between getting the fyear by value date or by date */
     gsb_automem_radiobutton_new_with_title ( vbox_pref,
 					     _("Set the financial year"),
@@ -3268,9 +3251,9 @@
  * \param data
  *
  * */
-void gsb_import_associations_gere_tiers (GtkWidget *button, gpointer data )
+GtkWidget * gsb_import_associations_gere_tiers ( )
 {
-    GtkWidget *dialog,*vbox_main, *vbox, *paddingbox;
+    GtkWidget *vbox_main, *vbox, *paddingbox, *button;
     GtkWidget *hbox, *vbox2, *sw, *treeview ;
     GtkWidget *table, *label, *entry;
     GtkListStore *list_store;
@@ -3278,36 +3261,24 @@
     GtkCellRenderer *cell;
     GtkTreeSelection *selection;
     gchar *texte;
-    gint result;
-
-    dialog = gtk_dialog_new_with_buttons (
-                        _("Associations for the import of payees"),
-                        GTK_WINDOW ( window ),
-                        GTK_DIALOG_MODAL,
-                        GTK_STOCK_CLOSE, 1,
-                        NULL );
-
-    gtk_window_set_default_size ( GTK_WINDOW ( dialog ), 700, -1 );
-    gtk_window_set_position ( GTK_WINDOW ( dialog ), GTK_WIN_POS_CENTER_ON_PARENT );
-    gtk_window_set_resizable ( GTK_WINDOW ( dialog ), TRUE );
-
+    
     vbox_main = new_vbox_with_title_and_icon (
-                        _("Manage the associations"),
+                        _("Manage import associations"),
                         "payees.png" );
-    gtk_box_pack_start ( GTK_BOX ( GTK_DIALOG ( dialog ) -> vbox ),
-                        vbox_main, TRUE, TRUE, 0 );
 
     vbox = gtk_vbox_new ( FALSE, 12 );
     gtk_box_pack_start ( GTK_BOX ( vbox_main ), vbox, TRUE, TRUE, 0 );
     gtk_container_set_border_width ( GTK_CONTAINER ( vbox ), 12 );
 
     paddingbox = new_paddingbox_with_title ( vbox,
-					     TRUE, _("Associations"));
+					     TRUE, _("Import associations"));
 
-    texte = g_strdup ( _("To modify a search string, just edit it into "
-                        "the cell.\nMake Enter to validate") );
-	label = gtk_label_new ( texte );
-	gtk_misc_set_alignment ( GTK_MISC ( label ), 0, 0);
+    texte = g_strdup ( _("This will associate a search string to a payee every time you import a file.  "
+			 "For instance, all QIF labels containing 'Rent' could be associated with "
+			 "a specific payee representing your landlord.") );
+    label = gtk_label_new ( texte );
+    gtk_label_set_line_wrap ( GTK_LABEL ( label ), TRUE );
+    gtk_misc_set_alignment ( GTK_MISC ( label ), 0, 0);
 	gtk_label_set_justify ( GTK_LABEL ( label ), GTK_JUSTIFY_LEFT );
 	g_free ( texte );
 	gtk_box_pack_start ( GTK_BOX(paddingbox), label, FALSE, FALSE, 6 );
@@ -3332,19 +3303,19 @@
     g_signal_connect ( G_OBJECT ( button ),
                         "clicked",
                         G_CALLBACK  ( gsb_import_associations_add_assoc ),
-                        dialog );
+                        vbox_main );
     gtk_box_pack_start ( GTK_BOX ( vbox2 ), button, FALSE, FALSE, 5 );
-    g_object_set_data ( G_OBJECT (dialog), "add_button", button );
+    g_object_set_data ( G_OBJECT (vbox_main), "add_button", button );
 
     /* Button "Remove" */
     button = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
     g_signal_connect ( G_OBJECT ( button ),
                         "clicked",
                         G_CALLBACK ( gsb_import_associations_del_assoc ),
-                        dialog );
+                        vbox_main );
     gtk_box_pack_start ( GTK_BOX ( vbox2 ), button, FALSE, FALSE, 5 );
     gtk_widget_set_sensitive ( button, FALSE );
-    g_object_set_data ( G_OBJECT (dialog), "remove_button", button );
+    g_object_set_data ( G_OBJECT (vbox_main), "remove_button", button );
 
     /* create the model */
     list_store = gtk_list_store_new (
@@ -3364,10 +3335,10 @@
     selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW (treeview) );
     gtk_tree_selection_set_select_function ( selection,
                         gsb_import_associations_select_func,
-                        dialog, NULL );
+                        vbox_main, NULL );
     gtk_container_add (GTK_CONTAINER (sw), treeview);
     gtk_container_set_resize_mode (GTK_CONTAINER (sw), GTK_RESIZE_PARENT);
-    g_object_set_data ( G_OBJECT (dialog), "treeview", treeview );
+    g_object_set_data ( G_OBJECT (vbox_main), "treeview", treeview );
 
     /* payee name */
     cell = gtk_cell_renderer_text_new ( );
@@ -3384,7 +3355,7 @@
     g_signal_connect ( cell,
                         "edited",
                         G_CALLBACK (gsb_import_associations_cell_edited),
-                        dialog );
+                        vbox_main );
     column = gtk_tree_view_column_new_with_attributes ( _("Search string"),
 						     cell, "text", 1, NULL);
     gtk_tree_view_column_set_expand ( column, TRUE );
@@ -3414,7 +3385,7 @@
     g_signal_connect ( G_OBJECT ( GTK_COMBOFIX (entry) -> entry ),
                         "changed",
                         G_CALLBACK (gsb_import_associations_combo_changed),
-                        dialog );
+                        vbox_main );
     gtk_combofix_set_text ( GTK_COMBOFIX (entry), "" );
     gtk_combofix_set_force_text ( GTK_COMBOFIX (entry),FALSE );
     gtk_combofix_set_max_items ( GTK_COMBOFIX (entry),
@@ -3425,7 +3396,7 @@
 					      FALSE );
     gtk_table_attach ( GTK_TABLE ( table ), entry, 1, 2, 0, 1,
 		       GTK_EXPAND|GTK_FILL, 0, 0, 0 );
-    g_object_set_data ( G_OBJECT (dialog), "payee", entry );
+    g_object_set_data ( G_OBJECT (vbox_main), "payee", entry );
 
     /* Create entry search string */
     label = gtk_label_new (COLON(_("Search string")));
@@ -3438,16 +3409,16 @@
     gtk_entry_set_text ( GTK_ENTRY (entry), "" );
     gtk_table_attach ( GTK_TABLE ( table ), entry, 1, 2, 1, 2,
 		       GTK_EXPAND|GTK_FILL, 0, 0, 0 );
-    g_object_set_data ( G_OBJECT (dialog), "Search_string", entry );
+    g_signal_connect_swapped ( entry, "changed", gsb_import_associations_check_add_button, vbox_main );
+    g_object_set_data ( G_OBJECT (vbox_main), "Search_string", entry );
 
-    gtk_widget_show_all ( GTK_WIDGET ( dialog ) );
-    result = gtk_dialog_run ( GTK_DIALOG ( dialog ));
+    gsb_import_associations_check_add_button ( vbox_main );
 
-     gtk_widget_destroy ( GTK_WIDGET ( dialog ));
+    return vbox_main;
 }
 
 
-void gsb_import_associations_add_assoc ( GtkWidget *button, GtkWidget *dialog )
+void gsb_import_associations_add_assoc ( GtkWidget *button, GtkWidget *main_widget )
 {
     GtkWidget *combo, *entry;
     GtkTreeView *treeview;
@@ -3455,12 +3426,12 @@
     const gchar *payee, *search_str;
     gint payee_number;
 
-    combo = g_object_get_data ( G_OBJECT (dialog), "payee" );
+    combo = g_object_get_data ( G_OBJECT (main_widget), "payee" );
     payee = g_strstrip ( (gchar *) gtk_combofix_get_text ( GTK_COMBOFIX (combo) ) );
     if ( strlen ( payee ) == 0 )
         return;
 
-    entry = g_object_get_data ( G_OBJECT (dialog), "Search_string" );
+    entry = g_object_get_data ( G_OBJECT (main_widget), "Search_string" );
     search_str = g_strstrip ( (gchar *)  gtk_entry_get_text ( GTK_ENTRY (entry) ) );
     if ( strlen ( search_str ) == 0 )
         return;
@@ -3468,7 +3439,7 @@
     devel_debug (search_str);
 
     payee_number = gsb_data_payee_get_number_by_name  ( payee, TRUE );
-    treeview = g_object_get_data ( G_OBJECT (dialog), "treeview" );
+    treeview = g_object_get_data ( G_OBJECT (main_widget), "treeview" );
     list_store = gtk_tree_view_get_model ( GTK_TREE_VIEW (treeview) );
 
     /* add association in liste_associations_tiers */
@@ -3528,7 +3499,7 @@
 }
 
 
-void gsb_import_associations_del_assoc ( GtkWidget *button, GtkWidget *dialog )
+void gsb_import_associations_del_assoc ( GtkWidget *button, GtkWidget *main_widget )
 {
     GtkTreeView *treeview;
     GtkTreeModel *model;
@@ -3536,7 +3507,7 @@
     GSList *list_tmp;
     gint payee_number;
 
-    treeview = g_object_get_data ( G_OBJECT (dialog), "treeview" );
+    treeview = g_object_get_data ( G_OBJECT (main_widget), "treeview" );
     if ( !gtk_tree_selection_get_selected (
                         gtk_tree_view_get_selection (treeview),
 					    &model,
@@ -3595,20 +3566,19 @@
 }
 
 gboolean gsb_import_associations_select_func ( GtkTreeSelection *selection,
-                        GtkTreeModel *model,
-                        GtkTreePath *path,
-                        gboolean path_currently_selected,
-                        gpointer data )
+					       GtkTreeModel *model,
+					       GtkTreePath *path,
+					       gboolean path_currently_selected,
+					       GObject * main_widget )
 {
-    GtkDialog *dialog = ( GtkDialog *) data;
     GtkWidget *combo, *entry, *button;
     GtkTreeIter iter;
     gchar *payee_str;
     gchar *search_str;
 
-    combo = g_object_get_data ( G_OBJECT (dialog), "payee" );
-    entry = g_object_get_data ( G_OBJECT (dialog), "Search_string" );
-    button = g_object_get_data ( G_OBJECT (dialog), "remove_button" );
+    combo = g_object_get_data ( G_OBJECT (main_widget), "payee" );
+    entry = g_object_get_data ( G_OBJECT (main_widget), "Search_string" );
+    button = g_object_get_data ( G_OBJECT (main_widget), "remove_button" );
 
     gtk_tree_model_get_iter ( model, &iter, path );
     gtk_tree_model_get ( model, &iter, 0, &payee_str, 1, &search_str, -1 );
@@ -3623,12 +3593,11 @@
 
 
 static void gsb_import_associations_cell_edited (GtkCellRendererText *cell,
-                        const gchar *path_string,
-                        const gchar *new_text,
-                        gpointer data)
+						 const gchar *path_string,
+						 const gchar *new_text,
+						 GObject * main_widget )
 {
     GtkWidget *entry;
-    GtkDialog *dialog = ( GtkDialog *) data;
     GtkTreeView *treeview;
     GtkTreeModel *model;
     GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
@@ -3637,7 +3606,7 @@
     gchar *search_str;
     gint payee_number;
 
-    treeview = g_object_get_data ( G_OBJECT (dialog), "treeview" );
+    treeview = g_object_get_data ( G_OBJECT (main_widget), "treeview" );
     model = gtk_tree_view_get_model ( treeview );
     gtk_tree_model_get_iter (model, &iter, path);
     gtk_tree_model_get ( model, &iter, 1, &search_str, 2, &payee_number, -1 );
@@ -3657,8 +3626,7 @@
                 if ( assoc -> search_str && strlen (assoc -> search_str) )
                     g_free ( assoc -> search_str );
                 assoc -> search_str = g_strdup ( new_text );
-                entry = g_object_get_data ( G_OBJECT (dialog),
-                        "Search_string" );
+                entry = g_object_get_data ( main_widget, "Search_string" );
                 gtk_entry_set_text ( GTK_ENTRY (entry), new_text );
                 break;
             }
@@ -3670,7 +3638,7 @@
 
 
 void gsb_import_associations_combo_changed ( GtkEditable *editable,
-                        GtkDialog *dialog )
+					     GObject * main_widget )
 {
     GtkWidget *button, *entry;
     const gchar *tmpstr;
@@ -3680,7 +3648,7 @@
                         gtk_editable_get_chars (editable, 0, -1), FALSE );
     tmpstr = gsb_data_payee_get_search_string ( payee_number );
 
-    entry = g_object_get_data ( G_OBJECT (dialog), "Search_string" );
+    entry = g_object_get_data ( main_widget, "Search_string" );
 
     if ( strlen ( tmpstr) == 0 )
     {
@@ -3691,8 +3659,10 @@
         gtk_editable_delete_text  ( editable, 0, -1 );
 
     /* on empeche la suppression par inadvertance d'une association */
-    button = g_object_get_data ( G_OBJECT (dialog), "remove_button" );
+    button = g_object_get_data ( main_widget, "remove_button" );
     gtk_widget_set_sensitive ( button, FALSE );
+
+    gsb_import_associations_check_add_button ( main_widget );
 }
 
 
@@ -3739,6 +3709,41 @@
 }
 
 
+
+/**
+ *
+ *
+ *
+ *
+ */
+gboolean gsb_import_associations_check_add_button ( GObject * main_widget )
+{
+    GtkWidget * payee_widget, * search_string_widget;
+
+    gboolean sensitive = TRUE;
+
+    payee_widget = g_object_get_data ( main_widget, "payee" );
+    if ( payee_widget )
+    {
+	gchar * content = gtk_combofix_get_text ( GTK_COMBOFIX ( payee_widget ) );
+	if ( ! content || ! strlen(content) )
+	    sensitive = FALSE;
+    }
+
+    search_string_widget = g_object_get_data ( main_widget, "Search_string" );
+    if ( search_string_widget )
+    {
+	gchar * content = gtk_entry_get_text ( GTK_ENTRY ( search_string_widget ) );
+	if ( ! content || ! strlen(content) )
+	    sensitive = FALSE;
+    }
+
+    gtk_widget_set_sensitive ( GTK_WIDGET ( g_object_get_data ( main_widget, "add_button" ) ),
+			       sensitive );
+
+    return FALSE;
+}
+
 /* *******************************************************************************/
 
 

Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -d -r1.157 -r1.158
--- gsb_file_load.c	24 Mar 2009 19:07:50 -0000	1.157
+++ gsb_file_load.c	30 Mar 2009 15:11:08 -0000	1.158
@@ -1,7 +1,7 @@
 /* ************************************************************************** */
 /*                                                                            */
 /*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	      */
-/*			2003-2008 Benjamin Drieu (bdrieu at april.org)	      */
+/*			2003-2009 Benjamin Drieu (bdrieu at april.org)	      */
 /* 			http://www.grisbi.org				      */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
@@ -24,6 +24,7 @@
 
 #include "include.h"
 #include <glib/gstdio.h>
+#include <gio/gio.h>
 
 /*START_INCLUDE*/
 #include "gsb_file_load.h"
@@ -85,7 +86,6 @@
 static gboolean gsb_file_load_check_new_structure ( gchar *file_content );
 static void gsb_file_load_color_part ( const gchar **attribute_names,
 				const gchar **attribute_values );
-static gboolean gsb_file_load_copy_old_file_and_glib ( gchar *filename, gchar *file_content);
 static void gsb_file_load_currency ( const gchar **attribute_names,
 			      const gchar **attribute_values );
 static void gsb_file_load_currency_link ( const gchar **attribute_names,
@@ -321,14 +321,6 @@
 	}
 	else
 	{
-        /* backup of an old file grisbi */
-//~ #if GLIB_CHECK_VERSION(2,18,0)
-        //~ if ( ! gsb_file_load_copy_old_file ( filename ) )
-            //~ return FALSE;
-//~ # else
-        if ( ! gsb_file_load_copy_old_file_and_glib ( filename, file_content ) )
-            return FALSE;
-//~ #endif
 	    /* fill the GMarkupParser for the last xml structure */
 	    markup_parser -> start_element = (void *) gsb_file_load_start_element_before_0_6;
 	    markup_parser -> end_element = (void *) gsb_file_load_end_element_before_0_6;
@@ -7569,11 +7561,6 @@
 		list_tmp = list_tmp -> next;
 	    }
 
-	    /* fourth step : show a message, because it's not all the time sure,
-	     * for example if someone used the same name for several reconcile, there will have a mix between all...
-	     * or the same without name, so better to check in the configuration */
-	    dialog_message ( "reconcile-start-end-dates" );
-
 	    /*
 	     * untill 0.6, no archive, so by default we let grisbi check at opening and set
 	     * the transactions limit to 3000 */
@@ -7693,65 +7680,7 @@
 }
 
 
-/** 
- * save an old grisbi file 
- *
- * \param filename the name of the file
- *
- * \return TRUE : ok, FALSE : problem
- * */
-/*gboolean gsb_file_load_copy_old_file ( gchar *filename )
-{
-    if ( g_str_has_suffix (filename, ".gsb" ) )
-    {
-        gchar *new_filename;
-        GFile * file_ori;
-        GFile * file_copy;
-        GError * error = NULL;
 
-        new_filename = gsb_string_remplace_string ( filename, ".gsb",
-                        "-old-version.gsb" );
-        file_ori = g_file_new_for_path ( filename );
-        file_copy = g_file_new_for_path ( new_filename );
-        if ( g_file_copy ( file_ori, file_copy, G_FILE_COPY_OVERWRITE, 
-                        NULL, NULL, NULL, &error ) )
-        {
-            gchar *tmpstr = g_strdup_printf ( 
-                        _("Your old file grisbi was saved as: \n\n%s"),
-                        basename ( new_filename ) );
-            dialogue ( tmpstr );
-            g_free ( tmpstr );
-            return TRUE;
-        }
-        else
-            dialogue_error (error -> message );
-    }
-    return FALSE;
-} */
-
-gboolean gsb_file_load_copy_old_file_and_glib ( gchar *filename, gchar *file_content)
-{
-    if ( g_str_has_suffix (filename, ".gsb" ) )
-    {
-        gchar *new_filename;
-        GError * error = NULL;
-
-        new_filename = gsb_string_remplace_string ( filename, ".gsb",
-                        "-old-version.gsb" );
-        if (g_file_set_contents ( new_filename, file_content,-1, &error ))
-        {
-            gchar *tmpstr = g_strdup_printf ( 
-                        _("Your old file grisbi was saved as: \n\n%s"),
-                        basename ( new_filename ) );
-            dialogue ( tmpstr );
-            g_free ( tmpstr );
-            return TRUE;
-        }
-        else
-            dialogue_error (error -> message );
-    }
-    return FALSE;
-}
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */

Index: import.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/import.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- import.h	22 Mar 2009 18:53:25 -0000	1.39
+++ import.h	30 Mar 2009 15:11:08 -0000	1.40
@@ -121,7 +121,8 @@
 };
 
 /* START_DECLARATION */
-gint gsb_import_associations_list_append_assoc ( gint payee_number, 
+GtkWidget * gsb_import_associations_gere_tiers ( );
+gint gsb_import_associations_list_append_assoc ( gint payee_number,
                         const gchar *search_str );
 gboolean gsb_import_by_rule ( gint rule );
 void gsb_import_register_account ( struct struct_compte_importation * account );

Index: gsb_autofunc.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_autofunc.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- gsb_autofunc.c	5 Mar 2009 19:12:29 -0000	1.18
+++ gsb_autofunc.c	30 Mar 2009 15:11:08 -0000	1.19
@@ -1,7 +1,7 @@
 /* ************************************************************************** */
 /*                                                                            */
 /*     Copyright (C)	2000-2008 Cedric Auger (cedric at grisbi.org)	      */
-/*			2003-2008 Benjamin Drieu (bdrieu at april.org)	      */
+/*			2003-2009 Benjamin Drieu (bdrieu at april.org)	      */
 /* 			http://www.grisbi.org				      */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
@@ -54,8 +54,8 @@
 						   gboolean default_func (gint, gboolean));
 static  gboolean gsb_autofunc_combobox_changed ( GtkWidget *combobox,
 						gboolean default_func (gint, gint));
-static  gboolean gsb_autofunc_currency_changed ( GtkWidget *combobox,
-						gboolean default_func (gint, gint));
+static gboolean gsb_autofunc_currency_changed ( GtkWidget *combobox,
+					 gboolean default_func (gint, gint));
 static  gboolean gsb_autofunc_date_changed ( GtkWidget *entry,
 					    gboolean default_func (gint, const GDate *));
 static  gboolean gsb_autofunc_entry_changed ( GtkWidget *entry,
@@ -1406,8 +1406,8 @@
  *
  * \return FALSE
  */
-static gboolean gsb_autofunc_currency_changed ( GtkWidget *combobox,
-						gboolean default_func (gint, gint))
+gboolean gsb_autofunc_currency_changed ( GtkWidget *combobox,
+					 gboolean default_func (gint, gint))
 {
     gint number_for_func;
 

Index: gsb_file_save.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_save.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -d -r1.117 -r1.118
--- gsb_file_save.c	24 Mar 2009 19:07:50 -0000	1.117
+++ gsb_file_save.c	30 Mar 2009 15:11:08 -0000	1.118
@@ -1,7 +1,7 @@
 /* ************************************************************************** */
 /*                                                                            */
 /*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	          */
-/*			2003-2008 Benjamin Drieu (bdrieu at april.org)	                      */
+/*			2003-2009 Benjamin Drieu (bdrieu at april.org)	                      */
 /* 			http://www.grisbi.org				                              */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */

Index: parametres.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/parametres.c,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -d -r1.188 -r1.189
--- parametres.c	5 Mar 2009 19:12:30 -0000	1.188
+++ parametres.c	30 Mar 2009 15:11:08 -0000	1.189
@@ -1,7 +1,7 @@
 /* ************************************************************************** */
 /*                                                                            */
 /*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	      */
-/*			2003-2008 Benjamin Drieu (bdrieu at april.org)	      */
+/*			2003-2009 Benjamin Drieu (bdrieu at april.org)	      */
 /* 			http://www.grisbi.org				      */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
@@ -42,6 +42,7 @@
 #include "./gsb_file.h"
 #include "./gsb_form_config.h"
 #include "./gsb_fyear_config.h"
+#include "./import.h"
 #include "./gsb_payment_method_config.h"
 #include "./gsb_reconcile_config.h"
 #include "./gsb_reconcile_sort_config.h"
@@ -49,7 +50,6 @@
 #include "./utils_files.h"
 #include "./affichage_liste.h"
 #include "./affichage.h"
-#include "./import.h"
 #include "./structures.h"
 #include "./include.h"
 #include "./erreur.h"
@@ -293,12 +293,30 @@
     gtk_tree_store_append (GTK_TREE_STORE (preference_tree_model), &iter2, &iter);
     gtk_tree_store_set (GTK_TREE_STORE (preference_tree_model),
 			&iter2,
+			0, _("Import associations"),
+			1, IMPORT_ASSOCIATION_PAGE,
+			2, 400,
+			-1);
+    gtk_notebook_append_page (preference_frame, gsb_import_associations_gere_tiers (), NULL);
+
+    gtk_tree_store_append (GTK_TREE_STORE (preference_tree_model), &iter2, &iter);
+    gtk_tree_store_set (GTK_TREE_STORE (preference_tree_model),
+			&iter2,
 			0, _("Programs"),
 			1, SOFTWARE_PAGE,
 			2, 400,
 			-1);
     gtk_notebook_append_page (preference_frame, onglet_programmes(), NULL);
 
+    gtk_tree_store_append (GTK_TREE_STORE (preference_tree_model), &iter2, &iter);
+    gtk_tree_store_set (GTK_TREE_STORE (preference_tree_model),
+			&iter2,
+			0, _("Scheduler"),
+			1, SCHEDULER_PAGE,
+			2, 400,
+			-1);
+    gtk_notebook_append_page (preference_frame, gsb_config_scheduler_page (), NULL);
+
     /* Display subtree */
     gtk_tree_store_append (GTK_TREE_STORE (preference_tree_model), &iter, NULL);
     gtk_tree_store_set (GTK_TREE_STORE (preference_tree_model),
@@ -438,15 +456,6 @@
     gtk_tree_store_append (GTK_TREE_STORE (preference_tree_model), &iter2, &iter);
     gtk_tree_store_set (GTK_TREE_STORE (preference_tree_model),
 			&iter2,
-			0, _("Scheduler"),
-			1, SCHEDULER_PAGE,
-			2, 400,
-			-1);
-    gtk_notebook_append_page (preference_frame, gsb_config_scheduler_page (), NULL);
-
-    gtk_tree_store_append (GTK_TREE_STORE (preference_tree_model), &iter2, &iter);
-    gtk_tree_store_set (GTK_TREE_STORE (preference_tree_model),
-			&iter2,
 			0, _("Currencies"),
 			1, CURRENCIES_PAGE,
 			2, 400,

Index: parametres.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/parametres.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- parametres.h	25 Jan 2009 07:50:09 -0000	1.27
+++ parametres.h	30 Mar 2009 15:11:08 -0000	1.28
@@ -7,7 +7,9 @@
     FILES_PAGE,
     ARCHIVE_PAGE,
     IMPORT_PAGE,
+    IMPORT_ASSOCIATION_PAGE,
     SOFTWARE_PAGE,
+    SCHEDULER_PAGE,
     FONTS_AND_LOGO_PAGE,
     MESSAGES_AND_WARNINGS_PAGE,
     ADDRESSES_AND_TITLES_PAGE,
@@ -19,7 +21,6 @@
     TRANSACTION_FORM_PAGE,
     TRANSACTION_FORM_BEHAVIOR_PAGE,
     TRANSACTION_FORM_COMPLETION_PAGE,
-    SCHEDULER_PAGE,
     CURRENCIES_PAGE,
     CURRENCY_LINKS_PAGE,
     BANKS_PAGE,

Index: menu.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/menu.c,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -d -r1.143 -r1.144
--- menu.c	5 Mar 2009 19:12:30 -0000	1.143
+++ menu.c	30 Mar 2009 15:11:08 -0000	1.144
@@ -4,7 +4,7 @@
 /*                                  menu.c                                    */
 /*                                                                            */
 /*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	      */
-/*			2004-2008 Benjamin Drieu (bdrieu at april.org)	      */
+/*			2004-2009 Benjamin Drieu (bdrieu at april.org)	      */
 /*			http://www.grisbi.org				      */
 /*                                                                            */
 /*  This program is free software; you can redistribute it and/or modify      */
@@ -286,7 +286,7 @@
 	  NULL,			NULL,			FOUR_LINES_PER_TRANSACTION },
     }; 
     GtkToggleActionEntry toggle_entries[] = {
-	{ "DebugMode",		NULL,			_("Start the Debug mode"),
+	{ "DebugMode",		NULL,			_("Debug mode"),
 	  NULL,			NULL,			G_CALLBACK(gsb_debug_start_log ),
 	  etat.debug_mode },
 

Index: gsb_file_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_config.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- gsb_file_config.c	26 Mar 2009 19:38:28 -0000	1.72
+++ gsb_file_config.c	30 Mar 2009 15:11:08 -0000	1.73
@@ -1164,7 +1164,7 @@
 
     etat.r_modifiable = 0;       /* on ne peux modifier les opé relevées */
     etat.dernier_fichier_auto = 1;   /*  on n'ouvre pas directement le dernier fichier */
-    etat.sauvegarde_auto = 1;    /* on sauvegarde automatiquement par défaut pbiava 24/01/2009*/
+    etat.sauvegarde_auto = 0;    /* on NE sauvegarde PAS * automatiquement par défaut */
     etat.entree = 1;    /* la touche entree provoque l'enregistrement de l'opération */
     nb_days_before_scheduled = 0;     /* nb de jours avant l'échéance pour prévenir */
     execute_scheduled_of_month = FALSE;



More information about the cvs mailing list