[grisbi-cvs] grisbi/src fenetre_principale.c, 1.118, 1.119 gsb_file.c, 1.56, 1.57 gsb_file_load.c, 1.183, 1.184 gsb_file_save.c, 1.133, 1.134 gsb_transactions_list.c, 1.176, 1.177 transaction_list.c, 1.44, 1.45

Pierre Biava pbiava at users.sourceforge.net
Thu Jul 9 00:18:23 CEST 2009


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

Modified Files:
	fenetre_principale.c gsb_file.c gsb_file_load.c 
	gsb_file_save.c gsb_transactions_list.c transaction_list.c 
Log Message:
minor changes

Index: gsb_file.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- gsb_file.c	7 Jun 2009 22:18:31 -0000	1.56
+++ gsb_file.c	8 Jul 2009 22:18:21 -0000	1.57
@@ -68,6 +68,7 @@
 static  gint gsb_file_dialog_save ( void );
 static gboolean gsb_file_save_backup ( void );
 static gboolean gsb_file_save_file ( gint origine );
+static void gsb_file_save_remove_old_file ( gchar *filename );
 /*END_STATIC*/
 
 
@@ -83,6 +84,7 @@
 
 
 /*START_EXTERN*/
+extern gchar *copy_old_filename;
 extern GtkWidget *main_hpaned;
 extern GtkWidget *main_vbox;
 extern gint max;
@@ -554,6 +556,14 @@
 	return ( FALSE );
     }
 
+        /* Si le fichier est un d'une version précédente de grisbi on demande si on l'efface */
+    if ( copy_old_filename && strlen ( copy_old_filename ) > 0 )
+    {
+        gsb_file_save_remove_old_file ( copy_old_filename );
+        g_free ( copy_old_filename );
+        copy_old_filename = NULL;
+    }
+
     /* make backup before saving if asked */
     if (etat.make_backup)
 	gsb_file_save_backup();
@@ -1118,7 +1128,60 @@
 }
 
 
+/**
+ * efface la copie du fichier de comptes ancienne version
+ *
+ * \param filename  le chemein du fichier à effacer
+ *
+ * */
+void gsb_file_save_remove_old_file ( gchar *filename )
+{
+    GtkWidget *dialog;
+    GtkWidget *content_area;
+    GtkWidget *hbox;
+    GtkWidget *image;
+    GtkWidget *label;
+    gint resultat;
+
+    dialog = gtk_dialog_new_with_buttons ( 
+                        _("Delete a copy of file of the old version of grisbi"),
+                        GTK_WINDOW ( window ),
+                        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+                        GTK_STOCK_NO, GTK_RESPONSE_CANCEL,
+                        GTK_STOCK_YES, GTK_RESPONSE_OK,
+                        NULL );
 
+    gtk_window_set_position ( GTK_WINDOW ( dialog ), GTK_WIN_POS_CENTER_ON_PARENT );
+    gtk_window_set_resizable ( GTK_WINDOW ( dialog ), FALSE );
+
+    content_area = GTK_DIALOG(dialog) -> vbox;
+    hbox = gtk_hbox_new ( FALSE, 5);
+    gtk_container_set_border_width ( GTK_CONTAINER( hbox ), 6 );
+    gtk_box_pack_start ( GTK_BOX ( content_area ), hbox, FALSE, FALSE, 5 );
+
+    image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, 
+                        GTK_ICON_SIZE_DIALOG );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), image, FALSE, FALSE, 5 );
+
+    gchar *tmpstr = g_strdup_printf ( 
+                        _("Careful, you are about to deleting the copy of file\n"
+                        "of the old version of grisbi.\n"
+                        "\n<b>Do you want to delete this file :\n%s ?</b>"),
+                        filename );
+
+    label = gtk_label_new ( tmpstr );
+    gtk_label_set_use_markup ( GTK_LABEL( label ), TRUE );
+    gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 5 );
+    g_free ( tmpstr );
+
+    gtk_widget_show_all ( dialog );
+
+    resultat = gtk_dialog_run ( GTK_DIALOG ( dialog ));
+
+    if ( resultat == GTK_RESPONSE_OK )
+        g_unlink ( filename );
+    gtk_widget_destroy ( GTK_WIDGET ( dialog ) );
+}
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */

