[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:       "Milian Wolff" <mail () milianw ! de>
Date:       2014-06-26 10:51:09
Message-ID: 20140626105109.26151.23965 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On June 24, 2014, 1:27 p.m., Dominik Haumann wrote:
> > I'd be fine with this patch (except again for two minor issues).
> > 
> > Though, at this point a bit of history:
> > Before Christoph's rewrite of the code folding code, Kate supported to store the \
> > code folding state past sessions (or also on reload). The code folding at that \
> > time was stored in KateDocument, so when you called: \
> > qobject_cast<KTE::ParameterizedSessionConfigInterface*>(doc)->readParameterizedSessionConfig(...);
> >  KateDocument automatically also loaded the folding state, see \
> > http://api.kde.org/4.x-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextE \
> > ditor_1_1ParameterizedSessionConfigInterface.html#a90fd95a71351bf21176752cce886f481
> >  
> > After the rewrite, the code folding state now is maintained per View, and saving \
> > the state past sessions was dropped (The readSessionConfig() API doesn't allow to \
> > pass the "SkipFolding" argument). It still works for file reloading, afaik. 
> > Why am I writing all this?
> > Because if we at some point add saving the code folding state past sessions \
> > again, this feature might clash with this setting (but not in a too bad way). 
> > So as of now: I'm ok with a ship-it, provided it lands in KF5 [first?] ;)
> 
> Dominik Haumann wrote:
> Btw, here is the bug report for remembering the folding state past sessions: \
> https://bugs.kde.org/show_bug.cgi?id=56958

Yes, but that is pretty unrelated to this patch, no? As you say, the feature is not \
there yet. And even then, we could simply either load a folding state or if there is \
none yet apply the initial folding. I don't see any issues there.


> On June 24, 2014, 1:27 p.m., Dominik Haumann wrote:
> > part/dialogs/textareaappearanceconfigwidget.ui, line 159
> > <https://git.reviewboard.kde.org/r/118748/diff/3/?file=284269#file284269line159>
> > 
> > fold -> folds

will fold -> folds

you mean? can do.


- Milian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118748/#review60900
-----------------------------------------------------------


On June 24, 2014, 9:53 a.m., Milian Wolff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118748/
> -----------------------------------------------------------
> 
> (Updated June 24, 2014, 9:53 a.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/view/kateview.cpp 5ede57e 
> part/utils/kateconfig.cpp 988610f 
> part/utils/kateconfig.h c0407f7 
> part/dialogs/katedialogs.cpp 868bff5 
> part/dialogs/textareaappearanceconfigwidget.ui 81cd098 
> 
> 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 />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On June 24th, 2014, 1:27 p.m. UTC, <b>Dominik \
Haumann</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">I&#39;d be fine with this patch (except again for two minor issues).

Though, at this point a bit of history:
Before Christoph&#39;s rewrite of the code folding code, Kate supported to store the \
code folding state past sessions (or also on reload). The code folding at that time \
was stored in KateDocument, so when you called:  \
qobject_cast&lt;KTE::ParameterizedSessionConfigInterface*&gt;(doc)-&gt;readParameterizedSessionConfig(...);
 KateDocument automatically also loaded the folding state, see \
http://api.kde.org/4.x-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextEditor_1_1ParameterizedSessionConfigInterface.html#a90fd95a71351bf21176752cce886f481


After the rewrite, the code folding state now is maintained per View, and saving the \
state past sessions was dropped (The readSessionConfig() API doesn&#39;t allow to \
pass the &quot;SkipFolding&quot; argument). It still works for file reloading, afaik.

Why am I writing all this?
Because if we at some point add saving the code folding state past sessions again, \
this feature might clash with this setting (but not in a too bad way).

So as of now: I&#39;m ok with a ship-it, provided it lands in KF5 [first?] ;)</pre>
 </blockquote>




 <p>On June 25th, 2014, 12:47 p.m. UTC, <b>Dominik Haumann</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Btw, here is the bug \
report for remembering the folding state past sessions: \
https://bugs.kde.org/show_bug.cgi?id=56958</pre>  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes, but that is pretty \
unrelated to this patch, no? As you say, the feature is not there yet. And even then, \
we could simply either load a folding state or if there is none yet apply the initial \
folding. I don&#39;t see any issues there.</pre> <br />







<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On June 24th, 2014, 1:27 p.m. UTC, <b>Dominik \
Haumann</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  



<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/3/?file=284269#file284269line159" \
style="color: black; font-weight: bold; text-decoration: \
underline;">part/dialogs/textareaappearanceconfigwidget.ui</a>  <span \
style="font-weight: normal;">

     (Diff revision 3)

    </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">159</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">         \
&lt;string&gt;When this setting is enabled, the editor view will automatically \
fold</pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">fold -&gt; folds</pre>  \
</blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">will fold \
-&gt; folds

you mean? can do.</pre>
<br />




<p>- Milian</p>


<br />
<p>On June 24th, 2014, 9:53 a.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 24, 2014, 9:53 a.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/view/kateview.cpp <span style="color: grey">(5ede57e)</span></li>

 <li>part/utils/kateconfig.cpp <span style="color: grey">(988610f)</span></li>

 <li>part/utils/kateconfig.h <span style="color: grey">(c0407f7)</span></li>

 <li>part/dialogs/katedialogs.cpp <span style="color: grey">(868bff5)</span></li>

 <li>part/dialogs/textareaappearanceconfigwidget.ui <span style="color: \
grey">(81cd098)</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