[gcalctool/gcalctool-newui2] New UI



commit f00bfe35be8b82330f9c63ece1cb3bfb3cb9c164
Author: Robert Ancell <robert ancell gmail com>
Date:   Thu Jun 25 11:08:58 2009 +1000

    New UI

 data/gcalctool.ui        | 2823 ++++++++++++++++------------------------------
 src/calctool.c           |   12 +-
 src/calctool.h           |    7 +-
 src/display.c            |   30 +-
 src/functions.c          |  187 +---
 src/functions.h          |   52 +-
 src/get.c                |    5 +-
 src/gtk.c                |  785 ++-----------
 src/mp-equation-lexer.l  |    8 -
 src/mp-equation-parser.y |   10 +-
 src/mp-equation.c        |    2 +-
 src/mp.c                 |    9 +
 src/mp.h                 |    3 +
 src/register.c           |   71 +-
 src/register.h           |   10 +-
 src/ui.h                 |    5 +-
 src/unittest.c           |   19 +-
 17 files changed, 1272 insertions(+), 2766 deletions(-)
---
diff --git a/data/gcalctool.ui b/data/gcalctool.ui
index 31179e4..fd5804c 100644
--- a/data/gcalctool.ui
+++ b/data/gcalctool.ui
@@ -3,13 +3,12 @@
   <requires lib="gtk+" version="2.16"/>
   <!-- interface-naming-policy toplevel-contextual -->
   <object class="GtkWindow" id="calc_window">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="events">GDK_BUTTON_PRESS_MASK</property>
     <accel-groups>
       <group name="accelgroup1"/>
     </accel-groups>
     <signal name="key_press_event" handler="main_window_key_press_cb"/>
     <signal name="delete_event" handler="quit_cb"/>
-    <signal name="key_release_event" handler="main_window_key_release_cb"/>
     <child>
       <object class="GtkVBox" id="kvbox">
         <property name="visible">True</property>
@@ -239,7 +238,7 @@
                         <accelerator key="M" signal="activate" modifiers="GDK_CONTROL_MASK"/>
                         <signal name="select" handler="menu_item_select_cb"/>
                         <signal name="deselect" handler="menu_item_deselect_cb"/>
-                        <signal name="activate" handler="show_registers_cb"/>
+                        <signal name="activate" handler="edit_register_names_cb"/>
                       </object>
                     </child>
                   </object>
@@ -329,360 +328,14 @@
           </packing>
         </child>
         <child>
-          <object class="GtkHBox" id="programming_mode_panel">
-            <property name="visible">True</property>
-            <child>
-              <object class="GtkHBox" id="hbox7">
-                <property name="visible">True</property>
-                <child>
-                  <object class="GtkRadioButton" id="64bit_radio">
-                    <property name="label" translatable="yes" comments="64 bit radio button">_64 bit</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Makes the bitwise functions use 64 bit mode</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
-                    <signal name="toggled" handler="word_cb"/>
-                  </object>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkRadioButton" id="32bit_radio">
-                    <property name="label" translatable="yes" comments="32 bit radio button">_32 bit</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Makes the bitwise functions use 32 bit mode</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">64bit_radio</property>
-                    <signal name="toggled" handler="word_cb"/>
-                  </object>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkRadioButton" id="16bit_radio">
-                    <property name="label" translatable="yes" comments="16 bit radio button">_16 bit</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Makes the bitwise functions use 16 bit mode</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">64bit_radio</property>
-                    <signal name="toggled" handler="word_cb"/>
-                  </object>
-                  <packing>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkHBox" id="hbox6">
-                <property name="visible">True</property>
-                <child>
-                  <object class="GtkRadioButton" id="binary_radio">
-                    <property name="label" translatable="yes" comments="Base 2 radio button">_Bin</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Set numeric base to binary (base 2)</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
-                    <signal name="toggled" handler="base_cb"/>
-                  </object>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkRadioButton" id="octal_radio">
-                    <property name="label" translatable="yes" comments="Base 8 radio button">_Oct</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Set numeric base to octal (base 8)</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">binary_radio</property>
-                    <signal name="toggled" handler="base_cb"/>
-                  </object>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkRadioButton" id="decimal_radio">
-                    <property name="label" translatable="yes" comments="Base 10 radio button">_Dec</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Set numeric base to decimal (base 10)</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">binary_radio</property>
-                    <signal name="toggled" handler="base_cb"/>
-                  </object>
-                  <packing>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkRadioButton" id="hexadecimal_radio">
-                    <property name="label" translatable="yes" comments="Base 16 radio button">He_x</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Set numeric base to hexadecimal (base 16)</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">binary_radio</property>
-                    <signal name="toggled" handler="base_cb"/>
-                  </object>
-                  <packing>
-                    <property name="position">3</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="pack_type">end</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkVBox" id="scientific_mode_panel">
-            <property name="visible">True</property>
-            <property name="border_width">6</property>
-            <child>
-              <object class="GtkHBox" id="hbox4">
-                <property name="visible">True</property>
-                <child>
-                  <object class="GtkHBox" id="hbox5">
-                    <property name="visible">True</property>
-                    <child>
-                      <object class="GtkRadioButton" id="degrees_radio">
-                        <property name="label" translatable="yes" comments="Degrees radio button">De_grees</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Set trigonometric type to degrees</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
-                        <signal name="toggled" handler="trig_cb"/>
-                      </object>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkRadioButton" id="gradians_radio">
-                        <property name="label" translatable="yes" comments="Gradians radio button">Gr_adians</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Set trigonometric type to gradians</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">degrees_radio</property>
-                        <signal name="toggled" handler="trig_cb"/>
-                      </object>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkRadioButton" id="radians_radio">
-                        <property name="label" translatable="yes" comments="Radian radio button">_Radians</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Set trigonometric type to radians</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">degrees_radio</property>
-                        <signal name="toggled" handler="trig_cb"/>
-                      </object>
-                      <packing>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkHBox" id="hbox9">
-                    <property name="visible">True</property>
-                    <child>
-                      <object class="GtkRadioButton" id="engineering_radio">
-                        <property name="label" translatable="yes" comments="Engineering display radio button">E_ng</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Set display type to engineering format</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
-                        <signal name="toggled" handler="disp_cb"/>
-                      </object>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkRadioButton" id="fixed_point_radio">
-                        <property name="label" translatable="yes" comments="Fixed-point display radio button">_Fix</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Set display type to fixed-point format</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">engineering_radio</property>
-                        <signal name="toggled" handler="disp_cb"/>
-                      </object>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkRadioButton" id="scientific_radio">
-                        <property name="label" translatable="yes" comments="Scientific display radio button">_Sci</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Set display type to scientific format</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">engineering_radio</property>
-                        <signal name="toggled" handler="disp_cb"/>
-                      </object>
-                      <packing>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="pack_type">end</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkHBox" id="hbox1">
-                <property name="visible">True</property>
-                <child>
-                  <object class="GtkHBox" id="hbox8">
-                    <property name="visible">True</property>
-                    <child>
-                      <object class="GtkCheckButton" id="inverse_check">
-                        <property name="label" translatable="yes" comments="Inverse check box">_Inv</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Set inverse option for trigonometric functions</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
-                        <signal name="toggled" handler="inv_cb"/>
-                      </object>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkCheckButton" id="hyperbolic_check">
-                        <property name="label" translatable="yes" comments="Hyperbolic check box">H_yp</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Set hyperbolic option for trigonometric functions</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
-                        <signal name="toggled" handler="hyp_cb"/>
-                      </object>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">3</property>
-          </packing>
-        </child>
-        <child>
           <object class="GtkTable" id="financial_panel">
             <property name="visible">True</property>
             <property name="border_width">6</property>
-            <property name="n_rows">2</property>
-            <property name="n_columns">8</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_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">False</property>
-                <property name="tooltip_text" translatable="yes">Sum-of-the years'-digits depreciation [Y]</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="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_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>
@@ -873,12 +526,34 @@
               </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">False</property>
-                <property name="tooltip_text" translatable="yes">Payment period [t]</property>
+                <property name="receives_default">True</property>
                 <property name="use_underline">True</property>
                 <property name="focus_on_click">False</property>
                 <child internal-child="accessible">
@@ -890,38 +565,21 @@
                 <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="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>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
           </object>
           <packing>
-            <property name="position">4</property>
+            <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>
@@ -2716,377 +2374,362 @@
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="position">5</property>
+            <property name="position">4</property>
           </packing>
         </child>
         <child>
           <object class="GtkTable" id="scientific_panel">
             <property name="visible">True</property>
             <property name="border_width">6</property>
-            <property name="n_rows">2</property>
-            <property name="n_columns">8</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_functions_button">
+              <object class="GtkButton" id="calc_tangent_button">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">User-defined functions [F]</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"/>
                 <child>
-                  <object class="GtkHBox" id="hbox13">
+                  <object class="GtkLabel" id="tangent_label">
                     <property name="visible">True</property>
-                    <property name="spacing">3</property>
-                    <child>
-                      <object class="GtkLabel" id="label9">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes" comments="Functions button">Fun</property>
-                      </object>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkArrow" id="arrow7">
-                        <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>
+                    <property name="label" translatable="yes" comments="The tangent button">tan</property>
+                    <property name="use_markup">True</property>
                   </object>
                 </child>
               </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="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_constants_button">
+              <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">Constants [#]</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="GtkHBox" id="hbox12">
+                  <object class="GtkLabel" id="sine_label">
                     <property name="visible">True</property>
-                    <property name="spacing">3</property>
-                    <child>
-                      <object class="GtkLabel" id="label8">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes" comments="Constants button">Con</property>
-                      </object>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkArrow" id="arrow6">
-                        <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>
+                    <property name="label" translatable="yes" comments="The sine button">sin</property>
+                    <property name="use_markup">True</property>
                   </object>
                 </child>
               </object>
               <packing>
-                <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_natural_logarithm_button">
+              <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">(Ln)</property>
-                <property name="use_underline">True</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="natural_logarithm_label">
+                  <object class="GtkLabel" id="cosine_label">
                     <property name="visible">True</property>
-                    <property name="label" comments="Variable label button - text set inside gtk.c">(Ln)</property>
+                    <property name="label" translatable="yes" comments="The cosine button">cos</property>
                     <property name="use_markup">True</property>
                   </object>
                 </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_logarithm_button">
+              <object class="GtkButton" id="calc_hyperbolic_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">(log)</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>
-                <signal name="clicked" handler="button_cb"/>
                 <child>
-                  <object class="GtkLabel" id="logarithm_label">
+                  <object class="GtkLabel" id="hyperbolic_cosine_label">
                     <property name="visible">True</property>
-                    <property name="label" comments="Varable label button - text set inside gtk.c">(log)</property>
+                    <property name="label" translatable="yes" comments="The hyperbolic cosine button">cosh</property>
                     <property name="use_markup">True</property>
                   </object>
                 </child>
               </object>
               <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</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_logarithm2_button">
+              <object class="GtkButton" id="calc_hyperbolic_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">(log2)</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>
-                <signal name="clicked" handler="button_cb"/>
                 <child>
-                  <object class="GtkLabel" id="logarithm2_label">
+                  <object class="GtkLabel" id="hyperbolic_sine_label">
                     <property name="visible">True</property>
-                    <property name="label" comments="Variable function button - text set inside gtk.c">(log2)</property>
+                    <property name="label" translatable="yes" comments="The hyperbolic sine button">sinh</property>
                     <property name="use_markup">True</property>
                   </object>
                 </child>
               </object>
               <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</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_exponential_button">
-                <property name="label" translatable="yes" comments="Exponential">Exp</property>
+              <object class="GtkButton" id="calc_hyperbolic_tangent_button">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Enter an exponential number [E]</property>
-                <property name="use_underline">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>
-                <signal name="clicked" handler="button_cb"/>
+                <child>
+                  <object class="GtkLabel" id="hyperbolic_tangent_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes" comments="The hyperbolic tangent button">tanh</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
               </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="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_accuracy_button">
+              <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">False</property>
-                <property name="tooltip_text" translatable="yes">(Set accuracy from 0 to N numeric places [A])</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="hbox14">
+                  <object class="GtkLabel" id="tangent_label1">
                     <property name="visible">True</property>
-                    <property name="spacing">3</property>
-                    <child>
-                      <object class="GtkLabel" id="label10">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes" comments="Accuracy button">Acc</property>
-                      </object>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkArrow" id="arrow8">
-                        <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>
+                    <property name="label" translatable="yes" comments="The tangent button">k</property>
+                    <property name="use_markup">True</property>
                   </object>
                 </child>
               </object>
               <packing>
-                <property name="left_attach">7</property>
-                <property name="right_attach">8</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_random_button">
-                <property name="label" translatable="yes" comments="Random number">Rand</property>
+              <object class="GtkButton" id="calc_sine_button1">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Random number in the range 0.0 to 1.0 [?]</property>
-                <property name="use_underline">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="sine_label1">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes" comments="The sine button">m</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
               </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="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_factorial_button">
+              <object class="GtkButton" id="calc_cosine_button1">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Factorial of displayed value [!]</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="label14">
+                  <object class="GtkLabel" id="cosine_label1">
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes" comments="Factorial">&lt;i&gt;x&lt;/i&gt;!</property>
+                    <property name="label" translatable="yes" comments="The cosine button">&#xB5;</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="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_x_pow_y_button">
+              <object class="GtkButton" id="calc_hyperbolic_cosine_button1">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">(X^Y)</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="x_pow_y_label">
+                  <object class="GtkLabel" id="hyperbolic_cosine_label1">
                     <property name="visible">True</property>
-                    <property name="label" comments="Variable function button - text set inside gtk.c">(X^Y)</property>
+                    <property name="label" translatable="yes" comments="The hyperbolic cosine button">M</property>
                     <property name="use_markup">True</property>
                   </object>
                 </child>
               </object>
               <packing>
-                <property name="left_attach">3</property>
-                <property name="right_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_tangent_button">
+              <object class="GtkButton" id="calc_hyperbolic_sine_button1">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">(tan)</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="tangent_label">
+                  <object class="GtkLabel" id="hyperbolic_sine_label1">
                     <property name="visible">True</property>
-                    <property name="label" comments="Variable function button - text set inside gtk.c">(tan)</property>
+                    <property name="label" translatable="yes" comments="The hyperbolic sine button">G</property>
                     <property name="use_markup">True</property>
                   </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="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_sine_button">
+              <object class="GtkButton" id="calc_hyperbolic_tangent_button1">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">(sin)</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="sine_label">
+                  <object class="GtkLabel" id="hyperbolic_tangent_label1">
                     <property name="visible">True</property>
-                    <property name="label" comments="Variable function button - text set inside gtk.c">(sin)</property>
+                    <property name="label" translatable="yes" comments="The hyperbolic tangent button">P</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="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_button">
+              <object class="GtkButton" id="calc_cosine_button2">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">(cos)</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="cosine_label">
+                  <object class="GtkLabel" id="cosine_label2">
                     <property name="visible">True</property>
-                    <property name="label" comments="Variable function button - text set inside gtk.c">(cos)</property>
+                    <property name="label" translatable="yes" comments="The cosine button">f</property>
                     <property name="use_markup">True</property>
                   </object>
                 </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>
-              <placeholder/>
+              <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">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes" comments="The cosine button">p</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </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>
-              <placeholder/>
+              <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">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes" comments="The cosine button">n</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </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/>
@@ -3100,8 +2743,8 @@
           <object class="GtkTable" id="programming_panel">
             <property name="visible">True</property>
             <property name="border_width">6</property>
-            <property name="n_rows">3</property>
-            <property name="n_columns">8</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>
@@ -3117,8 +2760,6 @@
                 <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>
@@ -3137,8 +2778,6 @@
               <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>
@@ -3157,8 +2796,6 @@
               <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>
@@ -3175,8 +2812,8 @@
                 <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
-                <property name="top_attach">2</property>
-                <property name="bottom_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>
@@ -3195,8 +2832,8 @@
               <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="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>
@@ -3215,136 +2852,110 @@
               <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>
-            <child>
-              <object class="GtkButton" id="calc_1s_button">
-                <property name="label" translatable="yes" comments="1's complement">1's</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">1's complement [z]</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_2s_button">
-                <property name="label" translatable="yes" comments="2's complement">2's</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">2's complement [Z]</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">1</property>
-                <property name="right_attach">2</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_xnor_button">
-                <property name="label" translatable="yes" comments="Boolean exclusive NOR button">XNOR</property>
+              <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">False</property>
-                <property name="tooltip_text" translatable="yes">Bitwise XNOR [{]</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">4</property>
-                <property name="right_attach">5</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</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_modulus_divide_button">
-                <property name="label" translatable="yes" comments="Modulus division button">Mod</property>
+              <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">False</property>
-                <property name="tooltip_text" translatable="yes">Modulus Division [M]</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="top_attach">1</property>
-                <property name="bottom_attach">2</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_trunc_button">
-                <property name="label" translatable="yes" comments="Truncate displayed value">Trunc</property>
+              <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">False</property>
-                <property name="tooltip_text" translatable="yes">Truncate displayed value to the chosen word size ([)</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">2</property>
-                <property name="right_attach">3</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_not_button">
-                <property name="label" translatable="yes" comments="Boolean NOT button">NOT</property>
+              <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">False</property>
-                <property name="tooltip_text" translatable="yes">Bitwise NOT [~]</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="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_xor_button">
-                <property name="label" translatable="yes" comments="Boolean exlcusive OR button">XOR</property>
+              <object class="GtkButton" id="calc_1s_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">False</property>
-                <property name="tooltip_text" translatable="yes">Bitwise XOR [x]</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="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>
@@ -3352,65 +2963,47 @@
               </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">False</property>
-                <property name="tooltip_text" translatable="yes">Bitwise AND [&amp;]</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_or_button">
-                <property name="label" translatable="yes" comments="Boolean OR button">OR</property>
+              <object class="GtkButton" id="calc_2s_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">False</property>
-                <property name="tooltip_text" translatable="yes">Bitwise OR [|]</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">4</property>
-                <property name="right_attach">5</property>
+                <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_left_button">
+              <object class="GtkButton" id="calc_shift_right_button">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Shift displayed value 1-15 places to the left [&lt;]</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="GtkHBox" id="hbox10">
                     <property name="visible">True</property>
                     <property name="spacing">3</property>
                     <child>
-                      <object class="GtkLabel" id="label7">
+                      <object class="GtkLabel" id="label6">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label" translatable="yes" comments="Shift left button">&lt;</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="arrow5">
+                      <object class="GtkArrow" id="arrow4">
                         <property name="visible">True</property>
                         <property name="arrow_type">down</property>
                       </object>
@@ -3423,38 +3016,37 @@
                 </child>
               </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">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_right_button">
+              <object class="GtkButton" id="calc_shift_left_button">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Shift displayed value 1-15 places to the right [&gt;]</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="GtkHBox" id="hbox11">
                     <property name="visible">True</property>
                     <property name="spacing">3</property>
                     <child>
-                      <object class="GtkLabel" id="label6">
+                      <object class="GtkLabel" id="label7">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="label" translatable="yes" comments="Shift right button">&gt;</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="arrow4">
+                      <object class="GtkArrow" id="arrow5">
                         <property name="visible">True</property>
                         <property name="arrow_type">down</property>
                       </object>
@@ -3467,34 +3059,116 @@
                 </child>
               </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">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>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
+              <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>
-              <placeholder/>
+              <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>
-              <placeholder/>
+              <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>
+                <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>
+              </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>
-              <placeholder/>
+              <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>
+                <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>
-              <placeholder/>
+              <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>
+                <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>
@@ -3505,191 +3179,215 @@
           <object class="GtkTable" id="table4">
             <property name="visible">True</property>
             <property name="border_width">6</property>
-            <property name="n_rows">5</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="basic_panel">
+              <object class="GtkTable" id="advanced_panel">
                 <property name="visible">True</property>
-                <property name="n_columns">4</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_backspace_simple_button">
-                    <property name="label" translatable="yes" comments="Backspace button. Bksp is short for Backspace">Bksp</property>
+                  <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">Remove rightmost character from displayed value [Backspace]</property>
-                    <property name="use_underline">True</property>
+                    <property name="tooltip_text" translatable="yes">Store displayed value in memory register [S]</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_backspace_simple_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Backspace</property>
+                      <object class="AtkObject" id="calc_store_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Store to register</property>
                       </object>
                     </child>
                     <signal name="clicked" handler="button_cb"/>
+                    <child>
+                      <object class="GtkHBox" id="hbox20">
+                        <property name="visible">True</property>
+                        <property name="spacing">3</property>
+                        <child>
+                          <object class="GtkLabel" id="label23">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes" comments="Memory store button. Sto is short for Store">&#x2190; R</property>
+                            <child internal-child="accessible">
+                              <object class="AtkObject" id="label23-atkobject">
+                                <property name="AtkObject::accessible-name" translatable="yes">Sto</property>
+                                <property name="AtkObject::accessible-description" translatable="yes">Store to register</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkArrow" id="arrow14">
+                            <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">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>
                 <child>
-                  <object class="GtkButton" id="calc_change_sign_simple_button">
-                    <property name="label" translatable="yes" comments="Change sign button">&#xB1;</property>
+                  <object class="GtkButton" id="calc_recall_button">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Change Sign [C]</property>
-                    <property name="use_underline">True</property>
+                    <property name="receives_default">True</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_change_sign_simple_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Change sign</property>
+                      <object class="AtkObject" id="calc_recall_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Retrieve from register</property>
                       </object>
                     </child>
                     <signal name="clicked" handler="button_cb"/>
+                    <child>
+                      <object class="GtkHBox" id="hbox19">
+                        <property name="visible">True</property>
+                        <property name="spacing">3</property>
+                        <child>
+                          <object class="GtkLabel" id="label22">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes" comments="Memory recall button. Rcl is short for Recall">&#x2192; R</property>
+                            <child internal-child="accessible">
+                              <object class="AtkObject" id="label22-atkobject">
+                                <property name="AtkObject::accessible-name" translatable="yes">Rcl</property>
+                                <property name="AtkObject::accessible-description" translatable="yes">Retrieve from register</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkArrow" id="arrow13">
+                            <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">3</property>
-                    <property name="right_attach">4</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_clear_simple_button">
-                    <property name="label" translatable="yes" comments="Clear button. Clr is short for Clear">Clr</property>
+                  <object class="GtkButton" id="calc_pi_button">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Clear displayed value and any partial calculation [Shift Delete]</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_clear_simple_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Clear</property>
+                    <signal name="clicked" handler="button_cb"/>
+                    <child>
+                      <object class="GtkLabel" id="pi_label">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes" comments="Variable label button - text set inside gtk.c">&#x3C0;</property>
+                        <property name="use_markup">True</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="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_clear_entry_simple_button">
-                    <property name="label" translatable="yes" comments="Clear displayed value button">CE</property>
+                  <object class="GtkButton" id="calc_modulus_divide_button">
+                    <property name="label" translatable="yes" comments="Modulus division button">mod</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Clear displayed value [Escape]</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_clear_entry_simple_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Clear entry</property>
-                        <property name="AtkObject::accessible-description" translatable="yes">Clear</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="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="advanced_panel">
-                <property name="visible">True</property>
-                <property name="n_rows">4</property>
-                <property name="n_columns">4</property>
-                <property name="column_spacing">6</property>
-                <property name="row_spacing">6</property>
-                <property name="homogeneous">True</property>
                 <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_root_button">
+                    <property name="label" translatable="yes" comments="Root button">&#x221A;</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Start group of calculations [(]</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_start_group_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Left bracket</property>
+                      <object class="AtkObject" id="calc_root_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Square root</property>
+                        <property name="AtkObject::accessible-description" translatable="yes">Square root [s]</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_reciprocal_button">
+                  <object class="GtkButton" id="calc_x_pow_y_button">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Reciprocal [r]</property>
+                    <property name="receives_default">True</property>
                     <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_reciprocal_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Reciprocal</property>
-                      </object>
-                    </child>
                     <signal name="clicked" handler="button_cb"/>
                     <child>
-                      <object class="GtkLabel" id="label20">
+                      <object class="GtkLabel" id="x_pow_y_label">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes" comments="Reciprocal button">1/&lt;i&gt;x&lt;/i&gt;</property>
+                        <property name="label" translatable="yes" comments="The x to the power of y button">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;&lt;i&gt;y&lt;/i&gt;&lt;/sup&gt;</property>
                         <property name="use_markup">True</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="label20-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes">1/x</property>
-                            <property name="AtkObject::accessible-description" translatable="yes">Reciprocal</property>
-                          </object>
-                        </child>
                       </object>
                     </child>
                   </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>
                 <child>
-                  <object class="GtkButton" id="calc_percentage_button">
-                    <property name="label" translatable="yes" comments="The percentage button">%</property>
+                  <object class="GtkButton" id="calc_logarithm_button">
+                    <property name="label" translatable="yes" comments="The 10-based logarithm button">log</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Percentage [%]</property>
-                    <property name="use_underline">True</property>
+                    <property name="receives_default">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>
@@ -3700,109 +3398,88 @@
                   </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_inverse_button">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">End group of calculations [)]</property>
-                    <property name="use_underline">True</property>
+                    <property name="receives_default">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_inverse_button-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Inverse</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_backspace_advanced_button">
-                    <property name="label" translatable="yes" comments="Bksp is short for Backspace">Bksp</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Remove rightmost character from displayed value [Backspace]</property>
-                    <property name="use_underline">True</property>
-                    <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_backspace_advanced_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Backspace</property>
+                    <child>
+                      <object class="GtkLabel" id="label20">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes" comments="Inverse button">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;&#x2212;1&lt;/sup&gt;</property>
+                        <property name="use_markup">True</property>
+                        <property name="justify">center</property>
+                        <child internal-child="accessible">
+                          <object class="AtkObject" id="label20-atkobject">
+                            <property name="AtkObject::accessible-name" translatable="yes">1/x</property>
+                            <property name="AtkObject::accessible-description" translatable="yes">Inverse</property>
+                          </object>
+                        </child>
                       </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>
                 <child>
-                  <object class="GtkButton" id="calc_change_sign_advanced_button">
-                    <property name="label" translatable="yes" comments="Change sign button">&#xB1;</property>
+                  <object class="GtkButton" id="calc_natural_logarithm_button">
+                    <property name="label" translatable="yes" comments="The natural logarithm button">ln</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Change Sign [C]</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_change_sign_advanced_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Change sign</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="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_sqrt_button">
-                    <property name="label" translatable="yes" comments="Square root button">&#x221A;</property>
+                  <object class="GtkButton" id="calc_eulers_number_button">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Square root [s]</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_sqrt_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Square root</property>
-                        <property name="AtkObject::accessible-description" translatable="yes">Square root [s]</property>
+                    <signal name="clicked" handler="button_cb"/>
+                    <child>
+                      <object class="GtkLabel" id="eulers_number_label">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes" comments="Variable label button - text set inside gtk.c">&lt;i&gt;e&lt;/i&gt;</property>
+                        <property name="use_markup">True</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="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_abs_button">
-                    <property name="label" translatable="yes" comments="Absolute value button. Abs is short for Absolute">Abs</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Absolute value [u]</property>
+                    <property name="receives_default">True</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
@@ -3811,50 +3488,60 @@
                       </object>
                     </child>
                     <signal name="clicked" handler="button_cb"/>
+                    <child>
+                      <object class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes" comments="x to the power of 2 button">|&lt;i&gt;x&lt;/i&gt;|</property>
+                        <property name="use_markup">True</property>
+                        <child internal-child="accessible">
+                          <object class="AtkObject" id="label1-atkobject">
+                            <property name="AtkObject::accessible-name" translatable="yes">x2</property>
+                            <property name="AtkObject::accessible-description" translatable="yes">Square</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
                   </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>
                 <child>
-                  <object class="GtkButton" id="calc_fractional_portion_button">
-                    <property name="label" translatable="yes" comments="Fractional portion button">Frac</property>
+                  <object class="GtkButton" id="calc_factorial_button">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Fractional portion of displayed value [:]</property>
-                    <property name="use_underline">True</property>
+                    <property name="receives_default">True</property>
                     <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_fractional_portion_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Fractional portion</property>
+                    <signal name="clicked" handler="button_cb"/>
+                    <child>
+                      <object class="GtkLabel" id="label14">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes" comments="Factorial">&lt;i&gt;x&lt;/i&gt;!</property>
+                        <property name="use_markup">True</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="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_integer_portion_button">
-                    <property name="label" translatable="yes" comments="Integer portion button">Int</property>
+                    <property name="label" translatable="yes" comments="Integer portion button">int</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Integer portion of displayed value [i]</property>
+                    <property name="receives_default">True</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
+                    <property name="yalign">0.43999999761581421</property>
                     <child internal-child="accessible">
                       <object class="AtkObject" id="calc_integer_portion_button-atkobject">
                         <property name="AtkObject::accessible-name" translatable="yes">Integer portion</property>
@@ -3865,83 +3552,53 @@
                   <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="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_clear_entry_advanced_button">
-                    <property name="label" translatable="yes" comments="Clear displayed value button">CE</property>
+                  <object class="GtkButton" id="calc_exponential_button">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Clear displayed value [Escape]</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_clear_entry_advanced_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Clear entry</property>
+                    <signal name="clicked" handler="button_cb"/>
+                    <child>
+                      <object class="GtkLabel" id="label2">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">&#xD7;10&lt;sup&gt;&lt;i&gt;y&lt;/i&gt;&lt;/sup&gt;</property>
+                        <property name="use_markup">True</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="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_exchange_button">
+                  <object class="GtkButton" id="calc_fractional_portion_button1">
+                    <property name="label" translatable="yes" comments="Integer portion button">frac</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Exchange displayed value with memory register [X]</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
+                    <property name="yalign">0.43999999761581421</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_exchange_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Exchange with register</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
-                    <child>
-                      <object class="GtkHBox" id="hbox18">
-                        <property name="visible">True</property>
-                        <property name="spacing">3</property>
-                        <child>
-                          <object class="GtkLabel" id="label21">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes" comments="Memory exchange button. Exch is short for Exchange">Exch</property>
-                            <child internal-child="accessible">
-                              <object class="AtkObject" id="label21-atkobject">
-                                <property name="AtkObject::accessible-name" translatable="yes">Exch</property>
-                                <property name="AtkObject::accessible-description" translatable="yes">Exchange with register</property>
-                              </object>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkArrow" id="arrow12">
-                            <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 class="AtkObject" id="calc_fractional_portion_button1-atkobject">
+                        <property name="AtkObject::accessible-name" translatable="yes">Integer portion</property>
                       </object>
                     </child>
                   </object>
                   <packing>
-                    <property name="left_attach">3</property>
-                    <property name="right_attach">4</property>
+                    <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>
@@ -3949,187 +3606,34 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_recall_button">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Retrieve memory register to display [R]</property>
-                    <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_recall_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Retrieve from register</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
-                    <child>
-                      <object class="GtkHBox" id="hbox19">
-                        <property name="visible">True</property>
-                        <property name="spacing">3</property>
-                        <child>
-                          <object class="GtkLabel" id="label22">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes" comments="Memory recall button. Rcl is short for Recall">Rcl</property>
-                            <child internal-child="accessible">
-                              <object class="AtkObject" id="label22-atkobject">
-                                <property name="AtkObject::accessible-name" translatable="yes">Rcl</property>
-                                <property name="AtkObject::accessible-description" translatable="yes">Retrieve from register</property>
-                              </object>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkArrow" id="arrow13">
-                            <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">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>
+                  <placeholder/>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_clear_advanced_button">
-                    <property name="label" translatable="yes" comments="Clear display button. Clr is short for Clear">Clr</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Clear displayed value and any partial calculation [Shift Delete]</property>
-                    <property name="use_underline">True</property>
-                    <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_clear_advanced_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Clear</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>
+                  <placeholder/>
                 </child>
                 <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="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_store_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Store to register</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
-                    <child>
-                      <object class="GtkHBox" id="hbox20">
-                        <property name="visible">True</property>
-                        <property name="spacing">3</property>
-                        <child>
-                          <object class="GtkLabel" id="label23">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes" comments="Memory store button. Sto is short for Store">Sto</property>
-                            <child internal-child="accessible">
-                              <object class="AtkObject" id="label23-atkobject">
-                                <property name="AtkObject::accessible-name" translatable="yes">Sto</property>
-                                <property name="AtkObject::accessible-description" translatable="yes">Store to register</property>
-                              </object>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkArrow" id="arrow14">
-                            <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">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>
+                  <placeholder/>
                 </child>
                 <child>
-                  <object class="GtkButton" id="calc_square_button">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Square [ ]</property>
-                    <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_square_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Square</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
-                    <child>
-                      <object class="GtkLabel" id="label24">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes" comments="x to the power of 2 button">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;2&lt;/sup&gt;</property>
-                        <property name="use_markup">True</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="label24-atkobject">
-                            <property name="AtkObject::accessible-name" translatable="yes">x2</property>
-                            <property name="AtkObject::accessible-description" translatable="yes">Square</property>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                  </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>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
                 </child>
               </object>
               <packing>
                 <property name="left_attach">1</property>
                 <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">5</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="GtkTable" id="core_panel">
+              <object class="GtkTable" id="basic_panel">
                 <property name="visible">True</property>
                 <property name="n_rows">4</property>
-                <property name="n_columns">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>
@@ -4364,7 +3868,7 @@
                     <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</property>
+                    <property name="tooltip_text" translatable="yes">Numeric point [. or ,]</property>
                     <property name="use_underline">True</property>
                     <property name="focus_on_click">False</property>
                     <child internal-child="accessible">
@@ -4509,17 +4013,109 @@
                     <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>
+                    <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="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>
+                    </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>
+                <child>
+                  <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="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_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>
+                <child>
+                  <object class="GtkButton" id="calc_end_group_button">
+                    <property name="label" translatable="yes" comments="Right bracket">)</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_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>
+                <child>
+                  <object class="GtkButton" id="calc_percentage_button">
+                    <property name="label" translatable="yes" comments="The percentage button">%</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="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="top_attach">1</property>
-                <property name="bottom_attach">5</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>
-              <placeholder/>
-            </child>
           </object>
           <packing>
             <property name="position">8</property>
@@ -4921,409 +4517,16 @@
       </object>
     </child>
   </object>
