summaryrefslogtreecommitdiff
path: root/src/math-equation.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2018-08-26 22:32:55 -0400
committerraveit65 <[email protected]>2018-08-28 12:38:57 +0200
commitde4b0c4fb50d33b80a2e116cbf98492e3108e051 (patch)
tree75b91c66c7f9e39753214f2e952775833fac26a8 /src/math-equation.c
parentb9020a66b232547b5f74d42e82a09ffedf896f58 (diff)
downloadmate-calc-de4b0c4fb50d33b80a2e116cbf98492e3108e051.tar.bz2
mate-calc-de4b0c4fb50d33b80a2e116cbf98492e3108e051.tar.xz
Copy equation as ASCII text
This ensures compatibility with pasting into software that cannot handle Unicode characters (e.g. LibreOffice)
Diffstat (limited to 'src/math-equation.c')
-rw-r--r--src/math-equation.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/math-equation.c b/src/math-equation.c
index 3073804..2aa687b 100644
--- a/src/math-equation.c
+++ b/src/math-equation.c
@@ -416,14 +416,14 @@ math_equation_copy(MathEquation *equation)
{
GtkTextIter start, end;
gchar *text;
-
+
g_return_if_fail(equation != NULL);
if (!gtk_text_buffer_get_selection_bounds(GTK_TEXT_BUFFER(equation), &start, &end))
gtk_text_buffer_get_bounds(GTK_TEXT_BUFFER(equation), &start, &end);
text = gtk_text_buffer_get_text(GTK_TEXT_BUFFER(equation), &start, &end, FALSE);
- gtk_clipboard_set_text(gtk_clipboard_get(GDK_NONE), text, -1);
+ gtk_clipboard_set_text(gtk_clipboard_get(GDK_NONE), g_str_to_ascii (text, "C"), -1);
g_free(text);
}