253
253
notebook.set_border_width (5);
254
254
vbox.pack_start (notebook, true, true, 0);
256
vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 18);
257
vbox.set_border_width (12);
256
var grid = new Gtk.Grid ();
257
grid.set_row_spacing (6);
258
grid.set_column_spacing (12);
259
grid.border_width = 12;
258
260
var label = new Gtk.Label (_("Game"));
259
notebook.append_page (vbox, label);
261
var frame = new GnomeGamesSupport.Frame (_("Setup"));
262
var grid = new Gtk.Grid ();
263
grid.set_row_spacing (6);
264
grid.set_column_spacing (12);
261
notebook.append_page (grid, label);
266
263
/* pre-filled rows */
267
264
label = new Gtk.Label.with_mnemonic (_("_Number of pre-filled rows:"));
305
302
grid.attach (starting_level_spin, 1, 2, 1, 1);
306
303
label.set_mnemonic_widget (starting_level_spin);
309
vbox.pack_start (frame, false, false, 0);
311
frame = new GnomeGamesSupport.Frame (_("Operation"));
312
var fvbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
314
305
sound_toggle = new Gtk.CheckButton.with_mnemonic (_("_Enable sounds"));
315
306
sound_toggle.set_active (settings.get_boolean ("sound"));
316
307
sound_toggle.toggled.connect (sound_toggle_toggled_cb);
317
fvbox.pack_start (sound_toggle, false, false, 0);
308
grid.attach (sound_toggle, 0, 3, 2, 1);
319
310
do_preview_toggle = new Gtk.CheckButton.with_mnemonic (_("_Preview next block"));
320
311
do_preview_toggle.set_active (settings.get_boolean ("do-preview"));
321
312
do_preview_toggle.toggled.connect (do_preview_toggle_toggled_cb);
322
fvbox.pack_start (do_preview_toggle, false, false, 0);
313
grid.attach (do_preview_toggle, 0, 4, 2, 1);
324
315
difficult_blocks_toggle = new Gtk.CheckButton.with_mnemonic (_("Choose difficult _blocks"));
325
316
difficult_blocks_toggle.set_active (settings.get_boolean ("pick-difficult-blocks"));
326
317
difficult_blocks_toggle.toggled.connect (difficult_blocks_toggled_cb);
327
fvbox.pack_start (difficult_blocks_toggle, false, false, 0);
318
grid.attach (difficult_blocks_toggle, 0, 5, 2, 1);
329
320
/* rotate counter clock wise */
330
321
rotate_counter_clock_wise_toggle = new Gtk.CheckButton.with_mnemonic (_("_Rotate blocks counterclockwise"));
331
322
rotate_counter_clock_wise_toggle.set_active (settings.get_boolean ("rotate-counter-clock-wise"));
332
323
rotate_counter_clock_wise_toggle.toggled.connect (set_rotate_counter_clock_wise);
333
fvbox.pack_start (rotate_counter_clock_wise_toggle, false, false, 0);
324
grid.attach (rotate_counter_clock_wise_toggle, 0, 6, 2, 1);
335
326
show_shadow_toggle = new Gtk.CheckButton.with_mnemonic (_("Show _where the block will land"));
336
327
show_shadow_toggle.set_active (settings.get_boolean ("show-shadow"));
337
328
show_shadow_toggle.toggled.connect (user_target_toggled_cb);
338
fvbox.pack_start (show_shadow_toggle, false, false, 0);
341
vbox.pack_start (frame, false, false, 0);
343
frame = new GnomeGamesSupport.Frame (_("Theme"));
344
grid = new Gtk.Grid ();
345
grid.set_border_width (0);
346
grid.set_row_spacing (6);
347
grid.set_column_spacing (12);
329
grid.attach (show_shadow_toggle, 0, 7, 2, 1);
349
331
/* controls page */
350
vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
351
vbox.set_border_width (12);
352
label = new Gtk.Label (_("Controls"));
353
notebook.append_page (vbox, label);
355
frame = new GnomeGamesSupport.Frame (_("Keyboard Controls"));
356
vbox.pack_start (frame, true, true, 0);
358
fvbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
361
332
var controls_list = new GnomeGamesSupport.ControlsList (settings);
362
333
controls_list.add_controls ("key-left", _("Move left"), 0,
363
334
"key-right", _("Move right"), 0,
366
337
"key-rotate", _("Rotate"), 0,
367
338
"key-pause", _("Pause"), 0,
370
fvbox.pack_start (controls_list, true, true, 0);
340
controls_list.border_width = 12;
341
label = new Gtk.Label (_("Controls"));
342
notebook.append_page (controls_list, label);
373
345
vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
375
347
label = new Gtk.Label (_("Theme"));
376
348
notebook.append_page (vbox, label);
378
frame = new GnomeGamesSupport.Frame (_("Block Style"));
379
vbox.pack_start (frame, true, true, 0);
381
fvbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
384
350
var theme_combo = new Gtk.ComboBox ();
351
vbox.pack_start (theme_combo, false, true, 0);
385
352
var theme_store = new Gtk.ListStore (2, typeof (string), typeof (string));
386
353
theme_combo.model = theme_store;
387
354
var renderer = new Gtk.CellRendererText ();
411
378
theme_combo.set_active_iter (iter);
413
380
theme_combo.changed.connect (theme_combo_changed_cb);
414
fvbox.pack_start (theme_combo, false, false, 0);
416
382
theme_preview = new Preview ();
417
383
theme_preview.game = new Game ();
418
384
theme_preview.theme = settings.get_string ("theme");
419
fvbox.pack_start (theme_preview, true, true, 0);
385
vbox.pack_start (theme_preview, true, true, 0);
421
387
preferences_dialog.show_all ();