Settings option for login_shell

This commit is contained in:
Markus Törnqvist 2014-01-11 16:22:18 +02:00
parent 2e064a2fe2
commit 7c4a989279
1 changed files with 29 additions and 10 deletions

View File

@ -252,6 +252,15 @@ _cb_op_behavior_cg_height(void *data, Evas_Object *obj, void *event EINA_UNUSED)
}
}
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);
}
void
options_behavior(Evas_Object *opbox, Evas_Object *term)
{
@ -396,6 +405,16 @@ options_behavior(Evas_Object *opbox, Evas_Object *term)
evas_object_smart_callback_add(o, "changed",
_cb_op_behavior_drag_links_chg, 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);
elm_object_text_set(o, "Start as login shell");
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);
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);