forked from OpenGamers/abaddon
delete popup guild window when closed
This commit is contained in:
@@ -26,6 +26,7 @@ GuildSettingsWindow::GuildSettingsWindow(Snowflake id)
|
|||||||
set_position(Gtk::WIN_POS_CENTER);
|
set_position(Gtk::WIN_POS_CENTER);
|
||||||
get_style_context()->add_class("app-window");
|
get_style_context()->add_class("app-window");
|
||||||
get_style_context()->add_class("app-popup");
|
get_style_context()->add_class("app-popup");
|
||||||
|
get_style_context()->add_class("guild-settings-window");
|
||||||
|
|
||||||
if (guild.HasIcon()) {
|
if (guild.HasIcon()) {
|
||||||
Abaddon::Get().GetImageManager().LoadFromURL(guild.GetIconURL(), sigc::mem_fun(*this, &GuildSettingsWindow::set_icon));
|
Abaddon::Get().GetImageManager().LoadFromURL(guild.GetIconURL(), sigc::mem_fun(*this, &GuildSettingsWindow::set_icon));
|
||||||
@@ -60,3 +61,8 @@ GuildSettingsWindow::GuildSettingsWindow(Snowflake id)
|
|||||||
m_main.show();
|
m_main.show();
|
||||||
add(m_main);
|
add(m_main);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GuildSettingsWindow::on_hide() {
|
||||||
|
Gtk::Window::on_hide();
|
||||||
|
delete this; // :x
|
||||||
|
}
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ class GuildSettingsWindow : public Gtk::Window {
|
|||||||
public:
|
public:
|
||||||
GuildSettingsWindow(Snowflake id);
|
GuildSettingsWindow(Snowflake id);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void on_hide() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Gtk::Box m_main;
|
Gtk::Box m_main;
|
||||||
Gtk::Stack m_stack;
|
Gtk::Stack m_stack;
|
||||||
|
|||||||
Reference in New Issue
Block a user