add account created date to profile info window

This commit is contained in:
ouwou
2021-02-11 01:18:18 -05:00
parent aaef457526
commit 57f5c67c94
2 changed files with 8 additions and 0 deletions

View File

@@ -162,6 +162,7 @@ ProfileUserInfoPane::ProfileUserInfoPane(Snowflake ID)
: Gtk::Box(Gtk::ORIENTATION_VERTICAL)
, UserID(ID) {
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 &note) {
auto cb = [this](bool success) {
@@ -185,9 +186,14 @@ ProfileUserInfoPane::ProfileUserInfoPane(Snowflake ID)
};
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_hexpand(true);
add(m_created);
add(m_note);
add(m_conns);
show_all_children();

View File

@@ -47,6 +47,8 @@ public:
Snowflake UserID;
private:
Gtk::Label m_created;
NotesContainer m_note;
ConnectionsContainer m_conns;
};