[gnome-calculator] Use Actions in math-buttons.vala. Bug 771635.



commit ad3e9341b46c3bbb0b36aa154a2e203e06e7f303
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Mon Sep 19 15:16:26 2016 +0200

    Use Actions in math-buttons.vala. Bug 771635.
    
    Also replaces the deprecated xalign with halign in the UI files.
    
    Signed-off-by: Niels De Graef <nielsdegraef gmail com>

 data/buttons-advanced.ui    |  118 +++++++++
 data/buttons-basic.ui       |   52 ++++
 data/buttons-financial.ui   |  214 ++++++++++-------
 data/buttons-programming.ui |  527 +++++++++++++++++------------------------
 src/math-buttons.vala       |  553 +++++++++----------------------------------
 5 files changed, 624 insertions(+), 840 deletions(-)
---
diff --git a/data/buttons-advanced.ui b/data/buttons-advanced.ui
index ce6aeff..835c5b4 100644
--- a/data/buttons-advanced.ui
+++ b/data/buttons-advanced.ui
@@ -14,6 +14,9 @@
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Inverse [Ctrl+I]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'⁻¹'</property>
         <child internal-child="accessible">
           <object class="AtkObject" id="calc_inverse_button-atkobject">
             <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for the 
inverse button">Inverse</property>
@@ -41,6 +44,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Factorize [Ctrl+F]</property>
+        <property name="action_name">cal.factorize</property>
         <child internal-child="accessible">
           <object class="AtkObject" id="calc_factor_button-atkobject">
             <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for the 
factorize button">Factorize</property>
@@ -58,6 +63,9 @@
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Factorial [!]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'!'</property>
         <child internal-child="accessible">
           <object class="AtkObject" id="calc_factorial_button-atkobject">
             <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for the 
factorial button">Factorial</property>
@@ -84,6 +92,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Imaginary Component</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'Im '</property>
       </object>
       <packing>
         <property name="left_attach">7</property>
@@ -97,6 +108,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'i'</property>
         <child>
           <object class="GtkLabel" id="imaginary_label">
             <property name="visible">True</property>
@@ -118,6 +131,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">4</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -134,6 +149,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">7</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -151,6 +168,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">8</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -168,6 +187,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">9</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -185,6 +206,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">5</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -202,6 +225,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">6</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -219,6 +244,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Divide [/]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'÷'</property>
       </object>
       <packing>
         <property name="left_attach">3</property>
@@ -233,6 +261,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">1</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -250,6 +280,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">2</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -268,6 +300,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">0</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -285,6 +319,7 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-numeric-point</property>
         <style>
           <class name="numeric-point-button"/>
         </style>
@@ -302,6 +337,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">3</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -319,6 +356,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Multiply [*]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'×'</property>
       </object>
       <packing>
         <property name="left_attach">3</property>
@@ -333,6 +373,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Subtract [-]</property>
+        <property name="action_name">cal.subtract</property>
       </object>
       <packing>
         <property name="left_attach">3</property>
@@ -347,6 +389,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Add [+]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'+'</property>
       </object>
       <packing>
         <property name="left_attach">3</property>
@@ -361,6 +406,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Calculate Result</property>
+        <property name="action_name">cal.solve</property>
         <style>
           <class name="suggested-action"/>
         </style>
@@ -377,6 +424,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Clear Display [Escape]</property>
+        <property name="action_name">cal.clear</property>
         <child>
           <object class="GtkImage" id="image1">
             <property name="visible">True</property>
@@ -394,6 +443,9 @@
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Subscript mode [Alt]</property>
+        <property name="action_name">cal.set-number-mode</property>
+        <property name="action_target">'subscript'</property>
         <child internal-child="accessible">
           <object class="AtkObject" id="calc_subscript_button-atkobject">
             <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for the 
subscript mode button">Subscript</property>
@@ -418,6 +470,9 @@
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Superscript mode [Ctrl]</property>
+        <property name="action_name">cal.set-number-mode</property>
+        <property name="action_target">'superscript'</property>
         <child internal-child="accessible">
           <object class="AtkObject" id="calc_superscript_button-atkobject">
             <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for the 
superscript mode button">Superscript</property>
@@ -442,6 +497,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Scientific exponent [Ctrl+E]</property>
+        <property name="action_name">cal.insert-exponent</property>
         <child internal-child="accessible">
           <object class="AtkObject" id="calc_exponential_button-atkobject">
             <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for the 
scientific exponent button">Scientific Exponent</property>
@@ -467,6 +524,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Modulus divide</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">' mod '</property>
       </object>
       <packing>
         <property name="left_attach">3</property>
