comparison lwlib/lwlib-Xm.c @ 83271:1830bcd0eec0

Merged from miles@gnu.org--gnu-2005 (patch 39-44, 184-191) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-184 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-185 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-186 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-187 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-188 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-189 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-190 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-191 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-39 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-40 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-41 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-42 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-43 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-44 Merge from emacs--cvs-trunk--0 git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-311
author Karoly Lorentey <lorentey@elte.hu>
date Sat, 19 Mar 2005 17:55:13 +0000
parents 68d57432d36d
children 23a17af379b1 30ad2795fdab
comparison
equal deleted inserted replaced
83270:42406ecdf5bf 83271:1830bcd0eec0
1 /* The lwlib interface to Motif widgets. 1 /* The lwlib interface to Motif widgets.
2 Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2004, 2005
3 Free Software Foundation, Inc.
2 Copyright (C) 1992 Lucid, Inc. 4 Copyright (C) 1992 Lucid, Inc.
3 5
4 This file is part of the Lucid Widget Library. 6 This file is part of the Lucid Widget Library.
5 7
6 The Lucid Widget Library is free software; you can redistribute it and/or 8 The Lucid Widget Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License as published by 9 modify it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 1, or (at your option) 10 the Free Software Foundation; either version 2, or (at your option)
9 any later version. 11 any later version.
10 12
11 The Lucid Widget Library is distributed in the hope that it will be useful, 13 The Lucid Widget Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
366 XtSetArg (al [ac], XmNlabelString, res_string); ac++; 368 XtSetArg (al [ac], XmNlabelString, res_string); ac++;
367 } 369 }
368 else 370 else
369 { 371 {
370 built_string = 372 built_string =
371 XmStringCreateLtoR (val->value, XmSTRING_DEFAULT_CHARSET); 373 XmStringCreateLocalized (val->value);
372 XtSetArg (al [ac], XmNlabelString, built_string); ac++; 374 XtSetArg (al [ac], XmNlabelString, built_string); ac++;
373 } 375 }
374 376
375 XtSetArg (al [ac], XmNlabelType, XmSTRING); ac++; 377 XtSetArg (al [ac], XmNlabelType, XmSTRING); ac++;
376 } 378 }
377 379
378 if (val->key) 380 if (val->key)
379 { 381 {
380 key_string = XmStringCreateLtoR (val->key, XmSTRING_DEFAULT_CHARSET); 382 key_string = XmStringCreateLocalized (val->key);
381 XtSetArg (al [ac], XmNacceleratorText, key_string); ac++; 383 XtSetArg (al [ac], XmNacceleratorText, key_string); ac++;
382 } 384 }
383 385
384 if (ac) 386 if (ac)
385 XtSetValues (widget, al, ac); 387 XtSetValues (widget, al, ac);
404 XtAddCallback (widget, XmNsingleSelectionCallback, xm_generic_callback, 406 XtAddCallback (widget, XmNsingleSelectionCallback, xm_generic_callback,
405 instance); 407 instance);
406 for (cur = val->contents, i = 0; cur; cur = cur->next) 408 for (cur = val->contents, i = 0; cur; cur = cur->next)
407 if (cur->value) 409 if (cur->value)
408 { 410 {
409 XmString xmstr = XmStringCreate (cur->value, XmSTRING_DEFAULT_CHARSET); 411 XmString xmstr = XmStringCreateLocalized (cur->value);
410 i += 1; 412 i += 1;
411 XmListAddItem (widget, xmstr, 0); 413 XmListAddItem (widget, xmstr, 0);
412 if (cur->selected) 414 if (cur->selected)
413 XmListSelectPos (widget, i, False); 415 XmListSelectPos (widget, i, False);
414 XmStringFree (xmstr); 416 XmStringFree (xmstr);