-  <object class="GtkDialog" id="register_dialog">
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Memory Registers</property>
-    <property name="resizable">False</property>
-    <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
-    <signal name="response" handler="register_dialog_response_cb"/>
-    <signal name="delete_event" handler="register_dialog_delete_cb"/>
-    <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="spacing">2</property>
-        <child>
-          <object class="GtkTable" id="table9">
-            <property name="visible">True</property>
-            <property name="border_width">5</property>
-            <property name="n_rows">10</property>
-            <property name="n_columns">2</property>
-            <property name="column_spacing">12</property>
-            <property name="row_spacing">6</property>
-            <child>
-              <object class="GtkLabel" id="label40">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes" comments="&quot;R0&quot; is the abbreviation for &quot;Register 0&quot;, used in the memory register dialog">&lt;span weight="bold"&gt;R0&lt;/span&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label41">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes" comments="&quot;R1&quot; is the abbreviation for &quot;Register 1&quot;, used in the memory register dialog">&lt;span weight="bold"&gt;R1&lt;/span&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label42">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes" comments="&quot;R2&quot; is the abbreviation for &quot;Register 2&quot;, used in the memory register dialog">&lt;span weight="bold"&gt;R2&lt;/span&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label43">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes" comments="&quot;R3&quot; is the abbreviation for &quot;Register 3&quot;, used in the memory register dialog">&lt;span weight="bold"&gt;R3&lt;/span&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="top_attach">3</property>
-                <property name="bottom_attach">4</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label44">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes" comments="&quot;R4&quot; is the abbreviation for &quot;Register 4&quot;, used in the memory register dialog">&lt;span weight="bold"&gt;R4&lt;/span&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="top_attach">4</property>
-                <property name="bottom_attach">5</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label45">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes" comments="&quot;R5&quot; is the abbreviation for &quot;Register 5&quot;, used in the memory register dialog">&lt;span weight="bold"&gt;R5&lt;/span&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="top_attach">5</property>
-                <property name="bottom_attach">6</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label46">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes" comments="&quot;R6&quot; is the abbreviation for &quot;Register 6&quot;, used in the memory register dialog">&lt;span weight="bold"&gt;R6&lt;/span&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="top_attach">6</property>
-                <property name="bottom_attach">7</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label47">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes" comments="&quot;R7&quot; is the abbreviation for &quot;Register 7&quot;, used in the memory register dialog">&lt;span weight="bold"&gt;R7&lt;/span&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="top_attach">7</property>
-                <property name="bottom_attach">8</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label48">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes" comments="&quot;R8&quot; is the abbreviation for &quot;Register 8&quot;, used in the memory register dialog">&lt;span weight="bold"&gt;R8&lt;/span&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="top_attach">8</property>
-                <property name="bottom_attach">9</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label49">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes" comments="&quot;R9&quot; is the abbreviation for &quot;Register 9&quot;, used in the memory register dialog">&lt;span weight="bold"&gt;R9&lt;/span&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="top_attach">9</property>
-                <property name="bottom_attach">10</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="register_entry_0">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="editable">False</property>
-                <property name="invisible_char">&#x25CF;</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="register_entry_0-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" comments="This is accessible name for memory register 0.  It is spoken by screen readers such as Orca, to help people who are blind or have low vision.">register 0</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="register_entry_1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="editable">False</property>
-                <property name="invisible_char">&#x25CF;</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="register_entry_1-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" comments="This is accessible name for memory register 1.  It is spoken by screen readers such as Orca, to help people who are blind or have low vision.">register 1</property>
-                  </object>
-                </child>
-              </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="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="register_entry_2">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="editable">False</property>
-                <property name="invisible_char">&#x25CF;</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="register_entry_2-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" comments="This is accessible name for memory register 2.  It is spoken by screen readers such as Orca, to help people who are blind or have low vision.">register 2</property>
-                  </object>
-                </child>
-              </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="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="register_entry_3">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="editable">False</property>
-                <property name="invisible_char">&#x25CF;</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="register_entry_3-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" comments="This is accessible name for memory register 3.  It is spoken by screen readers such as Orca, to help people who are blind or have low vision.">register 3</property>
-                  </object>
-                </child>
-              </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="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="register_entry_4">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="editable">False</property>
-                <property name="invisible_char">&#x25CF;</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="register_entry_4-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" comments="This is accessible name for memory register 4.  It is spoken by screen readers such as Orca, to help people who are blind or have low vision.">register 4</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">4</property>
-                <property name="bottom_attach">5</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="register_entry_5">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="editable">False</property>
-                <property name="invisible_char">&#x25CF;</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="register_entry_5-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" comments="This is accessible name for memory register 5.  It is spoken by screen readers such as Orca, to help people who are blind or have low vision.">register 5</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">5</property>
-                <property name="bottom_attach">6</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="register_entry_6">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="editable">False</property>
-                <property name="invisible_char">&#x25CF;</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="register_entry_6-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" comments="This is accessible name for memory register 6.  It is spoken by screen readers such as Orca, to help people who are blind or have low vision.">register 6</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">6</property>
-                <property name="bottom_attach">7</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="register_entry_7">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="editable">False</property>
-                <property name="invisible_char">&#x25CF;</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="register_entry_7-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" comments="This is accessible name for memory register 7.  It is spoken by screen readers such as Orca, to help people who are blind or have low vision.">register 7</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">7</property>
-                <property name="bottom_attach">8</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="register_entry_8">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="editable">False</property>
-                <property name="invisible_char">&#x25CF;</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="register_entry_8-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" comments="This is accessible name for memory register 8.  It is spoken by screen readers such as Orca, to help people who are blind or have low vision.">register 8</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">8</property>
-                <property name="bottom_attach">9</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="register_entry_9">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="editable">False</property>
-                <property name="invisible_char">&#x25CF;</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="register_entry_9-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" comments="This is accessible name for memory register 9.  It is spoken by screen readers such as Orca, to help people who are blind or have low vision.">register 9</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">9</property>
-                <property name="bottom_attach">10</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="closebutton1">
-                <property name="label">gtk-close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-    <action-widgets>
-      <action-widget response="-7">closebutton1</action-widget>
-    </action-widgets>
-  </object>
-  <object class="GtkDialog" id="edit_constants_dialog">
+  <object class="GtkDialog" id="edit_register_names_dialog">
     <property name="width_request">380</property>
     <property name="height_request">300</property>
     <property name="border_width">5</property>
-    <property name="title" translatable="yes" comments="Title of edit constants dialog">Edit Constants</property>
+    <property name="title" translatable="yes" comments="Title of edit register names dialog">Edit Register Names</property>
     <property name="destroy_with_parent">True</property>
     <property name="type_hint">dialog</property>
     <property name="has_separator">False</property>
-    <signal name="response" handler="edit_constants_response_cb"/>
-    <signal name="delete_event" handler="edit_constants_delete_cb"/>
+    <signal name="response" handler="edit_register_names_response_cb"/>
+    <signal name="delete_event" handler="edit_register_names_delete_cb"/>
     <child internal-child="vbox">
       <object class="GtkVBox" id="dialog-vbox2">
         <property name="visible">True</property>
@@ -5336,7 +4539,7 @@
               <object class="GtkLabel" id="label51">
                 <property name="visible">True</property>
                 <property name="xalign">0</property>
-                <property name="label" translatable="yes" comments="Edit Constants Dialog: Instructions in dialog">Click a _value or description to edit it:</property>
+                <property name="label" translatable="yes" comments="Edit Register Names Dialog: Instructions in dialog">Click a description to edit it:</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -5352,7 +4555,7 @@
                 <property name="hscrollbar_policy">automatic</property>
                 <property name="vscrollbar_policy">never</property>
                 <child>
-                  <object class="GtkTreeView" id="edit_constants_treeview">
+                  <object class="GtkTreeView" id="edit_register_names_treeview">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="rules_hint">True</property>
@@ -5363,19 +4566,6 @@
                 <property name="position">1</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkLabel" id="label50">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes" comments="Edit Constants Dialog: Note about what base numbers will be entered as">&lt;small&gt;&lt;i&gt;&lt;b&gt;Note:&lt;/b&gt; All constant values are specified in the decimal numeric base.&lt;/i&gt;&lt;/small&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
           </object>
           <packing>
             <property name="position">1</property>
@@ -5401,23 +4591,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="cancelbutton1">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkButton" id="okbutton1">
-                <property name="label">gtk-ok</property>
+                <property name="label">gtk-close</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
@@ -5428,7 +4603,7 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">2</property>
+                <property name="position">1</property>
               </packing>
             </child>
           </object>
@@ -5442,302 +4617,9 @@
     </child>
     <action-widgets>
       <action-widget response="-11">helpbutton1</action-widget>
-      <action-widget response="-6">cancelbutton1</action-widget>
       <action-widget response="-3">okbutton1</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkMenu" id="constants_popup">
-    <child>
-      <object class="GtkMenuItem" id="edit_constants1">
-        <property name="visible">True</property>
-        <property name="label" translatable="yes" comments="Menu item in the constants menu to show the Edit Constants dialog">Edit Constants...</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="edit_constants_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="constant_menu_item0">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="constant_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="constant_menu_item1">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="constant_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="constant_menu_item2">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="constant_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="constant_menu_item3">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="constant_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="constant_menu_item4">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="constant_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="constant_menu_item5">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="constant_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="constant_menu_item6">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="constant_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="constant_menu_item7">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="constant_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="constant_menu_item8">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="constant_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="constant_menu_item9">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="constant_menu_cb"/>
-      </object>
-    </child>
-  </object>
-  <object class="GtkMenu" id="functions_popup">
-    <child>
-      <object class="GtkMenuItem" id="menuitem6">
-        <property name="visible">True</property>
-        <property name="label" translatable="yes" comments="Menu item in the constants menu to show the Edit Functions dialog">Edit Functions...</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="edit_functions_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="function_menu_item0">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="function_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="function_menu_item1">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="function_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="function_menu_item2">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="function_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="function_menu_item3">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="function_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="function_menu_item4">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="function_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="function_menu_item5">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="function_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="function_menu_item6">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="function_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="function_menu_item7">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="function_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="function_menu_item8">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="function_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="function_menu_item9">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="function_menu_cb"/>
-      </object>
-    </child>
-  </object>
-  <object class="GtkDialog" id="edit_functions_dialog">
-    <property name="width_request">380</property>
-    <property name="height_request">300</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes" comments="Title of edit functions dialog">Edit Functions</property>
-    <property name="destroy_with_parent">True</property>
-    <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
-    <signal name="response" handler="edit_functions_response_cb"/>
-    <signal name="delete_event" handler="edit_functions_delete_cb"/>
-    <child internal-child="vbox">
-      <object class="GtkVBox" id="vbox4">
-        <property name="visible">True</property>
-        <child>
-          <object class="GtkVBox" id="vbox5">
-            <property name="visible">True</property>
-            <property name="border_width">5</property>
-            <property name="spacing">6</property>
-            <child>
-              <object class="GtkLabel" id="label53">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes" comments="Edit Functions Dialog: Instructions in dialog">Click a _value or description to edit it:</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkScrolledWindow" id="scrolledwindow2">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hscrollbar_policy">automatic</property>
-                <property name="vscrollbar_policy">never</property>
-                <child>
-                  <object class="GtkTreeView" id="edit_functions_treeview">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="rules_hint">True</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label54">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes" comments="Edit Function Dialog: Note about what base numbers will be entered as">&lt;small&gt;&lt;i&gt;&lt;b&gt;Note:&lt;/b&gt; All constant values are specified in the decimal numeric base.&lt;/i&gt;&lt;/small&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="hbuttonbox3">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="button5">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="button6">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="button7">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-    <action-widgets>
-      <action-widget response="-11">button5</action-widget>
-      <action-widget response="-6">button6</action-widget>
-      <action-widget response="-3">button7</action-widget>
-    </action-widgets>
-  </object>
   <object class="GtkMenu" id="memory_store_popup">
     <child>
       <object class="GtkMenuItem" id="store_menu_item0">
@@ -5809,76 +4691,12 @@
         <signal name="activate" handler="store_menu_cb"/>
       </object>
     </child>
-  </object>
-  <object class="GtkMenu" id="memory_exchange_popup">
-    <child>
-      <object class="GtkMenuItem" id="exchange_menu_item0">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="exchange_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="exchange_menu_item1">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="exchange_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="exchange_menu_item2">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="exchange_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="exchange_menu_item3">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="exchange_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="exchange_menu_item4">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="exchange_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="exchange_menu_item5">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="exchange_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="exchange_menu_item6">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="exchange_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="exchange_menu_item7">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="exchange_menu_cb"/>
-      </object>
-    </child>
     <child>
-      <object class="GtkMenuItem" id="exchange_menu_item8">
+      <object class="GtkMenuItem" id="edit_register_names_menu_item">
         <property name="visible">True</property>
+        <property name="label" translatable="yes" comments="Menu item in the register menu to show the Edit Register Names dialog">Edit Names...</property>
         <property name="use_underline">True</property>
-        <signal name="activate" handler="exchange_menu_cb"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkMenuItem" id="exchange_menu_item9">
-        <property name="visible">True</property>
-        <property name="use_underline">True</property>
-        <signal name="activate" handler="exchange_menu_cb"/>
+        <signal name="activate" handler="edit_register_names_cb"/>
       </object>
     </child>
   </object>
@@ -5953,6 +4771,14 @@
         <signal name="activate" handler="recall_menu_cb"/>
       </object>
     </child>
+    <child>
+      <object class="GtkMenuItem" id="edit_register_names_menu_item2">
+        <property name="visible">True</property>
+        <property name="label" translatable="yes" comments="Menu item in the register menu to show the Edit Register Names dialog">Edit Names...</property>
+        <property name="use_underline">True</property>
+        <signal name="activate" handler="edit_register_names_cb"/>
+      </object>
+    </child>
   </object>
   <object class="GtkDialog" id="ascii_dialog">
     <property name="border_width">6</property>
@@ -6160,4 +4986,319 @@
     <property name="stock">gtk-help</property>
     <property name="icon-size">1</property>
   </object>
+  <object class="GtkDialog" id="preferences_dialog">
+    <property name="visible">True</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Preferences</property>
+    <property name="type_hint">normal</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox4">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <object class="GtkButton" id="calc_accuracy_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="hbox14">
+                <property name="visible">True</property>
+                <property name="spacing">3</property>
+                <child>
+                  <object class="GtkLabel" id="label10">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes" comments="Accuracy button">Acc</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkArrow" id="arrow8">
+                    <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="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox5">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkRadioButton" id="degrees_radio">
+                <property name="label" translatable="yes" comments="Degrees radio button">De_grees</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="active">True</property>
+                <property name="draw_indicator">True</property>
+                <signal name="toggled" handler="trig_cb"/>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="gradians_radio">
+                <property name="label" translatable="yes" comments="Gradians radio button">Gr_adians</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">degrees_radio</property>
+                <signal name="toggled" handler="trig_cb"/>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="radians_radio">
+                <property name="label" translatable="yes" comments="Radian radio button">_Radians</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">degrees_radio</property>
+                <signal name="toggled" handler="trig_cb"/>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox7">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkRadioButton" id="64bit_radio">
+                <property name="label" translatable="yes" comments="64 bit radio button">_64 bit</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="active">True</property>
+                <property name="draw_indicator">True</property>
+                <signal name="toggled" handler="word_cb"/>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="32bit_radio">
+                <property name="label" translatable="yes" comments="32 bit radio button">_32 bit</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">64bit_radio</property>
+                <signal name="toggled" handler="word_cb"/>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="16bit_radio">
+                <property name="label" translatable="yes" comments="16 bit radio button">_16 bit</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">64bit_radio</property>
+                <signal name="toggled" handler="word_cb"/>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">6</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox6">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkRadioButton" id="binary_radio">
+                <property name="label" translatable="yes" comments="Base 2 radio button">_Bin</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="active">True</property>
+                <property name="draw_indicator">True</property>
+                <signal name="toggled" handler="base_cb"/>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="octal_radio">
+                <property name="label" translatable="yes" comments="Base 8 radio button">_Oct</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">binary_radio</property>
+                <signal name="toggled" handler="base_cb"/>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="decimal_radio">
+                <property name="label" translatable="yes" comments="Base 10 radio button">_Dec</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">binary_radio</property>
+                <signal name="toggled" handler="base_cb"/>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="hexadecimal_radio">
+                <property name="label" translatable="yes" comments="Base 16 radio button">He_x</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">binary_radio</property>
+                <signal name="toggled" handler="base_cb"/>
+              </object>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">5</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox9">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkRadioButton" id="engineering_radio">
+                <property name="label" translatable="yes" comments="Engineering display radio button">E_ng</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="active">True</property>
+                <property name="draw_indicator">True</property>
+                <signal name="toggled" handler="disp_cb"/>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="fixed_point_radio">
+                <property name="label" translatable="yes" comments="Fixed-point display radio button">_Fix</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">engineering_radio</property>
+                <signal name="toggled" handler="disp_cb"/>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="scientific_radio">
+                <property name="label" translatable="yes" comments="Scientific display radio button">_Sci</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">engineering_radio</property>
+                <signal name="toggled" handler="disp_cb"/>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area4">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="button1">
+                <property name="label" translatable="yes">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">button1</action-widget>
+    </action-widgets>
+  </object>
 </interface>
diff --git a/src/calctool.c b/src/calctool.c
index 1516758..bd6fa6f 100644
--- a/src/calctool.c
+++ b/src/calctool.c
@@ -39,8 +39,6 @@
 
 time_t time();
 
-int basevals[4] = { 2, 8, 10, 16 };
-
 /* Calctool variables and options. */
 static CalculatorVariables calc_state;
 CalculatorVariables *v;
@@ -84,7 +82,7 @@ solve(const char *equation)
     MPNumber result;
     char result_str[MAXLINE];
     
-    v->base = DEC;
+    v->base = 10;
     v->ttype = MP_DEGREES;
     v->wordlen = 32;
     v->accuracy = 9;
