Skip to content
Commits on Source (2)
......@@ -45,6 +45,10 @@ namespace GQPE {
*/
REVERSE_PORTRAIT = 8;
/**
* Returns a string representation of the orientation.
* @return a string representation of the orientation.
*/
public string to_string() {
switch (this) {
case LANDSCAPE: return "landscape";
......
......@@ -201,6 +201,10 @@ namespace GQPE {
return this.datetime.compare(photograph.datetime);
}
/**
* Copies the GPS data from the received photograph.
* @param photo the photograph.
*/
public void copy_gps_data(Photograph photo) {
latitude = photo.latitude;
longitude = photo.longitude;
......@@ -210,6 +214,12 @@ namespace GQPE {
has_geolocation = photo.has_geolocation;
}
/**
* Copies the metadata from the received photograph.
* @param photo the photograph.
* @param no_gps whether to skip the GPS data.
* @param no_datetime whether to skip the datetime data.
*/
public void copy_metadata(Photograph photo,
bool no_gps = false,
bool no_datetime = false) {
......@@ -317,8 +327,8 @@ namespace GQPE {
private void get_metadata() throws GLib.Error {
title = (metadata.has_tag(Tag.TITLE.tag())) ?
metadata.try_get_tag_string(Tag.TITLE.tag()).strip() : "";
album = (metadata.has_tag(Tag.SUBJECT.tag())) ?
metadata.try_get_tag_string(Tag.SUBJECT.tag()).strip() : "";
album = (metadata.has_tag(Tag.ALBUM.tag())) ?
metadata.try_get_tag_string(Tag.ALBUM.tag()).strip() : "";
comment = (metadata.has_tag(Tag.DESCRIPTION.tag())) ?
metadata.try_get_tag_string(Tag.DESCRIPTION.tag()).strip()
: "";
......@@ -373,8 +383,8 @@ namespace GQPE {
private void set_metadata() throws GLib.Error {
metadata.clear_tag(Tag.TITLE.tag());
metadata.try_set_tag_string(Tag.TITLE.tag(), title);
metadata.clear_tag(Tag.SUBJECT.tag());
metadata.try_set_tag_string(Tag.SUBJECT.tag(), album);
metadata.clear_tag(Tag.ALBUM.tag());
metadata.try_set_tag_string(Tag.ALBUM.tag(), album);
metadata.clear_tag(Tag.DESCRIPTION.tag());
metadata.try_set_tag_string(Tag.DESCRIPTION.tag(), comment);
metadata.clear_tag(Tag.DATETIME.tag());
......
......@@ -199,8 +199,8 @@ namespace GQPE {
r += s;
s = s.next_char();
}
r += "...";
for (int i = 0; i < word.char_count() - width - 3; i++)
r += "";
for (int i = 0; i < word.char_count() - width - 1; i++)
s = s.next_char();
for (int i = width / 2 + 2; i < width; i++) {
r += s;
......
......@@ -24,39 +24,39 @@ namespace GQPE {
public enum Tag {
/**
* Date and time tag.
* Title tag.
*/
DATETIME,
TITLE,
/**
* The timezone offset
* Album tag.
*/
TIMEZONE_OFFSET,
ALBUM,
/**
* Orientation tag.
* Description tag.
*/
ORIENTATION,
DESCRIPTION,
/**
* Thumbnail orientation tag.
* Date and time tag.
*/
THUMB_ORIENTATION,
DATETIME,
/**
* Subject tag.
* The timezone offset
*/
SUBJECT,
TIMEZONE_OFFSET,
/**
* Caption tag.
* Orientation tag.
*/
TITLE,
ORIENTATION,
/**
* Description tag.
* Thumbnail orientation tag.
*/
DESCRIPTION,
THUMB_ORIENTATION,
/**
* Latitude tag.
......@@ -109,13 +109,13 @@ namespace GQPE {
*/
public string tag() {
switch (this) {
case TITLE: return "Iptc.Application2.Caption";
case ALBUM: return "Xmp.dc.subject";
case DESCRIPTION: return "Exif.Image.ImageDescription";
case DATETIME: return "Exif.Photo.DateTimeOriginal";
case TIMEZONE_OFFSET: return "Exif.Image.TimeZoneOffset";
case ORIENTATION: return "Exif.Image.Orientation";
case THUMB_ORIENTATION: return "Exif.Thumbnail.Orientation";
case SUBJECT: return "Xmp.dc.subject";
case TITLE: return "Iptc.Application2.Caption";
case DESCRIPTION: return "Exif.Image.ImageDescription";
case LATITUDE: return "Exif.GPSInfo.GPSLatitude";
case LONGITUDE: return "Exif.GPSInfo.GPSLongitude";
case LATITUDE_REF: return "Exif.GPSInfo.GPSLatitudeRef";
......
......@@ -128,12 +128,23 @@ namespace GQPE {
return "";
}
/**
* Returns a normalized basename; ASCII, no spaces, no uppercase
* letters, no symbols.
* @param basename the basename.
* @return a normalized basename.
*/
public static string normalize_basename(string basename) {
var n = Util.normalize(Util.get_name(basename));
var e = Util.normalize(Util.get_extension(basename));
return "%s.%s".printf(n, e);
}
/**
* Returns a path without extension.
* @param path the path.
* @return a path without extension.
*/
public static string get_name(string path) {
int i = path.last_index_of(".");
if (i == 0 || i == -1)
......@@ -141,6 +152,11 @@ namespace GQPE {
return path[:i];
}
/**
* Returns a path extension.
* @param path the path.
* @return a path extension.
*/
public static string get_extension(string path) {
int i = path.last_index_of(".");
if (i == 0 || i == -1)
......@@ -148,6 +164,11 @@ namespace GQPE {
return path[i+1:];
}
/**
* Returns the message with its first letter capitalized.
* @param message the message.
* @return the message with its first letter capitalized.
*/
public static string capitalize(string message) {
int i = message.index_of_nth_char(1);
return message.up(1) + message.substring(i);
......@@ -188,7 +209,10 @@ namespace GQPE {
longitude = (longitude1+longitude2) / 2.0;
}
/* Prints an error message and exits.*/
/**
* Prints an error message and exits.
* @param format the format.
*/
[PrintfFormat]
public static void error(string format, ...) {
var full_format = format + "\n";
......
......@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gqpe 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-26 03:08-0600\n"
"PO-Revision-Date: 2021-11-26 03:11-0600\n"
"POT-Creation-Date: 2021-11-27 17:47-0600\n"
"PO-Revision-Date: 2021-11-27 17:51-0600\n"
"Last-Translator: Canek Peláez Valdés <canek@ciencias.unam.mx>\n"
"Language-Team: es\n"
"Language: es\n"
......@@ -49,6 +49,14 @@ msgstr "Ir a geolocalización"
msgid "Save picture"
msgstr "Guardar imagen"
#: data/application-window.ui:379
msgid "Open Google Maps on this location"
msgstr "Abrir Mapas de Google en esta localización"
#: data/application-window.ui:380
msgid "Google Maps"
msgstr "Mapas de Google"
#: data/gqpe.desktop.in:3
msgid "GQPE"
msgstr "GQPE"
......@@ -65,80 +73,80 @@ msgstr "Editor rápido para etiquetas de fotografía"
msgid "A Gtk+ based quick photo editor"
msgstr "Un rápido editor de fotos basado en Gtk+"
#: src/store.vala:52
#: src/store.vala:51
msgid "INPUTDIR OUTPUTDIR - Store images to a normalized location."
msgstr "ENTRADA SALIDA - Almacena imágenes a una dirección normalizada."
#: src/store.vala:58
#: src/store.vala:57
msgid "Use location look up"
msgstr "Usar búsqueda de ubicación"
#: src/store.vala:60
#: src/store.vala:59
msgid "Update the metadata of the photograph"
msgstr "Acutalizar los metadatos de la fotografía"
#: src/store.vala:62 src/tags.vala:117
#: src/store.vala:61 src/tags.vala:116
msgid "Be quiet"
msgstr "No producir salida"
#: src/store.vala:86
#: src/store.vala:85
#, c-format
msgid "Invalid city record: %s"
msgstr "Registro de ciudad inválido: %s"
#: src/store.vala:101
#: src/store.vala:100
#, c-format
msgid "An error ocurred while parsing %s"
msgstr "Ocurrió un error al analizar %s"
#: src/store.vala:104
#: src/store.vala:103
msgid "Cities database not found"
msgstr "Base de datos de ciudades no encontrada"
#. Translators: Month name and day
#: src/store.vala:130
#: src/store.vala:129
#, c-format
msgid "%s %d"
msgstr "%s %d"
#: src/store.vala:133
#: src/store.vala:132
#, c-format
msgid "%s, near %s"
msgstr "%s, cerca de %s"
#: src/store.vala:162
#: src/store.vala:161
#, c-format
msgid "There was an error processing %s: %s. "
msgstr "Hubo un error al procesar %s: %s."
#: src/store.vala:164
#: src/store.vala:163
msgid "Skipping.\n"
msgstr "Omitiendo.\n"
#: src/store.vala:239 src/tags.vala:308
#: src/store.vala:238 src/tags.vala:307
#, c-format
msgid "Run ‘%s --help’ for a list of options.\n"
msgstr "Ejecute ‘%s --help’ para una lista de opciones.\n"
msgid "Run ‘%s --help’ for a list of options"
msgstr "Ejecute ‘%s --help’ para una lista de opciones"
#: src/store.vala:246
msgid "Exactly one output and one input directory needed.\n"
msgstr "Se necesitan exactamente un directorio entrada y de salida.\n"
#: src/store.vala:243
msgid "Exactly one output and one input directory needed"
msgstr "Se necesitan exactamente un directorio entrada y de salida"
#: src/store.vala:258
#: src/store.vala:252
#, c-format
msgid "%s is not a directory\n"
msgstr "%s no es un directorio\n"
#: src/store.vala:265
#: src/store.vala:257
#, c-format
msgid "There was an error while storing: %s\n"
msgstr "Ocurrió un error al almacenar: %s\n"
#: src/tags.vala:66
#: src/tags.vala:65
msgid "[FILENAME…] - Edit and show the image tags."
msgstr "[ARCHIVO...] - Edita y muestra las etiquetas de imagen."
msgstr "[ARCHIVO] - Edita y muestra las etiquetas de imagen."
#: src/tags.vala:71
#: src/tags.vala:70
msgid ""
"With no flags the tags are printed. An empty string as parameter\n"
"removes an individual tag.\n"
......@@ -174,170 +182,170 @@ msgstr ""
" %Y: La latitud\n"
" %X: La longitud\n"
#: src/tags.vala:94
#: src/tags.vala:93
msgid "Set the title"
msgstr "Define el título"
#: src/tags.vala:96
#: src/tags.vala:95
msgid "Set the comment"
msgstr "Define el comentario"
#: src/tags.vala:98
#: src/tags.vala:97
msgid "Set the album"
msgstr "Define el álbum"
#: src/tags.vala:100
#: src/tags.vala:99
msgid "Set the date and time"
msgstr "Define la fecha y hora"
#: src/tags.vala:102
#: src/tags.vala:101
msgid "Set the timezone offset"
msgstr "Define el desplazamiento de la zona de tiempo"
#: src/tags.vala:104
#: src/tags.vala:103
msgid "Set the orientation"
msgstr "Define la orientación"
#: src/tags.vala:106
#: src/tags.vala:105
msgid "Set the latitude"
msgstr "Define la latitud"
#: src/tags.vala:108
#: src/tags.vala:107
msgid "Set the longitude"
msgstr "Define la longitud"
#: src/tags.vala:110
#: src/tags.vala:109
msgid "Shift the time in this amount of hours"
msgstr "Desplaza el tiempo por esta cantidad de horas"
#: src/tags.vala:112
#: src/tags.vala:111
msgid "Resets the file timestamp to the photograph one"
msgstr "Reajusta la estampa de tiempo del archivo al de la fotografía"
#: src/tags.vala:115
#: src/tags.vala:114
msgid "Prints the tags with format"
msgstr "Imprime las etiquetas con formato"
#: src/tags.vala:127
#: src/tags.vala:126
#, c-format
msgid "No such file: ‘%s’\n"
msgstr "No hay tal archivo: ‘%s’\n"
#: src/tags.vala:134
#: src/tags.vala:133
#, c-format
msgid "Error loading: ‘%s’\n"
msgstr "Error cargando: ‘%s’\n"
#: src/tags.vala:146
#: src/tags.vala:145
msgid "Title"
msgstr "Título"
#: src/tags.vala:148
#: src/tags.vala:147
msgid "Album"
msgstr "Álbum"
#: src/tags.vala:150
#: src/tags.vala:149
msgid "Comment"
msgstr "Comentario"
#: src/tags.vala:157
#: src/tags.vala:156
msgid "Date and time"
msgstr "Fecha y hora"
#: src/tags.vala:159
#: src/tags.vala:158
msgid "Orientation"
msgstr "Orientación"
#: src/tags.vala:162
#: src/tags.vala:161
msgid "Latitude"
msgstr "Latitud"
#: src/tags.vala:164
#: src/tags.vala:163
msgid "Longitude"
msgstr "Longitud"
#: src/tags.vala:166
#: src/tags.vala:165
msgid "GPS tag"
msgstr "Etiqueta GPS"
#: src/tags.vala:167
#: src/tags.vala:166
msgid "GPS version"
msgstr "Versión GPS"
#: src/tags.vala:168
#: src/tags.vala:167
msgid "GPS datum"
msgstr "Dato GPS"
#: src/tags.vala:222
#: src/tags.vala:221
#, c-format
msgid "Resetting time for %s...\n"
msgstr "Reajustando tiempo para %s...\n"
msgid "Resetting time for %s\n"
msgstr "Reajustando tiempo para %s\n"
#: src/tags.vala:230
#: src/tags.vala:229
#, c-format
msgid "Shifting time for %s...\n"
msgid "Shifting time for %s\n"
msgstr "Desplazando tiempo para %s...\n"
#: src/tags.vala:262
#: src/tags.vala:261
#, c-format
msgid "Updating %s...\n"
msgstr "Actualizando %s...\n"
msgid "Updating %s\n"
msgstr "Actualizando %s\n"
#: src/tags.vala:266
#: src/tags.vala:265
#, c-format
msgid "%s updated.\n"
msgstr "% actualizado.\n"
#: src/tags.vala:281
#: src/tags.vala:280
#, c-format
msgid "There was an error saving %s: %s\n"
msgstr "Hubo un error guardando %s: %s\n"
#: src/tags.vala:314
msgid "Missing files.\n"
msgstr "Archivos faltantes.\n"
#: src/tags.vala:311
msgid "Missing files"
msgstr "Archivos faltantes"
#: src/tags.vala:319
msgid "You cannot shift time and edit at the same time\n"
msgstr "No puede desplazar tiempo y editar al mismo tiempo\n"
#: src/tags.vala:314
msgid "You cannot shift time and edit tags"
msgstr "No puede desplazar tiempo y editar"
#: src/tags.vala:325
msgid "You cannot reset time and edit at the same time\n"
msgstr "No puede desplazar tiempo y editar al mismo tiempo\n"
#: src/tags.vala:317
msgid "You cannot reset time and edit tags"
msgstr "No puede desplazar tiempo y editar"
#: src/tags.vala:331
msgid "You cannot shift and reset time at the same time\n"
msgstr "No puede desplazar tiempo y editar al mismo tiempo\n"
#: src/tags.vala:320
msgid "You cannot shift and reset time"
msgstr "No puede desplazar tiempo y reajustar tiempo"
#: src/tags.vala:339
#: src/tags.vala:325
#, c-format
msgid "Invalid orientation: %s\n"
msgstr "Orientación inválida: %s\n"
msgid "Invalid orientation: %s"
msgstr "Orientación inválida: %s"
#: src/tags.vala:351
#: src/tags.vala:335
#, c-format
msgid "Invalid date and time: %s\n"
msgstr "Fecha y tiempo inválidos: %s\n"
msgid "Invalid date and time: %s"
msgstr "Fecha y tiempo inválidos: %s"
#: src/tags.vala:358
#: src/tags.vala:339
#, c-format
msgid "Invalid timezone offset: %s\n"
msgstr "Desplazamiento de zona de tiempo inválida: %s\n"
msgid "Invalid timezone offset: %s"
msgstr "Desplazamiento de zona de tiempo inválida: %s"
#: src/tags.vala:364
#: src/tags.vala:343
#, c-format
msgid "Invalid latitude: %s\n"
msgstr "Latitud inválida: %s\n"
msgid "Invalid latitude: %s"
msgstr "Latitud inválida: %s"
#: src/tags.vala:369
#: src/tags.vala:347
#, c-format
msgid "Invalid longitude: %s\n"
msgstr "Longitud inválida: %s\n"
msgid "Invalid longitude: %s"
msgstr "Longitud inválida: %s"
#: src/tags.vala:375
msgid "Latitude will only be set on photos with GPS data\n"
msgstr "La latitud sólo se definirá para fotografías con información GPS\n"
#: src/tags.vala:351
msgid "Latitude will only be set on photos with GPS data"
msgstr "La latitud sólo se definirá para fotografías con información GPS"
#: src/tags.vala:380
msgid "Longitude will only be set on photos with GPS data\n"
msgstr "La longitud sólo se definirá para fotografías con información GPS\n"
#: src/tags.vala:354
msgid "Longitude will only be set on photos with GPS data"
msgstr "La longitud sólo se definirá para fotografías con información GPS"
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gqpe\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-26 03:08-0600\n"
"POT-Creation-Date: 2021-11-27 17:47-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -49,6 +49,14 @@ msgstr ""
msgid "Save picture"
msgstr ""
#: data/application-window.ui:379
msgid "Open Google Maps on this location"
msgstr ""
#: data/application-window.ui:380
msgid "Google Maps"
msgstr ""
#: data/gqpe.desktop.in:3
msgid "GQPE"
msgstr ""
......@@ -65,80 +73,80 @@ msgstr ""
msgid "A Gtk+ based quick photo editor"
msgstr ""
#: src/store.vala:52
#: src/store.vala:51
msgid "INPUTDIR OUTPUTDIR - Store images to a normalized location."
msgstr ""
#: src/store.vala:58
#: src/store.vala:57
msgid "Use location look up"
msgstr ""
#: src/store.vala:60
#: src/store.vala:59
msgid "Update the metadata of the photograph"
msgstr ""
#: src/store.vala:62 src/tags.vala:117
#: src/store.vala:61 src/tags.vala:116
msgid "Be quiet"
msgstr ""
#: src/store.vala:86
#: src/store.vala:85
#, c-format
msgid "Invalid city record: %s"
msgstr ""
#: src/store.vala:101
#: src/store.vala:100
#, c-format
msgid "An error ocurred while parsing %s"
msgstr ""
#: src/store.vala:104
#: src/store.vala:103
msgid "Cities database not found"
msgstr ""
#. Translators: Month name and day
#: src/store.vala:130
#: src/store.vala:129
#, c-format
msgid "%s %d"
msgstr ""
#: src/store.vala:133
#: src/store.vala:132
#, c-format
msgid "%s, near %s"
msgstr ""
#: src/store.vala:162
#: src/store.vala:161
#, c-format
msgid "There was an error processing %s: %s. "
msgstr ""
#: src/store.vala:164
#: src/store.vala:163
msgid "Skipping.\n"
msgstr ""
#: src/store.vala:239 src/tags.vala:308
#: src/store.vala:238 src/tags.vala:307
#, c-format
msgid "Run ‘%s --help’ for a list of options.\n"
msgid "Run ‘%s --help’ for a list of options"
msgstr ""
#: src/store.vala:246
msgid "Exactly one output and one input directory needed.\n"
#: src/store.vala:243
msgid "Exactly one output and one input directory needed"
msgstr ""
#: src/store.vala:258
#: src/store.vala:252
#, c-format
msgid "%s is not a directory\n"
msgstr ""
#: src/store.vala:265
#: src/store.vala:257
#, c-format
msgid "There was an error while storing: %s\n"
msgstr ""
#: src/tags.vala:66
#: src/tags.vala:65
msgid "[FILENAME…] - Edit and show the image tags."
msgstr ""
#: src/tags.vala:71
#: src/tags.vala:70
msgid ""
"With no flags the tags are printed. An empty string as parameter\n"
"removes an individual tag.\n"
......@@ -158,170 +166,170 @@ msgid ""
" %X: The longitude\n"
msgstr ""
#: src/tags.vala:94
#: src/tags.vala:93
msgid "Set the title"
msgstr ""
#: src/tags.vala:96
#: src/tags.vala:95
msgid "Set the comment"
msgstr ""
#: src/tags.vala:98
#: src/tags.vala:97
msgid "Set the album"
msgstr ""
#: src/tags.vala:100
#: src/tags.vala:99
msgid "Set the date and time"
msgstr ""
#: src/tags.vala:102
#: src/tags.vala:101
msgid "Set the timezone offset"
msgstr ""
#: src/tags.vala:104
#: src/tags.vala:103
msgid "Set the orientation"
msgstr ""
#: src/tags.vala:106
#: src/tags.vala:105
msgid "Set the latitude"
msgstr ""
#: src/tags.vala:108
#: src/tags.vala:107
msgid "Set the longitude"
msgstr ""
#: src/tags.vala:110
#: src/tags.vala:109
msgid "Shift the time in this amount of hours"
msgstr ""
#: src/tags.vala:112
#: src/tags.vala:111
msgid "Resets the file timestamp to the photograph one"
msgstr ""
#: src/tags.vala:115
#: src/tags.vala:114
msgid "Prints the tags with format"
msgstr ""
#: src/tags.vala:127
#: src/tags.vala:126
#, c-format
msgid "No such file: ‘%s’\n"
msgstr ""
#: src/tags.vala:134
#: src/tags.vala:133
#, c-format
msgid "Error loading: ‘%s’\n"
msgstr ""
#: src/tags.vala:146
#: src/tags.vala:145
msgid "Title"
msgstr ""
#: src/tags.vala:148
#: src/tags.vala:147
msgid "Album"
msgstr ""
#: src/tags.vala:150
#: src/tags.vala:149
msgid "Comment"
msgstr ""
#: src/tags.vala:157
#: src/tags.vala:156
msgid "Date and time"
msgstr ""
#: src/tags.vala:159
#: src/tags.vala:158
msgid "Orientation"
msgstr ""
#: src/tags.vala:162
#: src/tags.vala:161
msgid "Latitude"
msgstr ""
#: src/tags.vala:164
#: src/tags.vala:163
msgid "Longitude"
msgstr ""
#: src/tags.vala:166
#: src/tags.vala:165
msgid "GPS tag"
msgstr ""
#: src/tags.vala:167
#: src/tags.vala:166
msgid "GPS version"
msgstr ""
#: src/tags.vala:168
#: src/tags.vala:167
msgid "GPS datum"
msgstr ""
#: src/tags.vala:222
#: src/tags.vala:221
#, c-format
msgid "Resetting time for %s...\n"
msgid "Resetting time for %s\n"
msgstr ""
#: src/tags.vala:230
#: src/tags.vala:229
#, c-format
msgid "Shifting time for %s...\n"
msgid "Shifting time for %s\n"
msgstr ""
#: src/tags.vala:262
#: src/tags.vala:261
#, c-format
msgid "Updating %s...\n"
msgid "Updating %s\n"
msgstr ""
#: src/tags.vala:266
#: src/tags.vala:265
#, c-format
msgid "%s updated.\n"
msgstr ""
#: src/tags.vala:281
#: src/tags.vala:280
#, c-format
msgid "There was an error saving %s: %s\n"
msgstr ""
#: src/tags.vala:314
msgid "Missing files.\n"
#: src/tags.vala:311
msgid "Missing files"
msgstr ""
#: src/tags.vala:319
msgid "You cannot shift time and edit at the same time\n"
#: src/tags.vala:314
msgid "You cannot shift time and edit tags"
msgstr ""
#: src/tags.vala:325
msgid "You cannot reset time and edit at the same time\n"
#: src/tags.vala:317
msgid "You cannot reset time and edit tags"
msgstr ""
#: src/tags.vala:331
msgid "You cannot shift and reset time at the same time\n"
#: src/tags.vala:320
msgid "You cannot shift and reset time"
msgstr ""
#: src/tags.vala:339
#: src/tags.vala:325
#, c-format
msgid "Invalid orientation: %s\n"
msgid "Invalid orientation: %s"
msgstr ""
#: src/tags.vala:351
#: src/tags.vala:335
#, c-format
msgid "Invalid date and time: %s\n"
msgid "Invalid date and time: %s"
msgstr ""
#: src/tags.vala:358
#: src/tags.vala:339
#, c-format
msgid "Invalid timezone offset: %s\n"
msgid "Invalid timezone offset: %s"
msgstr ""
#: src/tags.vala:364
#: src/tags.vala:343
#, c-format
msgid "Invalid latitude: %s\n"
msgid "Invalid latitude: %s"
msgstr ""
#: src/tags.vala:369
#: src/tags.vala:347
#, c-format
msgid "Invalid longitude: %s\n"
msgid "Invalid longitude: %s"
msgstr ""
#: src/tags.vala:375
msgid "Latitude will only be set on photos with GPS data\n"
#: src/tags.vala:351
msgid "Latitude will only be set on photos with GPS data"
msgstr ""
#: src/tags.vala:380
msgid "Longitude will only be set on photos with GPS data\n"
#: src/tags.vala:354
msgid "Longitude will only be set on photos with GPS data"
msgstr ""
......@@ -374,10 +374,11 @@ namespace GQPE {
GLib.Idle.add(lazy_load);
}
/* Loads the photographs lazily. */
private bool lazy_load() {
if (pmap.is_empty) {
progress_bar.visible = false;
return false;
return GLib.Source.REMOVE;
}
var path = pmap.ascending_keys.first();
var photo = pmap[path];
......@@ -391,7 +392,7 @@ namespace GQPE {
pmap.unset(photo.path);
double t = photographs.size - pmap.size;
progress_bar.fraction = t / photographs.size;
return true;
return GLib.Source.CONTINUE;
}
/* Initializes the iterators. */
......
......@@ -51,6 +51,7 @@ namespace GQPE {
return options;
}
/* Copies the tags. */
private static void copy_tags() throws GLib.Error {
var i = new Photograph(GLib.File.new_for_commandline_arg(input));
var o = new Photograph(GLib.File.new_for_commandline_arg(output));
......
......@@ -51,7 +51,7 @@ namespace GQPE {
/*Loads the photos from the input directory. */
private static void load_photos() throws GLib.Error {
stdout.printf(_("Loading photos...\n"));
stdout.printf(_("Loading photos\n"));
int c = 0;
var root = GLib.File.new_for_path(input);
Gee.ArrayQueue<File> queue = new Gee.ArrayQueue<File>();
......@@ -73,7 +73,7 @@ namespace GQPE {
try {
var photo = new Photograph(file);
photos.add(photo);
stderr.printf(_("Loaded %d photos... \r\b"), c++);
stderr.printf(_("Loaded %d photos \r\b"), c++);
} catch (GLib.Error e) {
var m = _("There was an error processing %s: %s. ");
stderr.printf(m, path, e.message);
......@@ -85,7 +85,7 @@ namespace GQPE {
photographs = new Photograph[photos.size];
foreach (var photo in photos)
photographs[i++] = photo;
stdout.printf(_("Loaded %d photos... \n"), c++);
stdout.printf(_("Loaded %d photos \n"), c++);
}
/* Recursively interpolates the coordinates for a range. */
......@@ -127,7 +127,7 @@ namespace GQPE {
int c = 0;
for (int x = i+1; x < j; x++) {
int y = (int)(((double)(x-i)) / n) + 1;
stderr.printf(_("Updating %s...\n"),
stderr.printf(_("Updating %s\n"),
photographs[x].path);
c++;
photographs[x].set_coordinates(lats[y], lons[y]);
......@@ -196,14 +196,14 @@ namespace GQPE {
var file = GLib.File.new_for_path(args[i]);
try {
photographs[i-1] = new Photograph(file);
stderr.printf(_("Loaded %d photos... \r\b"), c++);
stderr.printf(_("Loaded %d photos \r\b"), c++);
} catch (GLib.Error e) {
var m = _("There was an error processing %s: %s. ");
stderr.printf(m, args[i], e.message);
stderr.printf(_("Skipping.\n"));
}
}
stderr.printf(_("Loaded %d photos... \n"), c);
stderr.printf(_("Loaded %d photos \n"), c);
int n = photographs.length;
if (!photographs[0].has_geolocation ||
!photographs[n-1].has_geolocation)
......
......@@ -218,7 +218,7 @@ Format for printing:
var dt = Util.get_file_datetime(photo.path);
if (dt.compare(photo.datetime) == 0)
continue;
stderr.printf(_("Resetting time for %s...\n"), photo.path);
stderr.printf(_("Resetting time for %s\n"), photo.path);
Util.set_file_datetime(photo.path, photo.datetime);
}
}
......@@ -226,7 +226,7 @@ Format for printing:
/* Shifts time. */
private static void do_shift_time() {
foreach (var photo in photos) {
stderr.printf(_("Shifting time for %s...\n"), photo.path);
stderr.printf(_("Shifting time for %s\n"), photo.path);
photo.datetime = photo.datetime.add_hours(shift_time);
save(photo);
}
......@@ -258,7 +258,7 @@ Format for printing:
photo.set_coordinates(latitude, longitude);
}
if (!quiet)
stderr.printf(_("Updating %s...\n"),
stderr.printf(_("Updating %s\n"),
GLib.Filename.display_basename(photo.path));
save(photo);
if (!quiet)
......