gcompris r3267 - in branches/gcomprixogoo/src: awele-activity awele-activity/resources/awele gcompris



Author: bcoudoin
Date: Sun Feb 24 14:40:33 2008
New Revision: 3267
URL: http://svn.gnome.org/viewvc/gcompris?rev=3267&view=rev

Log:
removed the popt no background image option. it was not working
very well and even more now with the by activity split.
adapted awale not to be over the bar.


Modified:
   branches/gcomprixogoo/src/awele-activity/awele.c
   branches/gcomprixogoo/src/awele-activity/awele.h
   branches/gcomprixogoo/src/awele-activity/resources/awele/awele_frame.png
   branches/gcomprixogoo/src/gcompris/gcompris.c
   branches/gcomprixogoo/src/gcompris/gcompris.h

Modified: branches/gcomprixogoo/src/awele-activity/awele.c
==============================================================================
--- branches/gcomprixogoo/src/awele-activity/awele.c	(original)
+++ branches/gcomprixogoo/src/awele-activity/awele.c	Sun Feb 24 14:40:33 2008
@@ -25,6 +25,13 @@
 static GcomprisBoard *gcomprisBoard = NULL;
 static gboolean board_paused = TRUE;
 
+/* This is a global Y offset that can be use to move the
+ * whole activity drawing up or down
+ */
+#define OFFSET_Y 45
+
+#define Y_BOUTONS 412-OFFSET_Y
+
 char errorMsg[30];
 AWALE *staticAwale;
 int caseCoord[12] =
@@ -343,7 +350,7 @@
   goo_canvas_image_new (boardRootItem,
 			pixmap,
 			0,
-			0,
+			OFFSET_Y,
 			NULL);
   gdk_pixbuf_unref(pixmap);
 
@@ -354,17 +361,7 @@
     int x, y;
 
     x = 35;
-    y = 190;
-    goo_canvas_text_new (boardRootItem,
-			 _("NORTH"),
-			 (double) x + 1,
-			 (double) y + 1,
-			 -1,
-			 GTK_ANCHOR_CENTER,
-			 "font", gc_skin_font_board_medium,
-			 "fill_color_rgba", gc_skin_color_shadow,
-			 NULL);
-
+    y = 190 - OFFSET_Y;
     goo_canvas_text_new (boardRootItem,
 			 _("NORTH"),
 			 (double) x,
@@ -372,21 +369,11 @@
 			 -1,
 			 GTK_ANCHOR_CENTER,
 			 "font", gc_skin_font_board_medium,
-			 "fill_color_rgba", gc_skin_color_text_button,
+			 "fill_color", "black",
 			 NULL);
 
     x = 765;
-    y = 295;
-    goo_canvas_text_new (boardRootItem,
-			 _("SOUTH"),
-			 (double) x + 1,
-			 (double) y + 1,
-			 -1,
-			 GTK_ANCHOR_CENTER,
-			 "font", gc_skin_font_board_medium,
-			 "fill_color_rgba", gc_skin_color_shadow,
-			 NULL);
-
+    y = 295 - OFFSET_Y;
     goo_canvas_text_new (boardRootItem,
 			 _("SOUTH"),
 			 (double) x,
@@ -394,7 +381,7 @@
 			 -1,
 			 GTK_ANCHOR_CENTER,
 			 "font", gc_skin_font_board_medium,
-			 "fill_color_rgba", gc_skin_color_text_button,
+			 "fill_color", "black",
 			 NULL);
 
   }
@@ -479,6 +466,7 @@
 			"button_press_event",
 			GTK_SIGNAL_FUNC (buttonClick),
 			GINT_TO_POINTER(i));
+      gc_item_focus_init(graphsElt->button[i], NULL);
 
 
     }
@@ -497,7 +485,7 @@
 	goo_canvas_text_new (boardRootItem,
 			     buffer,
 			     (caseCoord[i] + 45),
-			     ((i < 6) ? 378 : 94),
+			     ((i < 6) ? 378 : 94) - OFFSET_Y,
 			     -1,
 			     GTK_ANCHOR_CENTER,
 			     "font", "sans 20",
@@ -521,7 +509,7 @@
 	goo_canvas_text_new (boardRootItem,
 			     buffer,
 			     x1,
-			     246,
+			     246 - OFFSET_Y,
 			     -1,
 			     GTK_ANCHOR_CENTER,
 			     "font", "sans 24",
@@ -551,7 +539,7 @@
   graphsElt->msg = goo_canvas_text_new (boardRootItem,
 					_("Choose a house"),
 					(double) 400,
-					(double) 500,
+					(double) 500 - OFFSET_Y,
 					-1,
 					GTK_ANCHOR_CENTER,
 					"font", "sans 20",
@@ -632,7 +620,7 @@
 				     6) ? 260 :
 				    130) +
 				   g_random_int() %
-				   60),
+				   60) - OFFSET_Y,
 				  NULL);
 
 	  graphsElt->ptBeansHoleLink[idxTabBeans].hole = i;
