263
263
var p = highscores.add_time_score ((seconds / 60) * 1.0 + (seconds % 60) / 100.0);
264
264
var scores_dialog = new GnomeGamesSupport.ScoresDialog (window, highscores, _("Mahjongg Scores"));
265
scores_dialog.set_category_description (_("Map:"));
265
scores_dialog.set_category_description (_("Layout:"));
266
266
var title = _("Puzzle solved!");
267
267
var message = _("You didn't make the top ten, better luck next time.");
334
334
preferences_dialog.set_default_response (Gtk.ResponseType.CLOSE);
335
335
preferences_dialog.response.connect (preferences_dialog_response_cb);
337
var top_grid = new Gtk.Grid ();
338
top_grid.border_width = 5;
339
top_grid.set_row_spacing (18);
340
top_grid.set_column_spacing (0);
342
var frame = new GnomeGamesSupport.Frame (_("Tiles"));
343
top_grid.attach (frame, 0, 0, 1, 1);
345
337
var grid = new Gtk.Grid ();
338
grid.border_width = 5;
346
339
grid.set_row_spacing (6);
347
grid.set_column_spacing (12);
340
grid.set_column_spacing (18);
349
var label = new Gtk.Label.with_mnemonic (_("_Tile set:"));
342
var label = new Gtk.Label.with_mnemonic (_("_Theme:"));
350
343
label.set_alignment (0, 0.5f);
351
344
grid.attach (label, 0, 0, 1, 1);
374
367
grid.attach (theme_combo, 1, 0, 1, 1);
375
368
label.set_mnemonic_widget (theme_combo);
379
frame = new GnomeGamesSupport.Frame (_("Maps"));
380
top_grid.attach (frame, 0, 1, 1, 1);
382
grid = new Gtk.Grid ();
383
grid.set_row_spacing (6);
384
grid.set_column_spacing (12);
386
label = new Gtk.Label.with_mnemonic (_("_Select map:"));
370
label = new Gtk.Label.with_mnemonic (_("_Layout:"));
387
371
label.set_alignment (0, 0.5f);
388
grid.attach (label, 0, 0, 1, 1);
372
grid.attach (label, 0, 1, 1, 1);
390
374
var map_combo = new Gtk.ComboBox ();
391
375
var map_store = new Gtk.ListStore (2, typeof (string), typeof (string));
407
391
map_combo.changed.connect (map_changed_cb);
408
392
map_combo.set_hexpand (true);
409
grid.attach (map_combo, 1, 0, 1, 1);
393
grid.attach (map_combo, 1, 1, 1, 1);
410
394
label.set_mnemonic_widget (map_combo);
414
frame = new GnomeGamesSupport.Frame (_("Colors"));
415
top_grid.attach (frame, 0, 2, 1, 1);
417
grid = new Gtk.Grid ();
418
grid.set_row_spacing (6);
419
grid.set_column_spacing (12);
421
396
label = new Gtk.Label.with_mnemonic (_("_Background color:"));
422
397
label.set_alignment (0, 0.5f);
423
grid.attach (label, 0, 0, 1, 1);
398
grid.attach (label, 0, 2, 1, 1);
425
400
var widget = new Gtk.ColorButton ();
426
401
widget.set_rgba (game_view.background_color);
427
402
widget.color_set.connect (background_changed_cb);
428
403
widget.set_hexpand (true);
429
grid.attach (widget, 1, 0, 1, 1);
404
grid.attach (widget, 1, 2, 1, 1);
430
405
label.set_mnemonic_widget (widget);
434
dialog_content_area.pack_start (top_grid, true, true, 0);
407
dialog_content_area.pack_start (grid, true, true, 0);
436
409
preferences_dialog.show_all ();
566
539
private void scores_cb ()
568
541
var map_scores_dialog = new GnomeGamesSupport.ScoresDialog (window, highscores, _("Mahjongg Scores"));
569
map_scores_dialog.set_category_description (_("Map:"));
542
map_scores_dialog.set_category_description (_("Layout:"));
570
543
map_scores_dialog.run ();
571
544
map_scores_dialog.destroy ();