libraries/libgnomeprintui: Patched for building on -current.

Signed-off-by: David Spencer <baildon.research@googlemail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
David Spencer 2015-05-29 17:02:26 +01:00 committed by Willy Sudiarto Raharjo
parent 3d820728f4
commit 465021f37e
3 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,12 @@
diff -up ./configure.in.orig ./configure.in
--- ./configure.in.orig 2014-05-04 11:07:55.308844477 +0300
+++ ./configure.in 2014-05-04 11:08:26.884571685 +0300
@@ -64,7 +64,7 @@ PKG_CHECK_MODULES(LIBGNOMEPRINTUI, [
gtk+-2.0 >= 2.6.0
libgnomeprint-2.2 >= 2.12.1
libgnomecanvas-2.0 >= 1.117.0
- gnome-icon-theme >= 1.1.92
+ adwaita-icon-theme >= 1.1.92
])
AC_SUBST(LIBGNOMEPRINTUI_CFLAGS)
AC_SUBST(LIBGNOMEPRINTUI_LIBS)

View file

@ -0,0 +1,44 @@
--- ./libgnomeprintui/gnome-print-job-preview.c.orig 2012-02-23 22:48:42.000000000 +0600
+++ ./libgnomeprintui/gnome-print-job-preview.c 2012-02-25 00:18:43.000000000 +0600
@@ -152,6 +152,7 @@
GtkWidget *last;
GnomeCanvas *canvas;
GnomePrintConfig *config;
+ guchar *paper_orientation_save;
guint current_page, current_offset;
@@ -2187,6 +2188,19 @@
if (jp->config)
g_object_unref (G_OBJECT (jp->config));
jp->config = config;
+ if( config ) {
+ guchar *txt = gnome_print_config_get( jp->config, (const guchar*)GNOME_PRINT_KEY_PAGE_ORIENTATION );
+ if( ( g_ascii_strcasecmp(( const gchar* )txt, "R90") == 0 ) ||
+ ( g_ascii_strcasecmp(( const gchar* )txt, "R270") == 0 ) ) {
+ jp->paper_orientation_save =
+ gnome_print_config_get( jp->config, (const guchar*)GNOME_PRINT_KEY_PAPER_ORIENTATION );
+ gnome_print_config_set( jp->config, (const guchar*)GNOME_PRINT_KEY_PAPER_ORIENTATION, txt );
+ g_free ( txt );
+ }
+ else {
+ jp->paper_orientation_save = NULL;
+ }
+ }
if (!jp->config)
return;
g_object_ref (G_OBJECT (jp->config));
@@ -2389,6 +2403,13 @@
{
GnomePrintJobPreview *jp = GNOME_PRINT_JOB_PREVIEW (object);
+ if( jp->paper_orientation_save ) {
+ gnome_print_config_set( jp->config, (const guchar*)GNOME_PRINT_KEY_PAPER_ORIENTATION,
+ jp->paper_orientation_save );
+ g_free ( jp->paper_orientation_save );
+ jp->paper_orientation_save = NULL;
+ }
+
gnome_print_job_preview_set_config (jp, NULL);
gnome_print_job_preview_set_job (jp, NULL);

View file

@ -71,6 +71,11 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
# Thanks to Mageia for these patches:
patch -p1 < $CWD/libgnomeprintui-2.18.6-adwaita-icon-theme.patch
patch -p1 < $CWD/libgnomeprintui-2.18.6-orientation-for-preview.patch
autoconf
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \