GNOME Bugzilla – Bug 170277
gweather doesn't show phase of the moon
Last modified: 2010-01-24 01:06:32 UTC
Distribution/Version: Ubuntu Hoary The gweather applet is currently showing a full moon when the moon is actually 17% full.
I can start working on this for the next release if there's interest. Or is the expectation that the replacement should be available by then?
Created attachment 57449 [details] [review] Stub APIs Stubs only: submitted to add the entry point before tomorrow's API freeze. The way that I see this working is that a value in the range of [-1..1] would be generated to indicate a "phase of moon" value. A value of zero indicates a full moon; negative is a waxing moon and positive a waning moon. The value would be used to select which of a number of icons are to be displayed.
Comment on attachment 57449 [details] [review] Stub APIs Desktop modules aren't affected by API freeze. However, feature freeze also kicks in, which prevents this from being added into 2.14, unless you can get it written in the next 5 hours.
Created attachment 57450 [details] New source file for moon calculations Also a stub. I'm assuming that entry points which are currently declared static but would be useful to this file aren't affected by the API freeze, correct? As the chages would be in a private file..
As it's 00:15 here, no.
Created attachment 67541 [details] [review] Changes to include phase-of-poon calculations This has the changes to existing code. There's a "#define" in weather.c to control the number of moon phases that would be displayed that would need to be updated once the number of moon phases are selected. It assumes that the number of moon phase images will be the same for small and large icons. While it'd be nice to use eight images for small icons and 16 for large, I don't know if that can be accomplished.
Created attachment 67542 [details] New source file for phase-of-moon calculations
Is there someone I need to contact wrt the artwork that the addition of this feature would reqire?
I suppose you need to chat with the Tango guys about getting artwork for this.
I did: someone is going to base them on icons from the glunarclock applet.. This lead to another thought -- rather than my adding a file that duplicates some of the calculations that this other applet already has implemented, would it make sense to somehow pull that work into this? Either as a library or some such thing...
Ryan Collier has sent me an svg file containing some of the vector art that was used for a phase-of-moon indicator; it looks great! He's offered to put the icons together so this may be good to go once I've got them and have updated the patch for the icon names.
Artwork is still underway. I assume it's already too late to include the patch in the 2.16 release so maybe this should be targeted for 2.18.
Besides current phase of the moon, it would be great to know when the next phases will be. Should this be separated into a new enhancement request?
Still waiting on artwork. I'll resubmit the code to allow for the artwork being installed or not. Can this still get into 2.18 or should it wait for 2.20?
Created attachment 81040 [details] [review] libgweather changes This one includes names for the new phase-of-moon artwork and falls back to the current artwork if it is not yet installed.
(In reply to comment #13) > Besides current phase of the moon, it would be great to know when the next > phases will be. Should this be separated into a new enhancement request? > I'd say "yes".. this one could be closed as soon as the artwork comes in; it'd be easier to keep track of as a new request.
*** Bug 446132 has been marked as a duplicate of this bug. ***
Long time since the last post on this topic. What is the current status of this patch?
The patch should still be good. Someone had offered to do the artwork needed for it a while ago but seems to have disappeared: my last attempt to contact him bounced on the email address. I subsequently sent another query for help to the tango list; haven't heard anything. Any suggestions as to whom I can ping to get this going would be appreciated.
It seems the discussion is stangant for about one year now. Judging from the latest comments, the code is ready but the artwork is still missing. Well, for glunarclock <http://glunarclock.sourceforge.net/> two sets of moon artwork allready exist: One is a set of 56 realistic illustrations of the moon and the other one is a set of 12 cartoon moon pictures originally created by Andreas Nilsson <http://ramnet.se/~nisse/>. I believe he is the right one to contact regarding the artwork. License should not be a problem, since his work has allready been distributed as part of a GPLed software, i.e. glunarclock.
That's correct. I sent him an email message but haven't received a reply yet so I'll see if I can convert it myself. It'll take a few days since I'll need to pull the changes off an older machine before integrating it here. There's two differences I noticed right away: in glunarclock all of the images are in the same file. Also the images that are used seem to be a bit smaller than the toolbar versions; enlarging them from their current size may result in a noticeable blur.
Thank you very much! It's nice to see this issue gain some momentum again.
Note that I drew the cartoon moons when I was in High School, so yeah, I hope I somewhat improved since then. I can't remember who contributed the photos, might have been nicked from the web or something. :) I would love to help out with the graphics.
Great, thanks! Another way to do this might be to take copy the existing stock_weather-night*.png images and add shading for the dark side of the moon on each of multiple images. For others: is the preference to stick with the current approach of a function that returns part of the icon file name as the libgweather/weather.c function weather_info_get_icon_name() does now? Or would moving the WeatherConditions enum out to the libgweather/weather.h and returning that be a better approach?
Created attachment 124324 [details] Source file for phase-of-moon calculations
Created attachment 124325 [details] [review] libgweather changes
Created attachment 124327 [details] [review] libgweather changes
Created attachment 124328 [details] png icons for moon phases 16x16, 22x22, 24x24 and 32x32 bitmap icons, based on icons created by R. Schmidt for http://tycho.usno.navy.mil/vphase.html
Andreas -- if you've got anything that could be used for the scalable .svg icons, I'd greatly appreciate it.
Created attachment 124908 [details] Lots of moon icons
I suggest following the instruction at [1] to ship these with the applet. These very specific icons don't belong to the generic name spec. [1] http://live.gnome.org/ThemableAppSpecificIcons
Created attachment 125106 [details] [review] Code changes
Icons can be found at ftp://users.rcn.com/fenwayfrank/gweather-icons.bz2
Correction: http://users.rcn.com/fenwayfrank/gweather-icons.bz2 Includes Makefile.am changes for ease of installation.
Comment on attachment 124908 [details] Lots of moon icons Obsoleted by #125106
Changes to libgweather are attached to Bug #564958
Created attachment 125278 [details] [review] Patch if 564958 alternative is preferred Alternative approach: the application specifies the number of moon icons that are included in the adjusted icon path. The test for northern vs. southern hemisphere (to determine if shadows advance right to left or vice versa) is pushed down into the library.
Code changes no longer needed: all necessary modifications are on bug #564958.
*** Bug 572374 has been marked as a duplicate of this bug. ***
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.