[gnome-mines/wip/libgames-scores: 55/55] Merge branch 'master' into wip/libgames-scores
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-mines/wip/libgames-scores: 55/55] Merge branch 'master' into wip/libgames-scores
- Date: Sat, 21 Jun 2014 18:30:03 +0000 (UTC)
commit 4c1fa31dc6ee6d93bae8dc2fd45227c25a834153
Merge: bdea1d2 7cab7d5
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Jun 21 13:29:38 2014 -0500
Merge branch 'master' into wip/libgames-scores
NEWS | 23 +
configure.ac | 2 +-
data/1mine.svg | 80 +
data/2mines.svg | 80 +
data/3mines.svg | 80 +
data/4mines.svg | 80 +
data/5mines.svg | 80 +
data/6mines.svg | 80 +
data/7mines.svg | 80 +
data/8mines.svg | 80 +
data/Makefile.am | 24 +-
data/bang.svg | 128 +-
data/flag-question.svg | 123 +-
data/flag-symbolic.svg | 90 +
data/flag.svg | 111 +-
data/gnome-mines.appdata.xml.in | 3 +-
data/gnome-mines.css.in | 129 +
data/interface.ui | 458 ++
data/mine.svg | 136 +-
data/warning.svg | 92 +-
gnome-mines.doap | 7 +
help/cs/cs.po | 123 +-
help/el/el.po | 353 +-
help/es/es.po | 186 +-
po/POTFILES.in | 1 +
po/cs.po | 173 +-
po/el.po | 3132 +-------------
po/es.po | 245 +-
po/gl.po | 236 +-
po/he.po | 216 +-
po/lt.po | 178 +-
po/pt_BR.po | 247 +-
po/sl.po | 8 +-
po/sv.po | 8841 +--------------------------------------
src/gnome-mines.vala | 263 +-
src/minefield-view.vala | 601 +--
36 files changed, 3371 insertions(+), 13398 deletions(-)
---
diff --cc src/gnome-mines.vala
index 3be9a3e,2eda53f..7b48789
--- a/src/gnome-mines.vala
+++ b/src/gnome-mines.vala
@@@ -155,105 -174,53 +181,53 @@@ public class Mines : Gtk.Applicatio
add_window (window);
- var main_vbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12);
- main_vbox.margin = 12;
- window.add (main_vbox);
- main_vbox.show ();
+ minefield_view = new MinefieldView (settings);
+ minefield_view.show ();
- var view_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
- view_box.border_width = 3;
- view_box.show ();
- main_vbox.pack_start (view_box, true, true, 0);
+ scrolled = new Gtk.ScrolledWindow (null, null);
+ scrolled.show ();
+ scrolled.add (minefield_view);
- minefield_view = new MinefieldView (settings);
- minefield_view.button_press_event.connect (view_button_press_event);
- view_box.pack_start (minefield_view, true, true, 0);
+ minefield_overlay = (Gtk.Overlay) ui_builder.get_object ("minefield_overlay");
+ minefield_overlay.add (scrolled);
+ minefield_overlay.show ();
+
+ minefield_aspect = (Gtk.AspectFrame) ui_builder.get_object ("minefield_aspect");
+ minefield_aspect.show ();
+
+ paused_box = (Gtk.Box) ui_builder.get_object ("paused_box");
+ paused_box.button_press_event.connect (view_button_press_event);
+
+ minefield_overlay.add_overlay (paused_box);
+
+ main_screen = (Gtk.Widget) ui_builder.get_object ("main_screen");
/* Initialize New Game Screen */
- startup_new_game_screen ();
- view_box.pack_start (new_game_screen, true, true, 0);
+ startup_new_game_screen (ui_builder);
/* Initialize Custom Game Screen */
- startup_custom_game_screen ();
- view_box.pack_start (custom_game_screen, false, false);
+ startup_custom_game_screen (ui_builder);
- history = new History (Path.build_filename (Environment.get_user_data_dir (), "gnome-mines",
"history"));
- history.load ();
+ Scores.scores_startup ();
+ highscores = new Scores.Scores ("gnome-mines", score_categories, null, null, 0,
Scores.ScoreStyle.PLAIN_DESCENDING);
- buttons_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 4);
- buttons_box.margin_right = 6;
- buttons_box.margin_left = 6;
- buttons_box.set_size_request (115, -1);
-
- main_vbox.pack_start (buttons_box, false, false, 0);
-
- var size = new Gtk.SizeGroup (Gtk.SizeGroupMode.BOTH);
-
- var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 2);
- // Obviously a FIXME image
- var image = new Gtk.Image.from_icon_name ("preferences-desktop-locale-symbolic", Gtk.IconSize.DND);
- box.pack_start (image, false, false, 0);
- flag_label = new Gtk.Label ("");
- box.pack_start (flag_label, false, false, 0);
- buttons_box.pack_start (box, false, false, 8);
- box.show_all ();
-
- box = new Gtk.Box (Gtk.Orientation.VERTICAL, 2);
- image = new Gtk.Image.from_icon_name ("preferences-system-time-symbolic", Gtk.IconSize.DND);
- box.pack_start (image, false, false, 0);
- clock_label = new Gtk.Label ("");
- clock_label.show ();
- box.pack_start (clock_label, false, false, 0);
- buttons_box.pack_start (box, false, false, 8);
- box.show_all ();
- box.margin_bottom = 18;
-
- play_pause_button = new Gtk.Button ();
- buttons_box.pack_end (play_pause_button, false, false, 0);
- size.add_widget (play_pause_button);
- play_pause_button.use_underline = true;
-
- high_scores_button = new Gtk.Button.with_mnemonic (_("_Best Times"));
- var label = (Gtk.Label)high_scores_button.get_child ();
- label.wrap = true;
- label.justify = Gtk.Justification.CENTER;
- buttons_box.pack_end (high_scores_button, false, false, 0);
- high_scores_button.action_name = "app.scores";
- size.add_widget (high_scores_button);
-
- new_game_button = new Gtk.Button.with_mnemonic (_("_Difficulty"));
- label = (Gtk.Label)new_game_button.get_child ();
- label.wrap = true;
- label.justify = Gtk.Justification.CENTER;
- buttons_box.pack_end (new_game_button, false, false, 0);
- size.add_widget (new_game_button);
- new_game_button.action_name = "app.new-game";
- new_game_button.show ();
+ flag_label = (Gtk.Label) ui_builder.get_object ("flag_label");
+ clock_label = (Gtk.Label) ui_builder.get_object ("clock_label");
+
+ play_pause_button = (Gtk.Button) ui_builder.get_object ("play_pause_button");
+ play_pause_label = (Gtk.Label) ui_builder.get_object ("play_pause_label");
- replay_button = new Gtk.Button.with_mnemonic (_("_Play Again"));
- label = (Gtk.Label)replay_button.get_child ();
- label.wrap = true;
- label.justify = Gtk.Justification.CENTER;
- buttons_box.pack_end (replay_button, false, false, 0);
- replay_button.action_name = "app.repeat-size";
- size.add_widget (replay_button);
+ high_scores_button = (Gtk.Button) ui_builder.get_object ("high_scores_button");
+ replay_button = (Gtk.Button) ui_builder.get_object ("replay_button");
+ new_game_button = (Gtk.Button) ui_builder.get_object ("new_game_button");
}
- private void startup_new_game_screen ()
+ private void startup_new_game_screen (Gtk.Builder builder)
{
- new_game_screen = new Gtk.AspectFrame (null, 0.5f, 0.5f, 1.0f, false);
- new_game_screen.set_shadow_type (Gtk.ShadowType.NONE);
+ new_game_screen = (Gtk.AspectFrame) builder.get_object ("new_game_screen");
- var new_game_grid = new Gtk.Grid ();
- new_game_grid.column_homogeneous = true;
- new_game_grid.column_spacing = 18;
- new_game_grid.row_homogeneous = true;
- new_game_grid.row_spacing = 18;
- new_game_screen.add (new_game_grid);
-
- var button = new Gtk.Button ();
+ var button = (Gtk.Button) builder.get_object ("small_size_btn");
button.clicked.connect (small_size_clicked_cb);
- new_game_grid.attach (button, 0, 0, 1, 1);
var label = new Gtk.Label (null);
label.set_markup (make_minefield_description (8, 8, 10));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]