[glom] ImageGlom: Add commented-out code to load PDFs from memory.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] ImageGlom: Add commented-out code to load PDFs from memory.
- Date: Tue, 19 Jul 2011 07:44:38 +0000 (UTC)
commit 132f3877f94305d15d03cd08ccc0bc33e6fc50b7
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Jul 19 09:43:21 2011 +0200
ImageGlom: Add commented-out code to load PDFs from memory.
* glom/utility_widgets/imageglom.cc: This needs new API in bug #654832
ChangeLog | 6 ++++++
glom/utility_widgets/imageglom.cc | 15 +++++++++++++++
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 65f8662..82b88c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-19 Murray Cumming <murrayc murrayc com>
+
+ ImageGlom: Add commented-out code to load PDFs from memory.
+
+ * glom/utility_widgets/imageglom.cc: This needs new API in bug #654832
+
2011-07-15 Murray Cumming <murrayc murrayc com>
ImageGlom: Save temp files as read-only to avoid unexpected data loss.
diff --git a/glom/utility_widgets/imageglom.cc b/glom/utility_widgets/imageglom.cc
index 86f545e..d528797 100644
--- a/glom/utility_widgets/imageglom.cc
+++ b/glom/utility_widgets/imageglom.cc
@@ -330,6 +330,21 @@ void ImageGlom::show_image_data()
gtk_widget_show(GTK_WIDGET(m_ev_view));
gtk_container_add(GTK_CONTAINER(m_frame.gobj()), GTK_WIDGET(m_ev_view));
+ // Try loading from data in memory:
+ // TODO: Uncomment this if this API is added: https://bugzilla.gnome.org/show_bug.cgi?id=654832
+ /*
+ const GdaBinary* gda_binary = gda_value_get_binary(m_original_data.gobj());
+ if(!gda_binary || !gda_binary->data || !gda_binary->binary_length)
+ {
+ std::cerr << G_STRFUNC << "Data was null or empty." << std::endl;
+ return;
+ }
+
+ EvJob *job = ev_job_load_new_with_data(
+ (char*)gda_binary->data, gda_binary->binary_length);
+ */
+ //TODO: Test failure asynchronously.
+
const Glib::ustring uri = save_to_temp_file(false /* don't show progress */);
if(uri.empty())
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]