Skip to content

Commit

Permalink
#282 Fix crash with ImprovedBookmarks enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
uazo committed Sep 12, 2023
1 parent 4b70787 commit a45ab18
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
27 changes: 26 additions & 1 deletion build/patches/Add-bookmark-import-export-actions.patch
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
chrome/android/java/AndroidManifest.xml | 1 -
.../java/res/menu/bookmark_toolbar_menu.xml | 14 +
.../menu/bookmark_toolbar_menu_improved.xml | 14 +
.../browser/TabbedModeTabDelegateFactory.java | 5 +-
.../app/bookmarks/BookmarkActivity.java | 32 ++
.../browser/bookmarks/BookmarkBridge.java | 278 +++++++++++++++++
Expand Down Expand Up @@ -51,7 +52,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
.../select_file_dialog_android.cc | 6 +
ui/shell_dialogs/select_file_dialog_android.h | 2 +
ui/shell_dialogs/select_file_dialog_win.cc | 5 +
41 files changed, 901 insertions(+), 29 deletions(-)
42 files changed, 915 insertions(+), 29 deletions(-)

diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
--- a/chrome/android/java/AndroidManifest.xml
Expand Down Expand Up @@ -84,6 +85,30 @@ diff --git a/chrome/android/java/res/menu/bookmark_toolbar_menu.xml b/chrome/and
+ android:title="@string/export_bookmarks"
+ android:visible="true"
+ app:showAsAction="ifRoom"
+ app:iconTint="@color/default_icon_color_tint_list" />
<item
android:id="@+id/close_menu_id"
android:icon="@drawable/btn_close"
diff --git a/chrome/android/java/res/menu/bookmark_toolbar_menu_improved.xml b/chrome/android/java/res/menu/bookmark_toolbar_menu_improved.xml
--- a/chrome/android/java/res/menu/bookmark_toolbar_menu_improved.xml
+++ b/chrome/android/java/res/menu/bookmark_toolbar_menu_improved.xml
@@ -49,6 +49,20 @@ found in the LICENSE file.
android:title="@string/create_new_folder"
app:showAsAction="ifRoom"
app:iconTint="@color/default_icon_color_secondary_tint_list" />
+ <item
+ android:id="@+id/import_menu_id"
+ android:icon="@drawable/ic_folder_blue_24dp"
+ android:title="@string/import_bookmarks"
+ android:visible="true"
+ app:showAsAction="ifRoom"
+ app:iconTint="@color/default_icon_color_tint_list" />
+ <item
+ android:id="@+id/export_menu_id"
+ android:icon="@drawable/ic_file_download_white_24dp"
+ android:title="@string/export_bookmarks"
+ android:visible="true"
+ app:showAsAction="ifRoom"
+ app:iconTint="@color/default_icon_color_tint_list" />
<item
android:id="@+id/close_menu_id"
Expand Down
20 changes: 19 additions & 1 deletion build/patches/Bookmarks-select-all-menu-entry.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ Subject: Bookmarks select all menu entry
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
.../java/res/menu/bookmark_toolbar_menu.xml | 7 +++++++
.../res/menu/bookmark_toolbar_menu_improved.xml | 7 +++++++
.../chrome/browser/bookmarks/BookmarkToolbar.java | 15 +++++++++++++++
.../ui/android/strings/android_chrome_strings.grd | 3 +++
3 files changed, 25 insertions(+)
4 files changed, 32 insertions(+)

diff --git a/chrome/android/java/res/menu/bookmark_toolbar_menu.xml b/chrome/android/java/res/menu/bookmark_toolbar_menu.xml
--- a/chrome/android/java/res/menu/bookmark_toolbar_menu.xml
Expand All @@ -22,6 +23,23 @@ diff --git a/chrome/android/java/res/menu/bookmark_toolbar_menu.xml b/chrome/and
+ android:title="@string/select_all_bookmarks"
+ android:visible="true"
+ app:showAsAction="ifRoom"
+ app:iconTint="@color/default_icon_color_tint_list" />
<item
android:id="@+id/import_menu_id"
android:icon="@drawable/ic_folder_blue_24dp"
diff --git a/chrome/android/java/res/menu/bookmark_toolbar_menu_improved.xml b/chrome/android/java/res/menu/bookmark_toolbar_menu_improved.xml
--- a/chrome/android/java/res/menu/bookmark_toolbar_menu_improved.xml
+++ b/chrome/android/java/res/menu/bookmark_toolbar_menu_improved.xml
@@ -49,6 +49,13 @@ found in the LICENSE file.
android:title="@string/create_new_folder"
app:showAsAction="ifRoom"
app:iconTint="@color/default_icon_color_secondary_tint_list" />
+ <item
+ android:id="@+id/select_all_menu_id"
+ android:icon="@drawable/ic_done_blue"
+ android:title="@string/select_all_bookmarks"
+ android:visible="true"
+ app:showAsAction="ifRoom"
+ app:iconTint="@color/default_icon_color_tint_list" />
<item
android:id="@+id/import_menu_id"
Expand Down

0 comments on commit a45ab18

Please sign in to comment.