mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-13 20:18:50 +03:00
put tooltips on reactions
This commit is contained in:
@@ -25,6 +25,7 @@ bool EmojiResource::Load() {
|
||||
if (shortcode_strlen > 0) {
|
||||
std::fread(shortcode.data(), shortcode_strlen, 1, m_fp);
|
||||
m_shortcode_index[shortcode] = pattern_hex;
|
||||
m_pattern_shortcode_index[pattern_hex] = shortcode;
|
||||
}
|
||||
|
||||
std::fread(&len, 4, 1, m_fp);
|
||||
@@ -120,6 +121,13 @@ void EmojiResource::ReplaceEmojis(Glib::RefPtr<Gtk::TextBuffer> buf, int size) {
|
||||
}
|
||||
}
|
||||
|
||||
std::string EmojiResource::GetShortCodeForPattern(const Glib::ustring &pattern) {
|
||||
auto it = m_pattern_shortcode_index.find(pattern);
|
||||
if (it != m_pattern_shortcode_index.end())
|
||||
return it->second;
|
||||
return "";
|
||||
}
|
||||
|
||||
const std::vector<Glib::ustring> &EmojiResource::GetPatterns() const {
|
||||
return m_patterns;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user