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

« back to all changes in this revision

Viewing changes to mahjongg/mahjongg.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:
517
517
    }
518
518
      
519
519
    tileset_name = g_strsplit (s, ".", -1);
520
 
    gtk_combo_box_append_text (GTK_COMBO_BOX (menu), tileset_name[0]);
 
520
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (menu), tileset_name[0]);
521
521
    g_strfreev (tileset_name);
522
522
 
523
523
    tileset_list = g_list_append (tileset_list, s);
540
540
    const char *display_name;
541
541
 
542
542
    display_name = g_dpgettext2 (NULL, "mahjongg map name", maps[lp].name);
543
 
    gtk_combo_box_append_text (GTK_COMBO_BOX (menu), display_name);
 
543
    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (menu), display_name);
544
544
  }
545
545
  gtk_combo_box_set_active (GTK_COMBO_BOX (menu), mapset);
546
546
}
610
610
{
611
611
  gint pos;
612
612
  time_t seconds;
613
 
  GamesScoreValue score;
614
613
  static GtkWidget *dialog = NULL;
615
614
  gchar *message;
616
615
 
618
617
 
619
618
  seconds = games_clock_get_seconds (GAMES_CLOCK (chrono));
620
619
 
621
 
  score.time_double = (seconds / 60) * 1.0 + (seconds % 60) / 100.0;
622
 
 
623
 
  pos = games_scores_add_score (highscores, score);
 
620
  pos = games_scores_add_time_score (highscores, (seconds / 60) * 1.0 + (seconds % 60) / 100.0);
624
621
  update_menu_sensitivities ();
625
622
  if (pos > 0) {
626
623
    if (dialog) {
674
671
                                             GTK_RESPONSE_CLOSE, NULL);
675
672
  gtk_container_set_border_width (GTK_CONTAINER (pref_dialog), 5);
676
673
  gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (pref_dialog))), 2);
677
 
  gtk_dialog_set_has_separator (GTK_DIALOG (pref_dialog), FALSE);
678
674
  gtk_window_set_resizable (GTK_WINDOW (pref_dialog), FALSE);
679
675
  gtk_dialog_set_default_response (GTK_DIALOG (pref_dialog),
680
676
                                   GTK_RESPONSE_CLOSE);
700
696
  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
701
697
                    (GtkAttachOptions) GTK_FILL, (GtkAttachOptions) 0, 0, 0);
702
698
 
703
 
  omenu = gtk_combo_box_new_text ();
 
699
  omenu = gtk_combo_box_text_new ();
704
700
  fill_tile_menu (omenu);
705
701
  g_signal_connect (G_OBJECT (omenu), "changed",
706
702
                    G_CALLBACK (tileset_callback), NULL);
721
717
  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
722
718
                    (GtkAttachOptions) GTK_FILL, (GtkAttachOptions) 0, 0, 0);
723
719
 
724
 
  omenu = gtk_combo_box_new_text ();
 
720
  omenu = gtk_combo_box_text_new ();
725
721
  fill_map_menu (omenu);
726
722
  g_signal_connect (G_OBJECT (omenu), "changed",
727
723
                    G_CALLBACK (set_map_selection), NULL);
899
895
  gchar *license = games_get_license (_("Mahjongg"));
900
896
 
901
897
  gtk_show_about_dialog (GTK_WINDOW (window),
902
 
#if GTK_CHECK_VERSION (2, 11, 0)
903
898
                         "program-name", _("Mahjongg"),
904
 
#else
905
 
                         "name", _("Mahjongg"),
906
 
#endif
907
899
                         "version", VERSION,
908
900
                         "comments",
909
901
                         _("A matching game played with Mahjongg tiles.\n\nMahjongg is a part of GNOME Games."),
1354
1346
#endif
1355
1347
 
1356
1348
  context = g_option_context_new (NULL);
1357
 
#if GLIB_CHECK_VERSION (2, 12, 0)
1358
1349
  g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
1359
 
#endif
1360
 
 
1361
1350
  g_option_context_add_group (context, gtk_get_option_group (TRUE));
1362
1351
 
1363
1352
  retval = g_option_context_parse (context, &argc, &argv, &error);
1428
1417
  ui_manager = gtk_ui_manager_new ();
1429
1418
 
1430
1419
  games_stock_prepare_for_statusbar_tooltips (ui_manager, statusbar);
1431
 
  gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar), FALSE);
1432
1420
 
1433
1421
  create_menus (ui_manager);
1434
1422
  accel_group = gtk_ui_manager_get_accel_group (ui_manager);