diff options
-rw-r--r-- | ChangeLog | 23 | ||||
-rw-r--r-- | components/tree/nautilus-tree-model.c | 27 | ||||
-rw-r--r-- | icons/default/default.xml | 2 | ||||
-rw-r--r-- | icons/gnome/gnome.xml | 2 | ||||
-rw-r--r-- | icons/sierra/sierra.xml | 2 | ||||
-rw-r--r-- | icons/tahoe/tahoe.xml | 2 | ||||
-rw-r--r-- | src/Makefile.am | 10 | ||||
-rwxr-xr-x | src/run-nautilus | 3 |
8 files changed, 51 insertions, 20 deletions
@@ -1,3 +1,26 @@ +2002-03-08 Darin Adler <darin@bentspoon.com> + + * components/tree/nautilus-tree-model.c: + (tree_node_has_dummy_child): Add new "inserted_first_child" + boolean so we can insert new children and get rid of the "empty" + node. + (insert_node): Handle the case where we insert the first child, + and the empty node goes away. + (start_monitoring_directory): Set the "done loading" state a bit + earlier. + (nautilus_tree_model_ref_node): Make the "done loading" state be + false if there are no children, so we see "Loading" rather than + "Empty" until we are sure it's empty. + + * icons/default/default.xml: + * icons/gnome/gnome.xml: + * icons/sierra/sierra.xml: + * icons/tahoe/tahoe.xml: + Vertical offset of "-1" looks right. + + * src/Makefile.am: Remove run-nautilus. + * src/run-nautilus: Remove. + 2002-03-08 Michael Meeks <michael@ximian.com> * src/nautilus-window.c diff --git a/components/tree/nautilus-tree-model.c b/components/tree/nautilus-tree-model.c index 59b759cf4..212e306cb 100644 --- a/components/tree/nautilus-tree-model.c +++ b/components/tree/nautilus-tree-model.c @@ -73,6 +73,7 @@ struct TreeNode { TreeNode *first_child; gboolean done_loading; + gboolean inserting_first_child; }; struct NautilusTreeModelDetails { @@ -282,7 +283,9 @@ static gboolean tree_node_has_dummy_child (TreeNode *node) { return node->directory != NULL - && (!node->done_loading || node->first_child == NULL); + && (!node->done_loading + || node->first_child == NULL + || node->inserting_first_child); } static int @@ -683,9 +686,24 @@ update_node_without_reporting (NautilusTreeModel *model, TreeNode *node) static void insert_node (NautilusTreeModel *model, TreeNode *parent, TreeNode *node) { + gboolean parent_empty; + + parent_empty = parent->first_child == NULL; + if (parent_empty) { + parent->inserting_first_child = TRUE; + } + tree_node_parent (node, parent); + update_node_without_reporting (model, node); report_node_inserted (model, node); + + if (parent_empty) { + parent->inserting_first_child = FALSE; + if (!tree_node_has_dummy_child (parent)) { + report_dummy_row_deleted (model, parent); + } + } } static void @@ -893,6 +911,8 @@ start_monitoring_directory (NautilusTreeModel *model, TreeNode *node) node->files_changed_id = g_signal_connect (directory, "files_changed", G_CALLBACK (files_changed_callback), model); + + set_done_loading (model, node, nautilus_directory_are_all_files_seen (directory)); attrs = get_tree_monitor_attributes (); nautilus_directory_file_monitor_add (directory, model, @@ -900,8 +920,6 @@ start_monitoring_directory (NautilusTreeModel *model, TreeNode *node) model->details->show_backup_files, attrs, files_changed_callback, model); g_list_free (attrs); - - set_done_loading (model, node, nautilus_directory_are_all_files_seen (directory)); } static int @@ -1289,6 +1307,9 @@ nautilus_tree_model_ref_node (GtkTreeModel *model, GtkTreeIter *iter) } else { g_assert (parent->all_children_ref_count >= 0); if (++parent->all_children_ref_count == 1) { + if (parent->first_child == NULL) { + parent->done_loading = FALSE; + } schedule_monitoring_update (NAUTILUS_TREE_MODEL (model)); } #if LOG_REF_COUNTS diff --git a/icons/default/default.xml b/icons/default/default.xml index 236b27cb5..452983a84 100644 --- a/icons/default/default.xml +++ b/icons/default/default.xml @@ -20,6 +20,6 @@ <thumbnails frame_offsets="3,3,6,6"/> <throbber frame_count="30" url="http://www.eazel.com" delay="75"/> - <zoom_control number_v_offset="-2" number_h_offset="-2"/> + <zoom_control number_v_offset="-1" number_h_offset="-2"/> </theme> diff --git a/icons/gnome/gnome.xml b/icons/gnome/gnome.xml index 943439cc7..7b233d22c 100644 --- a/icons/gnome/gnome.xml +++ b/icons/gnome/gnome.xml @@ -23,6 +23,6 @@ <thumbnails frame_offsets="3,3,6,6"/> <toolbar icon_theme="standard"/> <throbber frame_count="15" url="http://www.gnome.org"/> - <zoom_control number_v_offset="-2" number_h_offset="-2"/> + <zoom_control number_v_offset="-1" number_h_offset="-2"/> </theme> diff --git a/icons/sierra/sierra.xml b/icons/sierra/sierra.xml index 5ed14811b..9fc939665 100644 --- a/icons/sierra/sierra.xml +++ b/icons/sierra/sierra.xml @@ -3,5 +3,5 @@ <sidebar sidebar_background_tile_image="./green_weave.png" sidebar_background_color="#FFFFFF" tab_piece_images="none"/> <directory background_color="#BAC5C0" selection_box_color_rgba="0x70818359" selection_box_color="#708183"/> <desktop background_tile_image="./Sierra_desktop.png" background_color="#FFFFFF"/> - <zoom_control number_v_offset="-2" number_h_offset="-2"/> + <zoom_control number_v_offset="-1" number_h_offset="-2"/> </theme> diff --git a/icons/tahoe/tahoe.xml b/icons/tahoe/tahoe.xml index be6afe0dd..b649dd296 100644 --- a/icons/tahoe/tahoe.xml +++ b/icons/tahoe/tahoe.xml @@ -3,5 +3,5 @@ <sidebar sidebar_background_tile_image="./bluewall.png" sidebar_background_color="#FFFFFF" title_color="#000000" title_shadow_color="#BBBBBB" title_info_color="#000000"/> <directory background_tile_image="./blueridge.png" background_color="#FFFFFF"/> <desktop background_tile_image="patterns/fleur_de_lis.png" background_color="#FFFFFF"/> - <zoom_control number_v_offset="-2" number_h_offset="-2"/> + <zoom_control number_v_offset="-1" number_h_offset="-2"/> </theme> diff --git a/src/Makefile.am b/src/Makefile.am index 1a90095dc..383d9effb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -142,21 +142,11 @@ EXTRA_DIST = \ $(ui_DATA) \ check-nautilus \ nautilus-shell-interface.idl \ - run-nautilus \ $(NULL) BUILT_SOURCES = \ $(nautilus_shell_interface_idl_sources) \ $(NULL) -install-data-hook: run-nautilus - $(mkinstalldirs) $(DESTDIR)/$(prefix)/bin - @list='run-nautilus'; for p in $$list; do\ - if test -f $$p; then \ - echo " $(INSTALL_PROGRAM) $(srcdir)/$$p $(DESTDIR)/$(prefix)/bin/$$p"; \ - $(INSTALL_PROGRAM) $$p $(DESTDIR)/$(prefix)/bin/$$p; \ - else :; fi; \ - done - dist-hook: cd $(distdir); rm -f $(CLEANFILES) diff --git a/src/run-nautilus b/src/run-nautilus deleted file mode 100755 index 8039176c2..000000000 --- a/src/run-nautilus +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec nautilus ${1+"$@"} |