[gcalctool/gcalctool-newui2] ...



commit 1a89a850afa2d9a364bd1dfe95a061379550c4b2
Author: Robert Ancell <robert ancell gmail com>
Date:   Mon Jun 29 18:29:39 2009 +1000

    ...

 data/gcalctool.ui | 2309 ++++++++++++++++++++++++++---------------------------
 src/functions.c   |   89 +--
 src/functions.h   |   48 +--
 src/gtk.c         |  436 ++---------
 4 files changed, 1224 insertions(+), 1658 deletions(-)
---
diff --git a/data/gcalctool.ui b/data/gcalctool.ui
index 21d1908..011fa93 100644
--- a/data/gcalctool.ui
+++ b/data/gcalctool.ui
@@ -10,7 +10,7 @@
     <signal name="key_press_event" handler="main_window_key_press_cb"/>
     <signal name="delete_event" handler="quit_cb"/>
     <child>
-      <object class="GtkVBox" id="kvbox">
+      <object class="GtkVBox" id="window_vbox">
         <property name="visible">True</property>
         <property name="spacing">6</property>
         <child>
@@ -294,7 +294,7 @@
                     <property name="editable">False</property>
                     <property name="justification">right</property>
                     <property name="right_margin">6</property>
-                    <property name="buffer">textbuffer1</property>
+                    <property name="buffer">display_buffer</property>
                     <child internal-child="accessible">
                       <object class="AtkObject" id="displayitem-atkobject">
                         <property name="AtkObject::accessible-description" translatable="yes">Result Region</property>
@@ -313,264 +313,12 @@
           </packing>
         </child>
         <child>
-          <object class="GtkTable" id="financial_panel">
-            <property name="visible">True</property>
-            <property name="border_width">6</property>
-            <property name="n_columns">10</property>
-            <property name="column_spacing">6</property>
-            <property name="row_spacing">6</property>
-            <property name="homogeneous">True</property>
-            <child>
-              <object class="GtkButton" id="calc_finc_straight_line_depreciation_button">
-                <property name="label" translatable="yes" comments="Calculates the straight-line depreciation of an asset for one period. The depreciable cost is cost - salvage. The straight-line method of depreciation divides the depreciable cost evenly over the useful life of an asset. The useful life is the number of periods, typically years, over which an asset is depreciated. See also: http://en.wikipedia.org/wiki/Depreciation";>Sln</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Straight-line depreciation [l]</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="calc_finc_straight_line_depreciation_button-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes">Straight-line depreciation</property>
-                    <property name="AtkObject::accessible-description" translatable="yes">Straight-line depreciation [l]</property>
-                  </object>
-                </child>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">7</property>
-                <property name="right_attach">8</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_finc_periodic_interest_rate_button">
-                <property name="label" translatable="yes" comments="Calculates the periodic interest necessary to increase an investment of present value pv to a future value of fv, over the number of compounding periods in term. See also: http://en.wikipedia.org/wiki/Interest                                      ">Rate</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Periodic interest rate [T]</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="calc_finc_periodic_interest_rate_button-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes">Periodic interest rate</property>
-                    <property name="AtkObject::accessible-description" translatable="yes">Periodic interest rate [T]</property>
-                  </object>
-                </child>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">6</property>
-                <property name="right_attach">7</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_finc_present_value_button">
-                <property name="label" translatable="yes" comments="Calculates the present value of an investment based on a series of equal payments, each of amount pmt, discounted at a periodic interest rate of int, over the number of payment periods in the term. See also: http://en.wikipedia.org/wiki/Present_value";>Pv</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Present value [p]</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="calc_finc_present_value_button-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes">Present value</property>
-                    <property name="AtkObject::accessible-description" translatable="yes">Present value [p]</property>
-                  </object>
-                </child>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">5</property>
-                <property name="right_attach">6</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_finc_periodic_payment_button">
-                <property name="label" translatable="yes" comments="Calculates the amount of the periodic payment of a loan, where payments are made at the end of each payment period. See also: http://en.wikipedia.org/wiki/Amortization_schedule";>Pmt</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Periodic payment [P]</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="calc_finc_periodic_payment_button-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes">Periodic payment</property>
-                    <property name="AtkObject::accessible-description" translatable="yes">Periodic payment [P]</property>
-                  </object>
-                </child>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">4</property>
-                <property name="right_attach">5</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_finc_future_value_button">
-                <property name="label" translatable="yes" comments="Calculates the future value of an investment based on a series of equal payments, each of amount pmt, at a periodic interest rate of int, over the number of payment periods in the term. See also: http://en.wikipedia.org/wiki/Future_value";>Fv</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Future value [v]</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="calc_finc_future_value_button-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes">Future value</property>
-                    <property name="AtkObject::accessible-description" translatable="yes">Future value [v]</property>
-                  </object>
-                </child>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_finc_gross_profit_margin_button">
-                <property name="label" translatable="yes" comments="Calculates the resale price of a product, based on the product cost and the wanted gross profit margin. See also: http://en.wikipedia.org/wiki/Gross_profit_margin";>Gpm</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Gross Profit Margin [I]</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="calc_finc_gross_profit_margin_button-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes">Gross Profit Margin</property>
-                    <property name="AtkObject::accessible-description" translatable="yes">Gross Profit Margin [g]</property>
-                  </object>
-                </child>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">3</property>
-                <property name="right_attach">4</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_finc_double_declining_depreciation_button">
-                <property name="label" translatable="yes" comments="Calculates the depreciation allowance on an asset for a specified period of time, using the double-declining balance method. See also: http://en.wikipedia.org/wiki/Depreciation";>Ddb</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Double-declining depreciation [D]</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="calc_finc_double_declining_depreciation_button-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes">Double-declining depreciation</property>
-                    <property name="AtkObject::accessible-description" translatable="yes">Double-declining depreciation [D]</property>
-                  </object>
-                </child>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_finc_compounding_term_button">
-                <property name="label" translatable="yes" comments="Calculates the number of compounding periods necessary to increase an investment of present value pv to a future value of fv, at a fixed interest rate of int per compounding period. See also: http://en.wikipedia.org/wiki/Compound_interest";>Ctrm</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Compounding term [m]</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="calc_finc_compounding_term_button-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes">Compounding term</property>
-                    <property name="AtkObject::accessible-description" translatable="yes">Compounding term [m]</property>
-                  </object>
-                </child>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_finc_sum_of_the_years_digits_depreciation_button">
-                <property name="label" translatable="yes" comments="Calculates the depreciation allowance on an asset for a specified period of time, using the Sum-Of-The-Years'-Digits method. This method of depreciation accelerates the rate of depreciation, so that more depreciation expense occurs in earlier periods than in later ones. The depreciable cost is cost - salvage. The useful life is the number of periods, typically years, over which an asset is depreciated. See also: http://en.wikipedia.org/wiki/Depreciation";>Syd</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="calc_finc_sum_of_the_years_digits_depreciation_button-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes">Sum-of-the years'-digits depreciation</property>
-                    <property name="AtkObject::accessible-description" translatable="yes">Sum-of-the years'-digits depreciation [y]</property>
-                  </object>
-                </child>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">8</property>
-                <property name="right_attach">9</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_finc_term_button">
-                <property name="label" translatable="yes" comments="Calculates the number of payment periods that are necessary during the term of an ordinary annuity, to accumulate a future value of fv, at a periodic interest rate of int. Each payment is equal to amount pmt. See also: http://en.wikipedia.org/wiki/Annuity_(finance_theory)">Term</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="calc_finc_term_button-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes">Payment period</property>
-                    <property name="AtkObject::accessible-description" translatable="yes">Payment period [t]</property>
-                  </object>
-                </child>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">9</property>
-                <property name="right_attach">10</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
           <object class="GtkAlignment" id="bit_panel">
             <property name="visible">True</property>
             <property name="xscale">0</property>
             <property name="yscale">0</property>
             <child>
-              <object class="GtkTable" id="table8">
+              <object class="GtkTable" id="bit_table">
                 <property name="visible">True</property>
                 <property name="n_rows">4</property>
                 <property name="n_columns">39</property>
@@ -2359,832 +2107,534 @@
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="position">4</property>
+            <property name="position">2</property>
           </packing>
         </child>
         <child>
-          <object class="GtkTable" id="scientific_panel">
+          <object class="GtkTable" id="button_table">
             <property name="visible">True</property>
-            <property name="border_width">6</property>
+            <property name="border_width">3</property>
+            <property name="n_rows">9</property>
             <property name="n_columns">10</property>
-            <property name="column_spacing">6</property>
-            <property name="row_spacing">6</property>
-            <property name="homogeneous">True</property>
             <child>
-              <object class="GtkButton" id="calc_tangent_button">
+              <object class="GtkTable" id="basic_panel">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes" comments="The tangent tooltip">Tangent [w]</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
+                <property name="n_rows">4</property>
+                <property name="n_columns">5</property>
+                <property name="homogeneous">True</property>
                 <child>
