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

List:       kde-panel-devel
Subject:    Re: Review Request: Add a link to the current desktop folder instead of an
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2012-02-01 11:35:37
Message-ID: 20120201113537.11795.92885 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103830/#review10265
-----------------------------------------------------------


i really don't like this change because it puts in a hardcoded assumption a=
bout folderview into an independent component. is folderview the only apple=
t/containment that should behave this way? probably not. what if we replace=
 folderview someday with something else? is kickoff the only place from whi=
ch you can add an item to a folderview? =


it's just not generic enough, and that "no assumptions" approach is somethi=
ng that we stick to in plasma which allows us to easily pull components out=
, replace them with others, etc. we already have this solved when there is =
a drag and drop event: each applet handles its own drop events and does wha=
t is necessary.

on the other hand, i also don't want to see an "addUrl" type method to Appl=
et since that is going to be irrelevant to the vast majority of Applets and=
 itself contains some assumptions.

this calls for a better solution that can be implemented in the target Appl=
et and which doesn't result in assumptions about what the source or targets=
 are.


plasma/desktop/applets/kickoff/ui/contextmenufactory.cpp
<http://git.reviewboard.kde.org/r/103830/#comment8447>

    i would turn this into a an "else if" and get rid of one level of inden=
tation


- Aaron J. Seigo


On Jan. 31, 2012, 3:45 p.m., Ignat Semenov wrote:
> =

> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103830/
> -----------------------------------------------------------
> =

> (Updated Jan. 31, 2012, 3:45 p.m.)
> =

> =

> Review request for Plasma and Aaron J. Seigo.
> =

> =

> Description
> -------
> =

> Currently, right-clicking a Kickoff/Classical application launcher entry =
and selectiong "Add to Desktop" puts an icon applet on the desktop. However=
, if the desktop is set to Folderview, it is more consistent to add a link =
to the currently displayed folder. This patch cheks if the "folderview" plu=
gin is used in the desktop containment and performs a KIO::link() if that's=
 the case.
> =

> =

> Diffs
> -----
> =

>   plasma/desktop/applets/kickoff/ui/contextmenufactory.cpp 8db9655 =

> =

> Diff: http://git.reviewboard.kde.org/r/103830/diff/diff
> =

> =

> Testing
> -------
> =

> Tested, works.
> =

> =

> Thanks,
> =

> Ignat Semenov
> =

>


[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://git.reviewboard.kde.org/r/103830/">http://git.reviewboard.kde.org/r/103830/</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;">i really don&#39;t like \
this change because it puts in a hardcoded assumption about folderview into an \
independent component. is folderview the only applet/containment that should behave \
this way? probably not. what if we replace folderview someday with something else? is \
kickoff the only place from which you can add an item to a folderview? 

it&#39;s just not generic enough, and that &quot;no assumptions&quot; approach is \
something that we stick to in plasma which allows us to easily pull components out, \
replace them with others, etc. we already have this solved when there is a drag and \
drop event: each applet handles its own drop events and does what is necessary.

on the other hand, i also don&#39;t want to see an &quot;addUrl&quot; type method to \
Applet since that is going to be irrelevant to the vast majority of Applets and \
itself contains some assumptions.

this calls for a better solution that can be implemented in the target Applet and \
which doesn&#39;t result in assumptions about what the source or targets are.</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="http://git.reviewboard.kde.org/r/103830/diff/1/?file=48471#file48471line327" \
style="color: black; font-weight: bold; text-decoration: \
underline;">plasma/desktop/applets/kickoff/ui/contextmenufactory.cpp</a>  <span \
style="font-weight: normal;">

     (Diff revision 1)

    </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; ">void \
ContextMenuFactory::showContextMenu(QAbstractItemView *view,</pre></td>

  </tr>
 </tbody>






 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">323</font></th>  <td bgcolor="#ffffff" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">                        <span \
class="p">}</span> <span class="k">else</span> <span class="p">{</span></pre></td>  \
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">327</font></th>  <td bgcolor="#ffffff" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">              \
<span class="p">}</span> <span class="k">else</span> <span \
class="p">{</span></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">328</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="tb">	</span><span class="tb">	</span><span class="tb">	</span>   <span \
class="k">if</span> <span class="p">(</span><span class="n">desktop</span><span \
class="o">-&gt;</span><span class="n">pluginName</span><span class="p">()</span> \
<span class="o">==</span> <span class="s">&quot;folderview&quot;</span><span \
class="p">)</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 would \
turn this into a an &quot;else if&quot; and get rid of one level of indentation</pre> \
</div> <br />



<p>- Aaron J.</p>


<br />
<p>On January 31st, 2012, 3:45 p.m., Ignat Semenov wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/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 Plasma and Aaron J. Seigo.</div>
<div>By Ignat Semenov.</div>


<p style="color: grey;"><i>Updated Jan. 31, 2012, 3:45 p.m.</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;">Currently, right-clicking a Kickoff/Classical application launcher entry \
and selectiong &quot;Add to Desktop&quot; puts an icon applet on the desktop. \
However, if the desktop is set to Folderview, it is more consistent to add a link to \
the currently displayed folder. This patch cheks if the &quot;folderview&quot; plugin \
is used in the desktop containment and performs a KIO::link() if that&#39;s the \
case.</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, works.</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>plasma/desktop/applets/kickoff/ui/contextmenufactory.cpp <span style="color: \
grey">(8db9655)</span></li>

</ul>

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




  </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