Mageia Bugzilla – Attachment 1683 Details for
Bug 4779
Landscape oriented printouts are incorrectly oriented.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
This patch fixes orientation issues for preview.
libgnomeprintui-2.18.6-preview_orientation.patch (text/plain), 1.62 KB, created by
Alexander Zakamaldin
on 2012-03-06 04:11:12 CET
(
hide
)
Description:
This patch fixes orientation issues for preview.
Filename:
MIME Type:
Creator:
Alexander Zakamaldin
Created:
2012-03-06 04:11:12 CET
Size:
1.62 KB
patch
obsolete
>--- ./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); >
--- ./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 Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 4779
:
1682
| 1683 |
1684