[grisbi-cvs] [SCM] grisbi branch, grisbi-gtk3, updated. grisbi_gtk3_1_3_0-171-g15b26b2

Philippe Delorme nobody at users.sourceforge.net
Sun Feb 26 12:38:42 CET 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".

The branch, grisbi-gtk3 has been updated
       via  15b26b224c1b849305b973f518980be7cf861ee1 (commit)
       via  cd60ad14d72fc281e43421cd20eb06f925f8bc30 (commit)
       via  9b232d0254bcb20c38176165715d1afac6e4fc8d (commit)
      from  655804796a4ec672f5487527d5c6809c0c16a9fa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 15b26b224c1b849305b973f518980be7cf861ee1
Author: Philippe Delorme <philippedelorme at users.sourceforge.net>
Date:   Sun Feb 26 12:31:09 2012 +0100

    Fix welcome page is not shown
    
    Occured in case we have autoloading enabled but no file to load.

commit cd60ad14d72fc281e43421cd20eb06f925f8bc30
Author: Philippe Delorme <philippedelorme at users.sourceforge.net>
Date:   Sun Feb 26 12:29:48 2012 +0100

    gsb_file.c: fixed memory leak

commit 9b232d0254bcb20c38176165715d1afac6e4fc8d
Author: Philippe Delorme <philippedelorme at users.sourceforge.net>
Date:   Sun Feb 26 12:25:43 2012 +0100

    Fix segfault in file autoloading
    
    Occured in case autoloading is enabled but we don't have any file to
    load (tab_noms_derniers_fichiers_ouverts: null pointer dereference).

-----------------------------------------------------------------------

Changes:
diff --git a/src/grisbi_window.c b/src/grisbi_window.c
index 7536835..06e0b14 100644
--- a/src/grisbi_window.c
+++ b/src/grisbi_window.c
@@ -234,7 +234,7 @@ static void grisbi_window_init ( GrisbiWindow *window )
     window->priv->accueil_page = grisbi_window_new_accueil_page ( window );
     gtk_box_pack_start ( GTK_BOX ( main_box ), window->priv->accueil_page, FALSE, FALSE, 0 );
 
-    if ( conf->load_last_file )
+    if ( conf->load_last_file && conf->nb_derniers_fichiers_ouverts > 0 )
         gtk_widget_hide ( window->priv->accueil_page );
 
     /* initialisation de la variable etat */
diff --git a/src/gsb_file.c b/src/gsb_file.c
index d27d5c1..1294c7b 100644
--- a/src/gsb_file.c
+++ b/src/gsb_file.c
@@ -287,7 +287,6 @@ gboolean gsb_file_open_direct_menu ( GtkMenuItem *item,
     GrisbiApp *app;
     GrisbiAppConf *conf;
     gint file_number;
-    gchar *nom_fichier_comptes;
 
     /* continue only if can close the current file */
     if ( !gsb_file_close ( ) )
@@ -297,10 +296,7 @@ gboolean gsb_file_open_direct_menu ( GtkMenuItem *item,
     conf = grisbi_app_get_conf ( );
 
     file_number = GPOINTER_TO_INT ( file_number_ptr );
-    nom_fichier_comptes = my_strdup ( conf->tab_noms_derniers_fichiers_ouverts[file_number] );
-
-    gsb_file_open_file ( nom_fichier_comptes );
-    g_free ( nom_fichier_comptes );
+    gsb_file_open_file ( conf->tab_noms_derniers_fichiers_ouverts[file_number] );
 
     return FALSE;
 }
diff --git a/src/main.c b/src/main.c
index 7b5fd78..b9c3c6a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -241,7 +241,9 @@ void gsb_main_load_file_if_necessary ( GrisbiCommandLine *command_line )
     else
     {
         /* open the last file if needed */
-        if ( conf->load_last_file && conf->tab_noms_derniers_fichiers_ouverts[0] )
+        if ( conf->load_last_file && 
+             conf->nb_derniers_fichiers_ouverts > 0 &&
+             conf->tab_noms_derniers_fichiers_ouverts[0] )
         {
             gsb_file_open_file ( conf->tab_noms_derniers_fichiers_ouverts[0] );
         }


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list