mirror of
https://github.com/uowuo/abaddon.git
synced 2025-03-04 03:03:16 -05:00
Revert "add settings for channel list scrollbar policies"
This reverts commit d7bee05ee9
.
This commit is contained in:
parent
d7bee05ee9
commit
1d1bd7e345
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -44,8 +44,6 @@ public:
|
||||
std::string MentionBadgeColor;
|
||||
std::string MentionBadgeTextColor;
|
||||
std::string UnreadIndicatorColor;
|
||||
std::string ClassicGuildScrollPolicy;
|
||||
std::string ClassicChannelScrollPolicy;
|
||||
|
||||
// [notifications]
|
||||
bool NotificationsEnabled;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user