Here's an updated version of the Calltips patch for
NEdit 5.2. A couple of bugs have been squashed and
some new conveniences added. Many of the dialogs
have been improved.
Logged In: YES
Added version 2.2, which fixes various bogosities like
unusued/uninitialized variables and a missing declaration from a
Logged In: YES
Is calltips-patch-2.2.tgz a tar.gz? Seems to be a simple tar
here, but that may be Mozilla's doing. Maybe .tar.gz would
be a better name.
Oops! You're right, 2.1 and 2.2 are both just tar files despite the
tgz suffix. I wondered why they were so much bigger... Silly me.
Version 2.2 repost, actually gzipped this time
There's a malloc() in tags.c which should be replaced by an
XtMalloc. Or just use XtNewString.
Logged In: YES
tried out the patch a bit just now, quite a fun patch :-)
Here's some of my feedback:
1) kill_calltip() should probably be made a menu item like
show_calltip(). Right now there are two ways to kill the
yellow box - activate other windows (focus out), or
pulldown/popup a menu/dialog. I know I can create the macro
to call kill_calltip(), but ...
2) Also I am wondering if the yellow box should just go way
automatically, when the cursor pos changes. something like
in the ddd. hmm..... not sure.
3) a small bug where the tab characters are rendered as
small boxes inside the yellow box. An XmString issue abviously.
4) set WM focus mode to "follow-mouse". Bring up a yellow
box, move mouse to other window (this close the yellow box),
move mouse (don't click) back to the window, press Ctrl+' to
bring up a yellow box, now click somewhere in the text area.
The yellow box disappears.
So here's the new (hopefully last) version of the patch. I
was going to commit this but I made so many changes I
thought I'd give it another few days of testing.
The biggest news is that I've broken all of your calltip
macros by renaming the macro subroutines. Sorry. If it's
any consolation, I've broken all of mine too. ;^)
Here's the latest from the changelog:
Barring any last-minute bugs, this will be the version
that gets merged in.
Fixed tabs-display-as-squares problem.
Added fixes to get_word and version strings to .tips
files as suggested by T. Haude.
Fixed the long standing buglet where include blocks in
tips files caused first line(s) of calltips to get cut off!
Added alias blocks so that tips can have multiple keys.
Calltips now have unique IDs so that you can distinguish
between a calltip you put up and one that something else
Changed names of macro subroutines to reflect changes
and to better fit in with other NEdit macro subroutine
names. To create a dialog in a macro you use "dialog", not
"show_dialog", so "show_calltip" has been changed to just
"calltip". Also, since the $calltip_displayed variable now
tells you the calltip ID of the currently displayed calltip
its name has been changed to $calltip_ID. I'm sorry if
these broke your macros, but that's the way things go in
development code. :-(
Added quite a few comments to functions I've added and
changed some function and variable names to be more
Added documentation for calltip subroutines to
Version 2.3 of the calltips patch against CVS
In response to TK's comments:
1. Hitting escape kills calltips. Adding a menu entry
seems silly since activating the menu kills the calltip
anyway. I guess it would be one way of telling the user to
use escape, but it seems like overkill for that purpose.
2. This might be useful as a per-calltip option, but I
often use calltips to remind me of function prototypes as I
write calls to them, and if the tip disappeared as I was
typing it would be pretty annoying. Once you get used to
hitting escape to kill them it's really quite natural.
3. This is fixed now.
4. I can reproduce this, but it's tough to understand.
Calltips are only killed in response to two events--Esc and
focus leaving the text area. I guess focus must be leaving
the text area somewhere along the line. It's only a minor
bug so I'm not going to worry about it until after the
Log in to post a comment.