diff --git a/SOURCES/evince-3.28.4-Show-password-dialog-again.patch b/SOURCES/evince-3.28.4-Show-password-dialog-again.patch new file mode 100644 index 0000000..cb95e7a --- /dev/null +++ b/SOURCES/evince-3.28.4-Show-password-dialog-again.patch @@ -0,0 +1,203 @@ +From 1f250861fa2ec6a7117f183459e62ac285d85db6 Mon Sep 17 00:00:00 2001 +From: Marek Kasik +Date: Tue, 2 Mar 2021 18:40:56 +0100 +Subject: [PATCH] window: Show password dialog again + +Show password dialog when trying to open a document for which we've +cancelled a password dialog before in recent view. + +This is achieved by adding a signal "cancelled" to EvPasswordView since +only successfull entering of password was signaled before by "unlock" signal. + +We also need to unregister current document with EvApplication and clear its uri +there to be able to open other documents in current window. +--- + shell/ev-application.c | 16 ++++++++++++++++ + shell/ev-application.h | 1 + + shell/ev-password-view.c | 14 ++++++++++++++ + shell/ev-password-view.h | 3 ++- + shell/ev-window.c | 23 ++++++++++++++++++++++- + 5 files changed, 55 insertions(+), 2 deletions(-) + + + +From ef2d7ca9734c6a2e3ba0a80279d944352d355295 Mon Sep 17 00:00:00 2001 +From: Tom Schoonjans +Date: Wed, 9 Jun 2021 06:39:48 +0100 +Subject: [PATCH] ev-application: fix compilation error when DBus is disabled + +--- + shell/ev-application.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/shell/ev-application.c b/shell/ev-application.c +index 23871d9a..7a3b69ba 100644 +--- a/shell/ev-application.c ++++ b/shell/ev-application.c +@@ -539,6 +539,7 @@ ev_application_unregister_uri (EvApplication *application, + g_error_free (error); + } else { + g_variant_unref (value); ++ application->doc_registered = FALSE; + } + } + #endif /* ENABLE_DBUS */ +@@ -1166,6 +1167,23 @@ ev_application_get_uri (EvApplication *application) + return application->uri; + } + ++/** ++ * ev_application_clear_uri: ++ * @application: The instance of the application. ++ * ++ * This unregisters current uri and clears it so that another document ++ * can be opened in this instance. E.g. after cancelled password dialog ++ * in recent view. ++ */ ++void ++ev_application_clear_uri (EvApplication *application) ++{ ++#ifdef ENABLE_DBUS ++ ev_application_unregister_uri (application, application->uri); ++#endif ++ g_clear_pointer (&application->uri, g_free); ++} ++ + /** + * ev_application_get_media_keys: + * @application: The instance of the application. +diff --git a/shell/ev-application.h b/shell/ev-application.h +index 00a7a18b..f9b43ab3 100644 +--- a/shell/ev-application.h ++++ b/shell/ev-application.h +@@ -66,6 +66,7 @@ void ev_application_open_uri_list (EvApplication *application, + gboolean ev_application_has_window (EvApplication *application); + guint ev_application_get_n_windows (EvApplication *application); + const gchar * ev_application_get_uri (EvApplication *application); ++void ev_application_clear_uri (EvApplication *application); + GObject *ev_application_get_media_keys (EvApplication *application); + + const gchar *ev_application_get_dot_dir (EvApplication *application, +diff --git a/shell/ev-password-view.c b/shell/ev-password-view.c +index 9a916d55..0dab3c51 100644 +--- a/shell/ev-password-view.c ++++ b/shell/ev-password-view.c +@@ -38,6 +38,7 @@ + + enum { + UNLOCK, ++ CANCELLED, + LAST_SIGNAL + }; + struct _EvPasswordViewPrivate { +@@ -91,6 +92,15 @@ ev_password_view_class_init (EvPasswordViewClass *class) + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); + ++ password_view_signals[CANCELLED] = ++ g_signal_new ("cancelled", ++ G_TYPE_FROM_CLASS (g_object_class), ++ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, ++ G_STRUCT_OFFSET (EvPasswordViewClass, cancelled), ++ NULL, NULL, ++ g_cclosure_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ + g_type_class_add_private (g_object_class, sizeof (EvPasswordViewPrivate)); + + g_object_class->finalize = ev_password_view_finalize; +@@ -183,6 +193,10 @@ ev_password_dialog_got_response (GtkDialog *dialog, + g_strdup (gtk_entry_get_text (GTK_ENTRY (password_view->priv->password_entry))); + + g_signal_emit (password_view, password_view_signals[UNLOCK], 0); ++ } else if (response_id == GTK_RESPONSE_CANCEL || ++ response_id == GTK_RESPONSE_CLOSE || ++ response_id == GTK_RESPONSE_DELETE_EVENT) { ++ g_signal_emit (password_view, password_view_signals[CANCELLED], 0); + } + + gtk_widget_destroy (GTK_WIDGET (dialog)); +diff --git a/shell/ev-password-view.h b/shell/ev-password-view.h +index c3fc5bbc..e279c612 100644 +--- a/shell/ev-password-view.h ++++ b/shell/ev-password-view.h +@@ -40,7 +40,8 @@ struct _EvPasswordViewClass { + GtkViewportClass parent_class; + + /* signals */ +- void (*unlock) (EvPasswordView *self); ++ void (*unlock) (EvPasswordView *self); ++ void (*cancelled) (EvPasswordView *self); + }; + + GType ev_password_view_get_type (void) G_GNUC_CONST; +diff --git a/shell/ev-window.c b/shell/ev-window.c +index 077d577d..f728fa77 100644 +--- a/shell/ev-window.c ++++ b/shell/ev-window.c +@@ -239,6 +239,8 @@ typedef struct { + + /* Send to */ + gboolean has_mailto_handler; ++ ++ gboolean password_view_cancelled; + }; + + #define EV_WINDOW_GET_PRIVATE(object) \ +@@ -1804,6 +1806,7 @@ ev_window_password_view_unlock (EvWindow *ev_window) + password = ev_password_view_get_password (EV_PASSWORD_VIEW (ev_window->priv->password_view)); + ev_job_load_set_password (EV_JOB_LOAD (ev_window->priv->load_job), password); + ev_job_scheduler_push_job (ev_window->priv->load_job, EV_JOB_PRIORITY_NONE); ++ ev_window->priv->password_view_cancelled = FALSE; + } + + static void +@@ -1821,6 +1824,18 @@ ev_window_clear_load_job (EvWindow *ev_window) + } + } + ++static void ++ev_window_password_view_cancelled (EvWindow *ev_window) ++{ ++ EvWindowPrivate *priv = ev_window->priv; ++ ++ priv->password_view_cancelled = TRUE; ++ if (ev_window_is_recent_view (ev_window)) { ++ ev_window_clear_load_job (ev_window); ++ ev_application_clear_uri (EV_APP); ++ } ++} ++ + static void + ev_window_clear_reload_job (EvWindow *ev_window) + { +@@ -2395,7 +2410,8 @@ ev_window_open_uri (EvWindow *ev_window, + g_strdup (search_string) : NULL; + + if (ev_window->priv->uri && +- g_ascii_strcasecmp (ev_window->priv->uri, uri) == 0) { ++ g_ascii_strcasecmp (ev_window->priv->uri, uri) == 0 && ++ !ev_window->priv->password_view_cancelled) { + ev_window_reload_document (ev_window, dest); + return; + } +@@ -7643,11 +7659,16 @@ ev_window_init (EvWindow *ev_window) + allow_links_change_zoom); + ev_view_set_model (EV_VIEW (ev_window->priv->view), ev_window->priv->model); + ++ ev_window->priv->password_view_cancelled = FALSE; + ev_window->priv->password_view = ev_password_view_new (GTK_WINDOW (ev_window)); + g_signal_connect_swapped (ev_window->priv->password_view, + "unlock", + G_CALLBACK (ev_window_password_view_unlock), + ev_window); ++ g_signal_connect_swapped (ev_window->priv->password_view, ++ "cancelled", ++ G_CALLBACK (ev_window_password_view_cancelled), ++ ev_window); + g_signal_connect_object (ev_window->priv->view, "focus_in_event", + G_CALLBACK (view_actions_focus_in_cb), + ev_window, 0); +-- +2.31.1 + diff --git a/SOURCES/evince-3.28.4-handle-clicks-in-forms.patch b/SOURCES/evince-3.28.4-handle-clicks-in-forms.patch new file mode 100644 index 0000000..0a96d18 --- /dev/null +++ b/SOURCES/evince-3.28.4-handle-clicks-in-forms.patch @@ -0,0 +1,55 @@ +From 7c6c930f7fa164700d089d646dc8300340ca4600 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nelson=20Ben=C3=ADtez=20Le=C3=B3n?= +Date: Mon, 6 Apr 2020 14:38:53 -0400 +Subject: [PATCH] EvFormField: allow text entries to handle clicks + +so the user can interact with the text entry for +eg. placing text cursor in an arbitrary position + +Fixes #1364 +--- + libview/ev-view.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/libview/ev-view.c b/libview/ev-view.c +index f73f0ce9..1ebcb584 100644 +--- a/libview/ev-view.c ++++ b/libview/ev-view.c +@@ -2497,6 +2497,14 @@ ev_view_form_field_text_focus_out (GtkWidget *widget, + return FALSE; + } + ++static gboolean ++ev_view_form_field_text_button_pressed (GtkWidget *widget, ++ GdkEventButton *event, ++ gpointer data) ++{ ++ return GDK_EVENT_STOP; ++} ++ + static GtkWidget * + ev_view_form_field_text_create_widget (EvView *view, + EvFormField *field) +@@ -2536,6 +2544,9 @@ ev_view_form_field_text_create_widget (EvView *view, + g_signal_connect_after (text, "activate", + G_CALLBACK (ev_view_form_field_destroy), + view); ++ g_signal_connect_after (text, "button-press-event", ++ G_CALLBACK (ev_view_form_field_text_button_pressed), ++ NULL); + break; + case EV_FORM_FIELD_TEXT_MULTILINE: { + GtkTextBuffer *buffer; +@@ -2554,6 +2565,9 @@ ev_view_form_field_text_create_widget (EvView *view, + g_signal_connect (buffer, "changed", + G_CALLBACK (ev_view_form_field_text_changed), + field); ++ g_signal_connect_after (text, "button-press-event", ++ G_CALLBACK (ev_view_form_field_text_button_pressed), ++ NULL); + } + break; + } +-- +2.31.1 + diff --git a/SPECS/evince.spec b/SPECS/evince.spec index 69f4836..aa7294b 100644 --- a/SPECS/evince.spec +++ b/SPECS/evince.spec @@ -5,7 +5,7 @@ Name: evince Version: 3.28.4 -Release: 14%{?dist} +Release: 16%{?dist} Summary: Document viewer License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse @@ -35,12 +35,18 @@ Patch11: evince-3.28.4-application-id.patch Patch12: evince-3.28.4-reset-form-action.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1896006 -# https://bugzilla.redhat.com/show_bug.cgi?id=2006331 +# https://bugzilla.redhat.com/show_bug.cgi?id=2006333 Patch13: evince-3.28.4-reset-form-translations.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1917752 Patch14: evince-3.28.4-containing-folder.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1927704 +Patch15: evince-3.28.4-Show-password-dialog-again.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=2008310 +Patch16: evince-3.28.4-handle-clicks-in-forms.patch + BuildRequires: pkgconfig(adwaita-icon-theme) BuildRequires: pkgconfig(gio-unix-2.0) >= %{glib2_version} BuildRequires: pkgconfig(gnome-desktop-3.0) @@ -269,13 +275,18 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/evince.desktop %{_libdir}/mozilla/plugins/libevbrowserplugin.so %changelog -* Fri Sep 24 2021 Marek Kasik - 3.28.4-14 -- Bumping release -- Resolves: #2006331 +* Mon Oct 4 2021 Marek Kasik - 3.28.4-16 +- Allow text entries to handle clicks +- Resolves: #2008310 -* Fri Sep 24 2021 Marek Kasik - 3.28.4-13 +* Fri Sep 24 2021 Marek Kasik - 3.28.4-15 - Update translations of string "Reset form" -- Resolves: #2006331 +- Resolves: #2006333 + +* Mon Sep 20 2021 Marek Kasik - 3.28.4-13 +- Show password dialog again +- if password dialog was cancelled previously +- Resolves: #1927704 * Mon Mar 22 2021 Marek Kasik - 3.28.4-12 - Bumping release