mirror of
https://github.com/uowuo/abaddon.git
synced 2024-09-20 15:01:51 +00:00
Merge branch 'master' into rnnoise
This commit is contained in:
commit
9e4382aa77
|
@ -204,7 +204,8 @@ void ChatMessageItemContainer::UpdateTextComponent(Gtk::TextView *tv) {
|
|||
if (data->Application.has_value()) {
|
||||
static const auto regex = Glib::Regex::create(R"(</(.*?):(\d+)>)");
|
||||
Glib::MatchInfo match;
|
||||
if (regex->match(data->Content, match)) {
|
||||
Glib::ustring string = data->Content;
|
||||
if (regex->match(string, match)) {
|
||||
const auto cmd = match.fetch(1);
|
||||
const auto app = data->Application->Name;
|
||||
b->insert_markup(s, "<i>used <span color='#697ec4'>" + cmd + "</span> with " + app + "</i>");
|
||||
|
|
|
@ -39,7 +39,9 @@ bool LazyImage::OnDraw(const Cairo::RefPtr<Cairo::Context> &context) {
|
|||
Abaddon::Get().GetImageManager().LoadAnimationFromURL(m_url, m_width, m_height, sigc::track_obj(cb, *this));
|
||||
} else {
|
||||
auto cb = [this](const Glib::RefPtr<Gdk::Pixbuf> &pb) {
|
||||
property_pixbuf() = pb->scale_simple(m_width, m_height, Gdk::INTERP_BILINEAR);
|
||||
int cw, ch;
|
||||
GetImageDimensions(pb->get_width(), pb->get_height(), cw, ch, m_width, m_height);
|
||||
property_pixbuf() = pb->scale_simple(cw, ch, Gdk::INTERP_BILINEAR);
|
||||
};
|
||||
|
||||
Abaddon::Get().GetImageManager().LoadFromURL(m_url, sigc::track_obj(cb, *this));
|
||||
|
|
|
@ -54,7 +54,8 @@ std::optional<uint32_t> GetBuildNumberFromJSURL(const Glib::ustring &url, const
|
|||
|
||||
auto regex = Glib::Regex::create(R"("buildNumber",null!==\(t="(\d+)\"\))");
|
||||
Glib::MatchInfo match;
|
||||
if (regex->match(res.text, match)) {
|
||||
Glib::ustring string = res.text;
|
||||
if (regex->match(string, match)) {
|
||||
const auto str_value = match.fetch(1);
|
||||
try {
|
||||
return std::stoul(str_value);
|
||||
|
|
Loading…
Reference in New Issue
Block a user