-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppSettings.cpp
94 lines (74 loc) · 2.29 KB
/
AppSettings.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// WinDjView
// Copyright (C) 2004-2015 Andrew Zhezherun
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
// http://www.gnu.org/copyleft/gpl.html
#include "stdafx.h"
#include "AppSettings.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CAppSettings
double CAppSettings::unitsPerInch[] = { 2.54, 25.4, 1.0 };
int CAppSettings::thumbnailWidth[] = { 50, 71, 100, 141, 200 };
int CAppSettings::thumbnailHeight[] = { 55, 78, 110, 155, 220 };
CAppSettings::CAppSettings()
{
nWindowPosX = 50;
nWindowPosY = 50;
nWindowWidth = 800;
nWindowHeight = 600;
bWindowMaximized = false;
bToolbar = true;
bTabBar = true;
bStatusBar = true;
bDictBar = true;
nDefaultZoomType = -3; // Fit page
fDefaultZoom = 100.0;
nDefaultLayout = 1; // Continuous
bFirstPageAlone = false;
nDefaultMode = 0; // Drag
bNavPaneHidden = false;
bNavPaneCollapsed = false;
nNavPaneWidth = 205;
bWarnNotDefaultViewer = true;
bTopLevelDocs = false;
bHideSingleTab = false;
bGenAllThumbnails = true;
bFullscreenClicks = true;
bFullscreenHideScroll = true;
bFullscreenContinuousScroll = false;
bInvertWheelZoom = false;
bCloseOnEsc = false;
bWrapLongBookmarks = true;
bRestoreView = true;
nStartupTab = 0;
bRestoreTabs = true;
bCheckUpdates = true;
nLastUpdateTime = 0;
nLanguage = 0x409;
bMatchCase = false;
nUnits = Centimeters;
DWORD dwMeasureSys;
if (::GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_IMEASURE | LOCALE_RETURN_NUMBER,
(LPTSTR) &dwMeasureSys, sizeof(DWORD)))
nUnits = (dwMeasureSys == 1 ? Inches : Centimeters);
nThumbnailSize = 2;
nCurLang = -1;
nCurDict = -1;
nDictChoice = 0;
nActiveSettingsTab = 0;
nImageFormat = 2; // png
}