[evince] shell: there is no need for view_menu_text_selection_popup
- From: Jose Aliste <jaliste src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] shell: there is no need for view_menu_text_selection_popup
- Date: Thu, 29 Mar 2018 01:18:33 +0000 (UTC)
commit 0797b9daf9f65ecd880fd7e40d7e03db74656ce1
Author: José Aliste <jose aliste gmail com>
Date: Wed Mar 28 00:09:50 2018 -0300
shell: there is no need for view_menu_text_selection_popup
We introduced it while fixing bug 763493, but this function
is identical to ev_window_set_enabled so we don't need it.
See bug 763493
https://bugzilla.gnome.org/show_bug.cgi?id=763943
shell/ev-window.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 21aff4e..7fdd1f6 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -5072,16 +5072,6 @@ view_menu_annot_popup (EvWindow *ev_window,
g_simple_action_set_enabled (G_SIMPLE_ACTION (action), show_attachment);
}
-static void
-view_menu_text_selection_popup (EvWindow *ev_window,
- gboolean enable)
-{
- GAction *action;
-
- action = g_action_map_lookup_action (G_ACTION_MAP (ev_window), "annotate-selected-text");
- g_simple_action_set_enabled (G_SIMPLE_ACTION (action), enable);
-}
-
static gboolean
view_menu_popup_cb (EvView *view,
GList *items,
@@ -5115,7 +5105,7 @@ view_menu_popup_cb (EvView *view,
can_annotate = !has_annot && ev_view_get_has_selection (view);
- view_menu_text_selection_popup (ev_window, can_annotate);
+ ev_window_set_action_enabled (ev_window, "annotate-selected-text", can_annotate);
if (!ev_window->priv->view_popup) {
ev_window->priv->view_popup = gtk_menu_new_from_model (ev_window->priv->view_popup_menu);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]