[haiku-commits] Re: r35085 - in haiku/trunk/src: kits/tracker system/libroot/os

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 15 Jan 2010 09:01:22 +0100

anevilyak@xxxxxxxxx wrote:
> More Tracker refactoring:
>  * TrashWatcher now keeps icons in sync on all volumes.

Does that really make much sense?

>  * DesktopPoseView now creates a virtual Trash pose representing the
> trash contents as before.

What were your reasons not to follow the symlink approach, btw?
I'm just asking; I don't really mind, as it doesn't really change 
anything from the status quo, anyway.
I'm not sure if uppercase "Trash" is the name we should choose, as we 
only have lowercase directories otherwise.

And a few minor coding style issues:

> +++ haiku/trunk/src/kits/tracker/ContainerWindow.cpp  2010-01-15 05:
> 12:45 UTC (rev 35085)
> @@ -804,7 +804,11 @@
>       AddDropContextMenus(fDropContextMenu);
>  
>       fDragContextMenu = new BSlowContextMenu("DragContext");
> -             // will get added and built dynamically in ShowContextMenu
> +     // will get added and built dynamically in ShowContextMenu

The comment refers to the line above it, and therefore should be 
indented two tabs (this is also mentioned in the coding style guide).

> +                     BRect mouse_rect(global.x, global.y, global.x, global.
> y);
> +                     mouse_rect.InsetBy(-5, -5);

mouse_rect -> mouseRect (I know you just copied that, though)

> +                                             BMessenger tmpTarget(poseView);

Why not just "target"?

> +++ haiku/trunk/src/kits/tracker/DesktopPoseView.cpp  2010-01-15 05:
> 12:45 UTC (rev 35085)
[...]
> @@ -176,6 +171,13 @@
>  }
>  
>  
> +void
> +DesktopPoseView::AddPosesCompleted()
> +{
> +     _inherited::AddPosesCompleted();
> +     AddTrashPose();
> +}
> +
>  bool

Missing blank line.

> +++ haiku/trunk/src/kits/tracker/PoseView.cpp 2010-01-15 05:12:45 
> UTC (rev 35085)
> @@ -757,17 +757,24 @@
[...]
> +                             if (FSGetDeskDir(&dir) == B_OK) {
> +                                     const char *poseInfoAttr = (isTrash) ? 
> kAttrTrashPoseInfo
> +                                             : kAttrDisksPoseInfo;
> +                                     const char *poseInfoAttrForeign = 
> (isTrash) 

Superfluous parentheses.

> +++ haiku/trunk/src/system/libroot/os/find_directory.c        2010-01-15 
> 05:12:45 UTC (rev 35085)
> @@ -201,7 +201,7 @@
>               case B_TRASH_DIRECTORY:
>                       // TODO: eventually put that into the file system API?
>                       if (device == bootDevice || !strcmp(fsInfo.fsh_name, 
> "bfs"))
> -                             template = "$h/Desktop/Trash";
> +                             template = "Trash"; // TODO: add suffix for 
> current 
> user
>                       else if (!strcmp(fsInfo.fsh_name, "dos"))
>                               template = "RECYCLED/_BEOS_";

That reminds me: our FAT file system isn't called "dos" anymore...

Bye,
   Axel.


Other related posts: