-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11915 from lb90/gnome-calculator-add-patches
gnome-calculator: Add patches
- Loading branch information
Showing
3 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
mingw-w64-gnome-calculator/5b387d03f434922e1811919aedb2d475cc874da4.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
From 5b387d03f434922e1811919aedb2d475cc874da4 Mon Sep 17 00:00:00 2001 | ||
From: Robert Roth <robert.roth.off@gmail.com> | ||
Date: Tue, 14 Jun 2022 10:01:52 +0300 | ||
Subject: [PATCH] Fixed crash on variable name entry (fixes #282) | ||
|
||
--- | ||
src/math-variable-popover.vala | 6 +++++- | ||
src/ui/math-variable-popover.ui | 1 - | ||
2 files changed, 5 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/math-variable-popover.vala b/src/math-variable-popover.vala | ||
index 2318934d..76b17eea 100644 | ||
--- a/src/math-variable-popover.vala | ||
+++ b/src/math-variable-popover.vala | ||
@@ -42,11 +42,14 @@ public class MathVariablePopover : MathPopover<MathVariable> | ||
[GtkChild] | ||
private unowned Gtk.Button store_variable_button; | ||
|
||
+ private ulong changed_handler; | ||
+ | ||
public MathVariablePopover (MathEquation equation, ListStore model, CompareDataFunc compare_func) | ||
{ | ||
base(equation, model, (a,b) => MathVariable.name_compare_func(a as MathVariable,b as MathVariable)); | ||
|
||
variable_list.bind_model (model, (variable) => make_item_row (variable as MathVariable)); | ||
+ changed_handler = variable_name_entry.changed.connect (variable_name_changed_cb); | ||
equation.history_signal.connect (this.handler); | ||
item_deleted.connect (delete_variable_cb); | ||
} | ||
@@ -72,11 +75,12 @@ public class MathVariablePopover : MathPopover<MathVariable> | ||
equation.insert (variable.name); | ||
} | ||
|
||
- [GtkCallback] | ||
private void variable_name_changed_cb (Gtk.Editable editable) | ||
{ | ||
var entry = editable as Gtk.Entry; | ||
+ SignalHandler.block (entry, changed_handler); | ||
entry.text = entry.text.replace (" ", "_"); | ||
+ SignalHandler.unblock (entry, changed_handler); | ||
store_variable_button.sensitive = (entry.text != ""); | ||
} | ||
|
||
diff --git a/src/ui/math-variable-popover.ui b/src/ui/math-variable-popover.ui | ||
index cb98fc49..17ed4c8a 100644 | ||
--- a/src/ui/math-variable-popover.ui | ||
+++ b/src/ui/math-variable-popover.ui | ||
@@ -30,7 +30,6 @@ | ||
<object class="GtkEntry" id="variable_name_entry"> | ||
<property name="placeholder_text" translatable="yes">Variable name</property> | ||
<property name="receives_default">True</property> | ||
- <signal name="changed" handler="variable_name_changed_cb" swapped="no"/> | ||
<signal name="activate" handler="store_variable_cb" swapped="no"/> | ||
</object> | ||
</child> | ||
-- | ||
GitLab | ||
|
25 changes: 25 additions & 0 deletions
25
mingw-w64-gnome-calculator/84ea10dc61fb156341bc7eba4d0b2025db801e9b.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 84ea10dc61fb156341bc7eba4d0b2025db801e9b Mon Sep 17 00:00:00 2001 | ||
From: Robert Roth <robert.roth.off@gmail.com> | ||
Date: Wed, 15 Jun 2022 18:40:03 +0300 | ||
Subject: [PATCH] Remove unnecessary problematic XML parser cleanup call (fixes | ||
#283) | ||
|
||
--- | ||
lib/currency-provider.vala | 1 - | ||
1 file changed, 1 deletion(-) | ||
|
||
diff --git a/lib/currency-provider.vala b/lib/currency-provider.vala | ||
index bd471598..bcef3630 100644 | ||
--- a/lib/currency-provider.vala | ||
+++ b/lib/currency-provider.vala | ||
@@ -428,7 +428,6 @@ public class EcbCurrencyProvider : AbstractCurrencyProvider { | ||
node = null; | ||
} | ||
|
||
- Xml.Parser.cleanup (); | ||
base.do_load_rates (); | ||
} | ||
|
||
-- | ||
GitLab | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters