[Rawstudio-commit] r3026 - branches/rawstudio-ng-color/librawstudio

Anders Kvist anders at kvistmail.dk
Sun Jan 17 23:43:34 CET 2010


Author: akv
Date: 2010-01-17 23:43:34 +0100 (Sun, 17 Jan 2010)
New Revision: 3026

Modified:
   branches/rawstudio-ng-color/librawstudio/rs-dcp-factory.c
Log:
Allowing users to place DCP profiles in ~/.rawstudio/profiles/

Modified: branches/rawstudio-ng-color/librawstudio/rs-dcp-factory.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-dcp-factory.c	2010-01-17 20:49:54 UTC (rev 3025)
+++ branches/rawstudio-ng-color/librawstudio/rs-dcp-factory.c	2010-01-17 22:43:34 UTC (rev 3026)
@@ -1,6 +1,7 @@
 #include "rs-dcp-file.h"
 #include "rs-dcp-factory.h"
 #include "config.h"
+#include "rs-utils.h"
 
 #define DCP_FACTORY_DEFAULT_SEARCH_PATH PACKAGE_DATA_DIR "/" PACKAGE "/profiles/"
 
@@ -66,6 +67,12 @@
 	return factory;
 }
 
+void
+rs_dcp_factory_append(RSDcpFactory *factory, const gchar *search_path)
+{
+	load_profiles(factory, search_path);
+}
+
 RSDcpFactory *
 rs_dcp_factory_new_default(void)
 {
@@ -76,6 +83,10 @@
 	if (!factory)
 	{
 		factory = rs_dcp_factory_new(DCP_FACTORY_DEFAULT_SEARCH_PATH);
+
+		gchar *user_profiles = g_strdup_printf("%s/profiles/", rs_confdir_get());
+		rs_dcp_factory_append(factory, user_profiles);
+		g_free(user_profiles);
 	}
 	g_static_mutex_unlock(&lock);
 




More information about the Rawstudio-commit mailing list