@@ -95,7 +93,7 @@ solve(const char *equation)
         exit(1);
     }
     else {
-        mp_cast_to_string(&result, basevals[v->base], 9, 1, result_str, MAXLINE);
+        mp_cast_to_string(&result, v->base, 9, 1, result_str, MAXLINE);
         printf("%s\n", result_str);
         exit(0);
     }
@@ -224,10 +222,10 @@ init_state(void)
        v->accuracy = DEFAULT_ACCURACY;
     }
 
-    if (get_enumerated_resource(R_BASE, Rbstr, &i))
-       v->base = (BaseType) i;
+    if (get_int_resource(R_BASE, &i))
+       v->base = i;
     else
-       v->base = DEC;
+       v->base = 10;
 
     if (get_enumerated_resource(R_TRIG, Rtstr, &i))
        v->ttype = (MPAngleUnit) i;
diff --git a/src/calctool.h b/src/calctool.h
index eb32fe0..4b4a615 100644
--- a/src/calctool.h
+++ b/src/calctool.h
@@ -32,9 +32,6 @@
 #define SNPRINTF     (void) snprintf
 #define STRNCPY      (void) strncpy
 
-/* Base definitions. */
-typedef enum { BIN, OCT, DEC, HEX, MAXBASES } BaseType;
-
 #define MAX_DIGITS     200         /* Maximum displayable number of digits. */
 #define MAX_LOCALIZED  (MAX_DIGITS * (1 + MB_LEN_MAX) + MB_LEN_MAX)
 
@@ -46,7 +43,6 @@ typedef enum { BIN, OCT, DEC, HEX, MAXBASES } BaseType;
 
 #define MAXACC         99         /* Max. number of digits after numeric point. */
 
-#define MAX_CONSTANTS 10
 #define MAX_FUNCTIONS 10
 #define MAX_REGISTERS 10         /* Maximum number of memory registers. */
 
