/[packages]/updates/1/libgnomeprintui/current/SOURCES/libgnomeprintui-2.18.6-orientation-for-preview.patch
ViewVC logotype

Contents of /updates/1/libgnomeprintui/current/SOURCES/libgnomeprintui-2.18.6-orientation-for-preview.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 219578 - (show annotations) (download)
Tue Mar 6 04:42:22 2012 UTC (9 years, 6 months ago) by fwang
Original Path: cauldron/libgnomeprintui/current/SOURCES/libgnomeprintui-2.18.6-orientation-for-preview.patch
File size: 1660 byte(s)
add reporter's patch to fix orientation issues for preview (bug#4779)

1 --- ./libgnomeprintui/gnome-print-job-preview.c.orig 2012-02-23 22:48:42.000000000 +0600
2 +++ ./libgnomeprintui/gnome-print-job-preview.c 2012-02-25 00:18:43.000000000 +0600
3 @@ -152,6 +152,7 @@
4 GtkWidget *last;
5 GnomeCanvas *canvas;
6 GnomePrintConfig *config;
7 + guchar *paper_orientation_save;
8
9 guint current_page, current_offset;
10
11 @@ -2187,6 +2188,19 @@
12 if (jp->config)
13 g_object_unref (G_OBJECT (jp->config));
14 jp->config = config;
15 + if( config ) {
16 + guchar *txt = gnome_print_config_get( jp->config, (const guchar*)GNOME_PRINT_KEY_PAGE_ORIENTATION );
17 + if( ( g_ascii_strcasecmp(( const gchar* )txt, "R90") == 0 ) ||
18 + ( g_ascii_strcasecmp(( const gchar* )txt, "R270") == 0 ) ) {
19 + jp->paper_orientation_save =
20 + gnome_print_config_get( jp->config, (const guchar*)GNOME_PRINT_KEY_PAPER_ORIENTATION );
21 + gnome_print_config_set( jp->config, (const guchar*)GNOME_PRINT_KEY_PAPER_ORIENTATION, txt );
22 + g_free ( txt );
23 + }
24 + else {
25 + jp->paper_orientation_save = NULL;
26 + }
27 + }
28 if (!jp->config)
29 return;
30 g_object_ref (G_OBJECT (jp->config));
31 @@ -2389,6 +2403,13 @@
32 {
33 GnomePrintJobPreview *jp = GNOME_PRINT_JOB_PREVIEW (object);
34
35 + if( jp->paper_orientation_save ) {
36 + gnome_print_config_set( jp->config, (const guchar*)GNOME_PRINT_KEY_PAPER_ORIENTATION,
37 + jp->paper_orientation_save );
38 + g_free ( jp->paper_orientation_save );
39 + jp->paper_orientation_save = NULL;
40 + }
41 +
42 gnome_print_job_preview_set_config (jp, NULL);
43 gnome_print_job_preview_set_job (jp, NULL);
44

  ViewVC Help
Powered by ViewVC 1.1.28