diff --git a/src/core/keybindings.c b/src/core/keybindings.c index c98d49af1..9963d1d85 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -2111,7 +2111,7 @@ handle_activate_window_menu (MetaDisplay *display, meta_window_get_client_area_rect (display->focus_window, &child_rect); x = frame_rect.x + child_rect.x; - if (meta_get_locale_direction () == META_LOCALE_DIRECTION_RTL) + if (clutter_get_text_direction () == CLUTTER_TEXT_DIRECTION_RTL) x += child_rect.width; y = frame_rect.y + child_rect.y; diff --git a/src/core/place.c b/src/core/place.c index 01b0bd34d..d420479b5 100644 --- a/src/core/place.c +++ b/src/core/place.c @@ -133,7 +133,7 @@ find_next_cascade (MetaWindow *window, int cascade_stage; MtkRectangle work_area; MetaLogicalMonitor *current; - gboolean ltr = meta_get_locale_direction () == META_LOCALE_DIRECTION_LTR; + gboolean ltr = clutter_get_text_direction () == CLUTTER_TEXT_DIRECTION_LTR; /* This is a "fuzzy" cascade algorithm. * For each window in the list, we find where we'd cascade a @@ -541,7 +541,7 @@ center_tile_rect_in_area (MtkRectangle *rect, */ fluff = (work_area->width % (rect->width + 1)) / 2; - if (meta_get_locale_direction () == META_LOCALE_DIRECTION_LTR) + if (clutter_get_text_direction () == CLUTTER_TEXT_DIRECTION_LTR) rect->x = work_area->x + fluff; else rect->x = work_area->x + work_area->width - rect->width - fluff; @@ -580,7 +580,7 @@ find_first_fit (MetaWindow *window, GList *tmp; MtkRectangle rect; MtkRectangle work_area; - gboolean ltr = meta_get_locale_direction () == META_LOCALE_DIRECTION_LTR; + gboolean ltr = clutter_get_text_direction () == CLUTTER_TEXT_DIRECTION_LTR; retval = FALSE; diff --git a/src/core/prefs.c b/src/core/prefs.c index dbbe72b29..fc4d4c10f 100644 --- a/src/core/prefs.c +++ b/src/core/prefs.c @@ -1420,7 +1420,7 @@ button_layout_handler (GVariant *value, g_strfreev (sides); /* Invert the button layout for RTL languages */ - if (meta_get_locale_direction() == META_LOCALE_DIRECTION_RTL) + if (clutter_get_text_direction() == CLUTTER_TEXT_DIRECTION_RTL) { MetaButtonLayout rtl_layout; int j; diff --git a/src/core/util.c b/src/core/util.c index f8a08c747..343668a39 100644 --- a/src/core/util.c +++ b/src/core/util.c @@ -512,21 +512,6 @@ meta_external_binding_name_for_action (guint keybinding_action) return g_strdup_printf ("external-grab-%u", keybinding_action); } -MetaLocaleDirection -meta_get_locale_direction (void) -{ - switch (clutter_get_text_direction ()) - { - case CLUTTER_TEXT_DIRECTION_LTR: - return META_LOCALE_DIRECTION_LTR; - case CLUTTER_TEXT_DIRECTION_RTL: - return META_LOCALE_DIRECTION_RTL; - default: - g_assert_not_reached (); - return 0; - } -} - char * meta_generate_random_id (GRand *rand, int length) diff --git a/src/core/workspace.c b/src/core/workspace.c index 8a8c7b6fa..1e2717221 100644 --- a/src/core/workspace.c +++ b/src/core/workspace.c @@ -625,7 +625,7 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace, meta_workspace_manager_calc_workspace_layout (workspace->manager, num_workspaces, new_space, &layout2); - if (meta_get_locale_direction () == META_LOCALE_DIRECTION_RTL) + if (clutter_get_text_direction () == CLUTTER_TEXT_DIRECTION_RTL) { if (layout1.current_col > layout2.current_col) direction = META_MOTION_RIGHT; @@ -1264,7 +1264,7 @@ meta_workspace_get_neighbor (MetaWorkspace *workspace, meta_verbose ("Getting neighbor of %d in direction %s", current_space, meta_motion_direction_to_string (direction)); - ltr = (meta_get_locale_direction () == META_LOCALE_DIRECTION_LTR); + ltr = (clutter_get_text_direction () == CLUTTER_TEXT_DIRECTION_LTR); switch (direction) { diff --git a/src/meta/util.h b/src/meta/util.h index a502b6a9a..f3b053161 100644 --- a/src/meta/util.h +++ b/src/meta/util.h @@ -93,15 +93,6 @@ char* meta_external_binding_name_for_action (guint keybinding_action); META_EXPORT char* meta_g_utf8_strndup (const gchar *src, gsize n); -typedef enum -{ - META_LOCALE_DIRECTION_LTR, - META_LOCALE_DIRECTION_RTL, -} MetaLocaleDirection; - -META_EXPORT -MetaLocaleDirection meta_get_locale_direction (void); - META_EXPORT void meta_add_clutter_debug_flags (ClutterDebugFlag debug_flags, ClutterDrawDebugFlag draw_flags,