From 62fbf282b1067362e156c331a71cc29f00318c96 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Wed, 30 Mar 2022 00:02:50 +0200 Subject: [PATCH] Browser: Reorder storage inspector columns Show "domain" and "path" as the first two columns. Since we're showing all cookies for all domains and all paths, you will probably want to see the domain and path before the actual cookie name and value. --- Userland/Applications/Browser/CookiesModel.cpp | 16 ++++++++-------- Userland/Applications/Browser/CookiesModel.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Userland/Applications/Browser/CookiesModel.cpp b/Userland/Applications/Browser/CookiesModel.cpp index 5768e17f34..aa2b7abf07 100644 --- a/Userland/Applications/Browser/CookiesModel.cpp +++ b/Userland/Applications/Browser/CookiesModel.cpp @@ -29,14 +29,14 @@ void CookiesModel::clear_items() String CookiesModel::column_name(int column) const { switch (column) { - case Column::Name: - return "Name"; - case Column::Value: - return "Value"; case Column::Domain: return "Domain"; case Column::Path: return "Path"; + case Column::Name: + return "Name"; + case Column::Value: + return "Value"; case Column::ExpiryTime: return "Expiry time"; case Column::__Count: @@ -61,14 +61,14 @@ GUI::Variant CookiesModel::data(GUI::ModelIndex const& index, GUI::ModelRole rol const auto& cookie = m_cookies[index.row()]; switch (index.column()) { - case Column::Name: - return cookie.name; - case Column::Value: - return cookie.value; case Column::Domain: return cookie.domain; case Column::Path: return cookie.path; + case Column::Name: + return cookie.name; + case Column::Value: + return cookie.value; case Column::ExpiryTime: return cookie.expiry_time.to_string(); } diff --git a/Userland/Applications/Browser/CookiesModel.h b/Userland/Applications/Browser/CookiesModel.h index 4fa8e541c3..c544d82e14 100644 --- a/Userland/Applications/Browser/CookiesModel.h +++ b/Userland/Applications/Browser/CookiesModel.h @@ -17,10 +17,10 @@ namespace Browser { class CookiesModel final : public GUI::Model { public: enum Column { - Name, - Value, Domain, Path, + Name, + Value, ExpiryTime, __Count, };