@@ -820,7 +808,7 @@
 			g_random_int() % 50,
 			"y", (double) (((i <
 					 6) ? 260 : 130) +
-				       g_random_int() % 60),
+				       g_random_int() % 60 - OFFSET_Y),
 			NULL);
 
 	  ptBeansHoleLink[idxTabBeans].hole = i;

Modified: branches/gcomprixogoo/src/awele-activity/awele.h
==============================================================================
--- branches/gcomprixogoo/src/awele-activity/awele.h	(original)
+++ branches/gcomprixogoo/src/awele-activity/awele.h	Sun Feb 24 14:40:33 2008
@@ -21,8 +21,6 @@
 #define BOUTON_CLIC "awele/bouton1_clic.png"	//Chemin relatif vers fichiers boutons cliqué #define BEAN "awele/graine1.png"	//Chemin relatif vers fichiers graines
 
-#define Y_BOUTONS 412		//Abcisse des boutons
-
 #define WIDTH 800 	// Largeur Fenetre
 #define HEIGHT 600	// Hauteur Fenetre
 /**

Modified: branches/gcomprixogoo/src/awele-activity/resources/awele/awele_frame.png
==============================================================================
Binary files. No diff available.

Modified: branches/gcomprixogoo/src/gcompris/gcompris.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/gcompris.c	(original)
+++ branches/gcomprixogoo/src/gcompris/gcompris.c	Sun Feb 24 14:40:33 2008
@@ -1,6 +1,6 @@
 /* gcompris - gcompris.c
  *
- * Copyright (C) 2000 Bruno Coudoin
+ * Copyright (C) 2000-2008 Bruno Coudoin
  *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
@@ -118,7 +118,6 @@
 static gint popt_version	   = FALSE;
 static gint popt_difficulty_filter = FALSE;
 static gint popt_debug		   = FALSE;
-static gint popt_nobackimg	   = FALSE;
 static gint popt_nolockcheck	   = FALSE;
 static gchar *popt_root_menu       = NULL;
 static gchar *popt_package_data_dir = NULL;
@@ -234,9 +233,6 @@
   {"drag-mode", 'g', 0, G_OPTION_ARG_STRING, &popt_drag_mode,
    N_("Global drag and drop mode: normal, 2clicks, both. Default mode is normal."), NULL},
 
-  {"nobackimg", '\0', 0, G_OPTION_ARG_NONE, &popt_nobackimg,
-   N_("Do not display the background images of activities."), NULL},
-
   {"nolockcheck", '\0', 0, G_OPTION_ARG_NONE, &popt_nolockcheck,
    N_("Do not avoid the execution of multiple instances of GCompris."), NULL},
 
@@ -488,10 +484,7 @@
 {
   RsvgHandle *rsvg_handle;
 
-  if ( popt_nobackimg && (strncmp(file, "opt/", 4) == 0) )
-    rsvg_handle = gc_skin_rsvg_load ("gcompris-bg.svgz");
-  else
-    rsvg_handle = gc_rsvg_load (file);
+  rsvg_handle = gc_rsvg_load (file);
 
   if(backgroundsvgimg)
     g_object_set(backgroundsvgimg,
@@ -511,10 +504,7 @@
 {
   GdkPixbuf *background_pixmap;
 
-  if ( popt_nobackimg && (strncmp(file, "opt/", 4) == 0) )
-    background_pixmap = gc_skin_pixmap_load ("gcompris-bg.jpg");
-  else
-    background_pixmap = gc_pixmap_load (file);
+  background_pixmap = gc_pixmap_load (file);
 
   if(backgroundimg)
     g_object_set(backgroundimg,

Modified: branches/gcomprixogoo/src/gcompris/gcompris.h
==============================================================================
--- branches/gcomprixogoo/src/gcompris/gcompris.h	(original)
+++ branches/gcomprixogoo/src/gcompris/gcompris.h	Sun Feb 24 14:40:33 2008
@@ -1,6 +1,6 @@
 /* gcompris - gcompris.h
  *
- * Copyright (C) 2000,2001,2002 Bruno Coudoin
+ * Copyright (C) 2000-2008 Bruno Coudoin
  *
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by



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