delete MAkefile target links on realclean
[nedit-bw.git] / ColoredWinMenu-transient.patch
blob838a3ac18b7184612bfc7bd519cf123436fff65f
1 ---
3 doc/help.etx | 6 +++++-
4 source/menu.c | 5 +++++
5 source/preferences.c | 16 ++++++++++++++++
6 source/preferences.h | 2 ++
7 4 files changed, 28 insertions(+), 1 deletion(-)
9 diff --quilt old/doc/help.etx new/doc/help.etx
10 --- old/doc/help.etx
11 +++ new/doc/help.etx
12 @@ -4623,14 +4623,18 @@ X Resources
14 **nedit.readOnlyWinMenuColor**: blue
16 Defines the color of read-only files in the Windows menu.
18 +**nedit.transientWinMenuColor**: yellow
20 + Defines the color of transient files in the Windows menu.
22 **nedit.backgroundWinMenuColor**: white
24 Defines the color of the background used for colored Windows menu items
25 - when using either the modified or read-only foreground color.
26 + when using either the modified, read-only or transient foreground color.
28 **nedit.multiClickTime**: (system specific)
30 Maximum time in milliseconds allowed between mouse clicks within double and
31 triple click actions.
32 diff --quilt old/source/menu.c new/source/menu.c
33 --- old/source/menu.c
34 +++ new/source/menu.c
35 @@ -4450,10 +4450,11 @@ static void setTransientAP(Widget text,
36 XmToggleButtonSetState(window->transientItem, window->transient, False);
39 UpdateWindowTitle(window);
40 RefreshTabState(window);
41 + InvalidateWindowMenus();
44 static void setTabDistAP(Widget w, XEvent *event, String *args,
45 Cardinal *nArgs)
47 @@ -4845,10 +4846,14 @@ static void colorWindowMenuEntries(const
48 int colorLength;
49 if (IS_ANY_LOCKED(window->lockReasons)) {
50 color = GetPrefRoMenuColor(&colorLength);
51 bgcolor = GetPrefBgMenuColor(&bgcolorLength);
53 + else if (window->transient == TRUE) {
54 + color = GetPrefTransMenuColor(&colorLength);
55 + bgcolor = GetPrefBgMenuColor(&bgcolorLength);
56 + }
57 else if (window->fileChanged == TRUE) {
58 color = GetPrefModMenuColor(&colorLength);
59 bgcolor = GetPrefBgMenuColor(&bgcolorLength);
61 else {
62 diff --quilt old/source/preferences.c new/source/preferences.c
63 --- old/source/preferences.c
64 +++ new/source/preferences.c
65 @@ -367,10 +367,12 @@ static struct prefData {
66 int roMenuColorLength;
67 char defMenuColor[MAX_COLOR_LENGTH];
68 int defMenuColorLength;
69 char bgMenuColor[MAX_COLOR_LENGTH];
70 int bgMenuColorLength;
71 + char transMenuColor[MAX_COLOR_LENGTH];
72 + int transMenuColorLength;
73 } PrefData;
75 /* Temporary storage for preferences strings which are discarded after being
76 read */
77 static struct {
78 @@ -1211,10 +1213,12 @@ static PrefDescripRec PrefDescrip[] = {
79 PrefData.roMenuColor, (void *)sizeof(PrefData.roMenuColor), False},
80 {"defaultWinMenuColor", "DefaultWinMenuColor", PREF_STRING, "black",
81 PrefData.defMenuColor, (void *)sizeof(PrefData.defMenuColor), False},
82 {"backgroundWinMenuColor", "BackgroundWinMenuColor", PREF_STRING, "white",
83 PrefData.bgMenuColor, (void *)sizeof(PrefData.bgMenuColor), False},
84 + {"transientWinMenuColor", "TransientWinMenuColor", PREF_STRING, "yellow",
85 + PrefData.transMenuColor, (void *)sizeof(PrefData.transMenuColor), False},
88 static XrmOptionDescRec OpTable[] = {
89 {"-wrap", ".autoWrap", XrmoptionNoArg, (caddr_t)"Continuous"},
90 {"-nowrap", ".autoWrap", XrmoptionNoArg, (caddr_t)"None"},
91 @@ -1579,10 +1583,11 @@ static void translatePrefFormats(int con
92 /* For efficiency, precalculate the lengths of window menu colors */
93 SetPrefModMenuColorLength(PrefData.modMenuColor);
94 SetPrefRoMenuColorLength(PrefData.roMenuColor);
95 SetPrefDefMenuColorLength(PrefData.defMenuColor);
96 SetPrefBgMenuColorLength(PrefData.bgMenuColor);
97 + SetPrefTransMenuColorLength(PrefData.transMenuColor);
99 /* setup language mode dependent info of user menus (to increase
100 performance when switching between documents of different
101 language modes) */
102 SetupUserMenuInfo();
103 @@ -2385,10 +2390,21 @@ const char *GetPrefBgMenuColor(int* leng
104 void SetPrefBgMenuColorLength(const char* string)
106 PrefData.bgMenuColorLength = strlen(string);
109 +const char *GetPrefTransMenuColor(int* length)
111 + *length = PrefData.transMenuColorLength;
112 + return PrefData.transMenuColor;
115 +void SetPrefTransMenuColorLength(const char* string)
117 + PrefData.transMenuColorLength = strlen(string);
120 int GetPrefOverrideVirtKeyBindings(void)
122 return PrefData.virtKeyOverride;
125 diff --quilt old/source/preferences.h new/source/preferences.h
126 --- old/source/preferences.h
127 +++ new/source/preferences.h
128 @@ -201,10 +201,12 @@ const char *GetPrefRoMenuColor(int* leng
129 void SetPrefRoMenuColorLength(const char* string);
130 const char *GetPrefDefMenuColor(int* length);
131 void SetPrefDefMenuColorLength(const char* string);
132 const char *GetPrefBgMenuColor(int* length);
133 void SetPrefBgMenuColorLength(const char* string);
134 +const char *GetPrefTransMenuColor(int* length);
135 +void SetPrefTransMenuColorLength(const char* string);
136 void SetPrefFindReplaceUsesSelection(int state);
137 int GetPrefFindReplaceUsesSelection(void);
138 int GetPrefStickyCaseSenseBtn(void);
139 void SetPrefBeepOnSearchWrap(int state);
140 int GetPrefBeepOnSearchWrap(void);