aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/options.c')
-rw-r--r--src/bin/options.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/bin/options.c b/src/bin/options.c
index f62d811..7964054 100644
--- a/src/bin/options.c
+++ b/src/bin/options.c
@@ -6,6 +6,7 @@
#include "options_behavior.h"
#include "options_video.h"
#include "config.h"
+#include "termio.h"
static Evas_Object *op_frame, *op_box = NULL, *op_toolbar = NULL,
*op_opbox = NULL, *op_tbox = NULL, *op_temp = NULL;
@@ -48,9 +49,10 @@ _cb_op_behavior(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
}
static void
-_cb_op_tmp_chg(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
+_cb_op_tmp_chg(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
{
- config_tmp = elm_check_state_get(obj);
+ Config *config = data;
+ config->temporary = elm_check_state_get(obj);
}
static Eina_Bool
@@ -72,6 +74,7 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
if (!op_frame)
{
Elm_Object_Item *it_fn, *it_th, *it_wp, *it_bh;
+ Config *config = termio_config_get(term);
op_frame = o = elm_frame_add(win);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -128,10 +131,10 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 1.0);
elm_object_text_set(o, "Temporary");
- elm_check_state_set(o, config_tmp);
+ elm_check_state_set(o, config->temporary);
elm_box_pack_end(op_tbox, o);
evas_object_show(o);
- evas_object_smart_callback_add(o, "changed", _cb_op_tmp_chg, NULL);
+ evas_object_smart_callback_add(o, "changed", _cb_op_tmp_chg, config);
edje_object_part_swallow(bg, "terminology.options", op_frame);
evas_object_show(o);