2012-06-17 10:04:17 -07:00
|
|
|
#include "private.h"
|
|
|
|
|
2012-06-16 07:00:00 -07:00
|
|
|
#include <Elementary.h>
|
|
|
|
#include "config.h"
|
|
|
|
#include "termio.h"
|
|
|
|
#include "options.h"
|
2012-06-17 02:26:01 -07:00
|
|
|
#include "options_behavior.h"
|
2012-06-16 07:00:00 -07:00
|
|
|
#include "main.h"
|
|
|
|
|
2013-05-01 00:59:04 -07:00
|
|
|
static Evas_Object *op_w, *op_h;
|
2012-06-16 07:00:00 -07:00
|
|
|
|
2013-09-11 23:00:08 -07:00
|
|
|
static void
|
|
|
|
_cb_op_behavior_drag_links_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
config->drag_links = elm_check_state_get(obj);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
|
2012-07-04 21:36:47 -07:00
|
|
|
static void
|
2013-08-27 06:36:50 -07:00
|
|
|
_cb_op_behavior_jump_keypress_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
2012-07-04 21:36:47 -07:00
|
|
|
{
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2012-06-16 07:00:00 -07:00
|
|
|
static void
|
2013-08-27 06:36:50 -07:00
|
|
|
_cb_op_behavior_jump_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
2012-06-16 07:00:00 -07:00
|
|
|
{
|
2012-06-17 13:24:23 -07:00
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
2012-06-16 07:00:00 -07:00
|
|
|
config->jump_on_change = elm_check_state_get(obj);
|
2012-06-17 13:24:23 -07:00
|
|
|
termio_config_update(term);
|
|
|
|
config_save(config, NULL);
|
2012-06-16 07:00:00 -07:00
|
|
|
}
|
|
|
|
|
2012-06-26 01:05:43 -07:00
|
|
|
static void
|
2013-08-27 06:36:50 -07:00
|
|
|
_cb_op_behavior_cursor_blink_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
2012-06-26 01:05:43 -07:00
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
2012-07-17 00:46:01 -07:00
|
|
|
config->disable_cursor_blink = !elm_check_state_get(obj);
|
2012-06-26 01:05:43 -07:00
|
|
|
termio_config_update(term);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
|
2012-08-05 02:38:58 -07:00
|
|
|
static void
|
2013-08-27 06:36:50 -07:00
|
|
|
_cb_op_behavior_visual_bell_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
2012-08-05 02:38:58 -07:00
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
config->disable_visual_bell = !elm_check_state_get(obj);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
|
2014-04-22 14:32:04 -07:00
|
|
|
static void
|
|
|
|
_cb_op_behavior_bell_rings_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
config->bell_rings = elm_check_state_get(obj);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
|
2012-06-20 01:29:08 -07:00
|
|
|
static void
|
2013-08-27 06:36:50 -07:00
|
|
|
_cb_op_behavior_flicker_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
2012-06-20 01:29:08 -07:00
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
config->flicker_on_key = elm_check_state_get(obj);
|
|
|
|
termio_config_update(term);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
|
2012-06-23 02:25:01 -07:00
|
|
|
static void
|
2013-08-27 06:36:50 -07:00
|
|
|
_cb_op_behavior_urg_bell_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
2012-06-23 02:25:01 -07:00
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
config->urg_bell = elm_check_state_get(obj);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
|
2014-04-11 11:20:47 -07:00
|
|
|
static void
|
|
|
|
_cb_op_behavior_active_links_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
config->active_links = elm_check_state_get(obj);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
|
2012-12-27 03:20:32 -08:00
|
|
|
static void
|
2013-08-27 06:36:50 -07:00
|
|
|
_cb_op_behavior_multi_instance_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
2012-12-27 03:20:32 -08:00
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
config->multi_instance = elm_check_state_get(obj);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
|
2013-09-06 11:39:37 -07:00
|
|
|
static void
|
|
|
|
_cb_op_behavior_application_server_restore_views_chg(void *data, Evas_Object *obj,
|
|
|
|
void *event EINA_UNUSED)
|
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
config->application_server_restore_views = elm_check_state_get(obj);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_behavior_option_restore_opened_views_add(Evas_Object *term,
|
|
|
|
Evas_Object *check)
|
|
|
|
{
|
|
|
|
Evas_Object *bx = evas_object_data_get(check, "box");
|
|
|
|
Evas_Object *o;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
|
|
|
|
o = elm_check_add(bx);
|
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Restore opened views"));
|
2013-09-06 11:39:37 -07:00
|
|
|
elm_check_state_set(o, config->application_server_restore_views);
|
|
|
|
elm_box_pack_after(bx, o, check);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_data_set(check, "restore_views", o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_application_server_restore_views_chg,
|
|
|
|
term);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
_behavior_option_restore_opened_views_del(Evas_Object *check)
|
|
|
|
{
|
|
|
|
Evas_Object *o = evas_object_data_del(check, "restore_views");
|
|
|
|
if (o)
|
|
|
|
evas_object_del(o);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_cb_op_behavior_application_server_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
Eina_Bool old = config->application_server;
|
|
|
|
config->application_server = elm_check_state_get(obj);
|
|
|
|
|
|
|
|
if (old == config->application_server)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (!config->application_server)
|
|
|
|
_behavior_option_restore_opened_views_del(obj);
|
|
|
|
else
|
|
|
|
_behavior_option_restore_opened_views_add(term, obj);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
|
2013-06-16 13:32:50 -07:00
|
|
|
static void
|
|
|
|
_cb_op_behavior_xterm_256color_chg(void *data, Evas_Object *obj,
|
|
|
|
void *event EINA_UNUSED)
|
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
config->xterm_256color = elm_check_state_get(obj);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
|
2013-09-22 08:10:39 -07:00
|
|
|
static void
|
|
|
|
_cb_op_behavior_erase_is_del_chg(void *data, Evas_Object *obj,
|
|
|
|
void *event EINA_UNUSED)
|
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
config->erase_is_del = elm_check_state_get(obj);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
|
2012-06-16 07:00:00 -07:00
|
|
|
static void
|
2013-08-27 06:36:50 -07:00
|
|
|
_cb_op_behavior_wsep_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
2012-06-16 07:00:00 -07:00
|
|
|
{
|
2012-06-17 13:24:23 -07:00
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
2012-06-16 10:31:54 -07:00
|
|
|
char *txt;
|
2012-06-17 13:24:23 -07:00
|
|
|
|
2012-06-16 10:31:54 -07:00
|
|
|
if (config->wordsep)
|
|
|
|
{
|
|
|
|
eina_stringshare_del(config->wordsep);
|
|
|
|
config->wordsep = NULL;
|
|
|
|
}
|
|
|
|
txt = elm_entry_markup_to_utf8(elm_object_text_get(obj));
|
|
|
|
if (txt)
|
|
|
|
{
|
|
|
|
config->wordsep = eina_stringshare_add(txt);
|
|
|
|
free(txt);
|
|
|
|
}
|
2012-06-17 13:24:23 -07:00
|
|
|
termio_config_update(term);
|
|
|
|
config_save(config, NULL);
|
2012-06-16 07:00:00 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-27 06:36:50 -07:00
|
|
|
_cb_op_behavior_sback_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
2012-06-16 07:00:00 -07:00
|
|
|
{
|
2012-06-17 13:24:23 -07:00
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
|
2012-06-16 10:31:54 -07:00
|
|
|
config->scrollback = elm_slider_value_get(obj) + 0.5;
|
2012-06-17 13:24:23 -07:00
|
|
|
termio_config_update(term);
|
|
|
|
config_save(config, NULL);
|
2012-06-16 07:00:00 -07:00
|
|
|
}
|
|
|
|
|
2013-05-03 04:50:58 -07:00
|
|
|
static void
|
|
|
|
_cb_op_behavior_tab_zoom_slider_chg(void *data, Evas_Object *obj,
|
2013-08-27 06:36:50 -07:00
|
|
|
void *event EINA_UNUSED)
|
2013-05-03 04:50:58 -07:00
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
|
|
|
|
config->tab_zoom = (double)(int)round(elm_slider_value_get(obj) * 10.0) / 10.0;
|
|
|
|
termio_config_update(term);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
|
2013-04-17 12:59:20 -07:00
|
|
|
static void
|
2013-08-27 06:36:50 -07:00
|
|
|
_cb_op_behavior_custom_geometry(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
2013-04-17 12:59:20 -07:00
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
|
|
|
|
config->custom_geometry = elm_check_state_get(obj);
|
|
|
|
if (config->custom_geometry)
|
|
|
|
{
|
|
|
|
config->cg_width = (int) elm_spinner_value_get(op_w);
|
|
|
|
config->cg_height = (int) elm_spinner_value_get(op_h);
|
|
|
|
}
|
|
|
|
config_save(config, NULL);
|
|
|
|
|
|
|
|
elm_object_disabled_set(op_w, !config->custom_geometry);
|
|
|
|
elm_object_disabled_set(op_h, !config->custom_geometry);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-27 06:36:50 -07:00
|
|
|
_cb_op_behavior_cg_width(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
2013-04-17 12:59:20 -07:00
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
|
|
|
|
if (config->custom_geometry)
|
|
|
|
{
|
|
|
|
config->cg_width = (int) elm_spinner_value_get(obj);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-08-27 06:36:50 -07:00
|
|
|
_cb_op_behavior_cg_height(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
2013-04-17 12:59:20 -07:00
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
|
|
|
|
if (config->custom_geometry)
|
|
|
|
{
|
|
|
|
config->cg_height = (int) elm_spinner_value_get(obj);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-01-11 06:22:18 -08:00
|
|
|
static void
|
|
|
|
_cb_op_behavior_login_shell_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
config->login_shell = elm_check_state_get(obj);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
|
2014-03-15 15:01:31 -07:00
|
|
|
static void
|
|
|
|
_cb_op_behavior_mouse_over_focus_chg(void *data, Evas_Object *obj, void *event EINA_UNUSED)
|
|
|
|
{
|
|
|
|
Evas_Object *term = data;
|
|
|
|
Config *config = termio_config_get(term);
|
|
|
|
config->mouse_over_focus = elm_check_state_get(obj);
|
|
|
|
config_save(config, NULL);
|
|
|
|
}
|
|
|
|
|
2012-06-16 07:00:00 -07:00
|
|
|
void
|
|
|
|
options_behavior(Evas_Object *opbox, Evas_Object *term)
|
|
|
|
{
|
2012-06-17 13:24:23 -07:00
|
|
|
Config *config = termio_config_get(term);
|
2012-09-02 07:10:31 -07:00
|
|
|
Evas_Object *o, *bx, *sc, *fr;
|
2012-06-16 07:00:00 -07:00
|
|
|
char *txt;
|
2013-04-17 12:59:20 -07:00
|
|
|
int w, h;
|
2014-07-20 14:04:47 -07:00
|
|
|
const char *tooltip;
|
2013-04-17 12:59:20 -07:00
|
|
|
|
|
|
|
termio_size_get(term, &w, &h);
|
2012-06-16 07:00:00 -07:00
|
|
|
|
2012-09-02 07:10:31 -07:00
|
|
|
fr = o = elm_frame_add(opbox);
|
|
|
|
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);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Behavior"));
|
2012-09-02 07:10:31 -07:00
|
|
|
elm_box_pack_end(opbox, o);
|
|
|
|
evas_object_show(o);
|
2014-01-11 06:22:18 -08:00
|
|
|
|
2012-07-16 23:57:41 -07:00
|
|
|
sc = o = elm_scroller_add(opbox);
|
|
|
|
elm_scroller_content_min_limit(sc, EINA_TRUE, EINA_FALSE);
|
|
|
|
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);
|
2012-09-02 07:10:31 -07:00
|
|
|
elm_object_content_set(fr, o);
|
2012-07-16 23:57:41 -07:00
|
|
|
evas_object_show(o);
|
2014-01-11 06:22:18 -08:00
|
|
|
|
2012-07-16 23:57:41 -07:00
|
|
|
bx = o = elm_box_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.0);
|
|
|
|
elm_object_content_set(sc, o);
|
|
|
|
evas_object_show(o);
|
2014-01-11 06:22:18 -08:00
|
|
|
|
2013-05-01 00:59:04 -07:00
|
|
|
o = elm_check_add(bx);
|
2012-06-16 07:00:00 -07:00
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Jump on change"));
|
2012-06-16 07:00:00 -07:00
|
|
|
elm_check_state_set(o, config->jump_on_change);
|
2012-07-16 23:57:41 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
2012-06-16 07:00:00 -07:00
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_jump_chg, term);
|
2012-06-20 01:29:08 -07:00
|
|
|
|
2012-07-16 23:57:41 -07:00
|
|
|
o = elm_check_add(bx);
|
2012-07-04 21:36:47 -07:00
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Jump on key"));
|
2012-07-04 21:36:47 -07:00
|
|
|
elm_check_state_set(o, config->jump_on_keypress);
|
2012-07-16 23:57:41 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
2012-07-04 21:36:47 -07:00
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_jump_keypress_chg, term);
|
|
|
|
|
2012-07-16 23:57:41 -07:00
|
|
|
o = elm_check_add(bx);
|
2012-06-20 01:29:08 -07:00
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("React to key presses"));
|
2012-06-20 01:29:08 -07:00
|
|
|
elm_check_state_set(o, config->flicker_on_key);
|
2012-07-16 23:57:41 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
2012-06-20 01:29:08 -07:00
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_flicker_chg, term);
|
2012-06-26 01:05:43 -07:00
|
|
|
|
2012-07-16 23:57:41 -07:00
|
|
|
o = elm_check_add(bx);
|
2012-06-26 01:05:43 -07:00
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Cursor blinking"));
|
2012-07-17 00:46:01 -07:00
|
|
|
elm_check_state_set(o, !config->disable_cursor_blink);
|
2012-07-16 23:57:41 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
2012-06-26 01:05:43 -07:00
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_cursor_blink_chg, term);
|
2014-01-11 06:22:18 -08:00
|
|
|
|
2012-08-05 02:38:58 -07:00
|
|
|
o = elm_check_add(bx);
|
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Visual Bell"));
|
2012-08-05 02:38:58 -07:00
|
|
|
elm_check_state_set(o, !config->disable_visual_bell);
|
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_visual_bell_chg, term);
|
2014-01-11 06:22:18 -08:00
|
|
|
|
2014-04-22 14:32:04 -07:00
|
|
|
o = elm_check_add(bx);
|
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Bell rings"));
|
2014-05-17 12:03:42 -07:00
|
|
|
elm_check_state_set(o, config->bell_rings);
|
2014-04-22 14:32:04 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_bell_rings_chg, term);
|
|
|
|
|
2012-07-16 23:57:41 -07:00
|
|
|
o = elm_check_add(bx);
|
2012-06-23 02:25:01 -07:00
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Urgent Bell"));
|
2012-06-23 02:25:01 -07:00
|
|
|
elm_check_state_set(o, config->urg_bell);
|
2012-07-16 23:57:41 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
2012-06-23 02:25:01 -07:00
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_urg_bell_chg, term);
|
2014-01-11 06:22:18 -08:00
|
|
|
|
2014-04-11 11:20:47 -07:00
|
|
|
o = elm_check_add(bx);
|
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Active Links"));
|
2014-04-11 11:20:47 -07:00
|
|
|
elm_check_state_set(o, config->active_links);
|
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_active_links_chg, term);
|
|
|
|
|
2013-09-06 11:39:37 -07:00
|
|
|
o = elm_check_add(bx);
|
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Enable application server"));
|
2013-09-06 11:39:37 -07:00
|
|
|
elm_check_state_set(o, config->application_server);
|
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_application_server_chg, term);
|
|
|
|
|
|
|
|
evas_object_data_set(o, "box", bx);
|
|
|
|
if (config->application_server)
|
|
|
|
_behavior_option_restore_opened_views_add(term, o);
|
|
|
|
|
2012-12-27 03:20:32 -08:00
|
|
|
o = elm_check_add(bx);
|
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Multiple instances, one process"));
|
2012-12-27 03:20:32 -08:00
|
|
|
elm_check_state_set(o, config->multi_instance);
|
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_multi_instance_chg, term);
|
2013-06-16 13:32:50 -07:00
|
|
|
|
|
|
|
o = elm_check_add(bx);
|
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Set TERM to xterm-256color"));
|
2013-06-16 13:32:50 -07:00
|
|
|
elm_check_state_set(o, config->xterm_256color);
|
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_xterm_256color_chg, term);
|
|
|
|
|
2013-09-22 08:10:39 -07:00
|
|
|
o = elm_check_add(bx);
|
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("BackArrow sends Del (instead of BackSpace)"));
|
2013-09-22 08:10:39 -07:00
|
|
|
elm_check_state_set(o, config->erase_is_del);
|
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_erase_is_del_chg, term);
|
|
|
|
|
2013-04-17 12:59:20 -07:00
|
|
|
o = elm_check_add(bx);
|
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Drag & drop links"));
|
2013-09-28 01:50:31 -07:00
|
|
|
elm_check_state_set(o, config->drag_links);
|
2013-04-17 12:59:20 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
2013-09-28 01:50:31 -07:00
|
|
|
_cb_op_behavior_drag_links_chg, term);
|
2013-04-17 12:59:20 -07:00
|
|
|
|
2014-01-11 06:22:18 -08:00
|
|
|
o = elm_check_add(bx);
|
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Start as login shell"));
|
2014-01-11 06:22:18 -08:00
|
|
|
elm_check_state_set(o, config->login_shell);
|
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_login_shell_chg, term);
|
|
|
|
|
2014-03-15 15:01:31 -07:00
|
|
|
o = elm_check_add(bx);
|
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Focus split under the Mouse"));
|
2014-03-15 15:01:31 -07:00
|
|
|
elm_check_state_set(o, config->mouse_over_focus);
|
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_mouse_over_focus_chg, term);
|
|
|
|
|
2013-09-11 23:00:08 -07:00
|
|
|
o = elm_check_add(bx);
|
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Always open at size:"));
|
2013-09-28 01:50:31 -07:00
|
|
|
elm_check_state_set(o, config->custom_geometry);
|
2013-09-11 23:00:08 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
2013-09-28 01:50:31 -07:00
|
|
|
_cb_op_behavior_custom_geometry, term);
|
2013-09-11 23:00:08 -07:00
|
|
|
|
2013-04-17 12:59:20 -07:00
|
|
|
o = elm_label_add(bx);
|
|
|
|
evas_object_size_hint_weight_set(o, 0.0, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, 0.0, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Width:"));
|
2013-04-17 12:59:20 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
|
|
|
|
op_w = o = elm_spinner_add(bx);
|
2014-03-14 21:04:31 -07:00
|
|
|
elm_spinner_editable_set(o, EINA_TRUE);
|
2013-05-10 08:04:29 -07:00
|
|
|
elm_spinner_min_max_set(o, 2.0, 350.0);
|
2013-04-17 12:59:20 -07:00
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2013-05-10 08:04:29 -07:00
|
|
|
if (config->custom_geometry) elm_spinner_value_set(o, config->cg_width);
|
|
|
|
else elm_spinner_value_set(o, w);
|
2013-04-17 12:59:20 -07:00
|
|
|
elm_object_disabled_set(o, !config->custom_geometry);
|
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_cg_width, term);
|
|
|
|
|
|
|
|
o = elm_label_add(bx);
|
|
|
|
evas_object_size_hint_weight_set(o, 0.0, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, 0.0, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Height:"));
|
2013-04-17 12:59:20 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
|
|
|
|
op_h = o = elm_spinner_add(bx);
|
2014-03-14 21:04:31 -07:00
|
|
|
elm_spinner_editable_set(o, EINA_TRUE);
|
2013-05-10 08:04:29 -07:00
|
|
|
elm_spinner_min_max_set(o, 1.0, 150.0);
|
2013-04-17 12:59:20 -07:00
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2013-05-10 08:04:29 -07:00
|
|
|
if (config->custom_geometry) elm_spinner_value_set(o, config->cg_height);
|
|
|
|
else elm_spinner_value_set(o, h);
|
2013-04-17 12:59:20 -07:00
|
|
|
elm_object_disabled_set(o, !config->custom_geometry);
|
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_cg_height, term);
|
|
|
|
|
2012-07-16 23:57:41 -07:00
|
|
|
o = elm_separator_add(bx);
|
2012-06-16 07:00:00 -07:00
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
2012-06-17 02:26:01 -07:00
|
|
|
elm_separator_horizontal_set(o, EINA_TRUE);
|
2012-07-16 23:57:41 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
2012-06-16 07:00:00 -07:00
|
|
|
evas_object_show(o);
|
2014-01-11 06:22:18 -08:00
|
|
|
|
2012-07-16 23:57:41 -07:00
|
|
|
o = elm_label_add(bx);
|
2012-06-16 07:00:00 -07:00
|
|
|
evas_object_size_hint_weight_set(o, 0.0, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, 0.0, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Word separators:"));
|
2012-07-16 23:57:41 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
2012-06-16 07:00:00 -07:00
|
|
|
evas_object_show(o);
|
|
|
|
|
2013-05-01 00:59:04 -07:00
|
|
|
o = elm_entry_add(bx);
|
2012-06-16 07:00:00 -07:00
|
|
|
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_entry_single_line_set(o, EINA_TRUE);
|
2012-06-16 11:21:48 -07:00
|
|
|
elm_entry_scrollable_set(o, EINA_TRUE);
|
2012-09-09 15:57:55 -07:00
|
|
|
elm_scroller_policy_set(o, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
|
2012-06-16 07:00:00 -07:00
|
|
|
txt = elm_entry_utf8_to_markup(config->wordsep);
|
|
|
|
if (txt)
|
|
|
|
{
|
|
|
|
elm_object_text_set(o, txt);
|
|
|
|
free(txt);
|
|
|
|
}
|
2012-07-16 23:57:41 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
2012-06-16 07:00:00 -07:00
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "changed",
|
|
|
|
_cb_op_behavior_wsep_chg, term);
|
|
|
|
|
2012-07-16 23:57:41 -07:00
|
|
|
o = elm_separator_add(bx);
|
2012-06-17 02:26:01 -07:00
|
|
|
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);
|
2012-07-16 23:57:41 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
2012-06-17 02:26:01 -07:00
|
|
|
evas_object_show(o);
|
2014-01-11 06:22:18 -08:00
|
|
|
|
2012-07-16 23:57:41 -07:00
|
|
|
o = elm_label_add(bx);
|
2012-06-16 07:00:00 -07:00
|
|
|
evas_object_size_hint_weight_set(o, 0.0, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, 0.0, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Scrollback:"));
|
2012-07-16 23:57:41 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
2012-06-16 07:00:00 -07:00
|
|
|
evas_object_show(o);
|
2014-01-11 06:22:18 -08:00
|
|
|
|
2013-05-01 00:59:04 -07:00
|
|
|
o = elm_slider_add(bx);
|
2012-06-16 07:00:00 -07:00
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.0);
|
2012-09-06 08:19:33 -07:00
|
|
|
elm_slider_span_size_set(o, 40);
|
2012-06-16 07:00:00 -07:00
|
|
|
elm_slider_unit_format_set(o, "%1.0f");
|
|
|
|
elm_slider_indicator_format_set(o, "%1.0f");
|
|
|
|
elm_slider_min_max_set(o, 0, 10000);
|
|
|
|
elm_slider_value_set(o, config->scrollback);
|
2012-07-16 23:57:41 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
2012-06-16 07:00:00 -07:00
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "delay,changed",
|
|
|
|
_cb_op_behavior_sback_chg, term);
|
2013-05-03 04:50:58 -07:00
|
|
|
|
|
|
|
o = elm_label_add(bx);
|
|
|
|
evas_object_size_hint_weight_set(o, 0.0, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, 0.0, 0.5);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_text_set(o, _("Tab zoom/switch animation time:"));
|
|
|
|
tooltip = _("Set the time of the animation that<br>"
|
2014-03-12 20:20:32 -07:00
|
|
|
"takes places on tab switches,<br>"
|
|
|
|
"be them by key binding, mouse<br>"
|
|
|
|
"wheel or tabs panel mouse move");
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_tooltip_text_set(o, tooltip);
|
2013-05-03 04:50:58 -07:00
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
|
|
|
|
o = elm_slider_add(bx);
|
2014-07-20 14:04:47 -07:00
|
|
|
elm_object_tooltip_text_set(o, tooltip);
|
2013-05-03 04:50:58 -07:00
|
|
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.0);
|
|
|
|
elm_slider_span_size_set(o, 40);
|
|
|
|
elm_slider_unit_format_set(o, "%1.1f");
|
|
|
|
elm_slider_indicator_format_set(o, "%1.1f");
|
2013-10-18 11:01:33 -07:00
|
|
|
elm_slider_min_max_set(o, 0.0, 1.0);
|
2013-05-03 04:50:58 -07:00
|
|
|
elm_slider_value_set(o, config->tab_zoom);
|
|
|
|
elm_box_pack_end(bx, o);
|
|
|
|
evas_object_show(o);
|
|
|
|
evas_object_smart_callback_add(o, "delay,changed",
|
|
|
|
_cb_op_behavior_tab_zoom_slider_chg, term);
|
2014-01-11 06:22:18 -08:00
|
|
|
|
2012-07-16 23:57:41 -07:00
|
|
|
evas_object_size_hint_weight_set(opbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
evas_object_size_hint_align_set(opbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
2012-06-16 07:00:00 -07:00
|
|
|
evas_object_show(o);
|
|
|
|
}
|