diff options
Diffstat (limited to 'src/math-buttons.c')
-rw-r--r-- | src/math-buttons.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/math-buttons.c b/src/math-buttons.c index f9e74f5..a28db23 100644 --- a/src/math-buttons.c +++ b/src/math-buttons.c @@ -902,17 +902,16 @@ shift_left_cb(GtkWidget *widget, MathButtons *buttons) for (i = 1; i < 16; i++) { GtkWidget *item, *label; - gchar *format, *text; + gchar *text; if (i < 10) { /* Left Shift Popup: Menu item to shift left by n places (n < 10) */ - format = ngettext("_%d place", "_%d places", i); + text = g_strdup_printf(ngettext("_%d place", "_%d places", i), i); } else { /* Left Shift Popup: Menu item to shift left by n places (n >= 10) */ - format = ngettext("%d place", "%d places", i); + text = g_strdup_printf(ngettext("%d place", "%d places", i), i); } - text = g_strdup_printf(format, i); label = gtk_label_new_with_mnemonic(text); item = gtk_menu_item_new(); @@ -945,17 +944,16 @@ shift_right_cb(GtkWidget *widget, MathButtons *buttons) for (i = 1; i < 16; i++) { GtkWidget *item, *label; - gchar *format, *text; + gchar *text; if (i < 10) { /* Right Shift Popup: Menu item to shift right by n places (n < 10) */ - format = ngettext("_%d place", "_%d places", i); + text = g_strdup_printf(ngettext("_%d place", "_%d places", i), i); } else { /* Right Shift Popup: Menu item to shift right by n places (n >= 10) */ - format = ngettext("%d place", "%d places", i); + text = g_strdup_printf(ngettext("%d place", "%d places", i), i); } - text = g_strdup_printf(format, i); label = gtk_label_new_with_mnemonic(text); item = gtk_menu_item_new(); |