Commit 2992c099 authored by Mike Engber's avatar Mike Engber

Removed "Close Nautilus Desktop" from the desktop's right click menu.


	* libnautilus/nautilus-bonobo-ui.h:
	* src/file-manager/fm-desktop-icon-view.c:
	(fm_desktop_icon_view_create_background_context_menu_items):
	* src/file-manager/fm-directory-view.c:
	(reset_bonobo_trash_delete_menu),
	(fm_directory_view_real_merge_menus):
	* src/file-manager/fm-directory-view.h:
	* src/nautilus-application.c:
	(nautilus_application_close_all_windows):
	* src/nautilus-application.h:
	* src/nautilus-window-menus.c:
	(file_menu_close_all_windows_callback),
	(nautilus_window_initialize_menus):
	Removed "Close Nautilus Desktop" from the desktop's
	right click menu. Removed "Exit" from the File menu.
	Added "Close All Windows" t the File menu. Bug# 1846
parent 566959a8
2000-08-01 Michael Engber <engber@eazel.com>
* libnautilus/nautilus-bonobo-ui.h:
* src/file-manager/fm-desktop-icon-view.c:
(fm_desktop_icon_view_create_background_context_menu_items):
* src/file-manager/fm-directory-view.c:
(reset_bonobo_trash_delete_menu),
(fm_directory_view_real_merge_menus):
* src/file-manager/fm-directory-view.h:
* src/nautilus-application.c:
(nautilus_application_close_all_windows):
* src/nautilus-application.h:
* src/nautilus-window-menus.c:
(file_menu_close_all_windows_callback),
(nautilus_window_initialize_menus):
Removed "Close Nautilus Desktop" from the desktop's
right click menu. Removed "Exit" from the File menu.
Added "Close All Windows" t the File menu. Bug# 1846
2000-08-01 John Sullivan <sullivan@eazel.com>
Finished task 1552 (Need "never" option for display-embedded-text
......
......@@ -40,8 +40,7 @@
#define NAUTILUS_MENU_PATH_FILE_MENU "/File"
#define NAUTILUS_MENU_PATH_NEW_WINDOW_ITEM "/File/New Window"
#define NAUTILUS_MENU_PATH_CLOSE_ITEM "/File/Close"
#define NAUTILUS_MENU_PATH_SEPARATOR_BEFORE_EXIT "/File/Separator before Exit"
#define NAUTILUS_MENU_PATH_EXIT_ITEM "/File/Exit"
#define NAUTILUS_MENU_PATH_CLOSE_ALL_WINDOWS_ITEM "/File/Close All Windows"
/* Edit menu */
#define NAUTILUS_MENU_PATH_EDIT_MENU "/Edit"
......
......@@ -29,7 +29,6 @@
#include "fm-desktop-mounting.h"
#include "fm-icon-view.h"
#include "src/nautilus-application.h"
#include <fcntl.h>
#include <gdk/gdkx.h>
#include <gnome.h>
......@@ -256,19 +255,6 @@ fm_desktop_icon_view_create_background_context_menu_items (FMDirectoryView *view
}
g_list_free (disk_list);
}
menu_item = gtk_menu_item_new ();
gtk_widget_show (menu_item);
gtk_menu_append (menu, menu_item);
/* Close desktop */
menu_item = gtk_menu_item_new_with_label (_("Close Nautilus Desktop"));
gtk_signal_connect (GTK_OBJECT (menu_item),
"activate",
GTK_SIGNAL_FUNC (nautilus_application_close_desktop),
NULL);
gtk_widget_show (menu_item);
gtk_menu_append (menu, menu_item);
}
static char *
......
......@@ -2659,7 +2659,7 @@ reset_bonobo_trash_delete_menu (FMDirectoryView *view, BonoboUIHandler *ui_handl
ui_handler, selection,
FM_DIRECTORY_VIEW_MENU_PATH_TRASH,
_("Move all selected items to the Trash"),
bonobo_ui_handler_menu_get_pos (ui_handler, NAUTILUS_MENU_PATH_CLOSE_ITEM) + 3,
bonobo_ui_handler_menu_get_pos (ui_handler, NAUTILUS_MENU_PATH_CLOSE_ALL_WINDOWS_ITEM) + 3,
'T', GDK_CONTROL_MASK,
bonobo_menu_move_to_trash_callback, view);
} else {
......@@ -2668,7 +2668,7 @@ reset_bonobo_trash_delete_menu (FMDirectoryView *view, BonoboUIHandler *ui_handl
ui_handler, selection,
FM_DIRECTORY_VIEW_MENU_PATH_DELETE,
_("Delete all selected items"),
bonobo_ui_handler_menu_get_pos (ui_handler, NAUTILUS_MENU_PATH_CLOSE_ITEM) + 3,
bonobo_ui_handler_menu_get_pos (ui_handler, NAUTILUS_MENU_PATH_CLOSE_ALL_WINDOWS_ITEM) + 3,
0, 0,
bonobo_menu_move_to_trash_callback, view);
}
......@@ -2777,15 +2777,15 @@ fm_directory_view_real_merge_menus (FMDirectoryView *view)
bonobo_ui_handler_menu_new_separator
(ui_handler,
FM_DIRECTORY_VIEW_MENU_PATH_SEPARATOR_AFTER_CLOSE,
bonobo_ui_handler_menu_get_pos (ui_handler, NAUTILUS_MENU_PATH_CLOSE_ITEM) + 1);
FM_DIRECTORY_VIEW_MENU_PATH_SEPARATOR_AFTER_CLOSE_ALL_WINDOWS,
bonobo_ui_handler_menu_get_pos (ui_handler, NAUTILUS_MENU_PATH_CLOSE_ALL_WINDOWS_ITEM) + 1);
insert_bonobo_menu_item
(view,
ui_handler, selection,
FM_DIRECTORY_VIEW_MENU_PATH_SHOW_PROPERTIES,
_("View or modify the properties of the selected items"),
bonobo_ui_handler_menu_get_pos (ui_handler, NAUTILUS_MENU_PATH_CLOSE_ITEM) + 2,
bonobo_ui_handler_menu_get_pos (ui_handler, NAUTILUS_MENU_PATH_CLOSE_ALL_WINDOWS_ITEM) + 2,
0, 0,
bonobo_menu_open_properties_window_callback, view);
......@@ -2796,7 +2796,7 @@ fm_directory_view_real_merge_menus (FMDirectoryView *view)
ui_handler, selection,
FM_DIRECTORY_VIEW_MENU_PATH_DUPLICATE,
_("Duplicate all selected items"),
bonobo_ui_handler_menu_get_pos (ui_handler, NAUTILUS_MENU_PATH_CLOSE_ITEM) + 4,
bonobo_ui_handler_menu_get_pos (ui_handler, NAUTILUS_MENU_PATH_CLOSE_ALL_WINDOWS_ITEM) + 4,
'D', GDK_CONTROL_MASK,
bonobo_menu_duplicate_callback, view);
insert_bonobo_menu_item
......@@ -2804,7 +2804,7 @@ fm_directory_view_real_merge_menus (FMDirectoryView *view)
ui_handler, selection,
FM_DIRECTORY_VIEW_MENU_PATH_EMPTY_TRASH,
_("Delete all items in the trash"),
bonobo_ui_handler_menu_get_pos (ui_handler, NAUTILUS_MENU_PATH_CLOSE_ITEM) + 5,
bonobo_ui_handler_menu_get_pos (ui_handler, NAUTILUS_MENU_PATH_CLOSE_ALL_WINDOWS_ITEM) + 5,
0, 0,
bonobo_menu_empty_trash_callback, view);
insert_bonobo_menu_item
......
......@@ -40,22 +40,22 @@ typedef struct FMDirectoryViewClass FMDirectoryViewClass;
* These are the new ones defined by FMDirectoryView. The
* Nautilus-wide ones are in <libnautilus/nautilus-bonobo-ui.h>
*/
#define FM_DIRECTORY_VIEW_MENU_PATH_OPEN "/File/Open"
#define FM_DIRECTORY_VIEW_MENU_PATH_OPEN_IN_NEW_WINDOW "/File/OpenNew"
#define FM_DIRECTORY_VIEW_MENU_PATH_OPEN_WITH "/File/Open With"
#define FM_DIRECTORY_VIEW_MENU_PATH_NEW_FOLDER "/File/New Folder"
#define FM_DIRECTORY_VIEW_MENU_PATH_SEPARATOR_AFTER_CLOSE "/File/SeparatorAfterClose"
#define FM_DIRECTORY_VIEW_MENU_PATH_DELETE "/File/Delete"
#define FM_DIRECTORY_VIEW_MENU_PATH_TRASH "/File/Trash"
#define FM_DIRECTORY_VIEW_MENU_PATH_DUPLICATE "/File/Duplicate"
#define FM_DIRECTORY_VIEW_MENU_PATH_EMPTY_TRASH "/File/Empty Trash"
#define FM_DIRECTORY_VIEW_MENU_PATH_SHOW_PROPERTIES "/File/Show Properties"
#define FM_DIRECTORY_VIEW_MENU_PATH_SEPARATOR_BEFORE_RESET "/Edit/Before Reset"
#define FM_DIRECTORY_VIEW_MENU_PATH_RESET_BACKGROUND "/Edit/Reset Background"
#define FM_DIRECTORY_VIEW_MENU_PATH_REMOVE_CUSTOM_ICONS "/Edit/Remove Custom Icons"
#define FM_DIRECTORY_VIEW_MENU_PATH_OTHER_APPLICATION "/File/Open With/OtherApplication"
#define FM_DIRECTORY_VIEW_MENU_PATH_SEPARATOR_BEFORE_VIEWERS "/File/Open With/SeparatorBeforeViewers"
#define FM_DIRECTORY_VIEW_MENU_PATH_OTHER_VIEWER "/File/Open With/OtherViewer"
#define FM_DIRECTORY_VIEW_MENU_PATH_OPEN "/File/Open"
#define FM_DIRECTORY_VIEW_MENU_PATH_OPEN_IN_NEW_WINDOW "/File/OpenNew"
#define FM_DIRECTORY_VIEW_MENU_PATH_OPEN_WITH "/File/Open With"
#define FM_DIRECTORY_VIEW_MENU_PATH_NEW_FOLDER "/File/New Folder"
#define FM_DIRECTORY_VIEW_MENU_PATH_SEPARATOR_AFTER_CLOSE_ALL_WINDOWS "/File/SeparatorAfterClose"
#define FM_DIRECTORY_VIEW_MENU_PATH_DELETE "/File/Delete"
#define FM_DIRECTORY_VIEW_MENU_PATH_TRASH "/File/Trash"
#define FM_DIRECTORY_VIEW_MENU_PATH_DUPLICATE "/File/Duplicate"
#define FM_DIRECTORY_VIEW_MENU_PATH_EMPTY_TRASH "/File/Empty Trash"
#define FM_DIRECTORY_VIEW_MENU_PATH_SHOW_PROPERTIES "/File/Show Properties"
#define FM_DIRECTORY_VIEW_MENU_PATH_SEPARATOR_BEFORE_RESET "/Edit/Before Reset"
#define FM_DIRECTORY_VIEW_MENU_PATH_RESET_BACKGROUND "/Edit/Reset Background"
#define FM_DIRECTORY_VIEW_MENU_PATH_REMOVE_CUSTOM_ICONS "/Edit/Remove Custom Icons"
#define FM_DIRECTORY_VIEW_MENU_PATH_OTHER_APPLICATION "/File/Open With/OtherApplication"
#define FM_DIRECTORY_VIEW_MENU_PATH_SEPARATOR_BEFORE_VIEWERS "/File/Open With/SeparatorBeforeViewers"
#define FM_DIRECTORY_VIEW_MENU_PATH_OTHER_VIEWER "/File/Open With/OtherViewer"
#define FM_TYPE_DIRECTORY_VIEW (fm_directory_view_get_type ())
#define FM_DIRECTORY_VIEW(obj) (GTK_CHECK_CAST ((obj), FM_TYPE_DIRECTORY_VIEW, FMDirectoryView))
......
......@@ -476,6 +476,15 @@ nautilus_application_close_desktop (void)
}
}
void
nautilus_application_close_all_windows (void)
{
while (nautilus_application_window_list) {
nautilus_window_close (NAUTILUS_WINDOW (nautilus_application_window_list->data));
}
}
static void
nautilus_application_destroy_window (GtkObject *obj, NautilusApplication *application)
{
......
......@@ -56,6 +56,8 @@ gboolean nautilus_application_startup (NautilusApplication *ap
GSList *nautilus_application_windows (void);
NautilusWindow *nautilus_application_create_window (NautilusApplication *application);
void nautilus_application_close_all_windows (void);
void nautilus_application_open_desktop (NautilusApplication *application);
void nautilus_application_close_desktop (void);
......
......@@ -174,11 +174,11 @@ file_menu_close_window_callback (BonoboUIHandler *ui_handler,
}
static void
file_menu_exit_callback (BonoboUIHandler *ui_handler,
gpointer user_data,
const char *path)
file_menu_close_all_windows_callback (BonoboUIHandler *ui_handler,
gpointer user_data,
const char *path)
{
gtk_main_quit ();
nautilus_application_close_all_windows ();
}
static void
......@@ -1031,22 +1031,19 @@ nautilus_window_initialize_menus (NautilusWindow *window)
GNOME_KEY_MOD_CLOSE,
file_menu_close_window_callback,
window);
append_separator (window, NAUTILUS_MENU_PATH_SEPARATOR_BEFORE_EXIT);
bonobo_ui_handler_menu_new_item (ui_handler,
NAUTILUS_MENU_PATH_EXIT_ITEM,
_("_Exit"),
_("Exit from Nautilus"),
NAUTILUS_MENU_PATH_CLOSE_ALL_WINDOWS_ITEM,
_("Close All Windows"),
_("Close all windows"),
-1,
BONOBO_UI_HANDLER_PIXMAP_STOCK,
GNOME_STOCK_MENU_EXIT,
GNOME_KEY_NAME_EXIT,
GNOME_KEY_MOD_EXIT,
file_menu_exit_callback,
BONOBO_UI_HANDLER_PIXMAP_NONE,
NULL,
0,
0,
file_menu_close_all_windows_callback,
NULL);
/* Edit menu */
new_top_level_menu (window, NAUTILUS_MENU_PATH_EDIT_MENU, _("_Edit"));
......
......@@ -174,11 +174,11 @@ file_menu_close_window_callback (BonoboUIHandler *ui_handler,
}
static void
file_menu_exit_callback (BonoboUIHandler *ui_handler,
gpointer user_data,
const char *path)
file_menu_close_all_windows_callback (BonoboUIHandler *ui_handler,
gpointer user_data,
const char *path)
{
gtk_main_quit ();
nautilus_application_close_all_windows ();
}
static void
......@@ -1031,22 +1031,19 @@ nautilus_window_initialize_menus (NautilusWindow *window)
GNOME_KEY_MOD_CLOSE,
file_menu_close_window_callback,
window);
append_separator (window, NAUTILUS_MENU_PATH_SEPARATOR_BEFORE_EXIT);
bonobo_ui_handler_menu_new_item (ui_handler,
NAUTILUS_MENU_PATH_EXIT_ITEM,
_("_Exit"),
_("Exit from Nautilus"),
NAUTILUS_MENU_PATH_CLOSE_ALL_WINDOWS_ITEM,
_("Close All Windows"),
_("Close all windows"),
-1,
BONOBO_UI_HANDLER_PIXMAP_STOCK,
GNOME_STOCK_MENU_EXIT,
GNOME_KEY_NAME_EXIT,
GNOME_KEY_MOD_EXIT,
file_menu_exit_callback,
BONOBO_UI_HANDLER_PIXMAP_NONE,
NULL,
0,
0,
file_menu_close_all_windows_callback,
NULL);
/* Edit menu */
new_top_level_menu (window, NAUTILUS_MENU_PATH_EDIT_MENU, _("_Edit"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment