Skip to content

Commit e3fc7e0

Browse files
committed
Remove erroneous tooltips in shortcuts and button customization dialogs; Use combo box for encoding in code() and calendar in date() functions; Completely disable separate to-expression when calculate-as-you-type is activated; Always perform conversion to optimal (SI) unit when the expression is a number multiplied by a unit and input equals output; Update manual; Update ChangeLog; Update appdata; Update translations
1 parent 0d4b90f commit e3fc7e0

14 files changed

+3651
-3544
lines changed

‎ChangeLog

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2020-10-25 Hanna Knutsson <hanna.knutsson@protonmail.com>
2+
3+
* Use combo box for encoding in code() and calendar in date() functions
4+
5+
2020-10-23 Hanna Knutsson <hanna.knutsson@protonmail.com>
6+
7+
* Always perform conversion to optimal (SI) unit when the expression is a number multiplied by a unit and input equals output
8+
* Completely disable separate to-expression when calculate-as-you-type is activated
9+
10+
2020-10-21 Hanna Knutsson <hanna.knutsson@protonmail.com>
11+
12+
* Fix input of circumflex on Windows with dead circumflex without modifier (e.g. German and Swiss keyboard layouts)
13+
114
2020-10-18 Hanna Knutsson <hanna.knutsson@protonmail.com>
215

316
* Improve handling of ignore comma/dot option outside of the main expression entry

‎data/buttonsedit.ui

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@
193193
<object class="GtkTreeView" id="buttons_edit_treeview">
194194
<property name="visible">True</property>
195195
<property name="can-focus">True</property>
196-
<property name="tooltip-text" translatable="yes">Definition of this function's arguments</property>
197196
<property name="headers-clickable">False</property>
198197
<property name="enable-search">False</property>
199198
<signal name="row-activated" handler="on_buttons_edit_treeview_row_activated" swapped="no"/>
@@ -295,7 +294,6 @@
295294
<object class="GtkTreeView" id="shortcuts_type_treeview">
296295
<property name="visible">True</property>
297296
<property name="can-focus">True</property>
298-
<property name="tooltip-text" translatable="yes">Definition of this function's arguments</property>
299297
<signal name="row-activated" handler="on_buttonsedit_type_treeview_row_activated" swapped="no"/>
300298
<child internal-child="selection">
301299
<object class="GtkTreeSelection" id="shortcuts_type_selection"/>

‎data/qalculate-gtk.appdata.xml.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@
5858
<li>Use v1, v2, … as default variable names</li>
5959
<li>Add Rutherford (Rd), millirem (mrem), mrem/s, and erg/g units</li>
6060
<li>Add yr and annus names for year unit, röntgen name for roentgen (R) unit, and rem for roentgen equivalent man</li>
61+
<li>Add matrix rank (rk) and reduced row echelon form (rref) functions</li>
62+
<li>Support for different character encodings in code() function</li>
6163
<li>Keep angle units in calculations involving both length and (plane) angle units (fixes lumen calculations)</li>
6264
<li>Improve plot speed for functions defined using expression</li>
65+
<li>Always perform conversion to optimal (SI) unit when the expression is a number multiplied by a unit and input equals output</li>
6366
<li>Improvements and fixes in insert function dialog</li>
64-
<li>Improvements and fixes for qalc on Windows</li>
6567
<li>Compiled definitions without GIO and with support for out-of-tree builds</li>
6668
<li>Fix programming keypad base conversion for negative integers</li>
6769
<li>Minor bug fixes and feature improvements</li>

‎data/shortcuts.ui

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
<object class="GtkTreeView" id="shortcuts_treeview">
6464
<property name="visible">True</property>
6565
<property name="can_focus">True</property>
66-
<property name="tooltip_text" translatable="yes">Definition of this function's arguments</property>
6766
<signal name="row-activated" handler="on_shortcuts_treeview_row_activated" swapped="no"/>
6867
<child internal-child="selection">
6968
<object class="GtkTreeSelection" id="shortcuts_selection"/>
@@ -233,7 +232,6 @@
233232
<object class="GtkTreeView" id="shortcuts_type_treeview">
234233
<property name="visible">True</property>
235234
<property name="can_focus">True</property>
236-
<property name="tooltip_text" translatable="yes">Definition of this function's arguments</property>
237235
<signal name="row-activated" handler="on_shortcuts_type_treeview_row_activated" swapped="no"/>
238236
<child internal-child="selection">
239237
<object class="GtkTreeSelection" id="shortcuts_type_selection"/>

