Commit 132f3877 authored by Murray Cumming's avatar Murray Cumming
Browse files

ImageGlom: Add commented-out code to load PDFs from memory.

* glom/utility_widgets/imageglom.cc: This needs new API in bug #654832
parent 232a2663
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.
......
......@@ -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())
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment