summaryrefslogtreecommitdiff
path: root/libnautilus
diff options
context:
space:
mode:
authorJohn Sullivan <sullivan@src.gnome.org>2000-08-18 19:14:56 +0000
committerJohn Sullivan <sullivan@src.gnome.org>2000-08-18 19:14:56 +0000
commit425ec1016e4eb57b919751d72454cd95535f9065 (patch)
treebcbab6adef7e0e476f4826730f27db7a5fa818bd /libnautilus
parent3685f79f919a0a560e065f49d2b24abeaad4f20d (diff)
downloadnautilus-425ec1016e4eb57b919751d72454cd95535f9065.tar.gz
More menu tweaking, including switching over to use
Bonobo "menu placeholders" for menu-merging components. Fixed bug 1859 (Need improved way to position added menu items) * libnautilus/nautilus-bonobo-ui.h: Removed all menu item paths except those we expect to be merged over (like "Select All"). Added new placeholder paths for components to use when merging instead of relying on the positions of specific menu items. Commented the intended use of each placeholder. * components/loser/content/nautilus-content-loser.c: (loser_merge_bonobo_items_callback): * components/loser/sidebar/nautilus-sidebar-loser.c: (loser_merge_bonobo_items_callback): * components/sample/nautilus-sample-content-view.c: (sample_merge_bonobo_items_callback): Updated menu-merging code to use placeholder paths. * src/file-manager/fm-directory-view.c: (reset_bonobo_trash_delete_menu), (reset_bonobo_open_with_menu), (fm_directory_view_real_merge_menus): Updated menu-merging code to use placeholder paths or to base positions off other directory view menu items. Added separator before Empty Trash. * src/file-manager/fm-directory-view.h: Updated #defines for directory view menu paths (some used by subclasses) * src/file-manager/fm-icon-view.c: (compute_menu_item_info): Change "Restore Icon to Unstretched Size" to "Restore Icon's Original Size" to match Arlo's wording (and similarly for the plural case) * src/nautilus-window-menus.c: Moved in the menu paths that were moved out of nautilus-bonobo-ui.h (append_placeholder): New function, wrapper for bonobo_ui_handler_menu_new_placeholder (nautilus_window_remove_bookmarks_menu_items), (refresh_dynamic_bookmarks), (append_static_bookmarks): Simplified logic of rebuilding bookmarks menu by using placeholder instead of details->last_static_bookmark_path. (nautilus_window_initialize_menus): Insert the placeholders defined in nautilus-bonobo-ui.h; add Control-/ for "About Nautilus" per Arlo. (nautilus_window_remove_go_menu_items), (refresh_go_menu): Use placeholder to position History menu items. * src/nautilus-window-private.h: Removed last_static_bookmark_path; moved #defines for back/forward/up menu paths here. * src/nautilus-window.c: (nautilus_window_destroy): Removed last_static_bookmark_path. Fixed bug 2166 (Clearing name field in Properties window doesn't work right) * src/file-manager/fm-properties-window.c: (name_field_update_to_match_file): Changed a char * to const char * for clarity. (name_field_restore_original_name): New function, restores the original contents of the name field, no questions asked. (name_field_done_editing): When handling empty-string case, use restore_original_name instead of update_to_match_file, which was too clever for this case.
Diffstat (limited to 'libnautilus')
-rw-r--r--libnautilus/nautilus-bonobo-ui.h66
1 files changed, 34 insertions, 32 deletions
diff --git a/libnautilus/nautilus-bonobo-ui.h b/libnautilus/nautilus-bonobo-ui.h
index ee60ee358..62f68d197 100644
--- a/libnautilus/nautilus-bonobo-ui.h
+++ b/libnautilus/nautilus-bonobo-ui.h
@@ -30,51 +30,53 @@
#ifndef NAUTILUS_BONOBO_UI_H
#define NAUTILUS_BONOBO_UI_H
-/* Components can use these paths with BonoboUIHandler calls to
- * locate menus and menu items for the purpose of menu merging.
- * Note: Not all Nautilus menu items are necessarily published
- * here; these are the ones whose existence components can count on.
+/**
+ * Components can use these menu paths with BonoboUIHandler calls to
+ * place entire new menus.
*/
-/* File menu */
#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_CLOSE_ALL_WINDOWS_ITEM "/File/Close All Windows"
-
-/* Edit menu */
#define NAUTILUS_MENU_PATH_EDIT_MENU "/Edit"
-#define NAUTILUS_MENU_PATH_UNDO_ITEM "/Edit/Undo"
-#define NAUTILUS_MENU_PATH_SEPARATOR_AFTER_UNDO "/Edit/Separator after Undo"
+#define NAUTILUS_MENU_PATH_GO_MENU "/Go"
+#define NAUTILUS_MENU_PATH_BOOKMARKS_MENU "/Bookmarks"
+#define NAUTILUS_MENU_PATH_HELP_MENU "/Help"
+
+/**
+ * Components can use these menu item paths with BonoboUIHandler calls to
+ * merge over certain existing items. Only items that we expect to be
+ * merged over are listed here, to avoid making public details that might
+ * change later.
+ */
+
#define NAUTILUS_MENU_PATH_CUT_ITEM "/Edit/Cut"
#define NAUTILUS_MENU_PATH_COPY_ITEM "/Edit/Copy"
#define NAUTILUS_MENU_PATH_PASTE_ITEM "/Edit/Paste"
#define NAUTILUS_MENU_PATH_CLEAR_ITEM "/Edit/Clear"
-#define NAUTILUS_MENU_PATH_SEPARATOR_AFTER_CLEAR "/Edit/Separator after Clear"
#define NAUTILUS_MENU_PATH_SELECT_ALL_ITEM "/Edit/Select All"
-#define NAUTILUS_MENU_PATH_SEPARATOR_AFTER_SELECT_ALL "/Edit/Separator after Select All"
-/* Go menu */
-#define NAUTILUS_MENU_PATH_GO_MENU "/Go"
-#define NAUTILUS_MENU_PATH_BACK_ITEM "/Go/Back"
-#define NAUTILUS_MENU_PATH_FORWARD_ITEM "/Go/Forward"
-#define NAUTILUS_MENU_PATH_UP_ITEM "/Go/Up"
-#define NAUTILUS_MENU_PATH_HOME_ITEM "/Go/Home"
-#define NAUTILUS_MENU_PATH_SEPARATOR_BEFORE_HISTORY "/Go/Separator before History"
+/**
+ * Components can use these placeholder paths with BonoboUIHandler calls to
+ * insert new items in well-defined positions.
+ */
-/* Bookmarks menu */
-#define NAUTILUS_MENU_PATH_BOOKMARKS_MENU "/Bookmarks"
-#define NAUTILUS_MENU_PATH_ADD_BOOKMARK_ITEM "/Bookmarks/Add Bookmark"
-#define NAUTILUS_MENU_PATH_EDIT_BOOKMARKS_ITEM "/Bookmarks/Edit Bookmarks"
-#define NAUTILUS_MENU_PATH_SEPARATOR_BEFORE_BOOKMARKS "/Bookmarks/Separator before Bookmarks"
+/* Use the "new items" placeholder to insert menu items like "New xxx" */
+#define NAUTILUS_MENU_PATH_NEW_ITEMS_PLACEHOLDER "/File/New Items Placeholder"
+
+/**
+ * Use the "open" placeholder to insert menu items dealing with opening the
+ * selected item, like "Open", "Open in New Window", etc.
+ */
+#define NAUTILUS_MENU_PATH_OPEN_PLACEHOLDER "/File/Open Placeholder"
+
+/**
+ * Use the "file items" placeholder to insert other menu items dealing with
+ * individual files, such as "Show Properties" and "Rename"
+ */
+#define NAUTILUS_MENU_PATH_FILE_ITEMS_PLACEHOLDER "/File/File Items Placeholder"
-/* Settings menu */
-#define NAUTILUS_MENU_PATH_SETTINGS_MENU "/Settings"
-#define NAUTILUS_MENU_PATH_SEPARATOR_AFTER_USER_LEVELS "/Settings/Separator after User Levels"
+/* Use the "extra help items" placeholder to add help-related items */
+#define NAUTILUS_MENU_PATH_EXTRA_HELP_ITEMS_PLACEHOLDER "/Help/Extra Help Items"
-/* Help menu */
-#define NAUTILUS_MENU_PATH_HELP_MENU "/Help"
-#define NAUTILUS_MENU_PATH_ABOUT_ITEM "/Help/About Nautilus"
/* Components can use these paths with BonoboUIHandler calls to
* locate toolbars and toolbar items for the purpose of merging.