Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 293933
Collapse All | Expand All

(-)xpdf-3.02-poppler.orig/XPDFApp.cc (-1 / +15 lines)
Lines 87-92 struct XPDFAppResources { Link Here
87
  String matteColor;
87
  String matteColor;
88
  String fullScreenMatteColor;
88
  String fullScreenMatteColor;
89
  String initialZoom;
89
  String initialZoom;
90
  String toolbarLocale;
91
  String menuLocale;
90
};
92
};
91
93
92
static Bool defInstallCmap = False;
94
static Bool defInstallCmap = False;
Lines 102-108 static XtResource xResources[] = { Link Here
102
  { "paperColor",           "PaperColor",           XtRString, sizeof(String), XtOffsetOf(XPDFAppResources, paperColor),           XtRString, (XtPointer)NULL             },
104
  { "paperColor",           "PaperColor",           XtRString, sizeof(String), XtOffsetOf(XPDFAppResources, paperColor),           XtRString, (XtPointer)NULL             },
103
  { "matteColor",           "MatteColor",           XtRString, sizeof(String), XtOffsetOf(XPDFAppResources, matteColor),           XtRString, (XtPointer)"gray50"         },
105
  { "matteColor",           "MatteColor",           XtRString, sizeof(String), XtOffsetOf(XPDFAppResources, matteColor),           XtRString, (XtPointer)"gray50"         },
104
  { "fullScreenMatteColor", "FullScreenMatteColor", XtRString, sizeof(String), XtOffsetOf(XPDFAppResources, fullScreenMatteColor), XtRString, (XtPointer)"black"          },
106
  { "fullScreenMatteColor", "FullScreenMatteColor", XtRString, sizeof(String), XtOffsetOf(XPDFAppResources, fullScreenMatteColor), XtRString, (XtPointer)"black"          },
105
  { "initialZoom",          "InitialZoom",          XtRString, sizeof(String), XtOffsetOf(XPDFAppResources, initialZoom),          XtRString, (XtPointer)NULL             }
107
  { "initialZoom",          "InitialZoom",          XtRString, sizeof(String), XtOffsetOf(XPDFAppResources, initialZoom),          XtRString, (XtPointer)NULL             },
108
  { "toolbarLocale",        "ToolbarLocale",        XtRString, sizeof(String), XtOffsetOf(XPDFAppResources, toolbarLocale),        XtRString, (XtPointer)NULL             },
109
  { "menuLocale",           "MenuLocale",           XtRString, sizeof(String), XtOffsetOf(XPDFAppResources, menuLocale),           XtRString, (XtPointer)NULL             }
106
};
110
};
107
111
108
#define nXResources (sizeof(xResources) / sizeof(XtResource))
112
#define nXResources (sizeof(xResources) / sizeof(XtResource))
Lines 205-210 void XPDFApp::getResources() { Link Here
205
  }
209
  }
206
  initialZoom = resources.initialZoom ? new GooString(resources.initialZoom)
210
  initialZoom = resources.initialZoom ? new GooString(resources.initialZoom)
207
                                      : (GooString *)NULL;
211
                                      : (GooString *)NULL;
212
  toolbarLocale = resources.toolbarLocale ? new GooString(resources.toolbarLocale)
213
                                          : (GooString *)NULL;
214
  menuLocale = resources.menuLocale ? new GooString(resources.menuLocale)
215
                                    : (GooString *)NULL;
