~ubuntu-branches/ubuntu/precise/gnome-games/precise-proposed

« back to all changes in this revision

Viewing changes to gtali/gyahtzee.c

  • Committer: Package Import Robot
  • Author(s): Rodrigo Moya
  • Date: 2011-05-30 13:32:04 UTC
  • mfrom: (1.3.4)
  • mto: (163.1.3 precise)
  • mto: This revision was merged to the branch mainline in revision 143.
  • Revision ID: package-import@ubuntu.com-20110530133204-celaq1v1dsxc48q1
Tags: upstream-3.0.2
ImportĀ upstreamĀ versionĀ 3.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
{
164
164
  int winner;
165
165
  int i;
166
 
  GamesScoreValue score;
167
166
  gint pos;
168
167
  gchar *message;
169
168
 
186
185
  ShowoffPlayer (ScoreList, winner, 1);
187
186
 
188
187
  if (winner < NumberOfHumans) {
189
 
    score.plain = (guint32) WinningScore;  
190
 
 
191
 
    pos = games_scores_add_score (highscores, score);
 
188
    pos = games_scores_add_plain_score (highscores, (guint32) WinningScore);
192
189
 
193
190
    if (pos > 0) {
194
191
      games_scores_update_score (highscores, players[winner].name);
433
430
{
434
431
  gint offset;
435
432
 
436
 
  offset = event->keyval - GDK_1;
 
433
  offset = event->keyval - GDK_KEY_1;
437
434
 
438
435
  if ((offset < 0) || (offset >= NUMBER_OF_DICE)) {
439
436
    return FALSE;
657
654
  int i, j;
658
655
  char *path, *path_kismet;
659
656
  const char *dir;
 
657
  GError *error = NULL;
660
658
 
661
659
  dir = games_runtime_get_directory (GAMES_RUNTIME_GAME_PIXMAP_DIRECTORY);
662
660
 
673
671
      for (j = 0; j < NUMBER_OF_DICE; j++) {
674
672
        GdkPixbuf *pixbuf;
675
673
 
676
 
        pixbuf = gdk_pixbuf_new_from_file_at_size (path, 60, 60, NULL);
 
674
        pixbuf = gdk_pixbuf_new_from_file_at_size (path, 60, 60, &error);
677
675
        dicePixmaps[j][i][GAME_YAHTZEE] = gtk_image_new_from_pixbuf (pixbuf);
 
676
        if (error) {
 
677
          g_warning ("Loading dice image %s: %s", path, error->message);
 
678
          g_clear_error (&error);
 
679
        }
678
680
        g_object_unref (pixbuf);
679
681
 
680
 
        pixbuf = gdk_pixbuf_new_from_file_at_size (path_kismet, 60, 60, NULL);
 
682
        pixbuf = gdk_pixbuf_new_from_file_at_size (path_kismet, 60, 60, &error);
681
683
        dicePixmaps[j][i][GAME_KISMET] = gtk_image_new_from_pixbuf (pixbuf);
 
684
        if (error) {
 
685
          g_warning ("Loading dice image %s: %s", path_kismet, error->message);
 
686
          g_clear_error (&error);
 
687
        }
682
688
        g_object_unref (pixbuf);
683
689
      }
684
690
 
783
789
  statusbar = gtk_statusbar_new ();
784
790
  ui_manager = gtk_ui_manager_new ();
785
791
 
786
 
  gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar), FALSE);
787
792
  games_stock_prepare_for_statusbar_tooltips (ui_manager, statusbar);
788
793
 
789
794
        /*---- Menus ----*/