[gnome-nibbles/arnaudb/modernize-code: 43/58] Make a method static.



commit 26c7841cfc87833d3770481bdee28f49fc191e4b
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sat May 30 14:28:36 2020 +0200

    Make a method static.

 src/nibbles-view.vala   | 2 +-
 src/nibbles-window.vala | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/nibbles-view.vala b/src/nibbles-view.vala
index 4a75821..a6f1275 100644
--- a/src/nibbles-view.vala
+++ b/src/nibbles-view.vala
@@ -363,7 +363,7 @@ private class NibblesView : GtkClutter.Embed
     * * Pixmaps loading
     \*/
 
-    internal Gdk.Pixbuf load_pixmap_file (string pixmap, int xsize, int ysize)
+    internal static Gdk.Pixbuf load_pixmap_file (string pixmap, int xsize, int ysize)
     {
         var filename = Path.build_filename (PKGDATADIR, "pixmaps", pixmap, null);
         if (filename == null)
diff --git a/src/nibbles-window.vala b/src/nibbles-window.vala
index 75a60bc..d08cca6 100644
--- a/src/nibbles-window.vala
+++ b/src/nibbles-window.vala
@@ -179,7 +179,7 @@ private class NibblesWindow : ApplicationWindow
         game_box.pack_start (frame);
 
         /* Create scoreboard */
-        scoreboard_life = view.load_pixmap_file ("scoreboard-life.svg", 2 * view.tile_size, 2 * 
view.tile_size);
+        scoreboard_life = NibblesView.load_pixmap_file ("scoreboard-life.svg", 2 * view.tile_size, 2 * 
view.tile_size);
 
         frame.add (view);
         frame.show ();
@@ -189,8 +189,8 @@ private class NibblesWindow : ApplicationWindow
         game.numai = settings.get_int ("ai");
 
         /* Controls screen */
-        arrow_pixbuf = view.load_pixmap_file ("arrow.svg", 5 * view.tile_size, 5 * view.tile_size);
-        arrow_key_pixbuf = view.load_pixmap_file ("arrow-key.svg", 5 * view.tile_size, 5 * view.tile_size);
+        arrow_pixbuf = NibblesView.load_pixmap_file ("arrow.svg", 5 * view.tile_size, 5 * view.tile_size);
+        arrow_key_pixbuf = NibblesView.load_pixmap_file ("arrow-key.svg", 5 * view.tile_size, 5 * 
view.tile_size);
 
         /* Check whether to display the first run screen */
         var first_run = settings.get_boolean ("first-run");


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