[grisbi-cvs] grisbi/src gsb_automem.c, 1.23, 1.24 gsb_data_category.c, 1.63, 1.64 gsb_form.c, 1.105, 1.106 gtk_combofix.c, 1.55, 1.56 navigation.c, 1.110, 1.111

Pierre Biava pbiava at users.sourceforge.net
Sun Feb 8 15:49:37 CET 2009


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

Modified Files:
	gsb_automem.c gsb_data_category.c gsb_form.c gtk_combofix.c 
	navigation.c 
Log Message:
fix bug 428 no update categories after update transactions and minor changes

Index: gtk_combofix.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gtk_combofix.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- gtk_combofix.c	8 Jan 2009 18:47:56 -0000	1.55
+++ gtk_combofix.c	8 Feb 2009 14:49:34 -0000	1.56
@@ -148,11 +148,12 @@
  *
  * \return the new widget
  * */
+/* comment by pbiava the 08/02/2009 : unused function 
 GtkWidget *gtk_combofix_new ( GSList *list )
 {
     GtkComboFix *combofix = GTK_COMBOFIX ( gtk_type_new ( gtk_combofix_get_type () ) );
 
-    /* fill the field of the combofix */
+    !* fill the field of the combofix *!
     combofix -> force = FALSE;
     combofix -> complex = 0;
     combofix -> auto_sort = TRUE;
@@ -165,7 +166,7 @@
 			      0 );
 
     return ( GTK_WIDGET ( combofix ) );
-}
+} */
 
 
 /**
@@ -326,6 +327,7 @@
  *
  * \return
  * */
+/* comment by pbiava the 08/02/2009 : unused function 
 void gtk_combofix_set_sort ( GtkComboFix *combofix,
 			     gboolean auto_sort )
 {
@@ -333,7 +335,7 @@
     g_return_if_fail (GTK_IS_COMBOFIX (combofix));
 
     combofix -> auto_sort = auto_sort;
-}
+} */
 
 /**
  * set if the completion is case sensitive or not
@@ -402,6 +404,7 @@
  *
  * \return
  * */
