Edje entry: Replaced style_user_set/get with push/pop/peek.
authorTom Hacohen <tom@stosb.com>
Wed, 7 Mar 2012 14:03:43 +0000 (14:03 +0000)
committerTom Hacohen <tom@stosb.com>
Wed, 7 Mar 2012 14:03:43 +0000 (14:03 +0000)
SVN revision: 68955

legacy/edje/ChangeLog
legacy/edje/src/lib/Edje.h
legacy/edje/src/lib/edje_util.c

index 3dfcc76..f31d28e 100644 (file)
        * Entry: Added double click and triple click.
        Double click selects a word.
        Triple click selects a line.
+
+2012-03-07  Tom Hacohen (TAsn)
+
+       * Entry: Replaced edje_object_part_text_style_user_set/get 
+       with edje_object_part_text_style_user_set/get to correspond to
+       textblock's recent changes.
index 107a19e..45a6461 100644 (file)
@@ -2481,7 +2481,7 @@ EAPI const char  *edje_object_part_text_get           (const Evas_Object *obj, c
  *
  * @since 1.2.0
  */
-EAPI void edje_object_part_text_style_user_set(Evas_Object *obj, const char *part, const char *style);
+EAPI void edje_object_part_text_style_user_push(Evas_Object *obj, const char *part, const char *style);
 
 /**
  * @brief Return the text of the object part.
@@ -2495,7 +2495,17 @@ EAPI void edje_object_part_text_style_user_set(Evas_Object *obj, const char *par
  *
  * @since 1.2.0
  */
-EAPI const char *edje_object_part_text_style_user_get(Evas_Object *obj, const char *part);
+EAPI const char *edje_object_part_text_style_user_peek(const Evas_Object *obj, const char *part);
+
+/**
+ * @brief Delete the top style form the user style stack.
+ *
+ * @param obj A valid Evas_Object handle
+ * @param part The part name
+ *
+ * @since 1.2.0
+ */
+EAPI void edje_object_part_text_style_user_pop(Evas_Object *obj, const char *part);
 
 /**
  * @brief Sets the raw (non escaped) text for an object part.
index f844e78..31183e1 100644 (file)
@@ -1059,7 +1059,7 @@ _edje_object_part_text_raw_append(Evas_Object *obj, Edje_Real_Part *rp, const ch
 }
 
 EAPI void
-edje_object_part_text_style_user_set(Evas_Object *obj, const char *part,
+edje_object_part_text_style_user_push(Evas_Object *obj, const char *part,
                                 const char *style)
 {
    Edje *ed;
@@ -1074,12 +1074,27 @@ edje_object_part_text_style_user_set(Evas_Object *obj, const char *part,
 
    ts = evas_textblock_style_new();
    evas_textblock_style_set(ts, style);
-   evas_object_textblock_style_user_set(rp->object, ts);
+   evas_object_textblock_style_user_push(rp->object, ts);
    evas_textblock_style_free(ts);
 }
 
+EAPI void
+edje_object_part_text_style_user_pop(Evas_Object *obj, const char *part)
+{
+   Edje *ed;
+   Edje_Real_Part *rp;
+
+   ed = _edje_fetch(obj);
+   if ((!ed) || (!part)) return;
+   rp = _edje_real_part_recursive_get(ed, part);
+   if (!rp) return;
+   if (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) return;
+
+   evas_object_textblock_style_user_pop(rp->object);
+}
+
 EAPI const char *
-edje_object_part_text_style_user_get(Evas_Object *obj, const char *part)
+edje_object_part_text_style_user_peek(const Evas_Object *obj, const char *part)
 {
    Edje *ed;
    Edje_Real_Part *rp;
@@ -1091,7 +1106,7 @@ edje_object_part_text_style_user_get(Evas_Object *obj, const char *part)
    if (!rp) return NULL;
    if (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) return NULL;
 
-   ts = evas_object_textblock_style_user_get(rp->object);
+   ts = evas_object_textblock_style_user_peek(rp->object);
    if (ts)
       return evas_textblock_style_get(ts);
    else