~ubuntu-branches/ubuntu/precise/gcompris/precise

« back to all changes in this revision

Viewing changes to src/crane-activity/crane.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-01-10 01:37:41 UTC
  • mto: This revision was merged to the branch mainline in revision 48.
  • Revision ID: package-import@ubuntu.com-20120110013741-q90ulmfrj910igm3
Tags: upstream-12.01
ImportĀ upstreamĀ versionĀ 12.01

Show diffs side-by-side

added added

removed removed

Lines of Context:
251
251
 
252
252
  if (gcomprisBoard) {
253
253
 
254
 
      if (g_strcasecmp(gcomprisBoard->type, "crane") == 0) {
 
254
      if (g_ascii_strcasecmp(gcomprisBoard->type, "crane") == 0) {
255
255
 
256
256
          /* Set the plugin entry */
257
257
          gcomprisBoard->plugin = &menu_bp;
462
462
 
463
463
      // Do a smooth move
464
464
      my_move.nb = 52;
465
 
      timer_id = g_timeout_add(10, (GtkFunction) smooth_move, &my_move);
 
465
      timer_id = g_timeout_add(10, (GSourceFunc) smooth_move, &my_move);
466
466
      list_game[new_index] = list_game[index];
467
467
      list_game[index] = -1;
468
468
    }
476
476
 
477
477
  if (success) {
478
478
      gamewon = TRUE;
479
 
      timer_id = g_timeout_add (1200, (GtkFunction) bonus, NULL);
 
479
      timer_id = g_timeout_add (1200, (GSourceFunc) bonus, NULL);
480
480
  }
481
481
 
482
482
}
533
533
                                           arrow[i].y,
534
534
                                           NULL);
535
535
        g_signal_connect(item_arrow, "button_press_event",
536
 
                         (GtkSignalFunc) arrow_event, GINT_TO_POINTER(i));
 
536
                         (GCallback) arrow_event, GINT_TO_POINTER(i));
537
537
        gc_item_focus_init(item_arrow, NULL);
 
538
#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
538
539
        gdk_pixbuf_unref( arrow[i].pixmap);
 
540
#else
 
541
        g_object_unref( arrow[i].pixmap);
 
542
#endif
539
543
 
540
544
  }
541
545
 
570
574
                                    "height", (double) (CRANE_FRAME_IMAGE_SIZE + 5),
571
575
                                    NULL);
572
576
 
 
577
#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
573
578
  gdk_pixbuf_unref(pixmap);
 
579
#else
 
580
  g_object_unref(pixmap);
 
581
#endif
574
582
 
575
583
  g_object_set (red_hands,
576
584
                "visibility", GOO_CANVAS_ITEM_INVISIBLE,
646
654
                                           (x + 5 + ((i % CRANE_FRAME_COLUMN) * CRANE_FRAME_CELL)),
647
655
                                           (y + 5 + (floor(i / CRANE_FRAME_COLUMN) * CRANE_FRAME_CELL)),
648
656
                                           NULL);
 
657
#if GDK_PIXBUF_MAJOR <= 2 && GDK_PIXBUF_MINOR <= 24
649
658
        gdk_pixbuf_unref( pixmap);
 
659
#else
 
660
        g_object_unref( pixmap);
 
661
#endif
650
662
 
651
663
        if (active)
652
664
          {
653
665
            g_signal_connect(item_image, "button_press_event",
654
 
                               (GtkSignalFunc) item_event, NULL);
 
666
                               (GCallback) item_event, NULL);
655
667
 
656
668
            if(previous_item_image)
657
669
              g_object_set_data(G_OBJECT(item_image), "previous_item",