[tasque/windows] [icons] Fix icons not found on Windows
- From: Antonius Riha <antoniusri src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tasque/windows] [icons] Fix icons not found on Windows
- Date: Thu, 20 Sep 2012 18:49:32 +0000 (UTC)
commit e8d1c9878e5ee4f2ba5b346282655f39be655850
Author: Antonius Riha <antoniusriha gmail com>
Date: Thu Sep 20 20:48:17 2012 +0200
[icons] Fix icons not found on Windows
* Drop Defines.WIN32.cs: Not needed, since we process Defines.cs.in on Windows too
* Defines.cs.in: Add a GlobalIconsDir path - equivalent to /usr/share/icons on Linux
* GtkApplication.cs: Add the GlobalIconsPath to the default icon theme search path
src/Gtk.Tasque/Defines.WIN32.cs | 41 --------------------------------------
src/Gtk.Tasque/Defines.cs.in | 3 ++
src/Gtk.Tasque/Gtk.Tasque.csproj | 3 +-
src/Gtk.Tasque/GtkApplication.cs | 4 +++
4 files changed, 8 insertions(+), 43 deletions(-)
---
diff --git a/src/Gtk.Tasque/Defines.cs.in b/src/Gtk.Tasque/Defines.cs.in
index 60e23b6..a112e13 100644
--- a/src/Gtk.Tasque/Defines.cs.in
+++ b/src/Gtk.Tasque/Defines.cs.in
@@ -38,5 +38,8 @@ namespace Tasque
public static string LocaleDir = Path.Combine (@"@datadir@", "locale");
public static string IconsDir = Path.Combine (@"@datadir@", "tasque", "icons");
public static string SoundDir = Path.Combine (@"@datadir@", "tasque", "sounds");
+#if WIN
+ public static string GlobalIconsDir = Path.Combine (@"@datadir@", "icons");
+#endif
}
}
diff --git a/src/Gtk.Tasque/Gtk.Tasque.csproj b/src/Gtk.Tasque/Gtk.Tasque.csproj
index 6c63f02..31136af 100644
--- a/src/Gtk.Tasque/Gtk.Tasque.csproj
+++ b/src/Gtk.Tasque/Gtk.Tasque.csproj
@@ -76,7 +76,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
- <TasqueCompile Condition=" '$(Configuration)' == 'WinDebug' Or '$(Configuration)' == 'WinRelease' " Include="Defines.WIN32.cs" />
+ <Compile Include="Defines.cs" />
<TasqueCompile Include="GtkTray.cs" />
<TasqueCompile Include="StatusIconTray.cs" />
<TasqueCompile Condition=" '$(AppIndicator)' != '' " Include="AppIndicatorTray.cs" />
@@ -105,7 +105,6 @@
<TasqueCompile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(Configuration)' == 'LinuxDebug' Or '$(Configuration)' == 'LinuxRelease' ">
- <Compile Include="Defines.cs" />
<TasqueCompile Include="RemoteControl.cs" />
<TasqueCompile Include="RemoteControlProxy.cs" />
</ItemGroup>
diff --git a/src/Gtk.Tasque/GtkApplication.cs b/src/Gtk.Tasque/GtkApplication.cs
index c6925bd..23841c4 100644
--- a/src/Gtk.Tasque/GtkApplication.cs
+++ b/src/Gtk.Tasque/GtkApplication.cs
@@ -50,6 +50,10 @@ namespace Tasque
public virtual void Initialize (string locale_dir, string display_name, string process_name, string[] args)
{
Gtk.Application.Init ();
+
+ // add package icon path to default icon theme search paths
+ Gtk.IconTheme.Default.PrependSearchPath (Defines.IconsDir);
+ Gtk.IconTheme.Default.PrependSearchPath (Defines.GlobalIconsDir);
}
public virtual void InitializeIdle ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]