-                  <object class="GtkLabel" id="tangent_label">
+                  <object class="GtkButton" id="calc_4_button">
+                    <property name="label" translatable="yes" comments="Numeric 4 button">4</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The tangent button">tan</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_4_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 4</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">5</property>
-                <property name="right_attach">6</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_sine_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes" comments="The sine tooltip">Sine [k]</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
                 <child>
-                  <object class="GtkLabel" id="sine_label">
+                  <object class="GtkButton" id="calc_7_button">
+                    <property name="label" translatable="yes" comments="Numeric 7 button">7</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The sine button">sin</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_7_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 7</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">4</property>
-                <property name="right_attach">5</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_cosine_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes" comments="The cosine tooltip">Cosine [j]</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
                 <child>
-                  <object class="GtkLabel" id="cosine_label">
+                  <object class="GtkButton" id="calc_8_button">
+                    <property name="label" translatable="yes" comments="Numeric 8 button">8</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The cosine button">cos</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_8_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 8</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">3</property>
-                <property name="right_attach">4</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_hyperbolic_cosine_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="tooltip_text" translatable="yes" comments="The hyperbolic cosine tooltip">Hyperbolic Cosine [J]</property>
-                <property name="focus_on_click">False</property>
                 <child>
-                  <object class="GtkLabel" id="hyperbolic_cosine_label">
+                  <object class="GtkButton" id="calc_9_button">
+                    <property name="label" translatable="yes" comments="Numeric 9 button">9</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The hyperbolic cosine button">cosh</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_9_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 9</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">6</property>
-                <property name="right_attach">7</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_hyperbolic_sine_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="tooltip_text" translatable="yes" comments="The hyperbolic sine tooltip">Hyperbolic Sine [K]</property>
-                <property name="focus_on_click">False</property>
                 <child>
-                  <object class="GtkLabel" id="hyperbolic_sine_label">
+                  <object class="GtkButton" id="calc_5_button">
+                    <property name="label" translatable="yes" comments="Numeric 5 button">5</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The hyperbolic sine button">sinh</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_5_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 5</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">7</property>
-                <property name="right_attach">8</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_hyperbolic_tangent_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="tooltip_text" translatable="yes" comments="The hyperbolic tangent tooltip">Hyperbolic Tangent [W]</property>
-                <property name="focus_on_click">False</property>
                 <child>
-                  <object class="GtkLabel" id="hyperbolic_tangent_label">
+                  <object class="GtkButton" id="calc_6_button">
+                    <property name="label" translatable="yes" comments="Numeric 6 button">6</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The hyperbolic tangent button">tanh</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_6_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 6</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">8</property>
-                <property name="right_attach">9</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-          </object>
-          <packing>
-            <property name="position">5</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkTable" id="si_panel">
-            <property name="border_width">6</property>
-            <property name="n_columns">10</property>
-            <property name="column_spacing">6</property>
-            <property name="row_spacing">6</property>
-            <property name="homogeneous">True</property>
-            <child>
-              <object class="GtkButton" id="calc_tangent_button1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="focus_on_click">False</property>
                 <child>
-                  <object class="GtkLabel" id="tangent_label1">
+                  <object class="GtkButton" id="calc_divide_button">
+                    <property name="label" translatable="yes" comments="Division button">&#xF7;</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The tangent button">k</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="tooltip_text" translatable="yes">Divide [/]</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_divide_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Divide</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="right_attach">4</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">5</property>
-                <property name="right_attach">6</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_sine_button1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="focus_on_click">False</property>
                 <child>
-                  <object class="GtkLabel" id="sine_label1">
+                  <object class="GtkButton" id="calc_1_button">
+                    <property name="label" translatable="yes" comments="Numeric 1 button">1</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The sine button">m</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_1_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 1</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">4</property>
-                <property name="right_attach">5</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_cosine_button1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="focus_on_click">False</property>
                 <child>
-                  <object class="GtkLabel" id="cosine_label1">
+                  <object class="GtkButton" id="calc_2_button">
+                    <property name="label" translatable="yes" comments="Numeric 2 button">2</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The cosine button">&#xB5;</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_2_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 2</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">3</property>
-                <property name="right_attach">4</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_hyperbolic_cosine_button1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="focus_on_click">False</property>
                 <child>
-                  <object class="GtkLabel" id="hyperbolic_cosine_label1">
+                  <object class="GtkButton" id="calc_0_button">
+                    <property name="label" translatable="yes" comments="Numeric 0 button">0</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The hyperbolic cosine button">M</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_0_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 0</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">6</property>
-                <property name="right_attach">7</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_hyperbolic_sine_button1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="focus_on_click">False</property>
                 <child>
-                  <object class="GtkLabel" id="hyperbolic_sine_label1">
+                  <object class="GtkButton" id="calc_numeric_point_button">
+                    <property name="label" comments="Label is set in gtk.c to comply with LC flags">.</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The hyperbolic sine button">G</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="tooltip_text" translatable="yes">Numeric point [. or ,]</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_numeric_point_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Numeric point</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">7</property>
-                <property name="right_attach">8</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_hyperbolic_tangent_button1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="focus_on_click">False</property>
                 <child>
-                  <object class="GtkLabel" id="hyperbolic_tangent_label1">
+                  <object class="GtkButton" id="calc_result_button">
+                    <property name="label" translatable="yes" comments="Solve button (clicking this solves the displayed calculation)">=</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The hyperbolic tangent button">P</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="tooltip_text" translatable="yes">Calculate result [=]</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_result_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Calculate result</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">8</property>
-                <property name="right_attach">9</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_cosine_button2">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="focus_on_click">False</property>
                 <child>
-                  <object class="GtkLabel" id="cosine_label2">
+                  <object class="GtkButton" id="calc_3_button">
+                    <property name="label" translatable="yes" comments="Numeric 3 button">3</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The cosine button">f</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_3_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 3</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_cosine_button3">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="focus_on_click">False</property>
                 <child>
-                  <object class="GtkLabel" id="cosine_label3">
+                  <object class="GtkButton" id="calc_multiply_button">
+                    <property name="label" translatable="yes" comments="Multiplication button">&#xD7;</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The cosine button">p</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="tooltip_text" translatable="yes">Multiply [*]</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_multiply_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Multiply</property>
+                        <property name="AtkObject::accessible-description" translatable="yes">Multiply</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="right_attach">4</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_cosine_button4">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="focus_on_click">False</property>
                 <child>
-                  <object class="GtkLabel" id="cosine_label4">
+                  <object class="GtkButton" id="calc_subtract_button">
+                    <property name="label" translatable="yes" comments="Subtraction button">&#x2212;</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The cosine button">n</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="tooltip_text" translatable="yes">Subtract [-]</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_subtract_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Subtract</property>
+                        <property name="AtkObject::accessible-description" translatable="yes">Subtract [-]</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="right_attach">4</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-          </object>
-          <packing>
-            <property name="position">6</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkTable" id="programming_panel">
-            <property name="visible">True</property>
-            <property name="border_width">6</property>
-            <property name="n_rows">2</property>
-            <property name="n_columns">10</property>
-            <property name="column_spacing">6</property>
-            <property name="row_spacing">6</property>
-            <property name="homogeneous">True</property>
-            <child>
-              <object class="GtkButton" id="calc_d_button">
-                <property name="label" translatable="yes" comments="Hexadecimal digit D button">D</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Hexadecimal digit D [d]</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_e_button">
-                <property name="label" translatable="yes" comments="Hexadecimal digit E button">E</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Hexadecimal digit E [e]</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_f_button">
-                <property name="label" translatable="yes" comments="Hexadecimal digit F button">F</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Hexadecimal digit F [f]</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_a_button">
-                <property name="label" translatable="yes" comments="Hexadecimal digit A button">A</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Hexadecimal digit A [a]</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_b_button">
-                <property name="label" translatable="yes" comments="Hexadecimal digit B button">B</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Hexadecimal digit B [b]</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_c_button">
-                <property name="label" translatable="yes" comments="Hexadecimal digit C button">C</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Hexadecimal digit C [c]</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_and_button">
-                <property name="label" translatable="yes" comments="Boolean AND button">and</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">5</property>
-                <property name="right_attach">6</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_or_button">
-                <property name="label" translatable="yes" comments="Boolean OR button">or</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">6</property>
-                <property name="right_attach">7</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_not_button">
-                <property name="label" translatable="yes" comments="Boolean NOT button">not</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">7</property>
-                <property name="right_attach">8</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_xor_button">
-                <property name="label" translatable="yes" comments="Boolean exlcusive OR button">xor</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">8</property>
-                <property name="right_attach">9</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_xnor_button">
-                <property name="label" translatable="yes" comments="Boolean exclusive NOR button">xnor</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">9</property>
-                <property name="right_attach">10</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_ones_complement_button">
-                <property name="label" translatable="yes" comments="1's complement">ones</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">7</property>
-                <property name="right_attach">8</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_twos_complement_button">
-                <property name="label" translatable="yes" comments="2's complement">twos</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">8</property>
-                <property name="right_attach">9</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_shift_right_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
                 <child>
