linux controller: Fix indentation and change custom icon name
This commit is contained in:
parent
73d483af93
commit
0423b423f9
|
@ -94,27 +94,26 @@ namespace SparkleShare {
|
||||||
// Creates the SparkleShare folder in the user's home folder
|
// Creates the SparkleShare folder in the user's home folder
|
||||||
public override bool CreateSparkleShareFolder ()
|
public override bool CreateSparkleShareFolder ()
|
||||||
{
|
{
|
||||||
bool folder_created = false;
|
bool folder_created = false;
|
||||||
|
|
||||||
if (!Directory.Exists (SparkleConfig.DefaultConfig.FoldersPath)) {
|
if (!Directory.Exists (SparkleConfig.DefaultConfig.FoldersPath)) {
|
||||||
Directory.CreateDirectory (SparkleConfig.DefaultConfig.FoldersPath);
|
Directory.CreateDirectory (SparkleConfig.DefaultConfig.FoldersPath);
|
||||||
Syscall.chmod (SparkleConfig.DefaultConfig.FoldersPath, (FilePermissions) 448); // 448 -> 700
|
Syscall.chmod (SparkleConfig.DefaultConfig.FoldersPath, (FilePermissions) 448); // 448 -> 700
|
||||||
|
|
||||||
SparkleLogger.LogInfo ("Controller", "Created '" + SparkleConfig.DefaultConfig.FoldersPath + "'");
|
SparkleLogger.LogInfo ("Controller", "Created '" + SparkleConfig.DefaultConfig.FoldersPath + "'");
|
||||||
folder_created = true;
|
folder_created = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
string gvfs_command_path = new string [] { Path.VolumeSeparatorChar.ToString (),
|
string gvfs_command_path = new string [] { Path.VolumeSeparatorChar.ToString (),
|
||||||
"usr", "bin", "gvfs-set-attribute" }.Combine ();
|
"usr", "bin", "gvfs-set-attribute" }.Combine ();
|
||||||
|
|
||||||
// Add a special icon to the SparkleShare folder
|
// Add a special icon to the SparkleShare folder
|
||||||
if (File.Exists (gvfs_command_path)) {
|
if (File.Exists (gvfs_command_path)) {
|
||||||
Process process = new Process ();
|
var process = new Process ();
|
||||||
process.StartInfo.FileName = "gvfs-set-attribute";
|
|
||||||
|
|
||||||
// Give the SparkleShare folder an icon name, so that it scales
|
process.StartInfo.FileName = "gvfs-set-attribute";
|
||||||
process.StartInfo.Arguments = SparkleConfig.DefaultConfig.FoldersPath +
|
process.StartInfo.Arguments = SparkleConfig.DefaultConfig.FoldersPath +
|
||||||
" metadata::custom-icon-name 'sparkleshare'";
|
" metadata::custom-icon-name 'folder-sparkleshare'";
|
||||||
|
|
||||||
process.Start ();
|
process.Start ();
|
||||||
process.WaitForExit ();
|
process.WaitForExit ();
|
||||||
|
|
Loading…
Reference in a new issue