Index: fenetre_principale.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/fenetre_principale.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -d -r1.118 -r1.119
--- fenetre_principale.c	27 Jun 2009 20:50:40 -0000	1.118
+++ fenetre_principale.c	8 Jul 2009 22:18:20 -0000	1.119
@@ -45,7 +45,9 @@
 /*START_STATIC*/
 static GtkWidget *create_main_notebook (void );
 static gboolean gsb_gui_fill_main_notebook ( GtkWidget *notebook );
-static void gsb_gui_headings_private_update_label_markup ( GtkLabel *label, const gchar *text, gboolean escape_text );
+static void gsb_gui_headings_private_update_label_markup ( GtkLabel *label,
+                        const gchar *text,
+                        gboolean escape_text );
 static gboolean gsb_gui_hpaned_size_allocate ( GtkWidget *hpaned,
                         GtkAllocation *allocation,
                         gpointer null );

Index: gsb_transactions_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list.c,v
retrieving revision 1.176
retrieving revision 1.177
diff -u -d -r1.176 -r1.177
--- gsb_transactions_list.c	5 Jul 2009 09:24:48 -0000	1.176
+++ gsb_transactions_list.c	8 Jul 2009 22:18:21 -0000	1.177
@@ -221,7 +221,7 @@
                         gboolean keep_selected_transaction )
 {
     gint selected_transaction = 0;
-devel_debug ("\n");
+
     /* called sometimes with gsb_gui_navigation_get_current_account, so check we are 
      * on an account */
     if ( account_number == -1 )
@@ -1894,6 +1894,8 @@
 
     /* update the tree view */
     transaction_list_colorize ();
+    if ( etat.show_transaction_gives_balance )
+        transaction_list_set_color_jour ( account_number );
     transaction_list_set_balances ();
     transaction_list_select (gsb_data_account_get_current_transaction_number (account_number));
 
@@ -3021,6 +3023,8 @@
 				       sort_type );
     transaction_list_sort ();
     transaction_list_colorize ();
+    if ( etat.show_transaction_gives_balance )
+        transaction_list_set_color_jour ( account_number );
     transaction_list_set_balances ();
     transaction_list_select (selected_transaction);
 

Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -d -r1.183 -r1.184
--- gsb_file_load.c	17 Jun 2009 19:39:51 -0000	1.183
+++ gsb_file_load.c	8 Jul 2009 22:18:21 -0000	1.184
@@ -7982,7 +7982,6 @@
         if ( ! g_file_set_contents ( copy_old_filename, file_content,-1, &error ) )
             dialogue_error (error -> message );
 #endif
-        g_free ( copy_old_filename );
     }
 }
 /* Local Variables: */

Index: gsb_file_save.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_save.c,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -d -r1.133 -r1.134
--- gsb_file_save.c	17 Jun 2009 19:39:51 -0000	1.133
+++ gsb_file_save.c	8 Jul 2009 22:18:21 -0000	1.134
@@ -115,7 +115,6 @@
 static gulong gsb_file_save_reconcile_part ( gulong iterator,
                         gulong *length_calculated,
                         gchar **file_content );
-static void gsb_file_save_remove_old_file ( gchar *filename );
 static gulong gsb_file_save_scheduled_part ( gulong iterator,
                         gulong *length_calculated,
                         gchar **file_content );
@@ -134,7 +133,6 @@
 extern gint affichage_echeances_perso_nb_libre;
 extern GdkColor archive_background_color;
 extern GdkColor calendar_entry_color;
-extern gchar *copy_old_filename;
 extern GdkColor couleur_fond[2];
 extern GdkColor couleur_grise;
 extern GdkColor couleur_jour;
