[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ktexteditor-devel
Subject:    Re: [RFC] new Interface to provide custom label/line
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2008-04-07 23:02:08
Message-ID: 20080407230208.GB3837 () morpheus ! apaku ! dnsalias ! org
[Download RAW message or body]

On 12.01.08 12:26:05, Andreas Pakulat wrote:
> On 12.01.08 13:48:47, Hamish Rodda wrote:
> > On Sun, 6 Jan 2008 03:48:12 am Andreas Pakulat wrote:
> > > Hi,
> > >
> > > for KDevelop4 I'd like to have support for showing a custom label for
> > > each line of a text file. I don't yet have any specific idea how to
> > > implement this as I don't have much (if any) experience how you guys
> > > design the KTE interfaces.
> > 
> > Moving to ktexteditor-devel, where the api stuff should be discussed...
> 
> Oh, wasn't aware that it exists. Thanks.
> 
> > > Why feature-wishes are: Setting a text which is shown on a new border
> > > similar to the linenumbers, changing the background for the text and
> > > providing tooltip information for that text. The text can be set for
> > > each line in the file.
> > 
> > What do you plan to do with this interface?
> 
> Showing the authors userid directly on the border.
> 
> > What should happen when the text is too long?
> 
> Add an elipsis. I think using a small (maybe configurable) fixed font
> and limiting this to maybe 10 or 12 chars should be quite ok.
> 
> >  How wide should the border column be?
> 
> See above, 10 to 12 chars maybe. Its really intended just for very
> little information directly shown, most important for VCS is the
> username and also the coloring to see which parts of a file where
> changed together. Anything else would be in a tooltip when hovering over
> the border...

Ok, so I've finished a first implementation for the interface and
adjusted the interfaces themselves a bit more too. It works quite fine
now I think and it seems to be quite fast. 

Cross-Posting to kwrite-devel to get comments on the implementation.

If anybody spots breakages of code style just let me know the place and
I'll see that I fix it. Unfortunately the code I touched had a couple of
different styles so I tried to pick one thats used widely.

Any comments welcome, there's one problem which I don't have time today
(maybe not before the weekend) to tackle: The highlighting-border is not
properly drawn on word-wrapped lines. 

Patches:

kte-interfaces:
www.apaku.de/vardata/kte_annotation_iface.diff

kate-implementation (including a small test for katetest):
www.apaku.de/vardata/kate_impl_annotation.diff

Andreas

-- 
Afternoon very favorable for romance.  Try a single person for a change.
_______________________________________________
KTextEditor-Devel mailing list
KTextEditor-Devel@kde.org
https://mail.kde.org/mailman/listinfo/ktexteditor-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic