33
34
m_mode_full (m_config.initFull ()),
34
35
m_mode_full_punct (m_config.initFullPunct ()),
35
36
m_mode_simp (m_config.initSimpChinese ()),
36
m_prop_chinese ("mode.chinese",
37
m_prop_chinese ("InputMode",
39
StaticText (m_mode_chinese ?
40
43
PKGDATADIR"/icons/chinese.svg" :
41
44
PKGDATADIR"/icons/english.svg",
42
StaticText (_("Chinese"))),
45
StaticText (m_mode_chinese ?
46
_("Switch to English Mode") :
47
_("Switch to Chinese Mode"))),
43
48
m_prop_full ("mode.full",
45
StaticText (m_mode_full ? "Aa" : "Aa"),
50
StaticText (m_mode_full ?
51
_("Full Width Letter") :
52
_("Half Width Letter")),
47
54
PKGDATADIR"/icons/full.svg" :
48
55
PKGDATADIR"/icons/half.svg",
49
StaticText (_("Full/Half width"))),
56
StaticText (m_mode_full ?
57
_("Switch to Half Width Letter Mode"):
58
_("Switch to Full Width Letter Mode"))),
50
59
m_prop_full_punct ("mode.full_punct",
52
StaticText (m_mode_full_punct ? ",。" : ",."),
61
StaticText (m_mode_full_punct ?
62
_("Full Width Punct") :
63
_("Half Width Punct")),
53
64
m_mode_full_punct ?
54
65
PKGDATADIR"/icons/full-punct.svg" :
55
66
PKGDATADIR"/icons/half-punct.svg",
56
StaticText (_("Full/Half width punctuation"))),
67
StaticText (m_mode_full_punct ?
68
_("Switch to Half Width Punctuation Mode"):
69
_("Switch to Full Width Punctuation Mode"))),
57
70
m_prop_simp ( "mode.simp",
59
StaticText (m_mode_simp ? "简" : "繁"),
72
StaticText (m_mode_simp ?
73
_("Simplified Chinese") :
74
_("Traditional Chinese")),
61
76
PKGDATADIR"/icons/simp-chinese.svg" :
62
77
PKGDATADIR"/icons/trad-chinese.svg",
63
StaticText (_("Simplfied/Traditional Chinese"))),
78
StaticText (m_mode_simp ?
79
_("Switch to Traditional Chinese Mode"):
80
_("Switch to Simplfied Chinese Mode"))),
64
81
m_prop_setup ("setup",
66
83
StaticText (_("Preferences")),
68
85
StaticText (_("Preferences")))
88
m_prop_chinese.setSymbol(N_("中"));
90
m_prop_chinese.setSymbol(N_("英"));
70
92
m_props.append (m_prop_chinese);
71
93
m_props.append (m_prop_full);
72
94
m_props.append (m_prop_full_punct);
79
101
PinyinProperties::toggleModeChinese (void)
81
103
m_mode_chinese = ! m_mode_chinese;
82
m_prop_chinese.setLabel (m_mode_chinese ? "CN" : "EN");
104
m_prop_chinese.setLabel (m_mode_chinese ?
109
m_prop_chinese.setSymbol(N_("中"));
111
m_prop_chinese.setSymbol(N_("英"));
83
113
m_prop_chinese.setIcon (m_mode_chinese ?
84
PKGDATADIR"/icons/chinese.svg" :
85
PKGDATADIR"/icons/english.svg");
114
PKGDATADIR"/icons/chinese.svg" :
115
PKGDATADIR"/icons/english.svg");
116
m_prop_chinese.setTooltip (m_mode_chinese ?
117
_("Switch to English Mode") :
118
_("Switch to Chinese Mode"));
86
119
updateProperty (m_prop_chinese);
88
121
m_prop_full_punct.setSensitive (m_mode_chinese);
93
126
PinyinProperties::toggleModeFull (void)
95
128
m_mode_full = !m_mode_full;
96
m_prop_full.setLabel (m_mode_full ? "Aa" : "Aa");
129
m_prop_full.setLabel (m_mode_full ?
130
_("Full Width Letter") :
131
_("Half Width Letter"));
97
132
m_prop_full.setIcon (m_mode_full ?
98
PKGDATADIR"/icons/full.svg" :
99
PKGDATADIR"/icons/half.svg");
133
PKGDATADIR"/icons/full.svg" :
134
PKGDATADIR"/icons/half.svg");
135
m_prop_full.setTooltip (m_mode_full ?
136
_("Switch to Half Width Letter Mode"):
137
_("Switch to Full Width Letter Mode"));
100
138
updateProperty (m_prop_full);
104
142
PinyinProperties::toggleModeFullPunct (void)
106
144
m_mode_full_punct = !m_mode_full_punct;
107
m_prop_full_punct.setLabel (m_mode_full_punct ? ",。" : ",.");
145
m_prop_full_punct.setLabel (m_mode_full_punct ?
146
_("Full Width Punct") :
147
_("Half Width Punct"));
108
148
m_prop_full_punct.setIcon (m_mode_full_punct ?
109
149
PKGDATADIR"/icons/full-punct.svg" :
110
150
PKGDATADIR"/icons/half-punct.svg");
151
m_prop_full_punct.setTooltip(m_mode_full_punct ?
152
_("Switch to Half Width Punctuation Mode"):
153
_("Switch to Full Width Punctuation Mode"));
111
154
updateProperty (m_prop_full_punct);
115
158
PinyinProperties::toggleModeSimp (void)
117
160
m_mode_simp = ! m_mode_simp;
118
m_prop_simp.setLabel (m_mode_simp ? "简" : "繁");
161
m_prop_simp.setLabel (m_mode_simp ?
162
_("Simplified Chinese") :
163
_("Traditional Chinese"));
119
164
m_prop_simp.setIcon (m_mode_simp ?
120
165
PKGDATADIR"/icons/simp-chinese.svg" :
121
166
PKGDATADIR"/icons/trad-chinese.svg");
167
m_prop_simp.setTooltip(m_mode_simp ?
168
_("Switch to Traditional Chinese Mode"):
169
_("Switch to Simplfied Chinese Mode"));
122
170
updateProperty (m_prop_simp);