Launchpad has imported 9 comments from the remote bug at
https://bugzilla.xfce.org/show_bug.cgi?id=3189.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2007-04-27T09:47:14+00:00 Daniel Miles wrote:

While Thunar is fine at hiding files which begin with a full stop, it
does not parse the .hidden file in folders and hide any files and
folders listed within.

This is supported by Konqueror, Nautilus, and is a handy feature. One
example of use is here: https://blueprints.launchpad.net/ubuntu/+spec
/hide-filesystem-structure/


This bug has also been filed on Ubuntu's launchpad here: 
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/110521

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/110521/comments/0

------------------------------------------------------------------------
On 2007-06-25T09:46:44+00:00 Mdskpr wrote:

(In reply to comment #0)
> While Thunar is fine at hiding files which begin with a full stop, it does not
> parse the .hidden file in folders and hide any files and folders listed 
> within.
> 
> This is supported by Konqueror, Nautilus, and is a handy feature. One example
> of use is here:
> https://blueprints.launchpad.net/ubuntu/+spec/hide-filesystem-structure/
> 
> 
> This bug has also been filed on Ubuntu's launchpad here:
> https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/110521
> 

did u try this?

start thunar

and then press ctrl + h 
and then go into ur home directory
it should show all the hidden files

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/110521/comments/2

------------------------------------------------------------------------
On 2007-06-25T18:02:30+00:00 Daniel Miles wrote:

I'm not sure you understand the bug report. The problem is not that
Thunar is not showing files, the problem is that it is not hiding them.

There are two ways to tell the major file managers (Nautilus, Konqueror,
Dolphin) to hide files - prefix their filename with a fullstop, ie,
'.foo.sh', or leave the filename as is 'foo.sh' and add that to a list
contained in the file '.hidden'

The first method works with Thunar, the second does not.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/110521/comments/3

------------------------------------------------------------------------
On 2008-08-16T07:41:51+00:00 Jeromeg wrote:

Created attachment 1774
initial draft of patch to solve this

I started to work on this, and here is the patch I came up to.

Comments are welcome, I doubt this is perfect.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/110521/comments/7

------------------------------------------------------------------------
On 2008-08-17T05:11:58+00:00 Bjt23 wrote:

The patch itself is sorta ok (see below for those notes), but it's
pretty awful from a performance standpoint.  When Thunar opens a
directory, it'll have to open the .hidden file for each and every file
in the dir, read it in, parse it, and decide.  Even if there's no
.hidden file, you incur an extra stat() call for each and every file in
a directory when enumerating the files in it.

Better would be to cache the contents of .hidden the first time it's
opened (perhaps in a GHashTable or GTree for fast lookups, though a
GSList might be ok since in a real-world scenario, I wouldn't expect
there to be more than a few files listed in .hidden), and kill the cache
when the user leaves the directory (or maybe X seconds after the user
leaves, in case they come back soon).  If there isn't a .hidden file,
should cache that fact and not stat() for every file in the dir.

Also might want to consider on-the-fly updating.  Thunar already
monitors the currently-opened directory for changes so it can update the
listing in real time.  If .hidden changes, should invalidate the cache,
reread it, and hide any files in the directory that now match.

This is of course much more complex than your patch... personally I
wouldn't be happy with it as-is; I imagine Benny's standards are higher
than mine :-/ .

About the patch itself:

1.  Don't declare variables ('hidden_file' in your case) in the middle
of functions.  gcc 3+ handles this fine, but other compilers may not.

2.  Is there a particular reason you're duping the strings for
'basename' and 'parent'?  You don't need to keep them around past
function invocation, and you don't modify them.

3.  You leak 'basename' -- you g_strdup() a string at the top and store
it in 'basename', and then g_strconcat() another string inside the if()
block and store it in 'basename' without ever g_free()ing the original.
Note that g_strconcat() also allocs memory.

4.  g_file_get_contents() wastes memory, and, depending on the size of
.hidden, is slower than just fopen()ing the file, and using fgets() to
get each line.  If you find the file in the list, you don't have to read
out the entire file.  You can also use a buffer on the stack with
fgets() to avoid another alloc/free.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/110521/comments/8

------------------------------------------------------------------------
On 2012-04-04T12:08:42+00:00 Sdfjsfjaei-softwareload wrote:

Hello guys!

I hope this feature will be soon implemented as it is really nice to be
able to hide stuff like $RECYCLE.BIN, System Volume Information and some
other folders of which the name can't be changed to begin with a dot.

Thanks so much for your work on XFCE, Thunar and co.

Best regards!
snapy666

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/110521/comments/15

------------------------------------------------------------------------
On 2012-10-01T01:49:01+00:00 Mark Harrison wrote:

Created attachment 4645
Function to test if file is contained in .hidden

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/110521/comments/18

------------------------------------------------------------------------
On 2012-10-01T01:49:56+00:00 Mark Harrison wrote:

I've attempted to write an improved version of Jérôme Guelfucci's
function (#3) for reading the .hidden file while imcorporating Brian J.
Tarricone's critiques (#4).  (Function to test if file is contained in
.hidden) Unfortunately, I couldn't figure out how to compile thunar so I
couldn't test this function.  I hope this is useful in moving this bug
towards resolution.

Basically, the last visited directory and a hash table of the .hidden
file in that directory are stored in static variables.  When a new file
is checked, its directory (parent) is compared with the directory stored
in the static variable.  If they match, the current hash table is used.
If they don't match, the hash table is destroyed and the .hidden file in
the current directory--if it exists--is read into a new hash table.  The
hash table is then searched for the input file.

It has two limitations:

(1) It does not refresh if the .hidden file is changed in the current
directory.

(2) The maximum length file name is 254 characters (specified by
max_line_length in line 52).  This is required by fgets when reading the
.hidden file.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/110521/comments/19

------------------------------------------------------------------------
On 2012-10-01T06:14:39+00:00 8-nick wrote:

If this is really a spec, GIO (!) can implement this. GtkFileChooser
also doesn't implement this, so I can hardly care.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/thunar/+bug/110521/comments/20


** Changed in: thunar
       Status: Confirmed => Won't Fix

** Changed in: thunar
   Importance: Unknown => Wishlist

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/110521

Title:
  Thunar does not respect .hidden files

To manage notifications about this bug go to:
https://bugs.launchpad.net/thunar/+bug/110521/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to