[PATCH] xpdf 3.04 debian package: added options to set outline pane width
don't know if you're interested, i added a simple option to set outline
pane size via xpdfrc:
(i had to, because i've got an hidpi panel, and bigger fonts, so side
panel fixed was too narrow and expanding it by default was imho not so good)
outlinePaneSize 175
175 is the actual default, i'm actually using a value double than that
i saw that original xpdf is no longer developped as X app, so i wrote
directly to deb mantainer(s), being you, i think, hoping not to annoy
bye and thanx
Paul
--
"Capitano Long Horn! Nessun Sistema Operativo in Vista!!"
diff -urN xpdf-3.04/xpdf/GlobalParams.cc xpdf-3.04_PTT/xpdf/GlobalParams.cc
--- xpdf-3.04/xpdf/GlobalParams.cc 2017-11-10 18:39:23.000000000 +0100
+++ xpdf-3.04_PTT/xpdf/GlobalParams.cc 2017-11-10 15:28:53.428261578 +0100
@@ -765,6 +765,7 @@
*/
initialZoom = new GString("125");
continuousView = gFalse;
+ outlinePaneSize = 175;
/*
enableFreeType = gTrue;
disableFreeTypeHinting = gFalse;
@@ -1156,6 +1157,8 @@
parseInitialZoom(tokens, fileName, line);
} else if (!cmd->cmp("continuousView")) {
parseYesNo("continuousView", &continuousView, tokens, fileName, line);
+ } else if (!cmd->cmp("outlinePaneSize")) {
+ parseInteger("outlinePaneSize", &outlinePaneSize, tokens, fileName, line);
/*
} else if (!cmd->cmp("enableFreeType")) {
parseYesNo("enableFreeType", &enableFreeType, tokens, fileName, line);
@@ -2761,6 +2764,15 @@
return f;
}
+int GlobalParams::getOutlinePaneSize() {
+ int size;
+
+ lockGlobalParams;
+ size = outlinePaneSize;
+ unlockGlobalParams;
+ return size;
+}
+
/*
GBool GlobalParams::getEnableFreeType() {
@@ -3265,6 +3277,12 @@
unlockGlobalParams;
}
+void GlobalParams::setOutlinePaneSize(int size) {
+ lockGlobalParams;
+ outlinePaneSize = size;
+ unlockGlobalParams;
+}
+
/*
GBool GlobalParams::setEnableFreeType(char *s) {
diff -urN xpdf-3.04/xpdf/GlobalParams.h xpdf-3.04_PTT/xpdf/GlobalParams.h
--- xpdf-3.04/xpdf/GlobalParams.h 2017-11-10 18:39:23.000000000 +0100
+++ xpdf-3.04_PTT/xpdf/GlobalParams.h 2017-11-10 16:35:24.232360532 +0100
@@ -244,6 +244,7 @@
*/
GString *getInitialZoom();
GBool getContinuousView();
+ int getOutlinePaneSize();
/*
GBool getEnableFreeType();
GBool getDisableFreeTypeHinting();
@@ -315,6 +316,7 @@
*/
void setInitialZoom(char *s);
void setContinuousView(GBool cont);
+ void setOutlinePaneSize(int size);
/*
GBool setEnableFreeType(char *s);
*/
@@ -477,6 +479,7 @@
*/
GString *initialZoom; // initial zoom level
GBool continuousView; // continuous view mode
+ int outlinePaneSize; // side panel size
/*
GBool enableFreeType; // FreeType enable flag
GBool disableFreeTypeHinting; // FreeType hinting disable flag
diff -urN xpdf-3.04/xpdf/XPDFViewer.cc xpdf-3.04_PTT/xpdf/XPDFViewer.cc
--- xpdf-3.04/xpdf/XPDFViewer.cc 2017-11-10 18:39:23.000000000 +0100
+++ xpdf-3.04_PTT/xpdf/XPDFViewer.cc 2017-11-10 16:37:15.756363298 +0100
@@ -274,7 +274,7 @@
#ifndef DISABLE_OUTLINE
outlineLabels = NULL;
outlineLabelsLength = outlineLabelsSize = 0;
- outlinePaneWidth = 175;
+ outlinePaneWidth = xpdfParams->getOutlinePaneSize();
#endif
// do Motif-specific initialization and create the window;
Reply to: