[gnome-games] desktop: Add DesktopIcon



commit 7126d208c5d0ae690d3965363f1c243308d3f17c
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Wed May 11 18:09:31 2016 +0200

    desktop: Add DesktopIcon
    
    This will be used in subsequent commits to represent desktop games
    icons.

 plugins/desktop/src/Makefile.am       |    1 +
 plugins/desktop/src/desktop-icon.vala |   13 +++++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/plugins/desktop/src/Makefile.am b/plugins/desktop/src/Makefile.am
index 24e023f..3468c31 100644
--- a/plugins/desktop/src/Makefile.am
+++ b/plugins/desktop/src/Makefile.am
@@ -31,6 +31,7 @@ libgames_desktop_plugin_la_DEPENDENCIES = \
 libgames_desktop_plugin_la_SOURCES = \
        desktop-error.vala \
        desktop-game.vala \
+       desktop-icon.vala \
        desktop-plugin.vala \
        desktop-tracker-query.vala \
        $(BUILT_SOURCES) \
diff --git a/plugins/desktop/src/desktop-icon.vala b/plugins/desktop/src/desktop-icon.vala
new file mode 100644
index 0000000..85fb66b
--- /dev/null
+++ b/plugins/desktop/src/desktop-icon.vala
@@ -0,0 +1,13 @@
+// This file is part of GNOME Games. License: GPLv3
+
+public class Games.DesktopIcon : Object, Icon {
+       private DesktopAppInfo app_info;
+
+       public DesktopIcon (DesktopAppInfo app_info) {
+               this.app_info = app_info;
+       }
+
+       public GLib.Icon? get_icon () {
+               return app_info.get_icon ();
+       }
+}


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