diff options
author | Yair Hershkovitz <yairhr@yahoo.com> | 2007-05-25 14:36:12 +0000 |
---|---|---|
committer | Thomas James Alexander Thurman <tthurman@src.gnome.org> | 2007-05-25 14:36:12 +0000 |
commit | 5194df842c06269c1ae690368384f7759c842b32 (patch) | |
tree | 0810dc4cd42335158bb5afb6d1a9d31759df4bd0 /src/workspace.c | |
parent | a7053d3d479637c49aab3b6c9f5142627ed60e5a (diff) | |
download | metacity-5194df842c06269c1ae690368384f7759c842b32.tar.gz |
Add support for RTL languages so that alt-tab, etc., go the other way. In
2007-05-25 Yair Hershkovitz <yairhr@yahoo.com>
* src/workspace.c (meta_workspace_get_neighbor): Add support
for RTL languages so that alt-tab, etc., go the other way.
* src/keybindings.c (handle_activate_menu): In RTL locales,
pop up the menu on the right-hand side when the menu keystroke
is pressed.
* src/fixedtip.c (meta_fixed_tip_show): right-justify tooltips
in RTL locales.
* src/menu.c (popup_position_func): popup menus in RTL locales
are flush with the right-hand side of the window where possible.
* src/frames.c (show_tip_now, meta_frames_button_press_event):
tooltips are aligned with the right-hand side of buttons in
RTL locales.
* src/ui.[ch] (meta_ui_get_direction, enum MetaUIDirection):
New content.
* src/window.c (meta_window_show_menu): "move left" appears above
"move right" in the window menu for LTR locales, and vice versa
for RTL locales.
This is all to close bug #387893.
svn path=/trunk/; revision=3222
Diffstat (limited to 'src/workspace.c')
-rw-r--r-- | src/workspace.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/workspace.c b/src/workspace.c index d11fcecd..bd131d72 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -721,6 +721,7 @@ meta_workspace_get_neighbor (MetaWorkspace *workspace, { MetaWorkspaceLayout layout; int i, current_space, num_workspaces; + gboolean ltr; current_space = meta_workspace_index (workspace); num_workspaces = meta_screen_get_n_workspaces (workspace->screen); @@ -730,13 +731,15 @@ meta_workspace_get_neighbor (MetaWorkspace *workspace, meta_verbose ("Getting neighbor of %d in direction %s\n", current_space, meta_motion_direction_to_string (direction)); + ltr = meta_ui_get_direction() == META_UI_DIRECTION_LTR; + switch (direction) { case META_MOTION_LEFT: - layout.current_col -= 1; + layout.current_col -= ltr ? 1 : -1; break; case META_MOTION_RIGHT: - layout.current_col += 1; + layout.current_col += ltr ? 1 : -1; break; case META_MOTION_UP: layout.current_row -= 1; |