[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RP] select patch
From: |
Johannes Altmanninger |
Subject: |
Re: [RP] select patch |
Date: |
Tue, 24 Jun 2014 15:22:51 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
Thanks for your help! There is a whole lot to learn for me..
I corrected most issues you pointed out, this keeps getting better ;)
I changed the default behavior to prefer unselected windows, the option
to change it is still there. Most users would probably not care too much
about this I guess.
Now there is a function called get_compare_string_function() which is
used in select_name(). It takes the match_type bitmask and the address
of compare_length.
I am not sure how I would implement a function that does not take the
match type as argument.
I noticed that there are 8 occurrences of str_comp(), is there a reason
why this is not replaced by `!strncasecmp()`?
On 06/23/2014 04:30 PM, Jeff Abrahamson wrote:
> Funny how documentation is always the trailing bit. ;-)
> This is looking very nice. Thanks for all your work on this!
> A couple (easy) comments:
> Just delete the stuff you're deleting, don't comment it out. Git
remembers what was there before, and it just makes your diffs longer. I
know it's useful while you're developing.
> I'm acutely aware that I'm the guy who called for the optional
behavior -- but the more I think about it, the more I think the default
should be the behavior you propose. It is a very good idea.
> On that subject, the name "SELECT_SIMPLE" seems prejudiced by the old
behavior and otherwise devoid of meaning. What do you think of
SELECT_OK_SELECTED ?
> When you define MAX_WINDOW_NAME_LENGTH, I think the value is
arbitrary, just long enough to distinguish between valid and invalid
strings in reasonable time. Perhaps include a comment to that effect so
that future readers don't pause to wonder on the significance of that
number.
> Personal tick: Functions are most readable below ten or so lines.
By the time I can't see the whole function in my editor, I have more
trouble understanding as I read. In that light, and without remarking
on other examples of such, perhaps find_window_name() could easily be
broken into a helper function or two (with local linkage), such as a
>
> compare_window_name_function window_name_matcher(size_t&
compare_length).
>
> Jeff Abrahamson
> +33 6 24 40 01 57 <-- brièvement indisponible le 4 juillet
> +44 7920 594 255 <-- will change 18 July
>
> http://jeff.purple.com/
> http://blog.purple.com/jeff/
select.patch
Description: Text Data
- Re: [RP] select patch, (continued)
- Re: [RP] select patch, Bernhard R. Link, 2014/06/19
- Re: [RP] select patch, Johannes Altmanninger, 2014/06/19
- Re: [RP] select patch, Jeff Abrahamson, 2014/06/19
- Re: [RP] select patch, Johannes Altmanninger, 2014/06/19
- Re: [RP] select patch, Jeff Abrahamson, 2014/06/20
- Re: [RP] select patch, Johannes Altmanninger, 2014/06/20
- Re: [RP] select patch, Johannes Altmanninger, 2014/06/20
- Re: [RP] select patch, Peter Pentchev, 2014/06/20
- Re: [RP] select patch, Johannes Altmanninger, 2014/06/20
- Re: [RP] select patch, Jeff Abrahamson, 2014/06/23
- Re: [RP] select patch,
Johannes Altmanninger <=
- Re: [RP] select patch, Jeff Abrahamson, 2014/06/25
- Re: [RP] select patch, Jeff Abrahamson, 2014/06/25
- Re: [RP] select patch, Johannes Altmanninger, 2014/06/26
Re: [RP] select patch, Bernhard R. Link, 2014/06/19