@@ -71,7 +67,7 @@ typedef struct {
     const char *tsep;         /* Locale specific thousands separator. */
     int tsep_count;           /* Number of digits between separator. */
 
-    BaseType base;            /* Numeric base (BIN, OCT, DEC or HEX). */
+    int base;                 /* Numeric base (2, 8, 10 or 16). */
     MPAngleUnit ttype;        /* Angle unit type */
     int wordlen;              /* Length of word for bitwise operations */
     int accuracy;             /* Number of digits precision. */
@@ -82,7 +78,6 @@ typedef struct {
 } CalculatorVariables;
 
 extern CalculatorVariables *v; /* Calctool variables and options. */
-extern int basevals[];         /* Supported arithmetic bases. */
 
 void doerr(char *);
 
diff --git a/src/display.c b/src/display.c
index 2290cb6..cac3e04 100644
--- a/src/display.c
+++ b/src/display.c
@@ -129,7 +129,7 @@ localize_expression(char *dest, const char *src, int dest_length, int *cursor)
             g_string_append_unichar(output, g_utf8_get_char(c));
             
             /* Insert separator after nth digit */
-            if (v->display.show_tsep && v->base == DEC &&
+            if (v->display.show_tsep && v->base == 10 &&
                 !after_radix && digit_count > 1 && digit_count % v->tsep_count == 1) {
                 g_string_append(output, v->tsep);
                 if (new_cursor > read_cursor) {
@@ -281,8 +281,7 @@ display_make_text(GCDisplay *display, char *localized, int length, int *cursor)
     /* Replace registers with values. */
     for (i = 0; i < 10; i++) {
         SNPRINTF(reg, 3, "R%d", i);
-        register_get(i, &MP_reg);
-        display_make_number(display, temp, MAX_LOCALIZED, &MP_reg, v->base, FALSE);
+        display_make_number(display, temp, MAX_LOCALIZED, register_get_value(i), v->base, FALSE);
         str = str_replace(str, reg, temp);
     }
 
@@ -512,7 +511,6 @@ display_backspace(GCDisplay *display, int cursor_start, int cursor_end)
     char buf[MAX_DISPLAY] = "", buf2[MAX_DISPLAY];
     GCDisplayState *e = get_state(display);
     int i, cursor;
-    MPNumber MP_reg;
     
     /* Can't delete empty display */
     if (display_is_empty(display))
@@ -533,8 +531,7 @@ display_backspace(GCDisplay *display, int cursor_start, int cursor_end)
             for (i = 0; i < 10; i++) {
                 SNPRINTF(buf, MAX_DISPLAY, "R%d", i);
                 if (exp_has_postfix(e->expression, buf)) {
-                    register_get(i, &MP_reg);
-                    display_make_number(display, buf2, MAX_DISPLAY, &MP_reg, v->base, FALSE);
+                    display_make_number(display, buf2, MAX_DISPLAY, register_get_value(i), v->base, FALSE);
                     SNPRINTF(buf, MAX_DISPLAY, "%.*s%s", strlen(e->expression) - 2, e->expression - 2, buf2);
                     break;
                 }
@@ -710,7 +707,7 @@ make_eng_sci(GCDisplay *display, char *target, int target_len, const MPNumber *M
     }
     mp_set_from_mp(&MPval, &MPmant);
 
-    mp_set_from_integer(basevals[base], &MP1base);
+    mp_set_from_integer(base, &MP1base);
     mp_pwr_integer(&MP1base, 3, &MP3base);
 
     mp_pwr_integer(&MP1base, 10, &MP10base);
@@ -743,7 +740,7 @@ make_eng_sci(GCDisplay *display, char *target, int target_len, const MPNumber *M
         }
     }
  
-    mp_cast_to_string(&MPmant, basevals[base], v->accuracy, !v->display.show_zeroes, fixed, MAX_DIGITS);
+    mp_cast_to_string(&MPmant, base, v->accuracy, !v->display.show_zeroes, fixed, MAX_DIGITS);
     len = strlen(fixed);
     for (i = 0; i < len; i++) {
         *optr++ = fixed[i];
@@ -785,10 +782,23 @@ make_eng_sci(GCDisplay *display, char *target, int target_len, const MPNumber *M
 void
 display_make_number(GCDisplay *display, char *target, int target_len, const MPNumber *MPnumber, int base, int ignoreError)
 {
-    static double max_fix[MAXBASES] = {
+    static double max_fix[17] = {
+       0,
+       0,
        1.298074214e+33,    /* Binary. */
+       0,
+       0,
+       0,
+       0,
+       0,
        2.037035976e+90,    /* Octal. */
+       0,
        1.000000000e+100,   /* Decimal */
+       0,
+       0,
+       0,
+       0,
+       0,
        2.582249878e+120    /* Hexadecimal. */
     };
 
@@ -815,6 +825,6 @@ display_make_number(GCDisplay *display, char *target, int target_len, const MPNu
         (display->format == FIX && val != 0.0 && (val > max_fix[base]))) {
         make_eng_sci(display, target, target_len, MPnumber, base);
     } else {
-        mp_cast_to_string(MPnumber, basevals[base], v->accuracy, !v->display.show_zeroes, target, target_len);
+        mp_cast_to_string(MPnumber, base, v->accuracy, !v->display.show_zeroes, target, target_len);
     }
 }
diff --git a/src/functions.c b/src/functions.c
index bc3bd67..75d0b57 100644
--- a/src/functions.c
+++ b/src/functions.c
@@ -37,9 +37,8 @@
 #include "ui.h"
 
 typedef enum {
-    NUMBER       = (1 << 3),   /* Number button */
-    FUNC         = (1 << 6),   /* Function */
-    PREFIXOP     = (1 << 15),  /* Unary prefix operation */
+    NUMBER       = (1 << 0),   /* Number button */
+    FUNC         = (1 << 1),   /* Function */
 } ButtonFlags;
 
 typedef struct {
@@ -52,6 +51,7 @@ 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 },    
@@ -69,9 +69,32 @@ static Function functions[NFUNCTIONS] = {
 { FN_E,                 "E", NUMBER },
 { FN_F,                 "F", NUMBER },
 { FN_NUMERIC_POINT,     ".", NUMBER },
+{ FN_EULERS_NUMBER,     "e", 0},
+{ FN_PI,                "Ï?", 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_CALCULATE,         NULL, 0 },
 { FN_CLEAR,             NULL, 0 },
-{ FN_CLEAR_ENTRY,       NULL, 0 },
 { FN_START_BLOCK,       "(", 0 },
 { FN_END_BLOCK,         ")", 0 },
 { FN_ADD,               "+", 0 },
@@ -80,61 +103,37 @@ static Function functions[NFUNCTIONS] = {
 { FN_DIVIDE,            "÷", 0 },
 { FN_BACKSPACE,         NULL, 0 },
 { FN_DELETE,            NULL, 0 },
-{ FN_CHANGE_SIGN,       NULL, 0 },
-{ FN_INTEGER,           "Int", FUNC },
-{ FN_FRACTION,          "Frac", FUNC },
+{ FN_INTEGER,           "int", 0 },
+{ FN_FRACTION,          "frac", 0 },
 { FN_PERCENTAGE,        "%", 0 },
-{ FN_SQUARE,            "²", 0 },
-{ FN_SQUARE_ROOT,       "â??", 0 },
-{ FN_RECIPROCAL,        NULL, 0 },
-{ FN_E_POW_X,           "e^", PREFIXOP },
-{ FN_10_POW_X,          "10^", PREFIXOP },       
-{ FN_2_POW_X,           "2^", PREFIXOP },
+{ FN_ROOT,              "â??", 0 },
+{ FN_INVERSE,           "�¹", 0 },
 { FN_X_POW_Y,           "^", 0 },
-{ FN_X_POW_Y_INV,       "^(1/(", 0 },
 { FN_FACTORIAL,         "!", 0 },
-{ FN_RANDOM,            "Rand", 0 },
-{ FN_SIN,               " sin ", 0 },
-{ FN_SINH,              " sinh ", 0 },
-{ FN_ASIN,              " sin�¹ ", 0 },
-{ FN_ASINH,             " asinh ", 0 },
-{ FN_COS,               " cos ", 0 },
-{ FN_COSH,              " cosh ", 0 },
-{ FN_ACOS,              " cos�¹ ", 0 },
-{ FN_ACOSH,             " acosh ", 0 },
-{ FN_TAN,               " tan ", 0 },
-{ FN_TANH,              " tanh ", 0 },
-{ FN_ATAN,              " tan�¹ ", 0 },
-{ FN_TAN,               " atanh ", 0 },
-{ FN_NATURAL_LOGARITHM, " ln ", 0 },
-{ FN_LOGARITHM,         " log ", 0 },
-{ FN_LOGARITHM2,        " logâ?? ", 0 },
-{ FN_ABSOLUTE_VALUE,    "Abs", FUNC },
-{ FN_TRUNC,             "Trunc", FUNC },
-{ FN_MODULUS_DIVIDE,    " mod ", 0 },
-{ FN_1S_COMPLEMENT,     "ones", FUNC },
-{ FN_2S_COMPLEMENT,     "twos", FUNC },
-{ FN_EXPONENTIAL,       "e", 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_1S_COMPLEMENT,     "ones", 0 },
+{ FN_2S_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_OR,                "or", 0 },
+{ FN_AND,               "and", 0 },       
+{ FN_XOR,               "xor", 0 },
+{ FN_XNOR,              "xnor", 0 },
 { FN_TOGGLE_BIT,        NULL, 0 },
-{ FN_FINC_CTRM,         "Ctrm", 0 },
-{ FN_FINC_DDB,          "Ddb", 0 },
-{ FN_FINC_FV,           "Fv", 0 },
-{ FN_FINC_GPM,          "Gpm", 0 },
-{ FN_FINC_PMT,          "Pmt", 0 },
-{ FN_FINC_PV,           "Pv", 0 },
-{ FN_FINC_RATE,         "Rate", 0 },
-{ FN_FINC_SLN,          "Sln", 0 },
-{ FN_FINC_SYD ,         "Syd", 0 },
-{ FN_FINC_TERM,         "Term", 0 },
 { FN_SHIFT,             NULL, 0 },
 { FN_STORE,             NULL, 0 },
 { FN_RECALL,            NULL, 0 },
-{ FN_EXCHANGE,          NULL, 0 },
 { FN_SET_ACCURACY,      NULL, 0 },
 { FN_SET_BASE,          NULL, 0 },
 { FN_SET_NUMBERTYPE,    NULL, 0 },
@@ -142,8 +141,6 @@ static Function functions[NFUNCTIONS] = {
 { FN_SET_WORDLEN,       NULL, 0 },
 { FN_UNDO,              NULL, 0 },
 { FN_REDO,              NULL, 0 },
-{ FN_CONSTANT,          NULL, 0 },
-{ FN_FUNCTION,          NULL, 0 },
 { FN_PASTE,             NULL, 0 },
 { FN_INSERT_CHARACTER,  NULL, 0 }
 };
@@ -163,31 +160,10 @@ do_accuracy(int value)
     set_int_resource(R_ACCURACY, v->accuracy);
     display_set_accuracy(&v->display, value);
     ui_set_accuracy(v->accuracy);
-    ui_make_registers();
     clear_undo_history();
 }
 
 
-/* Perform a user defined function. */
-static void
-do_function(int index)
-{
-    int ret;
-
-    assert(index >= 0);
-    assert(index <= 9);
-
-    ret = mp_equation_udf_parse(function_get_value(index));
-    if (!ret) {
-        ui_set_statusbar("", "");
-    } else {
-        /* Translators: This message is displayed in the status bar when an
-           invalid user-defined function is executed */
-        ui_set_statusbar(_("Malformed function"), "gtk-dialog-error");
-    }
-}
-
-
 static void
 do_paste(int cursor_start, int cursor_end, const char *text)
 {
@@ -282,7 +258,7 @@ do_shift(int count)
 
 /* Change the current base setting. */
 static void
-do_base(BaseType b)
+do_base(int b)
 {
     int ret;
     MPNumber MP;
@@ -300,29 +276,9 @@ do_base(BaseType b)
         }
     }
     v->base = b;
-    set_enumerated_resource(R_BASE, Rbstr, (int) v->base);
-    display_set_base(&v->display, basevals[v->base]);
+    set_int_resource(R_BASE, v->base);
+    display_set_base(&v->display, v->base);
     ui_set_base(v->base);
-    ui_make_registers();
-}
-
-
-/* Exchange display with memory register. */
-static void
-do_exchange(int index)
-{
-    MPNumber MPtemp, MPexpr;
-
-    if (display_is_usable_number(&v->display, &MPexpr)) {
-        ui_set_statusbar(_("No sane value to store"),
-                         "gtk-dialog-error");
-    } else {
-        register_get(index, &MPtemp);
-        register_set(index, &MPexpr);
-        mp_set_from_mp(&MPtemp, display_get_answer(&v->display));
-        display_set_answer(&v->display);
-        ui_make_registers();
-    }
 }
 
 
@@ -356,7 +312,6 @@ do_numtype(DisplayFormat n)   /* Set number display type. */
     }
    
     display_set_format(&v->display, n);
-    ui_make_registers();
 }
 
 
@@ -369,9 +324,7 @@ do_sto(int index)
         ui_set_statusbar(_("No sane value to store"),
                          "gtk-dialog-error");
     else
-        register_set(index, &temp);
-
-    ui_make_registers();
+        register_set_value(index, &temp);
 }
 
 
@@ -412,7 +365,6 @@ do_expression(int function, int arg, int cursor_start, int cursor_end)
 
     switch (functions[function].id) {
         case FN_CLEAR:
-        case FN_CLEAR_ENTRY:
             display_clear(&v->display);
             ui_set_error_state(FALSE);
             mp_set_from_string("0", 10, ans);
@@ -443,10 +395,6 @@ do_expression(int function, int arg, int cursor_start, int cursor_end)
             do_wordlen(arg);
             return;
         
-        case FN_FUNCTION:
-            do_function(arg);
-            return;
-        
         case FN_PASTE:
             do_paste(cursor_start, cursor_end, (const char *)arg); // FIXME: Probably not 64 bit safe
             return;
@@ -459,19 +407,11 @@ do_expression(int function, int arg, int cursor_start, int cursor_end)
             do_sto(arg);
             return;
 
-        case FN_EXCHANGE:
-            do_exchange(arg);
-            return;
-
         case FN_RECALL:
             SNPRINTF(buf, MAXLINE, "R%d", arg);
             display_insert(&v->display, cursor_start, cursor_end, buf);
             break;
 
-        case FN_CONSTANT:
-            display_insert_number(&v->display, cursor_start, cursor_end, constant_get_value(arg));
-            break;
-
         case FN_BACKSPACE:
             display_backspace(&v->display, cursor_start, cursor_end);
             break;
@@ -480,14 +420,6 @@ do_expression(int function, int arg, int cursor_start, int cursor_end)
             display_delete(&v->display, cursor_start, cursor_end);
             break;
 
-        case FN_CHANGE_SIGN:
-            display_surround(&v->display, "-(", ")");
-            break;
-
-        case FN_RECIPROCAL:
-            display_surround(&v->display, "1/(", ")");
-            break;
-
         case FN_TOGGLE_BIT:
             if (display_get_unsigned_integer(&v->display, &bit_value)) {
                 char buf[MAX_DISPLAY];
@@ -576,16 +508,11 @@ do_expression(int function, int arg, int cursor_start, int cursor_end)
 
         default:
             /* If display is a number then perform functions on that number */
-            if (functions[function].flags & (PREFIXOP | FUNC) && display_is_result(&v->display)) {
+            if (functions[function].flags & FUNC) {
                 SNPRINTF(buf, MAXLINE, "%s(", functions[function].symname);
-                display_surround(&v->display, buf, ")");
+                display_insert(&v->display, cursor_start, cursor_end, buf);
             } else {
-                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);
-                }
+                display_insert(&v->display, cursor_start, cursor_end, functions[function].symname);
             }
             break;
     }
diff --git a/src/functions.h b/src/functions.h
index 4713531..eecd69c 100644
--- a/src/functions.h
+++ b/src/functions.h
@@ -26,58 +26,58 @@
 /* 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_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_CALCULATE,
-    FN_CLEAR, FN_CLEAR_ENTRY,
+    FN_CLEAR,
     FN_START_BLOCK, FN_END_BLOCK,
     FN_ADD, FN_SUBTRACT,
     FN_MULTIPLY, FN_DIVIDE,
     FN_BACKSPACE,
     FN_DELETE,        
-    FN_CHANGE_SIGN,
     FN_INTEGER,
     FN_FRACTION,
     FN_PERCENTAGE,
-    FN_SQUARE,
-    FN_SQUARE_ROOT,
-    FN_RECIPROCAL,
-    FN_E_POW_X,
-    FN_10_POW_X,
-    FN_2_POW_X,
+    FN_ROOT,
+    FN_INVERSE,
     FN_X_POW_Y,
-    FN_X_POW_Y_INV,
     FN_FACTORIAL,
     FN_RANDOM,
-    FN_SIN, FN_SINH, FN_ASIN, FN_ASINH,
-    FN_COS, FN_COSH, FN_ACOS, FN_ACOSH,
-    FN_TAN, FN_TANH, FN_ATAN, FN_ATANH,
+    FN_SIN,
+    FN_SINH,
+    FN_COS,
+    FN_COSH,
+    FN_TAN,
+    FN_TANH,
     FN_NATURAL_LOGARITHM,
     FN_LOGARITHM,
-    FN_LOGARITHM2,
     FN_ABSOLUTE_VALUE,
     FN_TRUNC,
     FN_MODULUS_DIVIDE,
     FN_1S_COMPLEMENT,
     FN_2S_COMPLEMENT,
     FN_EXPONENTIAL,
-    FN_NOT, FN_OR, FN_AND, FN_XOR, FN_XNOR,
+    FN_NOT,
+    FN_OR,
+    FN_AND,
+    FN_XOR,
+    FN_XNOR,
     FN_TOGGLE_BIT,
-    FN_FINC_CTRM,
-    FN_FINC_DDB,
-    FN_FINC_FV,
-    FN_FINC_GPM,
-    FN_FINC_PMT,
-    FN_FINC_PV,
-    FN_FINC_RATE,
-    FN_FINC_SLN,
-    FN_FINC_SYD,
-    FN_FINC_TERM,
     FN_SHIFT,
-    FN_STORE, FN_RECALL, FN_EXCHANGE,
+    FN_STORE,
+    FN_RECALL,
     FN_SET_ACCURACY,
     FN_SET_BASE,
     FN_SET_NUMBERTYPE,
@@ -85,8 +85,6 @@ enum
     FN_SET_WORDLEN,
     FN_UNDO,
     FN_REDO,
-    FN_CONSTANT,
-    FN_FUNCTION,
     FN_PASTE,
     FN_INSERT_CHARACTER,
     NFUNCTIONS
diff --git a/src/get.c b/src/get.c
index 5842703..d733bc1 100644
--- a/src/get.c
+++ b/src/get.c
@@ -40,7 +40,6 @@
 
 /* Various string values read/written as X resources. */
 
-const char *Rbstr[] = { "BIN", "OCT", "DEC", "HEX", NULL };
 const char *Rtstr[] = { "DEG", "GRAD", "RAD", NULL };
 
 static GConfClient *client = NULL;
@@ -59,7 +58,9 @@ void
 set_resource(const char *key, const char *value)
 {
     char key_name[MAXLINE];
-    SNPRINTF(key_name, MAXLINE, "/apps/gcalctool/%s", key);    
+    SNPRINTF(key_name, MAXLINE, "/apps/gcalctool/%s", key);
+    if (value == NULL)
+        printf("%s\n", key_name);
     gconf_client_set_string(client, key_name, value, NULL);
 }
 
diff --git a/src/gtk.c b/src/gtk.c
index 9101176..a2afc35 100644
--- a/src/gtk.c
+++ b/src/gtk.c
@@ -174,14 +174,18 @@ static struct button_widget button_widgets[] = {
     {FN_F,                  "f",
     { 0,     0 },
     { GDK_f, 0 }},
-
-    {FN_CLEAR,              "clear_simple",
-    { GDK_SHIFT_MASK, 0 },
-    { GDK_Delete,     0 }},
     
-    {FN_CLEAR,              "clear_advanced",
-    { GDK_SHIFT_MASK, 0 },
-    { GDK_Delete,     0 }},
+    {FN_PI,                 "pi",
+    { 0,     0 },
+    { 0,     0 }},
+
+    {FN_EULERS_NUMBER,      "eulers_number",
+    { 0,     0 },
+    { 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 },
@@ -195,14 +199,6 @@ static struct button_widget button_widgets[] = {
     { 0,     0 },
     { GDK_A, 0 }},
 
-    {FN_CONSTANT,           "constants",
-    { 0,              0 },
-    { GDK_numbersign, 0 }},
-
-    {FN_FUNCTION,           "functions",
-    { 0,     0 },
-    { GDK_F, 0 }},
-
     {FN_STORE,              "store",
     { 0,     0 },
     { GDK_S, 0 }},
@@ -211,26 +207,6 @@ static struct button_widget button_widgets[] = {
     { 0,     0 },
     { GDK_R, 0 }},
 
-    {FN_EXCHANGE,           "exchange",
-    { 0,     0 },
-    { GDK_X, 0 }},
-
-    {FN_CLEAR_ENTRY,        "clear_entry_simple",
-    { GDK_CONTROL_MASK, 0,          0 },
-    { GDK_BackSpace,    GDK_Escape, 0 }},
-
-    {FN_CLEAR_ENTRY,        "clear_entry_advanced",
-    { GDK_CONTROL_MASK, 0,          0 },
-    { GDK_BackSpace,    GDK_Escape, 0 }},
-
-    {FN_BACKSPACE,          "backspace_simple",
-    { 0,             0 },
-    { GDK_BackSpace, 0 }},
-
-    {FN_BACKSPACE,          "backspace_advanced",
-    { 0,             0 },
-    { GDK_BackSpace, 0 }},
-    
     {FN_NUMERIC_POINT,      "numeric_point",
     { 0,          0,              0,             0,                0 },
     { GDK_period, GDK_KP_Decimal, GDK_KP_Delete, GDK_KP_Separator, 0 }},
@@ -263,35 +239,19 @@ static struct button_widget button_widgets[] = {
     { 0,         0,            0,             0,      0 },
     { GDK_slash, GDK_division, GDK_KP_Divide, GDK_R5, 0 }},
 
-    {FN_CHANGE_SIGN,        "change_sign_simple",
-    { 0,     0 },
-    { GDK_C, 0 }},
-
-    {FN_CHANGE_SIGN,        "change_sign_advanced",
-    { 0,     0 },
-    { GDK_C, 0 }},
-
     {FN_INTEGER,            "integer_portion",
     { 0,     0 },
     { GDK_i, 0 }},
 
-    {FN_FRACTION,           "fractional_portion",
-    { 0,         0 },
-    { GDK_colon, 0 }},
-
     {FN_PERCENTAGE,         "percentage",
     { 0,           0 },
     { GDK_percent, 0 }},
 
-    {FN_SQUARE,             "square",
-    { 0,      0 },
-    { GDK_at, 0 }},
-
-    {FN_SQUARE_ROOT,        "sqrt",
+    {FN_ROOT,               "root",
     { 0,     0 },
     { GDK_s, 0 }},
 
-    {FN_RECIPROCAL,         "reciprocal",
+    {FN_INVERSE,            "inverse",
     { 0,     0 },
     { GDK_r, 0 }},
 
@@ -344,30 +304,30 @@ static struct button_widget button_widgets[] = {
     { GDK_x, 0 }},
 
     {FN_XNOR,               "xnor",
-    { 0,     0 },
+    { 0,             0 },
     { GDK_braceleft, 0 }},
 
     {FN_SIN,                "sine",
     { 0,     0 },
     { GDK_k, 0 }},
 
-    {FN_ASIN,                "sine",
+    {FN_SINH,               "hyperbolic_sine",
     { 0,     0 },
     { GDK_K, 0 }},
 
-    {FN_COS,                 "cosine",
+    {FN_COS,                "cosine",
     { 0,     0 },
     { GDK_j, 0 }},
 
-    {FN_ACOS,                "cosine",
+    {FN_COSH,               "hyperbolic_cosine",
     { 0,     0 },
     { GDK_J, 0 }},
 
-    {FN_TAN,                 "tangent",
+    {FN_TAN,                "tangent",
     { 0,     0 },
     { GDK_w, 0 }},
 
-    {FN_ATAN,                "tangent",
+    {FN_TANH,               "hyperbolic_tangent",
     { 0,     0 },
     { GDK_W, 0 }},
 
@@ -375,71 +335,51 @@ static struct button_widget button_widgets[] = {
     { 0,     0 },
     { GDK_n, 0 }},
 
-    {FN_E_POW_X,            "natural_logarithm",
-    { 0,             0 },
-    { GDK_N, 0 }},
-
     {FN_LOGARITHM,          "logarithm",
     { 0,     0 },
     { GDK_g, 0 }},
 
-    {FN_10_POW_X,           "logarithm",
-    { 0,              0 },
-    { GDK_G, 0 }},
-
-    {FN_LOGARITHM2,         "logarithm2",
-    { 0,     0 },
-    { GDK_h, 0 }},
-
-    {FN_2_POW_X,            "logarithm2",
-    { 0,     0 },
-    { GDK_H, 0 }},
-
     {FN_X_POW_Y,            "x_pow_y",
     { 0,     0,         0,               0 },
     { GDK_o, GDK_caret, GDK_asciicircum, 0 }},
 
-    {FN_X_POW_Y_INV,        "x_pow_y",
-    { 0,     0 },
-    { GDK_O, 0 }},
-    
-    {FN_FINC_CTRM,          "finc_compounding_term",
+    { 0,                    "finc_compounding_term",
     { 0,     0 },
     { GDK_m, 0 }},
 
-    {FN_FINC_DDB,           "finc_double_declining_depreciation",
+    { 0,                    "finc_double_declining_depreciation",
     { 0,     0 },
     { GDK_D, 0 }},
 
-    {FN_FINC_FV,            "finc_future_value",
+    { 0,                    "finc_future_value",
     { 0,     0 },
     { GDK_v, 0 }},
 
-    {FN_FINC_GPM,           "finc_gross_profit_margin",
+    { 0,                    "finc_gross_profit_margin",
     { 0,     0 },
     { GDK_I, 0 }},
 
-    {FN_FINC_PMT,           "finc_periodic_payment",
+    { 0,                    "finc_periodic_payment",
     { 0,     0 },
     { GDK_P, 0 }},
 
-    {FN_FINC_PV,            "finc_present_value",
+    { 0,                    "finc_present_value",
     { 0,     0 },
     { GDK_p, 0 }},
 
-    {FN_FINC_RATE,          "finc_periodic_interest_rate",
+    { 0,                    "finc_periodic_interest_rate",
     { 0,     0 },
     { GDK_T, 0 }},
 
-    {FN_FINC_SLN,           "finc_straight_line_depreciation",
+    { 0,                    "finc_straight_line_depreciation",
     { 0,     0 },
     { GDK_l, 0 }},
 
-    {FN_FINC_SYD,           "finc_sum_of_the_years_digits_depreciation",
+    { 0,                    "finc_sum_of_the_years_digits_depreciation",
     { 0,     0 },
     { GDK_Y, 0 }},
 
-    {FN_FINC_TERM,          "finc_term",
+    { 0,                    "finc_term",
     { 0,     0 },
     { GDK_t, 0 }}
 };
@@ -465,12 +405,9 @@ typedef struct {
     
     GtkWidget *main_window;
  
-    GtkTreeModel *constants_model;
-    GtkWidget    *constants_dialog;
+    GtkTreeModel *register_model;
+    GtkWidget    *register_dialog;
     
-    GtkTreeModel *functions_model;
-    GtkWidget    *function_dialog;
-
     GtkWidget *menubar; // FIXME: Why is this needed?
 
     GtkWidget *bit_panel;
@@ -486,41 +423,30 @@ typedef struct {
     GtkTextBuffer *display_buffer;     /* Buffer used in display */
     GtkWidget *scrolledwindow;         /* Scrolled window for display_item. */
 
-    GtkWidget *register_dialog;
-    GtkWidget *register_entries[MAX_REGISTERS];
-
     GtkWidget *precision_dialog;
     GtkWidget *precision_spin;
 
     GtkWidget *buttons[NBUTTONS];
-    GtkWidget *digit_buttons[16];
-    GtkWidget *clear_buttons[2];
+    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. */
     GtkWidget *sci_panel;      /* Panel containing scientific mode widgets. */
     GtkWidget *prog_panel;     /* Panel containing programming mode widgets. */
-    GtkWidget *sci_mode_panel; /* Panel containing scientific mode widgets. */
-    GtkWidget *prog_mode_panel;/* Panel containing programming mode widgets. */
     
     /* Labels for popup menus */
-    GtkWidget *constant_menu_labels[MAX_CONSTANTS];
-    GtkWidget *function_menu_labels[MAX_FUNCTIONS];
     GtkWidget *memory_store_labels[MAX_REGISTERS];
     GtkWidget *memory_recall_labels[MAX_REGISTERS];
-    GtkWidget *memory_exchange_labels[MAX_REGISTERS];
     
     /* Scientific mode widgets */
-    GtkWidget *hyperbolic_toggle;      /* Hyperbolic mode. */
-    GtkWidget *inverse_toggle;         /* Inverse mode. */
     GtkWidget *display_mode_radios[MAXDISPMODES]; /* Numeric display mode. */
     GtkWidget *radian_radio;           /* Radian radio button. */
     GtkWidget *degree_radio;           /* Degree radio button. */
     GtkWidget *gradian_radio;          /* Gradian radio button. */
 
     /* Programming mode widgets */
-    GtkWidget *base_radios[MAXBASES];
+    GtkWidget *base_radios[4];
     GtkWidget *word_length_radios[3];             /* Wordlength radio buttons. */
 
     GdkAtom clipboard_atom;
@@ -662,170 +588,6 @@ ui_set_accuracy(int accuracy)
     
     /* Hide the manual dialog */
     gtk_widget_hide(X.precision_dialog);
-   
-    /* Rebuild registers with new format */
-    ui_make_registers();
-}
-
-
-static void
-ui_update_modifier_mode()
-{
-    static char *sine_labels[]      = {
-        /* Translators: The sine button */
-        N_("sin"),
-        /* Translators: The inverse sine button */        
-        N_("sin<sup>â??1</sup>"),
-        /* Translators: The hyperbolic sine button */
-        N_("sinh"),
-        /* Translators: The inverse hyperbolic sine button */
-        N_("sinh<sup>â??1</sup>")};
-    static char *sine_tooltips[]    = {
-        /* Translators: The sine tooltip */
-        N_("Sine [k]"),
-        /* Translators: The inverse sine tooltip */
-        N_("Inverse Sine [K]"),
-        /* Translators: The hyperbolic sine tooltip */
-        N_("Hyperbolic Sine [k]"),
-        /* Translators: The hyperbolic inverse sine tooltip */
-        N_("Hyperbolic Inverse Sine [K]")};
-    static int  sine_functions[]    = {FN_SIN, FN_ASIN, FN_SINH, FN_ASINH};
-    static char *cosine_labels[]    = {
-        /* Translators: The cosine button */
-        N_("cos"),
-        /* Translators: The inverse cosine button */        
-        N_("cos<sup>â??1</sup>"),
-        /* Translators: The hyperbolic cosine button */
-        N_("cosh"),
-        /* Translators: The inverse hyperbolic cosine button */
-        N_("cosh<sup>â??1</sup>")};
-    static char *cosine_tooltips[]  = {
-        /* Translators: The cosine tooltip */
-        N_("Cosine [j]"),
-        /* Translators: The inverse cosine tooltip */
-        N_("Inverse Cosine [J]"),
-        /* Translators: The hyperbolic cosine tooltip */
-        N_("Hyperbolic Cosine [j]"),
-        /* Translators: The hyperbolic inverse cosine tooltip */
-        N_("Hyperbolic Inverse Cosine [J]")};
-    static int  cosine_functions[]  = {FN_COS, FN_ACOS, FN_COSH, FN_ACOSH};
-    static char *tangent_labels[]   = {
-        /* Translators: The tangent button */
-        N_("tan"),
-        /* Translators: The inverse tangent button */        
-        N_("tan<sup>â??1</sup>"),
-        /* Translators: The hyperbolic tangent button */
-        N_("tanh"),
-        /* Translators: The inverse hyperbolic tangent button */
-        N_("tanh<sup>â??1</sup>")};
-    static char *tangent_tooltips[] = {
-        /* Translators: The tangent tooltip */
-        N_("Tangent [w]"),
-        /* Translators: The inverse tangent tooltip */
-        N_("Inverse Tangent [W]"),
-        /* Translators: The hyperbolic tangent tooltip */
-        N_("Hyperbolic Tangent [w]"),
-        /* Translators: The hyperbolic inverse tangent tooltip */
-        N_("Hyperbolic Inverse Tangent [W]")};
-    static int  tangent_functions[] = {FN_TAN, FN_ATAN, FN_TANH, FN_ATANH};
-    
-    static char *ln_labels[]        = {
-        /* Translators: The natural logaritm button */
-        N_("ln"),
-        /* Translators: The e to the power of x button */
-        N_("e<sup><i>x</i></sup>")};
-    static char *ln_tooltips[]      = {
-        /* Translators: Tooltip for the natural log button */
-        N_("Natural logarithm [n]"),
-        /* Translators: Tooltip for the e to the power of x button */
-        N_("e to the power of the displayed value [N]")};
-    static int ln_functions[]       = {FN_NATURAL_LOGARITHM, FN_E_POW_X};
-    
-    static char *log_labels[]       = {
-        /* Translators: The 10-based logaritm button */
-        N_("log"),
-        /* Translators: The 10 to the power of x button */
-        N_("10<sup><i>x</i></sup>")};
-    static char *log_tooltips[]     = {
-        /* Translators: Tooltip for the log base 10 button */
-        N_("Base 10 logarithm [g]"),
-        /* Translators: Tooltip for the 10 to the power of x button */
-        N_("10 to the power of displayed value [G]")};
-    static int log_functions[]      = {FN_LOGARITHM, FN_10_POW_X};
-    
-    static char *log2_labels[]      = {
-        /* Translators: The 2-based logaritm button */
-        N_("log<sub>2</sub>"),
-        /* Translators: The 2 to the power of x button */
-        N_("2<sup><i>x</i></sup>")};
-    static char *log2_tooltips[]    = {
-        /* Translators: Tooltip for the log base 2 button */
-        N_("Base 2 logarithm [h]"),
-        /* Translators: Tooltip for the 2 to the power of x button */
-        N_("2 to the power of the displayed value [H]")};
-    static int log2_functions[]     = {FN_LOGARITHM2, FN_2_POW_X};
-
-    static char *x_pow_y_labels[]   = {
-        /* Translators: The x to the power of y button */
-        N_("x<sup><i>y</i></sup>"),
-        /* Translators: The x to the power of reciprocal y button */
-        N_("x<sup>1/<i>y</i></sup>")};
-    static char *x_pow_y_tooltips[] = {
-        /* Translators: Tooltip for the x to the power of y button */
-        N_("Raise displayed value to the power of y [o]"),
-        /* Translators: Tooltip for the x to the power of reciprocal y button */
-        N_("Raise displayed value to the power of reciprocal y [O]")};
-    static int x_pow_y_functions[]  = {FN_X_POW_Y, FN_X_POW_Y_INV};
-    
-    int index = 0;
-
-    if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(X.inverse_toggle)))
-        index |= 0x1;
-    
-    gtk_label_set_markup(GTK_LABEL(GET_OBJECT("natural_logarithm_label")),
-                         _(ln_labels[index]));
-    gtk_widget_set_tooltip_text(GET_WIDGET("calc_natural_logarithm_button"),
-                                _(ln_tooltips[index]));
-    set_int_data(X.ui, "calc_natural_logarithm_button", "calc_function", ln_functions[index]);
-    
-    gtk_label_set_markup(GTK_LABEL(GET_OBJECT("logarithm_label")),
-                         _(log_labels[index]));
-    gtk_widget_set_tooltip_text(GET_WIDGET("calc_logarithm_button"),
-                                _(log_tooltips[index]));
-    set_int_data(X.ui, "calc_logarithm_button", "calc_function", log_functions[index]);
-
-    gtk_label_set_markup(GTK_LABEL(GET_OBJECT("logarithm2_label")),
-                         _(log2_labels[index]));
-    gtk_widget_set_tooltip_text(GET_WIDGET("calc_logarithm2_button"),
-                                _(log2_tooltips[index]));
-    set_int_data(X.ui, "calc_logarithm2_button", "calc_function", log2_functions[index]);
-
-    gtk_label_set_markup(GTK_LABEL(GET_OBJECT("x_pow_y_label")),
-                         _(x_pow_y_labels[index]));
-    gtk_widget_set_tooltip_text(GET_WIDGET("calc_x_pow_y_button"),
-                                _(x_pow_y_tooltips[index]));
-    set_int_data(X.ui, "calc_x_pow_y_button", "calc_function", x_pow_y_functions[index]);
-    
-    if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(X.hyperbolic_toggle)))
-        index |= 0x2;
-
-    gtk_label_set_markup(GTK_LABEL(GET_OBJECT("sine_label")),
-                         _(sine_labels[index]));
-    gtk_widget_set_tooltip_text(GET_WIDGET("calc_sine_button"),
-                                _(sine_tooltips[index]));
-    set_int_data(X.ui, "calc_sine_button", "calc_function", sine_functions[index]);
-
-    gtk_label_set_markup(GTK_LABEL(GET_OBJECT("cosine_label")),
-                         _(cosine_labels[index]));
-    gtk_widget_set_tooltip_text(GET_WIDGET("calc_cosine_button"),
-                                _(cosine_tooltips[index]));
-    set_int_data(X.ui, "calc_cosine_button", "calc_function", cosine_functions[index]);
-
-    gtk_label_set_markup(GTK_LABEL(GET_OBJECT("tangent_label")),
-                         _(tangent_labels[index]));
-    gtk_widget_set_tooltip_text(GET_WIDGET("calc_tangent_button"),
-                                _(tangent_tooltips[index]));
-    set_int_data(X.ui, "calc_tangent_button", "calc_function", tangent_functions[index]);
 }
 
 
@@ -850,9 +612,9 @@ ui_set_trigonometric_mode(MPAngleUnit units)
 
 
 void
-ui_set_numeric_mode(BaseType mode)
+ui_set_numeric_mode(DisplayFormat mode)
 {
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(X.display_mode_radios[mode]), 1);
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(X.display_mode_radios[mode]), TRUE);
 }
 
 
@@ -865,9 +627,6 @@ ui_set_show_thousands_separator(gboolean visible)
 
     menu = GET_WIDGET("show_thousands_separator_menu");
     gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), visible);
-
-    /* Rebuild registers */
-    ui_make_registers();
 }
 
 
@@ -878,9 +637,6 @@ ui_set_show_trailing_zeroes(gboolean visible)
    
     display_set_show_trailing_zeroes(&v->display, visible);   
 
-    /* Rebuild registers */
-    ui_make_registers();
-
     menu = GET_WIDGET("show_trailing_zeroes_menu");
     gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), visible);
     menu = GET_WIDGET("acc_trailing_zeroes_item");
@@ -997,26 +753,21 @@ ui_set_mode(ModeType mode)
 
         // FIXME: These should affect display but not the actual UI settings
         if (mode != PROGRAMMING)
-            ui_set_base(DEC);
+            ui_set_base(10);
         if (mode != SCIENTIFIC) {
             ui_set_numeric_mode(FIX);
             do_button(FN_SET_ACCURACY, DEFAULT_ACCURACY);
         }
         if (mode == BASIC)
             ui_set_show_trailing_zeroes(FALSE);
-
-        ui_make_registers();
     }
     
     /* Save mode */
     set_enumerated_resource(R_MODE, mode_names, (int)mode);
     
     /* Show/enable the widgets used in this mode */
-    g_object_set(G_OBJECT(X.bas_panel), "visible", mode == BASIC, NULL);
     g_object_set(G_OBJECT(X.adv_panel), "visible", mode != BASIC, NULL);
     g_object_set(G_OBJECT(X.fin_panel), "visible", mode == FINANCIAL, NULL);
-    g_object_set(G_OBJECT(X.sci_mode_panel), "visible", mode == SCIENTIFIC, NULL);
-    g_object_set(G_OBJECT(X.prog_mode_panel), "visible", mode == PROGRAMMING, NULL);
     g_object_set(G_OBJECT(X.sci_panel), "visible", mode == SCIENTIFIC, NULL);
     g_object_set(G_OBJECT(X.prog_panel), "visible", mode == PROGRAMMING, NULL);
     g_object_set(G_OBJECT(X.bit_panel), "visible", mode == PROGRAMMING, NULL);
@@ -1039,18 +790,6 @@ ui_set_mode(ModeType mode)
         h += r->height;
     }
 
-    if (GTK_WIDGET_VISIBLE(X.sci_mode_panel)) {
-        gtk_widget_size_request(X.sci_mode_panel, r);
-        w = MAX(w, r->width);
-        h += r->height;
-    }
-
-    if (GTK_WIDGET_VISIBLE(X.prog_mode_panel)) {
-        gtk_widget_size_request(X.prog_mode_panel, r);
-        w = MAX(w, r->width);
-        h += r->height;
-    }
-
     if (GTK_WIDGET_VISIBLE(X.sci_panel)) {
         gtk_widget_size_request(X.sci_panel, r);
         w = MAX(w, r->width);
@@ -1198,18 +937,13 @@ ui_set_error_state(gboolean error)
 
     v->error = error;
 
+    /* Clr button always sensitive. */    
     for (i = 0; i < NBUTTONS; i++)
-        gtk_widget_set_sensitive(X.buttons[i], !v->error);
-    /* Clr button always sensitive. */
-    gtk_widget_set_sensitive(X.clear_buttons[0], TRUE);
-    gtk_widget_set_sensitive(X.clear_buttons[1], TRUE);
+        gtk_widget_set_sensitive(X.buttons[i], !v->error || X.buttons[i] == X.clear_button);
 
     if (!v->error)
         ui_set_base(v->base);
 
-    gtk_widget_set_sensitive(X.sci_mode_panel, !v->error);
-    gtk_widget_set_sensitive(X.prog_mode_panel, !v->error);
-
     gtk_widget_set_sensitive(GET_WIDGET("copy_menu"),            !v->error);
     gtk_widget_set_sensitive(GET_WIDGET("paste_menu"),           !v->error); 
     gtk_widget_set_sensitive(GET_WIDGET("undo_menu"),            !v->error);
@@ -1239,15 +973,29 @@ ui_beep()
 
 
 void
-ui_set_base(BaseType base)
+ui_set_base(int base)
 {
-    int i, baseval = basevals[(int) base];
+    GtkWidget *widget;
     
     v->base = base;
-
-    for (i = 0; i < 16; i++)
-        gtk_widget_set_sensitive(X.digit_buttons[i], i < baseval);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(X.base_radios[base]), 1);
+    
+    switch(base)
+    {
+    case 2:
+        widget = X.base_radios[0];
+        break;
+    case 8:
+        widget = X.base_radios[1];
+        break;
+    default:
+    case 10:
+        widget = X.base_radios[2];
+        break;
+    case 16:
+        widget = X.base_radios[3];
+        break;
+    }
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
 }
 
 
@@ -1278,8 +1026,6 @@ ui_set_registers_visible(gboolean visible)
 {
     GtkWidget *menu;
 
-    ui_make_registers();
-
     menu = GET_WIDGET("show_registers_menu");
     gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), visible);   
 
@@ -1440,27 +1186,10 @@ ascii_dialog_activate_cb(GtkWidget *entry)
 
 G_MODULE_EXPORT
 void
-register_dialog_response_cb(GtkWidget *dialog, int response_id)
-{
-    ui_set_registers_visible(FALSE);
-}
-
-
-G_MODULE_EXPORT
-gboolean
-register_dialog_delete_cb(GtkWidget *dialog)
-{
-    register_dialog_response_cb(dialog, GTK_RESPONSE_OK);
-    return TRUE;
-}
-
-
-G_MODULE_EXPORT
-void
 disp_cb(GtkWidget *widget)
 {
     if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
-        do_button(FN_SET_NUMBERTYPE, (int)g_object_get_data(G_OBJECT(widget), "numeric_mode"));
+        do_button(FN_SET_NUMBERTYPE, GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "numeric_mode")));
 }
 
 
@@ -1468,9 +1197,9 @@ G_MODULE_EXPORT
 void
 base_cb(GtkWidget *widget)
 {
-    BaseType base;
+    int base;
 
-    base = (BaseType) g_object_get_data(G_OBJECT(widget), "base_mode");
+    base = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "base"));
     if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
         do_button(FN_SET_BASE, base);
 }
@@ -1514,24 +1243,6 @@ help_display(void)
 
 G_MODULE_EXPORT
 void
-constant_menu_cb(GtkMenuItem *menu)
-{
-    int arg = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(menu), "constant_id"));
-    do_button(FN_CONSTANT, arg);
-}
-
-
-G_MODULE_EXPORT
-void
-function_menu_cb(GtkMenuItem *menu)
-{
-    int arg = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(menu), "function_id"));
-    do_button(FN_FUNCTION, arg);
-}
-
-
-G_MODULE_EXPORT
-void
 store_menu_cb(GtkMenuItem *menu)
 {
     int arg = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(menu), "register_id"));
