← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~ted/appmenu-gtk/text-direction into lp:appmenu-gtk

 

Ted Gould has proposed merging lp:~ted/appmenu-gtk/text-direction into lp:appmenu-gtk.

Requested reviews:
  Canonical Desktop Experience Team (canonical-dx-team)

For more details, see:
https://code.launchpad.net/~ted/appmenu-gtk/text-direction/+merge/51647

If GTK has a set text direction we should use that instead of the dbusmenu one.
-- 
https://code.launchpad.net/~ted/appmenu-gtk/text-direction/+merge/51647
Your team ayatana-commits is subscribed to branch lp:appmenu-gtk.
=== modified file 'configure.ac'
--- configure.ac	2011-02-11 15:11:35 +0000
+++ configure.ac	2011-02-28 22:51:14 +0000
@@ -1,6 +1,6 @@
 AC_PREREQ(2.59)
 
-AC_INIT([appmenu-gtk], [0.1.93], [crussell@xxxxxxxxxxxxx])
+AC_INIT([appmenu-gtk], [0.1.94], [crussell@xxxxxxxxxxxxx])
 AC_COPYRIGHT([Copyright 2010 Canonical])
 AC_CONFIG_SRCDIR([src/bridge.c])
 AC_CONFIG_MACRO_DIR([build/autotools])
@@ -25,7 +25,7 @@
 ###########################
 
 GTK_REQUIRED_VERSION=2.18
-DBUSMENU_REQUIRED_VERSION=0.3.94
+DBUSMENU_REQUIRED_VERSION=0.3.99
 
 PKG_CHECK_MODULES(APPMENU, gtk+-2.0 >= $GTK_REQUIRED_VERSION
                            dbusmenu-gtk-0.4 >= $DBUSMENU_REQUIRED_VERSION)

=== modified file 'src/bridge.c'
--- src/bridge.c	2011-02-11 13:59:10 +0000
+++ src/bridge.c	2011-02-28 22:51:14 +0000
@@ -626,9 +626,15 @@
   if (!context->path)
     context->path = g_strdup_printf ("/com/canonical/menu/%X", (guint)xid);
 
-  if (!context->server)
+  if (!context->server) {
     context->server = dbusmenu_server_new (context->path);
 
+    GtkTextDirection dir = gtk_widget_get_default_direction();
+    if (dir != GTK_TEXT_DIR_NONE) {
+      dbusmenu_server_set_text_direction(context->server, dir == GTK_TEXT_DIR_LTR ? DBUSMENU_TEXT_DIRECTION_LTR : DBUSMENU_TEXT_DIRECTION_RTL);
+    }
+  }
+
   DbusmenuMenuitem * mi = find_menu_bar(toplevel);
   dbusmenu_server_set_root(context->server, mi);
   if (mi != NULL) {


Follow ups