mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-06 20:15:19 +03:00
39 lines
1.0 KiB
C++
39 lines
1.0 KiB
C++
#pragma once
|
|
#include <gtkmm.h>
|
|
#include "../../discord/snowflake.hpp"
|
|
#include "../../discord/ban.hpp"
|
|
|
|
class GuildSettingsBansPane : public Gtk::ScrolledWindow {
|
|
public:
|
|
GuildSettingsBansPane(Snowflake id);
|
|
|
|
private:
|
|
void OnGuildBanFetch(const BanData &ban);
|
|
void OnGuildBansFetch(const std::vector<BanData> &bans);
|
|
void OnMenuUnban();
|
|
void OnMenuCopyID();
|
|
bool OnTreeButtonPress(GdkEventButton *event);
|
|
void OnBanRemove(Snowflake guild_id, Snowflake user_id);
|
|
void OnBanAdd(Snowflake guild_id, Snowflake user_id);
|
|
|
|
Gtk::TreeView m_view;
|
|
|
|
Snowflake GuildID;
|
|
|
|
class ModelColumns : public Gtk::TreeModel::ColumnRecord {
|
|
public:
|
|
ModelColumns();
|
|
|
|
Gtk::TreeModelColumn<Glib::ustring> m_col_user;
|
|
Gtk::TreeModelColumn<Glib::ustring> m_col_reason;
|
|
Gtk::TreeModelColumn<Snowflake> m_col_id;
|
|
};
|
|
|
|
ModelColumns m_columns;
|
|
Glib::RefPtr<Gtk::ListStore> m_model;
|
|
|
|
Gtk::Menu m_menu;
|
|
Gtk::MenuItem m_menu_unban;
|
|
Gtk::MenuItem m_menu_copy_id;
|
|
};
|