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

List:       kde-panel-devel
Subject:    Re: Review Request: Allow hiding of items in the Kate Sessions
From:       "Aaron Seigo" <aseigo () kde ! org>
Date:       2010-09-06 18:10:22
Message-ID: 20100906181022.7069.89494 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/4264/#review7430
-----------------------------------------------------------

Ship it!


i've comment on some minor improvements to the code and UI that should be made, imho, \
but the patch looks generally ready. if you can tidy up these last few items, feel \
free to commit this improvement! thanks for the patch... :)


/trunk/KDE/kdesdk/kate/plasma/session/katesessionConfig.ui
<http://svn.reviewboard.kde.org/r/4264/#comment7633>

    this label is probably unnecessary: checking items is well understood to mean \
"select", and with the title just being "Sessions to show" what that selection means \
will be clear.



/trunk/KDE/kdesdk/kate/plasma/session/katesessionapplet.h
<http://svn.reviewboard.kde.org/r/4264/#comment7636>

    following naming conventions, this should be:
    
    QStringList hideList() const;



/trunk/KDE/kdesdk/kate/plasma/session/katesessionapplet.cpp
<http://svn.reviewboard.kde.org/r/4264/#comment7634>

    i wouldn't bother with m_hideList in the KateSessionApplet class. the only time \
it is used, it is read from the configuration file first!  
    instead, here i would just put:
    
    const QStringList hideList = config().readEntry("hideList", QStringList());



/trunk/KDE/kdesdk/kate/plasma/session/katesessionapplet.cpp
<http://svn.reviewboard.kde.org/r/4264/#comment7632>

    perhaps just "Sessions to show"
    



/trunk/KDE/kdesdk/kate/plasma/session/katesessionapplet.cpp
<http://svn.reviewboard.kde.org/r/4264/#comment7635>

    without m_hideList this just becomes:
    
    config().writeEntry("hideList", m_config->hideList());


- Aaron


On 2010-09-06 06:31:35, Yuen Hoe Lim wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/4264/
> -----------------------------------------------------------
> 
> (Updated 2010-09-06 06:31:35)
> 
> 
> Review request for Kate and Plasma.
> 
> 
> Summary
> -------
> 
> Allows the user to specify which items to show or hide in the Kate Sessions \
> Plasmoid using a configuration interface. Two possible use-cases for this: 
> 1) Allow users who just want quick access to their projects to remove the default \
> three items (Start Kate, New Session etc), which can take up a lot of space since \
> the applet is usually quite small. 
> 2) Allow multiple applets displaying different lists, for example having applets in \
> different activities each displaying only sessions related to that activity. 
> The Kate Sessions Plasmoid currently does not have a configuration interface so I \
> thought this is probably no harm :) I have attached a screenshot of the \
> configuration UI. I'm somewhat inexperienced with QtDesigner so feedback on how I \
> could improve the patch code or the config UI are most welcome :) 
> 
> Diffs
> -----
> 
> /trunk/KDE/kdesdk/kate/plasma/session/CMakeLists.txt 1171815 
> /trunk/KDE/kdesdk/kate/plasma/session/katesessionConfig.ui PRE-CREATION 
> /trunk/KDE/kdesdk/kate/plasma/session/katesessionapplet.h 1171815 
> /trunk/KDE/kdesdk/kate/plasma/session/katesessionapplet.cpp 1171815 
> 
> Diff: http://svn.reviewboard.kde.org/r/4264/diff
> 
> 
> Testing
> -------
> 
> Tested on trunk on my computer. Works as far as I can tell.
> 
> 
> Screenshots
> -----------
> 
> Config UI Screenshot
> http://svn.reviewboard.kde.org/r/4264/s/428/
> Updated config UI screenshot
> http://svn.reviewboard.kde.org/r/4264/s/497/
> 
> 
> Thanks,
> 
> Yuen Hoe
> 
> 


[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="http://svn.reviewboard.kde.org/r/4264/">http://svn.reviewboard.kde.org/r/4264/</a>
  </td>
    </tr>
   </table>
   <br />



 <p>Ship it!</p>



 <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;ve comment on some \
minor improvements to the code and UI that should be made, imho, but the patch looks \
generally ready. if you can tidy up these last few items, feel free to commit this \
improvement! thanks for the patch... :)</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="/r/4264/diff/3/?file=35279#file35279line28" style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdesdk/kate/plasma/session/katesessionConfig.ui</a>  <span \
style="font-weight: normal;">

     (Diff revision 3)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>

  </tr>
 </tbody>




 
 



 <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">28</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        \
&lt;widget class=&quot;QLabel&quot; name=&quot;label&quot;&gt;</pre></td>  </tr>

  <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">29</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">         \
&lt;property name=&quot;text&quot;&gt;</pre></td>  </tr>

  <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">30</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">          \
&lt;string&gt;Uncheck items to hide them&lt;/string&gt;</pre></td>  </tr>

  <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">31</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">         \
