summaryrefslogtreecommitdiff
path: root/office/epdfview/epdfview-0.1.6-print-segfault.patch
diff options
context:
space:
mode:
authorAndrew Brouwers <abrouwers@gmail.com>2010-05-11 19:46:12 +0200
committerMichiel van Wessem <michiel@slackbuilds.org>2010-05-11 19:46:12 +0200
commit1b16cd5b7609f111008e5c85c21871b95b24e664 (patch)
treeb350c89bb0814bcc1e9dfcf2476d607e72b2b5f8 /office/epdfview/epdfview-0.1.6-print-segfault.patch
parent19789fc59d5e3360daeb69c7886740abda0a4efe (diff)
downloadslackbuilds-1b16cd5b7609f111008e5c85c21871b95b24e664.tar.gz
office/epdfview: Updated for version 0.1.6
Diffstat (limited to 'office/epdfview/epdfview-0.1.6-print-segfault.patch')
-rw-r--r--office/epdfview/epdfview-0.1.6-print-segfault.patch95
1 files changed, 95 insertions, 0 deletions
diff --git a/office/epdfview/epdfview-0.1.6-print-segfault.patch b/office/epdfview/epdfview-0.1.6-print-segfault.patch
new file mode 100644
index 0000000000..498febbd5f
--- /dev/null
+++ b/office/epdfview/epdfview-0.1.6-print-segfault.patch
@@ -0,0 +1,95 @@
+--- src/PrintPter.cxx (revision 262)
++++ src/PrintPter.cxx (revision 281)
+@@ -231,17 +231,24 @@
+ view.clearPageSizeList ();
+ int pageSizeToSelect = 0;
+- ppd_choice_t *pageSizeChoice = pageSizeOption->choices;
+- for ( int currentSize = 0 ;
+- currentSize < pageSizeOption->num_choices ;
+- ++currentSize, ++pageSizeChoice )
+- {
+- const gchar *sizeName = pageSizeChoice->text;
+- const gchar *sizeValue = pageSizeChoice->choice;
+-
+- view.addPageSize (_(sizeName), sizeValue);
+- if ( pageSizeChoice->marked )
++ if ( 0 != pageSizeOption )
++ {
++ ppd_choice_t *pageSizeChoice = pageSizeOption->choices;
++ for ( int currentSize = 0 ;
++ currentSize < pageSizeOption->num_choices ;
++ ++currentSize, ++pageSizeChoice )
+ {
+- pageSizeToSelect = currentSize;
++ const gchar *sizeName = pageSizeChoice->text;
++ const gchar *sizeValue = pageSizeChoice->choice;
++
++ view.addPageSize (_(sizeName), sizeValue);
++ if ( pageSizeChoice->marked )
++ {
++ pageSizeToSelect = currentSize;
++ }
+ }
++ }
++ else
++ {
++ view.addPageSize (_("A4"), "A4");
+ }
+ view.selectPageSize (pageSizeToSelect);
+@@ -252,17 +259,24 @@
+ view.clearResolutionList ();
+ int resolutionToSelect = 0;
+- ppd_choice_t *resolutionChoice = resolutionOption->choices;
+- for ( int currentRes = 0 ;
+- currentRes < resolutionOption->num_choices ;
+- ++currentRes, ++resolutionChoice )
+- {
+- const gchar *resName = resolutionChoice->text;
+- const gchar *resValue = resolutionChoice->choice;
+-
+- view.addResolution (_(resName), resValue);
+- if ( resolutionChoice->marked )
++ if ( 0 != resolutionOption )
++ {
++ ppd_choice_t *resolutionChoice = resolutionOption->choices;
++ for ( int currentRes = 0 ;
++ currentRes < resolutionOption->num_choices ;
++ ++currentRes, ++resolutionChoice )
+ {
+- resolutionToSelect = currentRes;
++ const gchar *resName = resolutionChoice->text;
++ const gchar *resValue = resolutionChoice->choice;
++
++ view.addResolution (_(resName), resValue);
++ if ( resolutionChoice->marked )
++ {
++ resolutionToSelect = currentRes;
++ }
+ }
++ }
++ else
++ {
++ view.addResolution (_("300 DPI"), "300x300dpi");
+ }
+ view.selectResolution (resolutionToSelect);
+@@ -272,7 +286,7 @@
+ ppdFindOption (printerPPD, "ColorModel");
+ view.clearColorModelList ();
++ int colorModelToSelect = 0;
+ if ( NULL != colorModelOption )
+ {
+- int colorModelToSelect = 0;
+ ppd_choice_t *colorModelChoice = colorModelOption->choices;
+ for ( int currentColor = 0 ;
+@@ -289,5 +303,4 @@
+ }
+ }
+- view.selectColorModel (colorModelToSelect);
+ }
+ else
+@@ -295,4 +308,5 @@
+ view.addColorModel (_("Grayscale"), "Gray");
+ }
++ view.selectColorModel (colorModelToSelect);
+ ppdClose (printerPPD);
+ }