@@ -153,7 +151,6 @@
 extern gchar *titre_fichier;
 extern gint transaction_col_width[CUSTOM_MODEL_N_VISIBLES_COLUMN];
 extern gint valeur_echelle_recherche_date_import;
-extern GtkWidget *window;
 /*END_EXTERN*/
 
 
@@ -445,12 +442,6 @@
 		    S_IRUSR | S_IWUSR );
     }
 
-    /* Si le fichier est un d'une version précédente de grisbi on demande si on l'efface */
-    if ( copy_old_filename && strlen ( copy_old_filename ) > 0 )
-    {
-        gsb_file_save_remove_old_file ( copy_old_filename );
-    }
-
     etat.en_train_de_sauvegarder = 0;
 
     return ( TRUE );
@@ -2498,58 +2489,6 @@
 }
 
 
-/**
- * efface la copie du fichier de comptes ancienne version
- *
- * \param filename  le chemein du fichier à effacer
- *
- * */
-void gsb_file_save_remove_old_file ( gchar *filename )
-{
-    GtkWidget *dialog;
-    GtkWidget *content_area;
-    GtkWidget *hbox;
-    GtkWidget *image;
-    GtkWidget *label;
-    gint resultat;
-
-    dialog = gtk_dialog_new_with_buttons ( 
-                        _("Delete a copy of file of the old version of grisbi"),
-                        GTK_WINDOW ( window ),
-                        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-                        GTK_STOCK_NO, GTK_RESPONSE_CANCEL,
-                        GTK_STOCK_YES, GTK_RESPONSE_OK,
-                        NULL );
-
-    gtk_window_set_position ( GTK_WINDOW ( dialog ), GTK_WIN_POS_CENTER_ON_PARENT );
-    gtk_window_set_resizable ( GTK_WINDOW ( dialog ), FALSE );
-
-    content_area = GTK_DIALOG(dialog) -> vbox;
-    hbox = gtk_hbox_new ( FALSE, 5);
-    gtk_container_set_border_width ( GTK_CONTAINER( hbox ), 6 );
-    gtk_box_pack_start ( GTK_BOX ( content_area ), hbox, FALSE, FALSE, 5 );
-
-    image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, 
-                        GTK_ICON_SIZE_DIALOG );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), image, FALSE, FALSE, 5 );
-
-    gchar *tmpstr = g_strconcat ( 
-                        _("Careful, you are about to deleting the copy of file\n"
-                        "of the old version of grisbi.\n"
-                        "\n<b>Do you want to continue ?</b>"),
-                        NULL );
-
-    label = gtk_label_new ( tmpstr );
-    gtk_label_set_use_markup ( GTK_LABEL( label ), TRUE );
-    gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 5 );
-    g_free ( tmpstr );
-
-    gtk_widget_show_all ( dialog );
-
-    resultat = gtk_dialog_run ( GTK_DIALOG ( dialog ));
-
-    if ( resultat == GTK_RESPONSE_OK )
-        g_unlink ( filename );
-    if ( GTK_IS_DIALOG ( dialog ) )
-        gtk_widget_destroy ( GTK_WIDGET ( dialog ) );
-}
+/* Local Variables: */
+/* c-basic-offset: 4 */
+/* End: */

Index: transaction_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_list.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- transaction_list.c	5 Jul 2009 09:24:48 -0000	1.44
+++ transaction_list.c	8 Jul 2009 22:18:21 -0000	1.45
@@ -2035,7 +2035,7 @@
 
 
 /**
- * colorise avec un fond vert la ligne qui correspond à la date du jour
+ * colorise avec un fond gris la ligne qui correspond à la date du jour
  *
  * \param 
  *
@@ -2048,6 +2048,7 @@
     gint res;
     gint transaction_number;
     CustomList *custom_list;
+
     devel_debug (NULL);
 
     custom_list = transaction_model_get_model ();



More information about the cvs mailing list