Lines 174-186
Link Here
|
174 |
imsearchparams ts; |
174 |
imsearchparams ts; |
175 |
|
175 |
|
176 |
if(subj != fsrss) { |
176 |
if(subj != fsrss) { |
177 |
for(protocolname apname = icq; apname != protocolname_size; (int) apname += 1) { |
177 |
for(int apname = icq; apname != protocolname_size; apname += 1) { |
178 |
if(subj == fschannel) |
178 |
if(subj == fschannel) |
179 |
if(!gethook(apname).getCapabs().count(hookcapab::conferencing)) |
179 |
if(!gethook((protocolname)apname).getCapabs().count(hookcapab::conferencing)) |
180 |
continue; |
180 |
continue; |
181 |
|
181 |
|
182 |
if(gethook(apname).logged() || apname == infocard) { |
182 |
if(gethook((protocolname)apname).logged() || apname == infocard) { |
183 |
penabled.push_back(apname); |
183 |
penabled.push_back((protocolname)apname); |
184 |
} |
184 |
} |
185 |
} |
185 |
} |
186 |
|
186 |
|
Lines 937-944
Link Here
|
937 |
m.setwindow(textwindow(4, LINES-8, 20, LINES-4, conf.getcolor(cp_dialog_menu))); |
937 |
m.setwindow(textwindow(4, LINES-8, 20, LINES-4, conf.getcolor(cp_dialog_menu))); |
938 |
m.idle = &menuidle; |
938 |
m.idle = &menuidle; |
939 |
|
939 |
|
940 |
for(imgender i = genderUnspec; i != imgender_size; (int) i += 1) { |
940 |
for(int i = genderUnspec; i != imgender_size; i += 1) { |
941 |
m.additemf(0, (int) i, " %s", strgender(i)); |
941 |
m.additemf(0, i, " %s", strgender((imgender)i)); |
942 |
if(i == f) m.setpos(m.getcount()-1); |
942 |
if(i == f) m.setpos(m.getcount()-1); |
943 |
} |
943 |
} |
944 |
|
944 |
|
Lines 953-965
Link Here
|
953 |
m.setwindow(textwindow(4, LINES-8, 18, LINES-3, conf.getcolor(cp_dialog_menu))); |
953 |
m.setwindow(textwindow(4, LINES-8, 18, LINES-3, conf.getcolor(cp_dialog_menu))); |
954 |
m.idle = &menuidle; |
954 |
m.idle = &menuidle; |
955 |
|
955 |
|
956 |
for(ICQ2000::AgeRange i = ICQ2000::RANGE_NORANGE; i <= ICQ2000::RANGE_60_ABOVE; (int) i += 1) { |
956 |
for(int i = ICQ2000::RANGE_NORANGE; i <= ICQ2000::RANGE_60_ABOVE; i += 1) { |
957 |
const char *p = stragerange(i); |
957 |
const char *p = stragerange((ICQ2000::AgeRange)i); |
958 |
|
958 |
|
959 |
if(i == ICQ2000::RANGE_NORANGE) |
959 |
if(i == ICQ2000::RANGE_NORANGE) |
960 |
p = _("none"); |
960 |
p = _("none"); |
961 |
|
961 |
|
962 |
m.additemf(0, (int) i, " %s", p); |
962 |
m.additemf(0, i, " %s", p); |
963 |
if(i == r) m.setpos(m.getcount()-1); |
963 |
if(i == r) m.setpos(m.getcount()-1); |
964 |
} |
964 |
} |
965 |
|
965 |
|
Lines 1071-1084
Link Here
|
1071 |
} |
1071 |
} |
1072 |
|
1072 |
|
1073 |
void icqface::multichange(bool conv[], bool newstate) { |
1073 |
void icqface::multichange(bool conv[], bool newstate) { |
1074 |
protocolname pname; |
1074 |
int pname; |
1075 |
|
1075 |
|
1076 |
for(pname = icq; pname != protocolname_size; (int) pname += 1) |
1076 |
for(pname = icq; pname != protocolname_size; pname += 1) |
1077 |
if((!conf.getourid(pname).empty() || pname == rss) && conv[pname]) break; |
1077 |
if((!conf.getourid((protocolname)pname).empty() || pname == rss) && conv[pname]) break; |
1078 |
|
1078 |
|
1079 |
if(pname == protocolname_size || !newstate) { |
1079 |
if(pname == protocolname_size || !newstate) { |
1080 |
for(pname = icq; pname != protocolname_size; (int) pname += 1) |
1080 |
for(pname = icq; pname != protocolname_size; pname += 1) |
1081 |
if(!conf.getourid(pname).empty() || pname == rss) |
1081 |
if(!conf.getourid((protocolname)pname).empty() || pname == rss) |
1082 |
conv[pname] = newstate; |
1082 |
conv[pname] = newstate; |
1083 |
} |
1083 |
} |
1084 |
} |
1084 |
} |
Lines 1086-1092
Link Here
|
1086 |
bool icqface::updateconf(icqconf::regsound &s, icqconf::regcolor &c) { |
1086 |
bool icqface::updateconf(icqconf::regsound &s, icqconf::regcolor &c) { |
1087 |
bool finished, success, hasany; |
1087 |
bool finished, success, hasany; |
1088 |
int nopt, n, i, b, nconf, ncomm, aaway, ana, noth, nfeat, ncl; |
1088 |
int nopt, n, i, b, nconf, ncomm, aaway, ana, noth, nfeat, ncl; |
1089 |
protocolname pname; |
1089 |
int pname; |
1090 |
string tmp, phidden; |
1090 |
string tmp, phidden; |
1091 |
|
1091 |
|
1092 |
string smtp = conf.getsmtphost() + ":" + i2str(conf.getsmtpport()); |
1092 |
string smtp = conf.getsmtphost() + ":" + i2str(conf.getsmtpport()); |
Lines 1133-1147
Link Here
|
1133 |
bool chatmode[protocolname_size], conv[protocolname_size], |
1133 |
bool chatmode[protocolname_size], conv[protocolname_size], |
1134 |
entersends[protocolname_size], nonimonline[protocolname_size]; |
1134 |
entersends[protocolname_size], nonimonline[protocolname_size]; |
1135 |
|
1135 |
|
1136 |
for(pname = icq; pname != protocolname_size; (int) pname += 1) { |
1136 |
for(pname = icq; pname != protocolname_size; pname += 1) { |
1137 |
chatmode[pname] = conf.getchatmode(pname); |
1137 |
chatmode[pname] = conf.getchatmode((protocolname)pname); |
1138 |
entersends[pname] = conf.getentersends(pname); |
1138 |
entersends[pname] = conf.getentersends((protocolname)pname); |
1139 |
conv[pname] = conf.getcpconvert(pname); |
1139 |
conv[pname] = conf.getcpconvert((protocolname)pname); |
1140 |
nonimonline[pname] = conf.getnonimonline(pname); |
1140 |
nonimonline[pname] = conf.getnonimonline((protocolname)pname); |
1141 |
} |
1141 |
} |
1142 |
|
1142 |
|
1143 |
for(hasany = false, pname = icq; pname != protocolname_size && !hasany; (int) pname += 1) |
1143 |
for(hasany = false, pname = icq; pname != protocolname_size && !hasany; pname += 1) |
1144 |
hasany = !conf.getourid(pname).empty(); |
1144 |
hasany = !conf.getourid((protocolname)pname).empty(); |
1145 |
|
1145 |
|
1146 |
dialogbox db; |
1146 |
dialogbox db; |
1147 |
|
1147 |
|
Lines 1183-1192
Link Here
|
1183 |
|
1183 |
|
1184 |
i = t.addnode(_(" Codepages conversion ")); |
1184 |
i = t.addnode(_(" Codepages conversion ")); |
1185 |
|
1185 |
|
1186 |
for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1) |
1186 |
for(tmp = "", pname = icq; pname != protocolname_size; pname += 1) |
1187 |
if(conv[pname]) |
1187 |
if(conv[pname]) |
1188 |
if(!conf.getourid(pname).empty() || pname == rss) |
1188 |
if(!conf.getourid((protocolname)pname).empty() || pname == rss) |
1189 |
tmp += conf.getprotocolname(pname) + " "; |
1189 |
tmp += conf.getprotocolname((protocolname)pname) + " "; |
1190 |
|
1190 |
|
1191 |
t.addleaff(i, 0, 26, _(" Switch to language preset : %s "), iconvlang->c_str()); |
1191 |
t.addleaff(i, 0, 26, _(" Switch to language preset : %s "), iconvlang->c_str()); |
1192 |
t.addleaff(i, 0, 27, _(" Convert from : %s "), convertfrom.c_str()); |
1192 |
t.addleaff(i, 0, 27, _(" Convert from : %s "), convertfrom.c_str()); |
Lines 1206-1220
Link Here
|
1206 |
t.addleaff(i, 0, 7, _(" Edit away message on status change : %s "), stryesno(askaway)); |
1206 |
t.addleaff(i, 0, 7, _(" Edit away message on status change : %s "), stryesno(askaway)); |
1207 |
|
1207 |
|
1208 |
if(hasany) { |
1208 |
if(hasany) { |
1209 |
for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1) |
1209 |
for(tmp = "", pname = icq; pname != protocolname_size; pname += 1) |
1210 |
if(chatmode[pname] && !conf.getourid(pname).empty()) |
1210 |
if(chatmode[pname] && !conf.getourid((protocolname)pname).empty()) |
1211 |
tmp += conf.getprotocolname(pname) + " "; |
1211 |
tmp += conf.getprotocolname((protocolname)pname) + " "; |
1212 |
|
1212 |
|
1213 |
t.addleaff(i, 0, 16, _(" Chat messaging mode for : %s"), tmp.c_str()); |
1213 |
t.addleaff(i, 0, 16, _(" Chat messaging mode for : %s"), tmp.c_str()); |
1214 |
|
1214 |
|
1215 |
for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1) |
1215 |
for(tmp = "", pname = icq; pname != protocolname_size; pname += 1) |
1216 |
if(entersends[pname] && !conf.getourid(pname).empty()) |
1216 |
if(entersends[pname] && !conf.getourid((protocolname)pname).empty()) |
1217 |
tmp += conf.getprotocolname(pname) + " "; |
1217 |
tmp += conf.getprotocolname((protocolname)pname) + " "; |
1218 |
|
1218 |
|
1219 |
t.addleaff(i, 0, 25, _(" Enter key sends message for : %s"), tmp.c_str()); |
1219 |
t.addleaff(i, 0, 25, _(" Enter key sends message for : %s"), tmp.c_str()); |
1220 |
|
1220 |
|
Lines 1224-1231
Link Here
|
1224 |
|
1224 |
|
1225 |
} |
1225 |
} |
1226 |
|
1226 |
|
1227 |
for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1) |
1227 |
for(tmp = "", pname = icq; pname != protocolname_size; pname += 1) |
1228 |
if(nonimonline[pname]) tmp += conf.getprotocolname(pname) + " "; |
1228 |
if(nonimonline[pname]) tmp += conf.getprotocolname((protocolname)pname) + " "; |
1229 |
|
1229 |
|
1230 |
t.addleaff(i, 0, 29, _(" Always online non-IM contacts for : %s"), tmp.c_str()); |
1230 |
t.addleaff(i, 0, 29, _(" Always online non-IM contacts for : %s"), tmp.c_str()); |
1231 |
|
1231 |
|
Lines 1267-1273
Link Here
|
1267 |
break; |
1267 |
break; |
1268 |
case 3: |
1268 |
case 3: |
1269 |
if(hasany) selectproto(conv, spIMplusRSS); else |
1269 |
if(hasany) selectproto(conv, spIMplusRSS); else |
1270 |
for(pname = icq; pname != protocolname_size; (int) pname += 1) |
1270 |
for(pname = icq; pname != protocolname_size; pname += 1) |
1271 |
conv[pname] = !conv[pname]; |
1271 |
conv[pname] = !conv[pname]; |
1272 |
break; |
1272 |
break; |
1273 |
case 4: |
1273 |
case 4: |
Lines 1288-1294
Link Here
|
1288 |
case 15: mailcheck = !mailcheck; break; |
1288 |
case 15: mailcheck = !mailcheck; break; |
1289 |
case 16: |
1289 |
case 16: |
1290 |
if(hasany) selectproto(chatmode); else |
1290 |
if(hasany) selectproto(chatmode); else |
1291 |
for(pname = icq; pname != protocolname_size; (int) pname += 1) |
1291 |
for(pname = icq; pname != protocolname_size; pname += 1) |
1292 |
chatmode[pname] = !chatmode[pname]; |
1292 |
chatmode[pname] = !chatmode[pname]; |
1293 |
break; |
1293 |
break; |
1294 |
|
1294 |
|
Lines 1328-1334
Link Here
|
1328 |
break; |
1328 |
break; |
1329 |
case 25: |
1329 |
case 25: |
1330 |
if(hasany) selectproto(entersends); else |
1330 |
if(hasany) selectproto(entersends); else |
1331 |
for(pname = icq; pname != protocolname_size; (int) pname += 1) |
1331 |
for(pname = icq; pname != protocolname_size; pname += 1) |
1332 |
entersends[pname] = !entersends[pname]; |
1332 |
entersends[pname] = !entersends[pname]; |
1333 |
break; |
1333 |
break; |
1334 |
case 26: |
1334 |
case 26: |
Lines 1381-1393
Link Here
|
1381 |
conf.setaskaway(askaway); |
1381 |
conf.setaskaway(askaway); |
1382 |
conf.setcharsets(convertfrom, convertto); |
1382 |
conf.setcharsets(convertfrom, convertto); |
1383 |
|
1383 |
|
1384 |
for(pname = icq; pname != protocolname_size; (int) pname += 1) { |
1384 |
for(pname = icq; pname != protocolname_size; pname += 1) { |
1385 |
conf.setchatmode(pname, chatmode[pname]); |
1385 |
conf.setchatmode((protocolname)pname, chatmode[pname]); |
1386 |
conf.setentersends(pname, entersends[pname]); |
1386 |
conf.setentersends((protocolname)pname, entersends[pname]); |
1387 |
conf.setnonimonline(pname, nonimonline[pname]); |
1387 |
conf.setnonimonline((protocolname)pname, nonimonline[pname]); |
1388 |
|
1388 |
|
1389 |
bool bconv = conv[pname] && (!convertfrom.empty() || !convertto.empty()); |
1389 |
bool bconv = conv[pname] && (!convertfrom.empty() || !convertto.empty()); |
1390 |
conf.setcpconvert(pname, bconv || !hasany); |
1390 |
conf.setcpconvert((protocolname)pname, bconv || !hasany); |
1391 |
} |
1391 |
} |
1392 |
|
1392 |
|
1393 |
conf.setbidi(bidi); |
1393 |
conf.setbidi(bidi); |
Lines 1419-1435
Link Here
|
1419 |
int i, protmax; |
1419 |
int i, protmax; |
1420 |
bool r, finished = false; |
1420 |
bool r, finished = false; |
1421 |
|
1421 |
|
1422 |
protocolname pname; |
1422 |
int pname; |
1423 |
protocolname tempprots[protocolname_size]; |
1423 |
protocolname tempprots[protocolname_size]; |
1424 |
bool aprots[protocolname_size]; |
1424 |
bool aprots[protocolname_size]; |
1425 |
|
1425 |
|
1426 |
i = 0; |
1426 |
i = 0; |
1427 |
memcpy(aprots, prots, sizeof(aprots)); |
1427 |
memcpy(aprots, prots, sizeof(aprots)); |
1428 |
|
1428 |
|
1429 |
for(pname = icq; pname != protocolname_size; (int) pname += 1) { |
1429 |
for(pname = icq; pname != protocolname_size; pname += 1) { |
1430 |
if(mode == spnonIM) { |
1430 |
if(mode == spnonIM) { |
1431 |
if(pname != infocard) |
1431 |
if(pname != infocard) |
1432 |
if(!gethook(pname).getCapabs().count(hookcapab::nochat)) |
1432 |
if(!gethook((protocolname)pname).getCapabs().count(hookcapab::nochat)) |
1433 |
continue; |
1433 |
continue; |
1434 |
|
1434 |
|
1435 |
if(pname == livejournal) |
1435 |
if(pname == livejournal) |
Lines 1438-1456
Link Here
|
1438 |
} else { |
1438 |
} else { |
1439 |
if(mode != spIMplusRSS || pname != rss) |
1439 |
if(mode != spIMplusRSS || pname != rss) |
1440 |
if(pname != livejournal || mode == spIMonly) { |
1440 |
if(pname != livejournal || mode == spIMonly) { |
1441 |
if(gethook(pname).getCapabs().count(hookcapab::nochat)) |
1441 |
if(gethook((protocolname)pname).getCapabs().count(hookcapab::nochat)) |
1442 |
continue; |
1442 |
continue; |
1443 |
|
1443 |
|
1444 |
if(conf.getourid(pname).empty()) |
1444 |
if(conf.getourid((protocolname)pname).empty()) |
1445 |
continue; |
1445 |
continue; |
1446 |
|
1446 |
|
1447 |
} |
1447 |
} |
1448 |
|
1448 |
|
1449 |
if(!gethook(pname).enabled()) |
1449 |
if(!gethook((protocolname)pname).enabled()) |
1450 |
continue; |
1450 |
continue; |
1451 |
} |
1451 |
} |
1452 |
|
1452 |
|
1453 |
tempprots[i++] = pname; |
1453 |
tempprots[i++] = (protocolname)pname; |
1454 |
} |
1454 |
} |
1455 |
|
1455 |
|
1456 |
protmax = i; |
1456 |
protmax = i; |