Skip to content

Commit

Permalink
add a bajillion headers back in to compile if pch is off
Browse files Browse the repository at this point in the history
  • Loading branch information
ouwou committed Jan 19, 2024
1 parent eb09a5b commit 30b901b
Show file tree
Hide file tree
Showing 109 changed files with 435 additions and 37 deletions.
3 changes: 3 additions & 0 deletions src/abaddon.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#include "abaddon.hpp"
#include <memory>
#include <spdlog/spdlog.h>
#include <spdlog/cfg/env.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <string>
#include <algorithm>
#include <gtkmm.h>
#include "platform.hpp"
#include "audio/manager.hpp"
#include "discord/discord.hpp"
Expand All @@ -21,6 +23,7 @@
#include "startup.hpp"
#include "notifications/notifications.hpp"
#include "remoteauth/remoteauthdialog.hpp"
#include "util.hpp"

#ifdef WITH_LIBHANDY
#include <handy.h>
Expand Down
1 change: 1 addition & 0 deletions src/components/cellrenderermemberlist.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "cellrenderermemberlist.hpp"
#include <gdkmm/general.h>

CellRendererMemberList::CellRendererMemberList()
: Glib::ObjectBase(typeid(CellRendererMemberList))
Expand Down
2 changes: 2 additions & 0 deletions src/components/cellrenderermemberlist.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once
#include <glibmm/property.h>
#include <gtkmm/cellrenderer.h>
#include <gtkmm/cellrenderertext.h>
#include "discord/activity.hpp"

