1
0
Fork 0

Remove clutter_set_default_text_direction()

Setting the default text direction programmatically is wrong: it is a
value dependent on the locale or by the environment.
This commit is contained in:
Emmanuele Bassi 2009-12-07 19:00:55 +00:00
parent 3b9575baf8
commit 28cb2cdab5
4 changed files with 16 additions and 21 deletions

View file

@ -9448,7 +9448,8 @@ clutter_actor_set_text_direction (ClutterActor *self,
* Retrieves the value set using clutter_actor_set_text_direction()
*
* If no text direction has been previously set, the default text
* direction will be returned
* direction, as returned by clutter_get_default_text_direction(), will
* be returned instead
*
* Return value: the #ClutterTextDirection for the actor
*

View file

@ -3090,24 +3090,20 @@ clutter_check_version (guint major,
clutter_micro_version >= micro));
}
void
clutter_set_default_text_direction (ClutterTextDirection text_dir)
{
ClutterStageManager *manager;
const GSList *stages, *l;
if (text_dir == CLUTTER_TEXT_DIRECTION_DEFAULT)
text_dir = clutter_get_text_direction ();
if (text_dir != clutter_text_direction)
clutter_text_direction = text_dir;
manager = clutter_stage_manager_get_default ();
stages = clutter_stage_manager_peek_stages (manager);
for (l = stages; l != NULL; l = l->next)
clutter_actor_queue_relayout (l->data);
}
/**
* clutter_get_default_text_direction:
*
* Retrieves the default direction for the text. The text direction is
* determined by the locale and/or by the %CLUTTER_TEXT_DIRECTION environment
* variable
*
* The default text direction can be overridden on a per-actor basis by using
* clutter_actor_set_text_direction()
*
* Return value: the default text direction
*
* Since: 1.2
*/
ClutterTextDirection
clutter_get_default_text_direction (void)
{

View file

@ -164,7 +164,6 @@ void clutter_ungrab_pointer_for_device (gint id);
PangoFontMap * clutter_get_font_map (void);
void clutter_set_default_text_direction (ClutterTextDirection text_dir);
ClutterTextDirection clutter_get_default_text_direction (void);
G_END_DECLS

View file

@ -1017,7 +1017,6 @@ clutter_set_font_flags
clutter_get_font_flags
clutter_get_font_map
ClutterTextDirection
clutter_set_default_text_direction
clutter_get_default_text_direction
<SUBSECTION>