[gnome-games] desktop: Add DesktopTitle



commit f494934ce92b9ed323495ac939ca3e0f87ce0d2d
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Thu May 12 18:20:14 2016 +0200

    desktop: Add DesktopTitle
    
    This will be used in the next commit to provide desktop game titles to
    GenericGame and hence to allow to replace DesktopGame by GenericGame.

 plugins/desktop/src/Makefile.am        |    1 +
 plugins/desktop/src/desktop-title.vala |   13 +++++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/plugins/desktop/src/Makefile.am b/plugins/desktop/src/Makefile.am
index 3468c31..a12f0c9 100644
--- a/plugins/desktop/src/Makefile.am
+++ b/plugins/desktop/src/Makefile.am
@@ -33,6 +33,7 @@ libgames_desktop_plugin_la_SOURCES = \
        desktop-game.vala \
        desktop-icon.vala \
        desktop-plugin.vala \
+       desktop-title.vala \
        desktop-tracker-query.vala \
        $(BUILT_SOURCES) \
        $(NULL)
diff --git a/plugins/desktop/src/desktop-title.vala b/plugins/desktop/src/desktop-title.vala
new file mode 100644
index 0000000..dadf137
--- /dev/null
+++ b/plugins/desktop/src/desktop-title.vala
@@ -0,0 +1,13 @@
+// This file is part of GNOME Games. License: GPLv3
+
+public class Games.DesktopTitle : Object, Title {
+       private DesktopAppInfo app_info;
+
+       public DesktopTitle (DesktopAppInfo app_info) {
+               this.app_info = app_info;
+       }
+
+       public string get_title () throws Error {
+               return app_info.get_name ();
+       }
+}


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