[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 07/37: Fix not searching descriptions.

noreply at xfce.org noreply at xfce.org
Sat Aug 20 18:35:51 CEST 2016


This is an automated email from the git hooks/post-receive script.

gottcode pushed a commit to annotated tag v1.5.1
in repository panel-plugins/xfce4-whiskermenu-plugin.

commit 10b9f0c04267cf4e9352d0130329db7cee960a3f
Author: Graeme Gott <graeme at gottcode.org>
Date:   Mon Jun 15 15:17:00 2015 -0400

    Fix not searching descriptions.
---
 panel-plugin/launcher.cpp | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/panel-plugin/launcher.cpp b/panel-plugin/launcher.cpp
index 581bfc2..58899ef 100644
--- a/panel-plugin/launcher.cpp
+++ b/panel-plugin/launcher.cpp
@@ -149,20 +149,18 @@ Launcher::Launcher(GarconMenuItem* item) :
 		generic_name = "";
 	}
 
+	const gchar* details = garcon_menu_item_get_comment(m_item);
+	if (!details || !g_utf8_validate(details, -1, NULL))
+	{
+		details = generic_name;
+	}
+
 	// Create display text
 	const gchar* direction = (gtk_widget_get_default_direction() != GTK_TEXT_DIR_RTL) ? "\342\200\216" : "\342\200\217";
 	m_display_name = (wm_settings->launcher_show_name || exo_str_is_empty(generic_name)) ? name : generic_name;
 	if (wm_settings->launcher_show_description)
 	{
-		const gchar* details = garcon_menu_item_get_comment(m_item);
-		if (!details || !g_utf8_validate(details, -1, NULL))
-		{
-			details = generic_name;
-		}
 		set_text(g_markup_printf_escaped("%s<b>%s</b>\n%s%s", direction, m_display_name, direction, details));
-
-		// Create search text for comment
-		m_search_comment = normalize(details);
 	}
 	else
 	{
@@ -171,6 +169,7 @@ Launcher::Launcher(GarconMenuItem* item) :
 
 	// Create search text for display name
 	m_search_name = normalize(m_display_name);
+	m_search_comment = normalize(details);
 
 	// Create search text for command
 	const gchar* command = garcon_menu_item_get_command(m_item);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list