epdfview: Sync with Debian 0.1.8-3 patches

This includes the patches in use in Debian package to fix color
inversion and other minor issues.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Otavio Salvador
2012-10-23 19:22:02 +00:00
committed by Koen Kooi
parent 415c49a0c7
commit 9f21b18da3
6 changed files with 101 additions and 14 deletions
@@ -0,0 +1,17 @@
Imported from Debian 0.1.8-3
Upstream-Status: Pending
diff --git a/src/Config.cxx b/src/Config.cxx
index 28f37ab..bc58819 100644
--- a/src/Config.cxx
+++ b/src/Config.cxx
@@ -22,7 +22,7 @@
using namespace ePDFView;
// Constants
-static const gchar *DEFAULT_EXTERNAL_BROWSER_COMMAND_LINE = "firefox %s";
+static const gchar *DEFAULT_EXTERNAL_BROWSER_COMMAND_LINE = "x-www-browser %s";
static const gchar *DEFAULT_OPEN_FILE_FOLDER = NULL;
static const gchar *DEFAULT_SAVE_FILE_FOLDER = NULL;
static const gboolean DEFAULT_SHOW_STATUSBAR = TRUE;
@@ -0,0 +1,19 @@
Imported from Debian 0.1.8-3
Upstream-Status: Pending
diff --git a/src/gtk/MainView.cxx b/src/gtk/MainView.cxx
index b983bff..f87de28 100644
--- a/src/gtk/MainView.cxx
+++ b/src/gtk/MainView.cxx
@@ -634,8 +634,9 @@ MainView::showErrorMessage (const gchar *title, const gchar *body)
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
+ "%s",
title);
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(errorDialog),
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(errorDialog), "%s",
body);
gtk_dialog_run (GTK_DIALOG (errorDialog));
gtk_widget_destroy (errorDialog);
@@ -1,12 +0,0 @@
diff -uNr epdfview-0.1.8.orig/src/gtk/StockIcons.h epdfview-0.1.8/src/gtk/StockIcons.h
--- epdfview-0.1.8.orig/src/gtk/StockIcons.h 2011-05-28 12:24:57.000000000 +0200
+++ epdfview-0.1.8/src/gtk/StockIcons.h 2012-04-30 07:48:08.528285594 +0200
@@ -18,8 +18,6 @@
#if !defined (__STOCK_ICONS_H__)
#define __STOCK_ICONS_H__
-#include <glib/gmacros.h>
-
G_BEGIN_DECLS
// ePDFView stock icons.
@@ -0,0 +1,17 @@
Imported from Debian 0.1.8-3
Upstream-Status: Pending
diff --git a/src/gtk/StockIcons.h b/src/gtk/StockIcons.h
index c142a7a..58fcf2e 100644
--- a/src/gtk/StockIcons.h
+++ b/src/gtk/StockIcons.h
@@ -18,7 +18,7 @@
#if !defined (__STOCK_ICONS_H__)
#define __STOCK_ICONS_H__
-#include <glib/gmacros.h>
+#include <glib.h>
G_BEGIN_DECLS
@@ -0,0 +1,43 @@
Imported from Debian 0.1.8-3
Upstream-Status: Pending
Index: trunk/src/PDFDocument.cxx
===================================================================
--- trunk/src/PDFDocument.cxx (revision 361)
+++ trunk/src/PDFDocument.cxx (revision 367)
@@ -21,4 +21,5 @@
#include <poppler.h>
#include <unistd.h>
+#include <algorithm>
#include "epdfview.h"
@@ -33,4 +34,22 @@
static PageMode convertPageMode (gint pageMode);
static gchar *getAbsoluteFileName (const gchar *fileName);
+
+namespace
+{
+ void
+ convert_bgra_to_rgba (guint8 *data, int width, int height)
+ {
+ using std::swap;
+
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < width; x++)
+ {
+ swap(data[0], data[2]);
+ data += 4;
+ }
+ }
+ }
+}
///
@@ -651,4 +670,5 @@
cairo_destroy(context);
cairo_surface_destroy (surface);
+ convert_bgra_to_rgba(renderedPage->getData (), width, height);
#else // !HAVE_POPPLER_0_17_0
// Create the pixbuf from the data and render to it.
+5 -2
View File
@@ -5,14 +5,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
SECTION = "x11/applications"
DEPENDS = "gtk+ poppler"
PR = "r2"
PR = "r3"
EXTRA_OECONF += "--without-cups"
inherit autotools gettext
SRC_URI = "http://www.emma-soft.com/projects/${BPN}/chrome/site/releases/${BP}.tar.bz2 \
file://glib-2.32.patch \
file://browser_command.patch \
file://fix-format.patch \
file://glib-single-include.patch \
file://swap-colors.patch \
"
SRC_URI[md5sum] = "e50285b01612169b2594fea375f53ae4"
SRC_URI[sha256sum] = "948648ae7c9d7b3b408d738bd4f48d87375b1196cae1129d6b846a8de0f2f8f0"