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