path: root/src/bin/options.c
diff options
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-06-17 20:24:23 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-06-17 20:24:23 +0000
commit652df62d45e187b7b445e741c85c3458b367100d (patch)
tree809b78f370a7b4a9658d3a655615980dfc983c65 /src/bin/options.c
parentbetter handle -e 'command' if there is a shell expression. (diff)
options infrastructure refactor.
There is no global config option anymore, we have option instances that are set to the termio and media for future queries. The idea is that we can later have different configuration per termio, like multiple windows or tabs with different font size, background, etc. It's just a refactor. It would be better to define if things like background is up to the whole terminal and then save to a different config entry... or just save the global and copy it for next termio, defining the other instances as 'temporary'. Anyway: policy to be defined. SVN revision: 72315
Diffstat (limited to 'src/bin/options.c')
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_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);