Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/code/icon.js
Show All 29 Lines | 29 | } else if (percent <= 0.25) { | |||
---|---|---|---|---|---|
30 | icon = prefix + "-low"; | 30 | icon = prefix + "-low"; | ||
31 | } else if (percent <= 0.75) { | 31 | } else if (percent <= 0.75) { | ||
32 | icon = prefix + "-medium"; | 32 | icon = prefix + "-medium"; | ||
33 | } else { | 33 | } else { | ||
34 | icon = prefix + "-high"; | 34 | icon = prefix + "-high"; | ||
35 | } | 35 | } | ||
36 | return icon; | 36 | return icon; | ||
37 | } | 37 | } | ||
38 | | ||||
39 | function formFactorIcon(formFactor) { | ||||
40 | switch(formFactor) { | ||||
41 | case "internal": | ||||
42 | return "audio-card"; | ||||
43 | case "speaker": | ||||
44 | return "audio-speakers-symbolic"; | ||||
45 | case "phone": | ||||
46 | return "phone"; | ||||
47 | case "handset": | ||||
48 | return "phone"; | ||||
49 | case "tv": | ||||
50 | return "video-television"; | ||||
51 | case "webcam": | ||||
52 | return "camera-web"; | ||||
53 | case "microphone": | ||||
54 | return "audio-input-microphone"; | ||||
55 | case "headset": | ||||
56 | return "audio-headset"; | ||||
57 | case "headphone": | ||||
58 | return "audio-headphones"; | ||||
59 | case "hands-free": | ||||
60 | return "hands-free"; | ||||
61 | case "car": | ||||
62 | return "car"; | ||||
63 | case "hifi": | ||||
64 | return "hifi"; | ||||
65 | case "computer": | ||||
66 | return "computer"; | ||||
67 | case "portable": | ||||
68 | return "portable"; | ||||
69 | } | ||||
70 | return ""; | ||||
71 | } |