-                  <object class="GtkHBox" id="hbox10">
+                  <object class="GtkButton" id="calc_add_button">
+                    <property name="label" translatable="yes" comments="Addition button">+</property>
                     <property name="visible">True</property>
-                    <property name="spacing">3</property>
-                    <child>
-                      <object class="GtkLabel" id="label6">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="label" translatable="yes" comments="Shift right button">&gt;</property>
-                      </object>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkArrow" id="arrow4">
-                        <property name="visible">True</property>
-                        <property name="arrow_type">down</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="tooltip_text" translatable="yes">Add [+]</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_add_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Add</property>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">1</property>
-                      </packing>
                     </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="right_attach">4</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">6</property>
-                <property name="right_attach">7</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_shift_left_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
                 <child>
-                  <object class="GtkHBox" id="hbox11">
+                  <object class="GtkButton" id="calc_clear_button">
+                    <property name="label" translatable="yes" comments="Clear display button. Clr is short for Clear">Clr</property>
                     <property name="visible">True</property>
-                    <property name="spacing">3</property>
-                    <child>
-                      <object class="GtkLabel" id="label7">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="label" translatable="yes" comments="Shift left button">&lt;</property>
-                      </object>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkArrow" id="arrow5">
-                        <property name="visible">True</property>
-                        <property name="arrow_type">down</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="tooltip_text" translatable="yes" comments="Clear display tooltip">Clear display [Escape]</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_clear_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Clear</property>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">1</property>
-                      </packing>
                     </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="right_attach">5</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">5</property>
-                <property name="right_attach">6</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_trunc_button">
-                <property name="label" translatable="yes" comments="Truncate displayed value">trunc</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">9</property>
-                <property name="right_attach">10</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_random_button">
-                <property name="label" translatable="yes" comments="Random number">rand</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-              </object>
-              <packing>
-                <property name="left_attach">3</property>
-                <property name="right_attach">4</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_base_2_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
                 <child>
-                  <object class="GtkLabel" id="base_2_label">
+                  <object class="GtkButton" id="calc_start_group_button">
+                    <property name="label" translatable="yes" comments="Start calculation group button">(</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The base 2 button">&lt;i&gt;x&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt;</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_start_group_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Left bracket</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="right_attach">5</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">3</property>
-                <property name="right_attach">4</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_base_8_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
                 <child>
-                  <object class="GtkLabel" id="base_8_label">
+                  <object class="GtkButton" id="calc_end_group_button">
+                    <property name="label" translatable="yes" comments="Right bracket">)</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The base 8 button">&lt;i&gt;x&lt;/i&gt;&lt;sub&gt;8&lt;/sub&gt;</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_end_group_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Right bracket</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="right_attach">5</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">4</property>
-                <property name="right_attach">5</property>
-                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="calc_base_16_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
                 <child>
-                  <object class="GtkLabel" id="base_16_label">
+                  <object class="GtkButton" id="calc_percentage_button">
+                    <property name="label" translatable="yes" comments="The percentage button">%</property>
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="The base 16 button">&lt;i&gt;x&lt;/i&gt;&lt;sub&gt;16&lt;/sub&gt;</property>
-                    <property name="use_markup">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="tooltip_text" translatable="yes" comments="Percentage button tooltip">Percentage [%]</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="calc_percentage_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Percentage</property>
+                      </object>
+                    </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="right_attach">5</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
                 </child>
               </object>
               <packing>
-                <property name="left_attach">4</property>
                 <property name="right_attach">5</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
+                <property name="top_attach">5</property>
+                <property name="bottom_attach">9</property>
                 <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                 <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
               </packing>
             </child>
-          </object>
-          <packing>
-            <property name="position">7</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkTable" id="table4">
-            <property name="visible">True</property>
-            <property name="border_width">6</property>
-            <property name="n_rows">4</property>
-            <property name="n_columns">2</property>
-            <property name="column_spacing">6</property>
-            <property name="row_spacing">6</property>
             <child>
               <object class="GtkTable" id="advanced_panel">
                 <property name="visible">True</property>
                 <property name="n_rows">4</property>
                 <property name="n_columns">5</property>
-                <property name="column_spacing">6</property>
-                <property name="row_spacing">6</property>
                 <property name="homogeneous">True</property>
                 <child>
                   <object class="GtkButton" id="calc_store_button">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Store displayed value in memory register [S]</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
                       <object class="AtkObject" id="calc_store_button-atkobject">
@@ -3238,6 +2688,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
                       <object class="AtkObject" id="calc_recall_button-atkobject">
@@ -3289,6 +2740,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <signal name="clicked" handler="button_cb"/>
@@ -3313,6 +2765,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <signal name="clicked" handler="button_cb"/>
@@ -3332,6 +2785,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
@@ -3354,6 +2808,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="focus_on_click">False</property>
                     <signal name="clicked" handler="button_cb"/>
                     <child>
@@ -3375,6 +2830,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="focus_on_click">False</property>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
@@ -3390,6 +2846,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
                       <object class="AtkObject" id="calc_inverse_button-atkobject">
@@ -3425,6 +2882,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <signal name="clicked" handler="button_cb"/>
@@ -3443,6 +2901,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <signal name="clicked" handler="button_cb"/>
@@ -3468,6 +2927,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
@@ -3502,6 +2962,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="focus_on_click">False</property>
                     <signal name="clicked" handler="button_cb"/>
                     <child>
@@ -3527,6 +2988,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <property name="yalign">0.43999999761581421</property>
@@ -3551,6 +3013,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <signal name="clicked" handler="button_cb"/>
@@ -3575,6 +3038,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <property name="yalign">0.43999999761581421</property>
@@ -3583,6 +3047,7 @@
                         <property name="AtkObject::accessible-name" translatable="yes">Integer portion</property>
                       </object>
                     </child>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
                     <property name="left_attach">2</property>
@@ -3597,8 +3062,10 @@
                   <object class="GtkButton" id="calc_imaginary_button">
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
                     <child>
                       <object class="GtkLabel" id="imaginary_label">
                         <property name="visible">True</property>
@@ -3621,6 +3088,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <child>
                       <object class="GtkLabel" id="label4">
                         <property name="visible">True</property>
@@ -3644,6 +3112,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <child>
                       <object class="GtkLabel" id="label3">
                         <property name="visible">True</property>
@@ -3667,8 +3136,10 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
                     <property name="left_attach">4</property>
@@ -3684,120 +3155,99 @@
                 </child>
               </object>
               <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="bottom_attach">4</property>
+                <property name="left_attach">5</property>
+                <property name="right_attach">10</property>
+                <property name="top_attach">5</property>
+                <property name="bottom_attach">9</property>
                 <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                 <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
               </packing>
             </child>
             <child>
-              <object class="GtkTable" id="basic_panel">
+              <object class="GtkTable" id="programming_panel">
                 <property name="visible">True</property>
-                <property name="n_rows">4</property>
-                <property name="n_columns">5</property>
-                <property name="column_spacing">6</property>
-                <property name="row_spacing">6</property>
+                <property name="n_rows">2</property>
+                <property name="n_columns">10</property>
                 <property name="homogeneous">True</property>
                 <child>
