From b6b481d7380d7dab6708fff6784d33f66349c7c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Jerna=C5=9B?= Date: Thu, 2 Dec 2010 22:31:35 +0100 Subject: [PATCH] Get data root dif info from configure Also fixes the path to the about dialog pixmap. --- SparkleLib/Defines.cs.in | 1 + SparkleLib/SparklePaths.cs | 2 +- SparkleShare/SparkleDialog.cs | 6 +++--- SparkleShare/SparkleLinController.cs | 4 ++-- SparkleShare/SparkleWindow.cs | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/SparkleLib/Defines.cs.in b/SparkleLib/Defines.cs.in index f5beeba7..7ef0803c 100644 --- a/SparkleLib/Defines.cs.in +++ b/SparkleLib/Defines.cs.in @@ -22,6 +22,7 @@ namespace SparkleLib { public const string VERSION = "@VERSION@"; public const string LOCALE_DIR = "@prefix@/share/locale"; + public const string DATAROOTDIR = "@expanded_datadir@"; public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@"; public const string PREFIX = "@prefix@"; public const string OPEN_COMMAND = "xdg-open"; diff --git a/SparkleLib/SparklePaths.cs b/SparkleLib/SparklePaths.cs index c45adc01..45ed4ff0 100644 --- a/SparkleLib/SparklePaths.cs +++ b/SparkleLib/SparklePaths.cs @@ -40,7 +40,7 @@ namespace SparkleLib { public static string SparkleLocalIconPath = SparkleHelpers.CombineMore (SparkleConfigPath, "icons", "hicolor"); - public static string SparkleIconPath = SparkleHelpers.CombineMore (Defines.PREFIX, "share", "sparkleshare", + public static string SparkleIconPath = SparkleHelpers.CombineMore (Defines.DATAROOTDIR, "sparkleshare", "icons"); diff --git a/SparkleShare/SparkleDialog.cs b/SparkleShare/SparkleDialog.cs index 6189788e..ba2eb681 100644 --- a/SparkleShare/SparkleDialog.cs +++ b/SparkleShare/SparkleDialog.cs @@ -194,9 +194,9 @@ GNU Lesser General Public License for more details."; */ vbox.PackStart (new HSeparator (), false, false, 0); vbox.PackStart (button_bar, false, false, 0); - string image_path = SparkleHelpers.CombineMore (Defines.PREFIX, "share", "pixmaps", - "sparkleshare-about.png"); - + string image_path = SparkleHelpers.CombineMore (Defines.DATAROOTDIR, "sparkleshare", + "pixmaps", "sparkleshare-about.png"); + System.Console.WriteLine(image_path); wrapper.PackStart (new Image (image_path), false, false, 0); wrapper.PackStart (vbox, true, true, 0); diff --git a/SparkleShare/SparkleLinController.cs b/SparkleShare/SparkleLinController.cs index ba26ecae..228278a4 100644 --- a/SparkleShare/SparkleLinController.cs +++ b/SparkleShare/SparkleLinController.cs @@ -146,7 +146,7 @@ namespace SparkleShare { Directory.CreateDirectory (SparklePaths.SparklePath); SparkleHelpers.DebugInfo ("Controller", "Created '" + SparklePaths.SparklePath + "'"); - string icon_file_path = SparkleHelpers.CombineMore (Defines.PREFIX, "share", "icons", "hicolor", + string icon_file_path = SparkleHelpers.CombineMore (Defines.DATAROOTDIR, "icons", "hicolor", "48x48", "apps", "folder-sparkleshare.png"); string gvfs_command_path = SparkleHelpers.CombineMore (Path.VolumeSeparatorChar.ToString (), @@ -196,4 +196,4 @@ namespace SparkleShare { } -} \ No newline at end of file +} diff --git a/SparkleShare/SparkleWindow.cs b/SparkleShare/SparkleWindow.cs index 4860f88a..5183f480 100644 --- a/SparkleShare/SparkleWindow.cs +++ b/SparkleShare/SparkleWindow.cs @@ -48,7 +48,7 @@ namespace SparkleShare { HBox = new HBox (false, 6); - string image_path = SparkleHelpers.CombineMore (Defines.PREFIX, "share", "sparkleshare", + string image_path = SparkleHelpers.CombineMore (Defines.DATAROOTDIR, "sparkleshare", "pixmaps", "side-splash.png"); Image side_splash = new Image (image_path);