@@ -1550,15 +1261,6 @@ recall_menu_cb(GtkMenuItem *menu)
 
 G_MODULE_EXPORT
 void
-exchange_menu_cb(GtkMenuItem *menu)
-{
-    int arg = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(menu), "register_id"));
-    do_button(FN_EXCHANGE, arg);
-}
-
-
-G_MODULE_EXPORT
-void
 finc_activate_cb(GtkWidget *widget) {
     gint dialog, field;
 
@@ -1651,168 +1353,48 @@ setup_finc_dialogs(void)
     gtk_builder_connect_signals(X.financial, NULL);
 }
 
-static void
-update_constants_menu(void)
-{
-    char mline[MAXLINE], value[MAXLINE];
-    int i;
-
-    for (i = 0; i < MAX_CONSTANTS; i++) {
-        display_make_number(&v->display, value, MAXLINE, constant_get_value(i), DEC, TRUE);
-        SNPRINTF(mline, MAXLINE, 
-                 "<span weight=\"bold\">%s_%1d:</span> %s [%s]", _("C"), i, 
-                 value, 
-                 constant_get_name(i));
-        gtk_label_set_markup_with_mnemonic(GTK_LABEL(X.constant_menu_labels[i]), mline);
-    }
-}
-
-
-static void
-update_functions_menu(void)
-{
-    char mline[MAXLINE];
-    int i;
-
-    for (i = 0; i < MAX_FUNCTIONS; i++) {
-        const char *name, *value;
-        
-        name = function_get_name(i);
-        value = function_get_value(i);
-        
-        if (strlen(value) != 0) {
-            SNPRINTF(mline, MAXLINE,
-                     "<span weight=\"bold\">%s_%1d:</span> %s [%s]", 
-                     _("F"), i, value, name);
-            gtk_widget_show(gtk_widget_get_parent(X.function_menu_labels[i]));
-            gtk_label_set_markup_with_mnemonic(GTK_LABEL(X.function_menu_labels[i]), mline);
-        }
-        else
-            gtk_widget_hide(gtk_widget_get_parent(X.function_menu_labels[i]));
-    }
-}
-
 
 G_MODULE_EXPORT
 void
