[epiphany] window: Move copy/search items to the top of the context menu



commit 36d6cc7ae034934ecc062f03551178c0623a3e8f
Author: Jonathan Kang <jonathankang gnome org>
Date:   Wed Jan 2 17:41:12 2019 +0800

    window: Move copy/search items to the top of the context menu
    
    In the context menu for selections, "copy" and "search" are more useful
    comparing others items. So move these two items to the top of the
    context menu when selection is made.

 src/ephy-window.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 956be4cbd..e391276ff 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1638,6 +1638,16 @@ populate_context_menu (WebKitWebView       *web_view,
 
     update_edit_actions_sensitivity (window, TRUE);
 
+    if (should_show_copy_outside_editable (web_view))
+      add_action_to_context_menu (context_menu, window_action_group, "copy",
+                                  window);
+    if (can_search_selection)
+      add_action_to_context_menu (context_menu, popup_action_group,
+                                  search_selection_action_name, window);
+    if (should_show_copy_outside_editable (web_view) || can_search_selection)
+      webkit_context_menu_append (context_menu,
+                                  webkit_context_menu_item_new_separator ());
+
     if (!is_image && !is_media) {
       add_action_to_context_menu (context_menu, toolbar_action_group,
                                   "navigation-back", window);
@@ -1649,19 +1659,9 @@ populate_context_menu (WebKitWebView       *web_view,
                                   webkit_context_menu_item_new_separator ());
     }
 
-    if (should_show_copy_outside_editable (web_view))
-      add_action_to_context_menu (context_menu, window_action_group,
-                                  "copy", window);
-    if (can_search_selection)
-      add_action_to_context_menu (context_menu, popup_action_group,
-                                  search_selection_action_name, window);
-
-    if (!app_mode && !is_image && !is_media) {
-      webkit_context_menu_append (context_menu,
-                                  webkit_context_menu_item_new_separator ());
+    if (!app_mode && !is_image && !is_media)
       add_action_to_context_menu (context_menu, popup_action_group,
                                   "context-bookmark-page", window);
-    }
   }
 
   if (is_image) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]