[gcompris/gcomprixogoo] In money activity, we no more auto check the answer, there is now an OK button



commit 766f3752f97c434bb42870aa573626830d9518c7
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Sat Dec 11 13:35:32 2010 +0100

    In money activity, we no more auto check the answer, there is now an OK button
    
    As suggested by Arnaud Champollion, it is just too easy for the children.

 src/money-activity/money.c        |   13 ++++++++++++-
 src/money-activity/money_widget.c |    1 -
 2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/money-activity/money.c b/src/money-activity/money.c
index 46b86da..84ba720 100644
--- a/src/money-activity/money.c
+++ b/src/money-activity/money.c
@@ -36,6 +36,7 @@ static GooCanvasItem *boardRootItem = NULL;
 
 static void	 money_destroy_all_items(void);
 static void	 money_next_level(void);
+void		 moneyactivity_process_ok(void);
 
 Money_Widget    *tux_money    = NULL;
 Money_Widget    *seller_money = NULL;
@@ -79,7 +80,7 @@ static BoardPlugin menu_bp =
     NULL,
     NULL,
     "Money",
-    "Pratise money usage",
+    "Practise money usage",
     "Bruno Coudoin <bruno coudoin free fr>",
     NULL,
     NULL,
@@ -214,6 +215,16 @@ static void money_next_level()
 					NULL);
 
 
+  /* The OK Button */
+  GooCanvasItem *item = goo_canvas_svg_new( boardRootItem,
+					    gc_skin_rsvg_get(),
+					    "svg-id", "#OK",
+					    NULL);
+  SET_ITEM_LOCATION(item, 725, 230);
+  g_signal_connect(item, "button_press_event",
+		   (GtkSignalFunc) moneyactivity_process_ok, NULL);
+  gc_item_focus_init(item, NULL);
+
   tux_money = MONEY_WIDGET(money_widget_new());
   money_widget_set_position(tux_money,
 			    boardRootItem,
diff --git a/src/money-activity/money_widget.c b/src/money-activity/money_widget.c
index b1ba497..3ab08e6 100644
--- a/src/money-activity/money_widget.c
+++ b/src/money-activity/money_widget.c
@@ -373,7 +373,6 @@ item_event (GooCanvasItem  *item,
 	    money_widget_add(moneyItem->moneyWidget->priv->targetWidget,
 			     moneyItem->value);
 
-	  moneyactivity_process_ok();
 	  break;
 	default:
 	  break;



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