diff options
author | John Sullivan <sullivan@src.gnome.org> | 2000-04-28 02:37:14 +0000 |
---|---|---|
committer | John Sullivan <sullivan@src.gnome.org> | 2000-04-28 02:37:14 +0000 |
commit | 604acdd1e30ae6f326edc45694521a8dcd611480 (patch) | |
tree | 204a583b5fdeeefbc755355df5f488bd325ebc95 /libnautilus/nautilus-bonobo-ui.h | |
parent | 7e8e4fa240d552b47fb58d858a9390a160a06ce4 (diff) | |
download | nautilus-604acdd1e30ae6f326edc45694521a8dcd611480.tar.gz |
Fixed bug 660 (Need to publish menu positions for components to use)
* libnautilus/nautilus-bonobo-ui.h:
New file, contains #defines for Bonobo-style menu paths for all
the menus & menu items in Nautilus that we promise components
will exist.
* libnautilus/Makefile.am: Include this new header file in library.
* src/nautilus-window-menus.c: Extensive changes, too many to list
every function. Replaced all the GnomeUIInfo mechanism with
Bonobo-style menu creation, using the menu paths from
nautilus-bonobo-ui.h. While I was in here, I also renamed some
functions (especially xxx_cb -> xxx_callback), tweaked some text,
and used some more standard Gnome menu item pixmaps (not sure if I
like them or not yet).
* src/ntl-window-private.h,
* src/ntl-window.c:
(nautilus_window_back_cb), (nautilus_window_forward_cb),
(nautilus_window_up_cb), (nautilus_window_home_cb): Replaced
these GtkWidget-callback style functions (formerly used
by both menu items and toolbar buttons) with new NautilusWindow
oriented ones nautilus_window_go_back, nautilus_window_go_forward,
nautilus_window_go_up, and nautilus_window_go_home.
(nautilus_window_allow_back), (nautilus_window_allow_forward),
(nautilus_window_allow_up): replaced hardwired Bonobo menu paths
with the new #defines.
* src/nautilus-window-toolbars.c:
Renamed some functions xxx_cb -> xxx_callback.
(toolbar_back_callback), (toolbar_forward_callback),
(toolbar_up_callback), (toolbar_home_callback): New GtkWidget-callback
style functions used exclusively by the toolbar.
* src/file-manager/fm-directory-view.h:
Removed FM_DIRECTORY_VIEW_PATH_CLOSE and
FM_DIRECTORY_VIEW_PATH_SELECT_ALL, since callers should use
the paths defined by Nautilus for these.
* src/file-manager/fm-directory-view.c:
(fm_directory_view_real_merge_menus): Replaced special insider knowledge
of menu positions with use of the new #defines. Also tweaked with the
keyboard underscore shortcuts for some items.
Diffstat (limited to 'libnautilus/nautilus-bonobo-ui.h')
-rw-r--r-- | libnautilus/nautilus-bonobo-ui.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/libnautilus/nautilus-bonobo-ui.h b/libnautilus/nautilus-bonobo-ui.h new file mode 100644 index 000000000..9b17e7d7d --- /dev/null +++ b/libnautilus/nautilus-bonobo-ui.h @@ -0,0 +1,79 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: 8; c-basic-offset: 8 -*- */ + +/* + * libnautilus: A library for nautilus view implementations. + * + * Copyright (C) 2000 Eazel, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Author: Maciej Stachowiak <mjs@eazel.com> + * + */ + +/* nautilus-bonobo-ui.h: bonobo UI paths usable by Nautilus components + * for merging menus and toolbars. + */ + +#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. + */ + +/* 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_SEPARATOR_BEFORE_EXIT "/File/Separator before Exit" +#define NAUTILUS_MENU_PATH_EXIT_ITEM "/File/Exit" + +/* 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_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" + +/* 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" + +/* 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" + +/* Settings menu */ +#define NAUTILUS_MENU_PATH_SETTINGS_MENU "/Settings" +#define NAUTILUS_MENU_PATH_SEPARATOR_AFTER_USER_LEVELS "/Settings/Separator after User Levels" + +/* Help menu */ +#define NAUTILUS_MENU_PATH_HELP_MENU "/Help" +#define NAUTILUS_MENU_PATH_ABOUT_ITEM "/Help/About Nautilus" + +#endif /* NAUTILUS_BONOBO_UI_H */ |