finally break-up Patch Collection
[nedit-bw.git] / dont-resize-window.patch
blob9a98e7166a0ebce3e01d332522bdbedac3a9c900
1 ---
3 source/preferences.c | 8 ++++++++
4 source/preferences.h | 1 +
5 source/window.c | 2 +-
6 3 files changed, 10 insertions(+), 1 deletion(-)
8 diff --quilt old/source/preferences.c new/source/preferences.c
9 --- old/source/preferences.c
10 +++ new/source/preferences.c
11 @@ -369,10 +369,11 @@ static struct prefData {
12 int defMenuColorLength;
13 char bgMenuColor[MAX_COLOR_LENGTH];
14 int bgMenuColorLength;
15 char transMenuColor[MAX_COLOR_LENGTH];
16 int transMenuColorLength;
17 + Boolean resizeWindow;
18 } PrefData;
20 /* Temporary storage for preferences strings which are discarded after being
21 read */
22 static struct {
23 @@ -1215,10 +1216,12 @@ static PrefDescripRec PrefDescrip[] = {
24 PrefData.defMenuColor, (void *)sizeof(PrefData.defMenuColor), False},
25 {"backgroundWinMenuColor", "BackgroundWinMenuColor", PREF_STRING, "white",
26 PrefData.bgMenuColor, (void *)sizeof(PrefData.bgMenuColor), False},
27 {"transientWinMenuColor", "TransientWinMenuColor", PREF_STRING, "yellow",
28 PrefData.transMenuColor, (void *)sizeof(PrefData.transMenuColor), False},
29 + {"resizeWindow", "ResizeWindow", PREF_BOOLEAN, "True",
30 + &PrefData.resizeWindow, NULL, False},
33 static XrmOptionDescRec OpTable[] = {
34 {"-wrap", ".autoWrap", XrmoptionNoArg, (caddr_t)"Continuous"},
35 {"-nowrap", ".autoWrap", XrmoptionNoArg, (caddr_t)"None"},
36 @@ -2448,10 +2451,15 @@ void SetPrefZeroSizedMode(int mode)
37 int GetPrefZeroSizedMode(void)
39 return PrefData.zeroSizedMode;
42 +Boolean GetPrefResizeWindow(void)
44 + return (Boolean)PrefData.resizeWindow;
48 ** If preferences don't get saved, ask the user on exit whether to save
50 void MarkPrefsChanged(void)
52 diff --quilt old/source/preferences.h new/source/preferences.h
53 --- old/source/preferences.h
54 +++ new/source/preferences.h
55 @@ -228,7 +228,8 @@ void SetPrefFocusOnRaise(Boolean);
56 Boolean GetPrefShowScrolltip(void);
57 void SetPrefHardlinkMode(int mode);
58 int GetPrefHardlinkMode(void);
59 void SetPrefZeroSizedMode(int mode);
60 int GetPrefZeroSizedMode(void);
61 +Boolean GetPrefResizeWindow(void);
63 #endif /* NEDIT_PREFERENCES_H_INCLUDED */
64 diff --quilt old/source/window.c new/source/window.c
65 --- old/source/window.c
66 +++ new/source/window.c
67 @@ -2758,11 +2758,11 @@ static int updateGutterWidth(WindowInfo*
68 reqCols = tmpReqCols;
73 - if (reqCols != maxCols) {
74 + if (reqCols != maxCols && GetPrefResizeWindow()) {
75 XFontStruct *fs;
76 Dimension windowWidth;
77 short fontWidth;
79 newColsDiff = reqCols - maxCols;