Re: Patch and feature request for toggling display of hidden files



On Fri, 2004-05-28 at 17:21, Jamie McCracken wrote:
> On Thu, 2004-05-27 at 15:29, Alexander Larsson wrote:

> Patch updated and attached for this.
> 
> Also updated bugzilla -
> http://bugzilla.gnome.org/show_bug.cgi?id=43472
> 
> I have implemented it as you wanted so the global pref acts as a default
> setting for any uri (in both browser and spatial modes) that has not had
> its toggle state locally set.
> 
> I have not changed the global pref dialog but I do think the option
> "Show hidden and backup files" should have the words "by default"
> appended to make it clear that it wont override folders that have been
> locally changed.
> 
> Hope thats now acceptable to be committed.
> 

Thats still not exactly what I had in mind. I was thinking more along
these lines:

Add should_show_hidden_files to NautilusWindowDetails, default it to the
gconf setting on creation.

Add function to nautilus-window.h:
gboolean nutilus_window_should_show_hidden_files (NautilusWindow *window);
which returns should_show_hidden_files. And
void nautilus_window_set_should_show_hidden_files (NautilusWindow *window, gboolean should_show_hidden_files);

Change nautilus-window-manage-views.c
determined_initial_view_callback() so that it always gets the metadata
(and calls position_and_show_window_callback etc) before calling
load_content_view on the window. And when we get the metadata, for
spatial windows, if the show_hidden is saved in the metadata, set
should_show_hidden_files to it.

In fm-directory-view.c, just call
nautilus_window_should_show_hidden_files() to see if files should be
hidden. And when the user switches the setting in the window, call
nautilus_window_set_should_show_hidden_files with the new value and
reload. If the window is a spatial one (check with
  if (nautilus_view_get_window_type (view->details->nautilus_view) == Nautilus_WINDOW_SPATIAL)
) then save the new setting in the metadata.

Also, check out docs/style-guide.html in the nautilus sources. We're
pretty picky with the spaces and what not, so doing it right the first
time means less hassle getting patches reviewed. :)

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a sword-wielding flyboy assassin who must take medication to keep him 
sane. She's a time-travelling communist former first lady who dreams of 
becoming Elvis. They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]