+/* comment by pbiava the 08/02/2009 : unused function 
 void gtk_combofix_view_list ( GtkComboFix *combofix,
 			      gboolean show )
 {
@@ -412,7 +415,7 @@
 	gtk_combofix_show_popup ( combofix );
     else
 	gtk_combofix_hide_popup (combofix);
-}
+} */
 
 
 /**
@@ -605,7 +608,7 @@
 		    scrolled_window );
 gtk_widget_show (scrolled_window);
 
-/* the tree_store is 4 columns :
+/* the tree_store is 5 columns :
  * COMBOFIX_COL_VISIBLE_STRING (a string) : what we see in the combofix
  * COMBOFIX_COL_REAL_STRING (a string) : what we set in the entry when selecting something
  * COMBOFIX_COL_VISIBLE (a boolean) : if that line has to be showed

Index: gsb_data_category.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_category.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- gsb_data_category.c	26 Oct 2008 22:47:09 -0000	1.63
+++ gsb_data_category.c	8 Feb 2009 14:49:34 -0000	1.64
@@ -37,8 +37,8 @@
 #include "./gsb_real.h"
 #include "./utils_str.h"
 #include "./include.h"
-#include "./gsb_real.h"
 #include "./erreur.h"
+#include "./gsb_real.h"
 /*END_INCLUDE*/
 
 /**
@@ -1337,6 +1337,7 @@
 {
     GSList *list_tmp_transactions;
 
+    devel_debug ( NULL );
     gsb_data_category_reset_counters ();
 
     list_tmp_transactions = gsb_data_transaction_get_transactions_list ();

Index: gsb_form.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_form.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- gsb_form.c	6 Feb 2009 22:05:04 -0000	1.105
+++ gsb_form.c	8 Feb 2009 14:49:34 -0000	1.106
@@ -1496,6 +1496,7 @@
     GtkWidget *widget;
     gint account_number;
 
+    devel_debug (NULL);
     /* still not found, if change the content of the form, something come in entry
      * wich is nothing, so protect here */
     if ( !GTK_IS_WIDGET (entry)
@@ -1629,7 +1630,7 @@
 	case TRANSACTION_FORM_CATEGORY :
 	    if ( strlen ( gtk_entry_get_text ( GTK_ENTRY (entry))))
 	    {
-		/* if it's a transafer, set the content of the contra combo */
+		/* if it's a transfer, set the content of the contra combo */
 		if ( gsb_data_form_check_for_value ( TRANSACTION_FORM_CONTRA ))
 		{
 		    /* if it's a transfer, set the contra_method of payment menu */
@@ -2091,20 +2092,20 @@
 	||
 	gsb_form_get_origin () == ORIGIN_VALUE_HOME )
     {
-	if (g_object_get_data ( G_OBJECT (transaction_form), "execute_scheduled"))
-	   {
+        if (g_object_get_data ( G_OBJECT (transaction_form), "execute_scheduled"))
+        {
 	       /* we want to execute the scheduled transaction */
 	       is_transaction = TRUE;
 	       execute_scheduled = TRUE;
 
 	       /* we need to keep the number of scheduled, to check later if there is
-		* some children and modifie the scheduled transaction */
+            * some children and modifie the scheduled transaction */
 	       saved_scheduled_number = transaction_number;
 	       /* as it's a new transaction, do the same as a white line */
 	       transaction_number = -1;
-	   }
-	else
-	    is_transaction = FALSE;
+        }
+        else
+            is_transaction = FALSE;
     }
     else
 	is_transaction = TRUE;

Index: navigation.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/navigation.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -d -r1.110 -r1.111
--- navigation.c	31 Jan 2009 20:11:04 -0000	1.110
+++ navigation.c	8 Feb 2009 14:49:34 -0000	1.111
@@ -1124,7 +1124,7 @@
     GtkWidget * account_notebook;
     gint account_number, page_number;
     gint report_number;
-    GtkTreeIter dummy_iter;
+    //~ GtkTreeIter dummy_iter;
     gchar * title = NULL; 
     gchar * suffix = NULL; 
 
@@ -1230,8 +1230,9 @@
 	    /* what to be done if switch to that page */
 	    gsb_form_set_expander_visible (FALSE,
 					   FALSE );
-	    if ( ! gtk_tree_model_get_iter_first ( GTK_TREE_MODEL (payee_tree_model), 
-						   &dummy_iter ) )
+        /* comment by pbiava the 08/02/2009 bug 428 */
+	    //~ if ( ! gtk_tree_model_get_iter_first ( GTK_TREE_MODEL (payee_tree_model), 
+						   //~ &dummy_iter ) )
 		payee_fill_tree ();
 	    break;
 
@@ -1257,9 +1258,10 @@
 	    /* what to be done if switch to that page */
 	    gsb_form_set_expander_visible (FALSE,
 					   FALSE );
-	    if ( ! gtk_tree_model_get_iter_first ( GTK_TREE_MODEL (categ_tree_model), 
-						   &dummy_iter ) )
-		remplit_arbre_categ ();
+        /* comment by pbiava the 08/02/2009 bug 428 */
+	    //~ if ( ! gtk_tree_model_get_iter_first ( GTK_TREE_MODEL (categ_tree_model), 
+						   //~ &dummy_iter ) )
+        remplit_arbre_categ ();
 	    break;
 
 	case GSB_BUDGETARY_LINES_PAGE:
@@ -1271,8 +1273,9 @@
 	    /* what to be done if switch to that page */
 	    gsb_form_set_expander_visible (FALSE,
 					   FALSE );
-	    if ( ! gtk_tree_model_get_iter_first ( GTK_TREE_MODEL (budgetary_line_tree_model), 
-						   &dummy_iter ) )
+        /* comment by pbiava the 08/02/2009 bug 428 */
+	    //~ if ( ! gtk_tree_model_get_iter_first ( GTK_TREE_MODEL (budgetary_line_tree_model), 
+						   //~ &dummy_iter ) )
 		remplit_arbre_imputation ();
 	    break;
 

Index: gsb_automem.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_automem.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- gsb_automem.c	31 Jan 2009 20:11:04 -0000	1.23
+++ gsb_automem.c	8 Feb 2009 14:49:34 -0000	1.24
@@ -505,20 +505,21 @@
  *
  * \return A newly created paddingbox
  */
-//~ GtkWidget *gsb_automem_radiobutton3_new_with_title ( GtkWidget *parent,
-						     //~ const gchar *title,
-						     //~ const gchar *choice1, const gchar *choice2, const gchar *choice3,
-						     //~ gboolean *value )
-//~ {
-    //~ GtkWidget *paddingbox;
+/* comment by pbiava the 08/02/2009 : unused function 
+GtkWidget *gsb_automem_radiobutton3_new_with_title ( GtkWidget *parent,
+						     const gchar *title,
+						     const gchar *choice1, const gchar *choice2, const gchar *choice3,
+						     gboolean *value )
+{
+    GtkWidget *paddingbox;
 
-    //~ paddingbox = new_paddingbox_with_title (parent, FALSE, COLON(title));
-    //~ gtk_box_pack_start (GTK_BOX(paddingbox),
-			//~ gsb_automem_radiobutton3_new ( choice1, choice2, choice3,
-						       //~ value ), 
-			//~ FALSE, FALSE, 0 );
-    //~ return paddingbox;
-//~ }
+    paddingbox = new_paddingbox_with_title (parent, FALSE, COLON(title));
+    gtk_box_pack_start (GTK_BOX(paddingbox),
+			gsb_automem_radiobutton3_new ( choice1, choice2, choice3,
+						       value ), 
+			FALSE, FALSE, 0 );
+    return paddingbox;
+} */
 
 
 
@@ -534,57 +535,58 @@
  *
  * \return a vbox containing the radiobuttons
  */
-//~ GtkWidget *gsb_automem_radiobutton3_new ( const gchar *choice1,
-					  //~ const gchar *choice2,
-					  //~ const gchar *choice3,
-					  //~ gboolean *value )
-//~ {
-    //~ GtkWidget *button1, *button2, *button3, *vbox;
+/* comment by pbiava the 08/02/2009 : unused function 
+GtkWidget *gsb_automem_radiobutton3_new ( const gchar *choice1,
+					  const gchar *choice2,
+					  const gchar *choice3,
+					  gboolean *value )
+{
+    GtkWidget *button1, *button2, *button3, *vbox;
 
-    //~ vbox = gtk_vbox_new ( FALSE, 6 );
+    vbox = gtk_vbox_new ( FALSE, 6 );
 
-    //~ button1 = gtk_radio_button_new_with_mnemonic ( NULL, choice1 );
-    //~ gtk_box_pack_start (GTK_BOX(vbox), button1, FALSE, FALSE, 0 );
-    //~ button2 = gtk_radio_button_new_with_mnemonic ( gtk_radio_button_get_group (GTK_RADIO_BUTTON(button1)), 
-						   //~ choice2 );
-    //~ gtk_box_pack_start (GTK_BOX(vbox), button2, FALSE, FALSE, 0 );
-    //~ button3 = gtk_radio_button_new_with_mnemonic ( gtk_radio_button_get_group (GTK_RADIO_BUTTON(button1)), 
-						   //~ choice3 );
-    //~ gtk_box_pack_start (GTK_BOX(vbox), button3, FALSE, FALSE, 0 );
+    button1 = gtk_radio_button_new_with_mnemonic ( NULL, choice1 );
+    gtk_box_pack_start (GTK_BOX(vbox), button1, FALSE, FALSE, 0 );
+    button2 = gtk_radio_button_new_with_mnemonic ( gtk_radio_button_get_group (GTK_RADIO_BUTTON(button1)), 
+						   choice2 );
+    gtk_box_pack_start (GTK_BOX(vbox), button2, FALSE, FALSE, 0 );
+    button3 = gtk_radio_button_new_with_mnemonic ( gtk_radio_button_get_group (GTK_RADIO_BUTTON(button1)), 
+						   choice3 );
+    gtk_box_pack_start (GTK_BOX(vbox), button3, FALSE, FALSE, 0 );
 
 
-    //~ if (value)
-    //~ {
-	//~ switch (*value)
-	//~ {
-	    //~ case 0:
-		//~ gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button1 ), TRUE );
-		//~ break;
-	    //~ case 1:
-		//~ gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button2 ), TRUE );
-		//~ break;
-	    //~ default:
-		//~ gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button3 ), TRUE );
-	//~ }
-    //~ }
+    if (value)
+    {
+	switch (*value)
+	{
+	    case 0:
+		gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button1 ), TRUE );
+		break;
+	    case 1:
+		gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button2 ), TRUE );
+		break;
+	    default:
+		gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button3 ), TRUE );
+	}
+    }
 
-    //~ /* we associate the value for all the buttons */
-    //~ g_object_set_data ( G_OBJECT ( button1 ),
-			//~ "pointer", value);
-    //~ g_object_set_data ( G_OBJECT ( button2 ),
-			//~ "pointer", value);
-    //~ g_object_set_data ( G_OBJECT ( button3 ),
-			//~ "pointer", value);
+    !* we associate the value for all the buttons *!
+    g_object_set_data ( G_OBJECT ( button1 ),
+			"pointer", value);
+    g_object_set_data ( G_OBJECT ( button2 ),
+			"pointer", value);
+    g_object_set_data ( G_OBJECT ( button3 ),
+			"pointer", value);
 
-    //~ g_signal_connect ( G_OBJECT ( button1 ), "toggled",
-		       //~ G_CALLBACK (gsb_automem_radiobutton3_changed), GINT_TO_POINTER (0));
-    //~ g_signal_connect ( G_OBJECT ( button2 ), "toggled",
-		       //~ G_CALLBACK (gsb_automem_radiobutton3_changed), GINT_TO_POINTER (1));
-    //~ g_signal_connect ( G_OBJECT ( button3 ), "toggled",
-		       //~ G_CALLBACK (gsb_automem_radiobutton3_changed), GINT_TO_POINTER (2));
+    g_signal_connect ( G_OBJECT ( button1 ), "toggled",
+		       G_CALLBACK (gsb_automem_radiobutton3_changed), GINT_TO_POINTER (0));
+    g_signal_connect ( G_OBJECT ( button2 ), "toggled",
+		       G_CALLBACK (gsb_automem_radiobutton3_changed), GINT_TO_POINTER (1));
+    g_signal_connect ( G_OBJECT ( button3 ), "toggled",
+		       G_CALLBACK (gsb_automem_radiobutton3_changed), GINT_TO_POINTER (2));
 
-    //~ return vbox;
-//~ }
+    return vbox;
+} */
 
 /**
  * called for a change in automem_radiobutton3
@@ -594,26 +596,27 @@
  *
  * \return FALSE
  * */
-//~ static gboolean gsb_automem_radiobutton3_changed ( GtkWidget *checkbutton,
-						   //~ gpointer value_ptr )
-//~ {
-    //~ gboolean *value;
+/* comment by pbiava the 08/02/2009 : unused function 
+static gboolean gsb_automem_radiobutton3_changed ( GtkWidget *checkbutton,
+						   gpointer value_ptr )
+{
+    gboolean *value;
 
-    //~ /* as we have 3 buttons, this function will be always called 2 times,
-     //~ * one for unset the button, and one for set the button,
-     //~ * so we get only when the button is set */
-    //~ if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton)))
-	//~ return FALSE;
+    !* as we have 3 buttons, this function will be always called 2 times,
+     * one for unset the button, and one for set the button,
+     * so we get only when the button is set *!
+    if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton)))
+	return FALSE;
 
-    //~ /* we are on the active button, so save the value for it */
-    //~ value = g_object_get_data ( G_OBJECT (checkbutton), "pointer");
-    //~ if (value)
-    //~ {
-	//~ *value = GPOINTER_TO_INT (value_ptr);
-	//~ modification_fichier (TRUE);
-    //~ }
-    //~ return FALSE;
-//~ }
+    !* we are on the active button, so save the value for it *!
+    value = g_object_get_data ( G_OBJECT (checkbutton), "pointer");
+    if (value)
+    {
+	*value = GPOINTER_TO_INT (value_ptr);
+	modification_fichier (TRUE);
+    }
+    return FALSE;
+}*/
 
 
 /**



More information about the cvs mailing list