[grisbi-cvs] grisbi/src accueil.c,1.222,1.223 utils.c,1.59,1.60

Pierre Biava pbiava at users.sourceforge.net
Fri Feb 26 23:21:58 CET 2010


Update of /cvsroot/grisbi/grisbi/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv4882/src

Modified Files:
	accueil.c utils.c 
Log Message:
minor changes

Index: accueil.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/accueil.c,v
retrieving revision 1.222
retrieving revision 1.223
diff -u -d -r1.222 -r1.223
--- accueil.c	25 Feb 2010 21:38:17 -0000	1.222
+++ accueil.c	26 Feb 2010 22:21:56 -0000	1.223
@@ -822,6 +822,7 @@
     GtkWidget *pEventBox, *pLabel;
     GtkStyle *pStyleLabelNomCompte, *pStyleLabelSoldeCourant,
 	     *pStyleLabelSoldePointe;
+    GSList *list = NULL;
 	gchar* tmpstr;
 
     /* Initialisation du style « Nom du compte » */
@@ -837,14 +838,15 @@
 
     /* Création d'une boite à évènement qui sera rattachée au nom du compte */
     pEventBox = gtk_event_box_new ();
+    list = g_slist_append ( list, pEventBox );
     g_signal_connect ( G_OBJECT ( pEventBox ),
                  "enter-notify-event",
                  G_CALLBACK ( met_en_prelight ),
-                 NULL );
+                 list );
     g_signal_connect ( G_OBJECT ( pEventBox ),
                  "leave-notify-event",
                  G_CALLBACK ( met_en_normal ),
-                 NULL );
+                 list );
     g_signal_connect_swapped ( G_OBJECT ( pEventBox ),
                     "button-press-event",
                     G_CALLBACK ( gsb_main_page_click_on_account ),
@@ -889,14 +891,15 @@
 
     /* Création d'une boite à évènement qui sera rattachée au solde pointé du compte */
     pEventBox = gtk_event_box_new ();
+    list = g_slist_append ( list, pEventBox );
     g_signal_connect ( G_OBJECT ( pEventBox ),
                  "enter-notify-event",
                  G_CALLBACK ( met_en_prelight ),
-                 NULL );
+                 list );
     g_signal_connect ( G_OBJECT ( pEventBox ),
                  "leave-notify-event",
                  G_CALLBACK ( met_en_normal ),
-                 NULL );
+                 list );
     g_signal_connect_swapped ( G_OBJECT ( pEventBox ),
                     "button-press-event",
                     G_CALLBACK ( gsb_main_page_click_on_account ),
@@ -941,14 +944,15 @@
 
     /* Création d'une boite à évènement qui sera rattachée au solde courant du compte */
     pEventBox = gtk_event_box_new ();
+    list = g_slist_append ( list, pEventBox );
     g_signal_connect ( G_OBJECT ( pEventBox ),
                  "enter-notify-event",
                  G_CALLBACK ( met_en_prelight ),
-                 NULL );
+                 list );
     g_signal_connect ( G_OBJECT ( pEventBox ),
                  "leave-notify-event",
                  G_CALLBACK ( met_en_normal ),
-                 NULL );
+                 list );
     g_signal_connect_swapped ( G_OBJECT ( pEventBox ),
                     "button-press-event",
                     G_CALLBACK (gsb_main_page_click_on_account),
@@ -1515,57 +1519,63 @@
 
     while ( list_tmp )
     {
-	gint i;
+        gint i;
 
-	i = gsb_data_account_get_no_account ( list_tmp -> data );
+        i = gsb_data_account_get_no_account ( list_tmp -> data );
 
-	if ( gsb_real_cmp ( gsb_data_account_get_current_balance (i),
-			    gsb_data_account_get_mini_balance_authorized (i)) == -1
-	     &&
-	     gsb_data_account_get_kind (i) != GSB_TYPE_LIABILITIES )
-	{
-	    if ( !vbox_1 )
-	    {
-		vbox_1 = gtk_vbox_new ( TRUE, 5 );
-		gtk_container_add ( GTK_CONTAINER ( frame_etat_soldes_minimaux_autorises ), vbox_1 );
-		gtk_widget_show ( vbox_1 );
-		show_paddingbox ( frame_etat_soldes_minimaux_autorises );
-	    }
-	    label = gtk_label_new ( gsb_data_account_get_name (i) );
-	    gtk_box_pack_start ( GTK_BOX ( vbox_1 ), label, FALSE, FALSE, 0 );
-	    gtk_misc_set_alignment ( GTK_MISC ( label ), MISC_LEFT, MISC_TOP );
-	    gtk_widget_show ( label );
+        if ( gsb_data_account_get_closed_account ( i ) && !etat.show_closed_accounts )
+        {
+            list_tmp = list_tmp -> next;
+            continue;
+        }
 
-	    show_paddingbox ( frame_etat_soldes_minimaux_autorises );
-	}
+        if ( gsb_real_cmp ( gsb_data_account_get_current_balance (i),
+                    gsb_data_account_get_mini_balance_authorized (i)) == -1
+             &&
+             gsb_data_account_get_kind (i) != GSB_TYPE_LIABILITIES )
+        {
+            if ( !vbox_1 )
+            {
+            vbox_1 = gtk_vbox_new ( TRUE, 5 );
+            gtk_container_add ( GTK_CONTAINER ( frame_etat_soldes_minimaux_autorises ), vbox_1 );
+            gtk_widget_show ( vbox_1 );
+            show_paddingbox ( frame_etat_soldes_minimaux_autorises );
+            }
+            label = gtk_label_new ( gsb_data_account_get_name (i) );
+            gtk_box_pack_start ( GTK_BOX ( vbox_1 ), label, FALSE, FALSE, 0 );
+            gtk_misc_set_alignment ( GTK_MISC ( label ), MISC_LEFT, MISC_TOP );
+            gtk_widget_show ( label );
 
-	if ( gsb_real_cmp ( gsb_data_account_get_current_balance (i),
-			    gsb_data_account_get_mini_balance_wanted (i)) == -1
-	     &&
-	     gsb_data_account_get_kind (i) != GSB_TYPE_LIABILITIES
-	     &&
-	     gsb_real_cmp ( gsb_data_account_get_current_balance (i),
-			    gsb_data_account_get_mini_balance_authorized (i)) == -1
-	     &&
-	     gsb_data_account_get_kind (i) != GSB_TYPE_LIABILITIES)
-	{
-	    if ( !vbox_2 )
-	    {
-		vbox_2 = gtk_vbox_new ( TRUE, 5 );
-		gtk_container_add ( GTK_CONTAINER ( frame_etat_soldes_minimaux_voulus ), vbox_2 );
-		gtk_widget_show ( vbox_2 );
-		show_paddingbox ( frame_etat_soldes_minimaux_voulus );
-	    }
+            show_paddingbox ( frame_etat_soldes_minimaux_autorises );
+        }
 
-	    label = gtk_label_new ( gsb_data_account_get_name (i) );
-	    gtk_misc_set_alignment ( GTK_MISC ( label ), MISC_LEFT, MISC_VERT_CENTER );
-	    gtk_box_pack_start ( GTK_BOX ( vbox_2 ), label, FALSE, FALSE, 0 );
-	    gtk_widget_show ( label );
+        if ( gsb_real_cmp ( gsb_data_account_get_current_balance (i),
+                    gsb_data_account_get_mini_balance_wanted (i)) == -1
+             &&
+             gsb_data_account_get_kind (i) != GSB_TYPE_LIABILITIES
+             &&
+             gsb_real_cmp ( gsb_data_account_get_current_balance (i),
+                    gsb_data_account_get_mini_balance_authorized (i)) == -1
+             &&
+             gsb_data_account_get_kind (i) != GSB_TYPE_LIABILITIES)
+        {
+            if ( !vbox_2 )
+            {
+            vbox_2 = gtk_vbox_new ( TRUE, 5 );
+            gtk_container_add ( GTK_CONTAINER ( frame_etat_soldes_minimaux_voulus ), vbox_2 );
+            gtk_widget_show ( vbox_2 );
+            show_paddingbox ( frame_etat_soldes_minimaux_voulus );
+            }
 
-	    show_paddingbox ( frame_etat_soldes_minimaux_voulus );
-	}
+            label = gtk_label_new ( gsb_data_account_get_name (i) );
+            gtk_misc_set_alignment ( GTK_MISC ( label ), MISC_LEFT, MISC_VERT_CENTER );
+            gtk_box_pack_start ( GTK_BOX ( vbox_2 ), label, FALSE, FALSE, 0 );
+            gtk_widget_show ( label );
 
-	list_tmp = list_tmp -> next;
+            show_paddingbox ( frame_etat_soldes_minimaux_voulus );
+        }
+
+	    list_tmp = list_tmp -> next;
     }
 
 

Index: utils.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- utils.c	30 Jan 2010 17:04:12 -0000	1.59
+++ utils.c	26 Feb 2010 22:21:56 -0000	1.60
@@ -46,29 +46,53 @@
 
 
 
-
-/* ************************************************************************* */
+/**
+ *
+ *
+ *
+ */
 gboolean met_en_prelight ( GtkWidget *event_box,
                         GdkEventMotion *event,
                         gpointer pointeur )
 {
-    gtk_widget_set_state ( GTK_WIDGET ( GTK_BIN (event_box)->child ), GTK_STATE_PRELIGHT );
+    GSList *list = ( GSList* ) pointeur;
+
+    while (list )
+    {
+        GtkWidget *widget;
+
+        widget = list -> data;
+        gtk_widget_set_state ( GTK_WIDGET ( GTK_BIN ( widget )->child ), GTK_STATE_PRELIGHT );
+
+        list = list -> next;
+    }
     return FALSE;
 }
-/* ************************************************************************* */
 
-/* ************************************************************************* */
+
+/**
+ *
+ *
+ *
+ */
 gboolean met_en_normal ( GtkWidget *event_box,
                         GdkEventMotion *event,
                         gpointer pointeur )
 {
-    gtk_widget_set_state ( GTK_WIDGET ( GTK_BIN (event_box)->child ), GTK_STATE_NORMAL );
-    return FALSE;
-}
-/* ************************************************************************* */
+    GSList *list = ( GSList* ) pointeur;
 
+    while (list )
+    {
+        GtkWidget *widget;
 
+        widget = list -> data;
 
+        gtk_widget_set_state ( GTK_WIDGET ( GTK_BIN ( widget )->child ), GTK_STATE_NORMAL );
+
+        list = list -> next;
+    }
+    return FALSE;
+}
 
 
 /**
@@ -122,14 +146,15 @@
 }
 
 
-
-/* **************************************************************************************************************************** */
+/**
+ * si la commande du navigateur contient %s, on le remplace par url,
+ * sinon on ajoute l'url à la fin et &
+ *
+ * sous Windows si la commande est vide ou egale a la valeur par defaut
+ * on lance le butineur par defaut (open)
+ */
 gboolean lance_navigateur_web ( const gchar *url )
 {
-/*     si la commande du navigateur contient %s, on le remplace par url, */
-/*     sinon on ajoute l'url à la fin et & */
-/*     sous Windows si la commande est vide ou egale a la valeur par defaut on lance le butineur par defaut (open) */
-
     gchar **split;
     gchar *chaine = NULL;
 #ifdef _WIN32
@@ -200,10 +225,6 @@
 
     return FALSE;
 }
-/* **************************************************************************************************************************** */
-
-
-
 
 
 /**



More information about the cvs mailing list