format all

This commit is contained in:
ouwou 2022-01-09 23:20:08 -05:00
parent f31d431517
commit 481685b3bb
13 changed files with 37 additions and 37 deletions

View File

@ -576,7 +576,7 @@ void CellRendererChannels::cairo_path_rounded_rect(const Cairo::RefPtr<Cairo::Co
void CellRendererChannels::unread_render_mentions(const Cairo::RefPtr<Cairo::Context> &cr, Gtk::Widget &widget, int mentions, int edge, const Gdk::Rectangle &cell_area) {
Pango::FontDescription font;
font.set_family("sans 14");
//font.set_weight(Pango::WEIGHT_BOLD);
// font.set_weight(Pango::WEIGHT_BOLD);
auto layout = widget.create_pango_layout(std::to_string(mentions));
layout->set_font_description(font);

View File

@ -88,7 +88,7 @@ ChatWindow::ChatWindow() {
m_meta->add(*m_input_indicator);
m_meta->add(*m_rate_limit_indicator);
//m_scroll->add(*m_list);
// m_scroll->add(*m_list);
m_main->add(m_topic);
m_main->add(*m_chat);
m_main->add(m_completer);

View File

@ -47,8 +47,8 @@ protected:
void OnMessageSendFail(const std::string &nonce, float retry_after);
Gtk::Box *m_main;
//Gtk::ListBox *m_list;
//Gtk::ScrolledWindow *m_scroll;
// Gtk::ListBox *m_list;
// Gtk::ScrolledWindow *m_scroll;
Gtk::EventBox m_topic; // todo probably make everything else go on the stack
Gtk::Label m_topic_text;

View File

@ -1,6 +1,6 @@
#include "token.hpp"
std::string trim(const std::string& str) {
std::string trim(const std::string &str) {
const auto first = str.find_first_not_of(' ');
if (first == std::string::npos) return str;
const auto last = str.find_last_not_of(' ');

View File

@ -26,7 +26,7 @@ constexpr inline const char *GetPresenceString(PresenceStatus s) {
return "";
}
constexpr inline const char* GetPresenceDisplayString(PresenceStatus s) {
constexpr inline const char *GetPresenceDisplayString(PresenceStatus s) {
switch (s) {
case PresenceStatus::Online:
return "Online";

View File

@ -4,7 +4,7 @@
struct BanData {
std::string Reason; // null
UserData User; // access id
UserData User; // access id
friend void from_json(const nlohmann::json &j, BanData &m);
};

View File

@ -14,10 +14,10 @@ enum class InteractionType {
};
struct MessageInteractionData {
Snowflake ID; // id of the interaction
InteractionType Type; // the type of interaction
std::string Name; // the name of the ApplicationCommand
UserData User; // the user who invoked the interaction
Snowflake ID; // id of the interaction
InteractionType Type; // the type of interaction
std::string Name; // the name of the ApplicationCommand
UserData User; // the user who invoked the interaction
// undocumented???
std::optional<GuildMember> Member; // the member who invoked the interaction (in a guild)

View File

@ -3,19 +3,19 @@
#include "user.hpp"
enum class RelationshipType {
None = 0,
Friend = 1,
Blocked = 2,
PendingIncoming = 3,
PendingOutgoing = 4,
Implicit = 5,
None = 0,
Friend = 1,
Blocked = 2,
PendingIncoming = 3,
PendingOutgoing = 4,
Implicit = 5,
};
struct RelationshipData {
// Snowflake UserID; this is the same as ID apparently but it looks new so i wont touch it
RelationshipType Type;
Snowflake ID;
// Unknown Nickname; // null
// Unknown Nickname; // null
friend void from_json(const nlohmann::json &j, RelationshipData &m);
friend void from_json(const nlohmann::json &j, RelationshipData &m);
};

View File

@ -2,8 +2,8 @@
#include "util.hpp"
#include <chrono>
#include <ctime>
#include <iomanip>
#include <glibmm.h>
#include <iomanip>
constexpr static uint64_t DiscordEpochSeconds = 1420070400;

View File

@ -812,8 +812,8 @@ std::optional<GuildMember> Store::GetGuildMember(Snowflake guild_id, Snowflake u
s->Get(2, r.Nickname);
s->Get(3, r.JoinedAt);
s->Get(4, r.PremiumSince);
//s->Get(5, r.IsDeafened);
//s->Get(6, r.IsMuted);
// s->Get(5, r.IsDeafened);
// s->Get(6, r.IsMuted);
s->Get(7, r.Avatar);
s->Get(8, r.IsPending);
@ -873,8 +873,8 @@ Message Store::GetMessageBound(std::unique_ptr<Statement> &s) const {
s->Get(4, r.Content);
s->Get(5, r.Timestamp);
s->Get(6, r.EditedTimestamp);
//s->Get(7, r.IsTTS);
//s->Get(8, r.DoesMentionEveryone);
// s->Get(7, r.IsTTS);
// s->Get(8, r.DoesMentionEveryone);
s->GetJSON(9, r.Embeds);
s->Get(10, r.IsPinned);
s->Get(11, r.WebhookID);
@ -999,7 +999,7 @@ RoleData Store::GetRoleBound(std::unique_ptr<Statement> &s) const {
RoleData r;
s->Get(0, r.ID);
//s->Get(1, guild id);
// s->Get(1, guild id);
s->Get(2, r.Name);
s->Get(3, r.Color);
s->Get(4, r.IsHoisted);

View File

@ -6,7 +6,7 @@
struct UserSettingsGuildFoldersEntry {
int Color = -1; // null
std::vector<Snowflake> GuildIDs;
Snowflake ID; // null (this can be a snowflake as a string or an int that isnt a snowflake lol)
Snowflake ID; // null (this can be a snowflake as a string or an int that isnt a snowflake lol)
std::string Name; // null
friend void from_json(const nlohmann::json &j, UserSettingsGuildFoldersEntry &m);
@ -19,16 +19,16 @@ struct UserSettings {
std::string Status; //
bool ShouldShowCurrentGame; //
// std::vector<Unknown> RestrictedGuilds; //
bool ShouldRenderReactions; //
bool ShouldRenderEmbeds; //
bool IsNativePhoneIntegrationEnabled; //
bool ShouldMessageDisplayCompact; //
std::string Locale; //
bool ShouldInlineEmbedMedia; //
bool ShouldInlineAttachmentMedia; //
std::vector<Snowflake> GuildPositions; // deprecated?
bool ShouldRenderReactions; //
bool ShouldRenderEmbeds; //
bool IsNativePhoneIntegrationEnabled; //
bool ShouldMessageDisplayCompact; //
std::string Locale; //
bool ShouldInlineEmbedMedia; //
bool ShouldInlineAttachmentMedia; //
std::vector<Snowflake> GuildPositions; // deprecated?
std::vector<UserSettingsGuildFoldersEntry> GuildFolders; //
bool ShouldGIFAutoplay; //
bool ShouldGIFAutoplay; //
// Unknown FriendSourceFlags; //
int ExplicitContentFilter; //
bool IsTTSCommandEnabled; //

View File

@ -99,7 +99,7 @@ void request::prepare() {
namespace detail {
size_t curl_write_data_callback(void *ptr, size_t size, size_t nmemb, void *userdata) {
const size_t n = size * nmemb;
static_cast<std::string*>(userdata)->append(static_cast<char*>(ptr), n);
static_cast<std::string *>(userdata)->append(static_cast<char *>(ptr), n);
return n;
}

View File

@ -6,4 +6,4 @@ bool SetupFonts();
std::string FindResourceFolder();
std::string FindConfigFile();
std::string FindStateCacheFolder();
}
} // namespace Platform