diff options
author | John Sullivan <sullivan@src.gnome.org> | 2000-07-28 18:34:13 +0000 |
---|---|---|
committer | John Sullivan <sullivan@src.gnome.org> | 2000-07-28 18:34:13 +0000 |
commit | 0430cc6d73028613d1d3a4214085f57f13bbaa7e (patch) | |
tree | 2c669f26e04b91a93f37d886c26eeec881b38751 /src/nautilus-bookmark-parsing.h | |
parent | 0d92144b4266746817aeb19081ae5fd5ae93b3fe (diff) | |
download | nautilus-0430cc6d73028613d1d3a4214085f57f13bbaa7e.tar.gz |
Finished task 1793 (Display hierarchical pre-canned set of bookmarks)
There's now a "static_bookmarks.xml" file that gets installed into
the Nautilus data directory. Its contents are parsed into menu items
that appear above the user's dynamic items. The static items can
include hierarchy and separators. I put in silly content; someone
else will have to figure out what content we want to ship.
* data/static_bookmarks.xml: New file, tree of bookmarks to display.
* data/Makefile.am: Install the bookmarks file into data directory.
* src/nautilus-bookmark-parsing.h,
* src/nautilus-bookmark-parsing.c: New files, contain xml-bookmark-
parsing code that's used by both the static and dynamic bookmarks.
* src/Makefile.am: tell build about new files.
* src/nautilus-bookmark-list.c:
(make_bookmark_from_node): Moved and renamed this into new file.
(nautilus_bookmark_list_load_file): Call renamed function.
* src/nautilus-window-menus.c:
Renamed BookmarkHolder "in_bookmarks_menu" field to "prompt_for_removal"
to clarify its use.
(bookmark_holder_new), (show_bogus_bookmark_window): Accounted for
name changes.
(append_separator): Just moved this function.
(get_static_bookmarks_file_path): New function, returns path for
static bookmarks file if found.
(create_menu_item_from_node): New function, creates a menu item
from an xml node, recursing into folders.
(append_static_bookmarks): New function, reads xml document and
starts the menu-item-creation recursion.
(nautilus_window_initialize_bookmarks_menu): Now calls
append_static_bookmarks before handling the dynamic ones.
* src/nautilus-window-private.h: New last_static_bookmark_path field
in Details struct.
* src/nautilus-window.c: (nautilus_window_destroy): free
last_static_bookmark_path field.
Diffstat (limited to 'src/nautilus-bookmark-parsing.h')
-rw-r--r-- | src/nautilus-bookmark-parsing.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/nautilus-bookmark-parsing.h b/src/nautilus-bookmark-parsing.h new file mode 100644 index 000000000..d6c25ad9f --- /dev/null +++ b/src/nautilus-bookmark-parsing.h @@ -0,0 +1,33 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* nautilus-bookmark-parsing.h - routines to parse bookmarks from XML data. + + Copyright (C) 2000 Eazel, Inc. + + The Gnome 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. + + The Gnome 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 the Gnome Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Authors: John Sullivan <sullivan@eazel.com> +*/ + +#ifndef NAUTILUS_BOOKMARK_PARSING_H +#define NAUTILUS_BOOKMARK_PARSING_H + +#include <libnautilus-extensions/nautilus-bookmark.h> +#include <tree.h> + +NautilusBookmark * nautilus_bookmark_new_from_node (xmlNodePtr node); + +#endif /* NAUTILUS_BOOKMARK_PARSING_H */ |