@@ -480,6 +540,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Start Group [(]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'('</property>
       </object>
       <packing>
         <property name="left_attach">4</property>
@@ -494,6 +557,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">End Group [)]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">')'</property>
       </object>
       <packing>
         <property name="left_attach">5</property>
@@ -506,6 +572,7 @@
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Memory</property>
         <child internal-child="accessible">
           <object class="AtkObject" id="calc_memory_button-atkobject">
             <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for the 
memory button">Memory</property>
@@ -552,6 +619,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Absolute Value [|]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'|'</property>
         <child internal-child="accessible">
           <object class="AtkObject" id="calc_abs_button-atkobject">
             <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for the 
absolute value button">Absolute Value</property>
@@ -578,6 +648,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Real Component</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'Re '</property>
       </object>
       <packing>
         <property name="left_attach">6</property>
@@ -592,6 +665,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Complex conjugate</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'conj '</property>
       </object>
       <packing>
         <property name="left_attach">8</property>
@@ -606,6 +682,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Complex argument</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'Arg '</property>
       </object>
       <packing>
         <property name="left_attach">9</property>
@@ -620,6 +699,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Natural Logarithm</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'ln '</property>
       </object>
       <packing>
         <property name="left_attach">9</property>
@@ -633,6 +715,9 @@
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Logarithm</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'log '</property>
       </object>
       <packing>
         <property name="left_attach">8</property>
@@ -645,6 +730,9 @@
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Exponent [^ or **]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'^'</property>
         <child internal-child="accessible">
           <object class="AtkObject" id="calc_x_pow_y_button-atkobject">
             <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for the 
exponentiation (x to the power of y) button">Exponent</property>
@@ -671,6 +759,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Root [Ctrl+R]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'√'</property>
       </object>
       <packing>
         <property name="left_attach">7</property>
@@ -684,6 +775,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Undo [Ctrl+Z]</property>
+        <property name="action_name">cal.undo</property>
         <child>
           <object class="GtkImage" id="image2">
             <property name="visible">True</property>
@@ -702,6 +795,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Pi [Ctrl+P]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'π'</property>
         <child>
           <object class="GtkLabel" id="pi_label">
             <property name="visible">True</property>
@@ -722,6 +818,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Euler’s Number</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'e'</property>
         <child>
           <object class="GtkLabel" id="eulers_number_label">
             <property name="visible">True</property>
@@ -749,6 +848,9 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Cosine</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'cos '</property>
           </object>
           <packing>
             <property name="left_attach">0</property>
@@ -761,6 +863,9 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Sine</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'sin '</property>
           </object>
           <packing>
             <property name="left_attach">1</property>
@@ -773,6 +878,9 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Tangent</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'tan '</property>
           </object>
           <packing>
             <property name="left_attach">2</property>
@@ -785,6 +893,9 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Hyperbolic Sine</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'sinh '</property>
           </object>
           <packing>
             <property name="left_attach">0</property>
@@ -798,6 +909,9 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Hyperbolic Cosine</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'cosh '</property>
           </object>
           <packing>
             <property name="left_attach">1</property>
@@ -811,6 +925,9 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Hyperbolic Tangent</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'tanh '</property>
           </object>
           <packing>
             <property name="left_attach">2</property>
@@ -831,6 +948,7 @@
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Additional Functions</property>
         <child internal-child="accessible">
           <object class="AtkObject" id="calc_function_button-atkobject">
             <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for the 
store value button">Store</property>
diff --git a/data/buttons-basic.ui b/data/buttons-basic.ui
index 570cd18..6a6aacf 100644
--- a/data/buttons-basic.ui
+++ b/data/buttons-basic.ui
@@ -16,6 +16,8 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">4</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -32,6 +34,8 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">7</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -49,6 +53,8 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">8</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -65,6 +71,8 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">9</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -81,6 +89,8 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">5</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -98,6 +108,8 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">6</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -115,6 +127,9 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Divide [/]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'÷'</property>
       </object>
       <packing>
         <property name="left_attach">3</property>
@@ -128,6 +143,8 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">1</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -145,6 +162,8 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">2</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -163,6 +182,8 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">0</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -180,6 +201,7 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-numeric-point</property>
         <style>
           <class name="numeric-point-button"/>
         </style>
@@ -197,6 +219,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Percentage [%]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'%'</property>
       </object>
       <packing>
         <property name="left_attach">2</property>
@@ -211,6 +236,8 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">3</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -228,6 +255,9 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Multiply [*]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'×'</property>
       </object>
       <packing>
         <property name="left_attach">3</property>
@@ -242,6 +272,8 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Subtract [-]</property>
+        <property name="action_name">cal.subtract</property>
       </object>
       <packing>
         <property name="left_attach">3</property>
@@ -256,6 +288,9 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Add [+]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'+'</property>
       </object>
       <packing>
         <property name="left_attach">3</property>
@@ -270,6 +305,8 @@
         <property name="receives_default">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Calculate Result</property>
+        <property name="action_name">cal.solve</property>
         <style>
           <class name="suggested-action"/>
         </style>
@@ -288,6 +325,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Start Group [(]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'('</property>
       </object>
       <packing>
         <property name="left_attach">4</property>
@@ -302,6 +342,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">End Group [)]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">')'</property>
       </object>
       <packing>
         <property name="left_attach">5</property>
@@ -315,6 +358,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Clear Display [Escape]</property>
+        <property name="action_name">cal.clear</property>
         <child>
           <object class="GtkImage" id="image2">
             <property name="visible">True</property>
@@ -334,6 +379,9 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Square root [Ctrl+R]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'√'</property>
       </object>
       <packing>
         <property name="left_attach">5</property>
@@ -346,6 +394,8 @@
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Square [Ctrl+2]</property>
+        <property name="action_name">cal.square</property>
         <child internal-child="accessible">
           <object class="AtkObject" id="calc_x_squared_button-atkobject">
             <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for the 
exponentiation (x to the power of y) button">Exponent</property>
@@ -371,6 +421,8 @@
         <property name="receives_default">True</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Undo [Ctrl+Z]</property>
+        <property name="action_name">cal.undo</property>
         <child>
           <object class="GtkImage" id="image1">
             <property name="visible">True</property>
diff --git a/data/buttons-financial.ui b/data/buttons-financial.ui
index b396fd7..e562ed5 100644
--- a/data/buttons-financial.ui
+++ b/data/buttons-financial.ui
@@ -24,7 +24,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -40,7 +39,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -115,7 +113,7 @@
               <object class="GtkLabel" id="label5">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Compounding Term Dialog: Label before 
present value input">Present _Value:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">ctrm_pv</property>
@@ -131,7 +129,7 @@
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Compounding Term Dialog: Label before 
periodic interest rate input">Periodic Interest _Rate:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">ctrm_pint</property>
@@ -161,7 +159,7 @@
               <object class="GtkLabel" id="label16">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Compounding Term Dialog: Label before 
future value input">_Future Value:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">ctrm_fv</property>
@@ -209,7 +207,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -225,7 +222,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -269,7 +265,7 @@
               <object class="GtkLabel" id="label8">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Double-Declining Depreciation Dialog: 
Label before cost input">C_ost:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">ddb_cost</property>
@@ -285,7 +281,7 @@
               <object class="GtkLabel" id="label10">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Double-Declining Depreciation Dialog: 
Label before life input">_Life:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">ddb_life</property>
@@ -331,7 +327,7 @@
               <object class="GtkLabel" id="label11">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Double-Declining Depreciation Dialog: 
Label before period input">_Period:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">ddb_period</property>
@@ -394,7 +390,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -410,7 +405,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -454,7 +448,7 @@
               <object class="GtkLabel" id="label13">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Future Value Dialog: Label before 
periodic payment input">_Periodic Payment:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">fv_pmt</property>
@@ -470,7 +464,7 @@
               <object class="GtkLabel" id="label14">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Future Value Dialog: Label before 
periodic interest rate input">Periodic Interest _Rate:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">fv_pint</property>
@@ -486,7 +480,7 @@
               <object class="GtkLabel" id="label15">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Future Value Dialog: Label before number 
of periods input">_Number of Periods:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">fv_n</property>
@@ -579,7 +573,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -595,7 +588,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -639,7 +631,7 @@
               <object class="GtkLabel" id="label48">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Gross Profit Margin Dialog: Label before 
cost input">C_ost:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">gpm_cost</property>
@@ -655,7 +647,7 @@
               <object class="GtkLabel" id="label49">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Gross Profit Margin Dialog: Label before 
margin input">_Margin:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">gpm_margin</property>
@@ -733,7 +725,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -749,7 +740,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -779,7 +769,7 @@
               <object class="GtkLabel" id="label17">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="width-chars">50</property>
                 <property name="label" translatable="yes" comments="Periodic Payment Dialog: Description of 
calculation">Calculates the amount of the periodic payment of a loan, where payments are made at the end of 
each payment period. </property>
                 <property name="wrap">True</property>
@@ -794,7 +784,7 @@
               <object class="GtkLabel" id="label18">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Periodic Payment Dialog: Label before 
principal input">_Principal:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">pmt_prin</property>
@@ -810,7 +800,7 @@
               <object class="GtkLabel" id="label19">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Periodic Payment Dialog: Label before 
periodic interest rate input">Periodic Interest _Rate:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">pmt_pint</property>
@@ -826,7 +816,7 @@
               <object class="GtkLabel" id="label21">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Periodic Payment Dialog: Label before 
term input">_Term:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">pmt_n</property>
@@ -919,7 +909,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -935,7 +924,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -965,7 +953,7 @@
               <object class="GtkLabel" id="label36">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="width-chars">50</property>
                 <property name="label" translatable="yes" comments="Present Value Dialog: Description of 
calculation">Calculates the present value of an investment based on a series of equal payments discounted at 
a periodic interest rate over the number of payment periods in the term. </property>
                 <property name="wrap">True</property>
@@ -980,7 +968,7 @@
               <object class="GtkLabel" id="label24">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Present Value Dialog: Label before 
periodic payment input">_Periodic Payment:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">pv_pmt</property>
@@ -996,7 +984,7 @@
               <object class="GtkLabel" id="label25">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Present Value Dialog: Label before 
periodic interest rate input">Periodic Interest _Rate:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">pv_pint</property>
@@ -1012,7 +1000,7 @@
               <object class="GtkLabel" id="label26">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Present Value Dialog: Label before 
number of periods input">_Number of Periods:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">pv_n</property>
@@ -1105,7 +1093,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -1121,7 +1108,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -1151,7 +1137,7 @@
               <object class="GtkLabel" id="label28">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="width-chars">50</property>
                 <property name="label" translatable="yes" comments="Periodic Interest Rate Dialog: 
Description of calculation">Calculates the periodic interest necessary to increase an investment to a future 
value, over the number of compounding periods. </property>
                 <property name="wrap">True</property>
@@ -1166,7 +1152,7 @@
               <object class="GtkLabel" id="label29">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Periodic Interest Rate Dialog: Label 
before future value input">_Future Value:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">rate_fv</property>
@@ -1182,7 +1168,7 @@
               <object class="GtkLabel" id="label30">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Periodic Interest Rate Dialog: Label 
before present value input">Present _Value:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">rate_pv</property>
@@ -1198,7 +1184,7 @@
               <object class="GtkLabel" id="label31">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Periodic Interest Rate Dialog: Label 
before term input">_Term:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">rate_n</property>
@@ -1291,7 +1277,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -1307,7 +1292,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -1337,7 +1321,7 @@
               <object class="GtkLabel" id="label33">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Straight-Line Depreciation Dialog: Label 
before cost input">_Cost:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">sln_cost</property>
@@ -1353,7 +1337,7 @@
               <object class="GtkLabel" id="label34">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Straight-Line Depreciation Dialog: Label 
before salvage input">_Salvage:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">sln_salvage</property>
@@ -1369,7 +1353,7 @@
               <object class="GtkLabel" id="label35">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Straight-Line Depreciation Dialog: Label 
before life input">_Life:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">sln_life</property>
@@ -1430,7 +1414,7 @@
               <object class="GtkLabel" id="label32">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="width-chars">50</property>
                 <property name="label" translatable="yes" comments="Straight-Line Depreciation Dialog: 
Description of calculation">Calculates the straight-line depreciation of an asset for one period. 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. </property>
                 <property name="wrap">True</property>
@@ -1477,7 +1461,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -1493,7 +1476,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -1523,7 +1505,7 @@
               <object class="GtkLabel" id="label37">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Sum-of-the-Years'-Digits Depreciation 
Dialog: Label before period input">_Period:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">syd_period</property>
@@ -1539,7 +1521,7 @@
               <object class="GtkLabel" id="label38">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Sum-of-the-Years'-Digits Depreciation 
Dialog: Label before life input">_Life:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">syd_life</property>
@@ -1555,7 +1537,7 @@
               <object class="GtkLabel" id="label39">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Sum-of-the-Years'-Digits Depreciation 
Dialog: Label before salvage input">_Salvage:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">syd_salvage</property>
@@ -1571,7 +1553,7 @@
               <object class="GtkLabel" id="label40">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Sum-of-the-Years'-Digits Depreciation 
Dialog: Label before cost input">_Cost:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">syd_cost</property>
@@ -1647,7 +1629,7 @@
               <object class="GtkLabel" id="label41">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="width-chars">50</property>
                 <property name="label" translatable="yes" comments="Sum-of-the-Years'-Digits Depreciation 
Dialog: Description of calculation">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 useful life 
is the number of periods, typically years, over which an asset is depreciated. </property>
                 <property name="wrap">True</property>
@@ -1694,7 +1676,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -1710,7 +1691,6 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -1785,7 +1765,7 @@
               <object class="GtkLabel" id="label43">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Payment Period Dialog: Label before 
periodic interest rate input">Periodic Interest _Rate:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">term_pint</property>
@@ -1801,7 +1781,7 @@
               <object class="GtkLabel" id="label44">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Payment Period Dialog: Label before 
future value input">Future _Value:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">term_fv</property>
@@ -1817,7 +1797,7 @@
               <object class="GtkLabel" id="label45">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label" translatable="yes" comments="Payment Period Dialog: Label before 
periodic payment input">_Periodic Payment:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">term_pmt</property>
@@ -1833,7 +1813,7 @@
               <object class="GtkLabel" id="label46">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="width-chars">50</property>
                 <property name="label" translatable="yes" comments="Payment Period Dialog: Description of 
calculation">Calculates the number of payment periods that are necessary during the term of an ordinary 
annuity, to accumulate a future value, at a periodic interest rate.</property>
                 <property name="wrap">True</property>
@@ -1870,8 +1850,8 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Memory</property>
         <child internal-child="accessible">
           <object class="AtkObject" id="calc_memory_button-atkobject">
             <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for the 
memory value button">Memory</property>
@@ -1924,8 +1904,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Logarithm</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'log '</property>
       </object>
       <packing>
         <property name="left_attach">6</property>
@@ -1938,9 +1920,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">4</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -1956,9 +1939,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">7</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -1974,9 +1958,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">8</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -1991,9 +1976,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">9</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -2008,9 +1994,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">5</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -2026,9 +2013,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">6</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -2044,9 +2032,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Divide [/]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'÷'</property>
       </object>
       <packing>
         <property name="left_attach">3</property>
@@ -2058,9 +2048,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">1</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -2076,9 +2067,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">2</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -2095,9 +2087,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">0</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -2113,9 +2106,9 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-numeric-point</property>
         <style>
           <class name="numeric-point-button"/>
         </style>
@@ -2131,9 +2124,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Percentage [%]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'%'</property>
       </object>
       <packing>
         <property name="left_attach">2</property>
@@ -2146,9 +2141,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="action_name">cal.insert-digit</property>
+        <property name="action_target">3</property>
         <style>
           <class name="number-button"/>
         </style>
@@ -2164,9 +2160,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Multiply [*]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'×'</property>
       </object>
       <packing>
         <property name="left_attach">3</property>
@@ -2179,9 +2177,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Subtract [-]</property>
+        <property name="action_name">cal.subtract</property>
       </object>
       <packing>
         <property name="left_attach">3</property>
@@ -2194,9 +2193,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Add [+]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'+'</property>
       </object>
       <packing>
         <property name="left_attach">3</property>
@@ -2209,9 +2210,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Calculate Result</property>
+        <property name="action_name">cal.solve</property>
         <style>
           <class name="suggested-action"/>
         </style>
@@ -2228,9 +2230,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Start Group [(]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'('</property>
       </object>
       <packing>
         <property name="left_attach">4</property>
@@ -2243,9 +2247,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">End Group [)]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">')'</property>
       </object>
       <packing>
         <property name="left_attach">5</property>
@@ -2257,9 +2263,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Clear Display [Escape]</property>
+        <property name="action_name">cal.clear</property>
         <child>
           <object class="GtkImage" id="image2">
             <property name="visible">True</property>
@@ -2278,9 +2285,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Compounding Term</property>
+        <property name="action_name">cal.launch-finc-dialog</property>
+        <property name="action_target">'ctrm_dialog'</property>
       </object>
       <packing>
         <property name="left_attach">7</property>
@@ -2292,9 +2301,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Double Declining Depreciation</property>
+        <property name="action_name">cal.launch-finc-dialog</property>
+        <property name="action_target">'ddb_dialog'</property>
       </object>
       <packing>
         <property name="left_attach">8</property>
@@ -2306,9 +2317,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Future Value</property>
+        <property name="action_name">cal.launch-finc-dialog</property>
+        <property name="action_target">'fv_dialog'</property>
       </object>
       <packing>
         <property name="left_attach">9</property>
@@ -2320,9 +2333,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Financial Term</property>
+        <property name="action_name">cal.launch-finc-dialog</property>
+        <property name="action_target">'term_dialog'</property>
       </object>
       <packing>
         <property name="left_attach">8</property>
@@ -2335,9 +2350,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Sum of the Years Digits Depreciation</property>
+        <property name="action_name">cal.launch-finc-dialog</property>
+        <property name="action_target">'syd_dialog'</property>
       </object>
       <packing>
         <property name="left_attach">9</property>
@@ -2350,9 +2367,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Straight Line Depreciation</property>
+        <property name="action_name">cal.launch-finc-dialog</property>
+        <property name="action_target">'sln_dialog'</property>
       </object>
       <packing>
         <property name="left_attach">8</property>
@@ -2365,9 +2384,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Periodic Interest Rate</property>
+        <property name="action_name">cal.launch-finc-dialog</property>
+        <property name="action_target">'rate_dialog'</property>
       </object>
       <packing>
         <property name="left_attach">7</property>
@@ -2380,9 +2401,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Present Value</property>
+        <property name="action_name">cal.launch-finc-dialog</property>
+        <property name="action_target">'pv_dialog'</property>
       </object>
       <packing>
         <property name="left_attach">9</property>
@@ -2395,9 +2418,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Periodic Payment</property>
+        <property name="action_name">cal.launch-finc-dialog</property>
+        <property name="action_target">'pmt_dialog'</property>
       </object>
       <packing>
         <property name="left_attach">8</property>
@@ -2410,9 +2435,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Gross Profit Margin</property>
+        <property name="action_name">cal.launch-finc-dialog</property>
+        <property name="action_target">'gpm_dialog'</property>
       </object>
       <packing>
         <property name="left_attach">7</property>
@@ -2424,9 +2451,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Undo [Ctrl+Z]</property>
+        <property name="action_name">cal.undo</property>
         <child>
           <object class="GtkImage" id="image1">
             <property name="visible">True</property>
@@ -2444,8 +2472,10 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Exponent [^ or **]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'^'</property>
         <child internal-child="accessible">
           <object class="AtkObject" id="calc_x_pow_y_button-atkobject">
             <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for the 
exponentiation (x to the power of y) button">Exponent</property>
@@ -2470,9 +2500,11 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
-        <property name="use_action_appearance">False</property>
         <property name="use_underline">True</property>
         <property name="focus_on_click">False</property>
+        <property name="tooltip_text" translatable="yes">Root [Ctrl+R]</property>
+        <property name="action_name">cal.insert-general</property>
+        <property name="action_target">'√'</property>
       </object>
       <packing>
         <property name="left_attach">6</property>
diff --git a/data/buttons-programming.ui b/data/buttons-programming.ui
index 73d9613..bb2c358 100644
--- a/data/buttons-programming.ui
+++ b/data/buttons-programming.ui
@@ -6,27 +6,29 @@
     <property name="visible">True</property>
     <property name="spacing">6</property>
     <child>
-      <object class="GtkHBox" id="hbox1">
+      <object class="GtkBox" id="hbox1">
         <property name="visible">True</property>
-        <property name="spacing">6</property>
+        <property name="orientation">horizontal</property>
         <child>
-          <object class="GtkComboBox" id="base_combo">
+          <object class="GtkComboBoxText" id="base_combo">
             <property name="visible">True</property>
             <property name="focus_on_click">False</property>
+            <items>
+              <item id="2" translatable="yes">Binary</item>
+              <item id="8" translatable="yes">Octal</item>
+              <item id="10" translatable="yes">Decimal</item>
+              <item id="16" translatable="yes">Hexadecimal</item>
+            </items>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">0</property>
-          </packing>
         </child>
         <child>
           <object class="GtkLabel" id="base_label">
             <property name="visible">True</property>
-            <property name="xalign">1</property>
+            <property name="halign">end</property>
             <property name="label" comments="Example content">FF₁₆ 256₁₀</property>
           </object>
           <packing>
-            <property name="position">1</property>
+            <property name="expand">True</property>
           </packing>
         </child>
       </object>
@@ -49,7 +51,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_1">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -64,7 +66,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_2">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -79,7 +81,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_3">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -94,7 +96,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_4">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -109,7 +111,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_5">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -124,7 +126,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_6">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -139,7 +141,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_7">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -154,7 +156,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_8">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -169,7 +171,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_9">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -184,7 +186,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_10">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -199,7 +201,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_11">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -214,7 +216,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_12">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -229,7 +231,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_13">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -244,7 +246,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_14">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -259,7 +261,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_15">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -274,7 +276,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_31">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -289,7 +291,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_30">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -304,7 +306,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_29">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -319,7 +321,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_28">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -334,7 +336,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_27">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -349,7 +351,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_26">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -364,7 +366,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_25">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -379,7 +381,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_24">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -394,7 +396,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_23">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -409,7 +411,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_22">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -424,7 +426,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_21">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -439,7 +441,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_20">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -454,7 +456,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_19">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -469,7 +471,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_18">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -484,7 +486,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_17">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -499,7 +501,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_16">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -511,7 +513,7 @@
             <child>
               <object class="GtkLabel" id="bit_marker_label0">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">63</property>
                 <property name="justify">center</property>
                 <style>
@@ -522,12 +524,13 @@
               <packing>
                 <property name="left_attach">0</property>
                 <property name="top_attach">1</property>
+                <property name="width">20</property>
               </packing>
             </child>
             <child>
               <object class="GtkLabel" id="bit_marker_label3">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">31</property>
                 <property name="justify">center</property>
                 <style>
@@ -538,12 +541,13 @@
               <packing>
                 <property name="left_attach">0</property>
                 <property name="top_attach">3</property>
+                <property name="width">20</property>
               </packing>
             </child>
             <child>
               <object class="GtkLabel" id="bit_marker_label2">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">32</property>
                 <property name="justify">center</property>
                 <style>
@@ -559,7 +563,7 @@
             <child>
               <object class="GtkLabel" id="bit_marker_label5">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label"> 0</property>
                 <property name="justify">center</property>
                 <style>
@@ -578,7 +582,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_32">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -594,7 +598,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_33">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -610,7 +614,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_34">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -626,7 +630,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_35">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -642,7 +646,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_36">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -658,7 +662,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_37">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -674,7 +678,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_38">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -690,7 +694,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_39">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -706,7 +710,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_40">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -722,7 +726,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_41">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -738,7 +742,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_42">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -754,7 +758,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_43">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -770,7 +774,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_44">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -786,7 +790,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_45">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -802,7 +806,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_46">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -818,7 +822,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_47">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -834,7 +838,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_48">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -850,7 +854,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_49">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -866,7 +870,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_50">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -882,7 +886,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_51">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -898,7 +902,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_52">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -914,7 +918,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_53">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -930,7 +934,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_54">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -946,7 +950,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_55">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -962,7 +966,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_56">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -978,7 +982,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_57">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -994,7 +998,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_58">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -1010,7 +1014,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_59">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -1026,7 +1030,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_60">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -1042,7 +1046,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_61">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -1058,7 +1062,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_62">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -1074,7 +1078,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_63">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -1087,7 +1091,7 @@
             <child>
               <object class="GtkLabel" id="bit_marker_label1">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">47</property>
                 <property name="justify">center</property>
                 <style>
@@ -1098,12 +1102,13 @@
               <packing>
                 <property name="left_attach">20</property>
                 <property name="top_attach">1</property>
+                <property name="width">18</property>
               </packing>
             </child>
             <child>
               <object class="GtkLabel" id="bit_marker_label4">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">15</property>
                 <property name="justify">center</property>
                 <style>
@@ -1114,12 +1119,13 @@
               <packing>
                 <property name="left_attach">20</property>
                 <property name="top_attach">3</property>
+                <property name="width">18</property>
               </packing>
             </child>
             <child>
               <object class="GtkLabel" id="label25">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">  </property>
               </object>
               <packing>
@@ -1129,7 +1135,7 @@
             <child>
               <object class="GtkLabel" id="label26">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">  </property>
               </object>
               <packing>
@@ -1139,7 +1145,7 @@
             <child>
               <object class="GtkLabel" id="label27">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">  </property>
               </object>
               <packing>
@@ -1149,7 +1155,7 @@
             <child>
               <object class="GtkLabel" id="label28">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">  </property>
               </object>
               <packing>
@@ -1159,7 +1165,7 @@
             <child>
               <object class="GtkLabel" id="label29">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">  </property>
               </object>
               <packing>
@@ -1169,7 +1175,7 @@
             <child>
               <object class="GtkLabel" id="label30">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">  </property>
               </object>
               <packing>
@@ -1179,7 +1185,7 @@
             <child>
               <object class="GtkLabel" id="label31">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">  </property>
               </object>
               <packing>
@@ -1189,7 +1195,7 @@
             <child>
               <object class="GtkLabel" id="label32">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">  </property>
               </object>
               <packing>
@@ -1200,7 +1206,7 @@
             <child>
               <object class="GtkLabel" id="label33">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">  </property>
               </object>
               <packing>
@@ -1211,7 +1217,7 @@
             <child>
               <object class="GtkLabel" id="label34">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">  </property>
               </object>
               <packing>
@@ -1222,7 +1228,7 @@
             <child>
               <object class="GtkLabel" id="label35">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">  </property>
               </object>
               <packing>
@@ -1233,7 +1239,7 @@
             <child>
               <object class="GtkLabel" id="label36">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">  </property>
               </object>
               <packing>
@@ -1244,7 +1250,7 @@
             <child>
               <object class="GtkLabel" id="label37">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">  </property>
               </object>
               <packing>
@@ -1255,7 +1261,7 @@
             <child>
               <object class="GtkLabel" id="label38">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
+                <property name="halign">start</property>
                 <property name="label">  </property>
               </object>
               <packing>
@@ -1269,7 +1275,7 @@
                 <child>
                   <object class="GtkLabel" id="bit_label_0">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label"> 0</property>
                   </object>
                 </child>
@@ -1278,222 +1284,6 @@
                 <property name="left_attach">0</property>
               </packing>
             </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
           </object>
         </child>
       </object>
@@ -1517,6 +1307,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Root [Ctrl+R]</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'√'</property>
           </object>
           <packing>
             <property name="left_attach">7</property>
@@ -1530,6 +1323,9 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Logarithm</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'log '</property>
           </object>
           <packing>
             <property name="left_attach">7</property>
@@ -1544,6 +1340,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Factorize [Ctrl+F]</property>
+            <property name="action_name">cal.factorize</property>
             <child internal-child="accessible">
               <object class="AtkObject" id="calc_factor_button-atkobject">
                 <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the factorize button">Factorize</property>
@@ -1563,6 +1361,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Natural Logarithm</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'ln '</property>
           </object>
           <packing>
             <property name="left_attach">8</property>
@@ -1576,6 +1377,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Absolute Value [|]</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'|'</property>
             <child internal-child="accessible">
               <object class="AtkObject" id="calc_abs_button-atkobject">
                 <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the absolute value button">Absolute Value</property>
@@ -1602,6 +1406,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Integer Component</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'int '</property>
           </object>
           <packing>
             <property name="left_attach">9</property>
@@ -1616,6 +1423,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Fractional Component</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'frac '</property>
           </object>
           <packing>
             <property name="left_attach">9</property>
@@ -1630,6 +1440,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Divide [/]</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'÷'</property>
           </object>
           <packing>
             <property name="left_attach">4</property>
@@ -1645,6 +1458,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">0</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1662,6 +1477,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Multiply [*]</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'×'</property>
           </object>
           <packing>
             <property name="left_attach">4</property>
@@ -1676,6 +1494,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Subtract [-]</property>
+            <property name="action_name">cal.subtract</property>
           </object>
           <packing>
             <property name="left_attach">4</property>
@@ -1690,6 +1510,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Add [+]</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'+'</property>
           </object>
           <packing>
             <property name="left_attach">4</property>
@@ -1704,6 +1527,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Calculate Result</property>
+            <property name="action_name">cal.solve</property>
             <style>
               <class name="suggested-action"/>
             </style>
@@ -1720,6 +1545,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Clear Display [Escape]</property>
+            <property name="action_name">cal.clear</property>
             <child>
               <object class="GtkImage" id="image1">
                 <property name="visible">True</property>
@@ -1740,6 +1567,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">1</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1757,6 +1586,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">2</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1774,6 +1605,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">3</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1791,6 +1624,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">4</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1808,6 +1643,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">5</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1825,6 +1662,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">6</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1842,6 +1681,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">7</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1859,6 +1700,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">8</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1876,6 +1719,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">9</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1893,6 +1738,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">10</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1910,6 +1757,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">11</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1927,6 +1776,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">12</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1944,6 +1795,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">13</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1961,6 +1814,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">14</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1978,6 +1833,8 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-digit</property>
+            <property name="action_target">15</property>
             <style>
               <class name="number-button"/>
             </style>
@@ -1993,6 +1850,9 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Subscript mode [Alt]</property>
+            <property name="action_name">cal.set-number-mode</property>
+            <property name="action_target">'subscript'</property>
             <child internal-child="accessible">
               <object class="AtkObject" id="calc_subscript_button-atkobject">
                 <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the subscript mode button">Subscript</property>
@@ -2017,6 +1877,9 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Superscript mode [Ctrl]</property>
+            <property name="action_name">cal.set-number-mode</property>
+            <property name="action_target">'superscript'</property>
             <child internal-child="accessible">
               <object class="AtkObject" id="calc_superscript_button-atkobject">
                 <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the superscript mode button">Superscript</property>
@@ -2042,6 +1905,7 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="action_name">cal.insert-numeric-point</property>
             <style>
               <class name="numeric-point-button"/>
             </style>
@@ -2056,6 +1920,7 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Memory</property>
             <child internal-child="accessible">
               <object class="AtkObject" id="calc_store_button-atkobject">
                 <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the store value button">Store</property>
@@ -2099,6 +1964,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Boolean Exclusive OR</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'⊻'</property>
           </object>
           <packing>
             <property name="left_attach">5</property>
@@ -2113,6 +1981,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Boolean OR</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'∨'</property>
           </object>
           <packing>
             <property name="left_attach">5</property>
@@ -2127,6 +1998,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Boolean AND</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'∧'</property>
           </object>
           <packing>
             <property name="left_attach">5</property>
@@ -2141,6 +2015,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Modulus divide</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">' mod '</property>
           </object>
           <packing>
             <property name="left_attach">5</property>
@@ -2155,6 +2032,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Start Group [(]</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'('</property>
           </object>
           <packing>
             <property name="left_attach">4</property>
@@ -2168,17 +2048,21 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">End Group [)]</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">')'</property>
           </object>
           <packing>
             <property name="left_attach">5</property>
           </packing>
         </child>
         <child>
-          <object class="GtkButton" id="calc_shift_left_button">
+          <object class="GtkMenuButton" id="calc_shift_left_button">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Shift Left</property>
             <child internal-child="accessible">
               <object class="AtkObject" id="calc_shift_left_button-atkobject">
                 <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the shift left button">Shift Left</property>
@@ -2216,11 +2100,12 @@
           </packing>
         </child>
         <child>
-          <object class="GtkButton" id="calc_shift_right_button">
+          <object class="GtkMenuButton" 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>
+            <property name="tooltip_text" translatable="yes">Shift Right</property>
             <child internal-child="accessible">
               <object class="AtkObject" id="calc_shift_right_button-atkobject">
                 <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the shift right button">Shift Right</property>
@@ -2264,6 +2149,8 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Insert Character Code</property>
+            <property name="action_name">cal.insert-character</property>
             <child internal-child="accessible">
               <object class="AtkObject" id="calc_character_button-atkobject">
                 <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the insert character button">Insert Character</property>
@@ -2282,6 +2169,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Boolean NOT</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'¬'</property>
           </object>
           <packing>
             <property name="left_attach">6</property>
@@ -2294,6 +2184,9 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Factorial [!]</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'!'</property>
             <child internal-child="accessible">
               <object class="AtkObject" id="calc_factorial_button-atkobject">
                 <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the factorial button">Factorial</property>
@@ -2318,6 +2211,9 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Inverse [Ctrl+I]</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'⁻¹'</property>
             <child internal-child="accessible">
               <object class="AtkObject" id="calc_inverse_button-atkobject">
                 <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the inverse button">Inverse</property>
@@ -2343,6 +2239,9 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Exponent [^ or **]</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'^'</property>
             <child internal-child="accessible">
               <object class="AtkObject" id="calc_x_pow_y_button-atkobject">
                 <property name="AtkObject::accessible-name" translatable="yes" comments="Accessible name for 
the exponentiation (x to the power of y) button">Exponent</property>
@@ -2369,6 +2268,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Ones' Complement</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'ones '</property>
           </object>
           <packing>
             <property name="left_attach">6</property>
@@ -2383,6 +2285,9 @@
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
             <property name="focus_on_click">False</property>
+            <property name="tooltip_text" translatable="yes">Two's Complement</property>
+            <property name="action_name">cal.insert-general</property>
+            <property name="action_target">'twos '</property>
           </object>
           <packing>
             <property name="left_attach">7</property>
diff --git a/src/math-buttons.vala b/src/math-buttons.vala
index 24f4382..b395410 100644
--- a/src/math-buttons.vala
+++ b/src/math-buttons.vala
@@ -66,12 +66,6 @@ public class MathButtons : Gtk.Box
     private Gtk.Widget prog_panel;
     private Gtk.Widget? active_panel = null;
 
-    private Gtk.Menu shift_left_menu;
-    private Gtk.Menu shift_right_menu;
-
-    private List<Gtk.ToggleButton> superscript_toggles;
-    private List<Gtk.ToggleButton> subscript_toggles;
-
     private Gtk.ComboBox base_combo;
     private Gtk.Label base_label;
     private Gtk.Widget bit_panel;
@@ -92,6 +86,24 @@ public class MathButtons : Gtk.Box
     private const string[] syd_entries = {"syd_cost", "syd_salvage", "syd_life", "syd_period" };
     private const string[] term_entries = {"term_pmt","term_fv", "term_pint"};
 
+    private SimpleActionGroup action_group = new SimpleActionGroup ();
+    private const ActionEntry[] action_entries = {
+        {"insert-general",       on_insert,               "s"                },
+        {"insert-digit",         on_insert_digit,         "i"                },
+        {"subtract",             on_subtract                                 },
+        {"square",               on_square                                   },
+        {"undo",                 on_undo                                     },
+        {"solve",                on_solve                                    },
+        {"clear",                on_clear                                    },
+        {"factorize",            on_factorize                                },
+        {"insert-exponent",      on_insert_exponent                          },
+        {"bitshift",             on_bitshift,             "i"                },
+        {"insert-character",     on_insert_character                         },
+        {"insert-numeric-point", on_insert_numeric_point                     },
+        {"set-number-mode",      on_set_number_mode,      "s", "'normal'"    },
+        {"launch-finc-dialog",   on_launch_finc_dialog,   "s"                }
+    };
+
     public MathButtons (MathEquation equation)
     {
         Object (orientation: Gtk.Orientation.VERTICAL, vexpand_set: true);
@@ -99,6 +111,9 @@ public class MathButtons : Gtk.Box
         show.connect (load_buttons);
         this.equation = equation;
 
+        action_group.add_action_entries (action_entries, this);
+        insert_action_group ("cal", action_group);
+
         equation.notify["display"].connect ((pspec) => { update_bit_panel (); });
         equation.notify["number-mode"].connect ((pspec) => { number_mode_changed_cb (); });
         equation.notify["angle-units"].connect ((pspec) => { update_bit_panel (); });
@@ -135,6 +150,61 @@ public class MathButtons : Gtk.Box
         }
     }
 
+    private void on_insert (SimpleAction action, Variant? param)
+    {
+        equation.insert (param.get_string ());
+    }
+
+    private void on_insert_digit (SimpleAction action, Variant? param)
+    {
+        equation.insert_digit (param.get_int32 ());
+    }
+
+    private void on_subtract (SimpleAction action, Variant? param)
+    {
+        equation.insert_subtract ();
+    }
+
+    private void on_square (SimpleAction action, Variant? param)
+    {
+        equation.insert_square ();
+    }
+
+    private void on_undo (SimpleAction action, Variant? param)
+    {
+        equation.undo ();
+    }
+
+    private void on_solve (SimpleAction action, Variant? param)
+    {
+        equation.solve ();
+    }
+
+    private void on_clear (SimpleAction action, Variant? param)
+    {
+        equation.clear ();
+    }
+
+    private void on_factorize (SimpleAction action, Variant? param)
+    {
+        equation.factorize ();
+    }
+
+    private void on_insert_exponent (SimpleAction action, Variant? param)
+    {
+        equation.insert_exponent ();
+    }
+
+    private void on_bitshift (SimpleAction action, Variant? param)
+    {
+        equation.shift (param.get_int32 ());
+    }
+
+    private void on_insert_numeric_point (SimpleAction action, Variant? param)
+    {
+        equation.insert_numeric_point ();
+    }
+
     private void update_bit_panel ()
     {
         if (bit_panel == null)
@@ -192,13 +262,7 @@ public class MathButtons : Gtk.Box
 
     private void base_combobox_changed_cb (Gtk.ComboBox combo)
     {
-        var model = combo.get_model ();
-        Gtk.TreeIter iter;
-        combo.get_active_iter (out iter);
-        int value;
-        model.get (iter, 1, out value, -1);
-
-        programming_base = value;
+        programming_base = int.parse (combo.active_id);
     }
 
     private void base_changed_cb ()
@@ -208,23 +272,9 @@ public class MathButtons : Gtk.Box
 
         _programming_base = equation.number_base;
 
-        var model = base_combo.get_model ();
-        Gtk.TreeIter iter;
-        var valid = model.get_iter_first (out iter);
-        while (valid)
-        {
-            int v;
-            model.get (iter, 1, out v, -1);
-            if (v == programming_base)
-                break;
-            valid = model.iter_next (ref iter);
-        }
-        if (!valid)
-            valid = model.get_iter_first (out iter);
-
-        base_combo.set_active_iter (iter);
-
+        base_combo.active_id = _programming_base.to_string ();
         update_bit_panel ();
+        
     }
 
     private Gtk.Widget load_mode (ButtonMode mode)
@@ -290,202 +340,22 @@ public class MathButtons : Gtk.Box
         }
 
         /* Configure buttons */
-        /* Tooltip for the Pi button */
-        setup_button (builder, "pi", "π", _("Pi [Ctrl+P]"));
-        /* Tooltip for the Euler's Number button */
-        setup_button (builder, "eulers_number", "e", _("Euler’s Number"));
-        setup_button (builder, "imaginary", "i", null);
-        setup_button (builder, "numeric_point", null, null);
-        /* Tooltip for the subscript button */
-        setup_button (builder, "subscript", null, _("Subscript mode [Alt]"));
-        /* Tooltip for the superscript button */
-        setup_button (builder, "superscript", null, _("Superscript mode [Ctrl]"));
-        /* Tooltip for the scientific exponent button */
-        setup_button (builder, "exponential", null, _("Scientific exponent [Ctrl+E]"));
-        /* Tooltip for the add button */
-        setup_button (builder, "add",                "+", _("Add [+]"));
-        /* Tooltip for the subtract button */
-        setup_button (builder, "subtract",           "−", _("Subtract [-]"), false);
-        /* Tooltip for the multiply button */
-        setup_button (builder, "multiply",           "×", _("Multiply [*]"));
-        /* Tooltip for the divide button */
-        setup_button (builder, "divide",             "÷", _("Divide [/]"));
-        /* Tooltip for the modulus divide button */
-        setup_button (builder, "modulus_divide",     " mod ", _("Modulus divide"));
-        /* Tooltip for the additional functions button */
-        setup_button (builder, "function",           null, _("Additional Functions"));
-        /* Tooltip for the exponent button */
-        setup_button (builder, "x_pow_y",            "^", _("Exponent [^ or **]"));
-        /* Tooltip for the percentage button */
-        setup_button (builder, "percentage",         "%", _("Percentage [%]"));
-        /* Tooltip for the factorial button */
-        setup_button (builder, "factorial",          "!", _("Factorial [!]"));
-        /* Tooltip for the absolute value button */
-        setup_button (builder, "abs",                "|", _("Absolute value [|]"));
-        /* Tooltip for the complex argument component button */
-        setup_button (builder, "arg",                "Arg ", _("Complex argument"));
-        /* Tooltip for the complex conjugate button */
-        setup_button (builder, "conjugate",          "conj ", _("Complex conjugate"));
-        /* Tooltip for the root button */
-        setup_button (builder, "root",               "√", _("Root [Ctrl+R]"));
-        /* Tooltip for the square root button */
-        setup_button (builder, "square_root",        "√", _("Square root [Ctrl+R]"));
-        /* Tooltip for the logarithm button */
-        setup_button (builder, "logarithm",          "log ", _("Logarithm"));
-        /* Tooltip for the natural logarithm button */
-        setup_button (builder, "natural_logarithm",  "ln ", _("Natural Logarithm"));
-        /* Tooltip for the sine button */
-        setup_button (builder, "sine",               "sin ", _("Sine"));
-        /* Tooltip for the cosine button */
-        setup_button (builder, "cosine",             "cos ", _("Cosine"));
-        /* Tooltip for the tangent button */
-        setup_button (builder, "tangent",            "tan ", _("Tangent"));
-        /* Tooltip for the hyperbolic sine button */
-        setup_button (builder, "hyperbolic_sine",    "sinh ", _("Hyperbolic Sine"));
-        /* Tooltip for the hyperbolic cosine button */
-        setup_button (builder, "hyperbolic_cosine",  "cosh ", _("Hyperbolic Cosine"));
-        /* Tooltip for the hyperbolic tangent button */
-        setup_button (builder, "hyperbolic_tangent", "tanh ", _("Hyperbolic Tangent"));
-        /* Tooltip for the inverse button */
-        setup_button (builder, "inverse",            "⁻¹", _("Inverse [Ctrl+I]"));
-        /* Tooltip for the boolean AND button */
-        setup_button (builder, "and",                "∧", _("Boolean AND"));
-        /* Tooltip for the boolean OR button */
-        setup_button (builder, "or",                 "∨", _("Boolean OR"));
-        /* Tooltip for the exclusive OR button */
-        setup_button (builder, "xor",                "⊻", _("Boolean Exclusive OR"));
-        /* Tooltip for the boolean NOT button */
-        setup_button (builder, "not",                "¬", _("Boolean NOT"));
-        /* Tooltip for the integer component button */
-        setup_button (builder, "integer_portion",    "int ", _("Integer Component"));
-        /* Tooltip for the fractional component button */
-        setup_button (builder, "fractional_portion", "frac ", _("Fractional Component"));
-        /* Tooltip for the real component button */
-        setup_button (builder, "real_portion",       "Re ", _("Real Component"));
-        /* Tooltip for the imaginary component button */
-        setup_button (builder, "imaginary_portion",  "Im ", _("Imaginary Component"));
-        /* Tooltip for the ones' complement button */
-        setup_button (builder, "ones_complement",    "ones ", _("Ones' Complement"));
-        /* Tooltip for the two's complement button */
-        setup_button (builder, "twos_complement",    "twos ", _("Two's Complement"));
-        /* Tooltip for the truncate button */
-        /* FIXME : Can be Added Once the support is available at the back-end */
-        // setup_button (builder, "trunc",              "trunc ", _("Truncate"));
-        /* Tooltip for the start group button */
-        setup_button (builder, "start_group",        "(", _("Start Group [(]"));
-        /* Tooltip for the end group button */
-        setup_button (builder, "end_group",          ")", _("End Group [)]"));
-        /* Tooltip for the memory button */
-        setup_button (builder, "memory", null, _("Memory"));
-        /* Tooltip for the insert character code button */
-        setup_button (builder, "character", null, _("Insert Character Code"));
-        /* Tooltip for the solve button */
-        setup_button (builder, "result", null, _("Calculate Result"));
-        /* Tooltip for the factor button */
-        setup_button (builder, "factor", null, _("Factorize [Ctrl+F]"));
-        /* Tooltip for the clear button */
-        setup_button (builder, "clear", null, _("Clear Display [Escape]"));
-        /* Tooltip for the undo button */
-        setup_button (builder, "undo", null, _("Undo [Ctrl+Z]"));
-        /* Tooltip for the shift left button */
-        setup_button (builder, "shift_left", null, _("Shift Left"));
-        /* Tooltip for the shift right button */
-        setup_button (builder, "shift_right", null, _("Shift Right"));
-        /* Tooltip for the compounding term button */
-        setup_button (builder, "finc_compounding_term", null, _("Compounding Term"));
-        /* Tooltip for the double declining depreciation button */
-        setup_button (builder, "finc_double_declining_depreciation", null, _("Double Declining 
Depreciation"));
-        /* Tooltip for the future value button */
-        setup_button (builder, "finc_future_value", null, _("Future Value"));
-        /* Tooltip for the financial term button */
-        setup_button (builder, "finc_term", null, _("Financial Term"));
-        /* Tooltip for the sum of the years digits depreciation button */
-        setup_button (builder, "finc_sum_of_the_years_digits_depreciation", null, _("Sum of the Years Digits 
Depreciation"));
-        /* Tooltip for the straight line depreciation button */
-        setup_button (builder, "finc_straight_line_depreciation", null, _("Straight Line Depreciation"));
-        /* Tooltip for the periodic interest rate button */
-        setup_button (builder, "finc_periodic_interest_rate", null, _("Periodic Interest Rate"));
-        /* Tooltip for the present value button */
-        setup_button (builder, "finc_present_value", null, _("Present Value"));
-        /* Tooltip for the periodic payment button */
-        setup_button (builder, "finc_periodic_payment", null, _("Periodic Payment"));
-        /* Tooltip for the gross profit margin button */
-        setup_button (builder, "finc_gross_profit_margin", null, _("Gross Profit Margin"));
-
-        /* Set special button data */
-        for (var i = 0; i < 16; i++)
-        {
-            var name = "calc_%d_button".printf (i);
-            var button = builder.get_object (name) as Gtk.Button;
-            if (button != null)
-            {
-                button.set_data<int> ("calc_digit", i);
-                button.set_label (equation.get_digit_text (i).to_string ());
-                button.clicked.connect ((widget) => { equation.insert_digit (widget.get_data<int> 
("calc_digit")); });
-            }
-        }
-        var button = builder.get_object ("calc_subtract_button") as Gtk.Button;
-        if (button != null)
-            button.clicked.connect (() => { equation.insert_subtract (); });
-        button = builder.get_object ("calc_x_squared_button") as Gtk.Button;
-        if (button != null)
-        {
-            button.clicked.connect (() => { equation.insert_square (); });
-            button.set_tooltip_text (_("Square [Ctrl+2]"));
-        }
-        button = builder.get_object ("calc_undo_button") as Gtk.Button;
-        if (button != null)
-            button.clicked.connect (() => { equation.undo (); });
-        button = builder.get_object ("calc_result_button") as Gtk.Button;
-        if (button != null)
-            button.clicked.connect (() => { equation.solve (); });
-        button = builder.get_object ("calc_clear_button") as Gtk.Button;
+        var button = builder.get_object ("calc_memory_button") as Gtk.Button;
         if (button != null)
-            button.clicked.connect (() => { equation.clear (); });
-        button = builder.get_object ("calc_memory_button") as Gtk.Button;
-        if (button != null)
-            button.clicked.connect (memory_cb);
+            button.clicked.connect (on_memory);
         button = builder.get_object ("calc_function_button") as Gtk.Button;
         if (button != null)
-            button.clicked.connect (function_cb);
-        button = builder.get_object ("calc_factor_button") as Gtk.Button;
-        if (button != null)
-            button.clicked.connect (() => { equation.factorize (); });
-        button = builder.get_object ("calc_exponential_button") as Gtk.Button;
-        if (button != null)
-            button.clicked.connect (() => { equation.insert_exponent (); });
-        button = builder.get_object ("calc_shift_left_button") as Gtk.Button;
-        if (button != null)
-            button.clicked.connect (shift_left_cb);
-        button = builder.get_object ("calc_shift_right_button") as Gtk.Button;
-        if (button != null)
-            button.clicked.connect (shift_right_cb);
-        button = builder.get_object ("calc_character_button") as Gtk.Button;
-        if (button != null)
-            button.clicked.connect (insert_character_code_cb);
+            button.clicked.connect (on_insert_function);
         button = builder.get_object ("calc_numeric_point_button") as Gtk.Button;
         if (button != null)
-        {
             button.set_label (equation.serializer.get_radix ().to_string ());
-            button.clicked.connect (() => { equation.insert_numeric_point (); });
-        }
 
-        var toggle_button = builder.get_object ("calc_superscript_button") as Gtk.ToggleButton;
-        if (toggle_button != null)
-        {
-            superscript_toggles.append (toggle_button);
-            if (equation.number_mode == NumberMode.SUPERSCRIPT)
-                toggle_button.set_active (true);
-            toggle_button.clicked.connect (set_superscript_cb);
-        }
-        toggle_button = builder.get_object ("calc_subscript_button") as Gtk.ToggleButton;
-        if (toggle_button != null)
-        {
-            subscript_toggles.append (toggle_button);
-            if (equation.number_mode == NumberMode.SUBSCRIPT)
-                toggle_button.set_active (true);
-            toggle_button.clicked.connect (set_subscript_cb);
-        }
+        var menu_button = builder.get_object ("calc_shift_left_button") as Gtk.MenuButton;
+        if (menu_button != null)
+            menu_button.menu_model = create_shift_menu (true);
+        menu_button = builder.get_object ("calc_shift_right_button") as Gtk.MenuButton;
+        if (menu_button != null)
+            menu_button.menu_model = create_shift_menu (false);
 
         if (mode == ButtonMode.PROGRAMMING)
         {
@@ -509,35 +379,12 @@ public class MathButtons : Gtk.Box
                 name = "bit_eventbox_%d".printf (i);
                 var box = builder.get_object (name) as Gtk.EventBox;
                 box.set_data<int> ("bit_index", i);
-                box.button_press_event.connect (bit_toggle_cb);
+                box.button_press_event.connect (on_toggle_bit);
                 i++;
             }
             bit_labels.reverse ();
 
             base_combo = builder.get_object ("base_combo") as Gtk.ComboBox;
-            var model = new Gtk.ListStore (2, typeof (string), typeof (int));
-            base_combo.model = model;
-            Gtk.TreeIter iter;
-            model.append (out iter);
-            model.set (iter, 0,
-                       /* Number display mode combo: Binary, e.g. 10011010010₂ */
-                       _("Binary"), 1, 2, -1);
-            model.append (out iter);
-            model.set (iter, 0,
-                       /* Number display mode combo: Octal, e.g. 2322₈ */
-                       _("Octal"), 1, 8, -1);
-            model.append (out iter);
-            model.set (iter, 0,
-                       /* Number display mode combo: Decimal, e.g. 1234 */
-                       _("Decimal"), 1, 10, -1);
-            model.append (out iter);
-            model.set (iter, 0,
-                       /* Number display mode combo: Hexadecimal, e.g. 4D2₁₆ */
-                       _("Hexadecimal"), 1, 16, -1);
-            var renderer = new Gtk.CellRendererText ();
-            base_combo.pack_start (renderer, true);
-            base_combo.add_attribute (renderer, "text", 0);
-
             base_combo.changed.connect (base_combobox_changed_cb);
             equation.notify["number-base"].connect ((pspec) => { base_changed_cb (); } );
             base_changed_cb ();
@@ -545,71 +392,8 @@ public class MathButtons : Gtk.Box
 
         /* Setup financial functions */
         if (mode == ButtonMode.FINANCIAL)
-        {
             load_finc_dialogs ();
 
-            button = builder.get_object ("calc_finc_compounding_term_button") as Gtk.Button;
-            if (button != null)
-            {
-                button.set_data<string> ("finc-dialog-name", "ctrm_dialog");
-                button.clicked.connect (finc_cb);
-            }
-            button = builder.get_object ("calc_finc_double_declining_depreciation_button") as Gtk.Button;
-            if (button != null)
-            {
-                button.set_data<string> ("finc-dialog-name", "ddb_dialog");
-                button.clicked.connect (finc_cb);
-            }
-            button = builder.get_object ("calc_finc_future_value_button") as Gtk.Button;
-            if (button != null)
-            {
-                button.set_data<string> ("finc-dialog-name", "fv_dialog");
-                button.clicked.connect (finc_cb);
-            }
-            button = builder.get_object ("calc_finc_gross_profit_margin_button") as Gtk.Button;
-            if (button != null)
-            {
-                button.set_data<string> ("finc-dialog-name", "gpm_dialog");
-                button.clicked.connect (finc_cb);
-            }
-            button = builder.get_object ("calc_finc_periodic_payment_button") as Gtk.Button;
-            if (button != null)
-            {
-                button.set_data<string> ("finc-dialog-name", "pmt_dialog");
-                button.clicked.connect (finc_cb);
-            }
-            button = builder.get_object ("calc_finc_present_value_button") as Gtk.Button;
-            if (button != null)
-            {
-                button.set_data<string> ("finc-dialog-name", "pv_dialog");
-                button.clicked.connect (finc_cb);
-            }
-            button = builder.get_object ("calc_finc_periodic_interest_rate_button") as Gtk.Button;
-            if (button != null)
-            {
-                button.set_data<string> ("finc-dialog-name", "rate_dialog");
-                button.clicked.connect (finc_cb);
-            }
-            button = builder.get_object ("calc_finc_straight_line_depreciation_button") as Gtk.Button;
-            if (button != null)
-            {
-                button.set_data<string> ("finc-dialog-name", "sln_dialog");
-                button.clicked.connect (finc_cb);
-            }
-            button = builder.get_object ("calc_finc_sum_of_the_years_digits_depreciation_button") as 
Gtk.Button;
-            if (button != null)
-            {
-                button.set_data<string> ("finc-dialog-name", "syd_dialog");
-                button.clicked.connect (finc_cb);
-            }
-            button = builder.get_object ("calc_finc_term_button") as Gtk.Button;
-            if (button != null)
-            {
-                button.set_data<string> ("finc-dialog-name", "term_dialog");
-                button.clicked.connect (finc_cb);
-            }
-        }
-
         builder.connect_signals (this);
 
         update_bit_panel ();
@@ -617,28 +401,6 @@ public class MathButtons : Gtk.Box
         return panel;
     }
 
-    private void setup_button (Gtk.Builder builder, string name, string? data, string? tooltip, bool connect 
= true)
-    {
-        var widget_name = "calc_%s_button".printf (name);
-        var button = builder.get_object (widget_name) as Gtk.Button;
-        if (button == null)
-            return;
-
-        if (data != null)
-        {
-            button.set_data<string> ("calc_text", data);
-            if (connect)
-            {
-                button.clicked.connect ((widget) =>  { equation.insert (widget.get_data<string> 
("calc_text")); });
-            }
-        }
-
-        if (tooltip != null)
-            button.set_tooltip_text (tooltip);
-
-        button.get_accessible ().set_name (name);
-    }
-
     private void converter_changed_cb ()
     {
         Unit from_unit, to_unit;
@@ -696,26 +458,7 @@ public class MathButtons : Gtk.Box
         }
     }
 
-    private void popup_button_menu (Gtk.Button button, Gtk.Menu menu)
-    {
-        menu.set_data<Gtk.Widget> ("button", button);
-        menu.popup (null, null, button_menu_position_func, 1, Gtk.get_current_event_time ());
-    }
-
-    private void button_menu_position_func (Gtk.Menu menu, out int x, out int y, out bool push_in)
-    {
-        var button = menu.get_data<Gtk.Button> ("button");
-        int origin_x, origin_y;
-        button.get_window ().get_origin (out origin_x, out origin_y);
-        var border = button.get_border_width ();
-        Gtk.Allocation allocation;
-        button.get_allocation (out allocation);
-        x = (int) (origin_x + allocation.x + border);
-        y = (int) (origin_y + allocation.y + border);
-        push_in = false;
-    }
-
-    private void memory_cb (Gtk.Widget widget)
+    private void on_memory (Gtk.Widget widget)
     {
         var popup = new MathVariablePopup (equation);
         popup.set_transient_for (widget.get_toplevel () as Gtk.Window);
@@ -728,81 +471,24 @@ public class MathButtons : Gtk.Box
         popup.show ();
     }
 
-    private void shift_left_cb (Gtk.Button button)
+    private Menu create_shift_menu (bool shift_left)
     {
-        if (shift_left_menu == null)
-        {
-            shift_left_menu = new Gtk.Menu ();
-            shift_left_menu.set_reserve_toggle_size (false);
-
-            for (var i = 1; i < 16; i++)
-            {
-                string format;
-                if (i < 10)
-                {
-                    /* Left Shift Popup: Menu item to shift left by n places (n < 10) */
-                    format = ngettext ("_%d place", "_%d places", i);
-                }
-                else
-                {
-                    /* Left Shift Popup: Menu item to shift left by n places (n >= 10) */
-                    format = ngettext ("%d place", "%d places", i);
-                }
-                var text = format.printf (i);
-                var label = new Gtk.Label.with_mnemonic (text);
-
-                var item = new Gtk.MenuItem ();
-                item.set_data<int> ("shiftcount", i);
-                item.add (label);
-                shift_left_menu.append (item);
-                item.activate.connect ((widget) => { equation.shift (widget.get_data<int> ("shiftcount")); 
});
-
-                label.show ();
-                item.show ();
-            }
-        }
+        var shift_menu = new Menu ();
 
-        popup_button_menu (button, shift_left_menu);
-    }
-
-    private void shift_right_cb (Gtk.Button button)
-    {
-        if (shift_right_menu == null)
+        for (var i = 1; i < 16; i++)
         {
-            shift_right_menu = new Gtk.Menu ();
-            shift_right_menu.set_reserve_toggle_size (false);
+            string format = ngettext ("%d place", "%d places", i);
+            if (i < 10) // Provide mnemonic for shifting [0..9] places
+                format = "_" + format;
 
-            for (var i = 1; i < 16; i++)
-            {
-                string format;
-                if (i < 10)
-                {
-                    /* Right Shift Popup: Menu item to shift right by n places (n < 10) */
-                    format = ngettext ("_%d place", "_%d places", i);
-                }
-                else
-                {
-                    /* Right Shift Popup: Menu item to shift right by n places (n >= 10) */
-                    format = ngettext ("%d place", "%d places", i);
-                }
-                var text = format.printf (i);
-                var label = new Gtk.Label.with_mnemonic (text);
-
-                var item = new Gtk.MenuItem ();
-                item.set_data<int> ("shiftcount", -i);
-                item.add (label);
-                shift_right_menu.append (item);
-                item.activate.connect ((widget) => { equation.shift (widget.get_data<int> ("shiftcount")); 
});
-
-                label.show ();
-                item.show ();
-            }
+            var positions = (shift_left) ? i : -i;
+            shift_menu.append (format.printf (i), "cal.bitshift(%d)".printf (positions));
         }
 
-        popup_button_menu (button, shift_right_menu);
+        return shift_menu;
     }
 
-    private void function_cb (Gtk.Widget widget)
+    private void on_insert_function (Gtk.Widget widget)
     {
         var popup = new MathFunctionPopup (equation);
         popup.set_transient_for (widget.get_toplevel () as Gtk.Window);
@@ -815,15 +501,15 @@ public class MathButtons : Gtk.Box
         popup.show ();
     }
 
-    private void finc_cb (Gtk.Widget widget)
+    private void on_launch_finc_dialog (SimpleAction action, Variant? param)
     {
-        var name = widget.get_data<string> ("finc-dialog-name");
+        var name = param.get_string ();
         var dialog = financial_ui.get_object (name) as Gtk.Dialog;
         dialog.run ();
         dialog.hide ();
     }
 
-    private void insert_character_code_cb (Gtk.Widget widget)
+    private void on_insert_character (SimpleAction action, Variant? param)
     {
         character_code_dialog.present ();
     }
@@ -928,46 +614,37 @@ public class MathButtons : Gtk.Box
         return true;
     }
 
-    private bool bit_toggle_cb (Gtk.Widget event_box, Gdk.EventButton event)
+    private bool on_toggle_bit (Gtk.Widget event_box, Gdk.EventButton event)
     {
         equation.toggle_bit (event_box.get_data<int> ("bit_index"));
         return true;
     }
 
-    private void set_superscript_cb (Gtk.Button widget)
+    private void on_set_number_mode (SimpleAction action, Variant? param)
     {
-        var button = widget as Gtk.ToggleButton;
-
-        if (button.get_active ())
+        if (param.get_string () == action.state.get_string ())
+            equation.number_mode = NumberMode.NORMAL;
+        else if (param.get_string () == "superscript")
         {
             equation.number_mode = NumberMode.SUPERSCRIPT;
             if (!equation.has_selection)
                 equation.remove_trailing_spaces ();
         }
-        else if (equation.number_mode == NumberMode.SUPERSCRIPT)
-            equation.number_mode = NumberMode.NORMAL;
-    }
-
-    private void set_subscript_cb (Gtk.Button widget)
-    {
-        var button = widget as Gtk.ToggleButton;
-
-        if (button.get_active ())
+        else if (param.get_string () == "subscript")
         {
             equation.number_mode = NumberMode.SUBSCRIPT;
             if (!equation.has_selection)
                 equation.remove_trailing_spaces ();
         }
-        else if (equation.number_mode == NumberMode.SUBSCRIPT)
-            equation.number_mode = NumberMode.NORMAL;
     }
 
     private void number_mode_changed_cb ()
     {
-        var mode = equation.number_mode;
-        foreach (var toggle in superscript_toggles)
-            toggle.set_active (mode == NumberMode.SUPERSCRIPT);
-        foreach (var toggle in subscript_toggles)
-            toggle.set_active (mode == NumberMode.SUBSCRIPT);
+        if (equation.number_mode == NumberMode.SUPERSCRIPT)
+            action_group.change_action_state ("set-number-mode", "superscript");
+        else if (equation.number_mode == NumberMode.SUBSCRIPT)
+            action_group.change_action_state ("set-number-mode", "subscript");
+        else
+            action_group.change_action_state ("set-number-mode", "normal");
     }
 }


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