gcompris r3665 - in branches/gcomprixogoo: boards/skins/babytoy boards/skins/gartoon src/gcompris src/missing_letter-activity src/missing_letter-activity/resources/missing_letter
- From: bcoudoin svn gnome org
- To: svn-commits-list gnome org
- Subject: gcompris r3665 - in branches/gcomprixogoo: boards/skins/babytoy boards/skins/gartoon src/gcompris src/missing_letter-activity src/missing_letter-activity/resources/missing_letter
- Date: Fri, 2 Jan 2009 21:48:24 +0000 (UTC)
Author: bcoudoin
Date: Fri Jan 2 21:48:24 2009
New Revision: 3665
URL: http://svn.gnome.org/viewvc/gcompris?rev=3665&view=rev
Log:
more skin work
Added:
branches/gcomprixogoo/src/missing_letter-activity/resources/missing_letter/button.png (props changed)
- copied unchanged from r3658, /branches/gcomprixogoo/boards/skins/babytoy/button.png
branches/gcomprixogoo/src/missing_letter-activity/resources/missing_letter/button_selected.png (props changed)
- copied unchanged from r3658, /branches/gcomprixogoo/boards/skins/babytoy/button_selected.png
Removed:
branches/gcomprixogoo/boards/skins/babytoy/bar_bg.png
branches/gcomprixogoo/boards/skins/babytoy/button.png
branches/gcomprixogoo/boards/skins/babytoy/button_selected.png
branches/gcomprixogoo/boards/skins/gartoon/bar_bg.png
Modified:
branches/gcomprixogoo/src/gcompris/dialog.c
branches/gcomprixogoo/src/missing_letter-activity/missingletter.c
branches/gcomprixogoo/src/missing_letter-activity/resources/missing_letter/Makefile.am
Modified: branches/gcomprixogoo/src/gcompris/dialog.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/dialog.c (original)
+++ branches/gcomprixogoo/src/gcompris/dialog.c Fri Jan 2 21:48:24 2009
@@ -50,9 +50,6 @@
*/
void gc_dialog(gchar *str, DialogBoxCallBack dbcb)
{
- GooCanvasItem *item_text = NULL;
- GooCanvasItem *item_text_ok = NULL;
- GdkPixbuf *pixmap;
gint y_start;
gint x_start;
@@ -91,54 +88,24 @@
x_start = bounds.x1;
y_start = bounds.y1;
- /* OK Button */
- pixmap = gc_skin_pixmap_load("button_large.png");
- GooCanvasItem *item = \
- goo_canvas_image_new (rootDialogItem,
- pixmap,
- BOARDWIDTH * 0.5 - gdk_pixbuf_get_width(pixmap)/2,
- bounds.y2 - gdk_pixbuf_get_height(pixmap) - 5,
- NULL);
-
- g_signal_connect(item, "button_press_event",
- (GtkSignalFunc) item_event_ok,
- dbcb);
- gc_item_focus_init(item, NULL);
-
- /* OK Text */
- item_text_ok = goo_canvas_text_new (rootDialogItem,
- _("OK"),
- BOARDWIDTH * 0.5,
- bounds.y2 - gdk_pixbuf_get_height(pixmap) + 15,
- -1,
- GTK_ANCHOR_CENTER,
- "font", gc_skin_font_title,
- "fill-color-rgba", gc_skin_color_text_button,
- NULL);
-
- gc_item_focus_init(item_text_ok, item);
- gdk_pixbuf_unref(pixmap);
-
- g_signal_connect(itemDialogText, "button_press_event",
- (GtkSignalFunc) item_event_ok,
- dbcb);
+ goo_canvas_text_new (rootDialogItem,
+ str,
+ BOARDWIDTH / 2,
+ (bounds.y2 - bounds.y1)/2 - 100,
+ BOARDWIDTH / 2,
+ GTK_ANCHOR_CENTER,
+ "alignment", PANGO_ALIGN_CENTER,
+ NULL);
- item_text = goo_canvas_text_new (rootDialogItem,
- str,
- BOARDWIDTH / 2,
- (bounds.y2 - bounds.y1)/2 - 100,
- BOARDWIDTH / 2,
- GTK_ANCHOR_CENTER,
- "alignment", PANGO_ALIGN_CENTER,
- NULL);
-
- g_signal_connect(item_text, "button_press_event",
- (GtkSignalFunc) item_event_ok,
- dbcb);
- g_signal_connect(item_text_ok, "button_press_event",
- (GtkSignalFunc) item_event_ok,
- dbcb);
+ /* OK Button */
+ gc_util_button_text_svg(rootDialogItem,
+ BOARDWIDTH * 0.5,
+ bounds.y2 - 30,
+ "#BUTTON_TEXT",
+ _("OK"),
+ (GtkSignalFunc) item_event_ok,
+ "ok");
}
/* Callback for the bar operations */
Modified: branches/gcomprixogoo/src/missing_letter-activity/missingletter.c
==============================================================================
--- branches/gcomprixogoo/src/missing_letter-activity/missingletter.c (original)
+++ branches/gcomprixogoo/src/missing_letter-activity/missingletter.c Fri Jan 2 21:48:24 2009
@@ -307,7 +307,7 @@
goo_canvas_group_new (goo_canvas_get_root_item(gcomprisBoard->canvas),
NULL);
- button_pixmap = gc_skin_pixmap_load("button.png");
+ button_pixmap = gc_pixmap_load("missing_letter/button.png");
/* display the image */
board = g_list_nth_data(board_list, board_number);
g_assert(board != NULL);
@@ -503,14 +503,14 @@
if (selected_button != NULL && selected_button != button)
{
- button_pixmap = gc_skin_pixmap_load("button.png");
+ button_pixmap = gc_pixmap_load("missing_letter/button.png");
g_object_set(selected_button, "pixbuf", button_pixmap, NULL);
gdk_pixbuf_unref(button_pixmap);
}
if (selected_button != button)
{
- button_pixmap_selected = gc_skin_pixmap_load("button_selected.png");
+ button_pixmap_selected = gc_pixmap_load("missing_letter/button_selected.png");
g_object_set(button, "pixbuf", button_pixmap_selected, NULL);
selected_button = button;
gdk_pixbuf_unref(button_pixmap_selected);
Modified: branches/gcomprixogoo/src/missing_letter-activity/resources/missing_letter/Makefile.am
==============================================================================
--- branches/gcomprixogoo/src/missing_letter-activity/resources/missing_letter/Makefile.am (original)
+++ branches/gcomprixogoo/src/missing_letter-activity/resources/missing_letter/Makefile.am Fri Jan 2 21:48:24 2009
@@ -26,6 +26,8 @@
banana.png \
bed.png \
bottle.png \
+ button.png \
+ button_selected.png \
cake.png \
car.png \
cartable.png \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]