After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 170277 - gweather doesn't show phase of the moon
gweather doesn't show phase of the moon
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: gweather
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
: 446132 572374 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-03-14 07:38 UTC by Sam Phillips
Modified: 2010-01-24 01:06 UTC
See Also:
GNOME target: 2.30.x
GNOME version: 2.29/2.30


Attachments
Stub APIs (3.18 KB, patch)
2006-01-16 05:35 UTC, Frank Solensky
reviewed Details | Review
New source file for moon calculations (386 bytes, text/x-csrc)
2006-01-16 05:41 UTC, Frank Solensky
  Details
Changes to include phase-of-poon calculations (3.18 KB, patch)
2006-06-17 17:57 UTC, Frank Solensky
none Details | Review
New source file for phase-of-moon calculations (3.80 KB, text/plain)
2006-06-17 17:59 UTC, Frank Solensky
  Details
libgweather changes (14.73 KB, patch)
2007-01-24 06:31 UTC, Frank Solensky
none Details | Review
Source file for phase-of-moon calculations (3.84 KB, text/x-csrc)
2008-12-10 05:49 UTC, Frank Solensky
  Details
libgweather changes (14.73 KB, patch)
2008-12-10 05:49 UTC, Frank Solensky
none Details | Review
libgweather changes (15.02 KB, patch)
2008-12-10 05:51 UTC, Frank Solensky
none Details | Review
png icons for moon phases (170.57 KB, application/x-bzip)
2008-12-10 05:55 UTC, Frank Solensky
  Details
Lots of moon icons (988.08 KB, application/x-bzip)
2008-12-18 05:10 UTC, Frank Solensky
  Details
Code changes (6.68 KB, patch)
2008-12-21 18:55 UTC, Frank Solensky
none Details | Review
Patch if 564958 alternative is preferred (6.07 KB, patch)
2008-12-24 20:18 UTC, Frank Solensky
none Details | Review

Description Sam Phillips 2005-03-14 07:38:23 UTC
Distribution/Version: Ubuntu Hoary

The gweather applet is currently showing a full moon when the moon is actually
17% full.
Comment 1 Frank Solensky 2005-08-26 05:12:21 UTC
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?
Comment 2 Frank Solensky 2006-01-16 05:35:14 UTC
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 3 Danielle Madeley 2006-01-16 05:40:59 UTC
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.
Comment 4 Frank Solensky 2006-01-16 05:41:35 UTC
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..
Comment 5 Frank Solensky 2006-01-16 05:44:10 UTC
As it's 00:15 here, no.
Comment 6 Frank Solensky 2006-06-17 17:57:50 UTC
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.
Comment 7 Frank Solensky 2006-06-17 17:59:24 UTC
Created attachment 67542 [details]
New source file for phase-of-moon calculations
Comment 8 Frank Solensky 2006-06-26 19:35:45 UTC
Is there someone I need to contact wrt the artwork that the addition of this feature would reqire?
Comment 9 Danielle Madeley 2006-07-10 11:40:47 UTC
I suppose you need to chat with the Tango guys about getting artwork for this.
Comment 10 Frank Solensky 2006-07-12 03:42:14 UTC
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...

Comment 11 Frank Solensky 2006-08-11 02:21:23 UTC
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.
Comment 12 Frank Solensky 2006-08-20 18:45:23 UTC
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.
Comment 13 Leonardo Ferreira Fontenelle 2006-10-26 23:07:31 UTC
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?
Comment 14 Frank Solensky 2007-01-20 21:54:21 UTC
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?
Comment 15 Frank Solensky 2007-01-24 06:31:04 UTC
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.
Comment 16 Frank Solensky 2007-01-24 06:34:16 UTC
(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.
Comment 17 madeit 2007-06-10 20:41:43 UTC
*** Bug 446132 has been marked as a duplicate of this bug. ***
Comment 18 madeit 2007-06-10 20:53:44 UTC
Long time since the last post on this topic.
What is the current status of this patch?
Comment 19 Frank Solensky 2007-06-10 22:16:30 UTC
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.
Comment 20 Fabian Greffrath 2008-08-06 13:12:52 UTC
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.
Comment 21 Frank Solensky 2008-08-29 03:44:43 UTC
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.
Comment 22 Fabian Greffrath 2008-08-29 07:07:21 UTC
Thank you very much! It's nice to see this issue gain some momentum again.
Comment 23 Andreas Nilsson 2008-09-26 10:05:53 UTC
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.
Comment 24 Frank Solensky 2008-09-28 04:10:55 UTC
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?
Comment 25 Frank Solensky 2008-12-10 05:49:10 UTC
Created attachment 124324 [details]
Source file for phase-of-moon calculations
Comment 26 Frank Solensky 2008-12-10 05:49:54 UTC
Created attachment 124325 [details] [review]
libgweather changes
Comment 27 Frank Solensky 2008-12-10 05:51:34 UTC
Created attachment 124327 [details] [review]
libgweather changes
Comment 28 Frank Solensky 2008-12-10 05:55:54 UTC
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
Comment 29 Frank Solensky 2008-12-10 06:00:17 UTC
Andreas -- if you've got anything that could be used for the scalable .svg icons, I'd greatly appreciate it.
Comment 30 Frank Solensky 2008-12-18 05:10:52 UTC
Created attachment 124908 [details]
Lots of moon icons
Comment 31 Jakub Steiner 2008-12-18 12:43:59 UTC
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
Comment 32 Frank Solensky 2008-12-21 18:55:49 UTC
Created attachment 125106 [details] [review]
Code changes
Comment 33 Frank Solensky 2008-12-21 19:05:46 UTC
Icons can be found at ftp://users.rcn.com/fenwayfrank/gweather-icons.bz2
Comment 34 Frank Solensky 2008-12-21 19:52:12 UTC
Correction: http://users.rcn.com/fenwayfrank/gweather-icons.bz2
Includes Makefile.am changes for ease of installation.
Comment 35 Frank Solensky 2008-12-21 19:54:09 UTC
Comment on attachment 124908 [details]
Lots of moon icons

Obsoleted by #125106
Comment 36 Frank Solensky 2008-12-21 20:12:09 UTC
Changes to libgweather are attached to Bug #564958
Comment 37 Frank Solensky 2008-12-24 20:18:46 UTC
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.
Comment 38 Frank Solensky 2009-02-01 19:16:28 UTC
Code changes no longer needed: all necessary modifications are on bug #564958.
Comment 39 Philip Withnall 2009-07-08 09:40:02 UTC
*** Bug 572374 has been marked as a duplicate of this bug. ***
Comment 40 Frank Solensky 2009-12-09 14:15:22 UTC
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.