[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 63/473: Fix RTL alignment of menu items in LTR locales.
noreply at xfce.org
noreply at xfce.org
Mon Feb 16 23:53:53 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 c410ea351102187ed365b3c10e2a3e706a9f0095
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 6389f63..5779384 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,9 +140,7 @@ 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);
// Create search text
gchar* normalized = g_utf8_normalize(details, -1, G_NORMALIZE_DEFAULT);
@@ -152,9 +151,7 @@ Launcher::Launcher(GarconMenuItem* item) :
}
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);
}
// Create search text
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list