Hello,

for coding training I created a patch for feature request #9136, http://darktable.org/redmine/issues/9136
to allow "%" as a wildcard for color labels.

Comments welcome, although it is a oneliner.

Cheers,

hal
diff --git a/src/common/collection.c b/src/common/collection.c
index 9884a69..a7a3c89 100644
--- a/src/common/collection.c
+++ b/src/common/collection.c
@@ -454,6 +454,7 @@ get_query_string(const dt_collection_properties_t property, const gchar *escaped
       else if(strcmp(escaped_text,_("blue")  )==0) color=3;
       else if(strcmp(escaped_text,_("purple"))==0) color=4;
       snprintf(query, 1024, "(id in (select imgid from color_labels where color=%d))", color);
+      if     (strcmp(escaped_text,_("%")     )==0) snprintf(query, 1024, "(id in (select imgid from color_labels where color IS NOT NULL))");
     }
     break;
 
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
darktable-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/darktable-devel

Reply via email to