[gnome-games/wip/exalm/grilo: 3/4] grilo: Rename metadata key variables to 'metadata_key'



commit a0d66b92eca3d547ce588acde57cc8db15796c13
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Fri Aug 31 17:15:19 2018 +0500

    grilo: Rename metadata key variables to 'metadata_key'
    
    Avoid uppercase in name variables, and use more consistent names.

 src/grilo/grilo-cooperative.vala | 8 ++++----
 src/grilo/grilo-developer.vala   | 6 +++---
 src/grilo/grilo-players.vala     | 8 ++++----
 src/grilo/grilo-publisher.vala   | 6 +++---
 4 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/grilo/grilo-cooperative.vala b/src/grilo/grilo-cooperative.vala
index c2f92c8b..ba64bfb1 100644
--- a/src/grilo/grilo-cooperative.vala
+++ b/src/grilo/grilo-cooperative.vala
@@ -2,7 +2,7 @@
 
 public class Games.GriloCooperative : Object, Cooperative {
        private GriloMedia media;
-       private Grl.KeyID GRL_METADATA_KEY_COOP;
+       private Grl.KeyID metadata_key;
        private Grl.Registry registry;
        private bool cooperative;
        private bool resolving;
@@ -30,12 +30,12 @@ public class Games.GriloCooperative : Object, Cooperative {
                        return;
 
                registry = Grl.Registry.get_default ();
-               GRL_METADATA_KEY_COOP = registry.lookup_metadata_key ("coop");
+               metadata_key = registry.lookup_metadata_key ("coop");
 
-               if (grl_media.length (GRL_METADATA_KEY_COOP) == 0)
+               if (grl_media.length (metadata_key) == 0)
                        return;
 
-               var coop = grl_media.get_boolean (GRL_METADATA_KEY_COOP);
+               var coop = grl_media.get_boolean (metadata_key);
                load_media_cooperative (coop);
        }
 
diff --git a/src/grilo/grilo-developer.vala b/src/grilo/grilo-developer.vala
index 3770da7e..8a5d8eb4 100644
--- a/src/grilo/grilo-developer.vala
+++ b/src/grilo/grilo-developer.vala
@@ -29,12 +29,12 @@ public class Games.GriloDeveloper : Object, Developer {
                        return;
 
                var registry = Grl.Registry.get_default ();
-               var grl_metadata_key_developer = registry.lookup_metadata_key ("developer");
+               var metadata_key = registry.lookup_metadata_key ("developer");
 
-               if (grl_media.length (grl_metadata_key_developer) == 0)
+               if (grl_media.length (metadata_key) == 0)
                        return;
 
-               var developer_string = grl_media.get_string (grl_metadata_key_developer);
+               var developer_string = grl_media.get_string (metadata_key);
                load_media_developer (developer_string);
        }
 
diff --git a/src/grilo/grilo-players.vala b/src/grilo/grilo-players.vala
index c7b2809c..bc20f6c1 100644
--- a/src/grilo/grilo-players.vala
+++ b/src/grilo/grilo-players.vala
@@ -3,7 +3,7 @@
 public class Games.GriloPlayers : Object, Players {
        private GriloMedia media;
        private Grl.Registry registry;
-       private Grl.KeyID GRL_METADATA_KEY_PLAYERS;
+       private Grl.KeyID metadata_key;
        private string players;
        private bool resolving;
 
@@ -33,12 +33,12 @@ public class Games.GriloPlayers : Object, Players {
                        return;
 
                registry = Grl.Registry.get_default ();
-               GRL_METADATA_KEY_PLAYERS = registry.lookup_metadata_key ("players");
+               metadata_key = registry.lookup_metadata_key ("players");
 
-               if (grl_media.length (GRL_METADATA_KEY_PLAYERS) == 0)
+               if (grl_media.length (metadata_key) == 0)
                        return;
 
-               var player = grl_media.get_string (GRL_METADATA_KEY_PLAYERS);
+               var player = grl_media.get_string (metadata_key);
 
                if (int.parse (player) == 1)
                        player = _("Single-player");
diff --git a/src/grilo/grilo-publisher.vala b/src/grilo/grilo-publisher.vala
index dddcae87..cb72548a 100644
--- a/src/grilo/grilo-publisher.vala
+++ b/src/grilo/grilo-publisher.vala
@@ -31,12 +31,12 @@ public class Games.GriloPublisher : Object, Publisher {
                        return;
 
                var registry = Grl.Registry.get_default ();
-               var grl_metadata_key_publisher = registry.lookup_metadata_key ("publisher");
+               var metadata_key = registry.lookup_metadata_key ("publisher");
 
-               if (grl_media.length (grl_metadata_key_publisher) == 0)
+               if (grl_media.length (metadata_key) == 0)
                        return;
 
-               var publisher_string = grl_media.get_string (grl_metadata_key_publisher);
+               var publisher_string = grl_media.get_string (metadata_key);
                load_media_publisher (publisher_string);
        }
 


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