Don't hardcode the default list of stations, let translators define it per
* e-summary-preferences.c (make_initial_weather_list), e-summary-weather.c (e_summary_weather_init): Don't hardcode the default list of stations, let translators define it per locale/country. svn path=/trunk/; revision=12216
This commit is contained in:
@ -1,3 +1,10 @@
|
||||
2001-08-12 Zbigniew Chyla <cyba@gnome.pl>
|
||||
|
||||
* e-summary-preferences.c (make_initial_weather_list),
|
||||
e-summary-weather.c (e_summary_weather_init):
|
||||
Don't hardcode the default list of stations, let translators define it
|
||||
per locale/country.
|
||||
|
||||
2001-08-17 Iain Holmes <iain@ximian.com>
|
||||
|
||||
* e-summary-preferences.c (weather_all_select_row_cb): Unselect the
|
||||
|
||||
@ -58,13 +58,21 @@ make_initial_rdf_list (ESummaryPrefs *prefs)
|
||||
static void
|
||||
make_initial_weather_list (ESummaryPrefs *prefs)
|
||||
{
|
||||
GList *stations;
|
||||
/* translators: Put here a list of codes for locations you want to
|
||||
see in My Evolution by default. You can find the list of all
|
||||
stations and their codes in Evolution sources
|
||||
(evolution/my-evolution/Locations) */
|
||||
char *default_stations = _("KBOS:ZSAM:EGAA"), **stations_v, **p;
|
||||
GList *stations = NULL;
|
||||
|
||||
stations = g_list_prepend (NULL, g_strdup ("EGAA"));
|
||||
stations = g_list_prepend (stations, g_strdup ("EGAC"));
|
||||
stations = g_list_prepend (stations, g_strdup ("ENBR"));
|
||||
stations_v = g_strsplit (default_stations, ":", 0);
|
||||
g_assert (stations_v != NULL);
|
||||
for (p = stations_v; *p != NULL; p++) {
|
||||
stations = g_list_prepend (stations, *p);
|
||||
}
|
||||
g_free (stations_v);
|
||||
|
||||
prefs->stations = stations;
|
||||
prefs->stations = g_list_reverse (stations);
|
||||
}
|
||||
|
||||
/* Load the prefs off disk */
|
||||
|
||||
@ -584,9 +584,18 @@ e_summary_weather_init (ESummary *summary)
|
||||
e_summary_add_protocol_listener (summary, "weather", e_summary_weather_protocol, weather);
|
||||
|
||||
if (prefs == NULL) {
|
||||
e_summary_weather_add_location (summary, "KBOS");
|
||||
e_summary_weather_add_location (summary, "ZSAM");
|
||||
e_summary_weather_add_location (summary, "EGAA");
|
||||
/* translators: Put here a list of codes for locations you want to
|
||||
see in My Evolution by default. You can find the list of all
|
||||
stations and their codes in Evolution sources
|
||||
(evolution/my-evolution/Locations) */
|
||||
char *default_stations = _("KBOS:ZSAM:EGAA"), **stations_v, **p;
|
||||
|
||||
stations_v = g_strsplit (default_stations, ":", 0);
|
||||
g_assert (stations_v != NULL);
|
||||
for (p = stations_v; *p != NULL; p++) {
|
||||
e_summary_weather_add_location (summary, *p);
|
||||
}
|
||||
g_strfreev (stations_v);
|
||||
timeout = 600;
|
||||
} else {
|
||||
GList *p;
|
||||
|
||||
Reference in New Issue
Block a user