* [Entry] Fix the blinking of the cursor

* [Entry] Support Copy/Cut. Paste will come later


SVN revision: 24933
This commit is contained in:
moom 2006-08-20 09:48:13 +00:00 committed by moom
parent 683366ce0e
commit 98fad6cec2
3 changed files with 34 additions and 8 deletions

View File

@ -120,9 +120,18 @@ group {
}
programs {
program {
name: "cursor_show";
signal: "show";
name: "on_cursor_show";
signal: "cursor_show";
source: "";
action: ACTION_STOP;
target: "cursor_show";
target: "cursor_hide";
target: "cursor_show_timer";
target: "cursor_hide_timer";
after: "cursor_show";
}
program {
name: "cursor_show";
action: STATE_SET "visible" 0.0;
target: "cursor";
after: "cursor_show_timer";
@ -135,7 +144,7 @@ group {
}
program {
name: "cursor_show_timer";
in: 1.25 0.0;
in: 1.0 0.0;
after: "cursor_hide";
}
program {

View File

@ -485,7 +485,11 @@ e_editable_cursor_show(Evas_Object *editable)
return;
sd->cursor_visible = 1;
evas_object_show(sd->cursor_object);
if (evas_object_visible_get(editable))
{
evas_object_show(sd->cursor_object);
edje_object_signal_emit(sd->cursor_object, "cursor_show", "");
}
}
/**
@ -922,8 +926,11 @@ _e_editable_cursor_update(Evas_Object *editable)
}
}
if (sd->cursor_visible)
evas_object_show(sd->cursor_object);
if (sd->cursor_visible && evas_object_visible_get(editable))
{
evas_object_show(sd->cursor_object);
edje_object_signal_emit(sd->cursor_object, "cursor_show", "");
}
_e_editable_selection_update(editable);
_e_editable_text_position_update(editable, -1);
@ -1107,14 +1114,17 @@ _e_editable_smart_add(Evas_Object *object)
evas_object_smart_member_add(sd->event_object, object);
sd->text_object = edje_object_add(evas);
evas_object_pass_events_set(sd->text_object, 1);
evas_object_clip_set(sd->text_object, sd->clip_object);
evas_object_smart_member_add(sd->text_object, object);
sd->selection_object = edje_object_add(evas);
evas_object_pass_events_set(sd->selection_object, 1);
evas_object_clip_set(sd->selection_object, sd->clip_object);
evas_object_smart_member_add(sd->selection_object, object);
sd->cursor_object = edje_object_add(evas);
evas_object_pass_events_set(sd->cursor_object, 1);
evas_object_clip_set(sd->cursor_object, sd->clip_object);
evas_object_smart_member_add(sd->cursor_object, object);
@ -1200,7 +1210,10 @@ _e_editable_smart_show(Evas_Object *object)
evas_object_show(sd->text_object);
if (sd->cursor_visible)
evas_object_show(sd->cursor_object);
{
evas_object_show(sd->cursor_object);
edje_object_signal_emit(sd->cursor_object, "cursor_show", "");
}
if ((sd->selection_visible) && (sd->cursor_pos != sd->selection_pos))
evas_object_show(sd->selection_object);

View File

@ -283,6 +283,7 @@ _e_entry_key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
int selecting;
int changed = 0;
char *range;
E_Win *win;
if ((!obj) || (!(sd = evas_object_smart_data_get(obj))))
return;
@ -379,7 +380,10 @@ _e_entry_key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
range = e_editable_text_range_get(editable, start_pos, end_pos);
if (range)
{
//ecore_x_selection_clipboard_set();
if ((win = e_win_evas_object_win_get(obj)))
ecore_x_selection_clipboard_set(win->evas_win,
range,
strlen(range) + 1);
free(range);
}
if ((sd->enabled) && (strcmp(event->keyname, "x") == 0))