-edit_constants_response_cb(GtkDialog *dialog, gint id)
+edit_register_names_response_cb(GtkDialog *dialog, gint id)
 {
-    GtkTreeIter iter;
-    gint number;
-    gchar *value;
-    gchar *description;
-
     if (id == GTK_RESPONSE_HELP)
         help_display();
-
-    if (id == GTK_RESPONSE_ACCEPT) {
-        if (gtk_tree_model_get_iter_first(X.constants_model, &iter)) {
-            do {
-                MPNumber temp;
-                gtk_tree_model_get(X.constants_model, &iter,
-                                   COLUMN_NUMBER, &number,
-                                   COLUMN_VALUE, &value,
-                                   COLUMN_DESCRIPTION, &description, -1);
-                // FIXME: Have to delocalize
-                mp_set_from_string(value, 10, &temp);
-                constant_set(number, description, &temp);
-            } while (gtk_tree_model_iter_next(X.constants_model, &iter));
-        }
-    }
-
-    gtk_widget_hide(GTK_WIDGET(dialog));
-}
-
-
-G_MODULE_EXPORT
-gboolean
-edit_constants_delete_cb(GtkDialog *dialog)
-{
-    edit_constants_response_cb(dialog, GTK_RESPONSE_CANCEL);
-    return TRUE;
-}
-
-
-G_MODULE_EXPORT
-void
-edit_functions_response_cb(GtkDialog *dialog, gint id)
-{
-    GtkTreeIter iter;
-    gint number;
-    gchar *value;
-    gchar *description;
-
-    if (id == GTK_RESPONSE_HELP)
-        help_display();
-
-    if (id == GTK_RESPONSE_ACCEPT) {
-        if (gtk_tree_model_get_iter_first(X.functions_model, &iter)) {
-            do {
-                gtk_tree_model_get(X.functions_model, &iter,
-                                   COLUMN_NUMBER, &number,
-                                   COLUMN_VALUE, &value,
-                                   COLUMN_DESCRIPTION, &description, -1);
-                function_set(number, description, value);
-            } while (gtk_tree_model_iter_next(X.functions_model, &iter));
-        }
+    else {
+        gtk_widget_hide(GTK_WIDGET(dialog));
+        ui_set_registers_visible(FALSE);
     }
-
-    gtk_widget_hide(GTK_WIDGET(dialog));
 }
 
 
 G_MODULE_EXPORT
 gboolean
-edit_functions_delete_cb(GtkDialog *dialog)
+edit_register_names_delete_cb(GtkDialog *dialog)
 {
-    edit_functions_response_cb(dialog, GTK_RESPONSE_CANCEL);
+    ui_set_registers_visible(FALSE);    
     return TRUE;
 }
 
 
 static GtkTreeModel *
-create_constants_model()
+create_register_model()
 {
     gint i = 0;
     GtkListStore *model;
     GtkTreeIter iter;
-    char constant[MAXLINE];
+    char value[MAXLINE];
 
     model = gtk_list_store_new(NUM_COLUMNS, G_TYPE_INT, G_TYPE_STRING,
                                G_TYPE_STRING, G_TYPE_BOOLEAN);   
-    for (i = 0; i < MAX_CONSTANTS; i++) {
-        gtk_list_store_append(model, &iter);
-        
-        display_make_number(&v->display, constant, MAXLINE, constant_get_value(i), DEC, TRUE);
-        gtk_list_store_set(model, &iter,
-                           COLUMN_NUMBER, i,
-                           COLUMN_EDITABLE, TRUE,
-                           COLUMN_VALUE, constant,
-                           COLUMN_DESCRIPTION, constant_get_name(i),
-                           -1);
-    }
-
-    return GTK_TREE_MODEL(model);
-}
-
-
-static GtkTreeModel *
-create_functions_model()
-{
-    gint i = 0;
-    GtkListStore *model;
-    GtkTreeIter iter;
-
-    model = gtk_list_store_new(NUM_COLUMNS, G_TYPE_INT, G_TYPE_STRING,
-                               G_TYPE_STRING, G_TYPE_BOOLEAN);   
-    for (i = 0; i < MAX_FUNCTIONS; i++) {
+    for (i = 0; i < MAX_REGISTERS; i++) {
         gtk_list_store_append(model, &iter);
         
+        display_make_number(&v->display, value, MAXLINE, register_get_value(i), 10, TRUE);
         gtk_list_store_set(model, &iter,
                            COLUMN_NUMBER, i,
                            COLUMN_EDITABLE, TRUE,
-                           COLUMN_VALUE, function_get_value(i),
-                           COLUMN_DESCRIPTION, function_get_name(i),
+                           COLUMN_VALUE, value,
+                           COLUMN_DESCRIPTION, register_get_name(i),
                            -1);
     }
 
@@ -1820,27 +1402,6 @@ create_functions_model()
 }
 
 
-void
-ui_make_registers()            /* Calculate memory register frame values. */
-{
-    char mval[MAXLINE], key[MAXLINE], value[MAXLINE];
-    int n;
-
-    for (n = 0; n < MAX_REGISTERS; n++) {
-        MPNumber temp;
-        
-        register_get(n, &temp);
-        display_make_number(&v->display, mval, MAXLINE, &temp, v->base, TRUE);
-        gtk_entry_set_width_chars(GTK_ENTRY(X.register_entries[n]), strlen(mval));
-        gtk_entry_set_text(GTK_ENTRY(X.register_entries[n]), mval);
-
-        SNPRINTF(key, MAXLINE, "register%d", n);
-        display_make_number(&v->display, value, MAXLINE, &temp, DEC, TRUE);
-        set_resource(key, value);
-    }
-}
-
-
 static void
 save_win_position()
 {
@@ -1911,15 +1472,20 @@ update_memory_menus()
     int i;
 
     for (i = 0; i < MAX_REGISTERS; i++) {
-        MPNumber temp;
-        register_get(i, &temp);
-        display_make_number(&v->display, value, MAXLINE, &temp, v->base, TRUE);
-        SNPRINTF(mstr, MAXLINE, "<span weight=\"bold\">%s_%d:</span>    %s",
-        /* Translators: R is the short form of register used inter alia in popup menus */
-                _("R"), i, value);
+        const char *name, *register_prefix;
+        
+        name = register_get_name(i);
+
+        /* Translators: R is the short form of register used inter alia in popup menus */        
+        register_prefix = _("R");
+        
+        display_make_number(&v->display, value, MAXLINE, register_get_value(i), v->base, TRUE);
+        if (name[0] != '\0')
+            SNPRINTF(mstr, MAXLINE, "<span weight=\"bold\">%s_%d:</span>    %s [%s]", register_prefix, i, value, name);
+        else
+            SNPRINTF(mstr, MAXLINE, "<span weight=\"bold\">%s_%d:</span>    %s", register_prefix, i, value);
         gtk_label_set_markup_with_mnemonic(GTK_LABEL(X.memory_store_labels[i]), mstr);
         gtk_label_set_markup_with_mnemonic(GTK_LABEL(X.memory_recall_labels[i]), mstr);
-        gtk_label_set_markup_with_mnemonic(GTK_LABEL(X.memory_exchange_labels[i]), mstr);
     }
 }
 
@@ -1968,14 +1534,6 @@ help_cb(GtkWidget *widget)
 
 G_MODULE_EXPORT
 void
-hyp_cb(GtkWidget *widget)
-{
-    ui_update_modifier_mode();
-}
-
-
-G_MODULE_EXPORT
-void
 trig_cb(GtkWidget *widget)
 {
     if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
@@ -1983,14 +1541,6 @@ trig_cb(GtkWidget *widget)
 }
 
 
-G_MODULE_EXPORT
-void
-inv_cb(GtkWidget *widget)
-{
-    ui_update_modifier_mode();
-}
-
-
 static void
 menu_pos_func(GtkMenu *menu, gint *x, gint *y,
               gboolean *push_in, gpointer user_data)
@@ -2027,8 +1577,6 @@ button_cb(GtkWidget *widget, GdkEventButton *event)
          * button.
          */
 
-        update_constants_menu();
-        update_functions_menu();
         update_memory_menus();
 
         if (event == NULL) {
@@ -2066,44 +1614,49 @@ main_window_key_press_cb(GtkWidget *widget, GdkEventKey *event)
     /* Only look at the modifiers we use */
     state = event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK);
     
+    // FIXME: Convert event to character
+    
     if (check_for_localized_numeric_point(event->keyval) == TRUE) {
         event->state = 0;
         event->keyval = GDK_KP_Decimal;
     }
     
     /* Accuracy shortcuts */
-    if (state == GDK_CONTROL_MASK && (X.mode == SCIENTIFIC || 
-                                      X.mode == PROGRAMMING)) {
+    if (state == GDK_CONTROL_MASK) {
         switch (event->keyval) {
             case GDK_0:
-                do_button(FN_SET_ACCURACY, 0);
+                do_button(event->state & GDK_SHIFT_MASK ? FN_SUB_0 : FN_SUPER_0, 0);
                 return TRUE;
             case GDK_1:
-                do_button(FN_SET_ACCURACY, 1);
+                do_button(event->state & GDK_SHIFT_MASK ? FN_SUB_1 : FN_SUPER_1, 0);
                 return TRUE;
             case GDK_2:
-                do_button(FN_SET_ACCURACY, 2);
+                do_button(event->state & GDK_SHIFT_MASK ? FN_SUB_2 : FN_SUPER_2, 0);
                 return TRUE;
             case GDK_3:
-                do_button(FN_SET_ACCURACY, 3);
+                do_button(event->state & GDK_SHIFT_MASK ? FN_SUB_3 : FN_SUPER_3, 0);
                 return TRUE;
             case GDK_4:
-                do_button(FN_SET_ACCURACY, 4);
+                do_button(event->state & GDK_SHIFT_MASK ? FN_SUB_4 : FN_SUPER_4, 0);
                 return TRUE;
             case GDK_5:
-                do_button(FN_SET_ACCURACY, 5);
+                do_button(event->state & GDK_SHIFT_MASK ? FN_SUB_5 : FN_SUPER_5, 0);
                 return TRUE;
             case GDK_6:
-                do_button(FN_SET_ACCURACY, 6);
+                do_button(event->state & GDK_SHIFT_MASK ? FN_SUB_6 : FN_SUPER_6, 0);
                 return TRUE;
             case GDK_7:
-                do_button(FN_SET_ACCURACY, 7);
+                do_button(event->state & GDK_SHIFT_MASK ? FN_SUB_7 : FN_SUPER_7, 0);
                 return TRUE;
             case GDK_8:
-                do_button(FN_SET_ACCURACY, 8);
+                do_button(event->state & GDK_SHIFT_MASK ? FN_SUB_8 : FN_SUPER_8, 0);
                 return TRUE;
             case GDK_9:
-                do_button(FN_SET_ACCURACY, 9);
+                do_button(event->state & GDK_SHIFT_MASK ? FN_SUB_9 : FN_SUPER_9, 0);
+                return TRUE;
+            case GDK_minus:
+            case GDK_KP_Subtract:
+                do_button(event->state & GDK_SHIFT_MASK ? FN_SUB_MINUS : FN_SUPER_MINUS, 0);
                 return TRUE;
         }
     }
@@ -2124,14 +1677,11 @@ main_window_key_press_cb(GtkWidget *widget, GdkEventKey *event)
         do_button(FN_DELETE, 0);
         return TRUE;
     }
-
-    /* Shift inverse mode based on if shift is pressed */
-    if (event->keyval == GDK_Shift_L || event->keyval == GDK_Shift_R) {
-        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(X.inverse_toggle), 
-                                     TRUE);
+    if (event->keyval == GDK_BackSpace && state == 0 && (event->state & GDK_SHIFT_MASK) == 0) {
+        do_button(FN_BACKSPACE, 0);
         return TRUE;
     }
-    
+
     for (i = 0; i < NBUTTONS; i++) {
         button = X.buttons[i];
         
@@ -2171,19 +1721,6 @@ main_window_key_press_cb(GtkWidget *widget, GdkEventKey *event)
 
 
 G_MODULE_EXPORT
-gboolean
-main_window_key_release_cb(GtkWidget *widget, GdkEventKey *event)
-{
-    if (event->keyval == GDK_Shift_L || event->keyval == GDK_Shift_R) {
-        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(X.inverse_toggle), 
-                                     FALSE);
-        return TRUE;
-    }
-    return FALSE;
-}
-
-
-G_MODULE_EXPORT
 void 
 edit_cb(GtkWidget *widget)
 {
@@ -2310,16 +1847,6 @@ shift_cb(GtkWidget *widget)
 
 G_MODULE_EXPORT
 void
-show_registers_cb(GtkWidget *widget)
-{
-    gboolean visible;    
-    visible = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget));   
-    ui_set_registers_visible(visible);
-}
-
-
-G_MODULE_EXPORT
-void
 mode_radio_cb(GtkWidget *menu)
 {
     int mode;             /* The new mode. */
@@ -2426,17 +1953,9 @@ show_thousands_separator_cb(GtkWidget *widget)
 
 G_MODULE_EXPORT
 void
-edit_constants_cb(GtkMenuItem *item)
+edit_register_names_cb(GtkMenuItem *item)
 {
-    gtk_widget_show(X.constants_dialog);
-}
-
-
-G_MODULE_EXPORT
-void
-edit_functions_cb(GtkMenuItem *item)
-{
-    gtk_widget_show(X.function_dialog);
+    ui_set_registers_visible(TRUE);
 }
 
 
@@ -2506,9 +2025,7 @@ create_main_window()
     X.ascii_entry      = GET_WIDGET("ascii_entry");
     X.precision_dialog = GET_WIDGET("precision_dialog");
     X.precision_spin   = GET_WIDGET("precision_dialog_spin");
-    X.register_dialog  = GET_WIDGET("register_dialog");
-    X.constants_dialog = GET_WIDGET("edit_constants_dialog");
-    X.function_dialog  = GET_WIDGET("edit_functions_dialog");
+    X.register_dialog  = GET_WIDGET("edit_register_names_dialog");
     X.menubar          = GET_WIDGET("menubar");
     X.scrolledwindow   = GET_WIDGET("display_scroll"),
     X.display_item     = GET_WIDGET("displayitem"),
@@ -2518,10 +2035,7 @@ 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_buttons[0] = GET_WIDGET("calc_clear_simple_button");
-    X.clear_buttons[1] = GET_WIDGET("calc_clear_advanced_button");   
-    X.sci_mode_panel   = GET_WIDGET("scientific_mode_panel");
-    X.prog_mode_panel  = GET_WIDGET("programming_mode_panel");
+    X.clear_button     = GET_WIDGET("calc_clear_button");
     X.degree_radio     = GET_WIDGET("degrees_radio");
     X.gradian_radio    = GET_WIDGET("gradians_radio");
     X.radian_radio     = GET_WIDGET("radians_radio");
@@ -2535,17 +2049,7 @@ create_main_window()
     X.word_length_radios[0]  = GET_WIDGET("64bit_radio");
     X.word_length_radios[1]  = GET_WIDGET("32bit_radio");
     X.word_length_radios[2]  = GET_WIDGET("16bit_radio");
-    X.inverse_toggle    = GET_WIDGET("inverse_check");
-    X.hyperbolic_toggle = GET_WIDGET("hyperbolic_check");
     X.statusbar         = GET_WIDGET("statusbar");
-    for (i = 0; i < 16; i++) {
-        SNPRINTF(name, MAXLINE, "calc_%x_button", i);
-        X.digit_buttons[i] = GET_WIDGET(name);
-    }
-    for (i = 0; i < MAX_REGISTERS; i++) {
-        SNPRINTF(name, MAXLINE, "register_entry_%d", i);
-        X.register_entries[i] = GET_WIDGET(name);
-    }
 
     /* Load buttons and set them all to be the same size */
     size_group = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
@@ -2564,26 +2068,9 @@ create_main_window()
     set_data(X.ui, "calc_accuracy_button", "calc_menu", GET_WIDGET("accuracy_popup"));
     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"));
-    
-    set_data(X.ui, "calc_constants_button", "calc_menu", GET_WIDGET("constants_popup"));
-    for (i = 0; i < MAX_CONSTANTS; i++) {
-        SNPRINTF(name, MAXLINE, "constant_menu_item%d", i);
-        widget = GET_WIDGET(name);
-        g_object_set_data(G_OBJECT(widget), "constant_id", GINT_TO_POINTER(i));
-        X.constant_menu_labels[i] = gtk_bin_get_child(GTK_BIN(widget));
-    }
-
-    set_data(X.ui, "calc_functions_button", "calc_menu", GET_WIDGET("functions_popup"));
-    for (i = 0; i < MAX_FUNCTIONS; i++) {
-        SNPRINTF(name, MAXLINE, "function_menu_item%d", i);
-        widget = GET_WIDGET(name);
-        g_object_set_data(G_OBJECT(widget), "function_id", GINT_TO_POINTER(i));
-        X.function_menu_labels[i] = gtk_bin_get_child(GTK_BIN(widget));
-    }
 
     set_data(X.ui, "calc_store_button", "calc_menu", GET_WIDGET("memory_store_popup"));
     set_data(X.ui, "calc_recall_button", "calc_menu", GET_WIDGET("memory_recall_popup"));
-    set_data(X.ui, "calc_exchange_button", "calc_menu", GET_WIDGET("memory_exchange_popup"));
     for (i = 0; i < MAX_REGISTERS; i++) {
         SNPRINTF(name, MAXLINE, "store_menu_item%d", i);
         widget = GET_WIDGET(name);
@@ -2593,12 +2080,7 @@ create_main_window()
         SNPRINTF(name, MAXLINE, "recall_menu_item%d", i);
         widget = GET_WIDGET(name);
         g_object_set_data(G_OBJECT(widget), "register_id", GINT_TO_POINTER(i));
-        X.memory_recall_labels[i] = gtk_bin_get_child(GTK_BIN(widget));
-        
-        SNPRINTF(name, MAXLINE, "exchange_menu_item%d", i);
-        widget = GET_WIDGET(name);
-        g_object_set_data(G_OBJECT(widget), "register_id", GINT_TO_POINTER(i));
-        X.memory_exchange_labels[i] = gtk_bin_get_child(GTK_BIN(widget));
+        X.memory_recall_labels[i] = gtk_bin_get_child(GTK_BIN(widget));        
     }
 
     /* Load bit panel */
@@ -2630,48 +2112,23 @@ create_main_window()
     gtk_window_set_transient_for(GTK_WINDOW(X.ascii_dialog), GTK_WINDOW(X.main_window));
     gtk_window_set_transient_for(GTK_WINDOW(X.precision_dialog), GTK_WINDOW(X.main_window));
     gtk_window_set_transient_for(GTK_WINDOW(X.register_dialog), GTK_WINDOW(X.main_window));
-    gtk_window_set_transient_for(GTK_WINDOW(X.constants_dialog),
-                                 GTK_WINDOW(X.main_window));
 
     /* Can't set max length for spin buttons in Glade 2 */
     gtk_entry_set_max_length(GTK_ENTRY(X.precision_spin), 2);
 
-    gtk_dialog_set_default_response(GTK_DIALOG(X.constants_dialog), 
-                                    GTK_RESPONSE_ACCEPT);
-
-    /* Make constant tree model */
-    X.constants_model = create_constants_model();
-    treeview = GET_WIDGET("edit_constants_treeview");
-    gtk_tree_view_set_model(GTK_TREE_VIEW(treeview), X.constants_model);
+    /* Make register tree model */
+    X.register_model = create_register_model();
+    treeview = GET_WIDGET("edit_register_names_treeview");
+    gtk_tree_view_set_model(GTK_TREE_VIEW(treeview), X.register_model);
     gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)),
                                 GTK_SELECTION_SINGLE);
-    /* Translators: Edit Constants Dialog: Constant number column title */
+    /* Translators: Edit Register Names Dialog: Register number column title */
     add_cf_column(GTK_TREE_VIEW(treeview), _("No."), COLUMN_NUMBER, FALSE);
-    /* Translators: Edit Constants Dialog: Constant value column title */
+    /* Translators: Edit Register Names Dialog: Register value column title */
     add_cf_column(GTK_TREE_VIEW(treeview), _("Value"), COLUMN_VALUE, TRUE);
-    /* Translators: Edit Constants Dialog: Constant description column title */    
+    /* Translators: Edit Register Names Dialog: Register description column title */    
     add_cf_column(GTK_TREE_VIEW(treeview), _("Description"), COLUMN_DESCRIPTION, TRUE);
 
