[gcalctool/gcalctool-newui] Redesigning the UI...



commit e26003c5892c829ca55909a7fdf3be9567e9c4ab
Author: Robert Ancell <robert ancell gmail com>
Date:   Fri May 29 16:09:56 2009 +0200

    Redesigning the UI...
---
 data/gcalctool.ui | 2642 ++++++++++++++++++++---------------------------------
 src/display.c     |   75 ++-
 src/display.h     |    2 +-
 src/functions.c   |   59 +--
 src/gtk.c         | 1079 ++++------------------
 src/ui.h          |    4 +-
 6 files changed, 1252 insertions(+), 2609 deletions(-)

diff --git a/data/gcalctool.ui b/data/gcalctool.ui
index b4ef03b..57cb9a9 100644
--- a/data/gcalctool.ui
+++ b/data/gcalctool.ui
@@ -7,11 +7,9 @@
     <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">
+      <object class="GtkVBox" id="main_vbox">
         <property name="visible">True</property>
         <property name="spacing">6</property>
         <child>
@@ -26,6 +24,82 @@
                 <child type="submenu">
                   <object class="GtkMenu" id="menuitem1_menu">
                     <child>
+                      <object class="GtkMenuItem" id="menuitem9">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Angle Units</property>
+                        <property name="use_underline">True</property>
+                        <child type="submenu">
+                          <object class="GtkMenu" id="menu1">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkRadioMenuItem" id="menuitem10">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Degrees</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_as_radio">True</property>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkRadioMenuItem" id="menuitem11">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Radians</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_as_radio">True</property>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkRadioMenuItem" id="menuitem12">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Gradians</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_as_radio">True</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkMenuItem" id="menuitem13">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Word Size</property>
+                        <property name="use_underline">True</property>
+                        <child type="submenu">
+                          <object class="GtkMenu" id="menu2">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkMenuItem" id="menuitem14">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">64 bit</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkMenuItem" id="menuitem15">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">32 bit</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkMenuItem" id="menuitem16">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">16 bit</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkMenuItem" id="menuitem17">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">8 bit</property>
+                                <property name="use_underline">True</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child>
                       <object class="GtkImageMenuItem" id="quit_menu">
                         <property name="label">gtk-quit</property>
                         <property name="visible">True</property>
@@ -145,59 +219,88 @@
                       </object>
                     </child>
                     <child>
-                      <object class="GtkRadioMenuItem" id="view_advanced_menu">
+                      <object class="GtkRadioMenuItem" id="view_financial_menu">
                         <property name="visible">True</property>
-                        <property name="tooltip_text" translatable="yes">Advanced</property>
-                        <property name="label" translatable="yes" comments="View|Advanced menu item">_Advanced</property>
+                        <property name="tooltip_text" translatable="yes">Financial</property>
+                        <property name="label" translatable="yes" comments="View|Financial menu item">_Financial</property>
                         <property name="use_underline">True</property>
                         <property name="group">view_basic_menu</property>
-                        <accelerator key="A" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                        <accelerator key="F" 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="mode_radio_cb"/>
                       </object>
                     </child>
                     <child>
-                      <object class="GtkRadioMenuItem" id="view_financial_menu">
+                      <object class="GtkRadioMenuItem" id="view_programming_menu">
                         <property name="visible">True</property>
-                        <property name="tooltip_text" translatable="yes">Financial</property>
-                        <property name="label" translatable="yes" comments="View|Financial menu item">_Financial</property>
+                        <property name="tooltip_text" translatable="yes">Programming</property>
+                        <property name="label" translatable="yes" comments="View|Programming menu item">_Programming</property>
                         <property name="use_underline">True</property>
                         <property name="group">view_basic_menu</property>
-                        <accelerator key="F" signal="activate" modifiers="GDK_CONTROL_MASK"/>
+                        <accelerator key="P" 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="mode_radio_cb"/>
                       </object>
                     </child>
                     <child>
-                      <object class="GtkRadioMenuItem" id="view_scientific_menu">
+                      <object class="GtkSeparatorMenuItem" id="separator1">
                         <property name="visible">True</property>
-                        <property name="tooltip_text" translatable="yes">Scientific</property>
-                        <property name="label" translatable="yes" comments="View|Scientific menu item">_Scientific</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkRadioMenuItem" id="menuitem6">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Fixed Point</property>
                         <property name="use_underline">True</property>
-                        <property name="group">view_basic_menu</property>
-                        <accelerator key="S" 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="mode_radio_cb"/>
+                        <property name="draw_as_radio">True</property>
                       </object>
                     </child>
                     <child>
-                      <object class="GtkRadioMenuItem" id="view_programming_menu">
+                      <object class="GtkRadioMenuItem" id="menuitem7">
                         <property name="visible">True</property>
-                        <property name="tooltip_text" translatable="yes">Programming</property>
-                        <property name="label" translatable="yes" comments="View|Programming menu item">_Programming</property>
+                        <property name="label" translatable="yes">Scientific</property>
                         <property name="use_underline">True</property>
-                        <property name="group">view_basic_menu</property>
-                        <accelerator key="P" 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="mode_radio_cb"/>
+                        <property name="draw_as_radio">True</property>
                       </object>
                     </child>
                     <child>
-                      <object class="GtkSeparatorMenuItem" id="separator1">
+                      <object class="GtkRadioMenuItem" id="menuitem8">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Engineering</property>
+                        <property name="use_underline">True</property>
+                        <property name="draw_as_radio">True</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkSeparatorMenuItem" id="menuitem2">
+                        <property name="visible">True</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkMenuItem" id="menuitem19">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Decimal</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkMenuItem" id="menuitem20">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Hexadecimal</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkMenuItem" id="menuitem21">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Binary</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkSeparatorMenuItem" id="menuitem18">
                         <property name="visible">True</property>
                       </object>
                     </child>
@@ -292,396 +395,62 @@
           </packing>
         </child>
         <child>
-          <object class="GtkEventBox" id="display_eventbox">
+          <object class="GtkScrolledWindow" id="history_scroll">
             <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hscrollbar_policy">automatic</property>
+            <property name="vscrollbar_policy">automatic</property>
             <child>
-              <object class="GtkScrolledWindow" id="display_scroll">
+              <object class="GtkViewport" id="viewport1">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hscrollbar_policy">automatic</property>
-                <property name="vscrollbar_policy">never</property>
+                <property name="resize_mode">queue</property>
                 <child>
-                  <object class="GtkTextView" id="displayitem">
+                  <object class="GtkVBox" id="history_vbox">
                     <property name="visible">True</property>
-                    <property name="border_width">2</property>
-                    <property name="pixels_above_lines">8</property>
-                    <property name="pixels_below_lines">8</property>
-                    <property name="editable">False</property>
-                    <property name="justification">right</property>
-                    <property name="right_margin">6</property>
-                    <property name="buffer">textbuffer1</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="displayitem-atkobject">
-                        <property name="AtkObject::accessible-description" translatable="yes">Result Region</property>
-                      </object>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <placeholder/>
                     </child>
-                    <signal name="populate_popup" handler="buffer_populate_popup_cb"/>
-                    <signal name="button_release_event" handler="mouse_button_cb"/>
                   </object>
                 </child>
               </object>
             </child>
           </object>
           <packing>
-            <property name="expand">False</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
-          <object class="GtkHBox" id="programming_mode_panel">
+          <object class="GtkViewport" id="viewport2">
             <property name="visible">True</property>
+            <property name="resize_mode">queue</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">
+              <object class="GtkTextView" id="equation_entry">
                 <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>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <property name="is_focus">True</property>
+                <property name="accepts_tab">False</property>
+                <signal name="key_press_event" handler="equation_entry_key_press_event_cb"/>
               </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="fill">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>
@@ -872,12 +641,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">
@@ -889,35 +680,16 @@
                 <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="expand">False</property>
+            <property name="position">3</property>
           </packing>
         </child>
         <child>
@@ -2715,41 +2487,151 @@
           </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">
+          <object class="GtkTable" id="programming_panel">
             <property name="visible">True</property>
             <property name="border_width">6</property>
             <property name="n_rows">2</property>
-            <property name="n_columns">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_d_button">
+                <property name="label" translatable="yes" comments="Hexadecimal digit D button">D</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_text" translatable="yes">Hexadecimal digit D [d]</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <signal name="clicked" handler="button_cb"/>
+              </object>
+              <packing>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_e_button">
+                <property name="label" translatable="yes" comments="Hexadecimal digit E button">E</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">User-defined functions [F]</property>
+                <property name="tooltip_text" translatable="yes">Hexadecimal digit E [e]</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <signal name="clicked" handler="button_cb"/>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_f_button">
+                <property name="label" translatable="yes" comments="Hexadecimal digit F button">F</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_text" translatable="yes">Hexadecimal digit F [f]</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <signal name="clicked" handler="button_cb"/>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_a_button">
+                <property name="label" translatable="yes" comments="Hexadecimal digit A button">A</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_text" translatable="yes">Hexadecimal digit A [a]</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <signal name="clicked" handler="button_cb"/>
+              </object>
+              <packing>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_b_button">
+                <property name="label" translatable="yes" comments="Hexadecimal digit B button">B</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_text" translatable="yes">Hexadecimal digit B [b]</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <signal name="clicked" handler="button_cb"/>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_c_button">
+                <property name="label" translatable="yes" comments="Hexadecimal digit C button">C</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_text" translatable="yes">Hexadecimal digit C [c]</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <signal name="clicked" handler="button_cb"/>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_shift_right_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
                 <property name="focus_on_click">False</property>
                 <signal name="clicked" handler="button_cb"/>
                 <child>
-                  <object class="GtkHBox" id="hbox13">
+                  <object class="GtkHBox" id="hbox10">
                     <property name="visible">True</property>
                     <property name="spacing">3</property>
                     <child>
-                      <object class="GtkLabel" id="label9">
+                      <object class="GtkLabel" id="label6">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes" comments="Functions button">Fun</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes" comments="Shift right button">&gt;</property>
                       </object>
                       <packing>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkArrow" id="arrow7">
+                      <object class="GtkArrow" id="arrow4">
                         <property name="visible">True</property>
                         <property name="arrow_type">down</property>
                       </object>
