[gnome-klotski] Move some code.



commit f90efd3e5d9d45cddc95be4ae9f8d13eb21ae958
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sat Feb 8 22:26:07 2020 +0100

    Move some code.

 src/gnome-klotski.vala | 10 +++++-----
 src/puzzle-view.vala   |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/gnome-klotski.vala b/src/gnome-klotski.vala
index 4056b09..48426d9 100644
--- a/src/gnome-klotski.vala
+++ b/src/gnome-klotski.vala
@@ -50,6 +50,9 @@ private class Klotski : Gtk.Application
         Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
         Intl.textdomain (GETTEXT_PACKAGE);
 
+        Environment.set_application_name (PROGRAM_NAME);
+        Window.set_default_icon_name ("org.gnome.Klotski");
+
         Klotski app = new Klotski ();
         return app.run (args);
     }
@@ -76,9 +79,6 @@ private class Klotski : Gtk.Application
     {
         base.startup ();
 
-        Environment.set_application_name (PROGRAM_NAME);
-        Window.set_default_icon_name ("org.gnome.Klotski");
-
         add_action_entries (action_entries, this);
 
         add_window (new KlotskiWindow ());
@@ -162,12 +162,12 @@ private class Klotski : Gtk.Application
 
                              /* Translators: text crediting a maintainer, seen in the About dialog; the %u 
are replaced with the years of start and end */
                              _("Copyright \xc2\xa9 %u-%u – Arnaud Bonatti").printf (2015, 2020),
-                           "license-type", License.GPL_3_0,
+                           "license-type", License.GPL_3_0, // means "GNU General Public License, version 
3.0 or later"
                            "authors", authors,
                            "documenters", documenters,
+                           "logo-icon-name", "org.gnome.Klotski",
                            /* Translators: about dialog text; this string should be replaced by a text 
crediting yourselves and your translation team, or should be left empty. Do not translate literally! */
                            "translator-credits", _("translator-credits"),
-                           "logo-icon-name", "org.gnome.Klotski",
                            "website", "https://wiki.gnome.org/Apps/Klotski";);
     }
 
diff --git a/src/puzzle-view.vala b/src/puzzle-view.vala
index 9fe5505..1ae7e07 100644
--- a/src/puzzle-view.vala
+++ b/src/puzzle-view.vala
@@ -95,7 +95,7 @@ private class PuzzleView : Gtk.DrawingArea
 
     private void load_image ()
     {
-        image_file = File.new_for_uri("resource:///org/gnome/Klotski/ui/assets.svg");
+        image_file = File.new_for_uri ("resource:///org/gnome/Klotski/ui/assets.svg");
 
         try
         {
@@ -180,8 +180,8 @@ private class PuzzleView : Gtk.DrawingArea
     private void draw_square (Cairo.Context cr, uint8 x, uint8 y, double kx, double ky)
     {
         Gdk.Rectangle rect = Gdk.Rectangle ();
-        rect.x = x * tile_size + SPACE_OFFSET + (int)kx - 1;
-        rect.y = y * tile_size + SPACE_OFFSET + (int)ky - 1;
+        rect.x = x * tile_size + SPACE_OFFSET + (int) kx - 1;
+        rect.y = y * tile_size + SPACE_OFFSET + (int) ky - 1;
         rect.width = tile_size;
         rect.height = tile_size;
 


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