-                  <object class="GtkButton" id="calc_4_button">
-                    <property name="label" translatable="yes" comments="Numeric 4 button">4</property>
+                  <object class="GtkButton" id="calc_d_button">
+                    <property name="label" translatable="yes" comments="Hexadecimal digit D button">D</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_4_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 4</property>
-                      </object>
-                    </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_7_button">
-                    <property name="label" translatable="yes" comments="Numeric 7 button">7</property>
+                  <object class="GtkButton" id="calc_e_button">
+                    <property name="label" translatable="yes" comments="Hexadecimal digit E button">E</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_7_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 7</property>
-                      </object>
-                    </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_8_button">
-                    <property name="label" translatable="yes" comments="Numeric 8 button">8</property>
+                  <object class="GtkButton" id="calc_f_button">
+                    <property name="label" translatable="yes" comments="Hexadecimal digit F button">F</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_8_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 8</property>
-                      </object>
-                    </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_9_button">
-                    <property name="label" translatable="yes" comments="Numeric 9 button">9</property>
+                  <object class="GtkButton" id="calc_a_button">
+                    <property name="label" translatable="yes" comments="Hexadecimal digit A button">A</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_9_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 9</property>
-                      </object>
-                    </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_5_button">
-                    <property name="label" translatable="yes" comments="Numeric 5 button">5</property>
+                  <object class="GtkButton" id="calc_b_button">
+                    <property name="label" translatable="yes" comments="Hexadecimal digit B button">B</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_5_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 5</property>
-                      </object>
-                    </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
@@ -3810,18 +3260,14 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_6_button">
-                    <property name="label" translatable="yes" comments="Numeric 6 button">6</property>
+                  <object class="GtkButton" id="calc_c_button">
+                    <property name="label" translatable="yes" comments="Hexadecimal digit C button">C</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_6_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 6</property>
-                      </object>
-                    </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
@@ -3834,19 +3280,252 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_divide_button">
-                    <property name="label" translatable="yes" comments="Division button">&#xF7;</property>
+                  <object class="GtkButton" id="calc_and_button">
+                    <property name="label" translatable="yes" comments="Boolean AND button">and</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Divide [/]</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_divide_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Divide</property>
+                    <signal name="clicked" handler="button_cb"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">5</property>
+                    <property name="right_attach">6</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_or_button">
+                    <property name="label" translatable="yes" comments="Boolean OR button">or</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">6</property>
+                    <property name="right_attach">7</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_not_button">
+                    <property name="label" translatable="yes" comments="Boolean NOT button">not</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">7</property>
+                    <property name="right_attach">8</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_xor_button">
+                    <property name="label" translatable="yes" comments="Boolean exlcusive OR button">xor</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">8</property>
+                    <property name="right_attach">9</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_xnor_button">
+                    <property name="label" translatable="yes" comments="Boolean exclusive NOR button">xnor</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">9</property>
+                    <property name="right_attach">10</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_ones_complement_button">
+                    <property name="label" translatable="yes" comments="1's complement">ones</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">7</property>
+                    <property name="right_attach">8</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_twos_complement_button">
+                    <property name="label" translatable="yes" comments="2's complement">twos</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">8</property>
+                    <property name="right_attach">9</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_shift_right_button">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
+                    <child>
+                      <object class="GtkHBox" id="hbox10">
+                        <property name="visible">True</property>
+                        <property name="spacing">3</property>
+                        <child>
+                          <object class="GtkLabel" id="label6">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes" comments="Shift right button">&gt;</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkArrow" id="arrow4">
+                            <property name="visible">True</property>
+                            <property name="arrow_type">down</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">6</property>
+                    <property name="right_attach">7</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_shift_left_button">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
+                    <child>
+                      <object class="GtkHBox" id="hbox11">
+                        <property name="visible">True</property>
+                        <property name="spacing">3</property>
+                        <child>
+                          <object class="GtkLabel" id="label7">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes" comments="Shift left button">&lt;</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkArrow" id="arrow5">
+                            <property name="visible">True</property>
+                            <property name="arrow_type">down</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
                       </object>
                     </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">5</property>
+                    <property name="right_attach">6</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_trunc_button">
+                    <property name="label" translatable="yes" comments="Truncate displayed value">trunc</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">9</property>
+                    <property name="right_attach">10</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_random_button">
+                    <property name="label" translatable="yes" comments="Random number">rand</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="use_underline">True</property>
+                    <property name="focus_on_click">False</property>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
@@ -3857,211 +3536,511 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_1_button">
-                    <property name="label" translatable="yes" comments="Numeric 1 button">1</property>
+                  <object class="GtkButton" id="calc_base_2_button">
                     <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="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_1_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 1</property>
+                    <signal name="clicked" handler="button_cb"/>
+                    <child>
+                      <object class="GtkLabel" id="base_2_label">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes" comments="The base 2 button">&lt;i&gt;x&lt;/i&gt;&lt;sub&gt;2&lt;/sub&gt;</property>
+                        <property name="use_markup">True</property>
                       </object>
                     </child>
-                    <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
+                    <property name="left_attach">3</property>
+                    <property name="right_attach">4</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_2_button">
-                    <property name="label" translatable="yes" comments="Numeric 2 button">2</property>
+                  <object class="GtkButton" id="calc_base_8_button">
                     <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="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_2_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 2</property>
+                    <signal name="clicked" handler="button_cb"/>
+                    <child>
+                      <object class="GtkLabel" id="base_8_label">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes" comments="The base 8 button">&lt;i&gt;x&lt;/i&gt;&lt;sub&gt;8&lt;/sub&gt;</property>
+                        <property name="use_markup">True</property>
                       </object>
                     </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="right_attach">5</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_base_16_button">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
                     <signal name="clicked" handler="button_cb"/>
+                    <child>
+                      <object class="GtkLabel" id="base_16_label">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes" comments="The base 16 button">&lt;i&gt;x&lt;/i&gt;&lt;sub&gt;16&lt;/sub&gt;</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="right_attach">5</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="right_attach">10</property>
+                <property name="top_attach">3</property>
+                <property name="bottom_attach">5</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkTable" id="si_panel">
+                <property name="n_columns">10</property>
+                <property name="homogeneous">True</property>
+                <child>
+                  <object class="GtkButton" id="calc_si_kilo_button">
+                    <property name="label" translatable="yes">k</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">5</property>
+                    <property name="right_attach">6</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_si_milli_button">
+                    <property name="label" translatable="yes">m</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="right_attach">5</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_si_micro_button">
+                    <property name="label" translatable="yes">&#xB5;</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="right_attach">4</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_si_mega_button">
+                    <property name="label" translatable="yes">M</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">6</property>
+                    <property name="right_attach">7</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_si_giga_button">
+                    <property name="label" translatable="yes">G</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">7</property>
+                    <property name="right_attach">8</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_si_peta_button">
+                    <property name="label" translatable="yes">P</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">8</property>
+                    <property name="right_attach">9</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_si_femto_button">
+                    <property name="label" translatable="yes">f</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
+                  </object>
+                  <packing>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_si_pico_button">
+                    <property name="label" translatable="yes">p</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_0_button">
-                    <property name="label" translatable="yes" comments="Numeric 0 button">0</property>
+                  <object class="GtkButton" id="calc_si_nano_button">
+                    <property name="label" translatable="yes">n</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="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="right_attach">10</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkTable" id="scientific_panel">
+                <property name="visible">True</property>
+                <property name="n_columns">10</property>
+                <property name="homogeneous">True</property>
+                <child>
+                  <object class="GtkButton" id="calc_tangent_button">
+                    <property name="label" translatable="yes">tan</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_0_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 0</property>
-                      </object>
-                    </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
+                    <property name="left_attach">5</property>
+                    <property name="right_attach">6</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_numeric_point_button">
-                    <property name="label" comments="Label is set in gtk.c to comply with LC flags">.</property>
+                  <object class="GtkButton" id="calc_sine_button">
+                    <property name="label" translatable="yes">sin</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Numeric point [. or ,]</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">4</property>
+                    <property name="right_attach">5</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_cosine_button">
+                    <property name="label" translatable="yes">cos</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">3</property>
+                    <property name="right_attach">4</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_hyperbolic_cosine_button">
+                    <property name="label" translatable="yes">cosh</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">6</property>
+                    <property name="right_attach">7</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_hyperbolic_sine_button">
+                    <property name="label" translatable="yes">sinh</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">7</property>
+                    <property name="right_attach">8</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="calc_hyperbolic_tangent_button">
+                    <property name="label" translatable="yes">tanh</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
+                    <property name="focus_on_click">False</property>
+                    <signal name="clicked" handler="button_cb"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">8</property>
+                    <property name="right_attach">9</property>
+                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="right_attach">10</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkTable" id="financial_panel">
+                <property name="visible">True</property>
+                <property name="n_columns">10</property>
+                <property name="homogeneous">True</property>
+                <child>
+                  <object class="GtkButton" id="calc_finc_straight_line_depreciation_button">
+                    <property name="label" translatable="yes" comments="Calculates the straight-line depreciation of an asset for one period. The depreciable cost is cost - salvage. The straight-line method of depreciation divides the depreciable cost evenly over the useful life of an asset. The useful life is the number of periods, typically years, over which an asset is depreciated. See also: http://en.wikipedia.org/wiki/Depreciation";>Sln</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_numeric_point_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric point</property>
+                      <object class="AtkObject" id="calc_finc_straight_line_depreciation_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Straight-line depreciation</property>
+                        <property name="AtkObject::accessible-description" translatable="yes">Straight-line depreciation [l]</property>
                       </object>
                     </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
+                    <property name="left_attach">7</property>
+                    <property name="right_attach">8</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_result_button">
-                    <property name="label" translatable="yes" comments="Solve button (clicking this solves the displayed calculation)">=</property>
+                  <object class="GtkButton" id="calc_finc_periodic_interest_rate_button">
+                    <property name="label" translatable="yes" comments="Calculates the periodic interest necessary to increase an investment of present value pv to a future value of fv, over the number of compounding periods in term. See also: http://en.wikipedia.org/wiki/Interest                                      ">Rate</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Calculate result [=]</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_result_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Calculate result</property>
+                      <object class="AtkObject" id="calc_finc_periodic_interest_rate_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Periodic interest rate</property>
+                        <property name="AtkObject::accessible-description" translatable="yes">Periodic interest rate [T]</property>
                       </object>
                     </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
+                    <property name="left_attach">6</property>
+                    <property name="right_attach">7</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_3_button">
-                    <property name="label" translatable="yes" comments="Numeric 3 button">3</property>
+                  <object class="GtkButton" id="calc_finc_present_value_button">
+                    <property name="label" translatable="yes" comments="Calculates the present value of an investment based on a series of equal payments, each of amount pmt, discounted at a periodic interest rate of int, over the number of payment periods in the term. See also: http://en.wikipedia.org/wiki/Present_value";>Pv</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_3_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 3</property>
+                      <object class="AtkObject" id="calc_finc_present_value_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Present value</property>
+                        <property name="AtkObject::accessible-description" translatable="yes">Present value [p]</property>
                       </object>
                     </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
