linux: Fix custom folder icon in Nautilus
|
@ -6,21 +6,21 @@ system_themedir = $(datadir)/icons/$(theme)
|
|||
app_themedir = $(pkgdatadir)/icons/$(theme)
|
||||
|
||||
system_theme_icons = \
|
||||
apps,folder-sparkleshare-16.png \
|
||||
apps,folder-sparkleshare-22.png \
|
||||
apps,folder-sparkleshare-24.png \
|
||||
apps,folder-sparkleshare-256.png \
|
||||
apps,folder-sparkleshare-32.png \
|
||||
apps,folder-sparkleshare-48.png
|
||||
apps,sparkleshare-16.png \
|
||||
apps,sparkleshare-22.png \
|
||||
apps,sparkleshare-24.png \
|
||||
apps,sparkleshare-256.png \
|
||||
apps,sparkleshare-32.png \
|
||||
apps,sparkleshare-48.png
|
||||
|
||||
app_theme_icons = \
|
||||
animations,process-working-22.png \
|
||||
places,folder-sparkleshare-16.png \
|
||||
places,folder-sparkleshare-22.png \
|
||||
places,folder-sparkleshare-24.png \
|
||||
places,folder-sparkleshare-256.png \
|
||||
places,folder-sparkleshare-32.png \
|
||||
places,folder-sparkleshare-48.png \
|
||||
places,sparkleshare-16.png \
|
||||
places,sparkleshare-22.png \
|
||||
places,sparkleshare-24.png \
|
||||
places,sparkleshare-256.png \
|
||||
places,sparkleshare-32.png \
|
||||
places,sparkleshare-48.png \
|
||||
status,process-syncing-i-24.png \
|
||||
status,process-syncing-ii-24.png \
|
||||
status,process-syncing-iii-24.png \
|
||||
|
|
Before Width: | Height: | Size: 689 B After Width: | Height: | Size: 689 B |
Before Width: | Height: | Size: 926 B After Width: | Height: | Size: 926 B |
Before Width: | Height: | Size: 926 B After Width: | Height: | Size: 926 B |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
@ -120,38 +120,35 @@ namespace SparkleShare {
|
|||
// Creates the SparkleShare folder in the user's home folder
|
||||
public override bool CreateSparkleShareFolder ()
|
||||
{
|
||||
bool folder_created = false;
|
||||
|
||||
if (!Directory.Exists (SparkleConfig.DefaultConfig.FoldersPath)) {
|
||||
Directory.CreateDirectory (SparkleConfig.DefaultConfig.FoldersPath);
|
||||
SparkleLogger.LogInfo ("Controller", "Created '" + SparkleConfig.DefaultConfig.FoldersPath + "'");
|
||||
|
||||
folder_created = true;
|
||||
}
|
||||
|
||||
string gvfs_command_path = new string [] { Path.VolumeSeparatorChar.ToString (),
|
||||
"usr", "bin", "gvfs-set-attribute" }.Combine ();
|
||||
string gvfs_command_path = new string [] { Path.VolumeSeparatorChar.ToString (),
|
||||
"usr", "bin", "gvfs-set-attribute" }.Combine ();
|
||||
|
||||
// Add a special icon to the SparkleShare folder
|
||||
if (File.Exists (gvfs_command_path)) {
|
||||
Process process = new Process ();
|
||||
process.StartInfo.FileName = "gvfs-set-attribute";
|
||||
|
||||
// Add a special icon to the SparkleShare folder
|
||||
if (File.Exists (gvfs_command_path)) {
|
||||
Process process = new Process ();
|
||||
process.StartInfo.UseShellExecute = false;
|
||||
process.StartInfo.FileName = "gvfs-set-attribute";
|
||||
process.Start ();
|
||||
process.WaitForExit ();
|
||||
|
||||
// Clear the custom (legacy) icon path
|
||||
process.StartInfo.Arguments = "-t unset " +
|
||||
SparkleConfig.DefaultConfig.FoldersPath + " metadata::custom-icon";
|
||||
// Give the SparkleShare folder an icon name, so that it scales
|
||||
process.StartInfo.Arguments = SparkleConfig.DefaultConfig.FoldersPath +
|
||||
" metadata::custom-icon-name 'sparkleshare'";
|
||||
|
||||
process.Start ();
|
||||
process.WaitForExit ();
|
||||
|
||||
// Give the SparkleShare folder an icon name, so that it scales
|
||||
process.StartInfo.Arguments = SparkleConfig.DefaultConfig.FoldersPath +
|
||||
" metadata::custom-icon-name 'folder-sparkleshare'";
|
||||
|
||||
process.Start ();
|
||||
process.WaitForExit ();
|
||||
}
|
||||
|
||||
return true;
|
||||
process.Start ();
|
||||
process.WaitForExit ();
|
||||
}
|
||||
|
||||
return false;
|
||||
return folder_created;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ namespace SparkleShare {
|
|||
this.menu.Add (new SeparatorMenuItem ());
|
||||
|
||||
ImageMenuItem folder_item = new SparkleMenuItem ("SparkleShare"){
|
||||
Image = new Image (SparkleUIHelpers.GetIcon ("folder-sparkleshare", 16))
|
||||
Image = new Image (SparkleUIHelpers.GetIcon ("sparkleshare", 16))
|
||||
};
|
||||
|
||||
folder_item.Activated += delegate {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Type=Application
|
||||
Name=SparkleShare
|
||||
Exec=sparkleshare start
|
||||
Icon=folder-sparkleshare
|
||||
Icon=sparkleshare
|
||||
Terminal=false
|
||||
X-GNOME-Autostart-enabled=true
|
||||
Categories=Network;
|
||||
|
|
|
@ -65,6 +65,7 @@ namespace SparkleShare {
|
|||
return message = string.Format (message, change_set.Changes [0].Path);
|
||||
|
||||
} else if (change_set.Changes.Count > 1) {
|
||||
message = string.Format (message, change_set.Changes [0].Path);
|
||||
return string.Format (message + " and {0} more", change_set.Changes.Count - 1);
|
||||
|
||||
} else {
|
||||
|
|