commit
84b3fd1365
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -12,6 +12,7 @@
|
||||||
*.sln.cache
|
*.sln.cache
|
||||||
*.user
|
*.user
|
||||||
*.resources
|
*.resources
|
||||||
|
Makecache
|
||||||
Makefile.in
|
Makefile.in
|
||||||
Makefile
|
Makefile
|
||||||
intltool-*
|
intltool-*
|
||||||
|
|
|
@ -103,7 +103,7 @@ namespace SparkleShare {
|
||||||
Xalign = 0, Xpad = 0
|
Xalign = 0, Xpad = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
if (InstallationInfo.Directory.StartsWith ("/app", StringComparison.InvariantCulture))
|
if (InstallationInfo.IsFlatpak)
|
||||||
version.Text += " (Flatpak)";
|
version.Text += " (Flatpak)";
|
||||||
|
|
||||||
updates = new Label ("Checking for updates…") {
|
updates = new Label ("Checking for updates…") {
|
||||||
|
|
|
@ -98,7 +98,10 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public override void OpenFile (string path)
|
public override void OpenFile (string path)
|
||||||
{
|
{
|
||||||
Global.ShowUri (Gdk.Screen.Default, path);
|
if (InstallationInfo.IsFlatpak)
|
||||||
|
Global.ShowUri (Gdk.Screen.Default, path);
|
||||||
|
else
|
||||||
|
new Command ("xdg-open", string.Format ("\"{0}\"", path)).Start ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -230,6 +230,7 @@ namespace SparkleShare {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 0612
|
||||||
string uri = (decision as NavigationPolicyDecision).Request.Uri;
|
string uri = (decision as NavigationPolicyDecision).Request.Uri;
|
||||||
|
|
||||||
if (uri.Equals ("file:///")) {
|
if (uri.Equals ("file:///")) {
|
||||||
|
|
|
@ -120,3 +120,4 @@ namespace SparkleShare
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,5 +95,12 @@ namespace Sparkles {
|
||||||
return version.Substring (0, version.Length - 2);
|
return version.Substring (0, version.Length - 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static bool IsFlatpak {
|
||||||
|
get {
|
||||||
|
return Directory.StartsWith ("/app", StringComparison.InvariantCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue