[grisbi-cvs] [SCM] grisbi branch, grisbi-gtk3, updated. grisbi_gtk3_1_3_0-61-gb9a6e70

Pierre Biava nobody at users.sourceforge.net
Sat Jan 21 19:54:35 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  b9a6e70f66a22e1b39af2268dee9fc729590f971 (commit)
       via  893deeb32fff840db22043147e60488c0a7565f9 (commit)
       via  8a34e379dea081aacb5cc4337fed655b09377a56 (commit)
      from  15c7ddde31292bfc5ae3582cd6c0e25768ed08f0 (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 b9a6e70f66a22e1b39af2268dee9fc729590f971
Author: pbiava <pierre.biava at nerim.net>
Date:   Sat Jan 21 19:01:05 2012 +0100

    Corrects an error in the name of widget

commit 893deeb32fff840db22043147e60488c0a7565f9
Author: pbiava <pierre.biava at nerim.net>
Date:   Thu Jan 19 21:33:51 2012 +0100

    fixes a crash when selecting the option"Add transactions archived in the totals"

commit 8a34e379dea081aacb5cc4337fed655b09377a56
Author: pbiava <pierre.biava at nerim.net>
Date:   Thu Jan 19 20:06:31 2012 +0100

    Fix a crash when selecting the tab "Content" in the preferences

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

Changes:
diff --git a/src/etats_config.c b/src/etats_config.c
index db3e294..f116c5e 100644
--- a/src/etats_config.c
+++ b/src/etats_config.c
@@ -3506,7 +3506,7 @@ void etats_config_recupere_info_onglet_affichage_titres ( gint report_number )
     gsb_data_report_set_payee_show_name ( report_number,
 					  etats_config_ui_toggle_button_get_actif ( "bouton_afficher_noms_tiers" ) );
     gsb_data_report_set_payee_show_payee_amount ( report_number,
-					  etats_config_ui_toggle_button_get_actif ( "bouton_afficher_sous_total_tiers" ) );
+					  etats_config_ui_toggle_button_get_actif ( "bouton_affiche_sous_total_tiers" ) );
 
     /* données des catégories */
     gsb_data_report_set_category_show_name ( report_number,
diff --git a/src/gsb_currency_config.c b/src/gsb_currency_config.c
index 782a50f..3305e98 100644
--- a/src/gsb_currency_config.c
+++ b/src/gsb_currency_config.c
@@ -852,8 +852,8 @@ GtkWidget *gsb_currency_config_create_totals_page ( void )
 
     check_button = gsb_automem_checkbutton_new (
                         _("Add transactions archived in the totals"),
-                        &(etat.add_archive_in_total_balance),
-                        G_CALLBACK ( gsb_config_metatree_sort_transactions_changed ),
+                        &etat.add_archive_in_total_balance,
+                        G_CALLBACK ( gsb_config_metatree_re_sort_divisions ),
                         NULL);
     gtk_table_attach ( GTK_TABLE ( table ), check_button,
                         0, 1, 3, 4, GTK_SHRINK | GTK_FILL, 0, 0, 0 );
diff --git a/src/gsb_form.c b/src/gsb_form.c
index c937b94..938038c 100644
--- a/src/gsb_form.c
+++ b/src/gsb_form.c
@@ -3551,16 +3551,19 @@ gboolean gsb_form_allocate_size ( GtkWidget *table,
     GtkWidget *widget;
 
     if (! gsb_form_is_visible ( ) )
-	return FALSE;
+        return FALSE;
+
+    if ( allocation == NULL )
+        return FALSE;
 
     account_number = gsb_form_get_account_number ();
     if ( account_number == -2 )
-	return FALSE;
+        return FALSE;
 
     if (saved_allocation_size == allocation -> width)
     {
-	saved_allocation_size = 0;
-	return FALSE;
+        saved_allocation_size = 0;
+        return FALSE;
     }
     saved_allocation_size = allocation -> width;
 
diff --git a/src/gsb_form_config.c b/src/gsb_form_config.c
index 5e7a71a..05a7ef7 100644
--- a/src/gsb_form_config.c
+++ b/src/gsb_form_config.c
@@ -47,6 +47,7 @@
 #include "traitement_variables.h"
 #include "utils.h"
 #include "utils_str.h"
+#include "erreur.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -826,7 +827,7 @@ gboolean gsb_form_config_change_column_size ( GtkWidget *tree_view,
     gint column;
     gint account_number;
     gint i;
-    GtkAllocation *tmp_allocation = NULL;
+    GtkAllocation tmp_allocation;
 
     if ( !gtk_widget_get_realized ( tree_view ) )
         return FALSE;
@@ -848,13 +849,11 @@ gboolean gsb_form_config_change_column_size ( GtkWidget *tree_view,
     }
 
     gsb_file_set_modified ( TRUE );
-
     /* update the form if needed */
-        saved_allocation_size = 0;
-        gtk_widget_get_allocation ( form_transaction_part, tmp_allocation );
-        gsb_form_allocate_size ( NULL, tmp_allocation, NULL );
-
-        gsb_form_create_widgets ();
+    saved_allocation_size = 0;
+    gtk_widget_get_allocation ( form_transaction_part, &tmp_allocation );
+    gsb_form_allocate_size ( NULL, &tmp_allocation, NULL );
+    gsb_form_create_widgets ();
 
     return FALSE;
 }
diff --git a/src/parametres.c b/src/parametres.c
index 2b3af4c..56724e0 100644
--- a/src/parametres.c
+++ b/src/parametres.c
@@ -78,6 +78,9 @@
 
 /*START_STATIC*/
 static GtkWidget *create_preferences_tree ( );
+static gboolean gsb_config_metatree_sort_transactions_changed ( GtkWidget *checkbutton,
+                        GdkEventButton *event,
+                        gint *pointeur );
 static gboolean gsb_config_onglet_metatree_action_changed ( GtkWidget *checkbutton,
                         GdkEventButton *event,
                         gint *pointeur );
@@ -1179,24 +1182,19 @@ GtkWidget *onglet_metatree ( void )
 
 
 /**
+ * Cette fonction est appellée suite au changement de l'ordre de tri des opérations
+ * dans les divisions.
  *
+ * \param
+ * \param
+ * \param
  *
- *
- *
+ * \return FALSE
  * */
 gboolean gsb_config_metatree_sort_transactions_changed ( GtkWidget *checkbutton,
                         GdkEventButton *event,
                         gint *pointeur )
 {
-    GtkWidget *payee_tree;
-    GtkWidget *category_tree;
-    GtkWidget *budgetary_tree;
-    GtkTreeSelection *selection;
-    GtkTreeModel *model;
-    GtkTreeIter iter;
-    GtkTreePath *path = NULL;
-    gint page_number;
-
     if ( pointeur )
     {
         gint value = 0;
@@ -1205,51 +1203,82 @@ gboolean gsb_config_metatree_sort_transactions_changed ( GtkWidget *checkbutton,
         *pointeur = value;
     }
 
+    gsb_config_metatree_re_sort_divisions ( checkbutton, event, pointeur );
+
+    /* return */
+    return FALSE;
+}
+
+
+/**
+ * Cette fonction retrie la division affichée après un changement
+ *
+ * \param
+ * \param
+ * \param
+ *
+ * \return TRUE if OK else FALSE
+ * */
+gboolean gsb_config_metatree_re_sort_divisions ( GtkWidget *checkbutton,
+                        GdkEventButton *event,
+                        gpointer data )
+{
+    GtkWidget *division_tree;
+    GtkTreeSelection *selection;
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+    GtkTreePath *path = NULL;
+    gint page_number;
+
     page_number = gsb_gui_navigation_get_current_page ( );
-    payee_tree = payees_get_tree_view ( );
-    category_tree = categories_get_tree_view ( );
-    budgetary_tree = budgetary_lines_get_tree_view ( );
 
     switch ( page_number )
     {
-	case GSB_PAYEES_PAGE:
-        selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( payee_tree ) );
-        if ( gtk_tree_selection_get_selected ( selection, &model, &iter ) )
-            path = gtk_tree_model_get_path ( model, &iter );
-	    payees_fill_list ();
-        gtk_tree_path_up ( path );
-        gtk_tree_view_expand_to_path ( GTK_TREE_VIEW ( payee_tree ), path );
-        gtk_tree_path_free ( path );
-	    break;
+        case GSB_PAYEES_PAGE:
+            division_tree = payees_get_tree_view ( );
 
-	case GSB_CATEGORIES_PAGE:
-        selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( category_tree ) );
-        if ( gtk_tree_selection_get_selected ( selection, &model, &iter ) )
-            path = gtk_tree_model_get_path ( model, &iter );
-        categories_fill_list ();
-        gtk_tree_path_up ( path );
-        gtk_tree_view_expand_to_path ( GTK_TREE_VIEW ( payee_tree ), path );
-        gtk_tree_path_free ( path );
-	    break;
+            selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( division_tree ) );
+            if ( gtk_tree_selection_get_selected ( selection, &model, &iter ) )
+                path = gtk_tree_model_get_path ( model, &iter );
+            payees_fill_list ();
+            break;
 
-	case GSB_BUDGETARY_LINES_PAGE:
-        selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( budgetary_tree ) );
-        if ( gtk_tree_selection_get_selected ( selection, &model, &iter ) )
-            path = gtk_tree_model_get_path ( model, &iter );
-		budgetary_lines_fill_list ();
+        case GSB_CATEGORIES_PAGE:
+            division_tree = categories_get_tree_view ( );
+
+            selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( division_tree ) );
+            if ( gtk_tree_selection_get_selected ( selection, &model, &iter ) )
+                path = gtk_tree_model_get_path ( model, &iter );
+            categories_fill_list ();
+            break;
+
+        case GSB_BUDGETARY_LINES_PAGE:
+            division_tree = budgetary_lines_get_tree_view ( );
+
+            selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( division_tree ) );
+            if ( gtk_tree_selection_get_selected ( selection, &model, &iter ) )
+                path = gtk_tree_model_get_path ( model, &iter );
+            budgetary_lines_fill_list ();
+            break;
+
+        default:
+            notice_debug ("Not page selected");
+
+            return FALSE;
+            break;
+    }
+
+    if ( path )
+    {
         gtk_tree_path_up ( path );
-        gtk_tree_view_expand_to_path ( GTK_TREE_VIEW ( payee_tree ), path );
+        gtk_tree_view_expand_to_path ( GTK_TREE_VIEW ( division_tree ), path );
         gtk_tree_path_free ( path );
-	    break;
-
-	default:
-	    notice_debug ("B0rk page selected");
-	    break;
     }
 
     gsb_file_set_modified ( TRUE );
 
-    return FALSE;
+    /* return */
+    return TRUE;
 }
 
 
diff --git a/src/parametres.h b/src/parametres.h
index 296cccf..94084b5 100644
--- a/src/parametres.h
+++ b/src/parametres.h
@@ -45,9 +45,9 @@ enum preference_page  {
 gboolean gsb_config_backup_dir_chosen ( GtkWidget *button,
                         GtkWidget *dialog );
 GtkWidget *gsb_config_date_format_chosen ( GtkWidget *parent, gint sens );
-gboolean gsb_config_metatree_sort_transactions_changed ( GtkWidget *checkbutton,
+gboolean gsb_config_metatree_re_sort_divisions ( GtkWidget *checkbutton,
                         GdkEventButton *event,
-                        gint *pointeur );
+                        gpointer data );
 GtkWidget *gsb_config_number_format_chosen ( GtkWidget *parent, gint sens );
 gboolean gsb_gui_encryption_toggled ( GtkWidget * checkbox, gpointer data );
 gboolean gsb_preferences_menu_open ( GtkWidget *menu_item,


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list