[gnome-nibbles/wip/vala: 46/64] Remove background surface and pixmap. Leave background black



commit 7921b6a79550ced9304d0bb7a2719620eb56c790
Author: Iulian Radu <iulian radu67 gmail com>
Date:   Tue Jul 14 18:09:05 2015 +0300

    Remove background surface and pixmap. Leave background black

 data/pix/Makefile.am          |    1 -
 data/pix/wall-small-empty.svg |  161 -----------------------------------------
 src/nibbles-view.vala         |   33 ---------
 3 files changed, 0 insertions(+), 195 deletions(-)
---
diff --git a/data/pix/Makefile.am b/data/pix/Makefile.am
index 68d1459..5435dc1 100644
--- a/data/pix/Makefile.am
+++ b/data/pix/Makefile.am
@@ -24,7 +24,6 @@ SMALL_PIX = \
        wall-corner-top-right.svg \
        wall-cross.svg \
        wall-empty.svg \
-       wall-small-empty.svg \
        wall-straight-side.svg \
        wall-straight-up.svg \
        wall-tee-down.svg \
diff --git a/src/nibbles-view.vala b/src/nibbles-view.vala
index a66e41d..33cf6e5 100644
--- a/src/nibbles-view.vala
+++ b/src/nibbles-view.vala
@@ -37,7 +37,6 @@ public class NibblesView : GtkClutter.Embed
     }
 
     public Clutter.Stage stage { get; private set; }
-    private GtkClutter.Texture surface;
     private Clutter.Actor level;
 
     private Gdk.Pixbuf wall_pixmaps[11];
@@ -70,38 +69,10 @@ public class NibblesView : GtkClutter.Embed
         set_size_request (NibblesGame.MINIMUM_TILE_SIZE * NibblesGame.WIDTH,
                           NibblesGame.MINIMUM_TILE_SIZE * NibblesGame.HEIGHT);
 
-        surface = new GtkClutter.Texture ();
-        try
-        {
-            var pixbuf = new Gdk.Pixbuf.from_file (Path.build_filename (PKGDATADIR, "pixmaps", 
"wall-small-empty.svg"));
-
-            surface.set_from_pixbuf (pixbuf);
-        }
-        catch (Clutter.TextureError e)
-        {
-            /* Fatal console error when the background texture could not be loaded. */
-            error (_("Nibbles failed to load texture: %s"), e.message);
-        }
-        catch (Error e)
-        {
-            /* Fatal console error when the background texture could not be loaded. */
-            error (_("Nibbles failed to load texture: %s"), e.message);
-        }
-
-        surface.set_property ("repeat-x", true);
-        surface.set_property ("repeat-y", true);
-
-        surface.set_position (0, 0);
-        surface.set_size (game.tile_size * NibblesGame.WIDTH,
-                          game.tile_size * NibblesGame.HEIGHT);
-        surface.set_opacity (100);
-
         worm_actors = new Gee.HashMap<Worm, WormActor> ();
         bonus_actors = new Gee.HashMap<Bonus, BonusTexture> ();
 
         load_pixmap ();
-
-        stage.add_child (surface);
     }
 
     public override bool key_press_event (Gdk.EventKey event)
@@ -392,14 +363,10 @@ public class NibblesView : GtkClutter.Embed
 
         if (level == null)
             return;
-        if (surface == null)
-            return;
 
         board_width = NibblesGame.WIDTH * tile_size;
         board_height = NibblesGame.HEIGHT * tile_size;
 
-        surface.set_size (board_width, board_height);
-
         foreach (var actor in level.get_children ())
         {
             actor.get_position (out x_pos, out y_pos);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]