Add ZRTP/SRTP encryption, direct accountless calling, and alphanumeric input fix to SIP client
This commit is contained in:
1 parent
e92f7e9d96
commit
61768fa88e
15 files changed
+1468
-203
No files matched your search
@@ -560,18 +560,32 @@ int irc_run_main(int argc, char** argv) {
|
||||
|
||||
auto syncEditInput = [&]() {
|
||||
if (!editModalOpen) {
|
||||
neoui_input_set_mode(NEO_INPUT_ABC_LOWER);
|
||||
neoui_input_reset(chatInput.c_str());
|
||||
return;
|
||||
}
|
||||
if (editFieldIdx == 0) neoui_input_reset(editDraft.label.c_str());
|
||||
else if (editFieldIdx == 1) neoui_input_reset(editDraft.host.c_str());
|
||||
else if (editFieldIdx == 2) {
|
||||
if (editFieldIdx == 0) {
|
||||
neoui_input_set_mode(NEO_INPUT_ABC_TITLE);
|
||||
neoui_input_reset(editDraft.label.c_str());
|
||||
} else if (editFieldIdx == 1) {
|
||||
neoui_input_set_mode(NEO_INPUT_ABC_LOWER);
|
||||
neoui_input_reset(editDraft.host.c_str());
|
||||
} else if (editFieldIdx == 2) {
|
||||
neoui_input_set_mode(NEO_INPUT_123);
|
||||
neoui_input_reset(std::to_string(editDraft.port).c_str());
|
||||
} else if (editFieldIdx == 4) neoui_input_reset(editDraft.nick.c_str());
|
||||
else if (editFieldIdx == 5) neoui_input_reset(editDraft.saslUser.c_str());
|
||||
else if (editFieldIdx == 6) neoui_input_reset(editDraft.saslPass.c_str());
|
||||
else if (editFieldIdx == 7) neoui_input_reset(editDraft.autoJoin.c_str());
|
||||
} else if (editFieldIdx == 4) {
|
||||
neoui_input_set_mode(NEO_INPUT_ABC_LOWER);
|
||||
neoui_input_reset(editDraft.nick.c_str());
|
||||
} else if (editFieldIdx == 5) {
|
||||
neoui_input_set_mode(NEO_INPUT_ABC_LOWER);
|
||||
neoui_input_reset(editDraft.saslUser.c_str());
|
||||
} else if (editFieldIdx == 6) {
|
||||
neoui_input_set_mode(NEO_INPUT_ABC_LOWER);
|
||||
neoui_input_reset(editDraft.saslPass.c_str());
|
||||
} else if (editFieldIdx == 7) {
|
||||
neoui_input_set_mode(NEO_INPUT_ABC_LOWER);
|
||||
neoui_input_reset(editDraft.autoJoin.c_str());
|
||||
}
|
||||
};
|
||||
|
||||
auto applyEditInput = [&]() {
|
||||
@@ -895,14 +909,28 @@ int irc_run_main(int argc, char** argv) {
|
||||
} else if (editFieldIdx == 8) {
|
||||
editDraft.keepInBackground = !editDraft.keepInBackground;
|
||||
}
|
||||
} else if (k == NEO_KEY_STAR) {
|
||||
} else if (k == NEO_KEY_STAR || k == NEO_KEY_HASH) {
|
||||
neoui_input_cycle_mode();
|
||||
} else if (k == NEO_KEY_RIGHT && neoui_input_is_tap_active()) {
|
||||
neoui_input_commit_tap();
|
||||
applyEditInput();
|
||||
} else if (k == NEO_KEY_BACK) {
|
||||
neoui_input_backspace();
|
||||
applyEditInput();
|
||||
} else if (k >= NEO_KEY_0 && k <= NEO_KEY_9) {
|
||||
neoui_input_feed_key(k);
|
||||
applyEditInput();
|
||||
} else {
|
||||
int ks = neoui_event_keysym();
|
||||
if (ks >= 0x20 && ks <= 0x7e && editFieldIdx != 3 && editFieldIdx != 8) {
|
||||
neoui_input_commit_tap();
|
||||
if (editFieldIdx != 2 || (ks >= '0' && ks <= '9')) {
|
||||
std::string cur = neoui_input_get_text();
|
||||
cur.push_back(static_cast<char>(ks));
|
||||
neoui_input_set_text(cur.c_str());
|
||||
applyEditInput();
|
||||
}
|
||||
}
|
||||
}
|
||||
render();
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user