summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2023-08-02 01:48:33 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2023-08-02 01:48:33 -0400
commit9e4382aa7740bf309aa55ff07819b097684122ba (patch)
tree2227b48ec7f6e691e8876a7bb87eb3188aa95498 /src
parentfad555c355e20f4a019d7b1e0d56692dd91e332d (diff)
parentab2896b838d32d88e7a79b37e6a24ef770e64bc2 (diff)
downloadabaddon-portaudio-9e4382aa7740bf309aa55ff07819b097684122ba.tar.gz
abaddon-portaudio-9e4382aa7740bf309aa55ff07819b097684122ba.zip
Merge branch 'master' into rnnoise
Diffstat (limited to 'src')
-rw-r--r--src/components/chatmessage.cpp3
-rw-r--r--src/components/lazyimage.cpp4
-rw-r--r--src/startup.cpp3
3 files changed, 7 insertions, 3 deletions
diff --git a/src/components/chatmessage.cpp b/src/components/chatmessage.cpp
index 23ee36f..d1d9f72 100644
--- a/src/components/chatmessage.cpp
+++ b/src/components/chatmessage.cpp
@@ -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>");
diff --git a/src/components/lazyimage.cpp b/src/components/lazyimage.cpp
index 13bd65d..90b8f28 100644
--- a/src/components/lazyimage.cpp
+++ b/src/components/lazyimage.cpp
@@ -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));
diff --git a/src/startup.cpp b/src/startup.cpp
index 6d1ac96..06d6402 100644
--- a/src/startup.cpp
+++ b/src/startup.cpp
@@ -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);