forked from enlightenment/terminology
add new terminology option to disable that infernal cursor blinking; this should, in theory, be a combo box with different styles (underline, solid, invisible, etc), but imo the first thing is the ability to disable the blinking overall
SVN revision: 72856
This commit is contained in:
parent
85e9901227
commit
666d4223c9
|
@ -510,6 +510,13 @@ collections {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
programs {
|
programs {
|
||||||
|
program { name: "focus_in_noblink";
|
||||||
|
signal: "focus,in,noblink";
|
||||||
|
source: "terminology";
|
||||||
|
action: STATE_SET "focused" 0.0;
|
||||||
|
target: "fill";
|
||||||
|
target: "outline";
|
||||||
|
}
|
||||||
program { name: "focus_in";
|
program { name: "focus_in";
|
||||||
signal: "focus,in";
|
signal: "focus,in";
|
||||||
source: "terminology";
|
source: "terminology";
|
||||||
|
|
|
@ -62,6 +62,8 @@ config_init(void)
|
||||||
(edd_base, Config, "jump_on_change", jump_on_change, EET_T_UCHAR);
|
(edd_base, Config, "jump_on_change", jump_on_change, EET_T_UCHAR);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||||
(edd_base, Config, "flicker_on_key", flicker_on_key, EET_T_UCHAR);
|
(edd_base, Config, "flicker_on_key", flicker_on_key, EET_T_UCHAR);
|
||||||
|
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||||
|
(edd_base, Config, "disable_cursor_blink", disable_cursor_blink, EET_T_UCHAR);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||||
(edd_base, Config, "translucent", translucent, EET_T_UCHAR);
|
(edd_base, Config, "translucent", translucent, EET_T_UCHAR);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||||
|
@ -141,6 +143,7 @@ config_load(const char *key)
|
||||||
config->translucent = EINA_FALSE;
|
config->translucent = EINA_FALSE;
|
||||||
config->jump_on_change = EINA_FALSE;
|
config->jump_on_change = EINA_FALSE;
|
||||||
config->flicker_on_key = EINA_TRUE;
|
config->flicker_on_key = EINA_TRUE;
|
||||||
|
config->disable_cursor_blink = EINA_TRUE;
|
||||||
// XXX: add
|
// XXX: add
|
||||||
//
|
//
|
||||||
// // more invisible spaces
|
// // more invisible spaces
|
||||||
|
|
|
@ -19,6 +19,7 @@ struct _Config
|
||||||
int vidmod;
|
int vidmod;
|
||||||
Eina_Bool jump_on_change;
|
Eina_Bool jump_on_change;
|
||||||
Eina_Bool flicker_on_key;
|
Eina_Bool flicker_on_key;
|
||||||
|
Eina_Bool disable_cursor_blink;
|
||||||
Eina_Bool translucent;
|
Eina_Bool translucent;
|
||||||
Eina_Bool mute;
|
Eina_Bool mute;
|
||||||
Eina_Bool urg_bell;
|
Eina_Bool urg_bell;
|
||||||
|
|
|
@ -19,6 +19,16 @@ _cb_op_behavior_jump_chg(void *data, Evas_Object *obj, void *event __UNUSED__)
|
||||||
config_save(config, NULL);
|
config_save(config, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_cb_op_behavior_cursor_blink_chg(void *data, Evas_Object *obj, void *event __UNUSED__)
|
||||||
|
{
|
||||||
|
Evas_Object *term = data;
|
||||||
|
Config *config = termio_config_get(term);
|
||||||
|
config->disable_cursor_blink = elm_check_state_get(obj);
|
||||||
|
termio_config_update(term);
|
||||||
|
config_save(config, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_cb_op_behavior_flicker_chg(void *data, Evas_Object *obj, void *event __UNUSED__)
|
_cb_op_behavior_flicker_chg(void *data, Evas_Object *obj, void *event __UNUSED__)
|
||||||
{
|
{
|
||||||
|
@ -97,6 +107,16 @@ options_behavior(Evas_Object *opbox, Evas_Object *term)
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
evas_object_smart_callback_add(o, "changed",
|
evas_object_smart_callback_add(o, "changed",
|
||||||
_cb_op_behavior_flicker_chg, term);
|
_cb_op_behavior_flicker_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, "Disable cursor blinking");
|
||||||
|
elm_check_state_set(o, config->disable_cursor_blink);
|
||||||
|
elm_box_pack_end(opbox, o);
|
||||||
|
evas_object_show(o);
|
||||||
|
evas_object_smart_callback_add(o, "changed",
|
||||||
|
_cb_op_behavior_cursor_blink_chg, term);
|
||||||
|
|
||||||
o = elm_check_add(opbox);
|
o = elm_check_add(opbox);
|
||||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
||||||
|
|
|
@ -526,7 +526,10 @@ _smart_cb_focus_in(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(data);
|
sd = evas_object_smart_data_get(data);
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
edje_object_signal_emit(sd->cur.obj, "focus,in", "terminology");
|
if (sd->config->disable_cursor_blink)
|
||||||
|
edje_object_signal_emit(sd->cur.obj, "focus,in,noblink", "terminology");
|
||||||
|
else
|
||||||
|
edje_object_signal_emit(sd->cur.obj, "focus,in", "terminology");
|
||||||
if (!sd->win) return;
|
if (!sd->win) return;
|
||||||
elm_win_keyboard_mode_set(sd->win, ELM_WIN_KEYBOARD_TERMINAL);
|
elm_win_keyboard_mode_set(sd->win, ELM_WIN_KEYBOARD_TERMINAL);
|
||||||
if (sd->imf)
|
if (sd->imf)
|
||||||
|
@ -1576,6 +1579,12 @@ termio_config_update(Evas_Object *obj)
|
||||||
|
|
||||||
termpty_backscroll_set(sd->pty, sd->config->scrollback);
|
termpty_backscroll_set(sd->pty, sd->config->scrollback);
|
||||||
sd->scroll = 0;
|
sd->scroll = 0;
|
||||||
|
|
||||||
|
edje_object_signal_emit(sd->cur.obj, "focus,out", "terminology");
|
||||||
|
if (sd->config->disable_cursor_blink)
|
||||||
|
edje_object_signal_emit(sd->cur.obj, "focus,in,noblink", "terminology");
|
||||||
|
else
|
||||||
|
edje_object_signal_emit(sd->cur.obj, "focus,in", "terminology");
|
||||||
|
|
||||||
evas_object_scale_set(sd->grid.obj, elm_config_scale_get());
|
evas_object_scale_set(sd->grid.obj, elm_config_scale_get());
|
||||||
evas_object_textgrid_font_set(sd->grid.obj, sd->font.name, sd->font.size);
|
evas_object_textgrid_font_set(sd->grid.obj, sd->font.name, sd->font.size);
|
||||||
|
|
Loading…
Reference in New Issue