[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 106/473: Sort all matches in names above matches in executables.
noreply at xfce.org
noreply at xfce.org
Mon Feb 16 23:54:36 CET 2015
This is an automated email from the git hooks/post-receive script.
gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit d9b9e0baf2c05b6c452dccf451a66e2511dc1850
Author: Graeme Gott <graeme at gottcode.org>
Date: Sun Jul 14 14:50:28 2013 -0400
Sort all matches in names above matches in executables.
---
src/launcher.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/launcher.cpp b/src/launcher.cpp
index a6f7a91..74beebc 100644
--- a/src/launcher.cpp
+++ b/src/launcher.cpp
@@ -273,6 +273,11 @@ int Launcher::search(const Query& query) const
if (match == INT_MAX)
{
match = query.match(m_search_command);
+ if (match != INT_MAX)
+ {
+ // Sort matches in executables after matches in names
+ match += 10;
+ }
}
if ((match == INT_MAX) && f_show_description)
{
@@ -280,7 +285,7 @@ int Launcher::search(const Query& query) const
if (match != INT_MAX)
{
// Sort matches in comments after matches in names
- match += 10;
+ match += 20;
}
}
return match;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list