{
if (sd->editable)
{
- elm_box_unpack(sd->box, sd->entry);
evas_object_hide(sd->entry);
+ elm_box_unpack(sd->box, sd->entry);
}
elm_box_pack_end(sd->box, sd->guide);
}
else if (!strlen(text) && _label_packed(obj))
{
- elm_box_unpack(sd->box, sd->label);
evas_object_hide(sd->label);
+ elm_box_unpack(sd->box, sd->label);
}
// ACCESS
}
else
{
- elm_box_unpack(sd->box, VIEW(last_it));
evas_object_hide(VIEW(last_it));
+ elm_box_unpack(sd->box, VIEW(last_it));
}
}
elm_box_unpack(sd->box, VIEW(it));
else
{
- elm_box_unpack(sd->box, VIEW(last_it));
evas_object_hide(VIEW(last_it));
+ elm_box_unpack(sd->box, VIEW(last_it));
}
}
if (sd->editable)
{
- elm_box_unpack(sd->box, sd->entry);
evas_object_hide(sd->entry);
+ elm_box_unpack(sd->box, sd->entry);
}
}
else
{
if (child != sd->label)
{
- elm_box_unpack(sd->box, child);
evas_object_hide(child);
+ elm_box_unpack(sd->box, child);
}
}
linew += mnw;
if (linew > (w * (2 / 3)))
{
- elm_object_focus_set(sd->entry, EINA_FALSE);
evas_object_hide(sd->entry);
elm_box_unpack(sd->box, sd->entry);
sd->expanded_state = EINA_FALSE;
{
if (child != sd->label)
{
- elm_box_unpack(sd->box, child);
evas_object_hide(child);
+ elm_box_unpack(sd->box, child);
}
}
{
if (sd->editable)
{
- elm_box_unpack(sd->box, sd->entry);
evas_object_hide(sd->entry);
+ elm_box_unpack(sd->box, sd->entry);
}
elm_box_pack_end(sd->box, sd->guide);
free(str);
}
+// handles semicolon, comma (before inserting them to the entry)
+static void
+_entry_filter(void *data,
+ Evas_Object *entry,
+ char **text)
+{
+ char *str;
+
+ ELM_MULTIBUTTONENTRY_DATA_GET(data, sd);
+
+ if (!*text || !strlen(*text)) return;
+
+ // cancels item_be_selected when text inserting is started
+ if (strcmp(*text, ";") && strcmp(*text, ","))
+ {
+ sd->item_be_selected = EINA_FALSE;
+ return;
+ }
+
+ str = elm_entry_markup_to_utf8(elm_object_text_get(entry));
+ if (strlen(str))
+ {
+ Elm_Multibuttonentry_Item *it;
+
+ it = _item_new(data, str, NULL, NULL);
+ if (!it)
+ {
+ free(str);
+ return;
+ }
+
+ sd->items = eina_list_append(sd->items, it);
+#ifdef _VI_EFFECT
+ _item_adding_effect_add(data, it);
+#else
+ elm_box_pack_before(sd->box, VIEW(it), entry);
+ evas_object_show(VIEW(it));
+ evas_object_smart_callback_call(data, SIG_ITEM_ADDED, it);
+#endif
+
+ elm_object_text_set(entry, "");
+ }
+ free(str);
+
+ free(*text);
+ *text = NULL;
+}
+
// handles enter key
static void
_on_entry_key_down(void *data,
if (sd->guide && _guide_packed(obj))
{
- elm_box_unpack(sd->box, sd->guide);
evas_object_hide(sd->guide);
+ elm_box_unpack(sd->box, sd->guide);
if (sd->editable)
{
{
if (sd->editable)
{
- elm_box_unpack(sd->box, sd->entry);
evas_object_hide(sd->entry);
+ elm_box_unpack(sd->box, sd->entry);
}
elm_box_pack_end(sd->box, sd->guide);
(priv->entry, EVAS_CALLBACK_KEY_DOWN, _on_entry_key_down, obj);
evas_object_smart_callback_add
(priv->entry, "unfocused", _on_entry_unfocused, obj);
+ elm_entry_markup_filter_append(priv->entry, _entry_filter, obj);
elm_box_pack_end(priv->box, priv->entry);
evas_object_show(priv->entry);
// if guide text was shown, hide it
if (sd->guide && _guide_packed(obj))
{
- elm_box_unpack(sd->box, sd->guide);
evas_object_hide(sd->guide);
+ elm_box_unpack(sd->box, sd->guide);
if (sd->editable)
{
// if guide text was shown, hide it
if (sd->guide && _guide_packed(obj))
{
- elm_box_unpack(sd->box, sd->guide);
evas_object_hide(sd->guide);
+ elm_box_unpack(sd->box, sd->guide);
if (sd->editable)
{