+                    <property name="left_attach">5</property>
+                    <property name="right_attach">6</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_multiply_button">
-                    <property name="label" translatable="yes" comments="Multiplication button">&#xD7;</property>
+                  <object class="GtkButton" id="calc_finc_periodic_payment_button">
+                    <property name="label" translatable="yes" comments="Calculates the amount of the periodic payment of a loan, where payments are made at the end of each payment period. See also: http://en.wikipedia.org/wiki/Amortization_schedule";>Pmt</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Multiply [*]</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_multiply_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Multiply</property>
-                        <property name="AtkObject::accessible-description" translatable="yes">Multiply</property>
+                      <object class="AtkObject" id="calc_finc_periodic_payment_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Periodic payment</property>
+                        <property name="AtkObject::accessible-description" translatable="yes">Periodic payment [P]</property>
                       </object>
                     </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
-                    <property name="left_attach">3</property>
-                    <property name="right_attach">4</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
+                    <property name="left_attach">4</property>
+                    <property name="right_attach">5</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_subtract_button">
-                    <property name="label" translatable="yes" comments="Subtraction button">&#x2212;</property>
+                  <object class="GtkButton" id="calc_finc_future_value_button">
+                    <property name="label" translatable="yes" comments="Calculates the future value of an investment based on a series of equal payments, each of amount pmt, at a periodic interest rate of int, over the number of payment periods in the term. See also: http://en.wikipedia.org/wiki/Future_value";>Fv</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Subtract [-]</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_subtract_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Subtract</property>
-                        <property name="AtkObject::accessible-description" translatable="yes">Subtract [-]</property>
+                      <object class="AtkObject" id="calc_finc_future_value_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Future value</property>
+                        <property name="AtkObject::accessible-description" translatable="yes">Future value [v]</property>
                       </object>
                     </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
-                    <property name="left_attach">3</property>
-                    <property name="right_attach">4</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_add_button">
-                    <property name="label" translatable="yes" comments="Addition button">+</property>
+                  <object class="GtkButton" id="calc_finc_gross_profit_margin_button">
+                    <property name="label" translatable="yes" comments="Calculates the resale price of a product, based on the product cost and the wanted gross profit margin. See also: http://en.wikipedia.org/wiki/Gross_profit_margin";>Gpm</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Add [+]</property>
+                    <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_add_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Add</property>
+                      <object class="AtkObject" id="calc_finc_gross_profit_margin_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Gross Profit Margin</property>
+                        <property name="AtkObject::accessible-description" translatable="yes">Gross Profit Margin [g]</property>
                       </object>
                     </child>
                     <signal name="clicked" handler="button_cb"/>
@@ -4069,118 +4048,114 @@
                   <packing>
                     <property name="left_attach">3</property>
                     <property name="right_attach">4</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_clear_button">
-                    <property name="label" translatable="yes" comments="Clear display button. Clr is short for Clear">Clr</property>
+                  <object class="GtkButton" id="calc_finc_double_declining_depreciation_button">
+                    <property name="label" translatable="yes" comments="Calculates the depreciation allowance on an asset for a specified period of time, using the double-declining balance method. See also: http://en.wikipedia.org/wiki/Depreciation";>Ddb</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
-                    <property name="tooltip_text" translatable="yes" comments="Clear display tooltip">Clear display [Escape]</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_clear_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Clear</property>
+                      <object class="AtkObject" id="calc_finc_double_declining_depreciation_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Double-declining depreciation</property>
+                        <property name="AtkObject::accessible-description" translatable="yes">Double-declining depreciation [D]</property>
                       </object>
                     </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
-                    <property name="left_attach">4</property>
-                    <property name="right_attach">5</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_start_group_button">
-                    <property name="label" translatable="yes" comments="Start calculation group button">(</property>
+                  <object class="GtkButton" id="calc_finc_compounding_term_button">
+                    <property name="label" translatable="yes" comments="Calculates the number of compounding periods necessary to increase an investment of present value pv to a future value of fv, at a fixed interest rate of int per compounding period. See also: http://en.wikipedia.org/wiki/Compound_interest";>Ctrm</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_start_group_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Left bracket</property>
+                      <object class="AtkObject" id="calc_finc_compounding_term_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Compounding term</property>
+                        <property name="AtkObject::accessible-description" translatable="yes">Compounding term [m]</property>
                       </object>
                     </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
-                    <property name="left_attach">4</property>
-                    <property name="right_attach">5</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_end_group_button">
-                    <property name="label" translatable="yes" comments="Right bracket">)</property>
+                  <object class="GtkButton" id="calc_finc_sum_of_the_years_digits_depreciation_button">
+                    <property name="label" translatable="yes" comments="Calculates the depreciation allowance on an asset for a specified period of time, using the Sum-Of-The-Years'-Digits method. This method of depreciation accelerates the rate of depreciation, so that more depreciation expense occurs in earlier periods than in later ones. The depreciable cost is cost - salvage. The useful life is the number of periods, typically years, over which an asset is depreciated. See also: http://en.wikipedia.org/wiki/Depreciation";>Syd</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_end_group_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Right bracket</property>
+                      <object class="AtkObject" id="calc_finc_sum_of_the_years_digits_depreciation_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Sum-of-the years'-digits depreciation</property>
+                        <property name="AtkObject::accessible-description" translatable="yes">Sum-of-the years'-digits depreciation [y]</property>
                       </object>
                     </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
-                    <property name="left_attach">4</property>
-                    <property name="right_attach">5</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
+                    <property name="left_attach">8</property>
+                    <property name="right_attach">9</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_percentage_button">
-                    <property name="label" translatable="yes" comments="The percentage button">%</property>
+                  <object class="GtkButton" id="calc_finc_term_button">
+                    <property name="label" translatable="yes" comments="Calculates the number of payment periods that are necessary during the term of an ordinary annuity, to accumulate a future value of fv, at a periodic interest rate of int. Each payment is equal to amount pmt. See also: http://en.wikipedia.org/wiki/Annuity_(finance_theory)">Term</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
-                    <property name="tooltip_text" translatable="yes" comments="Percentage button tooltip">Percentage [%]</property>
+                    <property name="border_width">3</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_percentage_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Percentage</property>
+                      <object class="AtkObject" id="calc_finc_term_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Payment period</property>
+                        <property name="AtkObject::accessible-description" translatable="yes">Payment period [t]</property>
                       </object>
                     </child>
                     <signal name="clicked" handler="button_cb"/>
                   </object>
                   <packing>
-                    <property name="left_attach">4</property>
-                    <property name="right_attach">5</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
+                    <property name="left_attach">9</property>
+                    <property name="right_attach">10</property>
                     <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                     <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                   </packing>
                 </child>
               </object>
               <packing>
-                <property name="bottom_attach">4</property>
+                <property name="right_attach">10</property>
                 <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                 <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="position">8</property>
+            <property name="position">3</property>
           </packing>
         </child>
         <child>
@@ -4200,7 +4175,7 @@
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="position">9</property>
+            <property name="position">4</property>
           </packing>
         </child>
       </object>
@@ -4906,7 +4881,7 @@
       <action-widget response="-5">button9</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkTextBuffer" id="textbuffer1"/>
+  <object class="GtkTextBuffer" id="display_buffer"/>
   <object class="GtkAccelGroup" id="accelgroup1"/>
   <object class="GtkImage" id="image1">
     <property name="visible">True</property>
