[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 01/01: Show name as description when showing generic names.

noreply at xfce.org noreply at xfce.org
Fri Feb 20 16:00:02 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 1f64cccc698dbf587957f9f9493b74262bf81097
Author: Graeme Gott <graeme at gottcode.org>
Date:   Fri Feb 20 09:41:11 2015 -0500

    Show name as description when showing generic names.
---
 panel-plugin/launcher.cpp |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/launcher.cpp b/panel-plugin/launcher.cpp
index 7ada6b3..f741b59 100644
--- a/panel-plugin/launcher.cpp
+++ b/panel-plugin/launcher.cpp
@@ -149,13 +149,18 @@ Launcher::Launcher(GarconMenuItem* item) :
 		generic_name = "";
 	}
 
+	if (!wm_settings->launcher_show_name && !exo_str_is_empty(generic_name))
+	{
+		std::swap(name, generic_name);
+	}
+	m_display_name = 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))
+		if (!wm_settings->launcher_show_name || !details || !g_utf8_validate(details, -1, NULL))
 		{
 			details = generic_name;
 		}
@@ -171,7 +176,7 @@ Launcher::Launcher(GarconMenuItem* item) :
 
 	// Create search text for display name
 	m_search_name = normalize(m_display_name);
-	m_search_generic_name = normalize((m_display_name == name) ? generic_name : name);
+	m_search_generic_name = normalize(generic_name);
 
 	// 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