Dear developers.
I'd made a small patch of elm_entry.
It's not a special code itself, however it modify some important policy of
elm_entry.
Current elm_entry only supports content sets to internal scroller's edc.
However it can't be used if scrollable is not set.
I think it's definitely a bug. So I modify to support that situation.
In this patch, if scrollable is not set then a user can content_set to
elm_entry's edc.
If only care about functionality, it's good to exploit elm_entry's edc and
internal scroller's edc.
But it's a definitely redundancy. And I'd talked with Woohyun, his either
doesn't like this idea.
I also agree with it. Eventually one of edc should be choose.
I'm prefer elm_entry's edc. Does any want to change about this?
Thank you.
Index: elementary/src/lib/elm_entry.c
===================================================================
--- elementary/src/lib/elm_entry.c (由щ퉬�쟾 64251)
+++ elementary/src/lib/elm_entry.c (�옉�뾽 �궗蹂�)
@@ -780,21 +780,27 @@
Evas_Object *edje;
if ((!wd) || (!content)) return;
- edje = elm_smart_scroller_edje_object_get(wd->scroller);
- if (!strcmp(part, "elm.swallow.icon"))
+ if (wd->scroll)
{
- if (wd->icon)
- evas_object_del(wd->icon);
- wd->icon = content;
- edje_object_signal_emit(edje, "elm,action,show,icon", "elm");
+ edje = elm_smart_scroller_edje_object_get(wd->scroller);
+ if (!strcmp(part, "elm.swallow.icon"))
+ {
+ if (wd->icon)
+ evas_object_del(wd->icon);
+ wd->icon = content;
+ edje_object_signal_emit(edje, "elm,action,show,icon", "elm");
+ }
+ else if (!strcmp(part, "elm.swallow.end"))
+ {
+ if (wd->end)
+ evas_object_del(wd->end);
+ wd->end = content;
+ edje_object_signal_emit(edje, "elm,action,show,end", "elm");
+ }
}
- else if (!strcmp(part, "elm.swallow.end"))
- {
- if (wd->end)
- evas_object_del(wd->end);
- wd->end = content;
- edje_object_signal_emit(edje, "elm,action,show,end", "elm");
- }
+ else
+ edje = wd->ent;
+
evas_event_freeze(evas_object_evas_get(obj));
elm_widget_sub_object_add(obj, content);
edje_object_part_swallow(edje, part, content);
@@ -810,17 +816,22 @@
Evas_Object *content, *edje;
if (!wd) return NULL;
- edje = elm_smart_scroller_edje_object_get(wd->scroller);
- if (!strcmp(part, "elm.swallow.icon"))
+ if (wd->scroll)
{
- wd->icon = NULL;
- edje_object_signal_emit(edje, "elm,action,hide,icon", "elm");
+ edje = elm_smart_scroller_edje_object_get(wd->scroller);
+ if (!strcmp(part, "elm.swallow.icon"))
+ {
+ wd->icon = NULL;
+ edje_object_signal_emit(edje, "elm,action,hide,icon", "elm");
+ }
+ else if (!strcmp(part, "elm.swallow.end"))
+ {
+ wd->end = NULL;
+ edje_object_signal_emit(edje, "elm,action,hide,end", "elm");
+ }
}
- else if (!strcmp(part, "elm.swallow.end"))
- {
- wd->end = NULL;
- edje_object_signal_emit(edje, "elm,action,hide,end", "elm");
- }
+ else
+ edje = wd->ent;
content = edje_object_part_swallow_get(edje, part);
edje_object_part_swallow(edje, part, NULL);
@@ -842,12 +853,18 @@
Evas_Object *content = NULL, *edje;
if (!wd) return NULL;
- if (!strcmp(part, "elm.swallow.icon"))
- return wd->icon;
- if (!strcmp(part, "elm.swallow.end"))
- return wd->end;
+ if (wd->scroll)
+ {
+ if (!strcmp(part, "elm.swallow.icon"))
+ return wd->icon;
+ if (!strcmp(part, "elm.swallow.end"))
+ return wd->end;
- edje = elm_smart_scroller_edje_object_get(wd->scroller);
+ edje = elm_smart_scroller_edje_object_get(wd->scroller);
+ }
+ else
+ edje = wd->ent;
+
if (edje)
content = edje_object_part_swallow_get(edje, part);
return content;
@@ -2051,11 +2068,16 @@
{
int len = 0;
ELM_CHECK_WIDTYPE(obj, widtype);
- if (item && strcmp(item, "default")) return;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
evas_event_freeze(evas_object_evas_get(obj));
if (!entry) entry = "";
+ if (item && strcmp(item, "default"))
+ {
+ edje_object_part_text_set(wd->ent, item, entry);
+ return;
+ }
+
if (wd->text) eina_stringshare_del(wd->text);
wd->text = NULL;
wd->changed = EINA_TRUE;
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel