Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
sebastiankrzyszkowiak
megapixels
Commits
cc21f1b5
Commit
cc21f1b5
authored
Jan 05, 2021
by
Benjamin Schaaf
Committed by
Martijn Braam
Jan 11, 2021
Browse files
Use XDG special directory instead of hard-coding ~/Pictures
Fixes #22
parent
d140e44d
Changes
2
Hide whitespace changes
Inline
Side-by-side
main.c
View file @
cc21f1b5
...
...
@@ -346,7 +346,7 @@ on_open_directory_clicked(GtkWidget *widget, gpointer user_data)
{
char
uri
[
270
];
GError
*
error
=
NULL
;
sprintf
(
uri
,
"file://%s
/Pictures
"
,
get
env
(
"HOME"
));
sprintf
(
uri
,
"file://%s"
,
g_
get
_user_special_dir
(
G_USER_DIRECTORY_PICTURES
));
if
(
!
g_app_info_launch_default_for_uri
(
uri
,
NULL
,
&
error
))
{
g_printerr
(
"Could not launch image viewer: %s
\n
"
,
error
->
message
);
}
...
...
process_pipeline.c
View file @
cc21f1b5
...
...
@@ -350,7 +350,10 @@ process_capture_burst(cairo_surface_t *thumb)
char
timestamp
[
30
];
strftime
(
timestamp
,
30
,
"%Y%m%d%H%M%S"
,
&
tim
);
sprintf
(
capture_fname
,
"%s/Pictures/IMG%s"
,
getenv
(
"HOME"
),
timestamp
);
sprintf
(
capture_fname
,
"%s/IMG%s"
,
g_get_user_special_dir
(
G_USER_DIRECTORY_PICTURES
),
timestamp
);
// Start post-processing the captured burst
g_print
(
"Post process %s to %s.ext
\n
"
,
burst_dir
,
capture_fname
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment