Fix clipping of menu texts after sizing
authorH.G.Muller <hgm@hgm-xboard.(none)>
Tue, 5 Apr 2016 20:07:27 +0000 (22:07 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Sun, 17 Apr 2016 08:24:58 +0000 (10:24 +0200)
When tinyLayout = 0 the texts should not be clipped at all, rather
than to a single letter.

gtk/xboard.c

index f9163b8..3cac488 100644 (file)
@@ -1709,7 +1709,7 @@ ReSize (WindowPlacement *wp)
            char text[MSG_SIZ];
            for(h=1; mainOptions[h].type == DropDown; h++) {
                strncpy(text, _(mainOptions[h].name), MSG_SIZ);
-               text[clip + (text[clip-1] == '_')] = NULLCHAR;
+               if(clip != 1) text[clip + (text[clip-1] == '_')] = NULLCHAR;
                gtk_menu_item_set_label((GtkMenuItem *) mainOptions[h].handle, text);
            }
        }