Fix generic combobox bug
authorH.G. Muller <h.g.muller@hccnet.nl>
Fri, 6 May 2011 19:00:25 +0000 (21:00 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Sat, 7 May 2011 12:47:39 +0000 (14:47 +0200)
The patch placing gettext markers was done wrong, setting the
translated menu text outside the loop, so all entries became the same.

xoptions.c

index 0c1e4c9..dedda96 100644 (file)
@@ -698,11 +698,11 @@ void CreateComboPopup(parent, name, n, mb)
                              parent, NULL, 0);
     j = 0;
     XtSetArg(args[j], XtNwidth, 100);  j++;
-    XtSetArg(args[j], XtNlabel, _(mb[i]));  j++;
 //    XtSetArg(args[j], XtNright, XtChainRight);  j++;
     while (mb[i] != NULL) {
+           XtSetArg(args[j], XtNlabel, _(mb[i]));
            entry = XtCreateManagedWidget(mb[i], smeBSBObjectClass,
-                                         menu, args, j);
+                                         menu, args, j+1);
            XtAddCallback(entry, XtNcallback,
                          (XtCallbackProc) ComboSelect,
                          (caddr_t)(intptr_t) (256*n+i));