[gnome-calculator/wip/ricotz/vala: 243/243] lib: Adapt to changed gtk+-3.0 bindings in vala



commit e069e58b84f68e6d95ef71e10971fc49a00a639b
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Tue Oct 29 17:51:22 2019 +0100

    lib: Adapt to changed gtk+-3.0 bindings in vala

 lib/math-equation.vala | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
---
diff --git a/lib/math-equation.vala b/lib/math-equation.vala
index 119d5c8d..3d983ecc 100644
--- a/lib/math-equation.vala
+++ b/lib/math-equation.vala
@@ -826,7 +826,11 @@ public class MathEquation : Gtk.SourceBuffer
             get_iter_at_mark (out iter_prev, get_insert ());
             if (iter_prev.backward_char () &&  iter_prev.get_char ().to_string () == "×" )
             {
+#if VALA_0_48
+                base.backspace (ref iter, true, true);
+#else
                 base.backspace (iter, true, true);
+#endif
                 insert_at_cursor ("^", -1);
                 return;
             }
@@ -840,7 +844,11 @@ public class MathEquation : Gtk.SourceBuffer
             get_iter_at_mark (out iter_prev, get_insert ());
             if (iter_prev.backward_char () &&  iter_prev.get_char ().to_string () == ">" )
             {
+#if VALA_0_48
+                base.backspace (ref iter, true, true);
+#else
                 base.backspace (iter, true, true);
+#endif
                 insert_at_cursor ("»", -1);
                 return;
             }
@@ -854,7 +862,11 @@ public class MathEquation : Gtk.SourceBuffer
             get_iter_at_mark (out iter_prev, get_insert ());
             if (iter_prev.backward_char () &&  iter_prev.get_char ().to_string () == "<" )
             {
+#if VALA_0_48
+                base.backspace (ref iter, true, true);
+#else
                 base.backspace (iter, true, true);
+#endif
                 insert_at_cursor ("«", -1);
                 return;
             }
@@ -1303,7 +1315,11 @@ public class MathEquation : Gtk.SourceBuffer
         {
             Gtk.TextIter iter;
             get_iter_at_mark (out iter, get_insert ());
+#if VALA_0_48
+            base.backspace (ref iter, true, true);
+#else
             base.backspace (iter, true, true);
+#endif
         }
     }
 


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