Evas_Textblock_Cursor *cur;
Eina_Bool ret;
if (!wd) return EINA_TRUE;
+
+#if 0
/* It's a hack until we get the support suggested above.
* We just create a cursor, point it to the begining, and then
* try to advance it, if it can advance, the tb is not empty,
evas_textblock_cursor_free(cur);
return !ret;
+#endif
+
+ char *str = elm_entry_markup_to_utf8(elm_entry_entry_get(obj));
+ if (!str) return EINA_TRUE;
+
+ ret = (strlen(str) == 0);
+
+ return ret;
}
/**
{
if (!ext_mod->password)
{
- elm_ctxpopup_item_append(ext_mod->popup, "Select", NULL, _select, obj );
- elm_ctxpopup_item_append(ext_mod->popup, "Select All", NULL, _select_all, obj );
+ if (!elm_entry_is_empty(obj))
+ {
+ elm_ctxpopup_item_append(ext_mod->popup, "Select", NULL, _select, obj );
+ elm_ctxpopup_item_append(ext_mod->popup, "Select All", NULL, _select_all, obj );
+ }
}
if (1) // need way to detect if someone has a selection
{
else
{
_cancel(obj,ext_mod->popup,NULL);
- elm_ctxpopup_item_append(ext_mod->popup, "Select", NULL, _select, obj );
- elm_ctxpopup_item_append(ext_mod->popup, "Select All", NULL, _select_all, obj );
+ if (!elm_entry_is_empty(obj))
+ {
+ elm_ctxpopup_item_append(ext_mod->popup, "Select", NULL, _select, obj );
+ elm_ctxpopup_item_append(ext_mod->popup, "Select All", NULL, _select_all, obj );
+ }
if (1) // need way to detect if someone has a selection
{
if (ext_mod->editable)
{
if (!ext_mod->password)
{
- elm_ctxpopup_item_append(ext_mod->popup, "Select", NULL, _select, obj );
- elm_ctxpopup_item_append(ext_mod->popup, "Select All", NULL, _select_all, obj );
+ if (!elm_entry_is_empty(obj))
+ {
+ elm_ctxpopup_item_append(ext_mod->popup, "Select", NULL, _select, obj );
+ elm_ctxpopup_item_append(ext_mod->popup, "Select All", NULL, _select_all, obj );
+ }
}
if (1) // need way to detect if someone has a selection
{
else
{
_cancel(obj,ext_mod->popup,NULL);
- elm_ctxpopup_item_append(ext_mod->popup, "Select", NULL, _select, obj );
- elm_ctxpopup_item_append(ext_mod->popup, "Select All", NULL, _select_all, obj );
+ if (!elm_entry_is_empty(obj))
+ {
+ elm_ctxpopup_item_append(ext_mod->popup, "Select", NULL, _select, obj );
+ elm_ctxpopup_item_append(ext_mod->popup, "Select All", NULL, _select_all, obj );
+ }
if (1) // need way to detect if someone has a selection
{
if (ext_mod->editable)