summaryrefslogtreecommitdiff
path: root/src/nautilus-bookmark-parsing.c
Commit message (Collapse)AuthorAgeFilesLines
* First step fixing storage leaks: Fixed some ref. count leaks ofDarin Adler2000-09-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NautilusFile, NautilusDirectory, and NautilusScalableIcon. * components/tree/nautilus-tree-model.c: (remove_all_nodes): Unref the root node when we are done with it. (report_root_node_if_possible): Use report_node_changed for new nodes as well. (report_node_changed): Since a new node and a changed node are really the same, just use this instead of using a different call for added vs. changed. (nautilus_tree_model_directory_files_changed_callback): Ref the node when it's being added to the hash table. Get rid of the misguided code that would ref "because remove will unref" and instead use a more normal model. (nautilus_tree_model_directory_files_added_callback): Fix a storage leak in the case where we generate a warning. Changed it from a printf to a g_warning. Use report_node_changed for new nodes as well. Unref the node after adding it to use a more normal ref model; handles cases where it's already in there properly, for one thing. * components/tree/nautilus-tree-node.c: (nautilus_tree_node_set_parent): Changed an assert to a return_if_fail. * libnautilus-extensions/nautilus-bookmark.c: (nautilus_bookmark_update_icon): Change the code to take the fact that nautilus_icon_factory_get_icon_for_file yields a new ref into account to plug a NautilusScalableIcon leak. * src/nautilus-bookmark-parsing.c: (nautilus_bookmark_new_from_node): Unref the icon after creating a new bookmark. If the bookmark needs to keep it, it will ref it. * src/file-manager/fm-icon-view.c: (get_icon_images_callback): Extra space in here.
* Made copyright headers consistent in style; also made sure to refer toMaciej Stachowiak2000-08-111-20/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/nautilus-applicable-views.c, src/nautilus-applicable-views.h, src/nautilus-application.c, src/nautilus-application.h, src/nautilus-bookmark-list.c, src/nautilus-bookmark-list.h, src/nautilus-bookmark-parsing.c, src/nautilus-bookmark-parsing.h, src/nautilus-bookmarks-window.c, src/nautilus-bookmarks-window.h, src/nautilus-complex-search-bar.c, src/nautilus-complex-search-bar.h, src/nautilus-desktop-window.c, src/nautilus-desktop-window.h, src/nautilus-first-time-druid.c, src/nautilus-first-time-druid.h, src/nautilus-history-frame.c, src/nautilus-history-frame.h, src/nautilus-link-set-window.c, src/nautilus-link-set-window.h, src/nautilus-location-bar.c, src/nautilus-location-bar.h, src/nautilus-main.c, src/nautilus-navigation-bar.c, src/nautilus-navigation-bar.h, src/nautilus-property-browser.c, src/nautilus-property-browser.h, src/nautilus-search-bar-private.h, src/nautilus-search-bar.c, src/nautilus-search-bar.h, src/nautilus-self-check-functions.c, src/nautilus-self-check-functions.h, src/nautilus-shell.c, src/nautilus-shell.h, src/nautilus-sidebar-tabs.c, src/nautilus-sidebar-tabs.h, src/nautilus-sidebar-title.c, src/nautilus-sidebar-title.h, src/nautilus-sidebar.c, src/nautilus-sidebar.h, src/nautilus-signaller.c, src/nautilus-signaller.h, src/nautilus-simple-search-bar.c, src/nautilus-simple-search-bar.h, src/nautilus-switchable-navigation-bar.c, src/nautilus-switchable-navigation-bar.h, src/nautilus-switchable-search-bar.c, src/nautilus-switchable-search-bar.h, src/nautilus-toolbar.c, src/nautilus-toolbar.h, src/nautilus-view-frame-bonobo-control.c, src/nautilus-view-frame-bonobo-embeddable.c, src/nautilus-view-frame-corba.c, src/nautilus-view-frame-nautilus-view.c, src/nautilus-view-frame-private.h, src/nautilus-view-frame.c,src/nautilus-view-frame.h, src/nautilus-window-manage-views.c, src/nautilus-window-manage-views.h, src/nautilus-window-menus.c, src/nautilus-window-private.h, src/nautilus-window-toolbars.c, src/nautilus-window.c, src/nautilus-window.h, src/nautilus-zoom-control.c, src/nautilus-zoom-control.h, src/nautilus-zoomable-frame-corba.c: Made copyright headers consistent in style; also made sure to refer to Nautilus as Nautilus, not "this library" or "The GNOME Library".
* Finished task 1793 (Display hierarchical pre-canned set of bookmarks)John Sullivan2000-07-281-0/+62
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.