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

List:       kde-panel-devel
Subject:    D10297: Add new "Tools" button above System Monitor's process list
From:       Henrik Fehlauer <noreply () phabricator ! kde ! org>
Date:       2018-06-30 21:50:19
Message-ID: 1249eb1c385da46eeaf21248d27229ee () localhost ! localdomain
[Download RAW message or body]

[Attachment #2 (text/plain)]

rkflx accepted this revision.
rkflx added a comment.
This revision is now accepted and ready to land.


  Nice, accepting this for now (there's still one simplification you could make, \
though, see inline comment).  
  That said:
  
  - I only checked that the code looks good and it works fine. I'm still not too \
happy with how this is a button instead of a menu in KSysGuard (D10297#207127 \
<https://phabricator.kde.org/D10297#207127>). However, that's for #Plasma \
                <https://phabricator.kde.org/tag/plasma/> to decide.
  - I'd appreciate if someone from the long list of #Plasma \
<https://phabricator.kde.org/tag/plasma/> reviewers (on Phab and from ReviewBoard \
where this patch was submitted in September 2016) could also approve the final \
version.  
  If no one speaks up within a week, I'd say you can land the patch.

INLINE COMMENTS

> ksysguardprocesslist.cpp:430-432
> +    if (runCommandShortcutList.size() > 0) {
> +        runCommandAction->setShortcut(runCommandShortcutList[0].toString(QKeySequence::NativeText));
>  +    }

Meanwhile I learned (while checking why you kept `toString(QKeySequence::NativeText)` \
compared to my suggestion) that this can be written even simpler, no need for the \
`if` at all:

  runCommandAction->setShortcuts(runCommandShortcutList);

> gregormi wrote in ksysguardprocesslist.cpp:421-427
> It was supposed to serve as reminder of how the parameters for the globalShortcut \
> method were determined. To help debugging later. Should it be removed?

At least elsewhere <https://lxr.kde.org/source/kde/workspace/plasma-workspace/containmentactions/contextmenu/menu.cpp#0099> \
there is no such comment and I doubt the object's name will change in the future, but \
if you want to keep it, that's also fine with me.

> gregormi wrote in ksysguardprocesslist.cpp:429
> Yes, is this much better.
> 
> Might there be a chance of a some kind of keyboard shortcut conflict because we now \
> set it also locally?

> Might there be a chance of a some kind of keyboard shortcut conflict because we now \
> set it also locally?

Not sure whether there are any guarantees, but at least swapping the shortcuts \
between Run Command and Kill a Window, we can observe that in case of (silent) \
conflicts the global shortcut has precedence, i.e. "it works"™.

Perhaps only setting the string is cleaner, but then due to `\t` we'd have RTL \
problems again like in your other patch. I'd go the shortcut way, unless anybody from \
#Plasma <https://phabricator.kde.org/tag/plasma/> comes up with good reasons not to.

REPOSITORY
  R111 KSysguard Library

BRANCH
  arcpatch-D10297_2

REVISION DETAIL
  https://phabricator.kde.org/D10297

To: gregormi, #plasma, colomar, broulik, mart, hein, rkflx
Cc: apol, anthonyfieroni, andreaska, rkflx, ngraham, plasma-devel, ragreen, Pitel, \
ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, mart


[Attachment #3 (text/html)]

<table><tr><td style="">rkflx accepted this revision.<br />rkflx added a comment.<br \
/>This revision is now accepted and ready to land. </td><a style="text-decoration: \
none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: \
bold; border-radius: 3px; background-color: #F7F7F9; background-image: \
linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid \
rgba(71,87,120,.2);" href="https://phabricator.kde.org/D10297">View \
Revision</a></tr></table><br /><div><div><p>Nice, accepting this for now \
(there&#039;s still one simplification you could make, though, see inline \
comment).</p>

<p>That said:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">I only checked that the code looks good and it works \
fine. I&#039;m still not too happy with how this is a button instead of a menu in \
KSysGuard (<a href="https://phabricator.kde.org/D10297#207127" \
style="background-color: #e7e7e7;  border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D10297#207127</a>). However, \
that&#039;s for <a href="https://phabricator.kde.org/tag/plasma/" \
style="background-color: #e7e7e7;  border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">#Plasma</a> to decide.</li>
<li class="remarkup-list-item">I&#039;d appreciate if someone from the long list of \
<a href="https://phabricator.kde.org/tag/plasma/" style="background-color: #e7e7e7;  \
border-color: #e7e7e7;  border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">#Plasma</a> reviewers (on Phab and \
from ReviewBoard where this patch was submitted in September 2016) could also approve \
the final version.</li> </ul>

<p>If no one speaks up within a week, I&#039;d say you can land the \
patch.</p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div \
style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: \
3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; \
border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; \
background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; \
text-decoration: none;" href="https://phabricator.kde.org/D10297#inline-72716">View \
Inline</a><span style="color: #4b4d51; font-weight: \
bold;">ksysguardprocesslist.cpp:430-432</span></div> <div style="font: 11px/15px \
&quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, monospace; white-space: \
pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; \
margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: \
#aa4000">if</span> <span class="p">(</span><span \
class="n">runCommandShortcutList</span><span class="p">.</span><span \
class="n">size</span><span class="p">()</span> <span style="color: \
#aa2211">&gt;</span> <span style="color: #601200">0</span><span class="p">)</span> \
<span class="p">{</span> </div><div style="padding: 0 8px; margin: 0 4px; background: \
rgba(151, 234, 151, .6);">        <span class="n">runCommandAction</span><span \
style="color: #aa2211">-&gt;</span><span class="n">setShortcut</span><span \
class="p">(</span><span class="n">runCommandShortcutList</span><span \
class="p">[</span><span style="color: #601200">0</span><span class="p">].</span><span \
class="n">toString</span><span class="p">(</span><span \
class="n">QKeySequence</span><span style="color: #aa2211">::</span><span \
class="n">NativeText</span><span class="p">));</span> </div><div style="padding: 0 \
8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span \
class="p">}</span> </div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: \
8px;">Meanwhile I learned (while checking why you kept <tt style="background: \
#ebebeb; font-size: 13px;">toString(QKeySequence::NativeText)</tt> compared to my \
suggestion) that this can be written even simpler, no need for the <tt \
style="background: #ebebeb; font-size: 13px;">if</tt> at all:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" \
data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px \
&quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, monospace; padding: \
12px; margin: 0; background: rgba(71, 87, 120, \
0.08);">runCommandAction-&gt;setShortcuts(runCommandShortcutList);</pre></div></div></div><br \
/><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; \
background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 \
1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; \
overflow: hidden;"><a style="float: right; text-decoration: none;" \
href="https://phabricator.kde.org/D10297#inline-72605">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">gregormi</span> wrote in <span \
style="color: #4b4d51; font-weight: \
bold;">ksysguardprocesslist.cpp:421-427</span></div> <div style="margin: 8px 0; \
padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">It was supposed \
to serve as reminder of how the parameters for the globalShortcut method were \
determined. To help debugging later. Should it be removed?</p></div></div> <div \
style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">At least \
<a href="https://lxr.kde.org/source/kde/workspace/plasma-workspace/containmentactions/contextmenu/menu.cpp#0099" \
class="remarkup-link" target="_blank" rel="noreferrer">elsewhere</a> there is no such \
comment and I doubt the object&#039;s name will change in the future, but if you want \
to keep it, that&#039;s also fine with me.</p></div></div><br /><div style="border: \
1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; \
border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div \
style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a \
style="float: right; text-decoration: none;" \
href="https://phabricator.kde.org/D10297#inline-72608">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">gregormi</span> wrote in <span \
style="color: #4b4d51; font-weight: bold;">ksysguardprocesslist.cpp:429</span></div> \
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; \
margin: 8px;">Yes, is this much better.</p>

<p style="padding: 0; margin: 8px;">Might there be a chance of a some kind of \
keyboard shortcut conflict because we now set it also locally?</p></div></div> <div \
style="margin: 8px 0; padding: 0 12px;"><blockquote style="border-left: 3px solid \
#a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; \
background-color: #f8f9fc;"><p style="padding: 0; margin: 8px;">Might there be a \
chance of a some kind of keyboard shortcut conflict because we now set it also \
locally?</p></blockquote>

<p style="padding: 0; margin: 8px;">Not sure whether there are any guarantees, but at \
least swapping the shortcuts between <span><span class="phui-tag-view \
phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Run \
Command</span></span></span> and <span><span class="phui-tag-view phui-tag-type-shade \
phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Kill a \
Window</span></span></span>, we can observe that in case of (silent) conflicts the \
global shortcut has precedence, i.e. &quot;it works&quot;™.</p>

<p style="padding: 0; margin: 8px;">Perhaps only setting the string is cleaner, but \
then due to <tt style="background: #ebebeb; font-size: 13px;">\t</tt> we&#039;d have \
RTL problems again like in your other patch. I&#039;d go the shortcut way, unless \
anybody from <a href="https://phabricator.kde.org/tag/plasma/" \
style="background-color: #e7e7e7;  border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">#Plasma</a> comes up with good reasons \
not to.</p></div></div></div></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R111 KSysguard \
Library</div></div></div><br \
/><div><strong>BRANCH</strong><div><div>arcpatch-D10297_2</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D10297">https://phabricator.kde.org/D10297</a></div></div><br \
/><div><strong>To: </strong>gregormi, Plasma, colomar, broulik, mart, hein, rkflx<br \
/><strong>Cc: </strong>apol, anthonyfieroni, andreaska, rkflx, ngraham, plasma-devel, \
ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, \
mart<br /></div>



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

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