Point to the right location for the avatars on Linux

This commit is contained in:
Hylke Bons 2012-02-23 01:25:50 +01:00
parent ec532c612e
commit 758bfe62a9
17 changed files with 44 additions and 30 deletions

View file

@ -150,9 +150,10 @@ namespace SparkleLib {
"sparkleshare." + email + ".key.pub"
);
SparkleUser user = new SparkleUser (name, email) {
PublicKey = File.ReadAllText (pubkey_file_path)
};
SparkleUser user = new SparkleUser (name, email);
if (File.Exists (pubkey_file_path))
user.PublicKey = File.ReadAllText (pubkey_file_path);
return user;
}

View file

@ -326,38 +326,38 @@
<Content Include="..\..\data\icons\avatar-default.png">
<Link>Pixmaps\avatar-default.png</Link>
</Content>
<Content Include="..\..\data\icons\avatar-1.png">
<Link>Pixmaps\avatar-1.png</Link>
<Content Include="..\..\data\icons\avatar-a.png">
<Link>Pixmaps\avatar-a.png</Link>
</Content>
<Content Include="..\..\data\icons\avatar-2.png">
<Link>Pixmaps\avatar-2.png</Link>
<Content Include="..\..\data\icons\avatar-b.png">
<Link>Pixmaps\avatar-b.png</Link>
</Content>
<Content Include="..\..\data\icons\avatar-3.png">
<Link>Pixmaps\avatar-3.png</Link>
<Content Include="..\..\data\icons\avatar-c.png">
<Link>Pixmaps\avatar-c.png</Link>
</Content>
<Content Include="..\..\data\icons\avatar-4.png">
<Link>Pixmaps\avatar-4.png</Link>
<Content Include="..\..\data\icons\avatar-d.png">
<Link>Pixmaps\avatar-d.png</Link>
</Content>
<Content Include="..\..\data\icons\avatar-5.png">
<Link>Pixmaps\avatar-5.png</Link>
<Content Include="..\..\data\icons\avatar-e.png">
<Link>Pixmaps\avatar-e.png</Link>
</Content>
<Content Include="..\..\data\icons\avatar-6.png">
<Link>Pixmaps\avatar-6.png</Link>
<Content Include="..\..\data\icons\avatar-f.png">
<Link>Pixmaps\avatar-f.png</Link>
</Content>
<Content Include="..\..\data\icons\avatar-7.png">
<Link>Pixmaps\avatar-7.png</Link>
<Content Include="..\..\data\icons\avatar-g.png">
<Link>Pixmaps\avatar-g.png</Link>
</Content>
<Content Include="..\..\data\icons\avatar-8.png">
<Link>Pixmaps\avatar-8.png</Link>
<Content Include="..\..\data\icons\avatar-h.png">
<Link>Pixmaps\avatar-h.png</Link>
</Content>
<Content Include="..\..\data\icons\avatar-9.png">
<Link>Pixmaps\avatar-9.png</Link>
<Content Include="..\..\data\icons\avatar-i.png">
<Link>Pixmaps\avatar-i.png</Link>
</Content>
<Content Include="..\..\data\icons\avatar-10.png">
<Link>Pixmaps\avatar-10.png</Link>
<Content Include="..\..\data\icons\avatar-j.png">
<Link>Pixmaps\avatar-j.png</Link>
</Content>
<Content Include="..\..\data\icons\avatar-11.png">
<Link>Pixmaps\avatar-11.png</Link>
<Content Include="..\..\data\icons\avatar-k.png">
<Link>Pixmaps\avatar-k.png</Link>
</Content>
</ItemGroup>
<ItemGroup>

View file

@ -1154,8 +1154,9 @@ namespace SparkleShare {
string hash = "0" + GetMD5 (s).Substring (0, 8);
string numbers = Regex.Replace (hash, "[a-z]", "");
int number = int.Parse (numbers);
string letters = "abcdefghijklmnopqrstuvwxyz";
return "avatar-" + (number % 11) + ".png";
return "avatar-" + letters [(number % 11)] + ".png";
}

View file

@ -233,9 +233,8 @@ namespace SparkleShare {
html = html.Replace ("<!-- $day-entry-header-background-color -->", SparkleUIHelpers.GdkColorToHex (Style.Background (StateType.Normal)));
html = html.Replace ("<!-- $secondary-font-color -->", SparkleUIHelpers.GdkColorToHex (Style.Foreground (StateType.Insensitive)));
html = html.Replace ("<!-- $small-color -->", SparkleUIHelpers.GdkColorToHex (Style.Foreground (StateType.Insensitive)));
html = html.Replace ("<!-- $no-buddy-icon-background-image -->", "file://" +
new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "32x32", "status", "avatar-default.png"}.Combine ());
html = html.Replace ("<!-- $pixmaps-path -->", "file://" +
new string [] {SparkleUI.AssetsPath, "pixmaps"}.Combine ());
html = html.Replace ("<!-- $document-added-background-image -->", "file://" +
new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-added.png"}.Combine ());
@ -249,6 +248,8 @@ namespace SparkleShare {
new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-moved.png"}.Combine ());
Console.WriteLine (html);
Application.Invoke (delegate {
this.spinner.Stop ();
this.web_view.LoadString (html, null, null, "file://");

View file

@ -9,6 +9,17 @@ dist_pixmaps_DATA = \
tutorial-slide-2.png \
tutorial-slide-3.png \
tutorial-slide-4.png \
avatar-a.png \
avatar-b.png \
avatar-c.png \
avatar-d.png \
avatar-e.png \
avatar-f.png \
avatar-g.png \
avatar-h.png \
avatar-i.png \
avatar-j.png \
avatar-k.png \
about.png
pixmapsdir = $(pkgdatadir)/pixmaps/

View file

Before

Width:  |  Height:  |  Size: 650 B

After

Width:  |  Height:  |  Size: 650 B

View file

Before

Width:  |  Height:  |  Size: 751 B

After

Width:  |  Height:  |  Size: 751 B

View file

Before

Width:  |  Height:  |  Size: 989 B

After

Width:  |  Height:  |  Size: 989 B

View file

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 720 B

View file

Before

Width:  |  Height:  |  Size: 753 B

After

Width:  |  Height:  |  Size: 753 B

View file

Before

Width:  |  Height:  |  Size: 912 B

After

Width:  |  Height:  |  Size: 912 B

View file

Before

Width:  |  Height:  |  Size: 771 B

After

Width:  |  Height:  |  Size: 771 B

View file

Before

Width:  |  Height:  |  Size: 780 B

After

Width:  |  Height:  |  Size: 780 B

View file

Before

Width:  |  Height:  |  Size: 666 B

After

Width:  |  Height:  |  Size: 666 B

View file

Before

Width:  |  Height:  |  Size: 735 B

After

Width:  |  Height:  |  Size: 735 B

View file

Before

Width:  |  Height:  |  Size: 669 B

After

Width:  |  Height:  |  Size: 669 B

View file

@ -24,7 +24,7 @@ app_theme_icons = \
places,folder-sparkleshare-256.png \
places,folder-sparkleshare-32.png \
places,folder-sparkleshare-48.png \
status,sparkleshare-syncing-error-24.png \
status,sparkleshare-syncing-error-24.png \
status,avatar-default-16.png \
status,avatar-default-22.png \
status,avatar-default-24.png \