=== Description ==================================== Original filename - adesklets-031105_09h43.diff Machine - sylvain@sylvain Date - Fri Mar 11 09:43:07 UTC 2005 Description - automatically generated patch for adesklets === Usage ========================================== Apply with the command: `patch -p 1 < adesklets-031105_09h43.diff' from adesklets base directory. Do not forget to rerun `autoreconf' after patching. === Additional comment ============================= See the `devpatch' target from Makefile.am for details. ==================================================== diff --minimal --unidirectional-new-file -u --recursive a/Makefile.am b/Makefile.am --- a/Makefile.am 2005-03-08 03:08:22.000000000 -0500 +++ b/Makefile.am 2005-03-11 04:40:52.000000000 -0500 @@ -24,7 +24,7 @@ tar xjf $(PACKAGE)-$(VERSION).tar.bz2 ln -sf $(PREVIOUS_PACKAGE) a ln -sf $(PACKAGE)-$(VERSION) b - rm -rf echo $(PACKAGE)-$(VERSION)/{doc/{html/{en,fr},*.info,*.1,version*,stamp*},INSTALL*,aclocal.m4,configure,src/{config.h.in,command_enum.h}} + rm -rf echo $(PACKAGE)-$(VERSION)/{doc/{html/{en,fr,pydoc},*.info,*.1,version*,stamp*},INSTALL*,aclocal.m4,configure,src/{config.h.in,command_enum.h}} find $(PACKAGE)-$(VERSION)/ -name 'Makefile.in' -exec rm \{\} ';' ./devpatch.sh $(PREVIOUS_PACKAGE) > tmp.diff diff --minimal --unidirectional-new-file -u --recursive a b | sed '/^Only in a[/:]/d' >> tmp.diff diff --minimal --unidirectional-new-file -u --recursive a/configure.ac b/configure.ac --- a/configure.ac 2005-03-08 03:08:22.000000000 -0500 +++ b/configure.ac 2005-03-11 04:29:47.000000000 -0500 @@ -2,7 +2,7 @@ AC_INIT AC_CONFIG_SRCDIR(src/main.c) AC_PREREQ(2.52) -AM_INIT_AUTOMAKE(adesklets,0.4.4) +AM_INIT_AUTOMAKE(adesklets,0.4.5) dnl Language selection AC_LANG(C) diff --minimal --unidirectional-new-file -u --recursive a/doc/adesklets_en.texi b/doc/adesklets_en.texi --- a/doc/adesklets_en.texi 2005-03-08 03:08:22.000000000 -0500 +++ b/doc/adesklets_en.texi 2005-03-10 14:04:44.000000000 -0500 @@ -199,10 +199,10 @@ @node What's new? @chapter What's new? @unnumberedsec What's new in version 0.4.4 -This is a documentation update release, principally aimed at desklets +This is a documentation update release, principally aimed at desklet authors. It basically includes a new appendix on how to submit a desklet -(including scripted support), and a new subsection on system-wide fonts -detection as well. FAQ was also expanded to cover this topic. +(including scripted support), and a new subsection on system-wide font +detection as well. The FAQ was also expanded to cover this topic. @unnumberedsec What's new in version 0.4.3 This is a documentation update release. Most of the work here was made by @@ -349,7 +349,7 @@ @section Software download The current version of the software (as a source bzip'ed tarball) can be found -on the Sourceforge project page: @weblink{http://sf.net/projects/adesklets/} +on the SourceForge project page: @weblink{http://sf.net/projects/adesklets/} You can extract it from the console with @command{tar}. As of version @value{VERSION}, the command line would be: @@ -368,7 +368,7 @@ @section Verifying Software Integrity (optional) As of adesklets @value{VERSION}, you can also -download from @weblink2{sourceforge,http://sf.net/projects/adesklets/} an +download from @weblink2{SourceForge,http://sf.net/projects/adesklets/} an ascii-armored detached signature named @command{adesklets-@value{VERSION}.tar.bz2.asc}, that you can match against the author's Open PGP public key (@pxref{Open PGP Public Key}, @@ -470,7 +470,7 @@ that will drive it for you. @noindent Right now, only a very few desklets have been released: -you may find them on the sourceforge projet page as separate downloads: +you may find them on the SourceForge projet page as separate downloads: @weblink{http://sf.net/projects/adesklets/}. They will give you a feel of what @command{adesklets} is capable of. @@ -512,19 +512,19 @@ @unnumberedsubsubsec Special notes on system fonts @emph{You may safely skip this section if you do not intend to use -non-supplied fonts with adesklets} +non-supplied fonts with adesklets.} -Provided your system supports -fontconfig (@weblink{http://www.fontconfig.org/}) and adesklets was compiled -without using @code{--without-fontconfig} (default - @xref{Installing adesklets}.), -all the True Type fonts present in your system can be used. At initialisation time, -adesklets with fontconfig support compiled in will go through all the -fonts detected on your system to identify all the true types ones. See your -fontconfig documentation on how to set up your application fonts access -properly (@xref{Frequently asked questions}, for some fontconfig debugging hints). -It's also good to know that adesklets' package includes a copy of Bitstream's -Vera font - all users can rely on @command{adesklets} having at least -this font available at all time. +Provided your system supports fontconfig (@weblink{http://www.fontconfig.org/}) +and adesklets was compiled without using @code{--without-fontconfig} (compiling +with fontconfig support is the default; @xref{Installing adesklets}.), all the +TrueType fonts present in your system are available for use with adesklets. +At initialization time, adesklets with fontconfig support compiled in will go +through all the fonts detected on your system to identify all the TrueType +fonts. See your fontconfig documentation on how to set up your application +fonts access properly (@xref{Frequently asked questions}, for some fontconfig +debugging hints). It's also good to know that adesklets' package includes a +copy of Bitstream's Vera font; all users can rely on @command{adesklets} +having at least this font available at all time. @unnumberedsubsubsec Special notes on internationalization @@ -934,10 +934,10 @@ @unnumberedsubsubsec Gotchas: a bit more about object IDs -All of adesklets objects (fonts, images, color ranges, polygons, etc), are stored -in stacks (one stack per object type). Python's IDs are nothing more than the +All adesklets objects (fonts, images, color ranges, polygons, etc), are stored +in stacks (one stack per object type). Python's ID's are nothing more than the initial position of given objects inside the relevant stack, and therefore -will become invalid if a same-type object below them get freed. +will become invalid if an object of the same type below them gets freed. For instance, if we start with a clean state, all we have in the stack of images is the window's foreground (ID 0) and background (ID 1). @@ -1046,7 +1046,7 @@ @noindent Finally, let us mention you may want to take a look at the @file{weather} desklet source code from the -@weblink2{Sourceforge project web site,http://sourceforge.net/projects/adesklets/} +@weblink2{SourceForge project web site,http://sourceforge.net/projects/adesklets/} for a more substantial piece of Python code using adesklets. There are also a few other test desklets under @file{test/} that may give you some ideas. @ifhtml @@ -1054,8 +1054,8 @@ @command{adesklets} package help, included with this document (@xref{Python package documentation}.). Whenever you are happy enough with your desklet, feel free to share it with the rest of us (this would be -much appreciated): package it (@xref{Packaging GNU Makefile for desklets}.), -then submit it (@xref{Submitting a desklet}.). +much appreciated)--package it (@xref{Packaging GNU Makefile for desklets}.), +and then submit it (@xref{Submitting a desklet}.). @end ifhtml @node Extending adesklets @@ -1450,7 +1450,7 @@ they will be glad to share code. Subscribe to the @weblink2{adesklets-devel mailing list,https://lists.sourceforge.net/lists/listinfo/adesklets-devel} on -sourceforge for quick access to them. +SourceForge for quick access to them. @end itemize @noindent Contact me by email at @email{syfou@@users.sourceforge.net}. @@ -1601,34 +1601,36 @@ @subsection I would like to use some of my system's fonts with adesklets, but I cannot get my desklets to find them. What should I do? -First, you need to have fontconfig support enabled in adesklets. See the config.log from configuration phase to verify it. If you did not keep it, you can also look -at the dynamic libraries linked against the interpreter. On a systems with GNU -binutils, you can do something like: +First, you need to have fontconfig support enabled in adesklets. See the +config.log from the configuration phase to verify it. If you did not keep the +log, you can also look at the dynamic libraries linked against the interpreter. +On a system with GNU binutils, you can do something like: @example ldd `which adesklets` | grep fontconfig @end example -If you get an output similar to: +If you get output similar to: @example libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x45c75000) @end example -It means everything is fine. Otherwise, you should recompile +it means everything is fine. Otherwise, you should recompile @command{adesklets} from source. From there, you can use the line: @example echo 'list_font_path' | adesklets : @end example -To get all the font directories adesklets will into look for true type fonts. -See your fontconfig documentation to know how to change this (on up-to-date system, -@code{man 5 fonts-conf} is a good start point). Similarily: +to see all the font directories that adesklets will into look for TrueType +fonts. Consult your fontconfig documentation to learn how to change this +(on up-to-date systems, @code{man 5 fonts-conf} is a good starting point). +Similarily: @example echo 'list_fonts' | adesklets : @end example -Will give you all the fonts that are currently found... Keep in mind when typing -them that font names are case sensitive. +Will give you all the fonts that are currently found... Keep in mind when +typing them that font names are case-sensitive. -Alternatively, if you just cannot get fontconfig to work, a way to get around the -problem would be to create symbolic links to the fonts you want to use inside -any absolute font paths listed by the command @code{echo 'list_font_path' ...} -above. +Alternatively, if you just cannot get fontconfig to work, a way to get around +the problem would be to create symbolic links to the fonts you want to use +inside any absolute font paths listed by the command +@code{echo 'list_font_path' ...} above. @ifhtml @node Python package documentation @appendix Python package documentation @@ -1661,152 +1663,151 @@ @appendix Submitting a desklet @section Desklet package requirements -Requirements for ``official'' desklets packages are scarse: authors are free to do as they wish. There is -only two things that should be enforced: +Requirements for ``official'' desklets packages are scarce; authors are free to +do as they wish. There are only two things that should be enforced: @enumerate @item A meaningful @file{README} file should exist in the base source directory -of the desklet archive and be kept up to date. It should at least contains: +of the desklet archive and be kept up to date. It should at least contain: @itemize @item the name and contact email adress of the author@footnote{It is probably not a good idea to give away your private email adress here; -for spam-related reason, you should probably open an account -on @weblink2{sourceforge,http://sourceforge.net/}, or at another similar place -with serious spam containment infrastructure.} +for spam-related reasons, you should probably open an account +on @weblink2{SourceForge,http://sourceforge.net/}, or at another similar place +with a serious spam containment infrastructure.} @item a short description of the desklet @item the requirements for running it @item how to run it @end itemize -@item The package should be a bzip'ed tarball containing a single source directory -of the form @code{NAME-MAJOR.MINOR.REVISION}, where @code{NAME} is the desklet -base name, and @code{MAJOR.MINOR.REVISION} the version. Please note that a makefile -(@xref{Packaging GNU Makefile for desklets}.) is also provided to automate creation -of such an archive on GNU systems. +@item The package should be a bzip'ed tarball containing a single source +directory of the form @code{NAME-MAJOR.MINOR.REVISION}, where @code{NAME} is +the desklet base name, and @code{MAJOR.MINOR.REVISION} the version. Please note +that a makefile (@xref{Packaging GNU Makefile for desklets}.) is also provided +to automate creation of such an archive on GNU systems. @end enumerate + @section The @command{submit.py} script -From @command{adesklets} 0.4.4, desklet authors are provided a Python -script to automate the submission of their desklets: @file{utils/submit.py} from -source package. -It get automatically stored in the configuration-supplied @code{pkgdatadir} -on installation. +Starting in @command{adesklets} 0.4.4, desklet authors are provided with a +Python script to automate the submission of their desklets: +@file{utils/submit.py} from the source package. It gets automatically stored in +the configuration-supplied @code{pkgdatadir} upon installation. + @file{submit.py} can be used to: @itemize -@item Submit a new or updated desklet description for inclusion on -@weblink2{adesklets web site,http://adesklets.sf.net/desklets.html}. -@item Submit a bzip'ed desklet archive for inclusion -on sourceforge's desklets package (optional -- you way choose to host it yourself) -as well. +@item Submit a new or updated desklet description for inclusion on the +@weblink2{adesklets web site,http://adesklets.sf.net/desklets.html}; +@item Submit a bzip'ed desklet archive for inclusion in SourceForge's desklets +package (this is optional--you may choose to host it yourself). @end itemize @section Invoking @command{submit.py} -Desklet submition is initiated by sending a specially crafted email to +Desklet submission is initiated by sending a specially crafted email to @email{adesklets@@mailworks.org}@footnote{It is useless to send anything else -to this address - all messages that cannot be parsed by the automatic reception -script are just silently dropped. Write instead -to @email{syfou@@users.sourceforge.net} if you want to get in touch -with the maintainer.}. The @command{submit.py} -script assits you in the construction of such an email using -the user configuration file @file{$HOME/.adesklets_submit} and the command line -switches. Here is an example of a valid @file{.adesklets_submit} configuration: +to this address; all messages that cannot be parsed by the automatic reception +script are just silently dropped. Write to @email{syfou@@users.sourceforge.net} +instead if you want to get in touch with the maintainer.}. +The @command{submit.py} script assits you in the construction of +such an email using the user configuration file @file{$HOME/.adesklets_submit} +and the command line switches. Here is an example of a valid +@file{.adesklets_submit} configuration: @verbatiminclude ../utils/adesklets_submit.example -This is pretty self-explanatory, but here is a few less obvious points: +This is pretty self-explanatory, but here are a few less obvious points: @itemize @item -Try to avoid pseudos and nicknames as @code{author_name} as much as possible, -unless, of course, you already have a pretty well established online identity -under this name. +Try to avoid using pseudonyms and nicknames for the @code{author_name} as much +as possible, unless, of course, you already have a pretty well-established +online identity under this name. @item -@code{send_confirmation} specify if an email should be sent back to your -@code{author_email} adress whenever your desklet is succesfully published. -In case of rejection of submitted entry, you will always be written back -anyway with an explanation. Usually, the maintainer will not try to make -changes to problematic entries - it will only summarize back to the author -what was not OK. +@code{send_confirmation} specifies if an email should be sent back to your +@code{author_email} address whenever your desklet is succesfully published. +If the submitted entry is rejected, you will always be written back anyway +with an explanation. Usually, the maintainer will not try to make changes to +problematic entries; it will only summarize back to the author what was not OK. @item @emph{Double check} your @code{author_email} address, since this is the only one the maintainer will try to use when contacting you, regardless of what -the headers say. Failing to supply a valid address will make all the messages -not being sent to you, and new desklet entries to always get rejected. +the headers say. Failing to supply a valid address will cause all messages to +fail to be sent to you, and all new desklet entries will be rejected. @item -You can very well use submit.py without any prior contact with the adesklet's -maintainer (either via email of within the forum using this adress for registration -or the mailing list), but some back and forth will be needed before publication -just to assert your identity and its effective relation to the provided email -adress. +You can very well use submit.py without any prior contact with the adesklets +maintainer (either via email, within the forum using this adress for +registration, or through the mailing list), but some back and forth will be +needed before publication just to assert your identity and its effective +relation to the provided email address. @item @code{desklets} is a dictionary of dictionaries (one dictionary per desklet, -desklets' names being the keys); all -the items referring to files (thumbnail, screenshot and download) could -either be publicly accessible URLs (this is the preferred method), or -local files, either abolute or relative to your $HOME directory. In that case, -needed files will be attached to the generated multipart email. +desklets' names being the keys); all the items referring to files (thumbnail, +screenshot and download) could either be publicly accessible URI's (this is the +preferred method), or local files, either absolute or relative to your $HOME +directory. In that case, needed files will be attached to the generated +multipart email. @item All images will always be fetched and integrated on the adesklets.sf.net -web site - you can safely remove them from online location afterwards -if you used URLs. +web site; you can safely remove them from your online location afterwards +if you provided live URI's. @item When updating already included desklets, there is no need to submit back -the @code{thumbnail} or @code{screenshot} images if they did not change; you can -as easily make reference to already installed images on sourceforge: +the @code{thumbnail} or @code{screenshot} images if they did not change; +you can just as easily reference the already installed images on SourceForge: @itemize -@item @code{thumbnail} is always stored under @code{http://adesklets.sf.net/images/NAME_thumb.[jpg|png]} -@item @code{screenshot} is always stored under @code{http://adesklets.sf.net/images/NAME_screen.[jpg_png]} +@item The @code{thumbnail} is always stored under @code{http://adesklets.sf.net/images/NAME_thumb.[jpg|png]} +@item The @code{screenshot} is always stored under @code{http://adesklets.sf.net/images/NAME_screen.[jpg|png]} where @code{NAME} is the name of the desklet. @end itemize @item Using the @code{host_on_sourceforge} value, you can choose to have -your desklet package either hosted or sourceforge or just referenced -on your site if you provided a URL. Of course, choosing this last -alternative will also means you will need to keep it in place. +your desklet package either hosted on SourceForge or just referenced +on your site if you provided a URI. Of course, choosing this last +alternative also means you will need to keep it in place. @item -@code{thumbnail} image should be a jpg (preferably) or png (if you @emph{really} -need higher resolutions) of dimensions lying between 190x40 and 230x110 -pixels. +The @code{thumbnail} image should be a JPG (preferably) or PNG (if you +@emph{really} need higher resolutions) of dimensions lying between 190x35 and +230x110 pixels. @item -@code{screenshot} image should be a 640x480 jpg (preferably) or png. It should -put your desklet in evidence, and thus contains no other ones. +The @code{screenshot} image should be a 640x480 JPG (preferably) or PNG. +It should put your desklet in evidence, and thus contain no other ones. @item You can choose not to submit thumbnails and/or screenshots. In that case, default, generic images will be used instead. @item @code{Category} is unused for now, and just ignored. @item -All emails weighting more than 300 KB will be rejected by the maintainer -email server - hence, submit.py will refuse to generate them. -Instead of submitting such big entries, use the URL facility described above -to trim them down. -@item @command{submit.py} does not enforce the requirements above - -it only checks what is strictly required to build a compliant submition email: -existences of dictionary entries, availability of files, eventually validity -of file types if they are local... It is your duty to make sure the entries meet -the other requirements if you want to avoid rejection. +All emails weighing more than 300 KB will be rejected by the maintainer's +email server; thus, submit.py will refuse to generate them. Instead of +submitting such big entries, use the URI facility described above to trim +them down. +@item @command{submit.py} does not enforce the requirements above; it only +checks what is strictly required to build a compliant submission email: +the existence of dictionary entries, availability of files, the validity +of file types if they are local... It is your duty to make sure the entries +meet the other requirements if you want to avoid rejection. @end itemize -In our case, Belial Leviathan would fisrt check its @code{beast} -desklet's entry by doing something similar to: +For example, Belial Leviathan would fisrt check his @code{beast} desklet's +entry by doing something similar to: @example ./submit.py beast @end example -If everything goes fine, it will output the resulting submition email +If everything goes fine, it will output the resulting submission email on @code{stdout}. From there, Belial can either: @itemize -@item Pipe it to its favorite MTA (mail transfert agent) -@item Make @command{submit.py} send it itself by smtp, using -the @code{smtp_host} and @code{smtp_port} -parameters in its @file{$HOME/.adesklets_submit}. For this, Belial would use: +@item Pipe it to his favorite MTA (mail transfert agent) +@item Make @command{submit.py} send it itself by SMTP, using the +@code{smtp_host} and @code{smtp_port} parameters in its +@file{$HOME/.adesklets_submit}. For this, Belial would use: @end itemize @example ./submit --send beast @end example -One last thing: you should try to avoid sending minor corrections multiple times, -especially if you use local files: it both adds to the workload to the maintainer's -email server and to the management work; try to create a valid entry -@emph{then} send it, not the other way around. +One last thing: you should try to avoid sending minor corrections multiple +times, especially if you use local files. It both adds to the workload of the +maintainer's email server and to the management work. Please try to create a +valid entry @emph{then} send it, not the other way around. @node Copying This Manual @appendix Copying This Manual diff --minimal --unidirectional-new-file -u --recursive a/scripting/python/adesklets/commands.py b/scripting/python/adesklets/commands.py --- a/scripting/python/adesklets/commands.py 2005-03-08 03:10:22.000000000 -0500 +++ b/scripting/python/adesklets/commands.py 2005-03-11 04:42:58.000000000 -0500 @@ -1,7 +1,7 @@ """ adesklets commands module -=== 2005-03-08 03:10:05 === +=== 2005-03-11 04:36:29 === Automatically generated by `setup.py protoize' from files `../prototypes' and `../enums'. 15 constants and 152 functions successfully created. diff --minimal --unidirectional-new-file -u --recursive a/src/adesklets.c b/src/adesklets.c --- a/src/adesklets.c 2005-03-08 03:08:23.000000000 -0500 +++ b/src/adesklets.c 2005-03-11 04:35:09.000000000 -0500 @@ -441,7 +441,9 @@ if(index>=0 && indexpos) { *return_str=xmenu_fire(adesklets.display,adesklets.params->scr, adesklets.window, - adesklets.images->content[1], + adesklets.images->content[ + (adesklets.user_background_image==-1)? + 1:adesklets.user_background_image], adesklets.images->content[0], adesklets.transparency, MENU(index)); @@ -2087,7 +2089,7 @@ atoi(params->content[3])- atoi(params->content[1]), atoi(params->content[4])- - atoi(params->content[1])); + atoi(params->content[2])); } else command_error("line coordinates not given\n"); break; diff --minimal --unidirectional-new-file -u --recursive a/utils/submit.py b/utils/submit.py --- a/utils/submit.py 2005-03-08 03:08:23.000000000 -0500 +++ b/utils/submit.py 2005-03-11 01:07:59.000000000 -0500 @@ -76,7 +76,13 @@ if len(args)==0: usage('desklet name not given') #------------------------------------------------------------------------------ -# Get the three files for thumnail, screenshot and download +# Verify we are looking at an existing package +# +if not config['desklets'].has_key(args[0]): + raise KeyError("Given desklet entry '%s' does not exist" % args[0]) + +#------------------------------------------------------------------------------ +# Get the three files for thumbnail, screenshot and download # def getfile(key): try: @@ -88,8 +94,9 @@ except: f = None return f -files = [ getfile(name) for name in ['thumbnail','screenshot','download'] ] -if not files[2]: +files = dict([(name,getfile(name)) for name in + ['thumbnail','screenshot','download']]) +if not files['download']: raise IOError('Package file could not be found.') #------------------------------------------------------------------------------ @@ -123,19 +130,19 @@ # Then the images # -for image in files[:2]: +for image in [files['thumbnail'], files['screenshot']]: if image.__class__==file: msg.attach(MIMEImage(image.read())) # Finally, the desklet tarball # -if files[2].__class__==file: +if files['download'].__class__==file: payload = MIMEBase('application','octet-stream') - payload.set_payload(files[2].read()) + payload.set_payload(files['download'].read()) Encoders.encode_base64(payload) msg.attach(payload) else: - if not files[2]: + if not files['download']: raise IOError('Could not retrieve desklet package') #------------------------------------------------------------------------------