linux: adjust paths
This commit is contained in:
parent
744dcc4483
commit
7254769a4b
|
@ -32,7 +32,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public override string PluginsPath {
|
public override string PluginsPath {
|
||||||
get {
|
get {
|
||||||
return SparkleHelpers.CombineMore (Defines.DATAROOTDIR, "sparkleshare", "plugins");
|
return SparkleHelpers.CombineMore (Defines.INSTALL_DIR, "plugins");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,11 +157,8 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public override string EventLogHTML {
|
public override string EventLogHTML {
|
||||||
get {
|
get {
|
||||||
string html_path = new string [] { Defines.PREFIX, "share",
|
string html_path = new string [] { Defines.INSTALL_DIR, "html", "event-log.html" }.Combine ();
|
||||||
"sparkleshare", "html", "event-log.html" }.Combine ();
|
string jquery_file_path = new string [] { Defines.INSTALL_DIR, "html", "jquery.js" }.Combine ();
|
||||||
|
|
||||||
string jquery_file_path = new string [] { Defines.PREFIX, "share",
|
|
||||||
"sparkleshare", "html", "jquery.js" }.Combine ();
|
|
||||||
|
|
||||||
string html = File.ReadAllText (html_path);
|
string html = File.ReadAllText (html_path);
|
||||||
string jquery = File.ReadAllText (jquery_file_path);
|
string jquery = File.ReadAllText (jquery_file_path);
|
||||||
|
@ -173,9 +170,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public override string DayEntryHTML {
|
public override string DayEntryHTML {
|
||||||
get {
|
get {
|
||||||
string path = new string [] { Defines.PREFIX, "share",
|
string path = new string [] { Defines.INSTALL_DIR, "html", "day-entry.html" }.Combine ();
|
||||||
"sparkleshare", "html", "day-entry.html" }.Combine ();
|
|
||||||
|
|
||||||
return File.ReadAllText (path);
|
return File.ReadAllText (path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -183,9 +178,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public override string EventEntryHTML {
|
public override string EventEntryHTML {
|
||||||
get {
|
get {
|
||||||
string path = new string [] {Defines.PREFIX,
|
string path = new string [] { Defines.INSTALL_DIR, "html", "event-entry.html" }.Combine ();
|
||||||
"share", "sparkleshare", "html", "event-entry.html"}.Combine ();
|
|
||||||
|
|
||||||
return File.ReadAllText (path);
|
return File.ReadAllText (path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -199,8 +192,8 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public override void OpenFile (string path)
|
public override void OpenFile (string path)
|
||||||
{
|
{
|
||||||
Process process = new Process ();
|
Process process = new Process ();
|
||||||
process.StartInfo.FileName = "xdg-open";
|
process.StartInfo.FileName = "xdg-open";
|
||||||
process.StartInfo.Arguments = "\"" + path + "\"";
|
process.StartInfo.Arguments = "\"" + path + "\"";
|
||||||
process.Start ();
|
process.Start ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace SparkleShare {
|
||||||
public static SparkleSetup Setup;
|
public static SparkleSetup Setup;
|
||||||
public static SparkleAbout About;
|
public static SparkleAbout About;
|
||||||
|
|
||||||
public static string AssetsPath = new string [] { Defines.PREFIX, "share", "sparkleshare" }.Combine ();
|
public static string AssetsPath = Defines.INSTALL_DIR;
|
||||||
|
|
||||||
|
|
||||||
public SparkleUI ()
|
public SparkleUI ()
|
||||||
|
|
|
@ -41,13 +41,10 @@ namespace SparkleShare {
|
||||||
{
|
{
|
||||||
IconTheme icon_theme = new IconTheme ();
|
IconTheme icon_theme = new IconTheme ();
|
||||||
|
|
||||||
icon_theme.AppendSearchPath (
|
icon_theme.AppendSearchPath (Path.Combine (SparkleUI.AssetsPath, "icons"));
|
||||||
Path.Combine (SparkleUI.AssetsPath, "icons")
|
|
||||||
);
|
|
||||||
|
|
||||||
icon_theme.AppendSearchPath (
|
icon_theme.AppendSearchPath (
|
||||||
Path.Combine (Path.GetDirectoryName (SparkleConfig.DefaultConfig.FullPath), "icons")
|
Path.Combine (Path.GetDirectoryName (SparkleConfig.DefaultConfig.FullPath), "icons"));
|
||||||
);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return icon_theme.LoadIcon (name, size, IconLookupFlags.GenericFallback);
|
return icon_theme.LoadIcon (name, size, IconLookupFlags.GenericFallback);
|
||||||
|
@ -65,9 +62,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public static Image GetImage (string name)
|
public static Image GetImage (string name)
|
||||||
{
|
{
|
||||||
string image_path = SparkleHelpers.CombineMore (Defines.DATAROOTDIR, "sparkleshare",
|
string image_path = SparkleHelpers.CombineMore (Defines.INSTALL_DIR, "pixmaps", name);
|
||||||
"pixmaps", name);
|
|
||||||
|
|
||||||
return new Image (image_path);
|
return new Image (image_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue