Compare commits
5 Commits
4248d1d9ab
...
tmp_tox_lo
Author | SHA1 | Date | |
---|---|---|---|
30f96b780b | |||
85a06de59a | |||
6b5f40b4a0 | |||
7495a50723 | |||
1cdde5170b |
2
external/solanaceae_message3
vendored
2
external/solanaceae_message3
vendored
Submodule external/solanaceae_message3 updated: 48fb5f0889...1a036c2321
2
external/solanaceae_util
vendored
2
external/solanaceae_util
vendored
Submodule external/solanaceae_util updated: 92eee153f2...2b20c2d2a4
5
external/toxcore/CMakeLists.txt
vendored
5
external/toxcore/CMakeLists.txt
vendored
@ -164,9 +164,10 @@ configure_file(
|
||||
target_include_directories(toxcore PRIVATE "${TOX_DIR}toxcore")
|
||||
target_include_directories(toxcore PUBLIC "${TOX_DIR}")
|
||||
|
||||
target_compile_definitions(toxcore PUBLIC USE_IPV6=1)
|
||||
#target_compile_definitions(toxcore PUBLIC USE_IPV6=1)
|
||||
target_compile_definitions(toxcore PUBLIC MIN_LOGGER_LEVEL=LOGGER_LEVEL_TRACE)
|
||||
#target_compile_definitions(toxcore PUBLIC MIN_LOGGER_LEVEL=LOGGER_LEVEL_DEBUG)
|
||||
target_compile_definitions(toxcore PUBLIC MIN_LOGGER_LEVEL=LOGGER_LEVEL_INFO)
|
||||
#target_compile_definitions(toxcore PUBLIC MIN_LOGGER_LEVEL=LOGGER_LEVEL_INFO)
|
||||
|
||||
find_package(unofficial-sodium CONFIG QUIET)
|
||||
find_package(sodium QUIET)
|
||||
|
@ -6,6 +6,9 @@
|
||||
#include <solanaceae/tox_messages/components.hpp>
|
||||
#include <solanaceae/contact/components.hpp>
|
||||
|
||||
// HACK: remove them
|
||||
#include <solanaceae/tox_contacts/components.hpp>
|
||||
#include <solanaceae/toxcore/utils.hpp>
|
||||
|
||||
#include <imgui/imgui.h>
|
||||
#include <imgui/misc/cpp/imgui_stdlib.h>
|
||||
@ -158,6 +161,16 @@ void ChatGui4::render(void) {
|
||||
ImGui::Checkbox("show extra info", &_show_chat_extra_info);
|
||||
ImGui::Checkbox("show avatar transfers", &_show_chat_avatar_tf);
|
||||
|
||||
ImGui::SeparatorText("tox");
|
||||
|
||||
if (_cr.all_of<Contact::Components::ToxGroupPersistent>(*_selected_contact)) {
|
||||
if (ImGui::MenuItem("copy ngc chatid")) {
|
||||
const auto& chat_id = _cr.get<Contact::Components::ToxGroupPersistent>(*_selected_contact).chat_id.data;
|
||||
const auto chat_id_str = bin2hex(std::vector<uint8_t>{chat_id.begin(), chat_id.end()});
|
||||
ImGui::SetClipboardText(chat_id_str.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
ImGui::EndMenuBar();
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "./image_loader_sdl_bmp.hpp"
|
||||
#include "./image_loader_stb.hpp"
|
||||
#include "./image_loader_webp.hpp"
|
||||
#include "./media_meta_info_loader.hpp"
|
||||
|
||||
#include <solanaceae/message3/components.hpp>
|
||||
|
||||
@ -22,6 +23,10 @@ std::optional<TextureEntry> MessageImageLoader::load(TextureUploaderI& tu, Messa
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
if (m.all_of<Message::Components::TagNotImage>()) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
if (m.all_of<Message::Components::Transfer::FileInfoLocal>()) {
|
||||
const auto& file_list = m.get<Message::Components::Transfer::FileInfoLocal>().file_list;
|
||||
assert(!file_list.empty());
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "./tox_client.hpp"
|
||||
#include "toxcore/tox.h"
|
||||
|
||||
// meh, change this
|
||||
#include <exception>
|
||||
@ -18,6 +19,10 @@ static void eee(std::string& mod) {
|
||||
}
|
||||
}
|
||||
|
||||
static void tmp_tox_log_cb(Tox *tox, Tox_Log_Level level, const char *file, uint32_t line, const char *func, const char *message, void *user_data) {
|
||||
std::cerr << "l:" << level << " " << file << ":" << line << "@" << func << "(): '" << message << "'\n";
|
||||
}
|
||||
|
||||
ToxClient::ToxClient(std::string_view save_path, std::string_view save_password) :
|
||||
_tox_profile_path(save_path), _tox_profile_password(save_password)
|
||||
{
|
||||
@ -67,6 +72,9 @@ ToxClient::ToxClient(std::string_view save_path, std::string_view save_password)
|
||||
}
|
||||
}
|
||||
|
||||
tox_options_set_local_discovery_enabled(options, false);
|
||||
tox_options_set_log_callback(options, tmp_tox_log_cb);
|
||||
|
||||
TOX_ERR_NEW err_new;
|
||||
_tox = tox_new(options, &err_new);
|
||||
tox_options_free(options);
|
||||
|
Reference in New Issue
Block a user