indicator-weather should re-use the time-format of other indicators

Bug #720066 reported by Fabien Tassin
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Weather Indicator
Fix Released
Low
Unassigned
indicator-weather (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: indicator-weather

I have the datetime indicator set to use 24-hour format for the dates.
the weather indicator uses 12-hour (or maybe it's the locale-default).
Would be nice to be consistent and use the dconf key.

$ gsettings range com.canonical.indicator.datetime time-format
enum
'locale-default'
'12-hour'
'24-hour'
'custom'
$ gsettings get com.canonical.indicator.datetime time-format
'24-hour'

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: indicator-weather 11.02.13+repack-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-3.30-generic 2.6.38-rc4
Uname: Linux 2.6.38-3-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Wed Feb 16 14:50:33 2011
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha i386 (20100331)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 LC_MESSAGES=en_US.utf8
 SHELL=/usr/bin/tcsh
SourcePackage: indicator-weather

Revision history for this message
Fabien Tassin (fta) wrote :
Changed in indicator-weather (Ubuntu):
status: New → Confirmed
Changed in weather-indicator:
importance: Undecided → Low
milestone: none → 11.02.27
status: New → Confirmed
Changed in indicator-weather (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
Vadim Rutkovsky (roignac) wrote :

Fabien, Weather Indicator uses locale-specific date format. I guess, this should left as it is now, without adding new dependencies to dconf.

Maybe, this should be set as an option in Preferences. Please, 'vote' for this issue, if it is really important - for now, moving to backlog.

Changed in weather-indicator:
milestone: cloudy → backlog
status: Confirmed → Opinion
Revision history for this message
Panagiotis Skintzos (ph7) wrote :

Yes, I'd like that too. Although I use English locale, I cannot stand 12h format.
We don't actually need dconf as dependency.
GSettings from glib uses dconf as default backend.
We can use gnome.introspection to access the settings and set a hook for changes.
I attached a patch.
It works when the indicator-datetime format setting is set to 12h or 24h. In the other cases is uses the default locale as now.
It also fixes a small bug: when the time has 0 minutes these are stripped away currently.

tags: added: patch
Revision history for this message
Vadim Rutkovsky (roignac) wrote :

Thanks for the patch, Panagiotis!
A quick dependency question - which packages are required for this (I assume, that is 'python-gobject' only)?
Also, that crashes for me now, if I remove 'try-except' block:
    AttributeError: type object 'FileEnumerator' has no attribute '__info__'

I guess, it is a pygi bug, but I can't find it any bugreport on this - maybe, some required packages were not installed?

Changed in weather-indicator:
milestone: backlog → cloudy-3
milestone: cloudy-3 → foggy
Revision history for this message
Panagiotis Skintzos (ph7) wrote :

Yes the only requirement is python-gobject.
Are you in Natty or Maverick?

Revision history for this message
Vadim Rutkovsky (roignac) wrote : Re: [Bug 720066] Re: indicator-weather should re-use the time-format of other indicators

Natty, didn't have a chance to check this on Maverick

Revision history for this message
Panagiotis Skintzos (ph7) wrote :

In Maverick it works fine, I'll have to investigate it in Natty then

Revision history for this message
Vadim Rutkovsky (roignac) wrote :

Found out the source of the problem - Gio should be imported before gtk.
A bit simplified the patch - removed seconds, as Google doesn't show them, so sunrise/sunset time is now consistent.

Thanks, Panagiotis!

Changed in weather-indicator:
status: Opinion → Fix Committed
Revision history for this message
Panagiotis Skintzos (ph7) wrote :

Hi Vadim, I had updated the patch just saw that you committed the change.
Be aware that in Maverick the settings path for indicator-datetime is different.
So this should be realeased for Natty only. In my new patch I handle both cases.

Revision history for this message
Vadim Rutkovsky (roignac) wrote :

Whoa, great!

Applied a reworked patch - added also correct loggng for proxy.

Changed in weather-indicator:
milestone: foggy → cloudy-4
Revision history for this message
Panagiotis Skintzos (ph7) wrote :

Great!

The proxy change to dconf only, gives crashes in pre-Natty releases.
I think we should keep the gconf settings as well (python-gconf is installed anyway by default).
I modified it to include both.

Changed in weather-indicator:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-weather - 11.04.10+repack-0ubuntu1

---------------
indicator-weather (11.04.10+repack-0ubuntu1) natty; urgency=low

  * New upstream bug fix release.
   - Fix for LP: #720066 "indicator-weather should re-use the
     time-format of other indicators"
   - Fix for LP: #750809 "No "Thunderstorm" icon shown in Forecast
     only empty place holder."
   - Fix for LP: #747562 "indicator-weather crashed with AttributeError
     in get_value(): Settings instance has no attribute 'settings_design_doc'"
   - Fix for LP: #743375 "indicator-weather crashed with error
     in _try_request_with_retries(): [Errno 111] Connection refused"
  * Drop python-apport from Depends to Recommends. (LP: #757568)
  * Drop patches. Included upstream.
  * debian/postinst: Link weather-few-clouds{-night}.png with
    weather-clouds{-night}.png, work-a-round for incomplete icon
    themes. Add Depends on gnome-icon-theme and xdg-utils.
 -- Andrew Starr-Bochicchio <email address hidden> Mon, 11 Apr 2011 15:08:07 -0400

Changed in indicator-weather (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.