commit
84b3fd1365
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -12,6 +12,7 @@
|
|||
*.sln.cache
|
||||
*.user
|
||||
*.resources
|
||||
Makecache
|
||||
Makefile.in
|
||||
Makefile
|
||||
intltool-*
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace SparkleShare {
|
|||
Xalign = 0, Xpad = 0
|
||||
};
|
||||
|
||||
if (InstallationInfo.Directory.StartsWith ("/app", StringComparison.InvariantCulture))
|
||||
if (InstallationInfo.IsFlatpak)
|
||||
version.Text += " (Flatpak)";
|
||||
|
||||
updates = new Label ("Checking for updates…") {
|
||||
|
|
|
@ -98,7 +98,10 @@ namespace SparkleShare {
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
#pragma warning disable 0612
|
||||
string uri = (decision as NavigationPolicyDecision).Request.Uri;
|
||||
|
||||
if (uri.Equals ("file:///")) {
|
||||
|
|
|
@ -120,3 +120,4 @@ namespace SparkleShare
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -95,5 +95,12 @@ namespace Sparkles {
|
|||
return version.Substring (0, version.Length - 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static bool IsFlatpak {
|
||||
get {
|
||||
return Directory.StartsWith ("/app", StringComparison.InvariantCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue