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

List:       kwrite-devel
Subject:    Re: Re: Re: [Python, again] Proposal to deprecate kate.gui module
From:       "Philipp A." <flying-sheep () web ! de>
Date:       2013-11-11 16:55:35
Message-ID: CAN8d9gkytFjDoM79E6Gtj9ZWgLot4mH_wVtXE8pB9jAj6jOdRg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Amazing, the mark interface should be sufficient to improve the linting
manifold. Just add marks with type error or warning, and that's already
much better.

But what we can't do (AFAIK) is adding individual descriptions to marks. I
could fake it if there were a markHovered signal carrying the line number,
but even better would be overloading setMarkDescription to accept a line
number. It's not necessary to be able to call it multiple times per mark
type and line, as one can simply concatenate multiple strings before
setting the mark description, or get the current description, append a new
line, and set the new string.
Am 11.11.2013 17:02 schrieb "Dominik Haumann" <dhaumann@kde.org>:

> On Monday, November 11, 2013 13:00:03 Philipp A. wrote:
> > 2013/11/11 Dominik Haumann <dhaumann@kde.org>
> >
> > > Maybe it would be a good idea to add notifications on the Kate
> application
> > > level. Maybe as button/icon on the very bottom right.
> > >
> > > That would be the cleanest solution in my opinion.
> > >
> > > As always, we'd need an interface for this + implementation.
> >
> > we don’t need to write anything, there’s already a great repacement
> for
> > single-line messages:
> >
> > message = KTextEditor.Message(KTextEditor.Message.Positive, "something")
> > document.postMessage(message)
>
> Yes, this works for all document related messages. But not for generic
> application level messages. Arbitrary example: Kate did not find a file,
> now
> it wants to notify the user: Posting it into another document is not an
> option.
>
> But I don't know how notifications are use in python plugins.
>
> > And is there something that can be used as an interface for linters? Like
> > being able to highlight a bunch of lines and creating symbols on the
> symbol
> > bar (the one next to the line numbers), which show a small message on
> > hover? That would be awesome to replace the clumsy popups as linter
> output.
>
> All that exists: You create the highlighting with KTextEditor::MovingRanges
> and KTextEditor::MovingInterface. You create an icon by adding a mark to
> the
> bar, see KTextEditor::MarkInterface.
>
> Greetings,
> Dominik
> _______________________________________________
> KWrite-Devel mailing list
> KWrite-Devel@kde.org
> https://mail.kde.org/mailman/listinfo/kwrite-devel
>

[Attachment #5 (text/html)]

<p dir="ltr">Amazing, the mark interface should be sufficient to improve the linting \
manifold. Just add marks with type error or warning, and that&#39;s already much \
better.</p> <p dir="ltr">But what we can&#39;t do (AFAIK) is adding individual \
descriptions to marks. I could fake it if there were a markHovered signal carrying \
the line number, but even better would be overloading setMarkDescription to accept a \
line number. It&#39;s not necessary to be able to call it multiple times per mark \
type and line, as one can simply concatenate multiple strings before setting the mark \
description, or get the current description, append a new line, and set the new \
string.</p>

<div class="gmail_quote">Am 11.11.2013 17:02 schrieb &quot;Dominik Haumann&quot; \
&lt;<a href="mailto:dhaumann@kde.org">dhaumann@kde.org</a>&gt;:<br \
type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"> On Monday, November 11, 2013 \
13:00:03 Philipp A. wrote:<br> &gt; 2013/11/11 Dominik Haumann &lt;<a \
href="mailto:dhaumann@kde.org">dhaumann@kde.org</a>&gt;<br> &gt;<br>
&gt; &gt; Maybe it would be a good idea to add notifications on the Kate \
application<br> &gt; &gt; level. Maybe as button/icon on the very bottom right.<br>
&gt; &gt;<br>
&gt; &gt; That would be the cleanest solution in my opinion.<br>
&gt; &gt;<br>
&gt; &gt; As always, we&#39;d need an interface for this + implementation.<br>
&gt;<br>
&gt; we don’t need to write anything, there’s already a great \
repacement for<br> &gt; single-line messages:<br>
&gt;<br>
&gt; message = KTextEditor.Message(KTextEditor.Message.Positive, \
&quot;something&quot;)<br> &gt; document.postMessage(message)<br>
<br>
Yes, this works for all document related messages. But not for generic<br>
application level messages. Arbitrary example: Kate did not find a file, now<br>
it wants to notify the user: Posting it into another document is not an<br>
option.<br>
<br>
But I don&#39;t know how notifications are use in python plugins.<br>
<br>
&gt; And is there something that can be used as an interface for linters? Like<br>
&gt; being able to highlight a bunch of lines and creating symbols on the symbol<br>
&gt; bar (the one next to the line numbers), which show a small message on<br>
&gt; hover? That would be awesome to replace the clumsy popups as linter output.<br>
<br>
All that exists: You create the highlighting with KTextEditor::MovingRanges<br>
and KTextEditor::MovingInterface. You create an icon by adding a mark to the<br>
bar, see KTextEditor::MarkInterface.<br>
<br>
Greetings,<br>
Dominik<br>
_______________________________________________<br>
KWrite-Devel mailing list<br>
<a href="mailto:KWrite-Devel@kde.org">KWrite-Devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kwrite-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/kwrite-devel</a><br> \
</blockquote></div>



_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


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

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