From mboxrd@z Thu Jan 1 00:00:00 1970 From: D-Man To: sourcenav@sources.redhat.com Subject: Re: customization Date: Tue, 13 Feb 2001 09:30:00 -0000 Message-id: <20010213123017.A11342@harmony.cs.rit.edu> References: <20010209125433.B16961@harmony.cs.rit.edu> X-SW-Source: 2001-q1/msg00132.html On Fri, Feb 09, 2001 at 11:28:48AM -0800, Mo DeJong wrote: | On Fri, 9 Feb 2001, D-Man wrote: | | > I would like to change a few things about SN's gui, but I don't think | > there are any options for it yet : | > | > o always add an Editor view to Class and XRef views | > o Editor view is always 80 characters wide when created | > o Editor displays in reverse video (like gvim does) | > o Editor is read-only (a viewer really, not an editor) | > | > I really don't mind hard-coding these prefs into my copy, but I don't | > know either Tcl or Tk. If someone would show me what to add, and | > where I would greatly appreciate it. | | Well, we can give you general tips on how to implement the | changes but you are going to have to actually go into the | code and get it working. Of course, this is what I was asking for. | | For example, that "Editor is read-only" can be done by setting | the -state option of the editor's text widget to disabled. | You would need to add a command like: | | $text configure -state disabled Ok, got that. Line 118 in share/gui/multiedit.tcl | | The "reverse video" thing should not be hard at all. Just | set the background to black and the fg to green. Here | is a quick wish (Tk) script to get you started. | | $ wish | % text .t -bg black -fg green | % pack .t That worked, but I found the highlight colors were to dark for my taste. I put it back to the default white background. | | > Also, I would like gvim to open up at the proper line of code when I | > double-click in a view. I didn't find the cl option in the help | > files, and also I don't know what format string specifier I would | > need to use in the "External Editor" option. Could someone give me | > some pointer here too? | | The docs have some info about each of the format strings | you can use for an "External Editor". | | Mo DeJong | Red Hat Inc I couldn't figure out which function to call to put the Editor view into the Class and XRef views. I did find what appears to be the constructor for the Class and XRef views though. Also, I couldn't get the Editor to be 80 chars wide by default. It is much smaller (around 60 characters). I tried changing line 119 in multiedit.tcl to have -width 80 instead of -width $width , but it didn't seem to have any effect. -D