forked from OpenGamers/abaddon
add account created date to profile info window
This commit is contained in:
@@ -162,6 +162,7 @@ ProfileUserInfoPane::ProfileUserInfoPane(Snowflake ID)
|
|||||||
: Gtk::Box(Gtk::ORIENTATION_VERTICAL)
|
: Gtk::Box(Gtk::ORIENTATION_VERTICAL)
|
||||||
, UserID(ID) {
|
, UserID(ID) {
|
||||||
get_style_context()->add_class("profile-info-pane");
|
get_style_context()->add_class("profile-info-pane");
|
||||||
|
m_created.get_style_context()->add_class("profile-info-created");
|
||||||
|
|
||||||
m_note.signal_update_note().connect([this](const Glib::ustring ¬e) {
|
m_note.signal_update_note().connect([this](const Glib::ustring ¬e) {
|
||||||
auto cb = [this](bool success) {
|
auto cb = [this](bool success) {
|
||||||
@@ -185,9 +186,14 @@ ProfileUserInfoPane::ProfileUserInfoPane(Snowflake ID)
|
|||||||
};
|
};
|
||||||
discord.FetchUserNote(UserID, sigc::track_obj(fetch_note_cb, *this));
|
discord.FetchUserNote(UserID, sigc::track_obj(fetch_note_cb, *this));
|
||||||
|
|
||||||
|
m_created.set_halign(Gtk::ALIGN_START);
|
||||||
|
m_created.set_margin_top(5);
|
||||||
|
m_created.set_text("Account created: " + ID.GetLocalTimestamp());
|
||||||
|
|
||||||
m_conns.set_halign(Gtk::ALIGN_START);
|
m_conns.set_halign(Gtk::ALIGN_START);
|
||||||
m_conns.set_hexpand(true);
|
m_conns.set_hexpand(true);
|
||||||
|
|
||||||
|
add(m_created);
|
||||||
add(m_note);
|
add(m_note);
|
||||||
add(m_conns);
|
add(m_conns);
|
||||||
show_all_children();
|
show_all_children();
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ public:
|
|||||||
Snowflake UserID;
|
Snowflake UserID;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Gtk::Label m_created;
|
||||||
|
|
||||||
NotesContainer m_note;
|
NotesContainer m_note;
|
||||||
ConnectionsContainer m_conns;
|
ConnectionsContainer m_conns;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user