diff --git a/src/bin/controls.c b/src/bin/controls.c index 3393c8d0..953f9719 100644 --- a/src/bin/controls.c +++ b/src/bin/controls.c @@ -42,6 +42,13 @@ _cb_ct_options(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event _ options_toggle(ct_win, ct_bg, ct_term); } +static void +_cb_ct_about(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +{ + controls_toggle(ct_win, ct_bg, ct_term); + // XXX: show about box. +} + void controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term) { @@ -97,6 +104,21 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term) evas_object_show(o); evas_object_smart_callback_add(o, "clicked", _cb_ct_options, NULL); + o = elm_separator_add(win); + evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5); + elm_separator_horizontal_set(o, EINA_TRUE); + elm_box_pack_end(ct_box, o); + evas_object_show(o); + + o = elm_button_add(win); + evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); + elm_object_text_set(o, "About"); + elm_box_pack_end(ct_box, o); + evas_object_show(o); + evas_object_smart_callback_add(o, "clicked", _cb_ct_about, NULL); + edje_object_part_swallow(bg, "terminology.controls", ct_frame); evas_object_show(ct_frame); } diff --git a/src/bin/termio.c b/src/bin/termio.c index edf693e1..7b92d7fc 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -586,7 +586,7 @@ _sel_word(Evas_Object *obj, int cx, int cy) int x, w = 0; if (!sd) return; - cells = termpty_cellrow_get(sd->pty, cy - sd->scroll, &w); + cells = termpty_cellrow_get(sd->pty, cy, &w); if (!cells) return; sd->cur.sel = 1; sd->cur.makesel = 0; @@ -616,7 +616,7 @@ _sel_word_to(Evas_Object *obj, int cx, int cy) int x, w = 0; if (!sd) return; - cells = termpty_cellrow_get(sd->pty, cy - sd->scroll, &w); + cells = termpty_cellrow_get(sd->pty, cy, &w); if (!cells) return; if (sd->cur.sel1.x > cx || sd->cur.sel1.y > cy) {