Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gtk Quick Photo Editor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Canek Peláez Valdés
Gtk Quick Photo Editor
Commits
f47ebabd
Commit
f47ebabd
authored
8 years ago
by
Canek Peláez Valdés
Browse files
Options
Downloads
Patches
Plain Diff
Update documentation.
parent
c54dffad
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile.am
+2
-0
2 additions, 0 deletions
Makefile.am
src/application-window.vala
+9
-5
9 additions, 5 deletions
src/application-window.vala
src/photograph.vala
+10
-9
10 additions, 9 deletions
src/photograph.vala
src/tag.vala
+1
-1
1 addition, 1 deletion
src/tag.vala
with
22 additions
and
15 deletions
Makefile.am
+
2
−
0
View file @
f47ebabd
...
...
@@ -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@
\
...
...
This diff is collapsed.
Click to expand it.
src/application-window.vala
+
9
−
5
View file @
f47ebabd
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
src/photograph.vala
+
10
−
9
View file @
f47ebabd
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
src/tag.vala
+
1
−
1
View file @
f47ebabd
...
...
@@ -22,7 +22,7 @@ namespace GQPE {
/**
* Constants for the used tags.
*/
p
rivate
class
Tag
{
p
ublic
class
Tag
{
/**
* Orientation tag.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment