[Goodies-dev] mpc-plugin patch

Mike Massonnet mmassonnet at gmail.com
Sun Aug 6 22:51:54 CEST 2006


Sun, 06 Aug 2006 22:17:45 +0200 - Landry <landry at fr.homeunix.org>
wrote :

> Mike Massonnet a écrit :
> > Sun, 6 Aug 2006 20:13:53 +0200 - Mike Massonnet
> > <mmassonnet at gmail.com> wrote :
> > 
> >> Sun, 6 Aug 2006 20:01:11 +0200 - Mike Massonnet
> >> <mmassonnet at gmail.com> wrote :
> >>
> >>> Hi,
> >>>
> >>>   He are some minor issues for the r1850.
> >>>
> >>> - Check the passwords length (strlen (passwd)) to check if it has
> >>> to be sent.  Also get rid of a useless check for
> >>> gtk_entry_set_text.
> >>> - Removed the "Settings" group.  It didn't worked otherwise...
> "Settings" group works for me. Why removing it ?
  I said it doesn't work before I get the point of the issue related in
the second mail.  So of course it works but why do you need it?

> And why do you absolutely want a null-length password ? Having a NULL 
> value and checking for it seems sufficient for me. But i may be wrong.
  This way you put the empty password as-is in the rc file, you put it
also as-is in the entry text , and you assign it as-is from the entry
text.  It is less code...  The only needed condition is if MPD needs it.

> 
> >> Don't take care of it.  The password and host gets b0rked and I
> >> need to figure out why.
> >>
> > 
> >   OK, here it goes.  xfce_rc_read_entry should not be casted to
> > gchar* as it returns a const.
> I had sometimes the same bug, so thanks for this fix :)
> 
> > -   DBG ("Settings : %s@%s:%d\nframe:%d", mpc->mpd_password,
> > mpc->mpd_host, mpc->mpd_port, mpc->show_frame); +
> > +   DBG ("%s@%s:%d frame:%d", mpc->mpd_password, mpc->mpd_host,
> > mpc->mpd_port, 
> > +        mpc->show_frame);
> These lines are _not_ a useful diff :) I don't know which editor you 
> use, and what indentation it arbitrary applies, but i won't commit
> this :)
  I do this myself for readability, because lines with more than 80
chars will get unreadable if abused!  Between I use VIM with spaces as
indentation.
  Actually I was playing with debug messages around read_config and
write_config, and I always put code in a syntax I have learned[1] the
last four months.  Have a look at the code of Xfce, i.e.. Thunar, it is
really clean ^_~

[1]http://www.gnu.org/prep/standards/standards.html

> Landry
> 
> Ps: how many patches are you going to send like that ;) ?
  As long as it won't run fine on my side.  Agreed that the first patch
was too much of a hack, I should learn to make more appropriate patches
but I won't always have the time for it.

Mike
-- 
 http://massonnet.org/ Mike Massonnet (mmassonnet)           ,-.
                                                     ,      ( {o\
 GnuPG 0--" 0xF8C80F97                               {`"=,___) (`~
 C4DA 431D 52F9 F930 3E5B  3E3D 546C 89D9 F8C8 0F97   \  ,_.-   )
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/goodies-dev/attachments/20060806/7bd027f4/attachment.pgp>


More information about the Goodies-dev mailing list