gnome-panel r11006 - trunk/applets/clock
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-panel r11006 - trunk/applets/clock
- Date: Tue, 8 Apr 2008 13:39:07 +0100 (BST)
Author: vuntz
Date: Tue Apr 8 13:39:07 2008
New Revision: 11006
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=11006&view=rev
Log:
2008-04-08 Vincent Untz <vuntz gnome org>
* clock-location.[ch]: remove clock_location_new_from_env(). Not really
sure it's a good thing to have (can give pretty wrong results), and
it's not used.
Modified:
trunk/applets/clock/ChangeLog
trunk/applets/clock/clock-location.c
trunk/applets/clock/clock-location.h
Modified: trunk/applets/clock/clock-location.c
==============================================================================
--- trunk/applets/clock/clock-location.c (original)
+++ trunk/applets/clock/clock-location.c Tue Apr 8 13:39:07 2008
@@ -342,58 +342,6 @@
return NULL;
}
-ClockLocation *
-clock_location_new_from_env (ClockZoneTable *zones)
-{
- ClockLocation *ret;
-
- ClockZoneInfo *info;
- ClockCountry *country;
-
- gchar *name;
- gfloat lat = 0;
- gfloat lon = 0;
-
- char *zone = getenv ("TZ");
-
- if (zone == NULL) {
- zone = clock_location_guess_zone (zones);
- }
-
- if (zone == NULL) {
- /* make a fake location with a null TZ */
- return clock_location_new (_("Unknown Location"), NULL, 0.0, 0.0, NULL, NULL);
- }
-
- info = clock_zonetable_get_zone (zones, zone);
-
- if (info == NULL) {
- /* make a fake location with the current TZ */
- return clock_location_new (_("Unknown Location"), zone, 0.0, 0.0, NULL, NULL);
- }
-
- g_free (zone);
-
- clock_zoneinfo_get_coords (info, &lat, &lon);
-
- country = clock_zonetable_get_country (zones, clock_zoneinfo_get_country (info));
-
- if (country) {
- name = g_strdup_printf (_("%s, %s"),
- clock_zoneinfo_get_l10n_city (info),
- clock_country_get_l10n_name (country));
- } else {
- name = g_strdup (clock_zoneinfo_get_l10n_city (info));
- }
-
- ret = clock_location_new (name, clock_zoneinfo_get_name (info),
- lat, lon, NULL, NULL);
-
- g_free (name);
-
- return ret;
-}
-
static void
clock_location_class_init (ClockLocationClass *this_class)
{
Modified: trunk/applets/clock/clock-location.h
==============================================================================
--- trunk/applets/clock/clock-location.h (original)
+++ trunk/applets/clock/clock-location.h Tue Apr 8 13:39:07 2008
@@ -38,8 +38,6 @@
const gchar *code,
WeatherPrefs *prefs);
-ClockLocation *clock_location_new_from_env (ClockZoneTable *zones);
-
gchar *clock_location_get_tzname (ClockLocation *loc);
const gchar *clock_location_get_name (ClockLocation *loc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]