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

« back to all changes in this revision

Viewing changes to gnomine/gnomine.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:
389
389
static void
390
390
win_game (GtkWidget * widget, gpointer data)
391
391
{
392
 
  GamesScoreValue score;
393
392
  int pos;
394
393
  time_t seconds;
395
394
 
400
399
  show_face (pm_win);
401
400
 
402
401
  seconds = games_clock_get_seconds (GAMES_CLOCK (clk));
403
 
  score.time_double = (gfloat) (seconds / 60) + (gfloat) (seconds % 60) / 100;
404
 
 
405
 
  pos = games_scores_add_score (highscores, score);
 
402
  pos = games_scores_add_time_score (highscores, (gfloat) (seconds / 60) + (gfloat) (seconds % 60) / 100);
406
403
 
407
404
  if (show_scores (pos, TRUE) == GTK_RESPONSE_REJECT)
408
405
    quit_game ();
478
475
                         "license", license, "authors", authors, "artists",
479
476
                         artists, "documenters", documenters,
480
477
                         "translator-credits", _("translator-credits"),
481
 
                         "logo-icon-name", "gnome-mines", "website",
 
478
                         "logo-icon-name", "gnomine", "website",
482
479
                         "http://www.gnome.org/projects/gnome-games/",
483
480
                         "website-label", _("GNOME Games web site"),
484
481
                         "wrap-license", TRUE, NULL);
643
640
      gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
644
641
    }
645
642
 
646
 
    g_signal_connect (GTK_OBJECT (button), "clicked",
 
643
    g_signal_connect (G_OBJECT (button), "clicked",
647
644
                      G_CALLBACK (size_radio_callback),
648
645
                      GINT_TO_POINTER (i));
649
646
    gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
668
665
                    GTK_EXPAND | GTK_FILL, 0, 0, 0);
669
666
 
670
667
  mentry = gtk_spin_button_new_with_range (1, XSIZE_MAX * YSIZE_MAX, 1);
671
 
  g_signal_connect (GTK_OBJECT (mentry), "value-changed",
 
668
  g_signal_connect (G_OBJECT (mentry), "value-changed",
672
669
                    G_CALLBACK (nmines_spin_cb), NULL);
673
670
  gtk_spin_button_set_value (GTK_SPIN_BUTTON (mentry), nmines);
674
671
  gtk_table_attach (GTK_TABLE (table2), mentry, 1, 2, 2, 3, 0, 0, 0, 0);
681
678
                    GTK_EXPAND | GTK_FILL, 0, 0, 0);
682
679
 
683
680
  xentry = gtk_spin_button_new_with_range (XSIZE_MIN, XSIZE_MAX, 1);
684
 
  g_signal_connect (GTK_OBJECT (xentry), "value-changed",
 
681
  g_signal_connect (G_OBJECT (xentry), "value-changed",
685
682
                    G_CALLBACK (xsize_spin_cb), NULL);
686
683
  gtk_spin_button_set_value (GTK_SPIN_BUTTON (xentry), xsize);
687
684
  gtk_table_attach (GTK_TABLE (table2), xentry, 1, 2, 0, 1, 0, 0, 0, 0);
693
690
                    GTK_EXPAND | GTK_FILL, 0, 0, 0);
694
691
 
695
692
  yentry = gtk_spin_button_new_with_range (YSIZE_MIN, YSIZE_MAX, 1);
696
 
  g_signal_connect (GTK_OBJECT (yentry), "value-changed",
 
693
  g_signal_connect (G_OBJECT (yentry), "value-changed",
697
694
                    G_CALLBACK (ysize_spin_cb), NULL);
698
695
  gtk_spin_button_set_value (GTK_SPIN_BUTTON (yentry), ysize);
699
696
  gtk_table_attach (GTK_TABLE (table2), yentry, 1, 2, 1, 2, 0, 0, 0, 0);
708
705
 
709
706
  question_toggle =
710
707
    gtk_check_button_new_with_mnemonic (_("_Use \"I'm not sure\" flags"));
711
 
  g_signal_connect (GTK_OBJECT (question_toggle), "toggled",
 
708
  g_signal_connect (G_OBJECT (question_toggle), "toggled",
712
709
                    G_CALLBACK (use_question_toggle_cb), NULL);
713
710
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (question_toggle),
714
711
                                use_question_marks);
722
719
 
723
720
  overmine_toggle =
724
721
    gtk_check_button_new_with_mnemonic (_("_Use \"Too many flags\" warning"));
725
 
  g_signal_connect (GTK_OBJECT (overmine_toggle), "toggled",
 
722
  g_signal_connect (G_OBJECT (overmine_toggle), "toggled",
726
723
                    G_CALLBACK (use_overmine_toggle_cb), NULL);
727
724
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (overmine_toggle),
728
725
                                use_overmine_warning);
738
735
                                             GTK_STOCK_CLOSE,
739
736
                                             GTK_RESPONSE_CLOSE, NULL);
740
737
 
741
 
  gtk_dialog_set_has_separator (GTK_DIALOG (pref_dialog), FALSE);
742
738
  gtk_container_set_border_width (GTK_CONTAINER (pref_dialog), 5);
743
739
  gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (pref_dialog))), 2);
744
740
  gtk_window_set_resizable (GTK_WINDOW (pref_dialog), FALSE);
948
944
#endif
949
945
 
950
946
  context = g_option_context_new (NULL);
951
 
#if GLIB_CHECK_VERSION (2, 12, 0)
952
947
  g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
953
 
#endif
954
948
  g_option_context_add_group (context, gtk_get_option_group (TRUE));
955
949
#ifdef WITH_SMCLIENT
956
950
  g_option_context_add_group (context, egg_sm_client_get_option_group ());