[gnome-photos/wip/rishi/misc-fixes: 6/18] application, utils: Define a macro for the export sub-path



commit 7ea4fcc0de8b5b59f8ba2cc3896b28f9d17191de
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Dec 14 15:04:47 2015 +0100

    application, utils: Define a macro for the export sub-path
    
    ... because we are going to be using it in multiple places.
    
    http://bugzilla.gnome.org/show_bug.cgi?id=759363

 src/photos-application.c |    2 +-
 src/photos-utils.h       |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index ea757a8..c79c729 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -820,7 +820,7 @@ photos_application_save (PhotosApplication *self)
   g_return_if_fail (item != NULL);
 
   pictures_path = g_get_user_special_dir (G_USER_DIRECTORY_PICTURES);
-  parent_path = g_build_filename (pictures_path, PACKAGE_TARNAME "-exported", NULL);
+  parent_path = g_build_filename (pictures_path, PHOTOS_EXPORT_SUBPATH, NULL);
   parent = g_file_new_for_path (parent_path);
   g_file_make_directory_with_parents (parent, NULL, &error);
   if (error != NULL)
diff --git a/src/photos-utils.h b/src/photos-utils.h
index 071159f..bc76a00 100644
--- a/src/photos-utils.h
+++ b/src/photos-utils.h
@@ -55,6 +55,7 @@ G_BEGIN_DECLS
 
 #define PHOTOS_COLLECTION_SCREENSHOT \
   "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#image-category-screenshot";
+#define PHOTOS_EXPORT_SUBPATH PACKAGE_TARNAME "-exported"
 
 void             photos_utils_border_pixbuf               (GdkPixbuf *pixbuf);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]