[gnome-games/wip/exalm/rebrand: 107/124] uri-game-factory: Stop using CompositeTitle
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/rebrand: 107/124] uri-game-factory: Stop using CompositeTitle
- Date: Sat, 19 Jun 2021 14:37:46 +0000 (UTC)
commit 07d852ee5a38d8b207c5875651678dd8e45dee58
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue Mar 30 23:47:25 2021 +0500
uri-game-factory: Stop using CompositeTitle
The replacement isn't a 100% equivalent, but it will be much easier to fix
once title is a string.
src/core/uri-game-factory.vala | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/core/uri-game-factory.vala b/src/core/uri-game-factory.vala
index 840453d8..228c85a3 100644
--- a/src/core/uri-game-factory.vala
+++ b/src/core/uri-game-factory.vala
@@ -121,7 +121,13 @@ public class Games.UriGameFactory : Object {
private Game create_game (GameParser parser, MediaSet? media_set = null) throws Error {
var uid = new Uid (parser.get_uid ());
- var title = parser.get_title ();
+
+ string title = null;
+ if (media_set != null)
+ title = media_set.title;
+ else
+ title = parser.get_title ();
+
var media = new GriloMedia (title, platform.get_presentation_mime_type ());
var cover = new CompositeCover ({
new LocalCover (parser.uri),
@@ -129,13 +135,6 @@ public class Games.UriGameFactory : Object {
);
var icon = parser.get_icon ();
- if (media_set != null) {
- title = new CompositeTitle ({
- media_set.title,
- title
- });
- }
-
var game = new Game (uid, parser.uri, title, platform);
game.set_cover (cover);
game.media_set = media_set;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]