[ease] [export] Fix image paths in HTML export.
- From: Nate Stedman <natesm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease] [export] Fix image paths in HTML export.
- Date: Sat, 3 Jul 2010 23:02:04 +0000 (UTC)
commit 37726e7bf286f301df918507986e320040198680
Author: Nate Stedman <natesm gmail com>
Date: Sat Jul 3 19:01:38 2010 -0400
[export] Fix image paths in HTML export.
src/ease-html-exporter.vala | 12 ++++++++++++
src/ease-image-element.vala | 2 +-
src/ease-slide.vala | 2 +-
3 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/ease-html-exporter.vala b/src/ease-html-exporter.vala
index eee6d72..6bebd64 100644
--- a/src/ease-html-exporter.vala
+++ b/src/ease-html-exporter.vala
@@ -36,6 +36,18 @@ public class Ease.HTMLExporter : GLib.Object
public string path { get; private set; }
/**
+ * The final path component of the export path.
+ */
+ public string basename
+ {
+ owned get
+ {
+ var file = File.new_for_path(path);
+ return file.get_basename();
+ }
+ }
+
+ /**
* Creates a new HTMLExporter.
*/
public HTMLExporter()
diff --git a/src/ease-image-element.vala b/src/ease-image-element.vala
index ef0941e..0ea502f 100644
--- a/src/ease-image-element.vala
+++ b/src/ease-image-element.vala
@@ -62,7 +62,7 @@ public class Ease.ImageElement : MediaElement
html += " position: absolute;\" ";
// add the image
- html += "src=\"" + exporter.path + " " +
+ html += "src=\"" + exporter.basename + " " +
data.get("filename") + "\" alt=\"Image\" />";
// copy the image file
diff --git a/src/ease-slide.vala b/src/ease-slide.vala
index 5e18a33..469a98a 100644
--- a/src/ease-slide.vala
+++ b/src/ease-slide.vala
@@ -247,7 +247,7 @@ public class Ease.Slide : GLib.Object
html += ">";
// add the background image
- html += "<img src=\"" + exporter.path + " " + background_image +
+ html += "<img src=\"" + exporter.basename + " " + background_image +
"\" alt=\"Background\" width=\"" +
parent.width.to_string() + "\" height=\"" +
parent.height.to_string() + "\"/>";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]