From dd2a1d4621c8f45829f24f098922fd795edd3ddf Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sat, 8 May 2010 16:41:54 +0100 Subject: [PATCH] add emblem support. but it doesn't work... --- Makefile | 1 + SparkleShare/SparkleHelpers.cs | 6 +++--- SparkleShare/SparklePlatform.cs | 0 SparkleShare/SparkleRepo.cs | 1 - SparkleShare/SparkleShare.csproj | 15 ++++++++------- SparkleShare/SparkleUI.cs | 12 +++++++++++- 6 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 SparkleShare/SparklePlatform.cs diff --git a/Makefile b/Makefile index 1cedc9d7..eb5af11b 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ uninstall: rm /usr/share/icons/hicolor/*x*/places/folder-sparkleshare.png rm /usr/share/icons/hicolor/*x*/status/document-*ed.png rm /usr/share/icons/hicolor/*x*/status/avatar-default.png + rm /usr/share/icons/hicolor/*x*/emblems/emblem-sync*.png rm ~/.config/autostart/sparkleshare.desktop clean: diff --git a/SparkleShare/SparkleHelpers.cs b/SparkleShare/SparkleHelpers.cs index 383f4661..2e260c48 100644 --- a/SparkleShare/SparkleHelpers.cs +++ b/SparkleShare/SparkleHelpers.cs @@ -63,10 +63,10 @@ namespace SparkleShare { Size + "x" + Size, "status", "avatar-default.png"); - if (File.Exists (FallbackFileName)) - return FallbackFileName; + if (File.Exists (AvatarPath + Email)) + return AvatarPath + Email; else - return ""; + return FallbackFileName; } diff --git a/SparkleShare/SparklePlatform.cs b/SparkleShare/SparklePlatform.cs new file mode 100644 index 00000000..e69de29b diff --git a/SparkleShare/SparkleRepo.cs b/SparkleShare/SparkleRepo.cs index 2a16acad..97427157 100644 --- a/SparkleShare/SparkleRepo.cs +++ b/SparkleShare/SparkleRepo.cs @@ -105,7 +105,6 @@ namespace SparkleShare { FetchTimer.Interval = 20000; FetchTimer.Elapsed += delegate { Fetch (); - }; FetchTimer.Start(); diff --git a/SparkleShare/SparkleShare.csproj b/SparkleShare/SparkleShare.csproj index 26ba4147..850607f6 100644 --- a/SparkleShare/SparkleShare.csproj +++ b/SparkleShare/SparkleShare.csproj @@ -32,14 +32,15 @@ - - - - - - - + + + + + + + + diff --git a/SparkleShare/SparkleUI.cs b/SparkleShare/SparkleUI.cs index d22abede..8c6ce988 100644 --- a/SparkleShare/SparkleUI.cs +++ b/SparkleShare/SparkleUI.cs @@ -44,6 +44,7 @@ namespace SparkleShare { Directory.CreateDirectory (SparklePath); Console.WriteLine ("[Config] Created '" + SparklePath + "'"); + // Linux/GNOME specific Process.StartInfo.FileName = "gvfs-set-attribute"; Process.StartInfo.Arguments = SparklePath + " metadata::custom-icon " + @@ -51,7 +52,7 @@ namespace SparkleShare { "48x48/places/" + "folder-sparkleshare.png"; Process.Start(); - + } // Create place to store configuration user's home folder @@ -76,6 +77,15 @@ namespace SparkleShare { foreach (string Folder in Repos) { Repositories [i] = new SparkleRepo (Folder); i++; + + // Linux/GNOME only: attach emblems + Process.StartInfo.FileName = "gvfs-set-attribute"; + Console.WriteLine (Folder); + Process.StartInfo.Arguments = " file://" + Folder + + " metadata::emblems " + + "[synced]"; + Console.WriteLine (Process.StartInfo.Arguments); + Process.Start(); } // Don't create the window and status