From 83dfaf4cdce92f1f159424f802afefaaadb11179 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Apr 06 2009 20:50:02 +0000 Subject: After hard work by upstream, bug 25021 is now solved --- diff --git a/alexandria-0.6.4.1-right-click-left-pane.patch b/alexandria-0.6.4.1-right-click-left-pane.patch index 0187a1c..a481d09 100644 --- a/alexandria-0.6.4.1-right-click-left-pane.patch +++ b/alexandria-0.6.4.1-right-click-left-pane.patch @@ -1,7 +1,7 @@ Index: lib/alexandria/ui/callbacks.rb =================================================================== --- lib/alexandria/ui/callbacks.rb (revision 1067) -+++ lib/alexandria/ui/callbacks.rb (revision 1070) ++++ lib/alexandria/ui/callbacks.rb (revision 1072) @@ -19,6 +19,9 @@ module Alexandria module UI @@ -12,12 +12,13 @@ Index: lib/alexandria/ui/callbacks.rb def on_new widget, event name = Library.generate_new_name(@libraries.all_libraries) library = Library.load(name) -@@ -208,6 +211,11 @@ +@@ -208,6 +211,12 @@ def on_delete widget, event library = selected_library books = @library_listview.focus? ? nil : selected_books ++ is_smart = library.is_a?(SmartLibrary) + last_library = (@libraries.all_regular_libraries.length == 1) -+ if last_library ++ if (!is_smart && last_library) + log.warn { "Attempted to delete last library, fix GUI" } + return + end @@ -27,7 +28,7 @@ Index: lib/alexandria/ui/callbacks.rb Index: lib/alexandria/ui/ui_manager.rb =================================================================== --- lib/alexandria/ui/ui_manager.rb (revision 1067) -+++ lib/alexandria/ui/ui_manager.rb (revision 1070) ++++ lib/alexandria/ui/ui_manager.rb (revision 1072) @@ -306,6 +306,7 @@ if event_is_right_click event @@ -44,7 +45,7 @@ Index: lib/alexandria/ui/ui_manager.rb widget.unselect_all obj.select_path(path) end -@@ -321,10 +323,24 @@ +@@ -321,10 +323,25 @@ end menu = determine_library_popup widget, event @@ -63,6 +64,7 @@ Index: lib/alexandria/ui/ui_manager.rb + + + if library_already_selected ++ sensitize_library selected_library + Gtk.idle_add do + menu.popup(nil, nil, event.button, event.time) + false @@ -72,3 +74,13 @@ Index: lib/alexandria/ui/ui_manager.rb end end +@@ -972,7 +989,8 @@ + @actiongroup["AddBook"].sensitive = !smart + @actiongroup["AddBookManual"].sensitive = !smart + @actiongroup["Properties"].sensitive = true +- @actiongroup["Delete"].sensitive = true #(@libraries.all_regular_libraries.length > 1) ++ can_delete = smart || (@libraries.all_regular_libraries.length > 1) ++ @actiongroup["Delete"].sensitive = can_delete ## true #(@libraries.all_regular_libraries.length > 1) + log.debug { "sensitize_library delete: #{@actiongroup["Delete"].sensitive?}" } + end + diff --git a/alexandria.spec b/alexandria.spec index 8d7d9f8..d074e0d 100644 --- a/alexandria.spec +++ b/alexandria.spec @@ -5,7 +5,7 @@ %define majorver 0.6.4.1 %undefine minorver -%define fedorarel 3 +%define fedorarel 4 %define rel %{?minorver:0.}%{fedorarel}%{?minorver:.%minorver} @@ -23,11 +23,9 @@ Source0: http://rubyforge.org/frs/download.php/%{repoid}/%{name}-%{version}%{?mi # deprecated 4 arguments format # ref: alexandria-Bugs-24882 alexandria-Bugs-24882 Patch0: alexandria-0.6.4.1-use-2args-bindtextdomain.patch -# Workaround for issue with right click on left pane +# Fix for issue with right click on left pane # ref: alexandria-Bugs-25021 Patch1: alexandria-0.6.4.1-right-click-left-pane.patch -# And try more fix -Patch2: alexandria-0.6.4.1-right-click-left-pane-morefix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -79,7 +77,6 @@ Alexandria is a GNOME application to help you manage your book collection. %setup -q -n %{name}-%{majorver}%{?minorver} %patch0 -p0 -b .up24882 %patch1 -p0 -b .up25021 -%patch2 -p0 -b .moretry %build rake build @@ -201,8 +198,8 @@ exit 0 %{_datadir}/icons/hicolor/*/apps/%{name}.* %changelog -* Mon Apr 6 2009 Mamoru Tasaka - 0.6.4.1-3 -- Workaround for strange behavior with right click on left pane +* Tue Apr 7 2009 Mamoru Tasaka - 0.6.4.1-4 +- Fix for strange behavior with right click on left pane (alexandria-Bugs-25021) * Thu Mar 26 2009 Mamoru Tasaka - 0.6.4.1-2