After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 677240 - popup-commands: use g_get_user_special_dir API
popup-commands: use g_get_user_special_dir API
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-01 02:46 UTC by Diego Escalante Urrelo (not reading bugmail)
Modified: 2012-06-14 23:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
popup-commands: use g_get_user_special_dir API (1.06 KB, patch)
2012-06-01 02:46 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review

Description Diego Escalante Urrelo (not reading bugmail) 2012-06-01 02:46:18 UTC
Don't hardcode "Pictures".
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2012-06-01 02:46:20 UTC
Created attachment 215376 [details] [review]
popup-commands: use g_get_user_special_dir API

"Pictures" was hardcoded as the destination folder, use
G_USER_DIRECTORY_PICTURES instead.
Comment 2 Claudio Saavedra 2012-06-05 14:47:09 UTC
Review of attachment 215376 [details] [review]:

::: src/popup-commands.c
@@ +329,3 @@
 	base = g_path_get_basename (location);
 	base_converted = g_filename_from_utf8 (base, -1, NULL, NULL, NULL);
+	dest = g_build_filename (g_get_user_special_dir (G_USER_DIRECTORY_PICTURES), base_converted, NULL);

g_get_user_special_dir() /could/ eventually return NULL, but I am not entirely sure whether it's worth to go through the extra hassle to handle that case..
Comment 3 Xan Lopez 2012-06-13 08:33:52 UTC
Review of attachment 215376 [details] [review]:

Well this is not making things worse, so if we want to make the code more robust it can happen in another patch.
Comment 4 Diego Escalante Urrelo (not reading bugmail) 2012-06-14 23:44:25 UTC
Attachment 215376 [details] pushed as d2d47f4 - popup-commands: use g_get_user_special_dir API