@@ -2762,37 +2644,35 @@
                 </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">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_constants_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">Constants [#]</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="hbox12">
+                  <object class="GtkHBox" id="hbox11">
                     <property name="visible">True</property>
                     <property name="spacing">3</property>
                     <child>
-                      <object class="GtkLabel" id="label8">
+                      <object class="GtkLabel" id="label7">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes" comments="Constants button">Con</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes" comments="Shift left button">&lt;</property>
                       </object>
                       <packing>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkArrow" id="arrow6">
+                      <object class="GtkArrow" id="arrow5">
                         <property name="visible">True</property>
                         <property name="arrow_type">down</property>
                       </object>
@@ -2805,6 +2685,25 @@
                 </child>
               </object>
               <packing>
+                <property name="left_attach">8</property>
+                <property name="right_attach">9</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_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">True</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <signal name="clicked" handler="button_cb"/>
+              </object>
+              <packing>
+                <property name="left_attach">8</property>
+                <property name="right_attach">9</property>
                 <property name="top_attach">1</property>
                 <property name="bottom_attach">2</property>
                 <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
@@ -2812,87 +2711,73 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="calc_natural_logarithm_button">
+              <object class="GtkButton" id="calc_2s_button">
+                <property name="label" translatable="yes" comments="2's complement">2'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">(Ln)</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"/>
-                <child>
-                  <object class="GtkLabel" id="natural_logarithm_label">
-                    <property name="visible">True</property>
-                    <property name="label" comments="Variable label button - text set inside gtk.c">(Ln)</property>
-                    <property name="use_markup">True</property>
-                  </object>
-                </child>
               </object>
               <packing>
+                <property name="left_attach">9</property>
+                <property name="right_attach">10</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
                 <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                 <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="calc_logarithm_button">
+              <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">(Log)</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"/>
-                <child>
-                  <object class="GtkLabel" id="logarithm_label">
-                    <property name="visible">True</property>
-                    <property name="label" comments="Varable label button - text set inside gtk.c">(Log)</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">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_logarithm2_button">
+              <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">False</property>
-                <property name="tooltip_text" translatable="yes">(Log2)</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"/>
-                <child>
-                  <object class="GtkLabel" id="logarithm2_label">
-                    <property name="visible">True</property>
-                    <property name="label" comments="Variable function button - text set inside gtk.c">(Log2)</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">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_exponential_button">
-                <property name="label" translatable="yes" comments="Exponential">Exp</property>
+              <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">False</property>
-                <property name="tooltip_text" translatable="yes">Enter an exponential number [E]</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">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>
@@ -2900,53 +2785,28 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="calc_accuracy_button">
+              <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">(Set accuracy from 0 to N numeric places [A])</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"/>
-                <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="left_attach">7</property>
-                <property name="right_attach">8</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_random_button">
-                <property name="label" translatable="yes" comments="Random number">Rand</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">Random number in the range 0.0 to 1.0 [?]</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"/>
@@ -2961,20 +2821,19 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="calc_factorial_button">
+              <object class="GtkButton" id="calc_fractional_portion_button">
+                <property name="label" translatable="yes" comments="Fractional 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">Factorial of displayed value [!]</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"/>
-                <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>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="calc_fractional_portion_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Fractional portion</property>
                   </object>
                 </child>
+                <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
                 <property name="left_attach">4</property>
@@ -2984,72 +2843,59 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="calc_x_pow_y_button">
+              <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">(X^Y)</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"/>
-                <child>
-                  <object class="GtkLabel" id="x_pow_y_label">
-                    <property name="visible">True</property>
-                    <property name="label" comments="Variable function button - text set inside gtk.c">(X^Y)</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="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_tangent_button">
+              <object class="GtkButton" id="calc_integer_portion_button">
+                <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">(Tan)</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"/>
-                <child>
-                  <object class="GtkLabel" id="tangent_label">
-                    <property name="visible">True</property>
-                    <property name="label" comments="Variable function button - text set inside gtk.c">(Tan)</property>
-                    <property name="use_markup">True</property>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="calc_integer_portion_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Integer portion</property>
                   </object>
                 </child>
+                <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
-                <property name="left_attach">5</property>
-                <property name="right_attach">6</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</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_sine_button">
+              <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">(Sin)</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"/>
-                <child>
-                  <object class="GtkLabel" id="sine_label">
-                    <property name="visible">True</property>
-                    <property name="label" comments="Variable function button - text set inside gtk.c">(Sin)</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">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>
@@ -3057,62 +2903,49 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="calc_cosine_button">
+              <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">(Cos)</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"/>
-                <child>
-                  <object class="GtkLabel" id="cosine_label">
-                    <property name="visible">True</property>
-                    <property name="label" comments="Variable function button - text set inside gtk.c">(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="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>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
           </object>
           <packing>
-            <property name="position">6</property>
+            <property name="expand">False</property>
+            <property name="position">5</property>
           </packing>
         </child>
         <child>
-          <object class="GtkTable" id="programming_panel">
+          <object class="GtkTable" id="core_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">4</property>
+            <property name="n_columns">10</property>
             <property name="column_spacing">6</property>
             <property name="row_spacing">6</property>
             <property name="homogeneous">True</property>
             <child>
-              <object class="GtkButton" id="calc_d_button">
-                <property name="label" translatable="yes" comments="Hexadecimal digit D button">D</property>
+              <object class="GtkButton" id="calc_4_button">
+                <property name="label" translatable="yes" comments="Numeric 4 button">4</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Hexadecimal digit D [d]</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_4_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Numeric 4</property>
+                  </object>
+                </child>
                 <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
@@ -3123,222 +2956,293 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="calc_e_button">
-                <property name="label" translatable="yes" comments="Hexadecimal digit E button">E</property>
+              <object class="GtkButton" id="calc_7_button">
+                <property name="label" translatable="yes" comments="Numeric 7 button">7</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Hexadecimal digit E [e]</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_7_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Numeric 7</property>
+                  </object>
+                </child>
                 <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="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_f_button">
-                <property name="label" translatable="yes" comments="Hexadecimal digit F button">F</property>
+              <object class="GtkButton" id="calc_8_button">
+                <property name="label" translatable="yes" comments="Numeric 8 button">8</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Hexadecimal digit F [f]</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_8_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Numeric 8</property>
+                  </object>
+                </child>
                 <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</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_a_button">
-                <property name="label" translatable="yes" comments="Hexadecimal digit A button">A</property>
+              <object class="GtkButton" id="calc_9_button">
+                <property name="label" translatable="yes" comments="Numeric 9 button">9</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Hexadecimal digit A [a]</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_9_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Numeric 9</property>
+                  </object>
+                </child>
                 <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
                 <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                 <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="calc_b_button">
-                <property name="label" translatable="yes" comments="Hexadecimal digit B button">B</property>
+              <object class="GtkButton" id="calc_5_button">
+                <property name="label" translatable="yes" comments="Numeric 5 button">5</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Hexadecimal digit B [b]</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_5_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Numeric 5</property>
+                  </object>
+                </child>
                 <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
                 <property name="left_attach">1</property>
                 <property name="right_attach">2</property>
-                <property name="top_attach">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_c_button">
-                <property name="label" translatable="yes" comments="Hexadecimal digit C button">C</property>
+              <object class="GtkButton" id="calc_6_button">
+                <property name="label" translatable="yes" comments="Numeric 6 button">6</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes">Hexadecimal digit C [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_6_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Numeric 6</property>
+                  </object>
+                </child>
                 <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
                 <property name="left_attach">2</property>
                 <property name="right_attach">3</property>
-                <property name="top_attach">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_1s_button">
-                <property name="label" translatable="yes" comments="1's complement">1's</property>
+              <object class="GtkButton" id="calc_divide_button">
+                <property name="label" translatable="yes" comments="Division button">&#xF7;</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="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_divide_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Divide</property>
+                  </object>
+                </child>
                 <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
+                <property name="left_attach">3</property>
+                <property name="right_attach">4</property>
                 <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                 <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
               </packing>
             </child>
             <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_1_button">
+                <property name="label" translatable="yes" comments="Numeric 1 button">1</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>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="calc_1_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Numeric 1</property>
+                  </object>
+                </child>
+                <signal name="clicked" handler="button_cb"/>
+              </object>
+              <packing>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_2_button">
+                <property name="label" translatable="yes" comments="Numeric 2 button">2</property>
+                <property name="visible">True</property>
+                <property name="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_2_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Numeric 2</property>
+                  </object>
+                </child>
                 <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
                 <property name="left_attach">1</property>
                 <property name="right_attach">2</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
                 <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                 <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
               </packing>
             </child>
             <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_0_button">
+                <property name="label" translatable="yes" comments="Numeric 0 button">0</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>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="calc_0_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Numeric 0</property>
+                  </object>
+                </child>
                 <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
-                <property name="left_attach">4</property>
-                <property name="right_attach">5</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
+                <property name="top_attach">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_modulus_divide_button">
-                <property name="label" translatable="yes" comments="Modulus division button">Mod</property>
+              <object class="GtkButton" id="calc_numeric_point_button">
+                <property name="label" comments="Label is set in gtk.c to comply with LC flags">.</property>
                 <property name="visible">True</property>
                 <property name="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>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="calc_numeric_point_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Numeric point</property>
+                  </object>
+                </child>
                 <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
-                <property name="left_attach">5</property>
-                <property name="right_attach">6</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
+                <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_trunc_button">
-                <property name="label" translatable="yes" comments="Truncate displayed value">Trunc</property>
+              <object class="GtkButton" id="calc_result_button">
+                <property name="label" translatable="yes" comments="Solve button (clicking this solves the displayed calculation)">=</property>
                 <property name="visible">True</property>
                 <property name="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"/>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="calc_result_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Calculate result</property>
+                  </object>
+                </child>
+                <signal name="clicked" handler="solve_cb"/>
               </object>
               <packing>
                 <property name="left_attach">2</property>
                 <property name="right_attach">3</property>
+                <property name="top_attach">3</property>
+                <property name="bottom_attach">4</property>
                 <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                 <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="calc_not_button">
-                <property name="label" translatable="yes" comments="Boolean NOT button">NOT</property>
+              <object class="GtkButton" id="calc_3_button">
+                <property name="label" translatable="yes" comments="Numeric 3 button">3</property>
                 <property name="visible">True</property>
                 <property name="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>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="calc_3_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Numeric 3</property>
+                  </object>
+                </child>
                 <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
-                <property name="left_attach">5</property>
-                <property name="right_attach">6</property>
+                <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_xor_button">
-                <property name="label" translatable="yes" comments="Boolean exlcusive OR button">XOR</property>
+              <object class="GtkButton" id="calc_multiply_button">
+                <property name="label" translatable="yes" comments="Multiplication button">&#xD7;</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>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="calc_multiply_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Multiply</property>
+                    <property name="AtkObject::accessible-description" translatable="yes">Multiply</property>
+                  </object>
+                </child>
                 <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
@@ -3351,32 +3255,67 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="calc_and_button">
-                <property name="label" translatable="yes" comments="Boolean AND button">AND</property>
+              <object class="GtkButton" id="calc_subtract_button">
+                <property name="label" translatable="yes" comments="Subtraction button">&#x2212;</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="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_subtract_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Subtract</property>
+                    <property name="AtkObject::accessible-description" translatable="yes">Subtract [-]</property>
+                  </object>
+                </child>
                 <signal name="clicked" handler="button_cb"/>
               </object>
               <packing>
                 <property name="left_attach">3</property>
                 <property name="right_attach">4</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
                 <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                 <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="calc_or_button">
-                <property name="label" translatable="yes" comments="Boolean OR button">OR</property>
+              <object class="GtkButton" id="calc_add_button">
+                <property name="label" translatable="yes" comments="Addition button">+</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>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="calc_add_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Add</property>
+                  </object>
+                </child>
+                <signal name="clicked" handler="button_cb"/>
+              </object>
+              <packing>
+                <property name="left_attach">3</property>
+                <property name="right_attach">4</property>
+                <property name="top_attach">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>
@@ -3387,1131 +3326,499 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="calc_shift_left_button">
+              <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">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="use_underline">True</property>
                 <property name="focus_on_click">False</property>
-                <signal name="clicked" handler="button_cb"/>
-                <child>
-                  <object class="GtkHBox" id="hbox11">
-                    <property name="visible">True</property>
-                    <property name="spacing">3</property>
-                    <child>
-                      <object class="GtkLabel" id="label7">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="label" translatable="yes" comments="Shift left button">&lt;</property>
-                      </object>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkArrow" id="arrow5">
-                        <property name="visible">True</property>
-                        <property name="arrow_type">down</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
+                <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">3</property>
-                <property name="right_attach">4</property>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
+                <property name="left_attach">5</property>
+                <property name="right_attach">6</property>
                 <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                 <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="calc_shift_right_button">
+              <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">Shift displayed value 1-15 places to the right [&gt;]</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"/>
-                <child>
-                  <object class="GtkHBox" id="hbox10">
-                    <property name="visible">True</property>
-                    <property name="spacing">3</property>
-                    <child>
-                      <object class="GtkLabel" id="label6">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="label" translatable="yes" comments="Shift right button">&gt;</property>
-                      </object>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkArrow" id="arrow4">
-                        <property name="visible">True</property>
-                        <property name="arrow_type">down</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="calc_sqrt_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Root</property>
+                    <property name="AtkObject::accessible-description" translatable="yes">Root [Ctrl-R]</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="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/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-          </object>
-          <packing>
-            <property name="position">7</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkTable" id="table4">
-            <property name="visible">True</property>
-            <property name="border_width">6</property>
-            <property name="n_rows">5</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="GtkButton" id="calc_x_pow_y_button">
                 <property name="visible">True</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_backspace_simple_button">
-                    <property name="label" translatable="yes" comments="Backspace button. 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_simple_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Backspace</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
-                  </object>
-                  <packing>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="calc_change_sign_simple_button">
-                    <property name="label" translatable="yes" comments="Change sign button">&#xB1;</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="use_underline">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>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
-                  </object>
-                  <packing>
-                    <property name="left_attach">3</property>
-                    <property name="right_attach">4</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="calc_clear_simple_button">
-                    <property name="label" translatable="yes" comments="Clear 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_simple_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Clear</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="focus_on_click">False</property>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="calc_x_pow_y_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Square</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
+                <signal name="clicked" handler="button_cb"/>
                 <child>
-                  <object class="GtkButton" id="calc_clear_entry_simple_button">
-                    <property name="label" translatable="yes" comments="Clear displayed value button">CE</property>
+                  <object class="GtkLabel" id="label24">
                     <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="use_underline">True</property>
-                    <property name="focus_on_click">False</property>
+                    <property name="label" translatable="yes" comments="x to the power of 2 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="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 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>
-                    <signal name="clicked" handler="button_cb"/>
                   </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
               </object>
               <packing>
+                <property name="left_attach">5</property>
+                <property name="right_attach">6</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
                 <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                 <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
               </packing>
             </child>
             <child>
-              <object class="GtkTable" id="advanced_panel">
+              <object class="GtkButton" id="calc_percentage_button">
+                <property name="label" translatable="yes" comments="The percentage button">%</property>
                 <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>
-                    <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="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="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">
-                    <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="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">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes" comments="Reciprocal button">1/&lt;i&gt;x&lt;/i&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>
-                    <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="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="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_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">False</property>
-                    <property name="tooltip_text" translatable="yes">End group of calculations [)]</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="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>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="calc_change_sign_advanced_button">
-                    <property name="label" translatable="yes" comments="Change sign button">&#xB1;</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="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="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>
-                    <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="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>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
-                </child>
-                <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="use_underline">True</property>
-                    <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_abs_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Absolute value</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
-                  </object>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="calc_fractional_portion_button">
-                    <property name="label" translatable="yes" comments="Fractional 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">Fractional portion of displayed value [:]</property>
-                    <property name="use_underline">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>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
-                  </object>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="calc_integer_portion_button">
-                    <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="use_underline">True</property>
-                    <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_integer_portion_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Integer portion</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
+                <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_percentage_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Percentage</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
-                <child>
-                  <object class="GtkButton" id="calc_clear_entry_advanced_button">
-                    <property name="label" translatable="yes" comments="Clear displayed value button">CE</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="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>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
+                <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>
+            <child>
+              <object class="GtkButton" id="calc_abs_button">
+                <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_abs_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Absolute value</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
+                <signal name="clicked" handler="button_cb"/>
                 <child>
-                  <object class="GtkButton" id="calc_exchange_button">
+                  <object class="GtkLabel" id="label1">
                     <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="focus_on_click">False</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>
-                    </child>
+                    <property name="label" translatable="yes" comments="Absolute value button">|&lt;i&gt;x&lt;/i&gt;|</property>
+                    <property name="use_markup">True</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">3</property>
-                    <property name="right_attach">4</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
-                <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">5</property>
+                <property name="right_attach">6</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_inverse_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 internal-child="accessible">
+                  <object class="AtkObject" id="calc_inverse_button-atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Inverse</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">3</property>
-                    <property name="right_attach">4</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
+                <signal name="clicked" handler="inverse_cb"/>
                 <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>
+                  <object class="GtkLabel" id="label20">
                     <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>
+                    <property name="label" translatable="yes" comments="Inverse button">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;-1&lt;/sup&gt;</property>
+                    <property name="use_markup">True</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_clear_advanced_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Clear</property>
+                      <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>
-                    <signal name="clicked" handler="button_cb"/>
                   </object>
-                  <packing>
-                    <property name="left_attach">3</property>
-                    <property name="right_attach">4</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
+              </object>
+              <packing>
+                <property name="left_attach">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_factorial_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="GtkButton" id="calc_store_button">
+                  <object class="GtkLabel" id="label14">
                     <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>
+                    <property name="label" translatable="yes" comments="Factorial">&lt;i&gt;x&lt;/i&gt;!</property>
+                    <property name="use_markup">True</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">3</property>
-                    <property name="right_attach">4</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
+              </object>
+              <packing>
+                <property name="left_attach">5</property>
+                <property name="right_attach">6</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_natural_logarithm_button">
+                <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"/>
                 <child>
-                  <object class="GtkButton" id="calc_square_button">
+                  <object class="GtkLabel" id="natural_logarithm_label">
                     <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>
+                    <property name="label" comments="Variable label button - text set inside gtk.c">ln</property>
+                    <property name="use_markup">True</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
               </object>
               <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
+                <property name="left_attach">6</property>
+                <property name="right_attach">7</property>
                 <property name="top_attach">1</property>
-                <property name="bottom_attach">5</property>
+                <property name="bottom_attach">2</property>
                 <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
                 <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
               </packing>
             </child>
             <child>
-              <object class="GtkTable" id="core_panel">
+              <object class="GtkButton" id="calc_logarithm_button">
                 <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_4_button">
-                    <property name="label" translatable="yes" comments="Numeric 4 button">4</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="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_4_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 4</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
-                  </object>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="calc_7_button">
-                    <property name="label" translatable="yes" comments="Numeric 7 button">7</property>
-                    <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="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_7_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 7</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
-                  </object>
-                  <packing>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="calc_8_button">
-                    <property name="label" translatable="yes" comments="Numeric 8 button">8</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="use_underline">True</property>
-                    <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_8_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 8</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="calc_9_button">
-                    <property name="label" translatable="yes" comments="Numeric 9 button">9</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="use_underline">True</property>
-                    <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_9_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 9</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
-                  </object>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkButton" id="calc_5_button">
-                    <property name="label" translatable="yes" comments="Numeric 5 button">5</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="use_underline">True</property>
-                    <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_5_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 5</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
-                </child>
+                <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="GtkButton" id="calc_6_button">
-                    <property name="label" translatable="yes" comments="Numeric 6 button">6</property>
+                  <object class="GtkLabel" id="logarithm_label">
                     <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="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_6_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 6</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
+                    <property name="label" comments="Varable label button - text set inside gtk.c">log&lt;sub&gt;10&lt;/sub&gt;</property>
+                    <property name="use_markup">True</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
+              </object>
+              <packing>
+                <property name="left_attach">6</property>
+                <property name="right_attach">7</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_sine_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="GtkButton" id="calc_divide_button">
-                    <property name="label" translatable="yes" comments="Division button">&#xF7;</property>
+                  <object class="GtkLabel" id="sine_label">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Divide [/]</property>
-                    <property name="use_underline">True</property>
-                    <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_divide_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Divide</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
+                    <property name="label" comments="Variable function button - text set inside gtk.c">sin</property>
+                    <property name="use_markup">True</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">3</property>
-                    <property name="right_attach">4</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
+              </object>
+              <packing>
+                <property name="left_attach">8</property>
+                <property name="right_attach">9</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_cosine_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="GtkButton" id="calc_1_button">
-                    <property name="label" translatable="yes" comments="Numeric 1 button">1</property>
+                  <object class="GtkLabel" id="cosine_label">
                     <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="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_1_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 1</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
+                    <property name="label" comments="Variable function button - text set inside gtk.c">cos</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_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
+              </object>
+              <packing>
+                <property name="left_attach">8</property>
+                <property name="right_attach">9</property>
+                <property name="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_tangent_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="GtkButton" id="calc_2_button">
-                    <property name="label" translatable="yes" comments="Numeric 2 button">2</property>
+                  <object class="GtkLabel" id="tangent_label">
                     <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="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_2_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 2</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
+                    <property name="label" comments="Variable function button - text set inside gtk.c">tan</property>
+                    <property name="use_markup">True</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
+              </object>
+              <packing>
+                <property name="left_attach">8</property>
+                <property name="right_attach">9</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_x_pow_y_reciprocal_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="GtkButton" id="calc_0_button">
-                    <property name="label" translatable="yes" comments="Numeric 0 button">0</property>
+                  <object class="GtkLabel" id="x_pow_y_reciprocal_label">
                     <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="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_0_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 0</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
+                    <property name="label" comments="Variable function button - text set inside gtk.c">&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;1/&lt;i&gt;y&lt;/i&gt;&lt;/sup&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_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
+              </object>
+              <packing>
+                <property name="left_attach">6</property>
+                <property name="right_attach">7</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_exponential_button">
+                <property name="label" translatable="yes" comments="Exponential">Exp</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_underline">True</property>
+                <property name="focus_on_click">False</property>
+                <signal name="clicked" handler="button_cb"/>
+              </object>
+              <packing>
+                <property name="left_attach">8</property>
+                <property name="right_attach">9</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_logarithm2_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="GtkButton" id="calc_numeric_point_button">
-                    <property name="label" comments="Label is set in gtk.c to comply with LC flags">.</property>
+                  <object class="GtkLabel" id="logarithm2_label">
                     <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="use_underline">True</property>
-                    <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_numeric_point_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric point</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
+                    <property name="label" comments="Variable function button - text set inside gtk.c">log&lt;sub&gt;2&lt;/sub&gt;</property>
+                    <property name="use_markup">True</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
+              </object>
+              <packing>
+                <property name="left_attach">6</property>
+                <property name="right_attach">7</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_eulers_button">
+                <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"/>
                 <child>
-                  <object class="GtkButton" id="calc_result_button">
-                    <property name="label" translatable="yes" comments="Solve button (clicking this solves the displayed calculation)">=</property>
+                  <object class="GtkLabel" id="eulers_label">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Calculate result [=]</property>
-                    <property name="use_underline">True</property>
-                    <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_result_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Calculate result</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
+                    <property name="label" comments="Variable label button - text set inside gtk.c">&lt;i&gt;e&lt;/i&gt;</property>
+                    <property name="use_markup">True</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
+              </object>
+              <packing>
+                <property name="left_attach">7</property>
+                <property name="right_attach">8</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_pi_button">
+                <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"/>
                 <child>
-                  <object class="GtkButton" id="calc_3_button">
-                    <property name="label" translatable="yes" comments="Numeric 3 button">3</property>
+                  <object class="GtkLabel" id="pi_label">
                     <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="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_3_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Numeric 3</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
+                    <property name="label" comments="Variable label button - text set inside gtk.c">&#x3C0;</property>
+                    <property name="use_markup">True</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
+              </object>
+              <packing>
+                <property name="left_attach">7</property>
+                <property name="right_attach">8</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_sinh_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="GtkButton" id="calc_multiply_button">
-                    <property name="label" translatable="yes" comments="Multiplication button">&#xD7;</property>
+                  <object class="GtkLabel" id="sine_label1">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Multiply [*]</property>
-                    <property name="use_underline">True</property>
-                    <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_multiply_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Multiply</property>
-                        <property name="AtkObject::accessible-description" translatable="yes">Multiply</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
+                    <property name="label" comments="Variable function button - text set inside gtk.c">sinh</property>
+                    <property name="use_markup">True</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">3</property>
-                    <property name="right_attach">4</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
+              </object>
+              <packing>
+                <property name="left_attach">9</property>
+                <property name="right_attach">10</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_cosh_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="GtkButton" id="calc_subtract_button">
-                    <property name="label" translatable="yes" comments="Subtraction button">&#x2212;</property>
+                  <object class="GtkLabel" id="cosine_label1">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Subtract [-]</property>
-                    <property name="use_underline">True</property>
-                    <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_subtract_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Subtract</property>
-                        <property name="AtkObject::accessible-description" translatable="yes">Subtract [-]</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
+                    <property name="label" comments="Variable function button - text set inside gtk.c">cosh</property>
+                    <property name="use_markup">True</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">3</property>
-                    <property name="right_attach">4</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
+              </object>
+              <packing>
+                <property name="left_attach">9</property>
+                <property name="right_attach">10</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="calc_tanh_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="GtkButton" id="calc_add_button">
-                    <property name="label" translatable="yes" comments="Addition button">+</property>
+                  <object class="GtkLabel" id="tangent_label1">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Add [+]</property>
-                    <property name="use_underline">True</property>
-                    <property name="focus_on_click">False</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="calc_add_button-atkobject">
-                        <property name="AtkObject::accessible-name" translatable="yes">Add</property>
-                      </object>
-                    </child>
-                    <signal name="clicked" handler="button_cb"/>
+                    <property name="label" comments="Variable function button - text set inside gtk.c">tanh</property>
+                    <property name="use_markup">True</property>
                   </object>
-                  <packing>
-                    <property name="left_attach">3</property>
-                    <property name="right_attach">4</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                  </packing>
                 </child>
               </object>
               <packing>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">5</property>
+                <property name="left_attach">9</property>
+                <property name="right_attach">10</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>
@@ -4519,9 +3826,16 @@
             <child>
               <placeholder/>
             </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
           </object>
           <packing>
-            <property name="position">8</property>
+            <property name="expand">False</property>
+            <property name="position">6</property>
           </packing>
         </child>
         <child>
@@ -4541,7 +3855,7 @@
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="position">9</property>
+            <property name="position">7</property>
           </packing>
         </child>
       </object>
diff --git a/src/display.c b/src/display.c
index 1dbbc1d..df4a9ca 100644
--- a/src/display.c
+++ b/src/display.c
@@ -430,12 +430,13 @@ display_is_undo_step(GCDisplay *display)
 void
 display_insert(GCDisplay *display, int cursor, const char *text)
 {
-    char buf[MAX_DISPLAY], *currentText;
+    char buf[MAX_DISPLAY];
+    const gchar *currentText;
     
     if (cursor < 0) {
         SNPRINTF(buf, MAX_DISPLAY, "%s%s", display_get_text(display), text);
     } else {
-        currentText = ui_get_display();
+        currentText = display_get_text(display);
         SNPRINTF(buf, MAX_DISPLAY, "%.*s%s%s", cursor, currentText, text, currentText + cursor);
         cursor += strlen(text);
     }
@@ -466,7 +467,7 @@ display_insert_number_at_cursor(GCDisplay *display, const MPNumber *value)
 void
 display_backspace(GCDisplay *display)
 {
-    char buf[MAX_DISPLAY] = "", buf2[MAX_DISPLAY], *t;
+    char buf[MAX_DISPLAY] = "", buf2[MAX_DISPLAY];
     GCDisplayState *e = get_state(display);
     int i, cursor;
     MPNumber MP_reg;
@@ -494,7 +495,8 @@ display_backspace(GCDisplay *display)
 
         SNPRINTF(buf, MAX_DISPLAY, "%.*s", strlen(e->expression) - 1, e->expression);
     } else if (cursor > 0) {
-        t = ui_get_display();
+        const gchar *t;
+        t = display_get_text(display);
         SNPRINTF(buf, MAX_DISPLAY, "%.*s%s", cursor - 1, t, t + cursor);
     } else {
         return; /* At the start of the line */
@@ -506,11 +508,12 @@ display_backspace(GCDisplay *display)
 void
 display_delete(GCDisplay *display)
 {
-    char buf[MAX_DISPLAY] = "", *text;
     int cursor = display_get_cursor(display);    
     
     if (cursor >= 0) {
-        text = ui_get_display();
+        char buf[MAX_DISPLAY] = "";
+        const gchar *text;
+        text = display_get_text(display);
         SNPRINTF(buf, MAX_DISPLAY, "%.*s%s", cursor, text, text + cursor + 1);
         display_set_string(display, buf, cursor);
     }
@@ -625,15 +628,67 @@ void display_set_format(GCDisplay *display, DisplayFormat type)
 
 
 int
-display_solve(GCDisplay *display, MPNumber *result)
+display_solve(GCDisplay *display)
 {
     const char *text;
-    int errorCode;
+    int error;
+    MPNumber result;
+    const char *message = NULL;
+    char result_text[MAXLINE];
 
     text = display_get_text(display);
-    errorCode = mp_equation_parse(text, result);
+    error = mp_equation_parse(text, &result);
+    
+    switch (error) {
+    case 0:
+        mp_set_from_mp(&result, display_get_answer(display));
+        mp_cast_to_string(display_get_answer(display), basevals[v->base], v->accuracy, !v->display.show_zeroes, result_text, MAXLINE);
+        ui_add_result(text, result_text);
+        break;
+        
+    case -PARSER_ERR_INVALID_BASE:
+        message = _("Invalid number for the current base");
+        break;
+        
+    case -PARSER_ERR_TOO_LONG_NUMBER:
+        message = _("Too long number");
+        break;
+        
+    case -PARSER_ERR_BITWISEOP:
+        /* Translators: Error displayed to user when they
+         * perform an invalid bitwise operation, e.g.
+         * 1 XOR -1 */
+        message = _("Invalid bitwise operation");
+        break;
+        
+    case -PARSER_ERR_MODULUSOP:
+        /* Translators: Error displayed to user when they
+         * perform an invalid modulus operation, e.g.
+         * 6 MOD 1.2 */
+        message = _("Invalid modulus operation");
+        break;
+        
+    case -PARSER_ERR_OVERFLOW:
+        /* Translators; Error displayd to user when they
+         * perform a bitwise operation on numbers greater
+         * than the current word */
+        message = _("Overflow. Try a bigger word size");
+        break;
+        
+    case -MPMATH_ERR:
+        message = v->math_error_text;
+        break;
+        
+    default:
+        /* Translators: Error displayed to user when they
+         * enter an invalid calculation */
+        message = _("Malformed expression");
+        break;
+    }
+    if (message)
+        ui_set_statusbar(message, "gtk-dialog-error");
     
-    return errorCode;
+    return error == 0;
 }
 
 
diff --git a/src/display.h b/src/display.h
index d956ff1..fc14e98 100644
--- a/src/display.h
+++ b/src/display.h
@@ -93,7 +93,7 @@ gboolean display_is_empty(GCDisplay *);
 gboolean display_is_result(GCDisplay *);
 gboolean display_is_usable_number(GCDisplay *display, MPNumber *);
 
-int display_solve(GCDisplay *display, MPNumber *);
+int display_solve(GCDisplay *display);
 
 void display_make_number(GCDisplay *display, char *target, int target_len, const MPNumber *MPnumber, int base, int ignoreError);
 
diff --git a/src/functions.c b/src/functions.c
index 15a4212..937a4fe 100644
--- a/src/functions.c
+++ b/src/functions.c
@@ -379,7 +379,6 @@ void
 do_expression(int function, int arg, int cursor)
 {
     char buf[MAXLINE];
-    MPNumber *ans;
     int enabled;
     guint64 bit_value;
     
@@ -399,7 +398,6 @@ do_expression(int function, int arg, int cursor)
     display_push(&v->display);
 
     display_set_cursor(&v->display, cursor);
-    ans = display_get_answer(&v->display);
 
     ui_set_statusbar("", "");
 
@@ -415,7 +413,7 @@ do_expression(int function, int arg, int cursor)
         case FN_CLEAR_ENTRY:
             display_clear(&v->display);
             ui_set_error_state(FALSE);
-            mp_set_from_string("0", 10, ans);
+            mp_set_from_string("0", 10, display_get_answer(&v->display));
             break;
 
         case FN_SHIFT:
@@ -519,59 +517,8 @@ do_expression(int function, int arg, int cursor)
                 ;
                 
             /* Solve the equation */
-            } else {
-                MPNumber MPval;
-                int result;
-                const char *message = NULL;
-                
-                result = display_solve(&v->display, &MPval);
-                switch (result) {
-                    case 0:
-                        mp_set_from_mp(&MPval, ans);
-                        display_set_answer(&v->display);
-                        break;
-
-                    case -PARSER_ERR_INVALID_BASE:
-                        message = _("Invalid number for the current base");
-                        break;
-
-                    case -PARSER_ERR_TOO_LONG_NUMBER:
-                        message = _("Too long number");
-                        break;
-
-                    case -PARSER_ERR_BITWISEOP:
-                        /* Translators: Error displayed to user when they
-                         * perform an invalid bitwise operation, e.g.
-                         * 1 XOR -1 */
-                        message = _("Invalid bitwise operation");
-                        break;
-
-                    case -PARSER_ERR_MODULUSOP:
-                        /* Translators: Error displayed to user when they
-                         * perform an invalid modulus operation, e.g.
-                         * 6 MOD 1.2 */
-                        message = _("Invalid modulus operation");
-                        break;
-
-                    case -PARSER_ERR_OVERFLOW:
-                        /* Translators; Error displayd to user when they
-                         * perform a bitwise operation on numbers greater
-                         * than the current word */
-                       message = _("Overflow. Try a bigger word size");
-                       break;
-
-                    case -MPMATH_ERR:
-                        message = v->math_error_text;
-                        break;
-
-                    default:
-                        /* Translators: Error displayed to user when they
-                         * enter an invalid calculation */
-                        message = _("Malformed expression");
-                        break;
-                }
-                if (message)
-                    ui_set_statusbar(message, "gtk-dialog-error");
+            } else {               
+                display_solve(&v->display);
             }
             break;
 
diff --git a/src/gtk.c b/src/gtk.c
index 1515a3b..7ee643a 100644
--- a/src/gtk.c
+++ b/src/gtk.c
@@ -48,14 +48,6 @@
 static const char *mode_names[] = { "BASIC", "ADVANCED", "FINANCIAL",
                                     "SCIENTIFIC", "PROGRAMMING", NULL };
 
-#define MAX_ACCELERATORS 8
-struct button_widget {
-    int function;
-    char *widget_name;
-    guint accelerator_mods[MAX_ACCELERATORS];
-    guint accelerator_keys[MAX_ACCELERATORS];
-};
-
 /* Window titles dependant on mode */
 static char *titles[] = {
     /* Translators: The window title when in basic mode */
@@ -98,352 +90,43 @@ static char *finc_dialog_fields[FINC_NUM_DIALOGS][5] = {
     {"term_pmt",  "term_fv",     "term_pint",  NULL,         NULL},
 };
 
-/*  This table shows the keyboard values that are currently being used:
- *
- *           |  a b c d e f g h i j k l m n o p q r s t u v w x y z
- *-----------+-----------------------------------------------------
- *  Lower:   |  a b c d e f g h i j k l m n o p q r s t u v w x   z
- *  Upper:   |  A   C D E F G H I J K   M N O P Q R S T     W X Y Z
- *  Numeric: |  0 1 2 3 4 5 6 7 8 9
- *  Other:   |  @ . + - * / = % ( ) # < > [   { | & ~ ^ ? ! :
- *           |  BackSpace Delete Return
- *-----------+-----------------------------------------------------
- */
-    
-static struct button_widget button_widgets[] = {
-    {FN_0,                  "0",
-    { 0,     0,        0,             0 },
-    { GDK_0, GDK_KP_0, GDK_KP_Insert, 0 }},
-
-    {FN_1,                  "1",
-    { 0,     0,        0,          0,       0 },
-    { GDK_1, GDK_KP_1, GDK_KP_End, GDK_R13, 0 }},
-
-    {FN_2,                  "2",
-    { 0,     0,        0,           0 }, 
-    { GDK_2, GDK_KP_2, GDK_KP_Down, 0 }},
-
-    {FN_3,                  "3",
-    { 0,     0,        0,                0,       0 },
-    { GDK_3, GDK_KP_3, GDK_KP_Page_Down, GDK_R15, 0 }},
-
-    {FN_4,                  "4",
-    { 0,     0,        0,           0 },
-    { GDK_4, GDK_KP_4, GDK_KP_Left, 0 }},
-
-    {FN_5,                  "5",
-    { 0,     0,        0,            0,       0 },
-    { GDK_5, GDK_KP_5, GDK_KP_Begin, GDK_R11, 0 }},
-
-    {FN_6,                  "6",
-    { 0,     0,        0,            0 },
-    { GDK_6, GDK_KP_6, GDK_KP_Right, 0 }},
-
-    {FN_7,                  "7",
-    { 0,     0,        0,           0,      0 },
-    { GDK_7, GDK_KP_7, GDK_KP_Home, GDK_R7, 0 }},
-
-    {FN_8,                  "8",
-    { 0,     0,        0,         0 },
-    { GDK_8, GDK_KP_8, GDK_KP_Up, 0 }},
-
-    {FN_9,                  "9",
-    { 0,     0,        0,              0,      0 },
-    { GDK_9, GDK_KP_9, GDK_KP_Page_Up, GDK_R9, 0 }},
-
-    {FN_A,                  "a",
-    { 0,     0 },
-    { GDK_a, 0 }},
-
-    {FN_B,                  "b",
-    { 0,     0 },
-    { GDK_b, 0 }},
-
-    {FN_C,                  "c",
-    { 0,     0 },
-    { GDK_c, 0 }},
-
-    {FN_D,                  "d",
-    { 0,     0 },
-    { GDK_d, 0 }},
-
-    {FN_E,                  "e",
-    { 0,     0 },
-    { GDK_e, 0 }},
-
-    {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_SHIFT,              "shift_left",
-    { 0,        0 },
-    { GDK_less, 0 }},
-
-    {FN_SHIFT,              "shift_right",
-    { 0,           0 },
-    { GDK_greater, 0 }},
-
-    {FN_SET_ACCURACY,       "accuracy",
-    { 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 }},
-
-    {FN_RECALL,             "recall",
-    { 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 }},
-
-    {FN_CALCULATE,          "result",
-    { 0,         0,            0,          0 },
-    { GDK_equal, GDK_KP_Enter, GDK_Return, 0 }},
-
-    {FN_START_BLOCK,        "start_group",
-    { 0,             0 },
-    { GDK_parenleft, 0 }},
-
-    {FN_END_BLOCK,          "end_group",
-    { 0,              0 },
-    { GDK_parenright, 0 }},
-
-    {FN_ADD,                "add",
-    { 0,        0,          0 },
-    { GDK_plus, GDK_KP_Add, 0 }},
-
-    {FN_SUBTRACT,           "subtract",
-    { 0,         0,               0,      0 },
-    { GDK_minus, GDK_KP_Subtract, GDK_R4, 0 }},
-
-    {FN_MULTIPLY,           "multiply",
-    { 0,            0,            0,               0,      0 },
-    { GDK_asterisk, GDK_multiply, GDK_KP_Multiply, GDK_R6, 0 }},
-
-    {FN_DIVIDE,             "divide",
-    { 0,         0,            0,             0,      0 },
-    { GDK_slash, GDK_division, GDK_KP_Divide, GDK_R5, 0 }},
-
-    {FN_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",
-    { 0,     0 },
-    { GDK_s, 0 }},
-
-    {FN_RECIPROCAL,         "reciprocal",
-    { 0,     0 },
-    { GDK_r, 0 }},
-
-    {FN_ABSOLUTE_VALUE,     "abs",
-    { 0,     0 },
-    { GDK_u, 0 }},
-
-    {FN_TRUNC,              "trunc",
-    { 0,                0 },
-    { GDK_bracketleft, 0 }},
-
-    {FN_MODULUS_DIVIDE,     "modulus_divide",
-    { 0,     0 },
-    { GDK_M, 0 }},
-
-    {FN_1S_COMPLEMENT,      "1s",
-    { 0,     0 },
-    { GDK_z, 0 }},
-
-    {FN_2S_COMPLEMENT,      "2s",
-    { 0,     0 },
-    { GDK_Z, 0 }},
-
-    {FN_EXPONENTIAL,        "exponential",
-    { 0,     0 },
-    { GDK_E, 0 }},
-
-    {FN_FACTORIAL,          "factorial",
-    { 0,          0 },
-    { GDK_exclam, 0 }},
-
-    {FN_RANDOM,             "random",
-    { 0,            0 },
-    { GDK_question, 0 }},
-
-    {FN_NOT,                "not",
-    { 0,              0 },
-    { GDK_asciitilde, 0 }},
-
-    {FN_OR,                 "or",
-    { 0,       0 },
-    { GDK_bar, 0 }},
-
-    {FN_AND,                "and",
-    { 0,             0 },
-    { GDK_ampersand, 0 }},
-
-    {FN_XOR,                "xor",
-    { 0,     0 },
-    { GDK_x, 0 }},
-
-    {FN_XNOR,               "xnor",
-    { 0,     0 },
-    { GDK_braceleft, 0 }},
-
-    {FN_SIN,                "sine",
-    { 0,     0 },
-    { GDK_k, 0 }},
-
-    {FN_ASIN,                "sine",
-    { 0,     0 },
-    { GDK_K, 0 }},
-
-    {FN_COS,                 "cosine",
-    { 0,     0 },
-    { GDK_j, 0 }},
-
-    {FN_ACOS,                "cosine",
-    { 0,     0 },
-    { GDK_J, 0 }},
-
-    {FN_TAN,                 "tangent",
-    { 0,     0 },
-    { GDK_w, 0 }},
-
-    {FN_ATAN,                "tangent",
-    { 0,     0 },
-    { GDK_W, 0 }},
-
-    {FN_NATURAL_LOGARITHM,  "natural_logarithm",
-    { 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,     0 },
-    { GDK_m, 0 }},
-
-    {FN_FINC_DDB,           "finc_double_declining_depreciation",
-    { 0,     0 },
-    { GDK_D, 0 }},
-
-    {FN_FINC_FV,            "finc_future_value",
-    { 0,     0 },
-    { GDK_v, 0 }},
-
-    {FN_FINC_GPM,           "finc_gross_profit_margin",
-    { 0,     0 },
-    { GDK_I, 0 }},
-
-    {FN_FINC_PMT,           "finc_periodic_payment",
-    { 0,     0 },
-    { GDK_P, 0 }},
-
-    {FN_FINC_PV,            "finc_present_value",
-    { 0,     0 },
-    { GDK_p, 0 }},
-
-    {FN_FINC_RATE,          "finc_periodic_interest_rate",
-    { 0,     0 },
-    { GDK_T, 0 }},
-
-    {FN_FINC_SLN,           "finc_straight_line_depreciation",
-    { 0,     0 },
-    { GDK_l, 0 }},
-
-    {FN_FINC_SYD,           "finc_sum_of_the_years_digits_depreciation",
-    { 0,     0 },
-    { GDK_Y, 0 }},
-
-    {FN_FINC_TERM,          "finc_term",
-    { 0,     0 },
-    { GDK_t, 0 }}
+typedef struct {
+    const char *widget_name;
+    const char *text;
+} ButtonText;
+//{FN_RECIPROCAL,         "reciprocal", // Special case
+static ButtonText button_text[] = {
+    {"0", "0"}, {"1", "1"}, {"2", "2"}, {"3", "3"},
+    {"4", "4"}, {"5", "5"}, {"6", "6"}, {"7", "7"},
+    {"8", "8"}, {"9", "9"}, {"a", "A"}, {"b", "B"},
+    {"c", "C"}, {"d", "D"}, {"e", "E"}, {"f", "F"},
+    {"numeric_point", "."},
+    {"start_group", "("},
+    {"end_group", ")"},
+    {"add", "+"},
+    {"subtract", "â??"},
+    {"multiply", "Ã?"},
+    {"divide", "÷"},    
+    {"percentage", "%"},
+    {"root", "â??"},
+    {"abs", "|"},
+    {"modulus_divide", " mod "},
+    {"factorial", "!"},
+    {"and", " and "},
+    {"not", "not "},
+    {"or", " or "},
+    {"xor", " xor "},
+    {"xnor", " xnor "},
+    {"sine", " sin "},
+    {"cosine", " cos "},
+    {"tangent", " tan "},    
+    {"natural_logarithm", " ln "},
+    {"logarithm", " log "},
+    {"x_pow_y", "^"},
+    {"eulers", "e"},
+    {"pi", "Ï?"}
 };
-#define NBUTTONS (sizeof(button_widgets) / sizeof(struct button_widget))
+#define N_TEXT_BUTTONS (sizeof(button_text) / sizeof(ButtonText))
 
 #define UI_FILE PACKAGE_UI_DIR "/gcalctool.ui"
 
@@ -482,9 +165,9 @@ typedef struct {
     GtkWidget *ascii_dialog;
     GtkWidget *ascii_entry;
 
-    GtkWidget *display_item;           /* Calculator display. */
-    GtkTextBuffer *display_buffer;     /* Buffer used in display */
-    GtkWidget *scrolledwindow;         /* Scrolled window for display_item. */
+    GtkWidget *equation_view;
+    GtkTextBuffer *equation_buffer;
+    GtkWidget *history_vbox;    
 
     GtkWidget *register_dialog;
     GtkWidget *register_entries[MAX_REGISTERS];
@@ -492,17 +175,12 @@ typedef struct {
     GtkWidget *precision_dialog;
     GtkWidget *precision_spin;
 
-    GtkWidget *buttons[NBUTTONS];
     GtkWidget *digit_buttons[16];
     GtkWidget *clear_buttons[2];
 
     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];
@@ -511,18 +189,6 @@ typedef struct {
     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 *word_length_radios[3];             /* Wordlength radio buttons. */
-
     GdkAtom clipboard_atom;
     GdkAtom primary_atom;  
     char *shelf;                       /* PUT selection shelf contents. */   
@@ -641,6 +307,8 @@ ui_set_accuracy(int accuracy)
     GtkWidget *widget;
     char text[MAXLINE];
     
+    return;
+    
     /* Translators: Accuracy Popup: Menu item to show the accuracy dialog. %d is replaced with the current accuracy. */
     SNPRINTF(text, MAXLINE, _("_Other (%d) ..."), accuracy);
     widget = gtk_bin_get_child(GTK_BIN(GET_OBJECT("acc_item_other")));
@@ -668,171 +336,10 @@ ui_set_accuracy(int accuracy)
 }
 
 
-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 log [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 log [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 log [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]);
-}
-
-
 void
 ui_set_trigonometric_mode(MPAngleUnit units)
 {
-    GtkWidget *radio;
+    /*GtkWidget *radio;
     switch(units) {
     default:
     case MP_RADIANS:
@@ -845,14 +352,14 @@ ui_set_trigonometric_mode(MPAngleUnit units)
         radio = X.gradian_radio;
         break;
     }
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio), 1);
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio), 1);*/
 }
 
 
 void
 ui_set_numeric_mode(BaseType 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]), 1);*/
 }
 
 
@@ -930,23 +437,19 @@ make_hostname()
 }
 
 
-gchar *
-ui_get_display(void)
-{
-    GtkTextIter start, end;
-    gtk_text_buffer_get_bounds(X.display_buffer, &start, &end);
-    return gtk_text_buffer_get_text(X.display_buffer, &start, &end, FALSE);
-}
-
-
 static int
 get_cursor(void)
 {
     gint pos;
-    g_object_get(G_OBJECT(X.display_buffer), "cursor-position", &pos, NULL);
+    GtkTextMark *cursor;
+    GtkTextIter iter;
     
+    cursor = gtk_text_buffer_get_insert(X.equation_buffer);
+    gtk_text_buffer_get_iter_at_mark(X.equation_buffer, &iter, cursor);
+    pos = gtk_text_iter_get_offset(&iter);
+
     /* Convert the last position to -1 */
-    if (pos == gtk_text_buffer_get_char_count(X.display_buffer))
+    if (pos == gtk_text_buffer_get_char_count(X.equation_buffer))
         return -1;
     else
         return pos;
@@ -1011,12 +514,8 @@ ui_set_mode(ModeType 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.bas_panel), "visible", mode != PROGRAMMING, 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);
     gtk_widget_set_sensitive(GET_WIDGET("show_trailing_zeroes_menu"), mode == SCIENTIFIC || mode == PROGRAMMING);
@@ -1028,9 +527,6 @@ ui_set_mode(ModeType mode)
     gtk_widget_size_request(X.menubar, r);
     w = r->width;
     h = r->height;
-    gtk_widget_size_request(X.display_item, r);
-    w = MAX(w, r->width);
-    h += r->height;
 
     if (GTK_WIDGET_VISIBLE(X.fin_panel)) {
         gtk_widget_size_request(X.fin_panel, r);
@@ -1038,24 +534,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);
-        h += r->height;
-    }
-    
     if (GTK_WIDGET_VISIBLE(X.prog_panel)) {
         gtk_widget_size_request(X.prog_panel, r);
         w = MAX(w, r->width);
@@ -1121,61 +599,47 @@ ui_set_statusbar(const gchar *text, const gchar *imagename)
 }
 
 
-static gboolean
-redo_display(gpointer data)
+void
+ui_add_result(const char *equation, const char *result)
 {
-    gchar *text;
-    GtkTextIter start, end, cursor;
-    gint cursor_position;
-
-    gtk_text_buffer_get_start_iter(X.display_buffer, &start);
-    gtk_text_buffer_get_end_iter(X.display_buffer, &end);
-    text = gtk_text_buffer_get_text(X.display_buffer, &start, &end, FALSE);
+    GtkWidget *result_box, *equation_label, *result_label, *alignment;
+    gchar text[MAXLINE];
     
-    g_object_get(G_OBJECT(X.display_buffer), "cursor-position", &cursor_position, NULL);
-
-    gtk_text_buffer_set_text(X.display_buffer, text, -1);    
-    gtk_text_buffer_get_iter_at_offset(X.display_buffer, &cursor, cursor_position);
-    gtk_text_buffer_place_cursor(X.display_buffer, &cursor);
-
-    g_free(text);
+    result_box = gtk_vbox_new(FALSE, 3);
+
+    equation_label = gtk_label_new(equation);
+    gtk_misc_set_alignment(GTK_MISC(equation_label), 0.0, 0.5);
+
+    result_label = gtk_label_new("");
+    snprintf(text, MAXLINE, "<span size='large' weight='bold'>%s</span>", result);
+    gtk_label_set_markup(GTK_LABEL(result_label), text);
+    gtk_misc_set_alignment(GTK_MISC(result_label), 0.0, 0.5);
+    alignment = gtk_alignment_new(0.0, 0.0, 1.0, 1.0);
+    gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 0);
+    gtk_container_add(GTK_CONTAINER(alignment), result_label);
     
-    return FALSE;
+    gtk_box_pack_start(GTK_BOX(result_box), equation_label, FALSE, TRUE, 0);
+    gtk_box_pack_start(GTK_BOX(result_box), alignment, FALSE, TRUE, 0);    
+    
+    gtk_box_pack_start(GTK_BOX(X.history_vbox), result_box, FALSE, TRUE, 0);
+    
+    gtk_widget_show_all(result_box);
 }
 
 
 void
-ui_set_display(char *str, int cursor)
+ui_set_display(const char *text, int cursor)
 {
+    GString *pretty_text;
     GtkTextIter iter;
-    GtkAdjustment *adj;
-
-    // ???
-    if (str[0] == '\0')
-        str = " ";
-
-    gtk_text_buffer_set_text(X.display_buffer, str, -1);
     
-    if (cursor < 0)
-        gtk_text_buffer_get_end_iter(X.display_buffer, &iter);
-    else
-        gtk_text_buffer_get_iter_at_offset(X.display_buffer, &iter, cursor);
-    gtk_text_buffer_place_cursor(X.display_buffer, &iter);
-    gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(X.display_item), &iter, 0.0, TRUE, 1.0, 0.0);
-    
-    /* This is a workaround for bug #524602.
-     * Basically the above code can cause the display to disappear when going from
-     * a display that is wider than the widget to one that is thinner. The following
-     * causes the display to be set twice which seems to work the second time.
-     */
-    g_idle_add(redo_display, NULL);
-    
-    /* Align to the right */
-    if (cursor < 0) {
-        adj = gtk_scrolled_window_get_hadjustment(
-                 GTK_SCROLLED_WINDOW(X.scrolledwindow));
-        gtk_adjustment_set_value(adj, adj->upper - adj->page_size);
-    }
+    pretty_text = g_string_new(text);
+    //g_string_append(pretty_text, "e"); // FIXME: Insert with italic tag
+    gtk_text_buffer_set_text(X.equation_buffer, pretty_text->str, -1);
+    gtk_text_buffer_get_iter_at_offset(X.equation_buffer, &iter, cursor);
+    gtk_text_buffer_place_cursor(X.equation_buffer, &iter);
+
+    g_string_free(pretty_text, TRUE);
 }
 
 
