summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/channels.cpp14
-rw-r--r--components/channels.hpp2
2 files changed, 8 insertions, 8 deletions
diff --git a/components/channels.cpp b/components/channels.cpp
index 6d2f60e..9b95f1d 100644
--- a/components/channels.cpp
+++ b/components/channels.cpp
@@ -70,7 +70,7 @@ ChannelListRowDMChannel::ChannelListRowDMChannel(const Channel *data) {
void ChannelListRowDMChannel::OnImageLoad(Glib::RefPtr<Gdk::Pixbuf> buf) {
if (m_icon != nullptr)
- m_icon->property_pixbuf() = buf;
+ m_icon->property_pixbuf() = buf->scale_simple(24, 24, Gdk::INTERP_BILINEAR);
}
ChannelListRowGuild::ChannelListRowGuild(const Guild *data) {
@@ -85,13 +85,7 @@ ChannelListRowGuild::ChannelListRowGuild(const Guild *data) {
m_icon = Gtk::manage(new Gtk::Image(buf->scale_simple(24, 24, Gdk::INTERP_BILINEAR)));
else {
m_icon = Gtk::manage(new Gtk::Image(Abaddon::Get().GetImageManager().GetPlaceholder(24)));
- Abaddon::Get().GetImageManager().LoadFromURL(data->GetIconURL("png", "32"), [this](Glib::RefPtr<Gdk::Pixbuf> ldbuf) {
- Glib::signal_idle().connect([this, ldbuf]() -> bool {
- m_icon->property_pixbuf() = ldbuf->scale_simple(24, 24, Gdk::INTERP_BILINEAR);
-
- return false;
- });
- });
+ Abaddon::Get().GetImageManager().LoadFromURL(data->GetIconURL("png", "32"), sigc::mem_fun(*this, &ChannelListRowGuild::OnImageLoad));
}
} else {
m_icon = Gtk::manage(new Gtk::Image(Abaddon::Get().GetImageManager().GetPlaceholder(24)));
@@ -110,6 +104,10 @@ ChannelListRowGuild::ChannelListRowGuild(const Guild *data) {
show_all_children();
}
+void ChannelListRowGuild::OnImageLoad(Glib::RefPtr<Gdk::Pixbuf> buf) {
+ m_icon->property_pixbuf() = buf->scale_simple(24, 24, Gdk::INTERP_BILINEAR);
+}
+
ChannelListRowCategory::ChannelListRowCategory(const Channel *data) {
ID = data->ID;
m_ev = Gtk::manage(new Gtk::EventBox);
diff --git a/components/channels.hpp b/components/channels.hpp
index b3fa753..b1c1262 100644
--- a/components/channels.hpp
+++ b/components/channels.hpp
@@ -55,6 +55,8 @@ public:
int GuildIndex;
protected:
+ void OnImageLoad(Glib::RefPtr<Gdk::Pixbuf> buf);
+
Gtk::EventBox *m_ev;
Gtk::Box *m_box;
Gtk::Label *m_lbl;