Re: Weird code in nautilus-file-get-internal(...) of nautilus-file.c
- From: Alexander Larsson <alexl redhat com>
- To: Jaap Haitsma <jaap haitsma org>
- Cc: "nautilus-list gnome org" <nautilus-list gnome org>
- Subject: Re: Weird code in nautilus-file-get-internal(...) of nautilus-file.c
- Date: Tue, 01 Mar 2005 12:24:10 +0100
On Sun, 2005-02-27 at 18:02 +0100, Jaap Haitsma wrote:
> In my efforts to get Trash properties on the desktop to work I came
> across the following snippet in nautilus-file-get-internal(...)
>
> <snip>
> if (self_owned && directory != NULL) {
> file_name = nautilus_directory_get_name_for_self_as_new_file (directory);
> relative_uri = gnome_vfs_escape_string (file_name);
> g_free (file_name);
> } else if (eel_uri_is_desktop (uri)) {
> </snip>
>
> The if statement is true for among others if you pass as uri "trash:" to
> nautilus_file_get_internal. directory then is a nautilus_directory
> object containing the trash directory. In that case
> nautilus_directory_get_name_for_self_as_new_file then
> returns g_strdup(_("Trash")). This seems a bit a weird to me, why would
> relative_uri need to change depending on your locale. Wouldn't a
> nautilus_directory_get_uri be more appropriate here.
> I made the change and didn't see any difference in the behavior of
> nautilus, but I thought I just let you know, because there might be a
> bug here which I do not understand.
>
> Jaap
>
> BTW nautilus_directory_get_name_for_self_as_new_file is only used in the
> above snippet of nautilus.
It does seem a bit strange, yes. Its probably not really right. However,
i don't think it'll actually affect much. Maybe we should add a fixme in
the code though.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a war-weary Amish messiah haunted by memories of 'Nam. She's a scantily
clad communist snake charmer who don't take no shit from nobody. They fight
crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]