‎doc/C/qalculate-gtk.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,7 @@ Putting <quote> to </quote> (or a right arrow, e.g. <quote>-></quote>) followed
16511651
</varlistentry>
16521652
<varlistentry>
16531653
<term>Unicode</term>
1654-
<listitem><para>Show as unicode character(s) (using the Unicode base, 1114112, e.g. <quote>0x178 to unicode = Ÿ</quote>).</para></listitem>
1654+
<listitem><para>Show as unicode character(s) (uses UTF-32 for conversion, e.g. <quote>0x178 to unicode = Ÿ</quote>).</para></listitem>
16551655
</varlistentry>
16561656
<varlistentry>
16571657
<term>base #</term>

‎doc/html/qalculate-definitions-functions.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

‎doc/html/qalculate-expressions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
If the limit implicit multiplication option is activated, the use of implicit multiplication when parsing expressions and displaying results will be limited to avoid confusion. For example, if this mode is not activated and <span class="quote"><span class="quote">integrte(5x)</span></span> is accidently typed instead of <span class="quote"><span class="quote">integrate(5x)</span></span>, the expression is interpreted as <span class="quote"><span class="quote">int(e × e × (5 × x) × gr × t)</span></span> (displayed in history window). The result will then without any error be <span class="quote"><span class="quote">int(2.3940139x × km^2)</span></span> instead of <span class="quote"><span class="quote">2.5x^2</span></span>. If limit implicit multiplication is activated, the mistyped expression would instead show an error telling that <span class="quote"><span class="quote">integrte</span></span> is not a valid variable, function or unit (unless unknowns is enabled in which case the result will be <span class="quote"><span class="quote">5 "integrate" × x</span></span>). When implicit multiplication is limited, variables, functions and units must be separated by a space, operator or parenthesis (<span class="quote"><span class="quote">xy</span></span> does not equal <span class="quote"><span class="quote">x × y</span></span>).
5050
</p></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="qalculate-to"></a>The <span class="quote"><span class="quote">to</span></span> (and <span class="quote"><span class="quote">where</span></span>) operators</h2></div></div></div><p>
5151
Putting <span class="quote"><span class="quote"> to </span></span> (or a right arrow, e.g. <span class="quote"><span class="quote">-&gt;</span></span>) followed by an expression at the end of the mathematical expression is mainly used for unit conversion (see <a class="xref" href="qalculate-units.html#qalculate-unit-conversion" title="Conversion">the section called “Conversion”</a>). There are however also some convenient commands that can be typed after <span class="quote"><span class="quote"> to </span></span>. Here is a list of possible <span class="quote"><span class="quote">to</span></span> values:
52-
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">A unit or unit expression</span></dt><dd><p>Convert to a unit or a unit expression (e.g. <span class="quote"><span class="quote">5 ft + 2 in to meter = 1.5748 m</span></span> or <span class="quote"><span class="quote">50 mph to km/h ≈ 80 km/h</span></span>). Prepend with a question mark (?) to request the optimal prefix. Modifiers in front of the question mark selects the type of prefixes used — 'b' for binary prefixes, 'd' for decimal prefixes, and 'a' for all decimal prefixes incluing centi, deci, etc. (e.g. <span class="quote"><span class="quote">8 × 1024 bits to b?bytes = 1 kibibyte</span></span>). Prepend with + or - to force/disable use of mixed units (e.g. <span class="quote"><span class="quote">5 m to + ft ≈ 5 yd + 1 ft + 4.9 in</span></span>).</p></dd><dt><span class="term">A physical constant or a variable</span></dt><dd><p>Convert to variable as unit (e.g. <span class="quote"><span class="quote">500 km/ms to c ≈ 1.7 c</span></span>).</p></dd><dt><span class="term">base</span></dt><dd><p>Convert to base units (e.g. <span class="quote"><span class="quote">1 lux to base = 1 cd/m<sup>2</sup></span></span>).</p></dd><dt><span class="term">optimal</span></dt><dd><p>Convert to optimal unit (e.g. <span class="quote"><span class="quote">(10 J)/(2 s) to optimal = 5 W</span></span>).</p></dd><dt><span class="term">mixed</span></dt><dd><p>Convert to mixed units (e.g. <span class="quote"><span class="quote">90 s to mixed = 1 min + 30 s</span></span>.</p></dd><dt><span class="term">bin / binary</span></dt><dd><p>Show as binary number (e.g. <span class="quote"><span class="quote">sqrt(900) to bin = 0001 1110</span></span>). Append an integer to specify the number of bits (e.g. <span class="quote"><span class="quote">4 to bin16 = 0000 0000 0000 0100</span></span>).</p></dd><dt><span class="term">oct / octal</span></dt><dd><p>Show as octal number (e.g. <span class="quote"><span class="quote">52 to octal = 64</span></span>).</p></dd><dt><span class="term">duo / duodecimal</span></dt><dd><p>Show as duodecimal number (e.g. <span class="quote"><span class="quote">152 to duo = 108</span></span>).</p></dd><dt><span class="term">hex / hexadecimal</span></dt><dd><p>Show as hexadecimal number (e.g. <span class="quote"><span class="quote">623 to hex = 026F</span></span>). Append an integer to specify the number of bits (e.g. <span class="quote"><span class="quote">4 to hex16 = 0004</span></span>).</p></dd><dt><span class="term">sexa / sexagesimal</span></dt><dd><p>Show as sexagesimal number (e.g. <span class="quote"><span class="quote">7.33 to sexagesimal = 7°19′48″</span></span>).</p></dd><dt><span class="term">bijective</span></dt><dd><p>Show as bijective base-26 number (e.g. <span class="quote"><span class="quote">731 to bijective = ABC</span></span>).</p></dd><dt><span class="term">binary16 / fp16, binary32 / float / fp32, binary64 / double / fp64, fp80, binary128 / fp128</span></dt><dd><p>Show as binary representation of IEEE 754 16-bit (half precision), 32-bit (single precision), 64-bit (double precision), 80-bit (x86 extended format), or 128-bit (quadruple precision) floating-point number.</p></dd><dt><span class="term">time</span></dt><dd><p>Show in time format (e.g. <span class="quote"><span class="quote">7.25 to time = 7:15</span></span>.</p></dd><dt><span class="term">roman</span></dt><dd><p>Show as Roman numerals (e.g. <span class="quote"><span class="quote">1984 to roman = MCMLXXXIV</span></span>).</p></dd><dt><span class="term">Unicode</span></dt><dd><p>Show as unicode character(s) (using the Unicode base, 1114112, e.g. <span class="quote"><span class="quote">0x178 to unicode = Ÿ</span></span>).</p></dd><dt><span class="term">base #</span></dt><dd><p>Show using the specified base (e.g. <span class="quote"><span class="quote">523 to base 20 = 163</span></span> or <span class="quote"><span class="quote">circumference(1) to base pi = 20</span></span>).</p></dd><dt><span class="term">bases</span></dt><dd><p>Show as binary, octal, decimal, duodecimal, hexadecimal and Roman number (opens convert bases dialog with the mathematical expression).</p></dd><dt><span class="term">rectangular / cartesian</span></dt><dd><p>Show complex number in rectangular form (e.g. <span class="quote"><span class="quote">0.28i − 2 to complex = 0.28i − 2</span></span>).</p></dd><dt><span class="term">exponential</span></dt><dd><p>Show complex number in exponential form (e.g. <span class="quote"><span class="quote">0.28i − 2 to exponential ≈ 2e^(3i)</span></span>).</p></dd><dt><span class="term">polar</span></dt><dd><p>Show complex number in polar form (e.g. <span class="quote"><span class="quote">0.28i − 2 to polar ≈ 2(cos(3) + i × sin(3))</span></span>).</p></dd><dt><span class="term">angle / phasor</span></dt><dd><p>Show complex number in angle/phasor notation (e.g. <span class="quote"><span class="quote">0.28i − 2 to angle ≈ 2∠3</span></span>).</p></dd><dt><span class="term">cis</span></dt><dd><p>Show complex number in cis form (e.g. <span class="quote"><span class="quote">0.28i − 2 to angle ≈ 2 cis 3</span></span>).</p></dd><dt><span class="term">fraction</span></dt><dd><p>Show as mixed fraction <span class="quote"><span class="quote">1.25 to fraction = 1 + 1/4</span></span>.</p></dd><dt><span class="term">partial fraction</span></dt><dd><p>Show expanded partial fractions (e.g. <span class="quote"><span class="quote">1 / (x<sup>2</sup> + 2x − 3) to partial fraction = 1 ∕ (4x − 4) − 1 ∕ (4x + 12)</span></span>).</p></dd><dt><span class="term">factors</span></dt><dd><p>Show factorized (algebraic or integer factorization, e.g. <span class="quote"><span class="quote">3 645 678 to factors = 857 × 709 × 3 × 2</span></span> or <span class="quote"><span class="quote">x<sup>2</sup> + 4x + 4 to factors = (x + 2)<sup>2</sup></span></span>).</p></dd><dt><span class="term">calendars</span></dt><dd><p>Show date in different calendars (opens calendar conversion dialog).</p></dd><dt><span class="term">UTC</span></dt><dd><p>Show date and time using UTC time zone.</p></dd><dt><span class="term">UTC+/-hh[:mm]</span></dt><dd><p>Show date and time using specified time zone (e.g. UTC+08).</p></dd></dl></div><p>
52+
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">A unit or unit expression</span></dt><dd><p>Convert to a unit or a unit expression (e.g. <span class="quote"><span class="quote">5 ft + 2 in to meter = 1.5748 m</span></span> or <span class="quote"><span class="quote">50 mph to km/h ≈ 80 km/h</span></span>). Prepend with a question mark (?) to request the optimal prefix. Modifiers in front of the question mark selects the type of prefixes used — 'b' for binary prefixes, 'd' for decimal prefixes, and 'a' for all decimal prefixes incluing centi, deci, etc. (e.g. <span class="quote"><span class="quote">8 × 1024 bits to b?bytes = 1 kibibyte</span></span>). Prepend with + or - to force/disable use of mixed units (e.g. <span class="quote"><span class="quote">5 m to + ft ≈ 5 yd + 1 ft + 4.9 in</span></span>).</p></dd><dt><span class="term">A physical constant or a variable</span></dt><dd><p>Convert to variable as unit (e.g. <span class="quote"><span class="quote">500 km/ms to c ≈ 1.7 c</span></span>).</p></dd><dt><span class="term">base</span></dt><dd><p>Convert to base units (e.g. <span class="quote"><span class="quote">1 lux to base = 1 cd/m<sup>2</sup></span></span>).</p></dd><dt><span class="term">optimal</span></dt><dd><p>Convert to optimal unit (e.g. <span class="quote"><span class="quote">(10 J)/(2 s) to optimal = 5 W</span></span>).</p></dd><dt><span class="term">mixed</span></dt><dd><p>Convert to mixed units (e.g. <span class="quote"><span class="quote">90 s to mixed = 1 min + 30 s</span></span>.</p></dd><dt><span class="term">bin / binary</span></dt><dd><p>Show as binary number (e.g. <span class="quote"><span class="quote">sqrt(900) to bin = 0001 1110</span></span>). Append an integer to specify the number of bits (e.g. <span class="quote"><span class="quote">4 to bin16 = 0000 0000 0000 0100</span></span>).</p></dd><dt><span class="term">oct / octal</span></dt><dd><p>Show as octal number (e.g. <span class="quote"><span class="quote">52 to octal = 64</span></span>).</p></dd><dt><span class="term">duo / duodecimal</span></dt><dd><p>Show as duodecimal number (e.g. <span class="quote"><span class="quote">152 to duo = 108</span></span>).</p></dd><dt><span class="term">hex / hexadecimal</span></dt><dd><p>Show as hexadecimal number (e.g. <span class="quote"><span class="quote">623 to hex = 026F</span></span>). Append an integer to specify the number of bits (e.g. <span class="quote"><span class="quote">4 to hex16 = 0004</span></span>).</p></dd><dt><span class="term">sexa / sexagesimal</span></dt><dd><p>Show as sexagesimal number (e.g. <span class="quote"><span class="quote">7.33 to sexagesimal = 7°19′48″</span></span>).</p></dd><dt><span class="term">bijective</span></dt><dd><p>Show as bijective base-26 number (e.g. <span class="quote"><span class="quote">731 to bijective = ABC</span></span>).</p></dd><dt><span class="term">binary16 / fp16, binary32 / float / fp32, binary64 / double / fp64, fp80, binary128 / fp128</span></dt><dd><p>Show as binary representation of IEEE 754 16-bit (half precision), 32-bit (single precision), 64-bit (double precision), 80-bit (x86 extended format), or 128-bit (quadruple precision) floating-point number.</p></dd><dt><span class="term">time</span></dt><dd><p>Show in time format (e.g. <span class="quote"><span class="quote">7.25 to time = 7:15</span></span>.</p></dd><dt><span class="term">roman</span></dt><dd><p>Show as Roman numerals (e.g. <span class="quote"><span class="quote">1984 to roman = MCMLXXXIV</span></span>).</p></dd><dt><span class="term">Unicode</span></dt><dd><p>Show as unicode character(s) (uses UTF-32 for conversion, e.g. <span class="quote"><span class="quote">0x178 to unicode = Ÿ</span></span>).</p></dd><dt><span class="term">base #</span></dt><dd><p>Show using the specified base (e.g. <span class="quote"><span class="quote">523 to base 20 = 163</span></span> or <span class="quote"><span class="quote">circumference(1) to base pi = 20</span></span>).</p></dd><dt><span class="term">bases</span></dt><dd><p>Show as binary, octal, decimal, duodecimal, hexadecimal and Roman number (opens convert bases dialog with the mathematical expression).</p></dd><dt><span class="term">rectangular / cartesian</span></dt><dd><p>Show complex number in rectangular form (e.g. <span class="quote"><span class="quote">0.28i − 2 to complex = 0.28i − 2</span></span>).</p></dd><dt><span class="term">exponential</span></dt><dd><p>Show complex number in exponential form (e.g. <span class="quote"><span class="quote">0.28i − 2 to exponential ≈ 2e^(3i)</span></span>).</p></dd><dt><span class="term">polar</span></dt><dd><p>Show complex number in polar form (e.g. <span class="quote"><span class="quote">0.28i − 2 to polar ≈ 2(cos(3) + i × sin(3))</span></span>).</p></dd><dt><span class="term">angle / phasor</span></dt><dd><p>Show complex number in angle/phasor notation (e.g. <span class="quote"><span class="quote">0.28i − 2 to angle ≈ 2∠3</span></span>).</p></dd><dt><span class="term">cis</span></dt><dd><p>Show complex number in cis form (e.g. <span class="quote"><span class="quote">0.28i − 2 to angle ≈ 2 cis 3</span></span>).</p></dd><dt><span class="term">fraction</span></dt><dd><p>Show as mixed fraction <span class="quote"><span class="quote">1.25 to fraction = 1 + 1/4</span></span>.</p></dd><dt><span class="term">partial fraction</span></dt><dd><p>Show expanded partial fractions (e.g. <span class="quote"><span class="quote">1 / (x<sup>2</sup> + 2x − 3) to partial fraction = 1 ∕ (4x − 4) − 1 ∕ (4x + 12)</span></span>).</p></dd><dt><span class="term">factors</span></dt><dd><p>Show factorized (algebraic or integer factorization, e.g. <span class="quote"><span class="quote">3 645 678 to factors = 857 × 709 × 3 × 2</span></span> or <span class="quote"><span class="quote">x<sup>2</sup> + 4x + 4 to factors = (x + 2)<sup>2</sup></span></span>).</p></dd><dt><span class="term">calendars</span></dt><dd><p>Show date in different calendars (opens calendar conversion dialog).</p></dd><dt><span class="term">UTC</span></dt><dd><p>Show date and time using UTC time zone.</p></dd><dt><span class="term">UTC+/-hh[:mm]</span></dt><dd><p>Show date and time using specified time zone (e.g. UTC+08).</p></dd></dl></div><p>
5353
</p><p>
5454
If <span class="quote"><span class="quote">to</span></span> is not preceded by an expression, the previous result will be converted.
5555
</p><p>

0 commit comments

Comments
 (0)