-    /* Make function tree model */
-    X.functions_model = create_functions_model();
-    treeview = GET_WIDGET("edit_functions_treeview");
-    gtk_dialog_set_default_response(GTK_DIALOG(X.function_dialog), 
-                                    GTK_RESPONSE_ACCEPT);
-    gtk_window_set_transient_for(GTK_WINDOW(X.function_dialog), 
-                                 GTK_WINDOW(X.main_window));
-    gtk_tree_view_set_model(GTK_TREE_VIEW(treeview), X.functions_model);
-    gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)),
-                                GTK_SELECTION_SINGLE);
-    /* Translators: Edit Functions Dialog: Function number column title */
-    add_cf_column(GTK_TREE_VIEW(treeview), _("No."),
-                  COLUMN_NUMBER, FALSE);
-    /* Translators: Edit Functions Dialog: Function value column title */
-    add_cf_column(GTK_TREE_VIEW(treeview), _("Value"),
-                  COLUMN_VALUE, TRUE);
-    /* Translators: Edit Functions Dialog: Function description column title */
-    add_cf_column(GTK_TREE_VIEW(treeview), _("Description"),
-                  COLUMN_DESCRIPTION, TRUE);
-
     X.display_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(X.display_item));
     gtk_widget_ensure_style(X.display_item);
     font_desc = pango_font_description_copy(X.display_item->style->font_desc);
@@ -2688,8 +2145,10 @@ create_main_window()
     g_object_set_data(G_OBJECT(X.radian_radio), "trig_mode", GINT_TO_POINTER(MP_RADIANS));
     g_object_set_data(G_OBJECT(X.degree_radio), "trig_mode", GINT_TO_POINTER(MP_DEGREES));
     g_object_set_data(G_OBJECT(X.gradian_radio), "trig_mode", GINT_TO_POINTER(MP_GRADIANS));
-    for (i = 0; i < 4; i++)
-        g_object_set_data(G_OBJECT(X.base_radios[i]), "base_mode", GINT_TO_POINTER(i));
+    for (i = 0; i < 4; i++) {
+        int base_values[4] = {2, 8, 10, 16};
+        g_object_set_data(G_OBJECT(X.base_radios[i]), "base", GINT_TO_POINTER(base_values[i]));
+    }
     for (i = 0; i < 3; i++)
         g_object_set_data(G_OBJECT(X.display_mode_radios[i]), "numeric_mode", GINT_TO_POINTER(i));
     
@@ -2782,10 +2241,8 @@ ui_load(void)
     ui_set_wordlen(v->wordlen);
     ui_set_accuracy(v->accuracy);
     ui_set_undo_enabled(FALSE, FALSE);
-    ui_update_modifier_mode();
     
     /* Show the memory register window? */
-    ui_make_registers();
     if (get_boolean_resource(R_REGS, &boolval))
         ui_set_registers_visible(boolval);
 
diff --git a/src/mp-equation-lexer.l b/src/mp-equation-lexer.l
index 3c1a971..d9462db 100644
--- a/src/mp-equation-lexer.l
+++ b/src/mp-equation-lexer.l
@@ -43,7 +43,6 @@ BIN     [0-1]
 OCT     [0-7]
 DEC     [0-9]
 HEX     [0-9]|[A-F]|[a-f]
-EXP     "e"|"e+"|"e-"|"E"|"E+"|"E-"
 HEX_NUM {HEX}+|{HEX}*{DECIMAL}{HEX}*
 DEC_NUM{DEC}+|{DEC}*{DECIMAL}{DEC}*
 OCT_NUM{OCT}+|{OCT}*{DECIMAL}{OCT}*
@@ -102,13 +101,6 @@ yylval->integer = atoi(yytext+1);
 return tREG;
 }
 
-{DEC_NUM}{EXP}{DEC_NUM} {
-if (_mp_equation_get_extra(yyscanner)->base == 16) REJECT;
-if (strlen(yytext) > MAX_DIGITS) yyextra->error = -PARSER_ERR_TOO_LONG_NUMBER;
-mp_set_from_string(yytext, _mp_equation_get_extra(yyscanner)->base, &yylval->int_t);
-return tNUMBER;
-}
-
 {BIN_NUM} {
 if (_mp_equation_get_extra(yyscanner)->base != 2) REJECT;
 if (strlen(yytext) > MAX_DIGITS) yyextra->error = -PARSER_ERR_TOO_LONG_NUMBER;
diff --git a/src/mp-equation-parser.y b/src/mp-equation-parser.y
index a8c6976..b539d5b 100644
--- a/src/mp-equation-parser.y
+++ b/src/mp-equation-parser.y
@@ -131,11 +131,11 @@ udf:
   }
 | value '=' tSTO '(' tNUMBER ')' {
   int val = mp_cast_to_int(&$5);
-  register_set(val, &$1);
+  register_set_value(val, &$1);
 }
 | value tSTO '(' tNUMBER ')' {
   int val = mp_cast_to_int(&$4);
-  register_set(val, &$1);
+  register_set_value(val, &$1);
 }
 | tCLR {
   display_clear(&v->display);
@@ -198,6 +198,7 @@ exp:
 
 term:
   number {mp_set_from_mp(&$1, &$$);}
+| 'e' {mp_get_eulers(&$$);} 
 | tPI {mp_get_pi(&$$);}
 | rcl {mp_set_from_mp(&$1, &$$);}
 | tROOT term {mp_sqrt(&$2, &$$);}
@@ -206,7 +207,6 @@ term:
 | term tDIVIDE term {mp_divide(&$1, &$3, &$$);}
 | term tMULTIPLY term {mp_multiply(&$1, &$3, &$$);}
 | tABS exp tABS {mp_abs(&$2, &$$);} 
-| 'e' '^' term {mp_epowy(&$3, &$$);} 
 | term '!' {mp_factorial(&$1, &$$);}
 | term tSQUARED {mp_pwr_integer(&$1, 2, &$$);}
 | term tCUBED {mp_pwr_integer(&$1, 3, &$$);}
@@ -235,7 +235,7 @@ parenthesis:
   ;
 
 reg: 
-  tREG {register_get($1, &$$);}
+  tREG {mp_set_from_mp(register_get_value($1), &$$);}
   ;
 
 func:
@@ -284,7 +284,7 @@ func:
 rcl:
   tRCL '(' tNUMBER ')' {
     int val = mp_cast_to_int(&$3);
-    register_get(val, &$$);
+    mp_set_from_mp(register_get_value(val), &$$);
   }
   ;
 
diff --git a/src/mp-equation.c b/src/mp-equation.c
index e5b3e9b..42b1d57 100644
--- a/src/mp-equation.c
+++ b/src/mp-equation.c
@@ -38,7 +38,7 @@ mp_equation_parse_(const char *expression, MPNumber *result, int need_result)
         return(-EINVAL);
 
     memset(&state, 0, sizeof(MPEquationParserState));
-    state.base = basevals[v->base];
+    state.base = v->base;
     state.wordlen = v->wordlen;
     state.angle_units = v->ttype;
     mp_set_from_mp(display_get_answer(&v->display), &state.ans);
diff --git a/src/mp.c b/src/mp.c
index 69ebaee..214f500 100644
--- a/src/mp.c
+++ b/src/mp.c
@@ -239,6 +239,15 @@ mpchk()
 }
 
 
+void
+mp_get_eulers(MPNumber *z)
+{
+    MPNumber t;
+    mp_set_from_integer(1, &t);
+    mp_epowy(&t, z);
+}
+
+
 /* SETS Y = ABS(X) FOR MP NUMBERS X AND Y */
 void
 mp_abs(const MPNumber *x, MPNumber *z)
diff --git a/src/mp.h b/src/mp.h
index 36a14c4..d435028 100644
--- a/src/mp.h
+++ b/src/mp.h
@@ -148,6 +148,9 @@ void   mp_logarithm(int n, MPNumber *x, MPNumber *z);
 /* Sets z = Ï? */
 void   mp_get_pi(MPNumber *z);
 
+/* Sets z = e */
+void   mp_get_eulers(MPNumber *z);
+
 /* Sets z = x^y */
 void   mp_pwr(const MPNumber *x, const MPNumber *y, MPNumber *z);
 
diff --git a/src/register.c b/src/register.c
index 8a8ff8c..9b2da9f 100644
--- a/src/register.c
+++ b/src/register.c
@@ -26,15 +26,14 @@
 #include "get.h"
 #include "mp.h"
 
-static char constant_names[MAX_CONSTANTS][MAXLINE];  /* Selectable constant names. */
-static MPNumber constant_values[MAX_CONSTANTS];  /* Selectable constants. */
-
 static char function_names[MAX_FUNCTIONS][MAXLINE];  /* Function names from .gcalctoolcf. */
 static char function_values[MAX_FUNCTIONS][MAXLINE];   /* Function defs from .gcalctoolcf. */
 
 static MPNumber registers[MAX_REGISTERS];     /* Memory register values. */
+static char register_names[MAX_REGISTERS][MAXLINE];  /* Memory register names */
+
 
-static const char *default_constants[][2] =
+static const char *default_registers[][2] =
 {
     /* Translators: This is the label for the default constant, the number of miles in one kilometer (0.621) */
     { N_("Kilometer-to-mile conversion factor"), "0.621" },
@@ -61,28 +60,16 @@ static const char *default_constants[][2] =
 void register_init()
 {
     int i;
-    char key[MAXLINE], *value;
-
-    for (i = 0; i < MAX_REGISTERS; i++) {
-        SNPRINTF(key, MAXLINE, "register%d", i);
-        value = get_resource(key);
-        if (value) {
-            MPNumber temp;
-            mp_set_from_string(value, 10, &temp);
-            g_free(value);
-            register_set(i, &temp);
-        }
-    }
     
-    for (i = 0; i < MAX_CONSTANTS; i++) {
+    for (i = 0; i < MAX_REGISTERS; i++) {
         char nkey[MAXLINE], *nline;
         char vkey[MAXLINE], *vline = NULL;
         MPNumber value;
 
-        SNPRINTF(nkey, MAXLINE, "constant%1dname", i);
+        SNPRINTF(nkey, MAXLINE, "registger%1dname", i);
         nline = get_resource(nkey);
         if (nline) {
-            SNPRINTF(vkey, MAXLINE, "constant%1dvalue", i);
+            SNPRINTF(vkey, MAXLINE, "register%1d", i);
             vline = get_resource(vkey);
             if (vline == NULL)
                 g_free(nline);
@@ -90,13 +77,15 @@ void register_init()
 
         if (nline && vline) {
             mp_set_from_string(vline, 10, &value);
-            constant_set(i, nline, &value);
+            register_set_name(i, nline);
+            register_set_value(i, &value);
             g_free(nline);
             g_free(vline);
         }
         else {
-            mp_set_from_string(default_constants[i][1], 10, &value);
-            constant_set(i, default_constants[i][0], &value);
+            mp_set_from_string(default_registers[i][1], 10, &value);
+            register_set_name(i, default_registers[i][0]);
+            register_set_value(i, &value);
         }
     }
     
@@ -126,48 +115,36 @@ void register_init()
 
 
 void
-register_set(int index, MPNumber *value)
+register_set_value(int index, MPNumber *value)
 {
     if ((index >= 0) && (index <= 10))
         mp_set_from_mp(value, &registers[index]);
 }
 
 
-void
-register_get(int index, MPNumber *value)
+const MPNumber *
+register_get_value(int index)
 {
     if ((index >= 0) && (index <= 10))
-        mp_set_from_mp(&registers[index], value);
+        return &registers[index];
+    else
+        return NULL;
 }
 
 
-void constant_set(int index, const char *name, MPNumber *value)
+void register_set_name(int index, const char *name)
 {
-    char key[MAXLINE], text[MAX_LOCALIZED];
-
-    STRNCPY(constant_names[index], name, MAXLINE - 1);
-    mp_set_from_mp(value, &constant_values[index]);
-
-    SNPRINTF(key, MAXLINE, "constant%1dname", index);
+    char key[MAXLINE];
+    
+    STRNCPY(register_names[index], name, MAXLINE - 1);
+    SNPRINTF(key, MAXLINE, "register%1dname", index);
     set_resource(key, name);
-
-    /* NOTE: Constants are written out with no thousands separator and with a
-       radix character of ".". */
-    mp_cast_to_string(value, 10, MAX_DIGITS, 1, text, MAX_LOCALIZED);
-    SNPRINTF(key, MAXLINE, "constant%1dvalue", index);
-    set_resource(key, text);
-}
-
-
-const char *constant_get_name(int index)
-{
-    return constant_names[index];
 }
 
 
-const MPNumber *constant_get_value(int index)
+const char *register_get_name(int index)
 {
-    return &constant_values[index];
+    return register_names[index];
 }
 
 
diff --git a/src/register.h b/src/register.h
index f157599..14aae63 100644
--- a/src/register.h
+++ b/src/register.h
@@ -25,12 +25,10 @@
 #include "mp.h"
 
 void register_init();
-void register_set(int index, MPNumber *value);
-void register_get(int index, MPNumber *value);
-
-void constant_set(int index, const char *name, MPNumber *value);
-const char *constant_get_name(int index);
-const MPNumber *constant_get_value(int index);
+void register_set_value(int index, MPNumber *value);
+void register_set_name(int index, const char *name);
+const MPNumber *register_get_value(int index);
+const char *register_get_name(int index);
 
 void function_set(int index, const char *name, const char *value);
 const char *function_get_name(int index);
diff --git a/src/ui.h b/src/ui.h
index ce22e75..f84e105 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -38,7 +38,6 @@ void ui_init(int *argc, char ***argv);
 void ui_load(void);
 void ui_start(void);
 
-void ui_make_registers(void);
 void ui_set_undo_enabled(gboolean, gboolean);
 
 void ui_set_display(char *, int);
@@ -48,9 +47,9 @@ gchar *ui_get_display(void);
 void ui_set_registers_visible(gboolean);
 void ui_set_accuracy(int);
 void ui_set_mode(ModeType);
-void ui_set_base(BaseType);
+void ui_set_base(int);
 void ui_set_trigonometric_mode(MPAngleUnit unit);
-void ui_set_numeric_mode(BaseType);
+void ui_set_numeric_mode(DisplayFormat mode);
 void ui_set_show_thousands_separator(gboolean);
 void ui_set_show_trailing_zeroes(gboolean);
 void ui_set_wordlen(int);
diff --git a/src/unittest.c b/src/unittest.c
index 58278e0..a3f3f56 100644
--- a/src/unittest.c
+++ b/src/unittest.c
@@ -73,7 +73,7 @@ test(char *expression, char *expected, int expected_error)
     error = mp_equation_parse(expression, &result);
 
     if(error == 0) {
-        mp_cast_to_string(&result, basevals[v->base], 9, 1, result_str, MAXLINE);
+        mp_cast_to_string(&result, v->base, 9, 1, result_str, MAXLINE);
         if(expected_error != 0)
             fail("'%s' -> %s, expected error %d", expression, result_str, expected_error);
         else if(strcmp(result_str, expected) != 0)
@@ -93,7 +93,7 @@ test(char *expression, char *expected, int expected_error)
 void
 test_parser()
 {
-    v->base = DEC;
+    v->base = 10;
     v->ttype = MP_DEGREES;
     v->wordlen = 32;
     v->accuracy = 9;
@@ -108,9 +108,7 @@ test_parser()
     test("1.00", "1", 0);
     test("1.01", "1.01", 0);
     test("Ï?", "3.141592654", 0);
-    test("1e3", "1000", 0);
-    test("1e+3", "1000", 0);
-    test("1e-3", "0.001", 0);
+    test("e", "2.718281828", 0);    
 
     test("0+0", "0", 0);
     test("1+1", "2", 0);
@@ -130,6 +128,9 @@ test_parser()
     test("â??2Ã?3", "â??6", 0);
     test("2Ã?â??3", "â??6", 0);
     test("â??2Ã?â??3", "6", 0);
+    
+    test("2Ã?10^3", "2000", 0);
+    test("2Ã?10^â??3", "0.002", 0);
 
     test("6/3", "2", 0);
     test("6÷3", "2", 0);
@@ -221,7 +222,7 @@ test_parser()
     test("ln 0", "", -20001);
     test("ln 1", "0", 0);
     test("ln 2", "0.693147181", 0);
-    test("ln e^1", "1", 0);
+    test("ln e", "1", 0);
     test("2 ln 2", "1.386294361", 0);
 
     v->ttype = MP_DEGREES;
@@ -254,10 +255,10 @@ test_parser()
     test("sinâ?»Â¹ (1÷â??2)", "45", 0);
 
     test("cosh 0", "1", 0);
-    test("cosh 10 â?? (e^(10)+e^(â??10))÷2", "0", 0);
+    test("cosh 10 â?? (e^10 + e^â??10)÷2", "0", 0);
 
     test("sinh 0", "0", 0);
-    test("sinh 10 â?? (e^(10)â??e^(â??10))÷2", "0", 0);
+    test("sinh 10 â?? (e^10 â?? e^â??10)÷2", "0", 0);
     test("sinh â??10 + sinh 10", "0", 0);
 
     test("(cosh â??5)² â?? (sinh â??5)²", "1", 0);
@@ -276,7 +277,7 @@ test_parser()
     v->ttype = MP_GRADIANS;
     test("sin 100", "1", 0);
 
-    v->base = HEX;
+    v->base = 16;
     test("3 And 5", "1", 0);
     test("3 Or 5", "7", 0);
     test("3 Xor 5", "6", 0);



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