[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Re: Review Request 118748: Add option to fold comment block at the start of a file.
From: "Dominik Haumann" <dhaumann () kde ! org>
Date: 2014-06-19 10:28:59
Message-ID: 20140619102859.5749.35109 () probe ! kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118748/#review60490
-----------------------------------------------------------
Except the missing "Set", the patch looks pretty good.
part/utils/kateconfig.cpp
<https://git.reviewboard.kde.org/r/118748/#comment42241>
if (m_foldFirstLineSet
Set is missing.
part/view/kateview.cpp
<https://git.reviewboard.kde.org/r/118748/#comment42244>
Isn't kateTextLine(0) here what you want? plainKateTextLine() doesn't force a hl \
of this line, if it's not yet highlighted.
Well, given it's the first line, it's probably highlighted anyways...
part/view/kateview.cpp
<https://git.reviewboard.kde.org/r/118748/#comment42242>
This works for now. But ::isComment checks only for dsComment (we have quite some \
other default styles that are used in the context of coments).
- Dominik Haumann
On June 14, 2014, 7:30 p.m., Milian Wolff wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118748/
> -----------------------------------------------------------
>
> (Updated June 14, 2014, 7:30 p.m.)
>
>
> Review request for Kate.
>
>
> Repository: kate
>
>
> Description
> -------
>
> Add option to fold comment block at the start of a file.
>
> This is nice to save screen real-estate by hiding license headers.
> A setting for this is added, which is disabled by default.
>
>
> Diffs
> -----
>
> part/dialogs/textareaappearanceconfigwidget.ui \
> 81cd098f047dca34a7612e16784a0c9c341d0307 part/utils/kateconfig.h \
> c0407f750ea66718fbcdb5eae559e77d096835ed part/utils/kateconfig.cpp \
> 988610fdbdca56966366ebefaea318faecd26637 part/view/kateview.cpp \
> 5ede57e9af184c1f16098dadccec34211497d15a part/dialogs/katedialogs.cpp \
> 868bff522f4510562ff4958d34c60c73631e7a39
> Diff: https://git.reviewboard.kde.org/r/118748/diff/
>
>
> Testing
> -------
>
> Manual tests, seems to work nicely.
>
>
> Thanks,
>
> Milian Wolff
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/118748/">https://git.reviewboard.kde.org/r/118748/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Except the missing \
"Set", the patch looks pretty good.</pre> <br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/118748/diff/1/?file=281226#file281226line2020" \
style="color: black; font-weight: bold; text-decoration: \
underline;">part/utils/kateconfig.cpp</a> <span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">2020</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="k">if</span> <span class="p">(</span><span class="n">m_foldFirstLine</span> \
<span class="o">||</span> <span class="n">isGlobal</span><span \
class="p">())</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">if \
(m_foldFirstLineSet
Set is missing.</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/118748/diff/1/?file=281227#file281227line104" \
style="color: black; font-weight: bold; text-decoration: \
underline;">part/view/kateview.cpp</a> <span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">104</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="k">const</span> <span class="n">Kate</span><span class="o">::</span><span \
class="n">TextLine</span><span class="o">&</span> <span class="n">line</span> \
<span class="o">=</span> <span class="n">doc</span><span class="o">-></span><span \
class="n">plainKateTextLine</span><span class="p">(</span><span \
class="mi">0</span><span class="p">);</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Isn't \
kateTextLine(0) here what you want? plainKateTextLine() doesn't force a hl of \
this line, if it's not yet highlighted.
Well, given it's the first line, it's probably highlighted anyways...</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/118748/diff/1/?file=281227#file281227line105" \
style="color: black; font-weight: bold; text-decoration: \
underline;">part/view/kateview.cpp</a> <span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">105</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="k">return</span> <span class="n">doc</span><span class="o">-></span><span \
class="n">isComment</span><span class="p">(</span><span class="mi">0</span><span \
class="p">,</span> <span class="n">line</span> <span class="o">?</span> <span \
class="n">line</span><span class="o">-></span><span \
class="n">firstChar</span><span class="p">()</span> <span class="o">:</span> <span \
class="mi">1</span><span class="p">);</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This works \
for now. But ::isComment checks only for dsComment (we have quite some other default \
styles that are used in the context of coments).</pre> </div>
<br />
<p>- Dominik Haumann</p>
<br />
<p>On June 14th, 2014, 7:30 p.m. UTC, Milian Wolff wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Kate.</div>
<div>By Milian Wolff.</div>
<p style="color: grey;"><i>Updated June 14, 2014, 7:30 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kate
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Add option to fold comment block at the start of a file.
This is nice to save screen real-estate by hiding license headers.
A setting for this is added, which is disabled by default.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Manual tests, seems to work nicely.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>part/dialogs/textareaappearanceconfigwidget.ui <span style="color: \
grey">(81cd098f047dca34a7612e16784a0c9c341d0307)</span></li>
<li>part/utils/kateconfig.h <span style="color: \
grey">(c0407f750ea66718fbcdb5eae559e77d096835ed)</span></li>
<li>part/utils/kateconfig.cpp <span style="color: \
grey">(988610fdbdca56966366ebefaea318faecd26637)</span></li>
<li>part/view/kateview.cpp <span style="color: \
grey">(5ede57e9af184c1f16098dadccec34211497d15a)</span></li>
<li>part/dialogs/katedialogs.cpp <span style="color: \
grey">(868bff522f4510562ff4958d34c60c73631e7a39)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/118748/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
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