Fix atk_image_get_image_locale for elm_bg
authorAgnieszka Janowicz <a.janowicz@partner.samsung.com>
Wed, 6 Nov 2013 12:21:52 +0000 (13:21 +0100)
committerAgnieszka Janowicz <a.janowicz@partner.samsung.com>
Tue, 12 Nov 2013 07:17:58 +0000 (08:17 +0100)
eail/eail/eail_background.c

index 476c64b..1608d0c 100644 (file)
@@ -53,6 +53,8 @@ static gboolean eail_background_set_image_description(AtkImage *image,
 static void eail_background_get_image_size(AtkImage *image,
                                            gint *width,
                                            gint *height);
+const gchar *eail_background_get_image_locale(AtkImage *image);
+
 
 /*
  * Implementation of the *AtkObject* interface
@@ -204,6 +206,7 @@ atk_image_interface_init(AtkImageIface *iface)
    iface->set_image_description = eail_background_set_image_description;
    iface->get_image_size = eail_background_get_image_size;
    iface->get_image_position = eail_background_get_image_position;
+   iface->get_image_locale = eail_background_get_image_locale;
 }
 
 /**
@@ -299,3 +302,18 @@ eail_background_get_image_size(AtkImage *image,
 
    evas_object_geometry_get(widget, NULL, NULL, width, height);
 }
+
+/**
+ * @brief Gets background's locale (LC_MESSAGES variable)
+ *
+ * @param image AtkImage instance
+ * @return string corresponding to the POSIX LC_MESSAGES
+ * locale used by the image description, or NULL if
+ * the image does not specify a locale
+ *
+ */
+const gchar *
+eail_background_get_image_locale(AtkImage *image)
+{
+    return setlocale(LC_MESSAGES, NULL);
+}