339 lines
12 KiB
Diff
339 lines
12 KiB
Diff
--- ./configure.ac.orig 2014-10-15 21:13:04.606242700 +0200
|
|
+++ ./configure.ac 2014-10-15 21:12:41.831837900 +0200
|
|
@@ -99,10 +99,7 @@
|
|
EOG_MODULES="gtk+-3.0 >= $GTK_REQUIRED \
|
|
glib-2.0 >= $GLIB_REQUIRED \
|
|
gio-2.0 >= $GLIB_REQUIRED \
|
|
- gio-unix-2.0 >= $GLIB_REQUIRED \
|
|
- gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED \
|
|
gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED \
|
|
- gtk+-unix-print-3.0 >= $GTK_PRINT_REQUIRED \
|
|
shared-mime-info >= $SHARED_MIME_INFO_REQUIRED \
|
|
gsettings-desktop-schemas >= $DESKTOP_SCHEMAS_REQUIRED \
|
|
libpeas-1.0 >= $LIBPEAS_REQUIRED \
|
|
--- ./plugins/Makefile.am.orig 2014-10-15 21:50:19.103082700 +0200
|
|
+++ ./plugins/Makefile.am 2014-10-15 21:50:24.535568300 +0200
|
|
@@ -8,7 +8,7 @@
|
|
$(WARN_CFLAGS) \
|
|
-DEOG_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
|
|
|
|
-AM_LDFLAGS = -avoid-version -module
|
|
+AM_LDFLAGS = -avoid-version -module -no-undefined
|
|
|
|
plugins_LTLIBRARIES = \
|
|
fullscreen/libfullscreen.la \
|
|
--- ./src/eog-exif-util.c.orig 2014-10-15 21:41:01.724101400 +0200
|
|
+++ ./src/eog-exif-util.c 2014-10-15 21:43:48.547715900 +0200
|
|
@@ -61,7 +61,13 @@
|
|
struct tm tm;
|
|
|
|
memset (&tm, '\0', sizeof (tm));
|
|
- strptime ("2008:12:24 20:30:45", "%Y:%m:%d %T", &tm);
|
|
+ tm.tm_year = 2008-1900;
|
|
+ tm.tm_mon = 12-1;
|
|
+ tm.tm_mday = 24;
|
|
+ tm.tm_hour = 20;
|
|
+ tm.tm_min = 30;
|
|
+ tm.tm_sec = 45;
|
|
+ mktime(&tm);
|
|
/* Check if tm.tm_wday is set to Wednesday (3) now */
|
|
return GBOOLEAN_TO_POINTER (tm.tm_wday == 3);
|
|
}
|
|
--- ./src/eog-file-chooser.c.orig 2014-10-15 21:23:06.089315300 +0200
|
|
+++ ./src/eog-file-chooser.c 2014-10-15 21:26:12.133979800 +0200
|
|
@@ -28,21 +28,12 @@
|
|
#include <gio/gio.h>
|
|
#include <gtk/gtk.h>
|
|
|
|
-/* We must define GNOME_DESKTOP_USE_UNSTABLE_API to be able
|
|
- to use GnomeDesktopThumbnail */
|
|
-#ifndef GNOME_DESKTOP_USE_UNSTABLE_API
|
|
-#define GNOME_DESKTOP_USE_UNSTABLE_API
|
|
-#endif
|
|
-#include <libgnome-desktop/gnome-desktop-thumbnail.h>
|
|
-
|
|
static char *last_dir[] = { NULL, NULL, NULL, NULL };
|
|
|
|
#define FILE_FORMAT_KEY "file-format"
|
|
|
|
struct _EogFileChooserPrivate
|
|
{
|
|
- GnomeDesktopThumbnailFactory *thumb_factory;
|
|
-
|
|
GtkWidget *image;
|
|
GtkWidget *size_label;
|
|
GtkWidget *dim_label;
|
|
@@ -58,9 +49,6 @@
|
|
|
|
priv = EOG_FILE_CHOOSER (object)->priv;
|
|
|
|
- if (priv->thumb_factory != NULL)
|
|
- g_object_unref (priv->thumb_factory);
|
|
-
|
|
(* G_OBJECT_CLASS (eog_file_chooser_parent_class)->finalize) (object);
|
|
}
|
|
|
|
@@ -345,54 +333,6 @@
|
|
0, NULL, NULL);
|
|
g_object_unref (file);
|
|
|
|
- if ((file_info != NULL) && (priv->thumb_factory != NULL)
|
|
- && g_file_info_get_file_type (file_info) != G_FILE_TYPE_SPECIAL) {
|
|
- guint64 mtime;
|
|
-
|
|
- mtime = g_file_info_get_attribute_uint64 (file_info,
|
|
- G_FILE_ATTRIBUTE_TIME_MODIFIED);
|
|
- thumb_path = gnome_desktop_thumbnail_factory_lookup (priv->thumb_factory, uri, mtime);
|
|
-
|
|
- if (thumb_path != NULL && g_file_test (thumb_path, G_FILE_TEST_EXISTS)) {
|
|
- /* try to load and display preview thumbnail */
|
|
- pixbuf = gdk_pixbuf_new_from_file (thumb_path, NULL);
|
|
- } else if (g_file_info_get_size (file_info) <= 100000) {
|
|
- /* read files smaller than 100kb directly */
|
|
-
|
|
- gchar *mime_type = g_content_type_get_mime_type (
|
|
- g_file_info_get_content_type (file_info));
|
|
-
|
|
-
|
|
- if (G_LIKELY (mime_type)) {
|
|
- gboolean can_thumbnail, has_failed;
|
|
-
|
|
- can_thumbnail = gnome_desktop_thumbnail_factory_can_thumbnail (
|
|
- priv->thumb_factory,
|
|
- uri, mime_type, mtime);
|
|
- has_failed = gnome_desktop_thumbnail_factory_has_valid_failed_thumbnail (
|
|
- priv->thumb_factory,
|
|
- uri, mtime);
|
|
-
|
|
- if (G_LIKELY (can_thumbnail && !has_failed))
|
|
- pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (
|
|
- priv->thumb_factory, uri, mime_type);
|
|
-
|
|
- g_free (mime_type);
|
|
- }
|
|
- }
|
|
-
|
|
- if (pixbuf != NULL) {
|
|
- have_preview = TRUE;
|
|
-
|
|
- set_preview_pixbuf (EOG_FILE_CHOOSER (file_chooser), pixbuf,
|
|
- g_file_info_get_size (file_info));
|
|
-
|
|
- if (pixbuf != NULL) {
|
|
- g_object_unref (pixbuf);
|
|
- }
|
|
- }
|
|
- }
|
|
-
|
|
if (thumb_path != NULL) {
|
|
g_free (thumb_path);
|
|
}
|
|
@@ -432,8 +372,6 @@
|
|
gtk_file_chooser_set_preview_widget (GTK_FILE_CHOOSER (widget), vbox);
|
|
gtk_file_chooser_set_preview_widget_active (GTK_FILE_CHOOSER (widget), FALSE);
|
|
|
|
- priv->thumb_factory = gnome_desktop_thumbnail_factory_new (GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL);
|
|
-
|
|
g_signal_connect (widget, "update-preview",
|
|
G_CALLBACK (update_preview_cb), NULL);
|
|
}
|
|
--- ./src/eog-print-image-setup.c.orig 2014-10-15 21:29:24.313215400 +0200
|
|
+++ ./src/eog-print-image-setup.c 2014-10-15 21:28:50.077094000 +0200
|
|
@@ -24,7 +24,6 @@
|
|
#endif
|
|
|
|
#include <gtk/gtk.h>
|
|
-#include <gtk/gtkunixprint.h>
|
|
|
|
#include <glib/gi18n.h>
|
|
#include <glib/gprintf.h>
|
|
--- ./src/eog-thumbnail.c.orig 2014-10-15 21:34:09.854404100 +0200
|
|
+++ ./src/eog-thumbnail.c 2014-10-15 21:33:50.708534500 +0200
|
|
@@ -26,20 +26,12 @@
|
|
#include <config.h>
|
|
#endif
|
|
|
|
-/* We must define GNOME_DESKTOP_USE_UNSTABLE_API to be able
|
|
- to use GnomeDesktopThumbnail */
|
|
-#ifndef GNOME_DESKTOP_USE_UNSTABLE_API
|
|
-#define GNOME_DESKTOP_USE_UNSTABLE_API
|
|
-#endif
|
|
-#include <libgnome-desktop/gnome-desktop-thumbnail.h>
|
|
-
|
|
#include "eog-thumbnail.h"
|
|
#include "eog-list-store.h"
|
|
#include "eog-debug.h"
|
|
|
|
#define EOG_THUMB_ERROR eog_thumb_error_quark ()
|
|
|
|
-static GnomeDesktopThumbnailFactory *factory = NULL;
|
|
static GdkPixbuf *frame = NULL;
|
|
|
|
typedef enum {
|
|
@@ -96,12 +88,6 @@
|
|
/* does a thumbnail under the path exists? */
|
|
if (data->thumb_exists) {
|
|
thumb = gdk_pixbuf_new_from_file (data->thumb_path, error);
|
|
-
|
|
- /* is this thumbnail file up to date? */
|
|
- if (thumb != NULL && !gnome_desktop_thumbnail_is_valid (thumb, data->uri_str, data->mtime)) {
|
|
- g_object_unref (thumb);
|
|
- thumb = NULL;
|
|
- }
|
|
}
|
|
|
|
return thumb;
|
|
@@ -116,18 +102,12 @@
|
|
gint width, height;
|
|
gfloat perc;
|
|
|
|
- g_assert (factory != NULL);
|
|
-
|
|
width = gdk_pixbuf_get_width (pixbuf);
|
|
height = gdk_pixbuf_get_height (pixbuf);
|
|
|
|
perc = CLAMP (128.0/(MAX (width, height)), 0, 1);
|
|
|
|
- thumb = gnome_desktop_thumbnail_scale_down_pixbuf (pixbuf,
|
|
- width*perc,
|
|
- height*perc);
|
|
-
|
|
- return thumb;
|
|
+ return NULL;
|
|
}
|
|
|
|
static void
|
|
@@ -156,7 +136,7 @@
|
|
data = g_slice_new0 (EogThumbData);
|
|
|
|
data->uri_str = g_file_get_uri (file);
|
|
- data->thumb_path = gnome_desktop_thumbnail_path_for_uri (data->uri_str, GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL);
|
|
+ data->thumb_path = NULL;
|
|
|
|
file_info = g_file_query_info (file,
|
|
G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE ","
|
|
@@ -444,7 +424,7 @@
|
|
width = MAX (width * factor, 1);
|
|
height = MAX (height * factor, 1);
|
|
|
|
- result_pixbuf = gnome_desktop_thumbnail_scale_down_pixbuf (thumbnail, width, height);
|
|
+ result_pixbuf = NULL;
|
|
|
|
return result_pixbuf;
|
|
}
|
|
@@ -480,59 +460,14 @@
|
|
if (data == NULL)
|
|
return NULL;
|
|
|
|
- if (!data->can_read ||
|
|
- (data->failed_thumb_exists && gnome_desktop_thumbnail_factory_has_valid_failed_thumbnail (factory, data->uri_str, data->mtime))) {
|
|
- eog_debug_message (DEBUG_THUMBNAIL, "%s: bad permissions or valid failed thumbnail present",data->uri_str);
|
|
- set_thumb_error (error, EOG_THUMB_ERROR_GENERIC, "Thumbnail creation failed");
|
|
- return NULL;
|
|
- }
|
|
-
|
|
- /* check if there is already a valid cached thumbnail */
|
|
- thumb = get_valid_thumbnail (data, error);
|
|
-
|
|
- if (thumb != NULL) {
|
|
- eog_debug_message (DEBUG_THUMBNAIL, "%s: loaded from cache",data->uri_str);
|
|
- } else if (gnome_desktop_thumbnail_factory_can_thumbnail (factory, data->uri_str, data->mime_type, data->mtime)) {
|
|
- /* Only use the image pixbuf when it is up to date. */
|
|
- if (!eog_image_is_file_changed (image))
|
|
- pixbuf = eog_image_get_pixbuf (image);
|
|
-
|
|
- if (pixbuf != NULL) {
|
|
- /* generate a thumbnail from the in-memory image,
|
|
- if we have already loaded the image */
|
|
- eog_debug_message (DEBUG_THUMBNAIL, "%s: creating from pixbuf",data->uri_str);
|
|
- thumb = create_thumbnail_from_pixbuf (data, pixbuf, error);
|
|
- g_object_unref (pixbuf);
|
|
- } else {
|
|
- /* generate a thumbnail from the file */
|
|
- eog_debug_message (DEBUG_THUMBNAIL, "%s: creating from file",data->uri_str);
|
|
- thumb = gnome_desktop_thumbnail_factory_generate_thumbnail (factory, data->uri_str, data->mime_type);
|
|
- }
|
|
-
|
|
- if (thumb != NULL) {
|
|
- /* Save the new thumbnail */
|
|
- gnome_desktop_thumbnail_factory_save_thumbnail (factory, thumb, data->uri_str, data->mtime);
|
|
- eog_debug_message (DEBUG_THUMBNAIL, "%s: normal thumbnail saved",data->uri_str);
|
|
- } else {
|
|
- /* Save a failed thumbnail, to stop further thumbnail attempts */
|
|
- gnome_desktop_thumbnail_factory_create_failed_thumbnail (factory, data->uri_str, data->mtime);
|
|
- eog_debug_message (DEBUG_THUMBNAIL, "%s: failed thumbnail saved",data->uri_str);
|
|
- set_thumb_error (error, EOG_THUMB_ERROR_GENERIC, "Thumbnail creation failed");
|
|
- }
|
|
- }
|
|
-
|
|
eog_thumb_data_free (data);
|
|
|
|
- return thumb;
|
|
+ return NULL;
|
|
}
|
|
|
|
void
|
|
eog_thumbnail_init (void)
|
|
{
|
|
- if (factory == NULL) {
|
|
- factory = gnome_desktop_thumbnail_factory_new (GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL);
|
|
- }
|
|
-
|
|
if (frame == NULL) {
|
|
frame = gdk_pixbuf_new_from_file (EOG_DATA_DIR "/pixmaps/thumbnail-frame.png", NULL);
|
|
}
|
|
--- ./src/eog-window.c.orig 2014-10-15 21:36:22.923368200 +0200
|
|
+++ ./src/eog-window.c 2014-10-15 21:39:29.278752400 +0200
|
|
@@ -68,7 +68,6 @@
|
|
#include <glib/gi18n.h>
|
|
#include <gio/gio.h>
|
|
#include <gdk/gdkkeysyms.h>
|
|
-#include <gio/gdesktopappinfo.h>
|
|
#include <gtk/gtk.h>
|
|
|
|
#include <libpeas/peas-extension-set.h>
|
|
--- ./src/Makefile.am.orig 2014-10-15 21:46:54.750243900 +0200
|
|
+++ ./src/Makefile.am 2014-10-16 20:30:25.278428300 +0200
|
|
@@ -186,21 +186,21 @@
|
|
eog-resources.c \
|
|
$(MARSHAL_OUTPUT)
|
|
|
|
-eog-resources.c: eog.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir)/data --generate-dependencies eog.gresource.xml)
|
|
- $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) "$<" --target=$@ \
|
|
+eog-resources.c: eog.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir)/data --generate-dependencies $(srcdir)/eog.gresource.xml)
|
|
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/eog.gresource.xml --target=$(srcdir)/$@ \
|
|
--sourcedir=$(top_srcdir)/data --c-name _eog --generate-source
|
|
|
|
eog-enum-types.h: eog-enum-types.h.template $(INST_H_FILES) $(GLIB_MKENUMS)
|
|
- $(AM_V_GEN)(cd $(srcdir) && $(GLIB_MKENUMS) --template eog-enum-types.h.template $(INST_H_FILES)) > $@
|
|
+ $(AM_V_GEN)(cd $(srcdir) && $(GLIB_MKENUMS) --template eog-enum-types.h.template $(INST_H_FILES)) > $(srcdir)/$@
|
|
|
|
eog-enum-types.c: eog-enum-types.c.template $(INST_H_FILES) $(GLIB_MKENUMS)
|
|
- $(AM_V_GEN)(cd $(srcdir) && $(GLIB_MKENUMS) --template eog-enum-types.c.template $(INST_H_FILES)) > $@
|
|
+ $(AM_V_GEN)(cd $(srcdir) && $(GLIB_MKENUMS) --template eog-enum-types.c.template $(INST_H_FILES)) > $(srcdir)/$@
|
|
|
|
eog-marshal.h: eog-marshal.list $(GLIB_GENMARSHAL)
|
|
- $(AM_V_GEN)$(GLIB_GENMARSHAL) $< --header --internal --prefix=eog_marshal > $@
|
|
+ $(AM_V_GEN)$(GLIB_GENMARSHAL) $(srcdir)/eog-marshal.list --header --internal --prefix=eog_marshal > $(srcdir)/$@
|
|
|
|
eog-marshal.c: eog-marshal.list $(GLIB_GENMARSHAL)
|
|
- $(AM_V_GEN)$(GLIB_GENMARSHAL) $< --body --header --prefix=eog_marshal > $@
|
|
+ $(AM_V_GEN)$(GLIB_GENMARSHAL) $(srcdir)/eog-marshal.list --body --header --prefix=eog_marshal > $(srcdir)/$@
|
|
|
|
EXTRA_DIST = \
|
|
eog.gresource.xml \
|
|
@@ -215,11 +215,11 @@
|
|
INTROSPECTION_GIRS = Eog-3.0.gir
|
|
INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) --warn-all $(libeog_la_CPPFLAGS)
|
|
|
|
-Eog-3.0.gir: eog
|
|
+Eog-3.0.gir: eog.exe
|
|
Eog_3_0_gir_INCLUDES = Gtk-3.0
|
|
Eog_3_0_gir_FILES = $(INST_H_FILES) $(libeog_c_files) $(BUILT_SOURCES)
|
|
Eog_3_0_gir_VERSION = 3.0
|
|
-Eog_3_0_gir_PROGRAM = $(builddir)/eog
|
|
+Eog_3_0_gir_PROGRAM = $(builddir)/eog.exe
|
|
Eog_3_0_gir_NAMESPACE = Eog
|
|
Eog_3_0_gir_CFLAGS = $(EOG_CFLAGS)
|
|
girdir = $(datadir)/eog/gir-1.0
|