alsa.audio: limit the supported frequencies to common set
[AROS.git] / workbench / libs / asl / locale.c
blobe6035910ffb635ff0f2ba75d3f1b05d77484d9ad
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 /*******************************************************************************************/
9 #include <libraries/gadtools.h>
10 #include <proto/exec.h>
11 #include <proto/dos.h>
12 #include <proto/locale.h>
14 #include "asl_intern.h"
16 #define CATCOMP_ARRAY
17 #include "strings.h"
19 /*******************************************************************************************/
21 STRPTR GetString(LONG id, struct Catalog *catalog, struct AslBase_intern *AslBase)
23 STRPTR retval = CatCompArray[id].cca_Str;
25 if (catalog && LocaleBase)
27 retval = (STRPTR)GetCatalogStr(catalog, id, retval);
30 return retval;
33 /*******************************************************************************************/
35 void LocalizeMenus(struct NewMenu *nm, struct Catalog *catalog, struct AslBase_intern *AslBase)
37 struct NewMenu *actnm = nm;
39 for(actnm = nm; actnm->nm_Type != NM_END; actnm++)
41 if (actnm->nm_Label != NM_BARLABEL)
43 IPTR id = (IPTR)actnm->nm_Label;
44 STRPTR str = GetString(id, catalog, AslBase);
46 switch(actnm->nm_Type)
48 case NM_TITLE:
49 actnm->nm_Label = str;
50 break;
52 case NM_ITEM:
53 case NM_SUB:
54 actnm->nm_Label = str + 2;
55 if (str[0] != ' ') actnm->nm_CommKey = str;
56 break;
59 } /* if (actnm->nm_Label != NM_BARLABEL) */
61 } /* for(actnm = nm; nm->nm_Type != NM_END; nm++) */
65 /*******************************************************************************************/