add emblem support. but it doesn't work...

This commit is contained in:
Hylke Bons 2010-05-08 16:41:54 +01:00
parent b93ffb0d51
commit dd2a1d4621
6 changed files with 23 additions and 12 deletions

View file

@ -22,6 +22,7 @@ uninstall:
rm /usr/share/icons/hicolor/*x*/places/folder-sparkleshare.png 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/document-*ed.png
rm /usr/share/icons/hicolor/*x*/status/avatar-default.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 rm ~/.config/autostart/sparkleshare.desktop
clean: clean:

View file

@ -63,10 +63,10 @@ namespace SparkleShare {
Size + "x" + Size, Size + "x" + Size,
"status", "status",
"avatar-default.png"); "avatar-default.png");
if (File.Exists (FallbackFileName)) if (File.Exists (AvatarPath + Email))
return FallbackFileName; return AvatarPath + Email;
else else
return ""; return FallbackFileName;
} }

View file

View file

@ -105,7 +105,6 @@ namespace SparkleShare {
FetchTimer.Interval = 20000; FetchTimer.Interval = 20000;
FetchTimer.Elapsed += delegate { FetchTimer.Elapsed += delegate {
Fetch (); Fetch ();
}; };
FetchTimer.Start(); FetchTimer.Start();

View file

@ -32,14 +32,15 @@
<Reference Include="System" /> <Reference Include="System" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="SparkleShare.cs" />
<Compile Include="SparkleRepo.cs" />
<Compile Include="SparkleUI.cs" />
<Compile Include="SparkleStatusIcon.cs" />
<Compile Include="SparkleWindow.cs" />
<Compile Include="SparkleBubble.cs" /> <Compile Include="SparkleBubble.cs" />
<Compile Include="SparkleSpinner.cs" />
<Compile Include="SparklePaths.cs" />
<Compile Include="SparkleHelpers.cs" /> <Compile Include="SparkleHelpers.cs" />
<Compile Include="SparklePaths.cs" />
<Compile Include="SparklePlatform.cs" />
<Compile Include="SparkleRepo.cs" />
<Compile Include="SparkleShare.cs" />
<Compile Include="SparkleSpinner.cs" />
<Compile Include="SparkleStatusIcon.cs" />
<Compile Include="SparkleUI.cs" />
<Compile Include="SparkleWindow.cs" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -44,6 +44,7 @@ namespace SparkleShare {
Directory.CreateDirectory (SparklePath); Directory.CreateDirectory (SparklePath);
Console.WriteLine ("[Config] Created '" + SparklePath + "'"); Console.WriteLine ("[Config] Created '" + SparklePath + "'");
// Linux/GNOME specific
Process.StartInfo.FileName = "gvfs-set-attribute"; Process.StartInfo.FileName = "gvfs-set-attribute";
Process.StartInfo.Arguments = SparklePath + Process.StartInfo.Arguments = SparklePath +
" metadata::custom-icon " + " metadata::custom-icon " +
@ -51,7 +52,7 @@ namespace SparkleShare {
"48x48/places/" + "48x48/places/" +
"folder-sparkleshare.png"; "folder-sparkleshare.png";
Process.Start(); Process.Start();
} }
// Create place to store configuration user's home folder // Create place to store configuration user's home folder
@ -76,6 +77,15 @@ namespace SparkleShare {
foreach (string Folder in Repos) { foreach (string Folder in Repos) {
Repositories [i] = new SparkleRepo (Folder); Repositories [i] = new SparkleRepo (Folder);
i++; 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 // Don't create the window and status