enum class MemberListRenderType : uint8_t {
Expand Down
2 changes: 2 additions & 0 deletions src/components/cellrendererpixbufanimation.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include "cellrendererpixbufanimation.hpp"
#include <gdkmm/general.h>
#include <glibmm/main.h>

CellRendererPixbufAnimation::CellRendererPixbufAnimation()
: Glib::ObjectBase(typeid(CellRendererPixbufAnimation))
Expand Down
3 changes: 3 additions & 0 deletions src/components/cellrendererpixbufanimation.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#pragma once
#include <unordered_map>
#include <gdkmm/pixbufanimation.h>
#include <glibmm/property.h>
#include <gtkmm/cellrenderer.h>

// handles both static and animated
class CellRendererPixbufAnimation : public Gtk::CellRenderer {
Expand Down
2 changes: 2 additions & 0 deletions src/components/channels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <algorithm>
#include <map>
#include <unordered_map>
#include "abaddon.hpp"
#include "util.hpp"

ChannelList::ChannelList()
: Glib::ObjectBase(typeid(ChannelList))
Expand Down
2 changes: 2 additions & 0 deletions src/components/channelscellrenderer.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include "channelscellrenderer.hpp"
#include <gdkmm/general.h>
#include "abaddon.hpp"

constexpr static int MentionsRightPad = 7;
#ifndef M_PI
Expand Down
5 changes: 4 additions & 1 deletion src/components/channelscellrenderer.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#pragma once
#include <map>
#include <optional>
#include <gdkmm/pixbufanimation.h>
#include <glibmm/property.h>
#include <map>
#include <gtkmm/cellrendererpixbuf.h>
#include <gtkmm/cellrenderertext.h>
#include "discord/snowflake.hpp"
#include "discord/voicestateflags.hpp"
#include "misc/bitwise.hpp"
Expand Down
7 changes: 6 additions & 1 deletion src/components/channeltabswitcherhandy.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#ifdef WITH_LIBHANDY

#include "channeltabswitcherhandy.hpp"
// clang-format off

#include "channeltabswitcherhandy.hpp"
#include "abaddon.hpp"

// clang-format on

void selected_page_notify_cb(HdyTabView *view, GParamSpec *pspec, ChannelTabSwitcherHandy *switcher) {
auto *page = hdy_tab_view_get_selected_page(view);
Expand Down
14 changes: 10 additions & 4 deletions src/components/channeltabswitcherhandy.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
#pragma once
// perhaps this should be conditionally included within cmakelists?
#ifdef WITH_LIBHANDY
#include <unordered_map>
#include <handy.h>
#include "discord/snowflake.hpp"
#include "state.hpp"

// clang-format off

#include <unordered_map>
#include <gtkmm/box.h>
#include <handy.h>
#include "discord/snowflake.hpp"
#include "state.hpp"

// clang-format off

class ChannelData;

Expand Down
6 changes: 5 additions & 1 deletion src/components/chatinput.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#include "chatinput.hpp"
#include <filesystem>
#include <gtkmm/dialog.h>
#include <gtkmm/filechoosernative.h>
#include "abaddon.hpp"
#include "constants.hpp"
#include "misc/events.hpp"
#include <filesystem>
#include "util.hpp"

ChatInputText::ChatInputText() {
get_style_context()->add_class("message-input");
Expand Down
9 changes: 9 additions & 0 deletions src/components/chatinput.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#pragma once
#include <gtkmm/box.h>
#include <gtkmm/button.h>
#include <gtkmm/eventbox.h>
#include <gtkmm/image.h>
#include <gtkmm/menu.h>
#include <gtkmm/revealer.h>
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/textview.h>
#include "discord/chatsubmitparams.hpp"
#include "discord/message.hpp"
#include "discord/permissions.hpp"

class ChatInputAttachmentItem : public Gtk::EventBox {
Expand Down
5 changes: 4 additions & 1 deletion src/components/chatinputindicator.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include <filesystem>
#include "chatinputindicator.hpp"
#include <filesystem>
#include <gdkmm/pixbufloader.h>
#include "abaddon.hpp"
#include "util.hpp"

constexpr static const int MaxUsersInIndicator = 4;

Expand Down
3 changes: 3 additions & 0 deletions src/components/chatinputindicator.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#pragma once
#include <unordered_map>
#include <gtkmm/box.h>
#include <gtkmm/image.h>
#include <gtkmm/label.h>
#include "discord/message.hpp"
#include "discord/user.hpp"

Expand Down
1 change: 1 addition & 0 deletions src/components/chatlist.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "chatlist.hpp"
#include "abaddon.hpp"
#include "chatmessage.hpp"
#include "constants.hpp"

Expand Down
4 changes: 4 additions & 0 deletions src/components/chatlist.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#pragma once
#include <map>
#include <vector>
#include <glibmm/timer.h>
#include <gtkmm/listbox.h>
#include <gtkmm/menu.h>
#include <gtkmm/scrolledwindow.h>
#include "discord/message.hpp"
#include "discord/snowflake.hpp"

Expand Down
5 changes: 4 additions & 1 deletion src/components/chatmessage.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#include "chatmessage.hpp"
#include <unordered_map>
#include <gtkmm/flowbox.h>
#include "abaddon.hpp"
#include "constants.hpp"
#include "lazyimage.hpp"
#include "misc/chatutil.hpp"
#include <unordered_map>
#include "util.hpp"

ChatMessageItemContainer::ChatMessageItemContainer()
: m_main(Gtk::ORIENTATION_VERTICAL) {
Expand Down
6 changes: 6 additions & 0 deletions src/components/chatmessage.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#pragma once
#include <gdkmm/pixbufanimation.h>
#include <gtkmm/box.h>
#include <gtkmm/eventbox.h>
#include <gtkmm/image.h>
#include <gtkmm/listboxrow.h>
#include <gtkmm/textview.h>
#include "discord/discord.hpp"

class ChatMessageItemContainer : public Gtk::EventBox {
Expand Down
1 change: 1 addition & 0 deletions src/components/chatwindow.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "chatwindow.hpp"
#include "abaddon.hpp"
#include "chatinputindicator.hpp"
#include "ratelimitindicator.hpp"
#include "chatinput.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/components/chatwindow.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once
#include <string>
#include <set>
#include <gtkmm/eventbox.h>
#include "discord/discord.hpp"
#include "discord/chatsubmitparams.hpp"
#include "completer.hpp"
Expand Down
2 changes: 2 additions & 0 deletions src/components/completer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <unordered_set>
#include <utility>
#include "completer.hpp"
#include "abaddon.hpp"
#include "util.hpp"

constexpr const int CompleterHeight = 150;
constexpr const int MaxCompleterEntries = 30;
Expand Down
7 changes: 7 additions & 0 deletions src/components/completer.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#pragma once
#include <functional>
#include <gdkmm/pixbuf.h>
#include <gtkmm/box.h>
#include <gtkmm/listbox.h>
#include <gtkmm/listboxrow.h>
#include <gtkmm/revealer.h>
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/textview.h>
#include "lazyimage.hpp"
#include "discord/snowflake.hpp"

Expand Down
2 changes: 2 additions & 0 deletions src/components/draglistbox.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include "draglistbox.hpp"
#include <glibmm/main.h>
#include <gtkmm/adjustment.h>

DragListBox::DragListBox() {
drag_dest_set(m_entries, Gtk::DEST_DEFAULT_MOTION | Gtk::DEST_DEFAULT_DROP, Gdk::ACTION_MOVE);
Expand Down
1 change: 1 addition & 0 deletions src/components/draglistbox.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once
#include <gtkmm/listbox.h>

class DragListBox : public Gtk::ListBox {
public:
Expand Down
4 changes: 4 additions & 0 deletions src/components/friendslist.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#include "friendslist.hpp"
#include <gtkmm/messagedialog.h>
#include <gtkmm/radiobutton.h>
#include "abaddon.hpp"
#include "lazyimage.hpp"
#include "util.hpp"

using namespace std::string_literals;

Expand Down
9 changes: 9 additions & 0 deletions src/components/friendslist.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#pragma once
#include <gtkmm/box.h>
#include <gtkmm/button.h>
#include <gtkmm/buttonbox.h>
#include <gtkmm/entry.h>
#include <gtkmm/label.h>
#include <gtkmm/listbox.h>
#include <gtkmm/radiobuttongroup.h>
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/window.h>
#include "discord/objects.hpp"

class FriendsListAddComponent : public Gtk::Box {
Expand Down
2 changes: 2 additions & 0 deletions src/components/lazyimage.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "lazyimage.hpp"

#include <utility>
#include "abaddon.hpp"
#include "util.hpp"

LazyImage::LazyImage(int w, int h, bool use_placeholder)
: m_width(w)
Expand Down
1 change: 1 addition & 0 deletions src/components/lazyimage.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once
#include <gtkmm/image.h>

// loads an image only when the widget is drawn for the first time
class LazyImage : public Gtk::Image {
Expand Down
3 changes: 3 additions & 0 deletions src/components/memberlist.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "memberlist.hpp"

#include "abaddon.hpp"
#include "util.hpp"

constexpr static int MemberListUserLimit = 200;

MemberList::MemberList()
Expand Down
6 changes: 4 additions & 2 deletions src/components/memberlist.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#pragma once
#include <unordered_map>

#include <gdkmm/pixbuf.h>
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/treemodel.h>
#include <gtkmm/treestore.h>
#include <gtkmm/treeview.h>

#include <unordered_map>

#include "cellrenderermemberlist.hpp"
#include "discord/user.hpp"
#include "discord/snowflake.hpp"

class MemberList {
Expand Down
2 changes: 2 additions & 0 deletions src/components/progressbar.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "progressbar.hpp"

#include "abaddon.hpp"

MessageUploadProgressBar::MessageUploadProgressBar() {
get_style_context()->add_class("message-progress");
auto &discord = Abaddon::Get().GetDiscordClient();
Expand Down
1 change: 1 addition & 0 deletions src/components/progressbar.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once
#include <string>
#include <gtkmm/progressbar.h>

class MessageUploadProgressBar : public Gtk::ProgressBar {
public:
Expand Down
4 changes: 4 additions & 0 deletions src/components/ratelimitindicator.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#include "ratelimitindicator.hpp"

#include <filesystem>

#include "abaddon.hpp"
#include "util.hpp"

RateLimitIndicator::RateLimitIndicator()
: Gtk::Box(Gtk::ORIENTATION_HORIZONTAL) {
m_label.set_text("");
Expand Down
5 changes: 5 additions & 0 deletions src/components/ratelimitindicator.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#pragma once
#include <unordered_map>
#include <chrono>

#include <gtkmm/box.h>
#include <gtkmm/image.h>
#include <gtkmm/label.h>

#include "discord/message.hpp"

class RateLimitIndicator : public Gtk::Box {
Expand Down
10 changes: 7 additions & 3 deletions src/components/voiceinfobox.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#ifdef WITH_VOICE

#include "voiceinfobox.hpp"
#include "abaddon.hpp"
#include "util.hpp"
// clang-format off

#include "voiceinfobox.hpp"
#include "abaddon.hpp"
#include "util.hpp"

// clang-format on

VoiceInfoBox::VoiceInfoBox()
: Gtk::Box(Gtk::ORIENTATION_HORIZONTAL)
Expand Down
12 changes: 8 additions & 4 deletions src/components/voiceinfobox.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

#ifdef WITH_VOICE

#include <gtkmm/box.h>
#include <gtkmm/eventbox.h>
#include <gtkmm/image.h>
#include <gtkmm/label.h>
// clang-format off

#include <gtkmm/box.h>
#include <gtkmm/eventbox.h>
#include <gtkmm/image.h>
#include <gtkmm/label.h>

// clang-format on

class VoiceInfoBox : public Gtk::Box {
public:
Expand Down
3 changes: 3 additions & 0 deletions src/dialogs/confirm.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#pragma once

#include <gtkmm/dialog.h>
#include <gtkmm/label.h>

class ConfirmDialog : public Gtk::Dialog {
public:
ConfirmDialog(Gtk::Window &parent);
Expand Down
Loading

0 comments on commit 30b901b

Please sign in to comment.