[evince] shell: Remove menu for recent items



commit 14195c5f81a41234f08a65e7bf0ddd0a42555fba
Author: Germán Poo-Caamaño <gpoo gnome org>
Date:   Tue Jun 24 22:39:12 2014 -0700

    shell: Remove menu for recent items
    
    Recent menu has been replaced by a bookshelf-like interface.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=633501

 shell/Makefile.am            |    2 -
 shell/ev-recent-menu-model.c |  108 ------------------------------------------
 shell/ev-recent-menu-model.h |   30 ------------
 shell/ev-toolbar.c           |   11 ----
 shell/ev-window.c            |   15 ------
 shell/evince-menus.ui        |    5 --
 6 files changed, 0 insertions(+), 171 deletions(-)
---
diff --git a/shell/Makefile.am b/shell/Makefile.am
index f4828d1..abdae6b 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -71,8 +71,6 @@ evince_SOURCES=                               \
        ev-sidebar-page.h               \
        ev-sidebar-thumbnails.c         \
        ev-sidebar-thumbnails.h         \
-       ev-recent-menu-model.c          \
-       ev-recent-menu-model.h          \
        main.c
 
 nodist_evince_SOURCES = \
diff --git a/shell/ev-toolbar.c b/shell/ev-toolbar.c
index ab0b021..ac70a92 100644
--- a/shell/ev-toolbar.c
+++ b/shell/ev-toolbar.c
@@ -31,7 +31,6 @@
 #include "ev-zoom-action.h"
 #include "ev-history-action.h"
 #include "ev-application.h"
-#include "ev-recent-menu-model.h"
 #include "ev-page-action-widget.h"
 #include <math.h>
 
@@ -193,8 +192,6 @@ ev_toolbar_constructed (GObject *object)
         GtkWidget      *button;
         gboolean        rtl;
         GMenuModel     *menu;
-        GMenu          *recent_submenu;
-        GMenuModel     *recent_menu_model;
         GMenuModel     *bookmarks_submenu_model;
 
         G_OBJECT_CLASS (ev_toolbar_parent_class)->constructed (object);
@@ -284,14 +281,6 @@ ev_toolbar_constructed (GObject *object)
                 gtk_widget_set_margin_right (vbox, 6);
         gtk_header_bar_pack_end (GTK_HEADER_BAR (ev_toolbar), vbox);
 
-        recent_menu_model = ev_recent_menu_model_new (gtk_recent_manager_get_default (),
-                                                      "win.open-recent",
-                                                      g_get_application_name ());
-
-        recent_submenu = G_MENU (gtk_builder_get_object (builder, "recent"));
-        g_menu_append_section (recent_submenu, NULL, recent_menu_model);
-        g_object_unref (recent_menu_model);
-
         ev_toolbar->priv->bookmarks_section = G_MENU (gtk_builder_get_object (builder, "bookmarks"));
         bookmarks_submenu_model = ev_window_get_bookmarks_menu (ev_toolbar->priv->window);
         g_signal_connect (bookmarks_submenu_model, "items-changed",
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 79c2b00..14555e0 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -270,8 +270,6 @@ struct _EvWindowPrivate {
 
 #define EV_TOOLBARS_FILENAME "evince-toolbar.xml"
 
-#define MAX_RECENT_ITEM_LEN (40)
-
 #define TOOLBAR_RESOURCE_PATH "/org/gnome/evince/shell/ui/toolbar.xml"
 
 #define FULLSCREEN_POPUP_TIMEOUT 2
@@ -2621,18 +2619,6 @@ ev_window_cmd_file_open_copy (GSimpleAction *action,
 }
 
 static void
-ev_window_cmd_file_open_recent (GSimpleAction *action,
-                               GVariant      *parameter,
-                               gpointer       user_data)
-{
-       EvWindow *window = user_data;
-
-       ev_application_open_uri_at_dest (EV_APP, g_variant_get_string (parameter, NULL),
-                                        gtk_window_get_screen (GTK_WINDOW (window)),
-                                        NULL, 0, NULL, gtk_get_current_event_time ());
-}
-
-static void
 ev_window_add_recent (EvWindow *window, const char *filename)
 {
        gtk_recent_manager_add_item (window->priv->recent_manager, filename);
@@ -5774,7 +5760,6 @@ ev_window_class_init (EvWindowClass *ev_window_class)
 static const GActionEntry actions[] = {
        { "open", ev_window_cmd_file_open },
        { "open-copy", ev_window_cmd_file_open_copy },
-       { "open-recent", ev_window_cmd_file_open_recent, "s" },
        { "save-copy", ev_window_cmd_save_as },
        { "send-to", ev_window_cmd_send_to },
        { "open-containing-folder", ev_window_cmd_open_containing_folder },
diff --git a/shell/evince-menus.ui b/shell/evince-menus.ui
index 96a7b24..48f0f23 100644
--- a/shell/evince-menus.ui
+++ b/shell/evince-menus.ui
@@ -126,11 +126,6 @@
         <attribute name="action">win.open-copy</attribute>
       </item>
       <item>
-        <attribute name="label" translatable="yes">_Recent</attribute>
-        <link name="submenu" id="recent">
-        </link>
-      </item>
-      <item>
         <attribute name="label" translatable="yes">_Save a Copy…</attribute>
         <attribute name="action">win.save-copy</attribute>
       </item>


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