Add various documentation updates: DESIGN and HACKING document, and various small comments int the source (Christian Jaeger).
Update man page with information on configuration file.
This commit is contained in:
@@ -117,6 +117,10 @@ location_geoclue_print_help(FILE *f)
|
||||
fputs(_(" name=N\tName of Geoclue provider (or `default')\n"
|
||||
" path=N\tPath of Geoclue provider (or `default')\n"), f);
|
||||
fputs("\n", f);
|
||||
fputs(_("NOTE: currently redshift doesn't recheck geoclue once started,\n"
|
||||
"which means it has to be restarted to take notice after travel.\n"),
|
||||
f);
|
||||
fputs("\n", f);
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
@@ -156,7 +156,9 @@ location_gnome_clock_init(location_gnome_clock_state_t *state)
|
||||
char *lat_str = strstr(current_city, "latitude=\"");
|
||||
char *lon_str = strstr(current_city, "longitude=\"");
|
||||
if (lat_str == NULL || lon_str == NULL) {
|
||||
fputs(_("Location not specified for city.\n"), stderr);
|
||||
fprintf(stderr,
|
||||
_("Location not specified for city `%s'.\n"),
|
||||
current_city);
|
||||
g_free(current_city);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -70,6 +70,9 @@ location_manual_print_help(FILE *f)
|
||||
fputs(_(" lat=N\t\tLatitude\n"
|
||||
" lon=N\t\tLongitude\n"), f);
|
||||
fputs("\n", f);
|
||||
fputs(_("Both values are expected to be floating point numbers,\n"
|
||||
"negative values representing west / south, respectively.\n"), f);
|
||||
fputs("\n", f);
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
+6
-1
@@ -930,6 +930,9 @@ main(int argc, char *argv[])
|
||||
location_providers[i].name != NULL; i++) {
|
||||
const location_provider_t *p =
|
||||
&location_providers[i];
|
||||
fprintf(stderr,
|
||||
_("Trying location provider `%s'...\n"),
|
||||
p->name);
|
||||
r = provider_try_start(p, &location_state,
|
||||
&config_state, NULL);
|
||||
if (r < 0) {
|
||||
@@ -966,6 +969,8 @@ main(int argc, char *argv[])
|
||||
if (verbose) {
|
||||
/* TRANSLATORS: Append degree symbols if possible. */
|
||||
printf(_("Location: %f, %f\n"), lat, lon);
|
||||
printf(_("Temperatures: %dK at day, %dK at night\n"),
|
||||
temp_day, temp_night);
|
||||
}
|
||||
|
||||
/* Latitude */
|
||||
@@ -1314,7 +1319,7 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
/* Sleep for a while */
|
||||
/* Sleep for 5 seconds or 0.1 second. */
|
||||
#ifndef _WIN32
|
||||
if (short_trans) usleep(100000);
|
||||
else usleep(5000000);
|
||||
|
||||
Reference in New Issue
Block a user