diff --git a/src/functions.c b/src/functions.c
index 9609fd0..0656aa8 100644
--- a/src/functions.c
+++ b/src/functions.c
@@ -51,88 +51,11 @@ typedef struct {
 /* Note that none of these strings can be translated as the parser expects them to be correct */
 /* id, symname flags */
 static Function functions[NFUNCTIONS] = {
-{ FN_SPACE,             " ", 0 },
-{ FN_0,                 "0", NUMBER },
-{ FN_1,                 "1", NUMBER },
-{ FN_2,                 "2", NUMBER },    
-{ FN_3,                 "3", NUMBER },
-{ FN_4,                 "4", NUMBER },
-{ FN_5,                 "5", NUMBER },
-{ FN_6,                 "6", NUMBER },
-{ FN_7,                 "7", NUMBER },
-{ FN_8,                 "8", NUMBER },
-{ FN_9,                 "9", NUMBER },
-{ FN_A,                 "A", NUMBER },
-{ FN_B,                 "B", NUMBER },    
-{ FN_C,                 "C", NUMBER },
-{ FN_D,                 "D", NUMBER },
-{ FN_E,                 "E", NUMBER },
-{ FN_F,                 "F", NUMBER },
-{ FN_NUMERIC_POINT,     ".", NUMBER },
-{ FN_EULERS_NUMBER,     "e", 0},
-{ FN_PI,                "Ï?", 0},
-{ FN_BASE2,             "â??", 0},
-{ FN_BASE8,             "â??", 0},
-{ FN_BASE16,            "â??â??", 0},
-{ FN_SUPER_0,           "â?°", 0 },
-{ FN_SUPER_1,           "¹", 0 },
-{ FN_SUPER_2,           "²", 0 },    
-{ FN_SUPER_3,           "³", 0 },
-{ FN_SUPER_4,           "â?´", 0 },
-{ FN_SUPER_5,           "â?µ", 0 },
-{ FN_SUPER_6,           "â?¶", 0 },
-{ FN_SUPER_7,           "â?·", 0 },
-{ FN_SUPER_8,           "â?¸", 0 },
-{ FN_SUPER_9,           "â?¹", 0 },
-{ FN_SUPER_MINUS,       "â?»", 0 },
-{ FN_SUB_0,             "â??", 0 },
-{ FN_SUB_1,             "â??", 0 },
-{ FN_SUB_2,             "â??", 0 },    
-{ FN_SUB_3,             "â??", 0 },
-{ FN_SUB_4,             "â??", 0 },
-{ FN_SUB_5,             "â??", 0 },
-{ FN_SUB_6,             "â??", 0 },
-{ FN_SUB_7,             "â??", 0 },
-{ FN_SUB_8,             "â??", 0 },
-{ FN_SUB_9,             "â??", 0 },
-{ FN_SUB_MINUS,         "â??", 0 },
+{ FN_TEXT,              NULL, 0 },
 { FN_CALCULATE,         NULL, 0 },
 { FN_CLEAR,             NULL, 0 },
-{ FN_START_BLOCK,       "(", 0 },
-{ FN_END_BLOCK,         ")", 0 },
-{ FN_ADD,               "+", 0 },
-{ FN_SUBTRACT,          "â??", 0 },
-{ FN_MULTIPLY,          "Ã?", 0 },
-{ FN_DIVIDE,            "÷", 0 },
 { FN_BACKSPACE,         NULL, 0 },
 { FN_DELETE,            NULL, 0 },
-{ FN_INTEGER,           "int", 0 },
-{ FN_FRACTION,          "frac", 0 },
-{ FN_PERCENTAGE,        "%", 0 },
-{ FN_ROOT,              "â??", 0 },
-{ FN_INVERSE,           "�¹", 0 },
-{ FN_X_POW_Y,           "^", 0 },
-{ FN_FACTORIAL,         "!", 0 },
-{ FN_RANDOM,            "rand", 0 },
-{ FN_SIN,               "sin", 0 },
-{ FN_SINH,              "sinh", 0 },
-{ FN_COS,               "cos", 0 },
-{ FN_COSH,              "cosh", 0 },
-{ FN_TAN,               "tan", 0 },
-{ FN_TANH,              "tanh", 0 },
-{ FN_NATURAL_LOGARITHM, "ln", 0 },
-{ FN_LOGARITHM,         "log", 0 },
-{ FN_ABSOLUTE_VALUE,    "|", 0 },
-{ FN_TRUNC,             "trunc", 0 },
-{ FN_MODULUS_DIVIDE,    "mod", 0 },
-{ FN_ONES_COMPLEMENT,   "ones", 0 },
-{ FN_TWOS_COMPLEMENT,   "twos", 0 },
-{ FN_EXPONENTIAL,       "Ã?10^", 0 },
-{ FN_NOT,               "~", 0 },
-{ FN_OR,                "or", 0 },
-{ FN_AND,               "and", 0 },       
-{ FN_XOR,               "xor", 0 },
-{ FN_XNOR,              "xnor", 0 },
 { FN_TOGGLE_BIT,        NULL, 0 },
 { FN_SHIFT,             NULL, 0 },
 { FN_STORE,             NULL, 0 },
@@ -509,14 +432,8 @@ do_expression(int function, int arg, int cursor_start, int cursor_end)
             }
             break;
 
-        default:
-            /* If display is a number then perform functions on that number */
-            if (functions[function].flags & FUNC) {
-                SNPRINTF(buf, MAXLINE, "%s(", functions[function].symname);
-                display_insert(&v->display, cursor_start, cursor_end, buf);
-            } else {
-                display_insert(&v->display, cursor_start, cursor_end, functions[function].symname);
-            }
+        case FN_TEXT:
+            display_insert(&v->display, cursor_start, cursor_end, (const char *)arg); // FIXME: Probably not 64 bit safe
             break;
     }
 
