Attached are two one-line patches that changes the order of the tags in the
lighttable tagging window.
The current order in the top pane is the just the retrieval order while in the
bottom pane the order is by tag id - which is pretty useless from a user's
perspective. These patches change the order to be sorted by name.
BTW: If this is not the best way to publish patches (large or small), could
some *please* list the git commands that I should use.
I have yet to come to terms with git - there is a bewildering number of
commands and options. If this is already on a web page somewhere - with the
git commands included - a link to it would be appreciated.
This request is not born out of laziness but the desire not to pollute or
damage the dt repository in any way.
diff --git a/src/common/tags.c b/src/common/tags.c
index a009205..3164b92 100644
--- a/src/common/tags.c
+++ b/src/common/tags.c
@@ -298,7 +298,8 @@ uint32_t dt_tag_get_attached(gint imgid,GList **result)
snprintf(query, sizeof(query),
"SELECT DISTINCT T.id, T.name FROM tagged_images "
"JOIN tags T on T.id = tagged_images.tagid "
- "WHERE tagged_images.imgid = %d", imgid);
+ "WHERE tagged_images.imgid = %d "
+ "ORDER BY T.name", imgid);
DT_DEBUG_SQLITE3_PREPARE_V2(dt_database_get(darktable.db), query, -1,
&stmt, NULL);
}
@@ -484,7 +485,7 @@ uint32_t dt_tag_get_suggestions(const gchar *keyword, GList **result)
"SELECT T.name, T.id, MT.count FROM tags T JOIN memory.taglist MT ON "
"MT.id = T.id WHERE T.id in "
"(SELECT DISTINCT(MT.id) FROM memory.taglist MT) "
- "AND T.name NOT LIKE 'darktable|%%' ORDER BY T.id ASC",
+ "AND T.name NOT LIKE 'darktable|%%' ORDER BY T.name ASC",
-1, &stmt, NULL);
/* ... and create the result list to send upwards */
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
darktable-devel mailing list
darktable-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/darktable-devel