Skip to content
Snippets Groups Projects
Commit f47ebabd authored by Canek Peláez Valdés's avatar Canek Peláez Valdés :slight_smile:
Browse files

Update documentation.

parent c54dffad
Branches
No related tags found
No related merge requests found
......@@ -109,6 +109,8 @@ doc/gqpe/index.htm: $(GQPESOURCES)
--target-glib=2.38 \
--vapidir=vapi \
--verbose \
@CHAMPLAIN_PACKAGES@ \
@CLUTTER_GTK_PACKAGES@ \
@GEE_PACKAGES@ \
@GEXIV2_PACKAGES@ \
@GTK_PACKAGES@ \
......
......@@ -131,8 +131,9 @@ namespace GQPE {
private Champlain.MarkerLayer layer;
/* The marker. */
private Champlain.Label marker;
/* Counter for the loader. */
private int counter;
/* Updating flag. */
private bool updating;
/**
......@@ -520,13 +521,14 @@ namespace GQPE {
/* Updates the map. */
private void update_map() {
if (photograph.has_geolocation) {
update_location(photograph.latitude, photograph.longitude);
update_map_location(photograph.latitude, photograph.longitude);
on_pin_map_clicked();
}
marker.text = photograph.caption;
}
private void update_location(double latitude,
/* Updates the map location. */
private void update_map_location(double latitude,
double longitude) {
if (marker != null) {
layer.remove_marker(marker);
......@@ -538,6 +540,7 @@ namespace GQPE {
this.longitude.value = longitude;
}
/* Creates a new marker. */
private Champlain.Label create_marker(double latitude,
double longitude) {
string photo_caption = (photograph != null &&
......@@ -556,12 +559,13 @@ namespace GQPE {
return marker;
}
/* Map button release callback. */
private bool map_button_release(Clutter.ButtonEvent event) {
double latitude = view.y_to_latitude(event.y);
double longitude = view.x_to_longitude(event.x);
if (event.button == 1) {
update_location(latitude, longitude);
update_map_location(latitude, longitude);
photograph.latitude = this.latitude.value;
photograph.longitude = this.longitude.value;
enable_ui(Item.PIN_MAP);
......
......@@ -148,15 +148,6 @@ namespace GQPE {
update_data();
}
private void update_data() {
album = (metadata.has_tag(Tag.SUBJECT)) ?
metadata.get_tag_string(Tag.SUBJECT).strip() : "";
caption = (metadata.has_tag(Tag.CAPTION)) ?
metadata.get_tag_string(Tag.CAPTION).strip() : "";
comment = (metadata.has_tag(Tag.DESCRIPTION)) ?
metadata.get_tag_string(Tag.DESCRIPTION).strip() : "";
}
/**
* Resizes the photograph so it fills the given width and height.
* @param width the width.
......@@ -244,6 +235,16 @@ namespace GQPE {
metadata.save_file(file.get_path());
}
/* Updates the data from the metadata. */
private void update_data() {
album = (metadata.has_tag(Tag.SUBJECT)) ?
metadata.get_tag_string(Tag.SUBJECT).strip() : "";
caption = (metadata.has_tag(Tag.CAPTION)) ?
metadata.get_tag_string(Tag.CAPTION).strip() : "";
comment = (metadata.has_tag(Tag.DESCRIPTION)) ?
metadata.get_tag_string(Tag.DESCRIPTION).strip() : "";
}
/* Updates the text tags. */
private void update_text_tags() throws GLib.Error {
metadata.clear_tag(Tag.SUBJECT);
......
......@@ -22,7 +22,7 @@ namespace GQPE {
/**
* Constants for the used tags.
*/
private class Tag {
public class Tag {
/**
* Orientation tag.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment