diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/abaddon.cpp | 6 | ||||
-rw-r--r-- | src/audio/ma_impl.cpp | 3 | ||||
-rw-r--r-- | src/components/chatinput.cpp | 6 | ||||
-rw-r--r-- | src/constants.hpp | 2 | ||||
-rw-r--r-- | src/settings.cpp | 2 | ||||
-rw-r--r-- | src/settings.hpp | 3 | ||||
-rw-r--r-- | src/windows/voicesettingswindow.cpp | 12 | ||||
-rw-r--r-- | src/windows/voicesettingswindow.hpp | 6 | ||||
-rw-r--r-- | src/windows/voicewindow.cpp | 5 |
9 files changed, 44 insertions, 1 deletions
diff --git a/src/abaddon.cpp b/src/abaddon.cpp index a1ed343..2fe2941 100644 --- a/src/abaddon.cpp +++ b/src/abaddon.cpp @@ -252,6 +252,12 @@ int Abaddon::StartGTK() { } #endif +#ifdef _WIN32 + if (m_settings.GetSettings().HideConsole) { + ShowWindow(GetConsoleWindow(), SW_HIDE); + } +#endif + // store must be checked before this can be called m_main_window->UpdateComponents(); diff --git a/src/audio/ma_impl.cpp b/src/audio/ma_impl.cpp index a83ddaf..531b24f 100644 --- a/src/audio/ma_impl.cpp +++ b/src/audio/ma_impl.cpp @@ -1,4 +1,7 @@ #ifdef WITH_MINIAUDIO #define MINIAUDIO_IMPLEMENTATION + #ifdef __APPLE__ + #define MA_NO_RUNTIME_LINKING + #endif #include <miniaudio.h> #endif diff --git a/src/components/chatinput.cpp b/src/components/chatinput.cpp index d19ac4b..28ed1ea 100644 --- a/src/components/chatinput.cpp +++ b/src/components/chatinput.cpp @@ -41,9 +41,15 @@ bool ChatInputText::ProcessKeyPress(GdkEventKey *event) { return true; } +#ifdef __APPLE__ + if ((event->state & GDK_MOD2_MASK) && event->keyval == GDK_KEY_v) { + return CheckHandleClipboardPaste(); + } +#else if ((event->state & GDK_CONTROL_MASK) && event->keyval == GDK_KEY_v) { return CheckHandleClipboardPaste(); } +#endif if (event->keyval == GDK_KEY_Return) { if (event->state & GDK_SHIFT_MASK) diff --git a/src/constants.hpp b/src/constants.hpp index 256f85e..5ed123c 100644 --- a/src/constants.hpp +++ b/src/constants.hpp @@ -4,7 +4,7 @@ constexpr static uint64_t SnowflakeSplitDifference = 600; constexpr static int MaxMessagesForChatCull = 50; // this has to be 50 (for now) cuz that magic number is used in a couple other places and i dont feel like replacing them constexpr static int AttachmentItemSize = 120; -constexpr static int BaseAttachmentSizeLimit = 8 * 1024 * 1024; +constexpr static int BaseAttachmentSizeLimit = 25 * 1024 * 1024; constexpr static int NitroClassicAttachmentSizeLimit = 50 * 1024 * 1024; constexpr static int NitroAttachmentSizeLimit = 100 * 1024 * 1024; constexpr static int BoostLevel2AttachmentSizeLimit = 50 * 1024 * 1024; diff --git a/src/settings.cpp b/src/settings.cpp index 82401f5..0b868da 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -70,6 +70,7 @@ void SettingsManager::ReadSettings() { SMSTR("style", "unreadcolor", UnreadIndicatorColor); SMBOOL("notifications", "enabled", NotificationsEnabled); SMBOOL("notifications", "playsound", NotificationsPlaySound); + SMBOOL("windows", "hideconsole", HideConsole); #ifdef WITH_KEYCHAIN keychain::Error error {}; @@ -153,6 +154,7 @@ void SettingsManager::Close() { SMSTR("style", "unreadcolor", UnreadIndicatorColor); SMBOOL("notifications", "enabled", NotificationsEnabled); SMBOOL("notifications", "playsound", NotificationsPlaySound); + SMBOOL("windows", "hideconsole", HideConsole); #ifdef WITH_KEYCHAIN keychain::Error error {}; diff --git a/src/settings.hpp b/src/settings.hpp index 53f3423..40cb1d3 100644 --- a/src/settings.hpp +++ b/src/settings.hpp @@ -52,6 +52,9 @@ public: bool NotificationsEnabled { true }; #endif bool NotificationsPlaySound { true }; + + // [windows] + bool HideConsole { false }; }; SettingsManager(const std::string &filename); diff --git a/src/windows/voicesettingswindow.cpp b/src/windows/voicesettingswindow.cpp index c009cbf..3749986 100644 --- a/src/windows/voicesettingswindow.cpp +++ b/src/windows/voicesettingswindow.cpp @@ -110,9 +110,17 @@ VoiceSettingsWindow::VoiceSettingsWindow() } }); + m_gain.set_increments(1.0, 5.0); + m_gain.set_range(0.0, 6969696969.0); + m_gain.set_value(Abaddon::Get().GetAudio().GetCaptureGain() * 100.0); + m_gain.signal_value_changed().connect([this]() { + m_signal_gain.emit(m_gain.get_value() / 100.0); + }); + m_main.add(m_encoding_mode); m_main.add(m_signal); m_main.add(m_bitrate); + m_main.add(m_gain); add(m_main); show_all_children(); @@ -122,4 +130,8 @@ VoiceSettingsWindow::VoiceSettingsWindow() }); } +VoiceSettingsWindow::type_signal_gain VoiceSettingsWindow::signal_gain() { + return m_signal_gain; +} + #endif diff --git a/src/windows/voicesettingswindow.hpp b/src/windows/voicesettingswindow.hpp index cf6b477..9b3498e 100644 --- a/src/windows/voicesettingswindow.hpp +++ b/src/windows/voicesettingswindow.hpp @@ -18,8 +18,14 @@ public: Gtk::ComboBoxText m_encoding_mode; Gtk::ComboBoxText m_signal; Gtk::Scale m_bitrate; + Gtk::SpinButton m_gain; private: + using type_signal_gain = sigc::signal<void(double)>; + type_signal_gain m_signal_gain; + +public: + type_signal_gain signal_gain(); }; #endif diff --git a/src/windows/voicewindow.cpp b/src/windows/voicewindow.cpp index 9e2efee..a915da6 100644 --- a/src/windows/voicewindow.cpp +++ b/src/windows/voicewindow.cpp @@ -163,6 +163,11 @@ VoiceWindow::VoiceWindow(Snowflake channel_id) m_menu_view_sub.append(m_menu_view_settings); m_menu_view_settings.signal_activate().connect([this]() { auto *window = new VoiceSettingsWindow; + const auto cb = [this](double gain) { + m_capture_gain.set_value(gain * 100.0); + m_signal_gain.emit(gain); + }; + window->signal_gain().connect(sigc::track_obj(cb, *this)); window->show(); }); |