&lt;/property&gt;</pre></td>  </tr>

  <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">32</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        \
&lt;/widget&gt;</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 label \
is probably unnecessary: checking items is well understood to mean \
&quot;select&quot;, and with the title just being &quot;Sessions to show&quot; what \
that selection means will be clear.</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="/r/4264/diff/3/?file=35280#file35280line38" style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdesdk/kate/plasma/session/katesessionapplet.h</a>  <span \
style="font-weight: normal;">

     (Diff revision 3)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>  <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; ">public:</pre></td>

  </tr>
 </tbody>




 
 



 <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">38</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">QStringList</span> <span class="n">getHideList</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;">following \
naming conventions, this should be:

QStringList hideList() const;</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="/r/4264/diff/3/?file=35281#file35281line102" style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdesdk/kate/plasma/session/katesessionapplet.cpp</a>  <span \
style="font-weight: normal;">

     (Diff revision 3)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">QWidget *KateSessionApplet::widget()</pre></td>

  </tr>
 </tbody>




 
 



 <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">102</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">m_hideList</span> <span class="o">=</span> <span \
class="n">config</span><span class="p">().</span><span \
class="n">readEntry</span><span class="p">(</span><span \
class="s">&quot;hideList&quot;</span><span class="p">,</span><span \
class="n">QStringList</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;">i \
wouldn&#39;t bother with m_hideList in the KateSessionApplet class. the only time it \
is used, it is read from the configuration file first!

instead, here i would just put:

const QStringList hideList = config().readEntry(&quot;hideList&quot;, \
QStringList());</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="/r/4264/diff/3/?file=35281#file35281line212" style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdesdk/kate/plasma/session/katesessionapplet.cpp</a>  <span \
style="font-weight: normal;">

     (Diff revision 3)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>  <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; ">void KateSessionApplet::createConfigurationInterface(KConfigDialog \
*parent)</pre></td>

  </tr>
 </tbody>




 
 



 <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">212</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">              \
<span class="n">i18n</span><span class="p">(</span><span class="s">&quot;Show or hide \
items in the applet.&quot;</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;">perhaps \
just &quot;Sessions to show&quot; </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="/r/4264/diff/3/?file=35281#file35281line219" style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdesdk/kate/plasma/session/katesessionapplet.cpp</a>  <span \
style="font-weight: normal;">

     (Diff revision 3)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>  <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; ">void KateSessionApplet::slotSaveConfig()</pre></td>

  </tr>
 </tbody>




 
 



 <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">219</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">m_hideList</span> <span class="o">=</span> <span \
class="n">m_config</span><span class="o">-&gt;</span><span \
class="n">getHideList</span><span class="p">();</span></pre></td>  </tr>

  <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">220</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">config</span><span class="p">().</span><span \
class="n">writeEntry</span><span class="p">(</span><span \
class="s">&quot;hideList&quot;</span><span class="p">,</span> <span \
class="n">m_hideList</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;">without \
m_hideList this just becomes:

config().writeEntry(&quot;hideList&quot;, m_config-&gt;hideList());</pre>
</div>
<br />



<p>- Aaron</p>


<br />
<p>On September 6th, 2010, 6:31 a.m., Yuen Hoe Lim wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://svn.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Kate and Plasma.</div>
<div>By Yuen Hoe Lim.</div>


<p style="color: grey;"><i>Updated 2010-09-06 06:31:35</i></p>




<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;">Allows the user to specify which items to show or hide in the Kate \
Sessions Plasmoid using a configuration interface. Two possible use-cases for this:

1) Allow users who just want quick access to their projects to remove the default \
three items (Start Kate, New Session etc), which can take up a lot of space since the \
applet is usually quite small.

2) Allow multiple applets displaying different lists, for example having applets in \
different activities each displaying only sessions related to that activity.

The Kate Sessions Plasmoid currently does not have a configuration interface so I \
thought this is probably no harm :) I have attached a screenshot of the configuration \
UI. I&#39;m somewhat inexperienced with QtDesigner so feedback on how I could improve \
the patch code or the config UI are most welcome :)</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;">Tested on trunk on my computer. Works as far as I can tell.</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>/trunk/KDE/kdesdk/kate/plasma/session/CMakeLists.txt <span style="color: \
grey">(1171815)</span></li>

 <li>/trunk/KDE/kdesdk/kate/plasma/session/katesessionConfig.ui <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>/trunk/KDE/kdesdk/kate/plasma/session/katesessionapplet.h <span style="color: \
grey">(1171815)</span></li>

 <li>/trunk/KDE/kdesdk/kate/plasma/session/katesessionapplet.cpp <span style="color: \
grey">(1171815)</span></li>

</ul>

<p><a href="http://svn.reviewboard.kde.org/r/4264/diff/" style="margin-left: \
3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Screenshots </h1>

<div>

 <a href="http://svn.reviewboard.kde.org/r/4264/s/428/"><img \
src="http://svn.reviewboard.kde.org/media/uploaded/images/2010/06/09/katesessionconfig_400x100.jpeg" \
style="border: 1px black solid;" alt="Config UI Screenshot" /></a>

 <a href="http://svn.reviewboard.kde.org/r/4264/s/497/"><img \
src="http://svn.reviewboard.kde.org/media/uploaded/images/2010/09/05/katesessionfixedscreeny_400x100.jpeg" \
style="border: 1px black solid;" alt="Updated config UI screenshot" /></a>

</div>


  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


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

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