[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Review Request 112068: KCharSelect: Show LaTeX commands for Unicode characters
From: "Thomas Fischer" <fischer () unix-ag ! uni-kl ! de>
Date: 2014-01-13 19:45:15
Message-ID: 20140113194515.17946.9309 () probe ! kde ! org
[Download RAW message or body]
> On Oct. 22, 2013, 9:42 a.m., David Faure wrote:
> > I'm not sure how kcharselect (the program) differs from KCharSelect (the kdelibs \
> > class), but is there any way this could go into the program only? There isn't \
> > much usefulness in showing latex commands when bringing up KCharSelect (the \
> > class) in e.g. calligra. Or is kile a target use case, hence the need to have it \
> > in the kdelibs class?
> > Other than that, the patch looks ok to me - provided that the target branch is \
> > frameworks, not master (which is frozen for large changes).
It is kdelibs which provides the widget (KCharSelect class), so it cannot be directly \
changed in the kcharselect program. Maybe the best option is to provide a virtual \
function in the KCharSelect class which returns an empty string in its default \
implementation. This function's return value is pasted where the LaTeX code is shown \
now (below the XML code, which BTW is irrelevant for Calligra users, too). The \
kcharselect program could have its own class which inherits KCharSelect and \
re-implements this virtual function to return LaTeX codes.
To spin this idea further, KCharSelect could get refactored to have a simple plugin \
architecture, which would load the XML code or LaTeX code implemenation upon the \
user's request ...
About the port to KF5, unfortunately I don't have the resources (time, ...) to \
compile it locally. Maybe someone else could take the step of porting my KDE 4.11+ \
code to KF5.
- Thomas
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/112068/#review42148
-----------------------------------------------------------
On Aug. 16, 2013, 9:16 p.m., Thomas Fischer wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/112068/
> -----------------------------------------------------------
>
> (Updated Aug. 16, 2013, 9:16 p.m.)
>
>
> Review request for kdelibs, KDE Utils and Daniel Laidig.
>
>
> Repository: kdelibs
>
>
> Description
> -------
>
> Attached patch tries to determine the LaTeX command sequence for a given Unicode \
> character. Right now, the most common latin-based characters and selected symbols \
> are covered. The translation table is based on the source code used in KBibTeX \
> (BibTeX editor) and corrections/updates can be easily shared between both projects. \
>
> Diffs
> -----
>
> kdeui/widgets/kcharselect.h de9e184
> kdeui/widgets/kcharselect.cpp e00d001
> kdeui/widgets/kcharselectdata.cpp 41eab5b
> kdeui/widgets/kcharselectdata_p.h c6f7a3a
>
> Diff: https://git.reviewboard.kde.org/r/112068/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Thomas Fischer
>
>
[Attachment #3 (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="https://git.reviewboard.kde.org/r/112068/">https://git.reviewboard.kde.org/r/112068/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On October 22nd, 2013, 9:42 a.m. CEST, <b>David \
Faure</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;"> <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'm not sure how kcharselect (the program) differs from KCharSelect \
(the kdelibs class), but is there any way this could go into the program only? There \
isn't much usefulness in showing latex commands when bringing up KCharSelect (the \
class) in e.g. calligra. Or is kile a target use case, hence the need to have it in \
the kdelibs class?
Other than that, the patch looks ok to me - provided that the target branch is \
frameworks, not master (which is frozen for large changes).</pre> </blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It is kdelibs which \
provides the widget (KCharSelect class), so it cannot be directly changed in the \
kcharselect program. Maybe the best option is to provide a virtual function in the \
KCharSelect class which returns an empty string in its default implementation. This \
function's return value is pasted where the LaTeX code is shown now (below the \
XML code, which BTW is irrelevant for Calligra users, too). The kcharselect program \
could have its own class which inherits KCharSelect and re-implements this virtual \
function to return LaTeX codes.
To spin this idea further, KCharSelect could get refactored to have a simple plugin \
architecture, which would load the XML code or LaTeX code implemenation upon the \
user's request ...
About the port to KF5, unfortunately I don't have the resources (time, ...) to \
compile it locally. Maybe someone else could take the step of porting my KDE 4.11+ \
code to KF5.</pre> <br />
<p>- Thomas</p>
<br />
<p>On August 16th, 2013, 9:16 p.m. CEST, Thomas Fischer wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://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 kdelibs, KDE Utils and Daniel Laidig.</div>
<div>By Thomas Fischer.</div>
<p style="color: grey;"><i>Updated Aug. 16, 2013, 9:16 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdelibs
</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;">Attached patch tries to determine the LaTeX command sequence for a given \
Unicode character. Right now, the most common latin-based characters and selected \
symbols are covered. The translation table is based on the source code used in \
KBibTeX (BibTeX editor) and corrections/updates can be easily shared between both \
projects.</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>kdeui/widgets/kcharselect.h <span style="color: grey">(de9e184)</span></li>
<li>kdeui/widgets/kcharselect.cpp <span style="color: grey">(e00d001)</span></li>
<li>kdeui/widgets/kcharselectdata.cpp <span style="color: \
grey">(41eab5b)</span></li>
<li>kdeui/widgets/kcharselectdata_p.h <span style="color: \
grey">(c6f7a3a)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/112068/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic