mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-19 20:11:59 +03:00
fix premature return
This commit is contained in:
@@ -15,13 +15,14 @@ RateLimitIndicator::RateLimitIndicator()
|
|||||||
add(m_img);
|
add(m_img);
|
||||||
m_label.show();
|
m_label.show();
|
||||||
|
|
||||||
if (!std::filesystem::exists("./res/clock.png")) return;
|
if (std::filesystem::exists("./res/clock.png")) {
|
||||||
try {
|
try {
|
||||||
const auto pixbuf = Gdk::Pixbuf::create_from_file("./res/clock.png");
|
const auto pixbuf = Gdk::Pixbuf::create_from_file("./res/clock.png");
|
||||||
int w, h;
|
int w, h;
|
||||||
GetImageDimensions(pixbuf->get_width(), pixbuf->get_height(), w, h, 20, 10);
|
GetImageDimensions(pixbuf->get_width(), pixbuf->get_height(), w, h, 20, 10);
|
||||||
m_img.property_pixbuf() = pixbuf->scale_simple(w, h, Gdk::INTERP_BILINEAR);
|
m_img.property_pixbuf() = pixbuf->scale_simple(w, h, Gdk::INTERP_BILINEAR);
|
||||||
} catch (...) {}
|
} catch (...) {}
|
||||||
|
}
|
||||||
|
|
||||||
Abaddon::Get().GetDiscordClient().signal_message_create().connect(sigc::mem_fun(*this, &RateLimitIndicator::OnMessageCreate));
|
Abaddon::Get().GetDiscordClient().signal_message_create().connect(sigc::mem_fun(*this, &RateLimitIndicator::OnMessageCreate));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user