Re: [RFE][PATCH] Display free space on device in panels
- From: Jindrich Novy <jnovy redhat com>
- To: Pavel Tsekov <ptsekov gmx net>
- Cc: MC dev <mc-devel gnome org>
- Subject: Re: [RFE][PATCH] Display free space on device in panels
- Date: Thu, 18 May 2006 15:23:02 +0200
Hi Pavel,
On Thu, 2006-05-18 at 12:11 +0300, Pavel Tsekov wrote:
> Hello Jindrich,
>
> On Wed, 1 Feb 2006, Jindrich Novy wrote:
>
> > On Mon, 2006-01-02 at 14:41 +0100, Jindrich Novy wrote:
> >> thanks for your comments, attaching the patch better matching the mc
> >> coding style.
> >
> > I modified the patch so that it can be switched on/off in the
> > Options/Layout dialog to display free space on device.
>
> I red the patch more carefully and I have several questions:
>
> 1)
>
> --- mc-4.6.1a/src/screen.c.showfree 2006-01-31 21:59:12.000000000 +0100
> +++ mc-4.6.1a/src/screen.c 2006-01-31 21:59:12.000000000 +0100
> @@ -49,6 +49,7 @@
> +static void
> +show_free_space(WPanel *panel)
> +{
> + struct stat st;
> +
> + /* Don't try to stat non-local fs */
> + if (!vfs_file_is_local(panel->cwd))
> + return;
> +
> + if (old_cwd == NULL || strcmp(old_cwd, panel->cwd) == 0) {
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Is this made on purpose ? Maybe you meant '!=' ?
Thanks for the review. There should be != of course as we need to update
old_cwd whenever it differs from panel->cwd.
> 2) Do you think that retrieving the free space information once per
> directory read would diminish the effect of this patch. Currently
> my_statfs () is called each time the screen changes i.e. move up,
> move down, etc - this seems a bit too much ...
Yes, the patch can still be improved. I posted it here just to discuss
the feature and whether upstream likes it. It's still not a commit
candidate yet.
> Pavel "The Prick" Tsekov
LOL, feel free to be Mr. Prick here ;)
Jindrich
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]