@@ -1193,12 +657,12 @@ ui_set_display(char *str, int cursor)
 void
 ui_set_error_state(gboolean error)
 {
-    int i;
+    //int i;
 
     v->error = error;
 
-    for (i = 0; i < NBUTTONS; i++)
-        gtk_widget_set_sensitive(X.buttons[i], !v->error);
+    //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);
@@ -1206,9 +670,6 @@ ui_set_error_state(gboolean error)
     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);
@@ -1240,20 +701,20 @@ ui_beep()
 void
 ui_set_base(BaseType base)
 {
-    int i, baseval = basevals[(int) base];
+    /*int i, baseval = basevals[(int) base];
     
     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);
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(X.base_radios[base]), 1);*/
 }
 
 
 void
 ui_set_wordlen(int len)
 {
-    GtkWidget *widget;
+    /*GtkWidget *widget;
     v->wordlen = len;
     switch (len) {
         case 64:
@@ -1268,7 +729,7 @@ ui_set_wordlen(int len)
         default:
             return;
     }
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), 1);
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), 1);*/
 }
 
 
@@ -1926,12 +1387,15 @@ static void
 get_display()              /* The Copy function key has been pressed. */
 {
     gchar *string = NULL;
-    GtkTextIter start, end;
+    //GtkTextIter start, end;
+
+    // FIXME
+    return;
 
-    if (gtk_text_buffer_get_selection_bounds(X.display_buffer, &start, &end) == TRUE)
+    /*if (gtk_text_buffer_get_selection_bounds(X.display_buffer, &start, &end) == TRUE)
         string = gtk_text_buffer_get_text(X.display_buffer, &start, &end, FALSE);
     else
-        string = ui_get_display();
+        string = g_strdup(ui_get_display());*/
 
     if (X.shelf != NULL)
         free(X.shelf);
@@ -1967,14 +1431,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)))
@@ -1982,14 +1438,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)
@@ -2003,182 +1451,29 @@ menu_pos_func(GtkMenu *menu, gint *x, gint *y,
 
 G_MODULE_EXPORT
 void
-button_cb(GtkWidget *widget, GdkEventButton *event)
+button_cb(GtkWidget *widget)
 {
-    int function;
-    GtkWidget *menu;
-    GdkPoint loc;
-    char* dialog;
-    
-    function = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "calc_function"));
-    menu = (GtkWidget *)g_object_get_data(G_OBJECT(widget), "calc_menu");
-    dialog = g_object_get_data(G_OBJECT(widget), "finc_dialog");
-
-    if (menu == NULL && dialog == NULL) {
-        do_button(function, 0);
-    } else if (dialog != NULL) {
-        do_finc(dialog);
-    } else {
-        /* If gcalctool is being driven by gok, the on-screen keyboard 
-         * assistive technology, it's possible that the event returned by 
-         * gtk_get_current_event() is NULL. If this is the case, we need 
-         * to fudge the popping up on the menu associated with this menu 
-         * button.
-         */
-
-        update_constants_menu();
-        update_functions_menu();
-        update_memory_menus();
-
-        if (event == NULL) {
-            gdk_window_get_origin(widget->window, &loc.x, &loc.y);
-            loc.x += widget->allocation.x;
-            loc.y += widget->allocation.y;
-            gtk_menu_popup(GTK_MENU(menu), NULL, NULL, menu_pos_func,
-                           (gpointer) &loc, 0, gtk_get_current_event_time());
-        } else if (event->button == 1) {
-            gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
-                           event->button, event->time);
-        }
-    }
-}
-
-
-static void
-select_display_entry(int offset)
-{
-    GtkTextIter iter;
+    const gchar *text;
     
-    gtk_text_buffer_get_iter_at_offset(X.display_buffer, &iter, offset);
-    gtk_text_buffer_place_cursor(X.display_buffer, &iter);
-    gtk_widget_grab_focus(X.display_item);
+    text = (const gchar *)g_object_get_data(G_OBJECT(widget), "equation_text");
+    display_insert(&v->display, get_cursor(), text);
 }
 
 
 G_MODULE_EXPORT
-gboolean
-main_window_key_press_cb(GtkWidget *widget, GdkEventKey *event)
+void
+inverse_cb(GtkWidget *widget)
 {
-    int i, j, state;
-    GtkWidget *button;
-
-    /* Only look at the modifiers we use */
-    state = event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK);
-    
-    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)) {
-        switch (event->keyval) {
-            case GDK_0:
-                do_button(FN_SET_ACCURACY, 0);
-                return TRUE;
-            case GDK_1:
-                do_button(FN_SET_ACCURACY, 1);
-                return TRUE;
-            case GDK_2:
-                do_button(FN_SET_ACCURACY, 2);
-                return TRUE;
-            case GDK_3:
-                do_button(FN_SET_ACCURACY, 3);
-                return TRUE;
-            case GDK_4:
-                do_button(FN_SET_ACCURACY, 4);
-                return TRUE;
-            case GDK_5:
-                do_button(FN_SET_ACCURACY, 5);
-                return TRUE;
-            case GDK_6:
-                do_button(FN_SET_ACCURACY, 6);
-                return TRUE;
-            case GDK_7:
-                do_button(FN_SET_ACCURACY, 7);
-                return TRUE;
-            case GDK_8:
-                do_button(FN_SET_ACCURACY, 8);
-                return TRUE;
-            case GDK_9:
-                do_button(FN_SET_ACCURACY, 9);
-                return TRUE;
-        }
-    }
-    
-    /* Connect home and end keys to move into the display entry */
-    if (!gtk_widget_is_focus(X.display_item)) {
-        if (event->keyval == GDK_Home) { /* || event->keyval == GDK_Left) { */
-            select_display_entry(0);
-            return TRUE;
-        } else if (event->keyval == GDK_End) { /* || event->keyval == GDK_Right) { */
-            select_display_entry(-1);
-            return TRUE;
-        }
-    }
-    
-    /* Delete in display */
-    if (event->keyval == GDK_Delete && state == 0 && (event->state & GDK_SHIFT_MASK) == 0) {
-        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);
-        return TRUE;
-    }
-    
-    for (i = 0; i < NBUTTONS; i++) {
-        button = X.buttons[i];
-        
-        /* Check if function is available */
-        if (!GTK_WIDGET_IS_SENSITIVE(button))
-            continue;
-        
-        /* In basic mode only allow buttons that the user can see */
-        if (X.mode == BASIC &&
-            (!GTK_WIDGET_VISIBLE(gtk_widget_get_parent(button)) ||
-             !GTK_WIDGET_VISIBLE(button)))
-            continue;
-
-        // FIXME: This is a bit hacky - needs to be rethought
-        for (j = 0; button_widgets[i].accelerator_keys[j] != 0; j++) {
-            if (button_widgets[i].accelerator_keys[j] == event->keyval &&
-                (button_widgets[i].accelerator_mods[j] & ~GDK_SHIFT_MASK) == state) {
-                
-                // If we use shift for this shortcut then check it was in the original mask
-                if ((button_widgets[i].accelerator_mods[j] & GDK_SHIFT_MASK) &&
-                    !(event->state & GDK_SHIFT_MASK))
-                    continue;
-
-                // Hack if this is a multi-function button
-                if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(button), "calc_function")) !=
-                    button_widgets[i].function)
-                    do_button(button_widgets[i].function, 0);
-                else
-                   button_cb(button, NULL);
-                return TRUE;
-            }
-        }
-    }
-
-    return FALSE;
+    // FIXME: Do in display.c - invert sine operations
+    display_insert(&v->display, get_cursor(), "^-1");
 }
 
 
 G_MODULE_EXPORT
-gboolean
-main_window_key_release_cb(GtkWidget *widget, GdkEventKey *event)
+void
+solve_cb(GtkWidget *widget)
 {
-    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;
+    display_solve(&v->display);
 }
 
 
@@ -2188,7 +1483,7 @@ edit_cb(GtkWidget *widget)
 {
     gboolean can_paste, can_copy;
     
-    can_copy = gtk_text_buffer_get_has_selection(X.display_buffer);
+    can_copy = 0; //FIXME gtk_text_buffer_get_has_selection(X.display_buffer);
     can_paste = gtk_clipboard_wait_is_text_available(
                             gtk_clipboard_get(X.clipboard_atom));
     
@@ -2439,6 +1734,72 @@ edit_functions_cb(GtkMenuItem *item)
 }
 
 
+G_MODULE_EXPORT
+gboolean
+equation_entry_key_press_event_cb(GtkWidget *widget, GdkEventKey *event)
+{
+    printf("!!!%d %d '%s'\n", event->state, event->keyval, event->string);
+    
+    //Make display convert 2â??=2, 3â??=â?? 4â??=â??
+    //Make display trim multiple spaces
+    //Make display not allow spaces at start of equation
+    //Make display convert "sin (" to "sin("
+    
+    if(strcmp(event->string, "=") == 0)
+    {
+        display_solve(&v->display);
+        return TRUE;
+    }
+    
+    if(isprint(event->string[0]))
+    {
+        const gchar *text;
+        
+        text = event->string;
+        if(strcmp(event->string, "*") == 0)
+            text = "Ã?";
+        else if(strcmp(event->string, "/") == 0)
+            text = "÷";
+        else if(strcmp(event->string, "-") == 0)
+            text = "â??";
+        else if(strcmp(event->string, "u") == 0)
+            text = "µ"; // FIXME: Do inside display_insert when connected to a number
+
+        display_insert(&v->display, get_cursor(), text);
+        return TRUE;
+    }
+    
+    if(event->keyval == GDK_r && (event->state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) == GDK_CONTROL_MASK)
+    {
+        display_insert(&v->display, get_cursor(), "â??");
+        return TRUE;
+    }
+    
+    switch(event->keyval)
+    {
+    case GDK_equal:
+    case GDK_KP_Enter:
+    case GDK_Return:
+        display_solve(&v->display);
+        return TRUE;
+    case GDK_BackSpace:
+        if(event->state & GDK_CONTROL_MASK)
+            display_clear(&v->display);
+        else
+        {
+            display_set_cursor(&v->display, get_cursor());
+            display_backspace(&v->display);
+        }
+        return TRUE;
+    case GDK_Escape:
+        display_clear(&v->display);
+        return TRUE;
+    }
+
+    return FALSE;
+}
+
+
 static void
 set_win_position()
 {
@@ -2469,10 +1830,9 @@ create_main_window()
 {
     int i;
     char name[MAXLINE];
-    GtkWidget *widget;
-    PangoFontDescription *font_desc;
-    GtkSizeGroup *size_group;
-    GtkAccelGroup *accel_group;
+    //GtkWidget *widget;
+    //GtkSizeGroup *size_group;
+    //GtkAccelGroup *accel_group;
     GtkWidget *treeview;
     GError *error = NULL;
    
@@ -2509,33 +1869,15 @@ create_main_window()
     X.constants_dialog = GET_WIDGET("edit_constants_dialog");
     X.function_dialog  = GET_WIDGET("edit_functions_dialog");
     X.menubar          = GET_WIDGET("menubar");
-    X.scrolledwindow   = GET_WIDGET("display_scroll"),
-    X.display_item     = GET_WIDGET("displayitem"),
-    X.bas_panel        = GET_WIDGET("basic_panel");
-    X.sci_panel        = GET_WIDGET("scientific_panel");
+    X.equation_view    = GET_WIDGET("equation_entry");
+    X.equation_buffer  = gtk_text_view_get_buffer(GTK_TEXT_VIEW(X.equation_view));
+    X.history_vbox     = GET_WIDGET("history_vbox");
+    X.bas_panel        = GET_WIDGET("core_panel");
     X.prog_panel       = GET_WIDGET("programming_panel");
-    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.degree_radio     = GET_WIDGET("degrees_radio");
-    X.gradian_radio    = GET_WIDGET("gradians_radio");
-    X.radian_radio     = GET_WIDGET("radians_radio");
-    X.base_radios[0]   = GET_WIDGET("binary_radio");
-    X.base_radios[1]   = GET_WIDGET("octal_radio");
-    X.base_radios[2]   = GET_WIDGET("decimal_radio");
-    X.base_radios[3]   = GET_WIDGET("hexadecimal_radio");
-    X.display_mode_radios[0] = GET_WIDGET("engineering_radio");
-    X.display_mode_radios[1] = GET_WIDGET("fixed_point_radio");
-    X.display_mode_radios[2] = GET_WIDGET("scientific_radio");
-    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);
@@ -2547,24 +1889,24 @@ create_main_window()
     }
 
     /* Load buttons and set them all to be the same size */
