forked from enlightenment/terminology
parent
f5bef8a0ed
commit
3656913985
|
@ -76,6 +76,8 @@ config_init(void)
|
|||
(edd_base, Config, "vidmod", vidmod, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(edd_base, Config, "jump_on_change", jump_on_change, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(edd_base, Config, "jump_on_keypress", jump_on_keypress, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(edd_base, Config, "flicker_on_key", flicker_on_key, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
|
@ -221,6 +223,7 @@ config_load(const char *key)
|
|||
config->background = NULL;
|
||||
config->translucent = EINA_FALSE;
|
||||
config->jump_on_change = EINA_TRUE;
|
||||
config->jump_on_keypress = EINA_TRUE;
|
||||
config->flicker_on_key = EINA_TRUE;
|
||||
config->disable_cursor_blink = EINA_FALSE;
|
||||
s = eina_unicode_unicode_to_utf8(sep, &slen);
|
||||
|
|
|
@ -26,6 +26,7 @@ struct _Config
|
|||
const char *wordsep;
|
||||
int scrollback;
|
||||
int vidmod;
|
||||
Eina_Bool jump_on_keypress;
|
||||
Eina_Bool jump_on_change;
|
||||
Eina_Bool flicker_on_key;
|
||||
Eina_Bool disable_cursor_blink;
|
||||
|
|
|
@ -458,6 +458,8 @@ elm_main(int argc, char **argv)
|
|||
config_del(config);
|
||||
config_shutdown();
|
||||
|
||||
evas_object_del(win);
|
||||
|
||||
eina_log_domain_unregister(_log_domain);
|
||||
_log_domain = -1;
|
||||
|
||||
|
|
|
@ -9,6 +9,16 @@
|
|||
|
||||
static Evas_Object *op_sbslider, *op_jumpcheck, *op_wordsep;
|
||||
|
||||
static void
|
||||
_cb_op_behavior_jump_keypress_chg(void *data, Evas_Object *obj, void *event __UNUSED__)
|
||||
{
|
||||
Evas_Object *term = data;
|
||||
Config *config = termio_config_get(term);
|
||||
config->jump_on_keypress = elm_check_state_get(obj);
|
||||
termio_config_update(term);
|
||||
config_save(config, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_op_behavior_jump_chg(void *data, Evas_Object *obj, void *event __UNUSED__)
|
||||
{
|
||||
|
@ -98,6 +108,16 @@ options_behavior(Evas_Object *opbox, Evas_Object *term)
|
|||
evas_object_smart_callback_add(o, "changed",
|
||||
_cb_op_behavior_jump_chg, term);
|
||||
|
||||
o = elm_check_add(opbox);
|
||||
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_object_text_set(o, "Jump to bottom on keypress");
|
||||
elm_check_state_set(o, config->jump_on_keypress);
|
||||
elm_box_pack_end(opbox, o);
|
||||
evas_object_show(o);
|
||||
evas_object_smart_callback_add(o, "changed",
|
||||
_cb_op_behavior_jump_keypress_chg, term);
|
||||
|
||||
o = elm_check_add(opbox);
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
||||
|
|
|
@ -64,6 +64,7 @@ struct _Termio
|
|||
Config *config;
|
||||
Ecore_IMF_Context *imf;
|
||||
Eina_Bool jump_on_change : 1;
|
||||
Eina_Bool jump_on_keypress : 1;
|
||||
Eina_Bool have_sel : 1;
|
||||
Eina_Bool noreqsize : 1;
|
||||
Eina_Bool composing : 1;
|
||||
|
@ -1056,6 +1057,11 @@ _smart_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
|
|||
}
|
||||
}
|
||||
}
|
||||
if (sd->jump_on_keypress)
|
||||
{
|
||||
sd->scroll = 0;
|
||||
_smart_update_queue(data, sd);
|
||||
}
|
||||
// if term app asked fro kbd lock - dont handle here
|
||||
if (sd->pty->state.kbd_lock) return;
|
||||
// if app asked us to not do autorepeat - ignore pree is it is the same
|
||||
|
@ -1745,6 +1751,7 @@ _termio_config_set(Evas_Object *obj, Config *config)
|
|||
sd->config = config;
|
||||
|
||||
sd->jump_on_change = config->jump_on_change;
|
||||
sd->jump_on_keypress = config->jump_on_keypress;
|
||||
|
||||
if (config->font.bitmap)
|
||||
{
|
||||
|
@ -2465,6 +2472,7 @@ termio_config_update(Evas_Object *obj)
|
|||
sd->font.size = sd->config->font.size;
|
||||
|
||||
sd->jump_on_change = sd->config->jump_on_change;
|
||||
sd->jump_on_keypress = sd->config->jump_on_keypress;
|
||||
|
||||
termpty_backscroll_set(sd->pty, sd->config->scrollback);
|
||||
sd->scroll = 0;
|
||||
|
|
Loading…
Reference in New Issue