Skip to content

Commit

Permalink
Register status bar currencies not displayed correctly for Hebrew
Browse files Browse the repository at this point in the history
When Gnucash is run in Hebrew which is a RTL language, on the register
pages the status bar currencies are not displayed correctly...

To fix this, when creating the displayed monetary amount insert a BiDi
ltr isolate uni-character at the start of the string.
  • Loading branch information
Bob-IT committed Mar 14, 2022
1 parent c84d82e commit 9987928
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gnucash/gnome/gnc-split-reg.c
Expand Up @@ -578,7 +578,7 @@ gsr_update_summary_label( GtkWidget *label,
char string[256];
const gchar *label_str = NULL;
GtkWidget *text_label, *hbox;
gchar *tooltip;
gchar *bidi_string;

if ( label == NULL )
return;
Expand All @@ -605,11 +605,13 @@ gsr_update_summary_label( GtkWidget *label,
}

gnc_set_label_color( label, amount );
gtk_label_set_text( GTK_LABEL(label), string );
bidi_string = gnc_wrap_text_with_bidi_ltr_isolate (string);
gtk_label_set_text( GTK_LABEL(label), bidi_string );
g_free (bidi_string);

if (label_str)
{
tooltip = g_strdup_printf ("%s %s", label_str, string);
gchar *tooltip = g_strdup_printf ("%s %s", label_str, string);
gtk_widget_set_tooltip_text (GTK_WIDGET(hbox), tooltip);
g_free (tooltip);
}
Expand Down

0 comments on commit 9987928

Please sign in to comment.