Skip to content

Commit

Permalink
Option to specify number of displayed significant digits (instead of …
Browse files Browse the repository at this point in the history
…using precision) in decimals dialog (issue #559); Fix double separator after all history results removed from an expression (the expression is consequently also removed); Add support "digits" and "autocalc" qalc set command options; Inrement version number; Update translations; Update manual
  • Loading branch information
hanna-kn committed Nov 21, 2024
1 parent 9b069c6 commit 5a3aea5
Show file tree
Hide file tree
Showing 43 changed files with 3,251 additions and 2,912 deletions.
34 changes: 34 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
2024-11-18 Hanna Knutsson <[email protected]>

* Option to specify number of displayed significant digits (instead of using precision) in decimals dialog

2024-11-15 Hanna Knutsson <[email protected]>

* Fix double separator after all history results removed from an expression (the expression is consequently also removed)
* Avoid output of very long vectors and matrices in part of result
* Fix number of binary bits shown for negative result in programming keypad
* Fix "fgalpha" not support warning with old Pango versions
* Fix precision in Preset mode
* Improve calculation of HTML string (result) length
* Improve decision to automatically convert unchanged quantity with unit

2024-11-06 Hanna Knutsson <[email protected]>

* Fix keyboard shortcut with copy followed by quit

2024-10-29 Hanna Knutsson <[email protected]>

* Fix number base subscripts (not shown as subscripts) in programming keypad

2024-10-23 Hanna Knutsson <[email protected]>

* Add option, in Edit menu, to open settings folder

2024-10-19 ovari <[email protected]>

* Add Hungarian translation

2024-10-14 Hanna Knutsson <[email protected]>

* Improve handling of (too) long results with calculate-as-you-type

2024-10-05 Hanna Knutsson <[email protected]>

* Reset special duodecimal symbols property after use of "doz"/"dozenal" conversion, and do not change the property for "duo"/"duodecimal" conversion
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Qt, and CLI).
1. Requirements

* GTK (>= 3.10)
* libqalculate (>= 5.1.0)
* libqalculate (>= 5.4.0)

2. Installation

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Qalculate! is a multi-purpose cross-platform desktop calculator. It is simple to

## Requirements
* GTK (>= 3.10)
* libqalculate (>= 5.1.0)
* libqalculate (>= 5.4.0)

## Installation
Instructions and download links for installers, binaries packages, and the source code of released versions of Qalculate! are available at https://qalculate.github.io/downloads.html.
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dnl ----------------------
dnl | initialize autotools |---------------------------------------------------
dnl ----------------------

