[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Review Request 109124: qml port currentappcontrol
From: "David Edmundson" <david () davidedmundson ! co ! uk>
Date: 2013-02-24 14:18:12
Message-ID: 20130224141812.24482.46402 () 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/109124/#review27964
-----------------------------------------------------------
Looks pretty good.
Couple of pretty common mistakes to sort out.
plasma/netbook/applets/currentappcontrol/package/contents/ui/Task.qml
<http://git.reviewboard.kde.org/r/109124/#comment20942>
License
(copy and paste from another plasmoid, and be sure to change the year + name)
plasma/netbook/applets/currentappcontrol/package/contents/ui/Task.qml
<http://git.reviewboard.kde.org/r/109124/#comment20945>
x * (1/2) is an odd way to write x/2
plasma/netbook/applets/currentappcontrol/package/contents/ui/Task.qml
<http://git.reviewboard.kde.org/r/109124/#comment20946>
Remove commented out code.
plasma/netbook/applets/currentappcontrol/package/contents/ui/main.qml
<http://git.reviewboard.kde.org/r/109124/#comment20943>
License
plasma/netbook/applets/currentappcontrol/package/contents/ui/main.qml
<http://git.reviewboard.kde.org/r/109124/#comment20944>
it's better to do
i18n("%1 running apps", numberOfTasks());
as in some languages the order might be different.
see http://techbase.kde.org/Development/Tutorials/Localization/i18n_Mistakes#Pitfall_.232:_Word_Puzzles
(that's for C++, but the logic still applies)
Also you've ported to QML, you need to update the Messages.sh file in the folder to \
tell it to include QML files. Otherwise the i18n() commands in QML won't be extracted \
for translation. On top of that you need to tell it to look through subfolders as you \
now have a plasma package structure.
Make the replacement below.
- $XGETTEXT *.cpp -o $podir/plasma_applet_currentappcontrol.pot
+ $XGETTEXT `find . -name \*.qml` -o $podir/plasma_applet_currentappcontrol.pot
- David Edmundson
On Feb. 24, 2013, 11:10 a.m., Greg T wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109124/
> -----------------------------------------------------------
>
> (Updated Feb. 24, 2013, 11:10 a.m.)
>
>
> Review request for Plasma.
>
>
> Description
> -------
>
> Heya folks,
> This is a qml port of the netbook applet currentappcontrol. It's ready to use, but \
> not fully complete. Missing features/bugs:
> - If you click on the title on the task bar, it doesn't show the kwin present \
> windows effect, how to implement that? Is there interest in a 'kwin dataengine' or \
> should I go for a mixed C++/QML applet?
> - there is an annoyance in the task list(present windows fallback): I can set a \
> minimum height, but if I close a task and re-set the minimum height, the popup \
> won't shrink again, leaving an unpleasant empty space; plasma bug?
> - the close/restore buttons don't glow on hover. I couldn't load a theme svg using \
> the IconItem. Is that possible?
> - do you know how to read the size of the containment the widget is contained?
>
>
> Diffs
> -----
>
> plasma/netbook/applets/currentappcontrol/package/contents/ui/main.qml PRE-CREATION
> plasma/netbook/applets/currentappcontrol/package/metadata.desktop PRE-CREATION
> plasma/netbook/applets/currentappcontrol/CMakeLists.txt \
> 46178ce3a9351845855e9fccfbc13a9d3946fc95 CMakeLists.txt \
> 6084d7dd7655372506e02abe9f141b73155c5857 \
> plasma/netbook/applets/currentappcontrol/package/contents/ui/Task.qml PRE-CREATION \
>
> Diff: http://git.reviewboard.kde.org/r/109124/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Greg T
>
>
[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/109124/">http://git.reviewboard.kde.org/r/109124/</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;">Looks pretty good. \
Couple of pretty common mistakes to sort out.</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/109124/diff/1/?file=115224#file115224line1" \
style="color: black; font-weight: bold; text-decoration: \
underline;">plasma/netbook/applets/currentappcontrol/package/contents/ui/Task.qml</a> \
<span style="font-weight: normal;">
(Diff revision 1)
</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">1</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></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;">License \
(copy and paste from another plasmoid, and be sure to change the year + name)</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="http://git.reviewboard.kde.org/r/109124/diff/1/?file=115224#file115224line90" \
style="color: black; font-weight: bold; text-decoration: \
underline;">plasma/netbook/applets/currentappcontrol/package/contents/ui/Task.qml</a> \
<span style="font-weight: normal;">
(Diff revision 1)
</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">90</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> \
<span class="k">height:</span> <span class="p">(</span><span \
class="nx">parent</span><span class="p">.</span><span class="nx">height</span> <span \
class="o">*</span> <span class="p">(</span><span class="mi">1</span><span \
class="o">/</span><span class="mi">2</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;">x * (1/2) \
is an odd way to write x/2 </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="http://git.reviewboard.kde.org/r/109124/diff/1/?file=115224#file115224line118" \
style="color: black; font-weight: bold; text-decoration: \
underline;">plasma/netbook/applets/currentappcontrol/package/contents/ui/Task.qml</a> \
<span style="font-weight: normal;">
(Diff revision 1)
</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">118</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="c1">// PlasmaCore.IconItem {</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;">Remove \
commented out code.
</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="http://git.reviewboard.kde.org/r/109124/diff/1/?file=115225#file115225line1" \
style="color: black; font-weight: bold; text-decoration: \
underline;">plasma/netbook/applets/currentappcontrol/package/contents/ui/main.qml</a> \
<span style="font-weight: normal;">
(Diff revision 1)
</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">1</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></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;">License</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="http://git.reviewboard.kde.org/r/109124/diff/1/?file=115225#file115225line91" \
style="color: black; font-weight: bold; text-decoration: \
underline;">plasma/netbook/applets/currentappcontrol/package/contents/ui/main.qml</a> \
<span style="font-weight: normal;">
(Diff revision 1)
</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">91</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> \
<span class="k">text:</span> <span class="nx">numberOfTasks</span><span \
class="p">()</span> <span class="o">+</span> <span class="s2">" "</span> \
<span class="o">+</span> <span class="nx">i18n</span><span class="p">(</span><span \
class="s2">"running apps"</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;">it's \
better to do
i18n("%1 running apps", numberOfTasks());
as in some languages the order might be different.
see http://techbase.kde.org/Development/Tutorials/Localization/i18n_Mistakes#Pitfall_.232:_Word_Puzzles
(that's for C++, but the logic still applies)</pre>
</div>
<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;">Also you've ported \
to QML, you need to update the Messages.sh file in the folder to tell it to include \
QML files. Otherwise the i18n() commands in QML won't be extracted for \
translation. On top of that you need to tell it to look through subfolders as you now \
have a plasma package structure.
Make the replacement below.
- $XGETTEXT *.cpp -o $podir/plasma_applet_currentappcontrol.pot
+ $XGETTEXT `find . -name \*.qml` -o $podir/plasma_applet_currentappcontrol.pot
</pre>
<p>- David</p>
<br />
<p>On February 24th, 2013, 11:10 a.m. UTC, Greg T wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://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 Plasma.</div>
<div>By Greg T.</div>
<p style="color: grey;"><i>Updated Feb. 24, 2013, 11:10 a.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;">Heya folks, This is a qml port of the netbook applet currentappcontrol. \
It's ready to use, but not fully complete. Missing features/bugs:
- If you click on the title on the task bar, it doesn't show the kwin present \
windows effect, how to implement that? Is there interest in a 'kwin \
dataengine' or should I go for a mixed C++/QML applet?
- there is an annoyance in the task list(present windows fallback): I can set a \
minimum height, but if I close a task and re-set the minimum height, the popup \
won't shrink again, leaving an unpleasant empty space; plasma \
bug?
- the close/restore buttons don't glow on hover. I couldn't load a theme svg \
using the IconItem. Is that possible?
- do you know how to read the size of the containment the widget is contained?</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/netbook/applets/currentappcontrol/package/contents/ui/main.qml <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>plasma/netbook/applets/currentappcontrol/package/metadata.desktop <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>plasma/netbook/applets/currentappcontrol/CMakeLists.txt <span style="color: \
grey">(46178ce3a9351845855e9fccfbc13a9d3946fc95)</span></li>
<li>CMakeLists.txt <span style="color: \
grey">(6084d7dd7655372506e02abe9f141b73155c5857)</span></li>
<li>plasma/netbook/applets/currentappcontrol/package/contents/ui/Task.qml <span \
style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/109124/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