[glom/gtkmm4v3: 5/21] Comment out use of evince_view.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/gtkmm4v3: 5/21] Comment out use of evince_view.
- Date: Tue, 14 Mar 2017 09:43:59 +0000 (UTC)
commit da2a67d8e24d3db41a29a69921093e78fb98b34e
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Dec 16 16:47:28 2016 +0100
Comment out use of evince_view.
Until there is a version that uses GTK+4.
configure.ac | 2 +-
glom/main.cc | 4 ++--
glom/utility_widgets/imageglom.cc | 26 +++++++++++++++++++-------
glom/utility_widgets/imageglom.h | 8 ++++----
4 files changed, 26 insertions(+), 14 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index bb8e9b3..e737c7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -169,7 +169,7 @@ AS_IF([test "x$glom_host_win32" != xyes],
[REQUIRED_LIBGLOM_LIBS="$REQUIRED_LIBGLOM_LIBS libepc-2.0 >= 0.4.0"])
# Libraries used by Glom:
-REQUIRED_GLOM_LIBS="$REQUIRED_LIBGLOM_LIBS gtkmm-4.0 >= 3.18.0 goocanvasmm-3.0 >= 1.90.11 evince-view-3.0"
+REQUIRED_GLOM_LIBS="$REQUIRED_LIBGLOM_LIBS gtkmm-4.0 >= 3.18.0 goocanvasmm-3.0 >= 1.90.11"
# Do not require iso-codes in client-only mode, or on Windows:
# TODO: Package iso-codes for Windows?
diff --git a/glom/main.cc b/glom/main.cc
index b8d4b90..dd3feea 100644
--- a/glom/main.cc
+++ b/glom/main.cc
@@ -62,7 +62,7 @@
#include <glom/application.h>
#include <glom/utils_ui.h>
-#include <evince-view.h>
+//#include <evince-view.h>>
#include <gtkmm/main.h>
@@ -499,7 +499,7 @@ main(int argc, char* argv[])
Goocanvas::init();
#endif //!GLOM_ENABLE_CLIENT_ONLY
- ev_init();
+ //ev_init();
#ifdef GLOM_ENABLE_POSTGRESQL
diff --git a/glom/utility_widgets/imageglom.cc b/glom/utility_widgets/imageglom.cc
index d1074de..ce35cd9 100644
--- a/glom/utility_widgets/imageglom.cc
+++ b/glom/utility_widgets/imageglom.cc
@@ -49,16 +49,16 @@ ImageGlom::type_vec_ustrings ImageGlom::m_evince_supported_mime_types;
ImageGlom::type_vec_ustrings ImageGlom::m_gdkpixbuf_supported_mime_types;
ImageGlom::ImageGlom()
-: m_ev_view(nullptr),
- m_ev_document_model(nullptr)
+//: m_ev_view(nullptr),
+ //m_ev_document_model(nullptr)
{
init();
}
ImageGlom::ImageGlom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& /* builder */)
-: Gtk::EventBox(cobject),
+: Gtk::EventBox(cobject) /*,
m_ev_view(nullptr),
- m_ev_document_model(nullptr)
+ m_ev_document_model(nullptr) */
{
init();
}
@@ -70,14 +70,16 @@ void ImageGlom::clear_image_from_widgets()
m_image->set(Glib::RefPtr<Gdk::Pixbuf>()); //TODO: Add an unset() to gtkmm.
}
+ /*
if(m_ev_document_model)
{
g_object_unref(m_ev_document_model);
m_ev_document_model = nullptr;
}
+ */
}
-void ImageGlom::init_widgets(bool use_evince)
+void ImageGlom::init_widgets(bool /* use_evince */)
{
clear_image_from_widgets();
@@ -85,6 +87,7 @@ void ImageGlom::init_widgets(bool use_evince)
Gtk::Widget* widget = nullptr;
+ /*
if(use_evince)
{
if(!m_ev_view)
@@ -110,14 +113,17 @@ void ImageGlom::init_widgets(bool use_evince)
widget = m_ev_scrolled_window.get();
}
else
+ */
{
m_image = std::make_unique<Gtk::Image>();
+ /*
if(m_ev_view)
{
gtk_widget_destroy(GTK_WIDGET(m_ev_view));
m_ev_view = nullptr;
m_ev_scrolled_window.reset();
}
+ */
widget = m_image.get();
}
@@ -248,6 +254,7 @@ void ImageGlom::on_size_allocate(Gtk::Allocation& allocation)
}
}
+/*
static void image_glom_ev_job_finished(EvJob* job, void* user_data)
{
g_assert(job);
@@ -274,6 +281,7 @@ void ImageGlom::on_ev_job_finished(EvJob* job)
//TODO: Show that we are no longer loading.
//ev_view_set_loading(m_ev_view, FALSE);
}
+*/
const GdaBinary* ImageGlom::get_binary() const
{
@@ -319,6 +327,7 @@ void ImageGlom::fill_evince_supported_mime_types()
if(!m_evince_supported_mime_types.empty())
return;
+/*
//Discover what mime types libevview can support.
//Older versions supported image types too, via GdkPixbuf,
//but that support was then removed.
@@ -343,6 +352,7 @@ void ImageGlom::fill_evince_supported_mime_types()
//std::cout << "evince supported mime_type=" << mime_type << std::endl;
}
}
+*/
}
void ImageGlom::fill_gdkpixbuf_supported_mime_types()
@@ -396,7 +406,8 @@ void ImageGlom::show_image_data()
*/
//TODO: Test failure asynchronously.
- const auto uri = save_to_temp_file(false /* don't show progress */);
+ /*
+ const auto uri = save_to_temp_file(false / don't show progress /);
if(uri.empty())
{
std::cerr << G_STRFUNC << "Could not save temp file to show in the EvView.\n";
@@ -414,6 +425,7 @@ void ImageGlom::show_image_data()
g_signal_connect (job, "finished",
G_CALLBACK (image_glom_ev_job_finished), this);
ev_job_scheduler_push_job (job, EV_JOB_PRIORITY_NONE);
+ */
}
else
{
@@ -673,7 +685,7 @@ static void set_file_filter_images(Gtk::FileChooser& file_chooser)
filter->add_pixbuf_formats();
file_chooser.add_filter(filter);
- ev_document_factory_add_filters(GTK_WIDGET(file_chooser.gobj()), nullptr);
+ //ev_document_factory_add_filters(GTK_WIDGET(file_chooser.gobj()), nullptr);
//Make Images the currently-selected one:
file_chooser.set_filter(filter);
diff --git a/glom/utility_widgets/imageglom.h b/glom/utility_widgets/imageglom.h
index f6e1715..fef94ee 100644
--- a/glom/utility_widgets/imageglom.h
+++ b/glom/utility_widgets/imageglom.h
@@ -31,7 +31,7 @@
#include <gtkmm/scrolledwindow.h>
#include <giomm/appinfo.h>
#include <giomm/simpleactiongroup.h>
-#include <evince-view.h>
+//#include <evince-view.h>
namespace Glom
{
@@ -60,7 +60,7 @@ public:
void set_read_only(bool read_only = true) override;
- void on_ev_job_finished(EvJob* job);
+ //void on_ev_job_finished(EvJob* job);
private:
void init();
@@ -111,8 +111,8 @@ private:
//For anything supported by Evince:
std::unique_ptr<Gtk::ScrolledWindow> m_ev_scrolled_window;
- EvView* m_ev_view;
- EvDocumentModel* m_ev_document_model;
+ //EvView* m_ev_view;
+ //EvDocumentModel* m_ev_document_model;
//For anything supported by GdkPixbuf,
//or for representative thumbnails and icons:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]