gcompris r3479 - in branches/gcomprixogoo/src: money-activity pythontemplate-activity



Author: bcoudoin
Date: Sun Aug  3 22:52:55 2008
New Revision: 3479
URL: http://svn.gnome.org/viewvc/gcompris?rev=3479&view=rev

Log:
money cents works again


Modified:
   branches/gcomprixogoo/src/money-activity/money.c
   branches/gcomprixogoo/src/money-activity/money_widget.c
   branches/gcomprixogoo/src/money-activity/money_widget.h
   branches/gcomprixogoo/src/pythontemplate-activity/pythontemplate.py

Modified: branches/gcomprixogoo/src/money-activity/money.c
==============================================================================
--- branches/gcomprixogoo/src/money-activity/money.c	(original)
+++ branches/gcomprixogoo/src/money-activity/money.c	Sun Aug  3 22:52:55 2008
@@ -567,6 +567,7 @@
   if(board_paused)
     /*return FALSE*/;
 
+  printf("%f %f\n", price_target, money_widget_get_total(seller_money));
   if(price_target == money_widget_get_total(seller_money))
     {
       gamewon = TRUE;

Modified: branches/gcomprixogoo/src/money-activity/money_widget.c
==============================================================================
--- branches/gcomprixogoo/src/money-activity/money_widget.c	(original)
+++ branches/gcomprixogoo/src/money-activity/money_widget.c	Sun Aug  3 22:52:55 2008
@@ -36,7 +36,7 @@
   guint			 columns;	/* Number of columns				  */
   guint			 lines;		/* Number of lines				  */
   guint			 next_spot;	/* Next spot to display a money item		  */
-  double		 total;		/* The number of euro in this pocket              */
+  float			 total;		/* The number of euro in this pocket              */
   Money_Widget		*targetWidget;	/* Target money widget to add when remove here	  */
   gboolean		 display_total;	/* Display or not the total of this pocket        */
 
@@ -149,7 +149,8 @@
 static void
 init (Money_Widget *pos)
 {
-	pos->priv = g_new0 (Money_WidgetPrivate, 1);
+  pos->priv = g_new0 (Money_WidgetPrivate, 1);
+  pos->priv->total = 0;
 
 }
 
@@ -341,7 +342,7 @@
   money_display_total(moneyWidget);
 }
 
-double
+float
 money_widget_get_total (Money_Widget *moneyWidget)
 {
   if(moneyWidget == NULL)

Modified: branches/gcomprixogoo/src/money-activity/money_widget.h
==============================================================================
--- branches/gcomprixogoo/src/money-activity/money_widget.h	(original)
+++ branches/gcomprixogoo/src/money-activity/money_widget.h	Sun Aug  3 22:52:55 2008
@@ -85,7 +85,7 @@
 void           money_widget_remove	        (Money_Widget *moneyWidget, MoneyEuroType value);
 
 /* Misc. accessors */
-double         money_widget_get_total           (Money_Widget *moneyWidget);
+float          money_widget_get_total           (Money_Widget *moneyWidget);
 
 #ifdef __cplusplus
 }

Modified: branches/gcomprixogoo/src/pythontemplate-activity/pythontemplate.py
==============================================================================
--- branches/gcomprixogoo/src/pythontemplate-activity/pythontemplate.py	(original)
+++ branches/gcomprixogoo/src/pythontemplate-activity/pythontemplate.py	Sun Aug  3 22:52:55 2008
@@ -41,7 +41,7 @@
     print "template start"
 
     # Set the buttons we want in the bar
-    gcompris.bar_set(gcompris.BAR_OK|gcompris.BAR_LEVEL)
+    gcompris.bar_set(gcompris.BAR_OK)
 
     # Set a background image
     gcompris.set_background(self.gcomprisBoard.canvas.get_root_item(),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]