diff --git a/src/functions.h b/src/functions.h
index 11e8893..5cd4a4f 100644
--- a/src/functions.h
+++ b/src/functions.h
@@ -26,57 +26,11 @@
 /* Available functions */
 enum
 {
-    FN_SPACE,
-    FN_0, FN_1, FN_2, FN_3,
-    FN_4, FN_5, FN_6, FN_7,
-    FN_8, FN_9, FN_A, FN_B,
-    FN_C, FN_D, FN_E, FN_F,
-    FN_NUMERIC_POINT,
-    FN_EULERS_NUMBER,
-    FN_PI,
-    FN_BASE2,
-    FN_BASE8,
-    FN_BASE16,
-    FN_SUPER_0, FN_SUPER_1, FN_SUPER_2, FN_SUPER_3,
-    FN_SUPER_4, FN_SUPER_5, FN_SUPER_6, FN_SUPER_7,
-    FN_SUPER_8, FN_SUPER_9, FN_SUPER_MINUS,
-    FN_SUB_0, FN_SUB_1, FN_SUB_2, FN_SUB_3,
-    FN_SUB_4, FN_SUB_5, FN_SUB_6, FN_SUB_7,
-    FN_SUB_8, FN_SUB_9, FN_SUB_MINUS,
+    FN_TEXT,
     FN_CALCULATE,
     FN_CLEAR,
-    FN_START_BLOCK, FN_END_BLOCK,
-    FN_ADD, FN_SUBTRACT,
-    FN_MULTIPLY, FN_DIVIDE,
     FN_BACKSPACE,
     FN_DELETE,        
-    FN_INTEGER,
-    FN_FRACTION,
-    FN_PERCENTAGE,
-    FN_ROOT,
-    FN_INVERSE,
-    FN_X_POW_Y,
-    FN_FACTORIAL,
-    FN_RANDOM,
-    FN_SIN,
-    FN_SINH,
-    FN_COS,
-    FN_COSH,
-    FN_TAN,
-    FN_TANH,
-    FN_NATURAL_LOGARITHM,
-    FN_LOGARITHM,
-    FN_ABSOLUTE_VALUE,
-    FN_TRUNC,
-    FN_MODULUS_DIVIDE,
-    FN_ONES_COMPLEMENT,
-    FN_TWOS_COMPLEMENT,
-    FN_EXPONENTIAL,
-    FN_NOT,
-    FN_OR,
-    FN_AND,
-    FN_XOR,
-    FN_XNOR,
     FN_TOGGLE_BIT,
     FN_SHIFT,
     FN_STORE,
diff --git a/src/gtk.c b/src/gtk.c
index 013a530..a7907b7 100644
--- a/src/gtk.c
+++ b/src/gtk.c
@@ -98,289 +98,6 @@ static char *finc_dialog_fields[FINC_NUM_DIALOGS][5] = {
     {"term_pmt",  "term_fv",     "term_pint",  NULL,         NULL},
 };
 
-static struct button_widget button_widgets[] = {
-    {FN_0,                  "0",
-    { 0,     0,        0,             0 },
-    { GDK_0, GDK_KP_0, GDK_KP_Insert, 0 }},
-
-    {FN_1,                  "1",
-    { 0,     0,        0,          0,       0 },
-    { GDK_1, GDK_KP_1, GDK_KP_End, GDK_R13, 0 }},
-
-    {FN_2,                  "2",
-    { 0,     0,        0,           0 }, 
-    { GDK_2, GDK_KP_2, GDK_KP_Down, 0 }},
-
-    {FN_3,                  "3",
-    { 0,     0,        0,                0,       0 },
-    { GDK_3, GDK_KP_3, GDK_KP_Page_Down, GDK_R15, 0 }},
-
-    {FN_4,                  "4",
-    { 0,     0,        0,           0 },
-    { GDK_4, GDK_KP_4, GDK_KP_Left, 0 }},
-
-    {FN_5,                  "5",
-    { 0,     0,        0,            0,       0 },
-    { GDK_5, GDK_KP_5, GDK_KP_Begin, GDK_R11, 0 }},
-
-    {FN_6,                  "6",
-    { 0,     0,        0,            0 },
-    { GDK_6, GDK_KP_6, GDK_KP_Right, 0 }},
-
-    {FN_7,                  "7",
-    { 0,     0,        0,           0,      0 },
-    { GDK_7, GDK_KP_7, GDK_KP_Home, GDK_R7, 0 }},
-
-    {FN_8,                  "8",
-    { 0,     0,        0,         0 },
-    { GDK_8, GDK_KP_8, GDK_KP_Up, 0 }},
-
-    {FN_9,                  "9",
-    { 0,     0,        0,              0,      0 },
-    { GDK_9, GDK_KP_9, GDK_KP_Page_Up, GDK_R9, 0 }},
-
-    {FN_A,                  "a",
-    { 0,     0,     0 },
-    { GDK_a, GDK_A, 0 }},
-
-    {FN_B,                  "b",
-    { 0,     0,     0 },
-    { GDK_b, GDK_B, 0 }},
-
-    {FN_C,                  "c",
-    { 0,     0,     0 },
-    { GDK_c, GDK_C, 0 }},
-
-    {FN_D,                  "d",
-    { 0,     0,     0 },
-    { GDK_d, GDK_D, 0 }},
-
-    {FN_E,                  "e",
-    { 0,     0,     0 },
-    { GDK_e, GDK_E, 0 }},
-
-    {FN_F,                  "f",
-    { 0,     0,     0 },
-    { GDK_f, GDK_F, 0 }},
-    
-    {FN_BASE2,              "base_2",
-    { 0 },
-    { 0 }},
-
-    {FN_BASE8,              "base_8",
-    { 0 },
-    { 0 }},
-
-    {FN_BASE16,             "base_16",
-    { 0 },
-    { 0 }},
-    
-    {FN_PI,                 "pi",
-    { GDK_CONTROL_MASK, 0 },
-    { GDK_p,            0 }},
-
-    {FN_EULERS_NUMBER,      "eulers_number",
-    { 0 },
-    { 0 }},
-
-    {FN_CLEAR,              "clear",
-    { 0,              GDK_SHIFT_MASK, GDK_CONTROL_MASK, 0 },
-    { GDK_Escape,     GDK_Delete,     GDK_BackSpace,    0 }},
-
-    {FN_SHIFT,              "shift_left",
-    { 0,        0 },
-    { GDK_less, 0 }},
-
-    {FN_SHIFT,              "shift_right",
-    { 0,           0 },
-    { GDK_greater, 0 }},
-
-    {FN_STORE,              "store",
-    { 0 },
-    { 0 }},
-
-    {FN_RECALL,             "recall",
-    { 0 },
-    { 0 }},
-
-    {FN_NUMERIC_POINT,      "numeric_point",
-    { 0,          0,              0,             0,                0 },
-    { GDK_period, GDK_KP_Decimal, GDK_KP_Delete, GDK_KP_Separator, 0 }},
-
-    {FN_CALCULATE,          "result",
-    { 0,         0,            0,          0 },
-    { GDK_equal, GDK_KP_Enter, GDK_Return, 0 }},
-
-    {FN_START_BLOCK,        "start_group",
-    { 0,             0 },
-    { GDK_parenleft, 0 }},
-
-    {FN_END_BLOCK,          "end_group",
-    { 0,              0 },
-    { GDK_parenright, 0 }},
-
-    {FN_ADD,                "add",
-    { 0,        0,          0 },
-    { GDK_plus, GDK_KP_Add, 0 }},
-
-    {FN_SUBTRACT,           "subtract",
-    { 0,         0,               0,      0 },
-    { GDK_minus, GDK_KP_Subtract, GDK_R4, 0 }},
-
-    {FN_MULTIPLY,           "multiply",
-    { 0,            0,            0,               0,      0 },
-    { GDK_asterisk, GDK_multiply, GDK_KP_Multiply, GDK_R6, 0 }},
-
-    {FN_DIVIDE,             "divide",
-    { 0,         0,            0,             0,      0 },
-    { GDK_slash, GDK_division, GDK_KP_Divide, GDK_R5, 0 }},
-
-    {FN_INTEGER,            "integer_portion",
-    { 0 },
-    { 0 }},
-
-    {FN_PERCENTAGE,         "percentage",
-    { 0,           0 },
-    { GDK_percent, 0 }},
-
-    {FN_ROOT,               "root",
-    { GDK_CONTROL_MASK, 0 },
-    { GDK_r,            0 }},
-
-    {FN_INVERSE,            "inverse",
-    { GDK_CONTROL_MASK, 0 },
-    { GDK_i,            0 }},
-
-    {FN_ABSOLUTE_VALUE,     "abs",
-    { 0,       0 },
-    { GDK_bar, 0 }},
-
-    {FN_TRUNC,              "trunc",
-    { 0 },
-    { 0 }},
-
-    {FN_MODULUS_DIVIDE,     "modulus_divide",
-    { 0 },
-    { 0 }},
-
-    {FN_ONES_COMPLEMENT,    "ones_complement",
-    { 0 },
-    { 0 }},
-
-    {FN_TWOS_COMPLEMENT,    "twos_complement",
-    { 0 },
-    { 0 }},
-
-    {FN_EXPONENTIAL,        "exponential",
-    { GDK_CONTROL_MASK, 0 },
-    { GDK_e,            0 }},
-
-    {FN_FACTORIAL,          "factorial",
-    { 0,          0 },
-    { GDK_exclam, 0 }},
-
-    {FN_RANDOM,             "random",
-    { 0 },
-    { 0 }},
-
-    {FN_NOT,                "not",
-    { 0 },
-    { 0 }},
-
-    {FN_OR,                 "or",
-    { GDK_CONTROL_MASK, 0 },
-    { GDK_bar,          0 }},
-
-    {FN_AND,                "and",
-    { GDK_CONTROL_MASK, 0 },
-    { GDK_ampersand,    0 }},
-
-    {FN_XOR,                "xor",
-    { 0 },
-    { 0 }},
-
-    {FN_XNOR,               "xnor",
-    { 0 },
-    { 0 }},
-
-    {FN_SIN,                "sine",
-    { 0 },
-    { 0 }},
-
-    {FN_SINH,               "hyperbolic_sine",
-    { 0 },
-    { 0 }},
-
-    {FN_COS,                "cosine",
-    { 0 },
-    { 0 }},
-
-    {FN_COSH,               "hyperbolic_cosine",
-    { 0 },
-    { 0 }},
-
-    {FN_TAN,                "tangent",
-    { 0 },
-    { 0 }},
-
-    {FN_TANH,               "hyperbolic_tangent",
-    { 0 },
-    { 0 }},
-
-    {FN_NATURAL_LOGARITHM,  "natural_logarithm",
-    { 0 },
-    { 0 }},
-
-    {FN_LOGARITHM,          "logarithm",
-    { 0 },
-    { 0 }},
-
-    {FN_X_POW_Y,            "x_pow_y",
-    { 0,         0,               0 },
-    { GDK_caret, GDK_asciicircum, 0 }},
-
-    { 0,                    "finc_compounding_term",
-    { 0 },
-    { 0 }},
-
-    { 0,                    "finc_double_declining_depreciation",
-    { 0 },
-    { 0 }},
-
-    { 0,                    "finc_future_value",
-    { 0 },
-    { 0 }},
-
-    { 0,                    "finc_gross_profit_margin",
-    { 0 },
-    { 0 }},
-
-    { 0,                    "finc_periodic_payment",
-    { 0 },
-    { 0 }},
-
-    { 0,                    "finc_present_value",
-    { 0 },
-    { 0 }},
-
-    { 0,                    "finc_periodic_interest_rate",
-    { 0 },
-    { 0 }},
-
-    { 0,                    "finc_straight_line_depreciation",
-    { 0 },
-    { 0 }},
-
-    { 0,                    "finc_sum_of_the_years_digits_depreciation",
-    { 0 },
-    { 0 }},
-
-    { 0,                    "finc_term",
-    { 0 },
-    { 0 }}
-};
-#define NBUTTONS (sizeof(button_widgets) / sizeof(struct button_widget))
-
 #define UI_FILE      PACKAGE_UI_DIR "/gcalctool.ui"
 #define UI_FINC_FILE PACKAGE_UI_DIR "/financial.ui"
 
@@ -420,9 +137,6 @@ typedef struct {
     GtkTextBuffer *display_buffer;     /* Buffer used in display */
     GtkWidget *scrolledwindow;         /* Scrolled window for display_item. */
 
-    GtkWidget *buttons[NBUTTONS];
-    GtkWidget *clear_button;
-
     GtkWidget *bas_panel;      /* Panel containing basic mode widgets. */
     GtkWidget *adv_panel;      /* Panel containing advanced mode widgets. */
     GtkWidget *fin_panel;      /* Panel containing financial mode widgets. */
@@ -673,7 +387,9 @@ ui_set_bitfield(int enabled, guint64 bits)
     }
 }
 
-static void do_button(int function, int arg)
+
+static void
+do_button(int function, int arg)
 {
     GtkTextIter start, end;
     gint cursor_start, cursor_end;
@@ -692,6 +408,14 @@ static void do_button(int function, int arg)
     do_expression(function, arg, cursor_start, cursor_end);
 }
 
