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

List:       kde-usability
Subject:    Re: [KDE Usability] Review Request 127054: Add a Filter Toolbar Button for Dolphin
From:       arnav dhamija <arnav.dhamija () gmail ! com>
Date:       2016-03-25 8:24:47
Message-ID: 20160325082447.21226.22280 () mimi ! kde ! org
[Download RAW message or body]

--===============0412399634299858601==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit



> On March 25, 2016, 7:43 a.m., Emmanuel Pescosta wrote:
> > dolphinmainwindow.cpp, line 548
> > <https://git.reviewboard.kde.org/r/127054/diff/11/?file=453601#file453601line548>
> > 
> > Wouldn't it be better to wire the toggleFilterBar to the toggled signal on only \
> > change the visibility state in this slot?  
> > 1. We can avoid the updateViewActions() call which updates not only the filter \
> > bar action but many more things 2. The visibility state of the toggle bar always \
> > follows the action toggled state - which is easier to understand than changing \
> > the toggled state of his own trigger IMHO

The problem with using Toggled in the slot as I just tried it out is that it causes \
Dolphin to crash with a segfault. As Thomas Lubking explains it:  
    The crash cause will have been the toggled signal which is prone to cause \
recursions when bound to slots which, well, toggle the action ;-)

I also made a small change to dolphinviewcontainer.cpp, that is I got \
DolphinViewContainer::setFilterBarVisible(bool visible) to emit the signal \
showFilterBarChanged. Then, I removed the updateViewActions() function from \
toggleFilterBar and setFilterBarFocus in the dolphinmainwindow.cpp file. Also, I \
guess we can re-introduce an updateFilterBar function to slim down usage of \
updateViewAction()?


- arnav


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


On March 19, 2016, 4:04 a.m., arnav dhamija wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127054/
> -----------------------------------------------------------
> 
> (Updated March 19, 2016, 4:04 a.m.)
> 
> 
> Review request for Dolphin, KDE Usability and Emmanuel Pescosta.
> 
> 
> Repository: dolphin
> 
> 
> Description
> -------
> 
> This patch was created to implement the feature suggested here: \
> [https://todo.kde.org/?controller=task&action=show&task_id=966](https://todo.kde.org/?controller=task&action=show&task_id=966)
>  
> This patch adds a Filter Button to the toolbar of Dolphin. This button can be \
> toggled to show/hide the Filter Bar. 
> In this patch, one might notice that there is now show_filter_bar and \
> show_filter_bar_button in dolphinui.rc file. This was done because I found that \
> using the same action for the menu entry and the toolbar entry would cause \
> something to break (eg, shortcuts would stop working).  
> A screenshot of the toolbar is also attached.
> 
> 
> Diffs
> -----
> 
> dolphinmainwindow.h 7003e94 
> dolphinmainwindow.cpp f7a7613 
> dolphinviewcontainer.h 62f9110 
> dolphinviewcontainer.cpp 8fea3ba 
> 
> Diff: https://git.reviewboard.kde.org/r/127054/diff/
> 
> 
> Testing
> -------
> 
> manual
> 
> 
> File Attachments
> ----------------
> 
> dolphintoolbar.png
> https://git.reviewboard.kde.org/media/uploaded/files/2016/02/12/d936e5d0-557c-45c5-9a2d-f849e5d284a6__dolphintoolbar.png
>  
> 
> Thanks,
> 
> arnav dhamija
> 
> 


--===============0412399634299858601==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/127054/">https://git.reviewboard.kde.org/r/127054/</a>
  </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On March 25th, 2016, 7:43 a.m. UTC, <b>Emmanuel \
Pescosta</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/127054/diff/11/?file=453601#file453601line548" \
style="color: black; font-weight: bold; text-decoration: \
underline;">dolphinmainwindow.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 11)

    </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">542</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">updateViewActions</span><span class="p">();</span></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;">Wouldn&#39;t it be \
better to wire the toggleFilterBar to the toggled signal on only change the \
visibility state in this slot? 

1. We can avoid the updateViewActions() call which updates not only the filter bar \
action but many more things 2. The visibility state of the toggle bar always follows \
the action toggled state - which is easier to understand than changing the toggled \
state of his own trigger IMHO</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;"><p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">The problem with using Toggled in the slot as I just tried it out is that \
it causes Dolphin to crash with a segfault. As Thomas Lubking explains it:</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;"><div class="codehilite" style="background: #f8f8f8"><pre \
style="line-height: 125%">The crash cause will have been the toggled signal which is \
prone to cause recursions when bound to slots which, well, toggle the action ;-) \
</pre></div> </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">I also made a small change to \
dolphinviewcontainer.cpp, that is I got \
DolphinViewContainer::setFilterBarVisible(bool visible) to emit the signal \
showFilterBarChanged. Then, I removed the updateViewActions() function from \
toggleFilterBar and setFilterBarFocus in the dolphinmainwindow.cpp file. Also, I \
guess we can re-introduce an updateFilterBar function to slim down usage of \
updateViewAction()?</p></pre> <br />




<p>- arnav</p>


<br />
<p>On March 19th, 2016, 4:04 a.m. UTC, arnav dhamija wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for Dolphin, KDE Usability and Emmanuel Pescosta.</div>
<div>By arnav dhamija.</div>


<p style="color: grey;"><i>Updated March 19, 2016, 4:04 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
dolphin
</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">This patch was created to implement the feature \
suggested here: <a href="https://todo.kde.org/?controller=task&amp;action=show&amp;task_id=966" \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
normal;">https://todo.kde.org/?controller=task&amp;action=show&amp;task_id=966</a></p>
 <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">This patch adds a Filter Button to the toolbar of \
Dolphin. This button can be toggled to show/hide the Filter Bar.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">In this patch, one might notice that there is now show_filter_bar and \
show_filter_bar_button in dolphinui.rc file. This was done because I found that using \
the same action for the menu entry and the toolbar entry would cause something to \
break (eg, shortcuts would stop working). </p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">A screenshot of the \
toolbar is also attached.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">manual</p></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>dolphinmainwindow.h <span style="color: grey">(7003e94)</span></li>

 <li>dolphinmainwindow.cpp <span style="color: grey">(f7a7613)</span></li>

 <li>dolphinviewcontainer.h <span style="color: grey">(62f9110)</span></li>

 <li>dolphinviewcontainer.cpp <span style="color: grey">(8fea3ba)</span></li>

</ul>

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



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


 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2016/02/12/d936e5d0-557c-45c5-9a2d-f849e5d284a6__dolphintoolbar.png">dolphintoolbar.png</a></li>


</ul>




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







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


--===============0412399634299858601==--


[Attachment #3 (text/plain)]

_______________________________________________
kde-usability mailing list
kde-usability@kde.org
https://mail.kde.org/mailman/listinfo/kde-usability


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

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