[nautilus] window: remove 'Clear History' from the 'Go' menu
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] window: remove 'Clear History' from the 'Go' menu
- Date: Thu, 21 Jul 2011 19:50:24 +0000 (UTC)
commit 3f42d04301d9a8fcf43f176d1e601356489eb84f
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Jul 21 15:49:02 2011 -0400
window: remove 'Clear History' from the 'Go' menu
This is a leftover from the past, when we used to have a global history
list. Now that Nautilus is not persistent and we don't have that
anymore, it doesn't really make sense to keep this menu item.
https://bugzilla.gnome.org/show_bug.cgi?id=654422
src/nautilus-shell-ui.xml | 4 ----
src/nautilus-window-menus.c | 42 ------------------------------------------
src/nautilus-window.c | 39 ---------------------------------------
src/nautilus-window.h | 3 ---
4 files changed, 0 insertions(+), 88 deletions(-)
---
diff --git a/src/nautilus-shell-ui.xml b/src/nautilus-shell-ui.xml
index 0f3c8e2..a606251 100644
--- a/src/nautilus-shell-ui.xml
+++ b/src/nautilus-shell-ui.xml
@@ -98,10 +98,6 @@
<menuitem name="Go to Network" action="Go to Network"/>
<menuitem name="Go to Location" action="Go to Location"/>
<menuitem name="Search" action="Search"/>
- <separator/>
- <menuitem name="Clear History" action="Clear History"/>
- <separator/>
- <placeholder name="History Placeholder"/>
</menu>
<menu action="Bookmarks">
<menuitem name="Add Bookmark" action="Add Bookmark"/>
diff --git a/src/nautilus-window-menus.c b/src/nautilus-window-menus.c
index 375021b..8773ed9 100644
--- a/src/nautilus-window-menus.c
+++ b/src/nautilus-window-menus.c
@@ -524,9 +524,6 @@ nautilus_window_initialize_trash_icon_monitor (NautilusWindow *window)
G_CALLBACK (trash_state_changed_cb), window);
}
-#define MENU_PATH_HISTORY_PLACEHOLDER "/MenuBar/Other Menus/Go/History Placeholder"
-
-#define RESPONSE_FORGET 1000
#define MENU_ITEM_MAX_WIDTH_CHARS 32
enum {
@@ -558,42 +555,6 @@ action_forward_callback (GtkAction *action,
}
static void
-forget_history_if_yes (GtkDialog *dialog, int response, gpointer callback_data)
-{
- if (response == RESPONSE_FORGET) {
- nautilus_forget_history ();
- }
- gtk_widget_destroy (GTK_WIDGET (dialog));
-}
-
-static void
-forget_history_if_confirmed (NautilusWindow *window)
-{
- GtkDialog *dialog;
-
- dialog = eel_create_question_dialog (_("Are you sure you want to clear the list "
- "of locations you have visited?"),
- NULL,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_CLEAR, RESPONSE_FORGET,
- GTK_WINDOW (window));
-
- gtk_widget_show (GTK_WIDGET (dialog));
-
- g_signal_connect (dialog, "response",
- G_CALLBACK (forget_history_if_yes), NULL);
-
- gtk_dialog_set_default_response (dialog, GTK_RESPONSE_CANCEL);
-}
-
-static void
-action_clear_history_callback (GtkAction *action,
- gpointer user_data)
-{
- forget_history_if_confirmed (NAUTILUS_WINDOW (user_data));
-}
-
-static void
action_split_view_switch_next_pane_callback(GtkAction *action,
gpointer user_data)
{
@@ -1041,9 +1002,6 @@ static const GtkActionEntry main_entries[] = {
/* name, stock id, label */ { "Go to Location", NULL, N_("_Location..."),
"<control>L", N_("Specify a location to open"),
G_CALLBACK (action_go_to_location_callback) },
- /* name, stock id, label */ { "Clear History", NULL, N_("Clea_r History"),
- NULL, N_("Clear contents of Go menu and Back/Forward lists"),
- G_CALLBACK (action_clear_history_callback) },
/* name, stock id, label */ { "SplitViewNextPane", NULL, N_("S_witch to Other Pane"),
"F6", N_("Move focus to the other pane in a split view window"),
G_CALLBACK (action_split_view_switch_next_pane_callback) },
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 4232fb8..afa8f31 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -72,8 +72,6 @@
#include <math.h>
#include <sys/time.h>
-#define MAX_HISTORY_ITEMS 50
-
#define SIDE_PANE_MINIMUM_WIDTH 1
#define SIDE_PANE_MINIMUM_HEIGHT 400
@@ -143,7 +141,6 @@ static const struct {
{ XF86XK_AddFavorite, NAUTILUS_ACTION_ADD_BOOKMARK },
{ XF86XK_Favorites, NAUTILUS_ACTION_EDIT_BOOKMARKS },
{ XF86XK_Go, NAUTILUS_ACTION_GO_TO_LOCATION },
-/* TODO?{ XF86XK_History, NAUTILUS_ACTION_HISTORY }, */
{ XF86XK_HomePage, NAUTILUS_ACTION_GO_HOME },
{ XF86XK_OpenURL, NAUTILUS_ACTION_GO_TO_LOCATION },
{ XF86XK_Refresh, NAUTILUS_ACTION_RELOAD },
@@ -1759,42 +1756,6 @@ nautilus_window_get_slot_for_view (NautilusWindow *window,
return NULL;
}
-void
-nautilus_forget_history (void)
-{
- NautilusWindowSlot *slot;
- GList *window_node, *l, *walk;
- NautilusApplication *app;
-
- app = nautilus_application_get_singleton ();
-
- /* Clear out each window's back & forward lists. Also, remove
- * each window's current location bookmark from history list
- * so it doesn't get clobbered.
- */
- for (window_node = gtk_application_get_windows (GTK_APPLICATION (app));
- window_node != NULL;
- window_node = window_node->next) {
-
- NautilusWindow *window;
-
- window = window_node->data;
-
- for (walk = window->details->panes; walk; walk = walk->next) {
- NautilusWindowPane *pane = walk->data;
- for (l = pane->slots; l != NULL; l = l->next) {
- slot = l->data;
-
- nautilus_window_slot_clear_back_list (slot);
- nautilus_window_slot_clear_forward_list (slot);
- }
- }
-
- nautilus_window_allow_back (window, FALSE);
- nautilus_window_allow_forward (window, FALSE);
- }
-}
-
NautilusWindowType
nautilus_window_get_window_type (NautilusWindow *window)
{
diff --git a/src/nautilus-window.h b/src/nautilus-window.h
index f4249e9..3d84e9c 100644
--- a/src/nautilus-window.h
+++ b/src/nautilus-window.h
@@ -152,9 +152,6 @@ void nautilus_window_allow_back (NautilusWindow *window,
gboolean allow);
void nautilus_window_allow_forward (NautilusWindow *window,
gboolean allow);
-void nautilus_window_clear_back_list (NautilusWindow *window);
-void nautilus_window_clear_forward_list (NautilusWindow *window);
-void nautilus_forget_history (void);
void nautilus_window_hide_sidebar (NautilusWindow *window);
void nautilus_window_show_sidebar (NautilusWindow *window);
void nautilus_window_back_or_forward (NautilusWindow *window,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]