[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 03/08: Fix RTL alignment of menu items in LTR locales.

noreply at xfce.org noreply at xfce.org
Sat Aug 20 18:33:38 CEST 2016


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

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

commit 60ae957667e352d45a9a50f98005a00e800e5b53
Author: Graeme Gott <graeme at gottcode.org>
Date:   Thu Jul 4 06:56:21 2013 -0400

    Fix RTL alignment of menu items in LTR locales.
---
 src/launcher.cpp | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/launcher.cpp b/src/launcher.cpp
index 299cb1a..ad6856c 100644
--- a/src/launcher.cpp
+++ b/src/launcher.cpp
@@ -131,6 +131,7 @@ Launcher::Launcher(GarconMenuItem* item) :
 	}
 
 	// Create display text
+	const gchar* direction = (gtk_widget_get_default_direction() != GTK_TEXT_DIR_RTL) ? "\342\200\216" : "\342\200\217";
 	const gchar* display_name = (f_show_name || exo_str_is_empty(generic_name)) ? name : generic_name;
 	if (f_show_description)
 	{
@@ -139,15 +140,11 @@ Launcher::Launcher(GarconMenuItem* item) :
 		{
 			details = generic_name;
 		}
-		m_text = g_markup_printf_escaped(
-				(gtk_widget_get_default_direction() != GTK_TEXT_DIR_RTL) ? "<b>%s</b>\n%s" : "\342\200\217<b>%s</b>\n\342\200\217%s",
-				display_name, details);
+		m_text = g_markup_printf_escaped("%s<b>%s</b>\n%s%s", direction, display_name, direction, details);
 	}
 	else
 	{
-		m_text = g_markup_printf_escaped(
-				(gtk_widget_get_default_direction() != GTK_TEXT_DIR_RTL) ? "%s" : "\342\200\217%s",
-				display_name);
+		m_text = g_markup_printf_escaped("%s%s", direction, display_name);
 	}
 }
 

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


More information about the Xfce4-commits mailing list