From 8e13bae2b278caa50e72ec4a3f750bbc9ad28dfd Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Jan 15 2020 05:44:27 +0000 Subject: WIP: add two patch --- diff --git a/alexandria-0.7.4-remove-undefined-method.patch b/alexandria-0.7.4-remove-undefined-method.patch new file mode 100644 index 0000000..d03435a --- /dev/null +++ b/alexandria-0.7.4-remove-undefined-method.patch @@ -0,0 +1,12 @@ +diff -urp alexandria-book-collection-manager-0.7.4.old.2/lib/alexandria/ui/book_properties_dialog_base.rb alexandria-book-collection-manager-0.7.4.new/lib/alexandria/ui/book_properties_dialog_base.rb +--- alexandria-book-collection-manager-0.7.4.old.2/lib/alexandria/ui/book_properties_dialog_base.rb 2020-01-15 14:38:34.849856129 +0900 ++++ alexandria-book-collection-manager-0.7.4.new/lib/alexandria/ui/book_properties_dialog_base.rb 2020-01-15 14:39:05.733196547 +0900 +@@ -303,7 +303,7 @@ module Alexandria + def on_destroy + @book_properties_dialog.hide + # Stop notebook trying to set tab labels at this time +- @notebook.show_tabs = false ++ #@notebook.show_tabs = false + end + + def on_loaned diff --git a/alexandria-0.7.4-title-force-encoding.patch b/alexandria-0.7.4-title-force-encoding.patch new file mode 100644 index 0000000..1dd41a1 --- /dev/null +++ b/alexandria-0.7.4-title-force-encoding.patch @@ -0,0 +1,37 @@ +diff -urp alexandria-book-collection-manager-0.7.4.old/lib/alexandria/ui/book_properties_dialog.rb alexandria-book-collection-manager-0.7.4.new/lib/alexandria/ui/book_properties_dialog.rb +--- alexandria-book-collection-manager-0.7.4.old/lib/alexandria/ui/book_properties_dialog.rb 2019-10-25 01:20:07.000000000 +0900 ++++ alexandria-book-collection-manager-0.7.4.new/lib/alexandria/ui/book_properties_dialog.rb 2020-01-15 14:34:40.160543409 +0900 +@@ -34,9 +34,10 @@ module Alexandria + @button_box << help_button + @button_box.set_child_secondary(help_button, true) + +- @entry_title.text = @book_properties_dialog.title = book.title ++ book_title = book.title.force_encoding('UTF-8') ++ @entry_title.text = @book_properties_dialog.title = book_title + @entry_isbn.text = (book.isbn || "") +- @entry_publisher.text = book.publisher ++ @entry_publisher.text = book.publisher.force_encoding('UTF-8') + @entry_publish_date.text = book.publishing_year.to_s + @entry_publish_date.signal_connect("focus-out-event") do + text = @entry_publish_date.text +@@ -54,7 +55,7 @@ module Alexandria + end + end + end +- @entry_edition.text = book.edition ++ @entry_edition.text = book.edition.force_encoding('UTF-8') + if book.tags + @entry_tags.text = book.tags.join(",") # tags are comma-separated + end +diff -urp alexandria-book-collection-manager-0.7.4.old/lib/alexandria/ui/ui_manager.rb alexandria-book-collection-manager-0.7.4.new/lib/alexandria/ui/ui_manager.rb +--- alexandria-book-collection-manager-0.7.4.old/lib/alexandria/ui/ui_manager.rb 2020-01-14 16:14:43.703190269 +0900 ++++ alexandria-book-collection-manager-0.7.4.new/lib/alexandria/ui/ui_manager.rb 2020-01-15 14:30:29.284927911 +0900 +@@ -427,7 +427,7 @@ module Alexandria + end + + def set_status_label(txt) +- @status_label.text = txt ++ @status_label.text = txt.force_encoding('UTF-8') + end + + def on_books_selection_changed diff --git a/alexandria.spec b/alexandria.spec index fbbdd22..3503775 100644 --- a/alexandria.spec +++ b/alexandria.spec @@ -2,7 +2,7 @@ %undefine minorver %undefine ifpre -%define fedorarel 0.105.WIP +%define fedorarel 0.106.WIP %define rel %{?ifpre:0.}%{fedorarel}%{?minorver:.%minorver} @@ -69,6 +69,10 @@ Patch27: alexandria-0.7.4-negative-value.patch # This is obsolete with 0.7.4. 0.7.4 uses goocanvas2 with introspection # Make glade2 translatable text actually translated (i10ned) Patch29: alexandria-0.7.4-glade-gettext.patch +# Workaround: more force_encoding for title, etc for loading old yaml +Patch30: alexandria-0.7.4-title-force-encoding.patch +# Remove undefined / unneeded method +Patch31: alexandria-0.7.4-remove-undefined-method.patch BuildArch: noarch @@ -150,6 +154,8 @@ Alexandria is a GNOME application to help you manage your book collection. %patch26 -p1 -b .z3950_count %patch27 -p1 -b .negative %patch29 -p1 -b .gettext +%patch30 -p1 -b .utf8_2 +%patch31 -p1 -b .undefined_method # Embed Fedora EVR %{__sed} -i.evr \