summaryrefslogtreecommitdiff
path: root/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch
diff options
context:
space:
mode:
authorShokara Kou <kou@13f0.net>2022-06-06 21:27:26 -0400
committerShokara Kou <kou@13f0.net>2022-06-06 21:27:26 -0400
commitddb6da8b8aa31f3162c3d925f7412fe58a980acd (patch)
tree8dfee090e83fc32c97a508cdba40384865e0ca7c /www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch
parente4fc568ec5f38ccaa75b0c148ef0395cc62db04d (diff)
add leo larnack's ungoogled-flavoured chromium port
Unlike my previous failed attempt at doing the same, this should actually work. Source: https://marc.info/?l=openbsd-ports&m=164135083101196&w=2 https://pseven.xyz/pub/chromium-uc.tar.gz
Diffstat (limited to 'www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch')
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch
new file mode 100644
index 0000000..317602c
--- /dev/null
+++ b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch
@@ -0,0 +1,43 @@
1--- chrome/browser/ui/browser_command_controller.cc.orig
2+++ chrome/browser/ui/browser_command_controller.cc
3@@ -1139,7 +1139,8 @@ void BrowserCommandController::InitComma
4 command_updater_.UpdateCommandEnabled(IDC_WINDOW_CLOSE_OTHER_TABS,
5 normal_window);
6
7- const bool enable_tab_search_commands = browser_->is_type_normal();
8+ const bool enable_tab_search_commands = browser_->is_type_normal() &&
9+ !base::CommandLine::ForCurrentProcess()->HasSwitch("remove-tabsearch-button");
10 command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH,
11 enable_tab_search_commands);
12 command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH_CLOSE,
13--- chrome/browser/ui/views/frame/tab_strip_region_view.cc.orig
14+++ chrome/browser/ui/views/frame/tab_strip_region_view.cc
15@@ -5,6 +5,7 @@
16 #include "chrome/browser/ui/views/frame/tab_strip_region_view.h"
17
18 #include "base/bind.h"
19+#include "base/command_line.h"
20 #include "base/strings/utf_string_conversions.h"
21 #include "build/build_config.h"
22 #include "chrome/browser/themes/theme_properties.h"
23@@ -132,7 +133,8 @@ TabStripRegionView::TabStripRegionView(s
24 return;
25 #endif
26 const Browser* browser = tab_strip_->controller()->GetBrowser();
27- if (browser && browser->is_type_normal()) {
28+ if (browser && browser->is_type_normal() &&
29+ !base::CommandLine::ForCurrentProcess()->HasSwitch("remove-tabsearch-button")) {
30 auto tab_search_button = std::make_unique<TabSearchButton>(tab_strip_);
31 tab_search_button->SetTooltipText(
32 l10n_util::GetStringUTF16(IDS_TOOLTIP_TAB_SEARCH));
33--- chrome/browser/ungoogled_flag_entries.h.orig
34+++ chrome/browser/ungoogled_flag_entries.h
35@@ -68,4 +68,8 @@
36 "Clear data on exit",
37 "Clears all browsing data on exit. ungoogled-chromium flag",
38 kOsDesktop, FEATURE_VALUE_TYPE(browsing_data::features::kClearDataOnExit)},
39+ {"remove-tabsearch-button",
40+ "Remove Tabsearch Button",
41+ "Removes the tabsearch button from the tabstrip. ungoogled-chromium flag",
42+ kOsDesktop, SINGLE_VALUE_TYPE("remove-tabsearch-button")},
43 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_