summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2024-01-21 16:27:42 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2024-01-21 16:27:42 -0500
commit1d1bd7e3454b58ddf3b4d803bff8e9ed24ee4a22 (patch)
treeaf82eeb5b241d8e8623614d450159a82c66a43d9 /src
parentd7bee05ee92bf14c1344d336cfa5398815e8ccc9 (diff)
downloadabaddon-portaudio-1d1bd7e3454b58ddf3b4d803bff8e9ed24ee4a22.tar.gz
abaddon-portaudio-1d1bd7e3454b58ddf3b4d803bff8e9ed24ee4a22.zip
Revert "add settings for channel list scrollbar policies"
This reverts commit d7bee05ee92bf14c1344d336cfa5398815e8ccc9.
Diffstat (limited to 'src')
-rw-r--r--src/components/channellist/channellist.cpp4
-rw-r--r--src/settings.cpp2
-rw-r--r--src/settings.hpp2
-rw-r--r--src/util.cpp8
-rw-r--r--src/util.hpp3
5 files changed, 1 insertions, 18 deletions
diff --git a/src/components/channellist/channellist.cpp b/src/components/channellist/channellist.cpp
index 2bb2f11..1cdf619 100644
--- a/src/components/channellist/channellist.cpp
+++ b/src/components/channellist/channellist.cpp
@@ -1,15 +1,13 @@
#include "channellist.hpp"
#include "abaddon.hpp"
-#include "util.hpp"
ChannelList::ChannelList() {
ConnectSignals();
m_guilds.set_halign(Gtk::ALIGN_START);
- m_guilds_scroll.set_policy(Gtk::POLICY_NEVER, util::TranslateScrollPolicy(Abaddon::Get().GetSettings().ClassicGuildScrollPolicy));
- m_tree.set_policy(Gtk::POLICY_AUTOMATIC, util::TranslateScrollPolicy(Abaddon::Get().GetSettings().ClassicChannelScrollPolicy));
+ m_guilds_scroll.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
m_guilds.signal_guild_selected().connect([this](Snowflake guild_id) {
m_tree.SetSelectedGuild(guild_id);
diff --git a/src/settings.cpp b/src/settings.cpp
index 0b1ef49..654a726 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -113,8 +113,6 @@ void SettingsManager::DefineSettings() {
AddSetting("style", "mentionbadgecolor", "rgba(184, 37, 37, 0)"s, &Settings::MentionBadgeColor);
AddSetting("style", "mentionbadgetextcolor", "rgba(251, 251, 251, 0)"s, &Settings::MentionBadgeTextColor);
AddSetting("style", "unreadcolor", "rgba(255, 255, 255, 0)"s, &Settings::UnreadIndicatorColor);
- AddSetting("style", "classic_guild_scroll_policy", "automatic"s, &Settings::ClassicGuildScrollPolicy);
- AddSetting("style", "classic_channel_scroll_policy", "automatic"s, &Settings::ClassicChannelScrollPolicy);
#ifdef _WIN32
AddSetting("notifications", "enabled", false, &Settings::NotificationsEnabled);
diff --git a/src/settings.hpp b/src/settings.hpp
index d29c623..df723fc 100644
--- a/src/settings.hpp
+++ b/src/settings.hpp
@@ -44,8 +44,6 @@ public:
std::string MentionBadgeColor;
std::string MentionBadgeTextColor;
std::string UnreadIndicatorColor;
- std::string ClassicGuildScrollPolicy;
- std::string ClassicChannelScrollPolicy;
// [notifications]
bool NotificationsEnabled;
diff --git a/src/util.cpp b/src/util.cpp
index d0d6e24..09bb368 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -228,11 +228,3 @@ uint64_t util::TimeToEpoch(int year, int month, int day, int hour, int minute, i
secs += seconds;
return secs;
}
-
-Gtk::PolicyType util::TranslateScrollPolicy(const std::string &str) {
- if (str == "never") return Gtk::POLICY_NEVER;
- if (str == "automatic") return Gtk::POLICY_AUTOMATIC;
- if (str == "always") return Gtk::POLICY_ALWAYS;
- if (str == "external") return Gtk::POLICY_EXTERNAL;
- return Gtk::POLICY_AUTOMATIC;
-}
diff --git a/src/util.hpp b/src/util.hpp
index f839eca..fc9568b 100644
--- a/src/util.hpp
+++ b/src/util.hpp
@@ -14,7 +14,6 @@
#include <optional>
#include <type_traits>
-#include <gtkmm/enums.h>
#include <sigc++/slot.h>
namespace Glib {
@@ -39,8 +38,6 @@ bool IsFolder(std::string_view path);
bool IsFile(std::string_view path);
uint64_t TimeToEpoch(int year, int month, int day, int hour, int minute, int seconds);
-
-Gtk::PolicyType TranslateScrollPolicy(const std::string &str);
} // namespace util
void LaunchBrowser(const Glib::ustring &url);