[Goodies-dev] Total-hack on xfce4-mpc-plugin

Mike Massonnet mmassonnet at gmail.com
Sat Aug 5 11:30:41 CEST 2006


Sat, 05 Aug 2006 11:14:29 +0200 - Landry <landry at fr.homeunix.org>
wrote :

> Mike Massonnet a écrit :
> > Hello Gaston,
> > 
> >   I have been hacking around xfce4-mpc-plugin and the changes are
> > hardly in each line... I have cleaned up the code, and finally I
> > have added two functions.
> I've got just one thing to say about all this : Mike, you're
> completely mad :)
> 

  I guess I was too long behind computers.

> > 
> >   Here is my change log:
> > * Cleaned up the syntax (too long to summarize, sorry).
> It needed to be done.
> 
> > * Removed the #ifdef DEBUG, use DBG () instead which comes with
> >   libxfce4util (therefor I was in the need to move the config.h
> > include to the top of the .c source).
> Nice, i didn't know it existed.
> 
> > * Replaced the 'gpointer data' argument from the callbacks to 't_mpc
> >   *mpc'.
> > * Setted the password by default to an empty string instead of
> > NULL, and check its size to see if it has to be sent to mpd.
> ...why not..
> 
> > * Replaced the numerous reconnections with the new function
> >   mpc_plugin_reconnect (t_mpc *).
> I'm not really fine with this.. but i'll try it => connect/disconnect 
> calls should be distinct IMHO.
> 
> > * Changed the function play to play_pause so it is possible to
> > switch between the state play and pause with the play button.  I
> > wasn't able to swap between a play icon and pause icon.  I will
> > leave it as it is, since it is easy to understand that the track
> > has been paused...
> Already done in my diff :) I'll try to change the button icon.
> 
> > 
> >   That's all folk :p
> > 
> >   It would be nice that you clean up your trunk tree in the SVN. The
> > next files are useless as we use autotools to create them:
> > - mkinstalldirs
> > - intltool-extract.in
> > - configure
> > - Makefile.in
> > - depcomp
> > - compile
> > - intltool-update.in
> > - panel-plugin/Makefile.in
> > - config.h.in
> > - intltool-merge.in
> > - missing
> > - aclocal.m4
> > - po/Makefile.in.in
> > - install-sh
> Ok for this.
> 
> > 
> >   I hope you will merge it inside the trunk.  The patch is attached.
> >
> Err.. well... this is a f.....k big patch, and i've already got a
> diff of + 4615 / - 4139 lines in my sources. So i'll have to apply
> this by hand, reviewing each lines :)
> 

  Ok, I will send you the sources, they are even shorter than the
diffs...
  Maybe the libmpd interface should be done in a separate file.

> As stated in my last commit, i'm currently rewriting all the libmpd 
> interface, to let the choice to the user to use either libmpd (if 
> present, reliable (?), but makes binary bigger), or my own 
> implementation (plain old socket()/send()/recv(), much more lighter
> and clean)
> I think your patch should'nt interfere too much with this rewrite,
> but the merge would be a nightmare :)

  Yep, it should be doable.

> 
> Finally, what was the indent command line you used for the code ?
> diff lines only containing indentation diffs make me completely MAD,
> so i'd like to have a common indentation guideline.
> 

  I followed your idents, 3 spaces, tho I prefer 4, but it doesn't
matter.  Most important is that the ident is respected in the source
code by one way.

> > Greets,
> > Mike
> Thanks for your tremendous work,
> Landry

  That's because I had like such a nifty client to put inside my
automatically hidden panel. :P

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: xfce4-mpc-plugin.c
Type: text/x-csrc
Size: 17524 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/goodies-dev/attachments/20060805/9a8d6749/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xfce4-mpc-plugin.h
Type: text/x-chdr
Size: 2562 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/goodies-dev/attachments/20060805/9a8d6749/attachment.h>
-------------- 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/20060805/9a8d6749/attachment.pgp>


More information about the Goodies-dev mailing list