208
}
216
}
209
217
210
XPDFApp::~XPDFApp() {
218
XPDFApp::~XPDFApp() {
Lines 218-223 XPDFApp::~XPDFApp() { Link Here
218
  if (initialZoom) {
226
  if (initialZoom) {
219
    delete initialZoom;
227
    delete initialZoom;
220
  }
228
  }
229
  if (toolbarLocale) {
230
    delete toolbarLocale;
231
  }
232
  if (menuLocale) {
233
    delete menuLocale;
234
  }
221
}
235
}
222
236
223
XPDFViewer *XPDFApp::open(GooString *fileName, int page,
237
XPDFViewer *XPDFApp::open(GooString *fileName, int page,
(-)xpdf-3.02-poppler.orig/XPDFApp.h (+4 lines)
Lines 76-81 public: Link Here
76
  GooString *getInitialZoom() { return initialZoom; }
76
  GooString *getInitialZoom() { return initialZoom; }
77
  void setFullScreen(GBool fullScreenA) { fullScreen = fullScreenA; }
77
  void setFullScreen(GBool fullScreenA) { fullScreen = fullScreenA; }
78
  GBool getFullScreen() { return fullScreen; }
78
  GBool getFullScreen() { return fullScreen; }
79
  GooString *getToolbarLocale() { return toolbarLocale; }
80
  GooString *getMenuLocale() { return menuLocale; }
79
81
80
  XtAppContext getAppContext() { return appContext; }
82
  XtAppContext getAppContext() { return appContext; }
81
  Widget getAppShell() { return appShell; }
83
  Widget getAppShell() { return appShell; }
Lines 109-114 private: Link Here
109
  Gulong fullScreenMattePixel;
111
  Gulong fullScreenMattePixel;
110
  GooString *initialZoom;
112
  GooString *initialZoom;
111
  GBool fullScreen;
113
  GBool fullScreen;
114
  GooString *toolbarLocale;
115
  GooString *menuLocale;
112
};
116
};
113
117
114
#endif
118
#endif
(-)xpdf-3.02-poppler.orig/XPDFViewer.cc (+11 lines)
Lines 15-20 Link Here
15
#include <stdlib.h>
15
#include <stdlib.h>
16
#include <string.h>
16
#include <string.h>
17
#include <ctype.h>
17
#include <ctype.h>
18
#include <locale.h>
18
#include <X11/keysym.h>
19
#include <X11/keysym.h>
19
#include <X11/cursorfont.h>
20
#include <X11/cursorfont.h>
20
#ifdef HAVE_X11_XPM_H
21
#ifdef HAVE_X11_XPM_H
Lines 1565-1571 void XPDFViewer::initToolbar(Widget pare Link Here
1565
  int n;
1566
  int n;
1566
  XmString s, emptyString;
1567
  XmString s, emptyString;
1567
  int i;
1568
  int i;
1569
  char *saved_locale = NULL;
1568
1570
1571
  if (app->getToolbarLocale()) {
1572
    saved_locale = setlocale(LC_CTYPE, app->getToolbarLocale()->getCString());
1573
  }
1569
  // toolbar
1574
  // toolbar
1570
  n = 0;
1575
  n = 0;
1571
  toolBar = XmCreateForm(parent, "toolBar", args, n);
1576
  toolBar = XmCreateForm(parent, "toolBar", args, n);
Lines 1822-1827 void XPDFViewer::initToolbar(Widget pare Link Here
1822
  XtManageChild(linkLabel);
1827
  XtManageChild(linkLabel);
1823
1828
1824
  XmStringFree(emptyString);
1829
  XmStringFree(emptyString);
1830
  setlocale(LC_CTYPE, saved_locale);
1825
}
1831
}
1826
1832
1827
#ifndef DISABLE_OUTLINE
1833
#ifndef DISABLE_OUTLINE
Lines 1882-1888 void XPDFViewer::initPopupMenu() { Link Here
1882
  Arg args[20];
1888
  Arg args[20];
1883
  int n;
1889
  int n;
1884
  XmString s, s2;
1890
  XmString s, s2;
1891
  char *saved_locale = NULL;
1885
1892
1893
  if (app->getMenuLocale()) {
1894
    saved_locale = setlocale(LC_CTYPE, app->getMenuLocale()->getCString());
1895
  }
1886
  n = 0;
1896
  n = 0;
1887
#if XmVersion < 1002
1897
#if XmVersion < 1002
1888
  // older versions of Motif need this, newer ones choke on it,
1898
  // older versions of Motif need this, newer ones choke on it,
Lines 2008-2013 void XPDFViewer::initPopupMenu() { Link Here
2008
  // this is magic (taken from DDD) - weird things happen if this
2018
  // this is magic (taken from DDD) - weird things happen if this
2009
  // call isn't made
2019
  // call isn't made
2010
  XtUngrabButton(core->getDrawAreaWidget(), AnyButton, AnyModifier);
2020
  XtUngrabButton(core->getDrawAreaWidget(), AnyButton, AnyModifier);
2021
  setlocale(LC_CTYPE, saved_locale);
2011
}
2022
}
2012
2023
2013
void XPDFViewer::addToolTip(Widget widget, char *text) {
2024
void XPDFViewer::addToolTip(Widget widget, char *text) {

Return to bug 293933