+
+static void
+do_text(const char *text)
+{
+    do_button(FN_TEXT, (int)text); // FIXME: Not 64 bit safe
+}
+            
+
 static void
 do_finc(char* dialog)
 {
@@ -893,14 +617,8 @@ ui_set_display(char *str, int cursor)
 void
 ui_set_error_state(gboolean error)
 {
-    int i;
-
     v->error = error;
 
-    /* Clr button always sensitive. */    
-    for (i = 0; i < NBUTTONS; i++)
-        gtk_widget_set_sensitive(X.buttons[i], !v->error || X.buttons[i] == X.clear_button);
-
     if (!v->error)
         ui_set_base(v->base);
 
@@ -1504,7 +1222,7 @@ button_cb(GtkWidget *widget, GdkEventButton *event)
 }
 
 
-static void
+/*static void
 select_display_entry(int offset)
 {
     GtkTextIter iter;
@@ -1512,16 +1230,15 @@ select_display_entry(int offset)
     gtk_text_buffer_get_iter_at_offset(X.display_buffer, &iter, offset);
     gtk_text_buffer_place_cursor(X.display_buffer, &iter);
     gtk_widget_grab_focus(X.display_item);
-}
+}*/
 
 
 G_MODULE_EXPORT
 gboolean
 main_window_key_press_cb(GtkWidget *widget, GdkEventKey *event)
 {
-    int i, j, state;
-    GtkWidget *button;
-    const char *allowed_input = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+-*/^|!%";
+    int state;
+    const char *c, *allowed_input = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+-*/^|!%¬~ \t\n=<>";
     
     /* Only look at the modifiers we use */
     state = event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK);
@@ -1534,55 +1251,53 @@ main_window_key_press_cb(GtkWidget *widget, GdkEventKey *event)
         event->keyval = GDK_KP_Decimal;
     }
     
-    /* Accuracy shortcuts */
+    /* Shortcuts */
     if (state == GDK_CONTROL_MASK || state == GDK_MOD1_MASK) {
         gboolean do_sub = state == GDK_MOD1_MASK;
         switch (event->keyval) {
             case GDK_0:
-                do_button(do_sub ? FN_SUB_0 : FN_SUPER_0, 0);
+                do_text(do_sub ? "â??" : "â?°");
                 return TRUE;
             case GDK_1:
-                do_button(do_sub ? FN_SUB_1 : FN_SUPER_1, 0);
+                do_text(do_sub ? "â??" : "¹");
                 return TRUE;
             case GDK_2:
-                do_button(do_sub ? FN_SUB_2 : FN_SUPER_2, 0);
+                do_text(do_sub ? "â??" : "²");
                 return TRUE;
             case GDK_3:
-                do_button(do_sub ? FN_SUB_3 : FN_SUPER_3, 0);
+                do_text(do_sub ? "â??" : "³");
                 return TRUE;
             case GDK_4:
-                do_button(do_sub ? FN_SUB_4 : FN_SUPER_4, 0);
+                do_text(do_sub ? "â??" : "â?´");
                 return TRUE;
             case GDK_5:
-                do_button(do_sub ? FN_SUB_5 : FN_SUPER_5, 0);
+                do_text(do_sub ? "â??" : "â?µ");
                 return TRUE;
             case GDK_6:
-                do_button(do_sub ? FN_SUB_6 : FN_SUPER_6, 0);
+                do_text(do_sub ? "â??" : "â?¶");
                 return TRUE;
             case GDK_7:
-                do_button(do_sub ? FN_SUB_7 : FN_SUPER_7, 0);
+                do_text(do_sub ? "â??" : "â?·");
                 return TRUE;
             case GDK_8:
-                do_button(do_sub ? FN_SUB_8 : FN_SUPER_8, 0);
+                do_text(do_sub ? "â??" : "â?¸");
                 return TRUE;
             case GDK_9:
-                do_button(do_sub ? FN_SUB_9 : FN_SUPER_9, 0);
+                do_text(do_sub ? "â??" : "â?¹");
                 return TRUE;
             case GDK_minus:
             case GDK_KP_Subtract:
-                do_button(do_sub ? FN_SUB_MINUS : FN_SUPER_MINUS, 0);
+                do_text(do_sub ? "â??" : "â?»");
+                return TRUE;
+            case GDK_e:
+                do_text("Ã?10^");
+                return TRUE;
+            case GDK_r:
+                do_text("â??");
+                return TRUE;
+            case GDK_p:
+                do_text("Ï?");
                 return TRUE;
-        }
-    }
-    
-    /* Connect home and end keys to move into the display entry */
-    if (!gtk_widget_is_focus(X.display_item)) {
-        if (event->keyval == GDK_Home) { /* || event->keyval == GDK_Left) { */
-            select_display_entry(0);
-            return TRUE;
-        } else if (event->keyval == GDK_End) { /* || event->keyval == GDK_Right) { */
-            select_display_entry(-1);
-            return TRUE;
         }
     }
     
@@ -1595,26 +1310,47 @@ main_window_key_press_cb(GtkWidget *widget, GdkEventKey *event)
         do_button(FN_BACKSPACE, 0);
         return TRUE;
     }
-
-    for (i = 0; i < NBUTTONS; i++) {
-        button = X.buttons[i];
-
-        // FIXME: This is a bit hacky - needs to be rethought
-        for (j = 0; button_widgets[i].accelerator_keys[j] != 0; j++) {
-            if (button_widgets[i].accelerator_keys[j] == event->keyval &&
-                (button_widgets[i].accelerator_mods[j] & ~GDK_SHIFT_MASK) == state) {
-                
-                // If we use shift for this shortcut then check it was in the original mask
-                if ((button_widgets[i].accelerator_mods[j] & GDK_SHIFT_MASK) &&
-                    !(event->state & GDK_SHIFT_MASK))
-                    continue;
-
-                // Hack if this is a multi-function button
-                if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(button), "calc_function")) !=
-                    button_widgets[i].function)
-                    do_button(button_widgets[i].function, 0);
-                else
-                   button_cb(button, NULL);
+    
+    /* Clear display */
+    if ((event->keyval == GDK_Escape && state == 0) ||
+        (event->keyval == GDK_BackSpace && state == GDK_CONTROL_MASK) ||
+        (event->keyval == GDK_Delete && state == GDK_SHIFT_MASK))
+    {
+        do_button(FN_CLEAR, 0);
+        return TRUE;
+    }
+    
+    // FIXME: Give focus to entry if it loses focus but something typed?
+
+    for (c = allowed_input; *c; c++) {
+        // FIXME: event->string deprecated
+        if (strncmp(event->string, c, 1) == 0) {
+            switch(*c)
+            {
+            case '-':
+                do_text("â??");
+                return TRUE;
+            case '*':
+                do_text("Ã?");
+                return TRUE;
+            case '/':
+                do_text("÷");
+                return TRUE;
+            case '\t':
+                do_text(" ");
+                return TRUE;
+            case '<':
+                button_cb(GET_WIDGET("calc_shift_left_button"), NULL);
+                return TRUE;                
+            case '>':
+                button_cb(GET_WIDGET("calc_shift_right_button"), NULL);
+                return TRUE;
+            case '=':
+            case '\n':
+                do_button(FN_CALCULATE, 0);
+                return TRUE;
+            default:
+                do_text(event->string);
                 return TRUE;
             }
         }
@@ -1624,8 +1360,7 @@ main_window_key_press_cb(GtkWidget *widget, GdkEventKey *event)
 }
 
 
-G_MODULE_EXPORT
-void 
+G_MODULE_EXPORT void
 edit_cb(GtkWidget *widget)
 {
     gboolean can_paste, can_copy;
@@ -1837,7 +1572,6 @@ create_main_window()
     char name[MAXLINE];
     GtkWidget *widget;
     PangoFontDescription *font_desc;
-    GtkSizeGroup *size_group;
     GtkWidget *treeview;
    
     X.ui = gtk_builder_new();
@@ -1859,23 +1593,9 @@ create_main_window()
     X.adv_panel        = GET_WIDGET("advanced_panel");
     X.fin_panel        = GET_WIDGET("financial_panel");
     X.bit_panel        = GET_WIDGET("bit_panel");
-    X.clear_button     = GET_WIDGET("calc_clear_button");
     X.statusbar        = GET_WIDGET("statusbar");
     X.preferences_dialog = GET_WIDGET("preferences_dialog");
 
-    /* Load buttons and set them all to be the same size */
-    size_group = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
-    for (i = 0; i < NBUTTONS; i++) {
-        SNPRINTF(name, MAXLINE, "calc_%s_button", 
-                 button_widgets[i].widget_name);
-        X.buttons[i] = GET_WIDGET(name);            
-        assert(X.buttons[i] != NULL);
-        
-        gtk_size_group_add_widget(size_group, X.buttons[i]);
-        
-        g_object_set_data(G_OBJECT(X.buttons[i]), "calc_function", GINT_TO_POINTER(button_widgets[i].function));
-    }
-
     /* Make popup buttons */
     set_data(X.ui, "calc_shift_left_button", "calc_menu", GET_WIDGET("left_shift_popup"));
     set_data(X.ui, "calc_shift_right_button", "calc_menu", GET_WIDGET("right_shift_popup"));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]