delete MAkefile target links on realclean
[nedit-bw.git] / Scrolltip.patch
bloba4ff1ae4931a8ead03f7f199bde057d983b8922f
1 ---
3 doc/help.etx | 6 +
4 source/calltips.c | 226 ++++++++++++++++++++++++++++++++++++++++++++-------
5 source/calltips.h | 5 +
6 source/preferences.c | 9 ++
7 source/preferences.h | 1
8 source/text.c | 5 -
9 source/text.h | 2
10 source/textDisp.c | 51 ++++++++++-
11 source/textDisp.h | 8 +
12 source/textP.h | 1
13 source/window.c | 1
14 11 files changed, 274 insertions(+), 41 deletions(-)
16 diff --quilt old/doc/help.etx new/doc/help.etx
17 --- old/doc/help.etx
18 +++ new/doc/help.etx
19 @@ -4609,10 +4609,16 @@ X Resources
21 **nc.timeOut**: 10
23 Basic time-out period used in communication with an NEdit server (seconds).
25 +**nedit.showScrolltip**: True
27 + If this resource is set to True, NEdit will show a tooltip displaying the
28 + line number if the user grabs and moves the scroll handle. Set to False to
29 + switch it off.
31 ----------------------------------------------------------------------
32 ~The following are Selected widget names (to which you may append~
33 ~.background, .foreground, .fontList, etc., to change colors, fonts~
34 ~ and other characteristics):~
36 diff --quilt old/source/calltips.c new/source/calltips.c
37 --- old/source/calltips.c
38 +++ new/source/calltips.c
39 @@ -48,10 +48,23 @@
40 #include "../debug.h"
41 #endif
43 static char *expandAllTabs( char *text, int tab_width );
45 +/* lowlevel tip functions */
46 +static Widget createTip(const char *name, Widget grandfather,
47 + Pixel foreground, Pixel background, unsigned char alignment);
48 +static Widget shellOfTip(Widget tip);
49 +static void setTipText(Widget tip, const char *text);
50 +static void showTip(Widget tip);
51 +static void hideTip(Widget tip);
52 +static void realizeTip(Widget tip);
53 +static void getTipMetrics(Widget tip,
54 + Position *widthPtr, Position *heightPtr,
55 + Position *borderWidthPtr);
56 +static void moveTip(Widget tip, Position x, Position y);
59 ** Pop-down a calltip if one exists, else do nothing
61 void KillCalltip(WindowInfo *window, int calltipID) {
62 textDisp *textD = ((TextWidget)window->lastFocus)->text.textD;
63 @@ -60,11 +73,11 @@ void KillCalltip(WindowInfo *window, int
65 void TextDKillCalltip(textDisp *textD, int calltipID) {
66 if( textD->calltip.ID == 0 )
67 return;
68 if( calltipID == 0 || calltipID == textD->calltip.ID ) {
69 - XtPopdown( textD->calltipShell );
70 + hideTip(textD->calltip.tip);
71 textD->calltip.ID = 0;
76 @@ -129,12 +142,11 @@ void TextDRedrawCalltip(textDisp *textD,
77 return;
79 rel_x = textD->calltip.pos;
82 - XtVaGetValues(textD->calltipShell, XmNwidth, &tipWidth, XmNheight,
83 - &tipHeight, XmNborderWidth, &borderWidth, NULL);
84 + getTipMetrics(textD->calltip.tip, &tipWidth, &tipHeight, &borderWidth);
85 rel_x += borderWidth;
86 rel_y += lineHeight/2 + borderWidth;
88 /* Adjust rel_x for horizontal alignment modes */
89 if (textD->calltip.hAlign == TIP_CENTER)
90 @@ -174,12 +186,12 @@ void TextDRedrawCalltip(textDisp *textD,
91 else if (abs_y >= screenAttr.height)
92 abs_y = screenAttr.height - tipHeight - CALLTIP_EDGE_GUARD;
93 /* If no case applied, just go with the default placement. */
97 - XtVaSetValues( textD->calltipShell, XmNx, abs_x, XmNy, abs_y, NULL );
99 + moveTip(textD->calltip.tip, abs_x, abs_y);
103 ** Returns a new string with each \t replaced with tab_width spaces or
104 ** a pointer to text if there were no tabs. Returns NULL on malloc failure.
105 @@ -243,45 +255,32 @@ int ShowCalltip(WindowInfo *window, char
107 /* Expand any tabs in the calltip and make it an XmString */
108 textCpy = expandAllTabs( text, BufGetTabDistance(textD->buffer) );
109 if( textCpy == NULL )
110 return 0; /* Out of memory */
111 - str = XmStringCreateLtoR(textCpy, XmFONTLIST_DEFAULT_TAG);
112 - if( textCpy != text )
113 - free( textCpy );
115 /* Get the location/dimensions of the text area */
116 XtVaGetValues(textD->w,
117 XmNx, &txtX,
118 XmNy, &txtY,
119 NULL);
121 /* Create the calltip widget on first request */
122 - if (textD->calltipW == NULL) {
123 - Arg args[10];
124 - int argcnt = 0;
125 - XtSetArg(args[argcnt], XmNsaveUnder, True); argcnt++;
126 - XtSetArg(args[argcnt], XmNallowShellResize, True); argcnt++;
128 - textD->calltipShell = CreatePopupShellWithBestVis("calltipshell",
129 - overrideShellWidgetClass, textD->w, args, argcnt);
131 - /* Might want to make this a read-only XmText eventually so that
132 - users can copy from it */
133 - textD->calltipW = XtVaCreateManagedWidget(
134 - "calltip", xmLabelWidgetClass, textD->calltipShell,
135 - XmNborderWidth, 1, /* Thin borders */
136 - XmNhighlightThickness, 0,
137 - XmNalignment, XmALIGNMENT_BEGINNING,
138 - XmNforeground, textD->calltipFGPixel,
139 - XmNbackground, textD->calltipBGPixel,
140 - NULL );
141 + if (textD->calltip.tip == NULL) {
142 + textD->calltip.tip = createTip("calltip", textD->w,
143 + textD->calltipFGPixel, textD->calltipBGPixel,
144 + XmALIGNMENT_BEGINNING);
145 + if (textD->calltip.tip == NULL) {
146 + return 0;
150 /* Set the text on the label */
151 - XtVaSetValues( textD->calltipW, XmNlabelString, str, NULL );
152 - XmStringFree( str );
153 + setTipText(textD->calltip.tip, textCpy);
154 + if (textCpy != text) {
155 + free(textCpy);
158 /* Figure out where to put the tip */
159 if (anchored) {
160 /* Put it at the specified position */
161 /* If position is not displayed, return 0 */
162 @@ -315,11 +314,176 @@ int ShowCalltip(WindowInfo *window, char
163 not unsigned, so have to work to keep it > 0 on overflow */
164 if(++StaticCalltipID <= 0)
165 StaticCalltipID = 1;
167 /* Realize the calltip's shell so that its width & height are known */
168 - XtRealizeWidget( textD->calltipShell );
169 + realizeTip(textD->calltip.tip);
170 /* Move the calltip and pop it up */
171 TextDRedrawCalltip(textD, 0);
172 - XtPopup( textD->calltipShell, XtGrabNone );
173 + showTip(textD->calltip.tip);
174 return textD->calltip.ID;
178 +** Pop up a scrolltip.
180 +Boolean TextDShowScrolltip(textDisp *textD, unsigned line, int x, int y,
181 + int align)
183 + Position w = 0;
184 + XmString str;
185 + char lineBuf[TYPE_INT_STR_SIZE(int)];
187 + if (NULL == textD->scrolltip) {
188 + textD->scrolltip = createTip("scrolltip", textD->w,
189 + textD->calltipFGPixel, textD->calltipBGPixel,
190 + XmALIGNMENT_CENTER);
191 + if (NULL == textD->scrolltip) {
192 + return False;
196 + /* Set the text on the tip's label. */
197 + sprintf(lineBuf, "%u", line);
198 + setTipText(textD->scrolltip, lineBuf);
200 + /* Realize the calltip's shell so that its width and height are known */
201 + realizeTip(textD->scrolltip);
203 + /* Get the width of the tip to right align it on the x position */
204 + if (SCROLLTIP_RIGHT == align) {
205 + getTipMetrics(textD->scrolltip, &w, NULL, NULL);
208 + /* Move the tip where it belongs and pop it up. */
209 + moveTip(textD->scrolltip, x - w, y);
210 + showTip(textD->scrolltip);
212 + return True;
216 +** Pop down scrolltip if it exists
218 +void TextDKillScrolltip(textDisp *textD)
220 + if (NULL != textD->scrolltip
221 + && NULL != shellOfTip(textD->scrolltip)) {
222 + hideTip(textD->scrolltip);
227 +** This creates a calltip of class XmLabel and its parent, a shell of class
228 +** OverrideShell (which in turn will be the child of the grandfather
229 +** parameter). The tip will have minimum size but will resize to match
230 +** the text entered (see XmNallowShellResize).
232 +** Color is picked by the two parameters foreground and background.
234 +** The alignment is one of XmALIGNMENT_BEGINNING, XmALIGNMENT_CENTER or
235 +** XmALIGNMENT_END, taken from the XmLabel class.
237 +** TODO: Some helper functions are still desirable to make this function
238 +** available from other parts of the code. At the moment the caller must
239 +** use calls to Motif/Intrinsics functions to handle it.
242 +static Widget createTip(const char *name, Widget grandfather,
243 + Pixel foreground, Pixel background, unsigned char alignment)
245 + Widget tip = NULL;
246 + Widget shell = NULL;
247 + Arg args[10];
248 + int argcnt = 0;
249 + char *shellNameBuf;
251 + shellNameBuf = XtMalloc(strlen(name) + strlen("shell") + 1);
252 + if (NULL == shellNameBuf) {
253 + fprintf(stderr, "nedit: Out of heap memory in createTip!\n");
254 + return NULL;
257 + strcpy(shellNameBuf, name);
258 + strcat(shellNameBuf, "shell");
260 + XtSetArg(args[argcnt], XmNsaveUnder, True); argcnt++;
261 + XtSetArg(args[argcnt], XmNallowShellResize, True); argcnt++;
263 + shell = CreatePopupShellWithBestVis(shellNameBuf,
264 + overrideShellWidgetClass, grandfather, args, argcnt);
266 + XtFree(shellNameBuf);
268 + /* Might want to make this a read-only XmText eventually so that
269 + users can copy from it */
270 + tip = XtVaCreateManagedWidget(name,
271 + xmLabelWidgetClass, shell,
272 + XmNborderWidth, 1, /* Thin borders */
273 + XmNhighlightThickness, 0,
274 + XmNalignment, XmALIGNMENT_BEGINNING,
275 + XmNforeground, foreground,
276 + XmNbackground, background,
277 + NULL);
279 + return tip;
282 +static Widget shellOfTip(Widget tip)
284 + return tip ? XtParent(tip) : NULL;
287 +static void setTipText(Widget tip, const char *text)
289 + XmString str;
291 + str = XmStringCreateLtoR((char *)text, XmFONTLIST_DEFAULT_TAG);
292 + XtVaSetValues(tip, XmNlabelString, str, NULL);
293 + XmStringFree(str);
296 +static void showTip(Widget tip)
298 + XtPopup(shellOfTip(tip), XtGrabNone);
301 +static void hideTip(Widget tip)
303 + XtPopdown(shellOfTip(tip));
306 +static void realizeTip(Widget tip)
308 + XtRealizeWidget(shellOfTip(tip));
311 +static void getTipMetrics(Widget tip,
312 + Position *widthPtr, Position *heightPtr,
313 + Position *borderWidthPtr)
315 + Position width, height, borderWidth;
317 + XtVaGetValues(shellOfTip(tip),
318 + XmNwidth, &width,
319 + XmNheight, &height,
320 + XmNborderWidth, &borderWidth,
321 + NULL);
323 + if (widthPtr) {
324 + *widthPtr = width;
326 + if (heightPtr) {
327 + *heightPtr = height;
329 + if (borderWidthPtr) {
330 + *borderWidthPtr = borderWidth;
334 +static void moveTip(Widget tip, Position x, Position y)
336 + XtVaSetValues(shellOfTip(tip),
337 + XmNx, x,
338 + XmNy, y,
339 + NULL);
341 diff --quilt old/source/textDisp.c new/source/textDisp.c
342 --- old/source/textDisp.c
343 +++ new/source/textDisp.c
344 @@ -195,11 +195,12 @@ textDisp *TextDCreate(Widget widget, Wid
345 Pixel selectFGPixel, Pixel selectBGPixel, Pixel highlightFGPixel,
346 Pixel highlightBGPixel, Pixel cursorFGPixel, Pixel lineNumFGPixel,
347 int continuousWrap, int wrapMargin, XmString bgClassString,
348 Pixel calltipFGPixel, Pixel calltipBGPixel,
349 Pixel cursorlineBGPixel, Boolean showCursorline,
350 - Pixel wrapMarginFGPixel, Boolean showWrapMargin)
351 + Pixel wrapMarginFGPixel, Boolean showWrapMargin,
352 + Boolean showScrolltip)
354 textDisp *textD;
355 XGCValues gcValues;
356 int i;
358 @@ -258,17 +259,16 @@ textDisp *TextDCreate(Widget widget, Wid
359 textD->nVisibleLines = (height - 1) / (textD->ascent + textD->descent) + 1;
360 gcValues.foreground = cursorFGPixel;
361 textD->cursorFGGC = XtGetGC(widget, GCForeground, &gcValues);
362 textD->lineStarts = (int *)XtMalloc(sizeof(int) * textD->nVisibleLines);
363 textD->lineStarts[0] = 0;
364 - textD->calltipW = NULL;
365 - textD->calltipShell = NULL;
366 + for (i=1; i<textD->nVisibleLines; i++)
367 + textD->lineStarts[i] = -1;
368 + textD->calltip.tip = NULL;
369 textD->calltip.ID = 0;
370 textD->calltipFGPixel = calltipFGPixel;
371 textD->calltipBGPixel = calltipBGPixel;
372 - for (i=1; i<textD->nVisibleLines; i++)
373 - textD->lineStarts[i] = -1;
374 textD->bgClassPixel = NULL;
375 textD->bgClass = NULL;
376 TextDSetupBGClasses(widget, bgClassString, &textD->bgClassPixel,
377 &textD->bgClass, bgPixel);
378 textD->suppressResync = 0;
379 @@ -277,10 +277,12 @@ textDisp *TextDCreate(Widget widget, Wid
380 textD->pointerHidden = False;
381 textD->graphicsExposeQueue = NULL;
382 textD->showCursorline = showCursorline;
383 textD->oldCursorPos = 0;
384 textD->oldLineStart = 0;
385 + textD->showScrolltip = showScrolltip;
386 + textD->scrolltip = NULL;
388 /* Attach an event handler to the widget so we can know the visibility
389 (used for choosing the fastest drawing method) */
390 XtAddEventHandler(widget, VisibilityChangeMask, False,
391 visibilityEH, textD);
392 @@ -3152,13 +3154,50 @@ static void redrawLineNumbers(textDisp *
393 static void vScrollCB(Widget w, XtPointer clientData, XtPointer callData)
395 textDisp *textD = (textDisp *)clientData;
396 int newValue = ((XmScrollBarCallbackStruct *)callData)->value;
397 int lineDelta = newValue - textD->topLineNum;
398 + int reason = ((XmScrollBarCallbackStruct *)callData)->reason;
400 - if (lineDelta == 0)
401 + if (lineDelta == 0) {
402 + TextDKillScrolltip(textD);
403 return;
406 + /* lineDelta is always != 0 for XmCR_DRAG */
407 + /* Scrolltip does not work for continuous wrap. The only way to get the
408 + line number is through textDisp->absTopLineNum, but this value is very
409 + inaccurate for large files. So no tip. */
410 + if (XmCR_DRAG == reason
411 + && !textD->continuousWrap
412 + && textD->showScrolltip) {
413 + /* Display a scrolltip showing the line number about one third down
414 + from the top, the position a search jumps to. */
415 + XEvent *event = ((XmScrollBarCallbackStruct *)callData)->event;
416 + XMotionEvent *motionEvent = (XMotionEvent *)event;
417 + unsigned char placement = -1;
418 + int align = SCROLLTIP_RIGHT;
419 + Dimension w = 0;
420 + Dimension margin = 4;
422 + XtVaGetValues(XtParent(XtParent(textD->w)),
423 + XmNscrollBarPlacement, &placement,
424 + NULL);
425 + if (XmBOTTOM_LEFT == placement || XmTOP_LEFT == placement) {
426 + XtVaGetValues(textD->vScrollBar, XmNwidth, &w, NULL);
427 + align = SCROLLTIP_LEFT;
428 + w += margin;
429 + } else {
430 + /* SCROLLTIP_RIGHT */
431 + w -= margin;
434 + TextDShowScrolltip(textD, newValue + (textD->nVisibleLines / 3),
435 + motionEvent->x_root - motionEvent->x + w,
436 + motionEvent->y_root, align);
439 setScroll(textD, newValue, textD->horizOffset, False, True);
441 static void hScrollCB(Widget w, XtPointer clientData, XtPointer callData)
443 textDisp *textD = (textDisp *)clientData;
444 diff --quilt old/source/textDisp.h new/source/textDisp.h
445 --- old/source/textDisp.h
446 +++ new/source/textDisp.h
447 @@ -65,10 +65,11 @@ typedef struct graphicExposeTranslationE
448 } graphicExposeTranslationEntry;
450 typedef void (*unfinishedStyleCBProc)();
452 typedef struct _calltipStruct {
453 + Widget tip; /* this tip widget */
454 int ID; /* ID of displayed calltip. Equals
455 zero if none is displayed. */
456 Boolean anchored; /* Is it anchored to a position */
457 int pos; /* Position tip is anchored to */
458 int hAlign; /* horizontal alignment */
459 @@ -145,12 +146,10 @@ typedef struct _textDisp {
460 Pixel cursorFGPixel;
461 Pixel cursorlineBGPixel;
462 Pixel *bgClassPixel; /* table of colors for each BG class */
463 unsigned char *bgClass; /* obtains index into bgClassPixel[] */
465 - Widget calltipW; /* The Label widget for the calltip */
466 - Widget calltipShell; /* The Shell that holds the calltip */
467 calltipStruct calltip; /* The info for the calltip itself */
468 Pixel calltipFGPixel;
469 Pixel calltipBGPixel;
470 Pixel wrapMarginFGPixel; /* color for drawing wrap margin */
471 GC wrapMarginGC; /* GC for drawing wrap margin */
472 @@ -166,10 +165,12 @@ typedef struct _textDisp {
473 hidden */
474 graphicExposeTranslationEntry *graphicsExposeQueue;
475 int oldCursorPos;
476 int oldLineStart;
477 Boolean showCursorline;
478 + Boolean showScrolltip;
479 + Widget scrolltip;
480 } textDisp;
482 textDisp *TextDCreate(Widget widget, Widget hScrollBar, Widget vScrollBar,
483 Position left, Position top, Position width, Position height,
484 Position lineNumLeft, Position lineNumWidth, textBuffer *buffer,
485 @@ -177,11 +178,12 @@ textDisp *TextDCreate(Widget widget, Wid
486 Pixel selectFGPixel, Pixel selectBGPixel, Pixel highlightFGPixel,
487 Pixel highlightBGPixel, Pixel cursorFGPixel, Pixel lineNumFGPixel,
488 int continuousWrap, int wrapMargin, XmString bgClassString,
489 Pixel calltipFGPixel, Pixel calltipBGPixel,
490 Pixel cursorlineBGPixel, Boolean showCursorline,
491 - Pixel wrapMarginFGPixel, Boolean showWrapMargin);
492 + Pixel wrapMarginFGPixel, Boolean showWrapMargin,
493 + Boolean showScrolltip);
494 void TextDFree(textDisp *textD);
495 void TextDSetBuffer(textDisp *textD, textBuffer *buffer);
496 void TextDAttachHighlightData(textDisp *textD, textBuffer *styleBuffer,
497 styleTableEntry *styleTable, int nStyles, char unfinishedStyle,
498 unfinishedStyleCBProc unfinishedHighlightCB, void *cbArg);
499 diff --quilt old/source/textP.h new/source/textP.h
500 --- old/source/textP.h
501 +++ new/source/textP.h
502 @@ -77,10 +77,11 @@ typedef struct _TextPart {
503 int rows, columns;
504 int marginWidth, marginHeight;
505 int cursorBlinkRate;
506 int wrapMargin;
507 Boolean showWrapMargin;
508 + Boolean showScrolltip;
509 int emulateTabs;
510 int lineNumCols;
511 char *delimiters;
512 Cardinal cursorVPadding;
513 Widget hScrollBar, vScrollBar;
514 diff --quilt old/source/text.c new/source/text.c
515 --- old/source/text.c
516 +++ new/source/text.c
517 @@ -716,10 +716,12 @@ static XtResource resources[] = {
518 NULL},
519 {textNcursorVPadding, textCCursorVPadding, XtRCardinal, sizeof(Cardinal),
520 XtOffset(TextWidget, text.cursorVPadding), XmRString, "0"},
521 {textNshowCursorline, textCshowCursorline, XmRBoolean, sizeof(Boolean),
522 XtOffset(TextWidget, text.showCursorline), XmRString, "False"},
523 + {textNshowScrolltip, textCshowScrolltip, XmRBoolean, sizeof(Boolean),
524 + XtOffset(TextWidget, text.showScrolltip), XmRString, "False"},
527 static TextClassRec textClassRec = {
528 /* CoreClassPart */
530 @@ -835,11 +837,12 @@ static void initialize(TextWidget reques
531 new->text.lineNumFGPixel,
532 new->text.continuousWrap, new->text.wrapMargin,
533 new->text.backlightCharTypes, new->text.calltipFGPixel,
534 new->text.calltipBGPixel,
535 new->text.cursorlineBGPixel, new->text.showCursorline,
536 - new->text.wrapMarginFGPixel, new->text.showWrapMargin);
537 + new->text.wrapMarginFGPixel, new->text.showWrapMargin,
538 + new->text.showScrolltip);
540 /* Add mandatory delimiters blank, tab, and newline to the list of
541 delimiters. The memory use scheme here is that new values are
542 always copied, and can therefore be safely freed on subsequent
543 set-values calls or destroy */
544 diff --quilt old/source/text.h new/source/text.h
545 --- old/source/text.h
546 +++ new/source/text.h
547 @@ -119,10 +119,12 @@
548 #define textCCursorVPadding "CursorVPadding"
549 #define textNbacklightCharTypes "backlightCharTypes"
550 #define textCBacklightCharTypes "BacklightCharTypes"
551 #define textNshowCursorline "showCursorline"
552 #define textCshowCursorline "ShowCursorline"
553 +#define textNshowScrolltip "showScrolltip"
554 +#define textCshowScrolltip "ShowScrolltip"
557 extern WidgetClass textWidgetClass;
559 struct _TextClassRec;
560 diff --quilt old/source/calltips.h new/source/calltips.h
561 --- old/source/calltips.h
562 +++ new/source/calltips.h
563 @@ -36,14 +36,19 @@
566 enum TipHAlignMode {TIP_LEFT, TIP_CENTER, TIP_RIGHT};
567 enum TipVAlignMode {TIP_ABOVE, TIP_BELOW};
568 enum TipAlignStrict {TIP_SLOPPY, TIP_STRICT};
569 +enum ScrolltipAlignMode {SCROLLTIP_LEFT, SCROLLTIP_RIGHT};
571 int ShowCalltip(WindowInfo *window, char *text, Boolean anchored,
572 int pos, int hAlign, int vAlign, int alignMode);
573 void KillCalltip(WindowInfo *window, int calltipID);
574 void TextDKillCalltip(textDisp *textD, int calltipID);
575 int GetCalltipID(WindowInfo *window, int calltipID);
576 void TextDRedrawCalltip(textDisp *textD, int calltipID);
578 +Boolean TextDShowScrolltip(textDisp *textD, unsigned line, int x, int y,
579 + int align);
580 +void TextDKillScrolltip(textDisp *textD);
582 #endif /* ifndef NEDIT_CALLTIPS_H_INCLUDED */
583 diff --quilt old/source/preferences.c new/source/preferences.c
584 --- old/source/preferences.c
585 +++ new/source/preferences.c
586 @@ -333,10 +333,11 @@ static struct prefData {
587 int showCursorline;
588 int focusOnRaise;
589 Boolean honorSymlinks;
590 int truncSubstitution;
591 Boolean forceOSConversion;
592 + Boolean showScrolltip;
593 } PrefData;
595 /* Temporary storage for preferences strings which are discarded after being
596 read */
597 static struct {
598 @@ -1096,10 +1097,12 @@ static PrefDescripRec PrefDescrip[] = {
599 &PrefData.truncSubstitution, TruncSubstitutionModes, False},
600 {"honorSymlinks", "HonorSymlinks", PREF_BOOLEAN, "True",
601 &PrefData.honorSymlinks, NULL, False},
602 {"showCursorline", "ShowCursorline", PREF_BOOLEAN, "True",
603 &PrefData.showCursorline, NULL, True},
604 +// {"showScrolltip", "ShowScrolltip", PREF_BOOLEAN, "True",
605 +// &PrefData.showScrolltip, NULL, False},
608 static XrmOptionDescRec OpTable[] = {
609 {"-wrap", ".autoWrap", XrmoptionNoArg, (caddr_t)"Continuous"},
610 {"-nowrap", ".autoWrap", XrmoptionNoArg, (caddr_t)"None"},
611 @@ -2237,10 +2240,16 @@ void SetPrefShowCursorline(Boolean value
612 Boolean GetPrefShowCursorline(void)
614 return PrefData.showCursorline;
617 +Boolean GetPrefShowScrolltip(void)
619 + //return PrefData.showScrolltip;
620 + return True;
624 ** If preferences don't get saved, ask the user on exit whether to save
626 void MarkPrefsChanged(void)
628 diff --quilt old/source/window.c new/source/window.c
629 --- old/source/window.c
630 +++ new/source/window.c
631 @@ -2314,10 +2314,11 @@ static Widget createTextArea(Widget pare
632 textNcontinuousWrap, window->wrapMode == CONTINUOUS_WRAP,
633 textNoverstrike, window->overstrike,
634 textNhidePointer, (Boolean) GetPrefTypingHidesPointer(),
635 textNcursorVPadding, GetVerticalAutoScroll(),
636 textNshowCursorline, False,
637 + textNshowScrolltip, GetPrefShowScrolltip(),
638 NULL);
640 XtVaSetValues(sw, XmNworkWindow, frame, XmNhorizontalScrollBar,
641 hScrollBar, XmNverticalScrollBar, vScrollBar, NULL);
643 diff --quilt old/source/preferences.h new/source/preferences.h
644 --- old/source/preferences.h
645 +++ new/source/preferences.h
646 @@ -215,7 +215,8 @@ void SetPrefOpenInTab(int state);
647 Boolean GetPrefUndoModifiesSelection(void);
648 Boolean GetPrefFocusOnRaise(void);
649 Boolean GetPrefHonorSymlinks(void);
650 Boolean GetPrefForceOSConversion(void);
651 void SetPrefFocusOnRaise(Boolean);
652 +Boolean GetPrefShowScrolltip(void);
654 #endif /* NEDIT_PREFERENCES_H_INCLUDED */