-    size_group = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
-    for (i = 0; i < NBUTTONS; i++) {
-        SNPRINTF(name, MAXLINE, "calc_%s_button", 
-                 button_widgets[i].widget_name);
-        X.buttons[i] = GET_WIDGET(name);            
-        assert(X.buttons[i] != NULL);
+    //size_group = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
+    for (i = 0; i < N_TEXT_BUTTONS; i++) {
+        SNPRINTF(name, MAXLINE, "calc_%s_button",
+                 button_text[i].widget_name);
+        //X.buttons[i] = GET_WIDGET(name);
+        //assert(X.buttons[i] != NULL);
+        //gtk_size_group_add_widget(size_group, X.buttons[i]);
+        //g_object_set_data(G_OBJECT(X.buttons[i]), "equation_text", GINT_TO_POINTER(button_text[i].text));
         
-        gtk_size_group_add_widget(size_group, X.buttons[i]);
-        
-        g_object_set_data(G_OBJECT(X.buttons[i]), "calc_function", GINT_TO_POINTER(button_widgets[i].function));
+        g_object_set_data(GET_OBJECT(name), "equation_text", GINT_TO_POINTER(button_text[i].text));
     }
 
     /* Make popup buttons */
-    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_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"));
+    /*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);
@@ -2578,9 +1920,9 @@ create_main_window()
         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_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++) {
@@ -2598,7 +1940,7 @@ create_main_window()
         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));
-    }
+    }*/
 
     /* Load bit panel */
     for (i = 0; i < MAXBITS; i++) {
@@ -2616,9 +1958,7 @@ create_main_window()
     set_menubar_tooltip("undo_menu");
     set_menubar_tooltip("redo_menu");
     set_menubar_tooltip("view_basic_menu");
-    set_menubar_tooltip("view_advanced_menu");
     set_menubar_tooltip("view_financial_menu");
-    set_menubar_tooltip("view_scientific_menu");
     set_menubar_tooltip("show_trailing_zeroes_menu");
     set_menubar_tooltip("show_thousands_separator_menu");
     set_menubar_tooltip("show_registers_menu");
@@ -2671,20 +2011,10 @@ create_main_window()
     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);
-    pango_font_description_set_size(font_desc, 16 * PANGO_SCALE);
-    gtk_widget_modify_font(X.display_item, font_desc);
-    pango_font_description_free(font_desc);
-    gtk_widget_set_name(X.display_item, "displayitem");
-    atk_object_set_role(gtk_widget_get_accessible(X.display_item), 
-                                                  ATK_ROLE_EDITBAR);
-
     gtk_widget_realize(X.main_window);
     set_win_position();
 
-    g_object_set_data(G_OBJECT(X.radian_radio), "trig_mode", GINT_TO_POINTER(MP_RADIANS));
+    /*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++)
@@ -2694,30 +2024,28 @@ create_main_window()
     
     g_object_set_data(G_OBJECT(X.word_length_radios[0]), "wordlen_mode", GINT_TO_POINTER(64));
     g_object_set_data(G_OBJECT(X.word_length_radios[1]), "wordlen_mode", GINT_TO_POINTER(32));
-    g_object_set_data(G_OBJECT(X.word_length_radios[2]), "wordlen_mode", GINT_TO_POINTER(16));
+    g_object_set_data(G_OBJECT(X.word_length_radios[2]), "wordlen_mode", GINT_TO_POINTER(16));*/
 
     X.status_image = GET_WIDGET("status_image");
 
     /* Set modes for menu items */
-    for (i = 1; i < 16; i++) {
+    /*for (i = 1; i < 16; i++) {
         SNPRINTF(name, MAXLINE, "shift_left%d_menu", i);
         set_int_data(X.ui, name, "shiftcount", i);
         SNPRINTF(name, MAXLINE, "shift_right%d_menu", i);
         set_int_data(X.ui, name, "shiftcount", -i);
-    }
+    }*/
     set_int_data(X.ui, "view_basic_menu", "calcmode", BASIC);
-    set_int_data(X.ui, "view_advanced_menu", "calcmode", ADVANCED);
     set_int_data(X.ui, "view_financial_menu", "calcmode", FINANCIAL);
-    set_int_data(X.ui, "view_scientific_menu", "calcmode", SCIENTIFIC);
     set_int_data(X.ui, "view_programming_menu", "calcmode", PROGRAMMING);
 
     /* Make shortcuts for accuracy menus */
-    accel_group = gtk_accel_group_new();
+    /*accel_group = gtk_accel_group_new();
     gtk_window_add_accel_group(GTK_WINDOW(X.main_window), accel_group);
     for (i = 0; i < 10; i++) {
         SNPRINTF(name, MAXLINE, "acc_item%d", i);
         set_int_data(X.ui, name, "accuracy", i);
-    }
+    }*/
 
     /* Localize label for numeric point */
     gtk_button_set_label(GTK_BUTTON(GET_OBJECT("calc_numeric_point_button")), v->radix);
@@ -2781,7 +2109,6 @@ 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();
diff --git a/src/ui.h b/src/ui.h
index ce22e75..a531402 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -41,9 +41,9 @@ void ui_start(void);
 void ui_make_registers(void);
 void ui_set_undo_enabled(gboolean, gboolean);
 
-void ui_set_display(char *, int);
+void ui_add_result(const char *equation, const char *result);
+void ui_set_display(const char *, int);
 void ui_set_bitfield(int enabled, guint64 bits);
-gchar *ui_get_display(void);
 
 void ui_set_registers_visible(gboolean);
 void ui_set_accuracy(int);



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