From 1f4ac35278149c6044e9312be84a32b15c699a37 Mon Sep 17 00:00:00 2001 From: luxick Date: Sat, 29 Feb 2020 23:49:27 +0100 Subject: [PATCH] Application icon as embedded resource --- EstusShots.Gtk/EstusShots.Gtk.csproj | 7 ++++--- EstusShots.Gtk/MainWindow.cs | 6 +++++- EstusShots.Gtk/MainWindow.glade | 1 - 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/EstusShots.Gtk/EstusShots.Gtk.csproj b/EstusShots.Gtk/EstusShots.Gtk.csproj index 28dd21b..90bcc60 100644 --- a/EstusShots.Gtk/EstusShots.Gtk.csproj +++ b/EstusShots.Gtk/EstusShots.Gtk.csproj @@ -10,9 +10,10 @@ %(Filename)%(Extension) - - Always - + + + %(Filename)%(Extension) + diff --git a/EstusShots.Gtk/MainWindow.cs b/EstusShots.Gtk/MainWindow.cs index a8e364a..ccc0bd7 100644 --- a/EstusShots.Gtk/MainWindow.cs +++ b/EstusShots.Gtk/MainWindow.cs @@ -1,8 +1,10 @@ using EstusShots.Client; using EstusShots.Gtk.Controls; using EstusShots.Shared.Dto; +using Gdk; using Gtk; using UI = Gtk.Builder.ObjectAttribute; +using Window = Gtk.Window; namespace EstusShots.Gtk { @@ -30,7 +32,9 @@ namespace EstusShots.Gtk Client = new EstusShotsClient(ApiUrl); DeleteEvent += Window_DeleteEvent; - + + Icon = Pixbuf.LoadFromResource("icon.png"); + // Call initialization code of each page InitSeasonsPage(); InitEpisodesPage(); diff --git a/EstusShots.Gtk/MainWindow.glade b/EstusShots.Gtk/MainWindow.glade index dae02fc..85c7b00 100644 --- a/EstusShots.Gtk/MainWindow.glade +++ b/EstusShots.Gtk/MainWindow.glade @@ -41,7 +41,6 @@ Estus Shots 800 600 - Icons/icon.png