AC_INIT([Qalculate! (GTK UI)],[5.3.0],[],[qalculate-gtk])
AC_INIT([Qalculate! (GTK UI)],[5.4.0],[],[qalculate-gtk])
AC_CONFIG_SRCDIR([src/main.cc])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS(config.h)
Expand Down Expand Up @@ -125,7 +125,7 @@ AS_IF([test "x$with_local_help" != "xno"], [
AM_CONDITIONAL(ENABLE_LOCAL_HELP, [test "x$with_local_help" != "xno"])

PKG_CHECK_MODULES(QALCULATE, [
libqalculate >= 5.1.0
libqalculate >= 5.4.0
])
AC_SUBST(QALCULATE_CFLAGS)
AC_SUBST(QALCULATE_LIBS)
Expand Down
41 changes: 41 additions & 0 deletions data/decimals.ui
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment_maxdigits">
<property name="lower">2</property>
<property name="upper">100000</property>
<property name="value">10</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkDialog" id="decimals_dialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
Expand Down Expand Up @@ -96,6 +103,21 @@
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="decimals_dialog_checkbutton_maxdigits">
<property name="label" translatable="yes">Significant digits</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_decimals_dialog_checkbutton_maxdigits_toggled" swapped="no"/>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="decimals_dialog_spinbutton_min">
<property name="visible">True</property>
Expand Down Expand Up @@ -132,6 +154,25 @@
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="decimals_dialog_spinbutton_maxdigits">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">Maximal number of significant digits to display (by default determined by precision)</property>
<property name="hexpand">True</property>
<property name="adjustment">adjustment_maxdigits</property>
<property name="climb_rate">1</property>
<property name="snap_to_ticks">True</property>
<property name="numeric">True</property>
<property name="value">10</property>
<signal name="value-changed" handler="on_decimals_dialog_spinbutton_maxdigits_value_changed" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
Expand Down
2 changes: 1 addition & 1 deletion data/precision.ui
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<object class="GtkAdjustment" id="precision_adjustment">
<property name="lower">1</property>
<property name="upper">100000</property>
<property name="value">12</property>
<property name="value">10</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
Expand Down
19 changes: 19 additions & 0 deletions data/qalculate-gtk.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,25 @@
</provides>
<translation type="gettext">qalculate-gtk</translation>
<releases>
<release version="5.4.0" date="2024-11-25">
<description>
<p>Changes:</p>
<ul>
<li>Option to specify number of displayed significant digits, instead of using precision</li>
<li>Option, in menu, to open settings folder(s)</li>
<li>Improve decision to automatically convert unchanged quantity with unit</li>
<li>New functions: tripleProduct(), multilimit()</li>
<li>Hungarian translation</li>
<li>Updated French translation</li>
<li>Fix number base subscripts in programming keypad</li>
<li>Fix keyboard shortcut with copy followed by quit</li>
<li>Fix precision in Preset mode</li>
<li>Fix case conversion of µ to M and similar</li>
<li>Fix segfault with very large integer raised by very large integer</li>
<li>Minor bug fixes and feature enhancements</li>
</ul>
</description>
</release>
<release version="5.3.0" date="2024-10-07">
<description>
<p>Changes:</p>
Expand Down
4 changes: 2 additions & 2 deletions doc/C/qalculate-gtk-C.omf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
Qalculate! Manual
</title>
<date>
2024-10-07
2024-11-25
</date>
<version identifier="5.3.0" date="2024-10-07" description=""/>
<version identifier="5.4.0" date="2024-11-25" description=""/>
<subject category="GNOME|Applications|Accessories"/>
<description>
This is the Qalculate! manual
Expand Down
6 changes: 3 additions & 3 deletions doc/C/qalculate-gtk.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY legal SYSTEM "legal.xml">
<!ENTITY appversion "5.3.0">
<!ENTITY manrevision "5.3.0">
<!ENTITY date "October 2024">
<!ENTITY appversion "5.4.0">
<!ENTITY manrevision "5.4.0">
<!ENTITY date "November 2024">
<!ENTITY app "Qalculate!">
<!ENTITY appendixa SYSTEM "appendixa.xml">
<!ENTITY appendixb SYSTEM "appendixb.xml">
Expand Down
2 changes: 1 addition & 1 deletion doc/html/index.html

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions doc/html/qalc.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ <h1>QALC man page</h1>
<div class="level0"><span Class="bold">approximate</span> Equivalent to set approximation try exact. <p/></div>
<div class="level0"><span Class="bold">assume assumptions</span> Set default assumptions for unknown variables (unknown, non-zero, positive, negative, non-positive, non-negative + number, real, rational, integer, boolean). <p/></div>
<div class="level0"><span Class="bold">base base</span> Sets the result number base (equivalent to set base). <p/></div>
<div class="level0"><span Class="bold">clear</span> Clears the screen <p/></div>
<div class="level0"><span Class="bold">clear history</span> Clears the expression history <p/></div>
<div class="level0"><span Class="bold">clear</span> Clears the screen. <p/></div>
<div class="level0"><span Class="bold">clear history</span> Clears the expression history. <p/></div>
<div class="level0"><span Class="bold">delete name</span> Removes the user-defined variable or function with the specified name. <br>Example: delete var1. <p/></div>
<div class="level0"><span Class="bold">exact</span> Equivalent to set approximation exact. <p/></div>
<div class="level0"><span Class="bold">expand</span> Expands the current result. <p/></div>
Expand All @@ -93,6 +93,7 @@ <h1>QALC man page</h1>
<div class="level0"><span Class="bold">find, list [name]</span> Displays a list of variables, functions and units. Enter with argument 'currencies', 'functions', 'variables', 'units', or 'prefixes' to show a list of all currencies, functions, variables, units, or prefixes. Enter a search term to find matching variables, functions, units, and/or prefixes. If command is called with no argument all user-definied objects are listed. <br>Example: list functions. <br>Example: find dinar. <br>Example: find variables planck. <p/></div>
<div class="level0"><span Class="bold">function name expression</span> Creates a function with the specified name and expression. Use '\x', '\y', '\z', '\a', etc. for arguments in the expression. The function is persistent unless the command is invoked from file or in result only mode. <br>Example: function func1 5*\x. <p/></div>
<div class="level0"><span Class="bold">help [command]</span> <p/></div>
<div class="level0"><span Class="bold">history</span> Lists the expression history. <p/></div>
<div class="level0"><span Class="bold">info name</span> Displays information about a function, variable, unit, or prefix. <br>Example: info sin. <p/></div>
<div class="level0"><span Class="bold">keep/unkeep name</span> Make the temporary user-defined variable or function with the specified name non-temporary. <br>Example: keep var1. <p/></div>
<div class="level0"><span Class="bold">MC/MS/M+/M-</span> Memory operations (memory clear, memory store, memory plus, memory minus). Recall the memory using the MR/MRC variable. <p/></div>
Expand Down Expand Up @@ -157,6 +158,7 @@ <h1>QALC man page</h1>
<div class="level0"><span Class="bold">complex form, cplxform (0* = rectangular, 1 = exponential, 2 = polar, 3 = cis, 4 = angle)</span> <p/></div>
<div class="level0"><span Class="bold">decimal comma (locale*, off, on)</span> Determines the default decimal separator. <p/></div>
<div class="level0"><span Class="bold">digit grouping, group (0* = off, 1 = standard, 2 = locale)</span> <p/></div>
<div class="level0"><span Class="bold">digits (-1* = auto, &gt;= 2)</span> Specifies the number of displayed significant digits (by default determined by precision). <p/></div>
<div class="level0"><span Class="bold">exp display, edisp (E*, e, 10)</span> Determines how scientific notation are displayed (e.g. 3E6, 3e6, or 3 * 10^6). <p/></div>
<div class="level0"><span Class="bold">fractions, fr (-1* = auto, 0 = off, 1 = exact, 2 = on, 3 = mixed, 4 = long, 5 = dual, 1/n)</span> Determines how rational numbers are displayed (e.g. 5/4 = 1 + 1/4 = 1.25). 'long' removes limits on the size of the numerator and denonimator. <p/></div>
<div class="level0"><span Class="bold">hexadecimal two's, hextwos (on, off*)</span> Enables two's complement representation for display of negative hexadecimal numbers. <p/></div>
Expand Down Expand Up @@ -195,6 +197,7 @@ <h1>QALC man page</h1>
<div class="level0"><span Class="bold">sync units, sync (on*, off)</span> <p/></div>
<div class="level0"><span Class="bold">temperature calculation, temp (0* = hybrid, 1 = absolute, 2 = relative)</span> Determines how expressions with temperature units are calculated (hybrid acts as absolute if the expression contains different temperature units, otherwise as relative). <p/></div>
<div class="level0"><span Class="bold">update exchange rates, upxrates (-1* = ask, 0 = never, &gt; 0 = days)</span> <p/>Other: <p/></div>
<div class="level0"><span Class="bold">calculate as you type, autocalc (on, off*)</span> Activates continuous calculation of the currently edited expression. <p/></div>
<div class="level0"><span Class="bold">clear history (yes, no*)</span> Do not save expression history on exit. <p/></div>
<div class="level0"><span Class="bold">ignore locale (yes, no*)</span> Ignore system language and use English (requires restart). <p/></div>
<div class="level0"><span Class="bold">rpn (on, off*)</span> Activates the Reverse Polish Notation stack. <p/></div>
Expand All @@ -207,7 +210,7 @@ <h1>QALC man page</h1>
<div class="level1"><p/><span Class="bold">Addition (+)</span> <p/><span Class="bold">Subtraction (-)</span> <p/><span Class="bold">Multiplication (*)</span> <p/><span Class="bold">Division (/)</span> <p/><span Class="bold">Remainder (%, rem) and modulo (%%, mod)</span> <br>Returns the remainder after division. <p/><span Class="bold">Integer division (//, div)</span> <br>Rounds the result of division towards zero. <p/><span Class="bold">Exponentiation (^, **)</span> <br>Note that x^y^z equals x^(y^z), and not (x^y)^z. Note also that for non-integer exponents with negative bases, the principal root is returned and not the real root ((-8)^(1/3) equals 1 + 1.73i, and not -2). To calculate the real root for negative values, use the cbrt() and root() functions. <p/><span Class="bold">10^x (E)</span> <p/><span Class="bold">Parenthesis ((, ))</span> <p/><span Class="bold">Parellel sum (∥, ||)</span> <br>Returns the the reciprocal value of a sum of reciprocal values. || is interpreted as parallel if units are used, otherwise as logical OR. <p/><span Class="bold">Logical operators (!, NOT, ||, OR, &&, AND, XOR, NOR, NAND)</span> <p/><span Class="bold">Bitwise operators (~, |, &, &lt;&lt;, &gt;&gt;, XOR)</span> <p/><span Class="bold">Comparison operators (=, !=, &lt;, &lt;=, &gt;, &gt;=)</span> <br>Returns 1 if expression is true and 0 if false. The x variable is isolated if the expression does not evaluate as true or false. Primarily used for equations and inequalities. <p/><span Class="bold">Dot product (.)</span> <p/><span Class="bold">Element-wise operators (.*, ./, .^)</span> <p/><span Class="bold">Save operator (:=, =)</span> <br>Saves the expression to the right of the operator as a variable or function (e.g. var1:=5, func1():=x+y, var1=ln(5)+2). If the colon is omitted the expression is calculated before it is assigned to the variable. </div>
<div class="level0"><p/><span Class="bold">Evaluation priority order:</span> parenthesis, 10^x, exponentiation, functions, bitwise NOT, logical NOT, multiplication/division/remainder, parallel sum, addition/subtraction, bitwise NOT, bitwise shift, comparisons, bitwise AND, bitwise XOR, bitwise OR, logical AND, logical OR. <p/>The evaluation of short/implicit multiplication without any multiplication sign (e.g. 5x, 5(2+3)), differs depending on the parsing mode. In the conventional mode implicit multiplication does not differ from explicit multiplication (12/2(1+2) = 12/2*3 = 18, 5x/5y = 5 * x/5 * y = xy). In the parse implicit multiplication first mode, implicit multiplication is parsed before explicit multiplication (12/2(1+2) = 12/(2 * 3) = 2, 5x/5y = (5 * x)/(5 * y) = x/y). The default adaptive mode works as the parse implicit multiplication first mode, unless spaces are found (1/5x = 1/(5 * x), but 1/5 x = (1/5) * x). In the adaptive mode unit expressions are parsed separately (5 m/5 m/s = (5 * m)/(5 * (m/s)) = 1 s). Function arguments without parentheses are an exception, where implicit multiplication in front of variables and units is parsed first regardless of mode (sqrt 2x = sqrt(2x)). <p/>In chain mode, expressions are calculated from left to right, ignoring standard order of operations, like the immediate execution mode of a traditional calculator (1+2*3 = (1+2)*3 = 9). <p/>The "to"-operator is used for unit conversion and manipulation of how the result is presented. Place " to " or a right arrow (e.g. "-&gt;") followed by one of expressions/commands listed below, at the end of an expression. <p/></div>
<div class="level0"><span Class="bold">Unit conversion</span> - a unit or unit expression (e.g. meter or km/h) <br>prepend with ? to request the optimal prefix <br>prepend with b? to request the optimal binary prefix <br>prepend with + or - to force/disable use of mixed units <br>- a variable or physical constant (e.g. c) <br>- base (convert to base units) <br>- optimal (convert to optimal unit) <br>- prefix (convert to optimal prefix) <br>- mixed (convert to mixed units, e.g. hours + minutes) <p/></div>
<div class="level0"><span Class="bold">Number base conversion</span> - bin, binary (show as binary number) <br>- bin# (show as binary number with specified number of bits) <br>- oct, octal (show as octal number) <br>- duo, duodecimal (show as duodecimal number) <br>- hex, hexadecimal (show as hexadecimal number) <br>- hex# (show as hexadecimal number with specified number of bits) <br>- sex, sexa2, sexa3, sexagesimal (show as sexagesimal number; sexa2 hides and sexa3 rounds arcseconds) <br>- latitude, latitude2, longitude, longitude2 (show as sexagesimal latitude/longitude; latitude2 and longitude2 hide arcseconds) <br>- bijective (shown in bijective base-26) <br>- fp16, fp32, fp64, fp80, fp128 (show in binary floating-point format) <br>- bcd (show as binary-coded decimal) <br>- roman (show as roman numerals) <br>- time (show in time format) <br>- unicode <br>- base # (show in specified number base) <br>- bases (show as binary, octal, decimal and hexadecimal number) <br><p/></div>
<div class="level0"><span Class="bold">Number base conversion</span> - bin, binary (show as binary number) <br>- bin# (show as binary number with specified number of bits) <br>- oct, octal (show as octal number) <br>- duo, duodecimal (show as duodecimal number) <br>- hex, hexadecimal (show as hexadecimal number) <br>- hex# (show as hexadecimal number with specified number of bits) <br>- sexa, sexa2, sexa3, sexagesimal (show as sexagesimal number; sexa2 hides and sexa3 rounds arcseconds) <br>- latitude, latitude2, longitude, longitude2 (show as sexagesimal latitude/longitude; latitude2 and longitude2 hide arcseconds) <br>- bijective (shown in bijective base-26) <br>- fp16, fp32, fp64, fp80, fp128 (show in binary floating-point format) <br>- bcd (show as binary-coded decimal) <br>- roman (show as roman numerals) <br>- time (show in time format) <br>- unicode <br>- base # (show in specified number base) <br>- bases (show as binary, octal, decimal and hexadecimal number) <br><p/></div>
<div class="level0"><span Class="bold">Complex format</span> - rectangular, cartesian (show complex numbers in rectangular form) <br>- exponential (show complex numbers in exponential form) <br>- polar (show complex numbers in polar form) <br>- cis (show complex numbers in cis form) <br>- angle, phasor (show complex numbers in angle/phasor notation) <p/></div>
<div class="level0"><span Class="bold">Time and date conversion</span> - UTC (show date and time in UTC time zone) <br>- UTC+/-hh[:mm] (show date and time in specified time zone) <br>- calendars <p/></div>
<div class="level0"><span Class="bold">Fractions</span> - fraction (show result as mixed fraction) <br>- decimals (show result as decimal fraction) <br>- 1/# (show as mixed fraction with specified denominator) <br>prepend with - to show as simple fraction <p/></div>
Expand Down
Loading

0 comments on commit 5a3aea5

Please sign in to comment.