rpms/evince/F-12 0001-Provide-some-indication-that-search-is-not-available.patch, NONE, 1.1 evince.spec, 1.170, 1.171

Matthias Clasen mclasen at fedoraproject.org
Thu Oct 22 13:18:08 UTC 2009


Author: mclasen

Update of /cvs/pkgs/rpms/evince/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2254

Modified Files:
	evince.spec 
Added Files:
	0001-Provide-some-indication-that-search-is-not-available.patch 
Log Message:
Add an indication if search is unavailable.


0001-Provide-some-indication-that-search-is-not-available.patch:
 data/evince-ui.xml |    1 +
 shell/ev-window.c  |   16 ++++++----------
 2 files changed, 7 insertions(+), 10 deletions(-)

--- NEW FILE 0001-Provide-some-indication-that-search-is-not-available.patch ---
>From d57f2d993a242da4c62b2692795ce86185c348f7 Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik at redhat.com>
Date: Thu, 22 Oct 2009 13:44:22 +0200
Subject: [PATCH] Provide some indication that search is not available

Show warning message when pressing "Ctrl-F" or "/"
in a non-searchable document (#596888).
---
 data/evince-ui.xml |    1 +
 shell/ev-window.c  |   15 ++++++---------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/data/evince-ui.xml b/data/evince-ui.xml
index 7ac4edb..3fe2a6d 100644
--- a/data/evince-ui.xml
+++ b/data/evince-ui.xml
@@ -94,6 +94,7 @@
   <accelerator name="GoBackwardFastAccel" action="GoBackwardFast"/>
   <accelerator name="GoForwardFastAccel" action="GoForwardFast"/>
   <accelerator name="EscapeAccel" action="Escape"/>
+  <accelerator name="CtrlFAccel" action="CtrlF"/>
   <accelerator name="SlashAccel" action="Slash"/>
   <accelerator name="F3Accel" action="F3"/>
   <accelerator name="SpaceAccel" action="Space"/>
diff --git a/shell/ev-window.c b/shell/ev-window.c
index f4974e3..49a2058 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -397,7 +397,8 @@ ev_window_setup_action_sensitivity (EvWindow *ev_window)
         /* Edit menu */
 	ev_window_set_action_sensitive (ev_window, "EditSelectAll", has_pages && can_get_text);
 	ev_window_set_action_sensitive (ev_window, "EditFind", can_find);
-	ev_window_set_action_sensitive (ev_window, "Slash", can_find);
+	ev_window_set_action_sensitive (ev_window, "Slash", has_document);
+	ev_window_set_action_sensitive (ev_window, "CtrlF", !can_find && has_document);
 	ev_window_set_action_sensitive (ev_window, "EditRotateLeft", has_pages);
 	ev_window_set_action_sensitive (ev_window, "EditRotateRight", has_pages);
 
@@ -490,11 +491,6 @@ ev_window_update_actions (EvWindow *ev_window)
 static void
 ev_window_set_view_accels_sensitivity (EvWindow *window, gboolean sensitive)
 {
-	gboolean can_find;
-
-	can_find = window->priv->document && 
-	    EV_IS_DOCUMENT_FIND (window->priv->document);
-
 	if (window->priv->action_group) {
 		ev_window_set_action_sensitive (window, "PageDown", sensitive);
 		ev_window_set_action_sensitive (window, "PageUp", sensitive);
@@ -509,8 +505,6 @@ ev_window_set_view_accels_sensitivity (EvWindow *window, gboolean sensitive)
 		ev_window_set_action_sensitive (window, "KpPlus", sensitive);
 		ev_window_set_action_sensitive (window, "KpMinus", sensitive);
 		ev_window_set_action_sensitive (window, "Equal", sensitive);
-
-		ev_window_set_action_sensitive (window, "Slash", sensitive && can_find);
 	}
 }
 
@@ -3210,7 +3204,8 @@ ev_window_cmd_edit_find (GtkAction *action, EvWindow *ev_window)
         g_return_if_fail (EV_IS_WINDOW (ev_window));
 
 	if (ev_window->priv->document == NULL || !EV_IS_DOCUMENT_FIND (ev_window->priv->document)) {
-		g_error ("Find action should be insensitive since document doesn't support find");
+		ev_window_warning_message (ev_window, "%s",
+					   _("The document doesn't support search"));
 		return;
 	} 
 
@@ -4925,6 +4920,8 @@ static const GtkActionEntry entries[] = {
 	  G_CALLBACK (ev_window_cmd_escape) },
         { "Slash", GTK_STOCK_FIND, NULL, "slash", NULL,
           G_CALLBACK (ev_window_cmd_edit_find) },
+        { "CtrlF", NULL, NULL, "<control>F", NULL,
+          G_CALLBACK (ev_window_cmd_edit_find) },
         { "F3", NULL, "", "F3", NULL,
           G_CALLBACK (ev_window_cmd_edit_find_next) },
         { "PageDown", NULL, "", "Page_Down", NULL,
-- 
1.6.2.5



Index: evince.spec
===================================================================
RCS file: /cvs/pkgs/rpms/evince/F-12/evince.spec,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -p -r1.170 -r1.171
--- evince.spec	20 Oct 2009 16:04:33 -0000	1.170
+++ evince.spec	22 Oct 2009 13:18:08 -0000	1.171
@@ -6,7 +6,7 @@
 
 Name:		evince
 Version:	2.28.1
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	Document viewer
 
 License:	GPLv2+ and GFDL
@@ -16,6 +16,10 @@ Source0:	http://download.gnome.org/sourc
 Patch0:		evince-pdf-print-revert.patch
 # http://bugzilla.gnome.org/show_bug.cgi?id=455759
 # Patch1:		duplex-copies.patch
+
+# https://bugzilla.gnome.org/show_bug.cgi?id=596888
+Patch1:         0001-Provide-some-indication-that-search-is-not-available.patch
+
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	gtk2-devel >= %{gtk2_version}
@@ -105,10 +109,11 @@ This package contains a backend to let e
 %setup -q
 %patch0 -p0 -b .pdf-print-revert
 # %patch1 -p0 -b .duplex-copies
+%patch1 -p1 -b .search-not-available
 
 %build
 %configure --disable-static --disable-scrollkeeper \
-	--with-print=gtk \
+        --with-platform=gnome \
 	--enable-comics=yes \
 	--enable-dvi=yes \
 	--enable-djvu=yes
@@ -259,6 +264,9 @@ fi
 %{_libdir}/evince/1/backends/djvudocument.evince-backend
 
 %changelog
+* Thu Oct 22 2009 Matthias Clasen <mclasen at redhat.com> - 2.28.1-2
+- Provide some hint if search is not available
+
 * Tue Oct 20 2009 Marek Kasik <mkasik at redhat.com> - 2.28.1-1
 - Update to 2.28.1
 - Add evince-pdf-print-revert.patch (reverts upstream's change




More information about the fedora-extras-commits mailing list