aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-01-10 11:15:40 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-01-10 11:15:40 +0800
commitca0b43e11e11f594c7c4ecef5d474113f6322288 (patch)
treea204969464fa9f919f74b9c7bdfa8ad35bba4b9f
parent35febc1be2c6192c1df055a2c35dbb8f30833eb6 (diff)
downloadgsoc2013-evolution-ca0b43e11e11f594c7c4ecef5d474113f6322288.tar.gz
gsoc2013-evolution-ca0b43e11e11f594c7c4ecef5d474113f6322288.tar.zst
gsoc2013-evolution-ca0b43e11e11f594c7c4ecef5d474113f6322288.zip
evo-dir-prefix.patch
-rw-r--r--widgets/misc/e-attachment-handler-image.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/widgets/misc/e-attachment-handler-image.c b/widgets/misc/e-attachment-handler-image.c
index a91b433c6e..c979cc320f 100644
--- a/widgets/misc/e-attachment-handler-image.c
+++ b/widgets/misc/e-attachment-handler-image.c
@@ -116,6 +116,7 @@ action_image_set_as_background_cb (GtkAction *action,
GFile *destination;
GList *selected;
gchar *path;
+ const gchar *override;
view = e_attachment_handler_get_view (handler);
selected = e_attachment_view_get_selected_attachments (view);
@@ -123,8 +124,13 @@ action_image_set_as_background_cb (GtkAction *action,
attachment = E_ATTACHMENT (selected->data);
/* Save the image under ~/.gnome2/wallpapers/. */
- path = g_build_filename (
- g_get_home_dir (), ".gnome2", "wallpapers", NULL);
+ override = g_getenv ("GNOME22_USER_DIR");
+ if (override)
+ path = g_build_filename (override, "wallpapers", NULL);
+ else
+ path = g_build_filename (
+ g_get_home_dir (), ".gnome2", "wallpapers", NULL);
+
destination = g_file_new_for_path (path);
g_mkdir_with_parents (path, 0755);
g_free (path);