diff options
-rw-r--r-- | src/bin/config.c | 5 | ||||
-rw-r--r-- | src/bin/config.h | 1 | ||||
-rw-r--r-- | src/bin/main.c | 1 | ||||
-rw-r--r-- | src/bin/options_behavior.c | 19 | ||||
-rw-r--r-- | src/bin/termio.c | 4 |
5 files changed, 30 insertions, 0 deletions
diff --git a/src/bin/config.c b/src/bin/config.c index 8c1036e..03e43e9 100644 --- a/src/bin/config.c +++ b/src/bin/config.c | |||
@@ -97,6 +97,8 @@ config_init(void) | |||
97 | EET_DATA_DESCRIPTOR_ADD_BASIC | 97 | EET_DATA_DESCRIPTOR_ADD_BASIC |
98 | (edd_base, Config, "disable_visual_bell", disable_visual_bell, EET_T_UCHAR); | 98 | (edd_base, Config, "disable_visual_bell", disable_visual_bell, EET_T_UCHAR); |
99 | EET_DATA_DESCRIPTOR_ADD_BASIC | 99 | EET_DATA_DESCRIPTOR_ADD_BASIC |
100 | (edd_base, Config, "active_links", active_links, EET_T_UCHAR); | ||
101 | EET_DATA_DESCRIPTOR_ADD_BASIC | ||
100 | (edd_base, Config, "translucent", translucent, EET_T_UCHAR); | 102 | (edd_base, Config, "translucent", translucent, EET_T_UCHAR); |
101 | EET_DATA_DESCRIPTOR_ADD_BASIC | 103 | EET_DATA_DESCRIPTOR_ADD_BASIC |
102 | (edd_base, Config, "mute", mute, EET_T_UCHAR); | 104 | (edd_base, Config, "mute", mute, EET_T_UCHAR); |
@@ -210,6 +212,7 @@ config_sync(const Config *config_src, Config *config) | |||
210 | config->flicker_on_key = config_src->flicker_on_key; | 212 | config->flicker_on_key = config_src->flicker_on_key; |
211 | config->disable_cursor_blink = config_src->disable_cursor_blink; | 213 | config->disable_cursor_blink = config_src->disable_cursor_blink; |
212 | config->disable_visual_bell = config_src->disable_visual_bell; | 214 | config->disable_visual_bell = config_src->disable_visual_bell; |
215 | config->active_links = config_src->active_links; | ||
213 | config->mute = config_src->mute; | 216 | config->mute = config_src->mute; |
214 | config->urg_bell = config_src->urg_bell; | 217 | config->urg_bell = config_src->urg_bell; |
215 | config->multi_instance = config_src->multi_instance; | 218 | config->multi_instance = config_src->multi_instance; |
@@ -499,6 +502,7 @@ config_load(const char *key) | |||
499 | config->flicker_on_key = EINA_FALSE; | 502 | config->flicker_on_key = EINA_FALSE; |
500 | config->disable_cursor_blink = EINA_FALSE; | 503 | config->disable_cursor_blink = EINA_FALSE; |
501 | config->disable_visual_bell = EINA_FALSE; | 504 | config->disable_visual_bell = EINA_FALSE; |
505 | config->active_links = EINA_TRUE; | ||
502 | s = eina_unicode_unicode_to_utf8(sep, &slen); | 506 | s = eina_unicode_unicode_to_utf8(sep, &slen); |
503 | if (s) | 507 | if (s) |
504 | { | 508 | { |
@@ -579,6 +583,7 @@ config_fork(Config *config) | |||
579 | CPY(flicker_on_key); | 583 | CPY(flicker_on_key); |
580 | CPY(disable_cursor_blink); | 584 | CPY(disable_cursor_blink); |
581 | CPY(disable_visual_bell); | 585 | CPY(disable_visual_bell); |
586 | CPY(active_links); | ||
582 | CPY(translucent); | 587 | CPY(translucent); |
583 | CPY(mute); | 588 | CPY(mute); |
584 | CPY(urg_bell); | 589 | CPY(urg_bell); |
diff --git a/src/bin/config.h b/src/bin/config.h index ee5dca8..027e0e4 100644 --- a/src/bin/config.h +++ b/src/bin/config.h | |||
@@ -42,6 +42,7 @@ struct _Config | |||
42 | Eina_Bool flicker_on_key; | 42 | Eina_Bool flicker_on_key; |
43 | Eina_Bool disable_cursor_blink; | 43 | Eina_Bool disable_cursor_blink; |
44 | Eina_Bool disable_visual_bell; | 44 | Eina_Bool disable_visual_bell; |
45 | Eina_Bool active_links; | ||
45 | Eina_Bool translucent; | 46 | Eina_Bool translucent; |
46 | Eina_Bool mute; | 47 | Eina_Bool mute; |
47 | Eina_Bool urg_bell; | 48 | Eina_Bool urg_bell; |
diff --git a/src/bin/main.c b/src/bin/main.c index 787f907..4cda584 100644 --- a/src/bin/main.c +++ b/src/bin/main.c | |||
@@ -2652,6 +2652,7 @@ elm_main(int argc, char **argv) | |||
2652 | Eina_Bool video_mute = 0xff; /* unset */ | 2652 | Eina_Bool video_mute = 0xff; /* unset */ |
2653 | Eina_Bool cursor_blink = 0xff; /* unset */ | 2653 | Eina_Bool cursor_blink = 0xff; /* unset */ |
2654 | Eina_Bool visual_bell = 0xff; /* unset */ | 2654 | Eina_Bool visual_bell = 0xff; /* unset */ |
2655 | Eina_Bool active_links = 0xff; /* unset */ | ||
2655 | Eina_Bool fullscreen = EINA_FALSE; | 2656 | Eina_Bool fullscreen = EINA_FALSE; |
2656 | Eina_Bool iconic = EINA_FALSE; | 2657 | Eina_Bool iconic = EINA_FALSE; |
2657 | Eina_Bool borderless = EINA_FALSE; | 2658 | Eina_Bool borderless = EINA_FALSE; |
diff --git a/src/bin/options_behavior.c b/src/bin/options_behavior.c index 17115fe..03f753f 100644 --- a/src/bin/options_behavior.c +++ b/src/bin/options_behavior.c | |||
@@ -77,6 +77,15 @@ _cb_op_behavior_urg_bell_chg(void *data, Evas_Object *obj, void *event EINA_UNUS | |||
77 | } | 77 | } |
78 | 78 | ||
79 | static void | 79 | static void |
80 | _cb_op_behavior_active_links_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED) | ||
81 | { | ||
82 | Evas_Object *term = data; | ||
83 | Config *config = termio_config_get(term); | ||
84 | config->active_links = elm_check_state_get(obj); | ||
85 | config_save(config, NULL); | ||
86 | } | ||
87 | |||
88 | static void | ||
80 | _cb_op_behavior_multi_instance_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED) | 89 | _cb_op_behavior_multi_instance_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED) |
81 | { | 90 | { |
82 | Evas_Object *term = data; | 91 | Evas_Object *term = data; |
@@ -363,6 +372,16 @@ options_behavior(Evas_Object *opbox, Evas_Object *term) | |||
363 | o = elm_check_add(bx); | 372 | o = elm_check_add(bx); |
364 | evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); | 373 | evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); |
365 | evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5); | 374 | evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5); |
375 | elm_object_text_set(o, "Active Links"); | ||
376 | elm_check_state_set(o, config->active_links); | ||
377 | elm_box_pack_end(bx, o); | ||
378 | evas_object_show(o); | ||
379 | evas_object_smart_callback_add(o, "changed", | ||
380 | _cb_op_behavior_active_links_chg, term); | ||
381 | |||
382 | o = elm_check_add(bx); | ||
383 | evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); | ||
384 | evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5); | ||
366 | elm_object_text_set(o, "Enable application server"); | 385 | elm_object_text_set(o, "Enable application server"); |
367 | elm_check_state_set(o, config->application_server); | 386 | elm_check_state_set(o, config->application_server); |
368 | elm_box_pack_end(bx, o); | 387 | elm_box_pack_end(bx, o); |
diff --git a/src/bin/termio.c b/src/bin/termio.c index c10a115..e8b8ef0 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c | |||
@@ -147,6 +147,7 @@ _activate_link(Evas_Object *obj, Eina_Bool may_inline) | |||
147 | 147 | ||
148 | EINA_SAFETY_ON_NULL_RETURN(sd); | 148 | EINA_SAFETY_ON_NULL_RETURN(sd); |
149 | if (!config) return; | 149 | if (!config) return; |
150 | if (!config->active_links) return; | ||
150 | if (!sd->link.string) return; | 151 | if (!sd->link.string) return; |
151 | if (link_is_url(sd->link.string)) | 152 | if (link_is_url(sd->link.string)) |
152 | { | 153 | { |
@@ -666,8 +667,11 @@ _smart_mouseover_apply(Evas_Object *obj) | |||
666 | int x1 = 0, y1 = 0, x2 = 0, y2 = 0; | 667 | int x1 = 0, y1 = 0, x2 = 0, y2 = 0; |
667 | Eina_Bool same_link = EINA_FALSE, same_geom = EINA_FALSE; | 668 | Eina_Bool same_link = EINA_FALSE, same_geom = EINA_FALSE; |
668 | Termio *sd = evas_object_smart_data_get(obj); | 669 | Termio *sd = evas_object_smart_data_get(obj); |
670 | Config *config = termio_config_get(obj); | ||
669 | 671 | ||
670 | EINA_SAFETY_ON_NULL_RETURN(sd); | 672 | EINA_SAFETY_ON_NULL_RETURN(sd); |
673 | if (!config->active_links) return; | ||
674 | |||
671 | if ((sd->mouse.cx < 0) || (sd->mouse.cy < 0) || | 675 | if ((sd->mouse.cx < 0) || (sd->mouse.cy < 0) || |
672 | (sd->link.suspend) || (!evas_object_focus_get(obj))) | 676 | (sd->link.suspend) || (!evas_object_focus_get(obj))) |
673 | { | 677 | { |