[evince/wip/recent-view: 8/8] shell: Remove menu for recent items



commit 529ea78d6ae81c83b8e4c607aa06337dc5f5e5d5
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/ev-toolbar.c    |   10 ----------
 shell/ev-window.c     |   15 ---------------
 shell/evince-menus.ui |    5 -----
 3 files changed, 0 insertions(+), 30 deletions(-)
---
diff --git a/shell/ev-toolbar.c b/shell/ev-toolbar.c
index 202760d..9ee8ae1 100644
--- a/shell/ev-toolbar.c
+++ b/shell/ev-toolbar.c
@@ -193,8 +193,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 +282,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 733933b..d935abe 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
@@ -2617,18 +2615,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);
@@ -5767,7 +5753,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 94831c9..d3d49e7 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]