forked from enlightenment/terminology
config: simplify API
This commit is contained in:
parent
67805411a4
commit
b8af21128e
|
@ -8,6 +8,7 @@
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#define CONF_VER 22
|
#define CONF_VER 22
|
||||||
|
#define CONFIG_KEY "config"
|
||||||
|
|
||||||
#define LIM(v, min, max) {if (v >= max) v = max; else if (v <= min) v = min;}
|
#define LIM(v, min, max) {if (v >= max) v = max; else if (v <= min) v = min;}
|
||||||
|
|
||||||
|
@ -207,7 +208,7 @@ config_shutdown(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
config_save(Config *config, const char *key)
|
config_save(Config *config)
|
||||||
{
|
{
|
||||||
Eet_File *ef;
|
Eet_File *ef;
|
||||||
char buf[PATH_MAX], buf2[PATH_MAX];
|
char buf[PATH_MAX], buf2[PATH_MAX];
|
||||||
|
@ -221,7 +222,6 @@ config_save(Config *config, const char *key)
|
||||||
main_config_sync(config);
|
main_config_sync(config);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!key) key = config->config_key;
|
|
||||||
config->font.orig_size = config->font.size;
|
config->font.orig_size = config->font.size;
|
||||||
eina_stringshare_del(config->font.orig_name);
|
eina_stringshare_del(config->font.orig_name);
|
||||||
config->font.orig_name = NULL;
|
config->font.orig_name = NULL;
|
||||||
|
@ -236,7 +236,7 @@ config_save(Config *config, const char *key)
|
||||||
ef = eet_open(buf, EET_FILE_MODE_WRITE);
|
ef = eet_open(buf, EET_FILE_MODE_WRITE);
|
||||||
if (ef)
|
if (ef)
|
||||||
{
|
{
|
||||||
ok = eet_data_write(ef, edd_base, key, config, 1);
|
ok = eet_data_write(ef, edd_base, CONFIG_KEY, config, 1);
|
||||||
eet_close(ef);
|
eet_close(ef);
|
||||||
if (ok) ecore_file_mv(buf, buf2);
|
if (ok) ecore_file_mv(buf, buf2);
|
||||||
}
|
}
|
||||||
|
@ -581,21 +581,19 @@ config_new(void)
|
||||||
|
|
||||||
|
|
||||||
Config *
|
Config *
|
||||||
config_load(const char *key)
|
config_load(void)
|
||||||
{
|
{
|
||||||
Eet_File *ef;
|
Eet_File *ef;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
const char *cfgdir;
|
const char *cfgdir;
|
||||||
Config *config = NULL;
|
Config *config = NULL;
|
||||||
|
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(key, NULL);
|
|
||||||
|
|
||||||
cfgdir = _config_home_get();
|
cfgdir = _config_home_get();
|
||||||
snprintf(buf, sizeof(buf), "%s/terminology/config/standard/base.cfg", cfgdir);
|
snprintf(buf, sizeof(buf), "%s/terminology/config/standard/base.cfg", cfgdir);
|
||||||
ef = eet_open(buf, EET_FILE_MODE_READ);
|
ef = eet_open(buf, EET_FILE_MODE_READ);
|
||||||
if (ef)
|
if (ef)
|
||||||
{
|
{
|
||||||
config = eet_data_read(ef, edd_base, key);
|
config = eet_data_read(ef, edd_base, CONFIG_KEY);
|
||||||
eet_close(ef);
|
eet_close(ef);
|
||||||
if (config)
|
if (config)
|
||||||
{
|
{
|
||||||
|
@ -731,9 +729,6 @@ config_load(const char *key)
|
||||||
config->font_set = 1;
|
config->font_set = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config)
|
|
||||||
config->config_key = eina_stringshare_add(key); /* not in eet */
|
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -804,7 +799,6 @@ config_fork(const Config *config)
|
||||||
CPY(mouse_over_focus);
|
CPY(mouse_over_focus);
|
||||||
CPY(disable_focus_visuals);
|
CPY(disable_focus_visuals);
|
||||||
CPY(temporary);
|
CPY(temporary);
|
||||||
SCPY(config_key);
|
|
||||||
CPY(font_set);
|
CPY(font_set);
|
||||||
CPY(gravatar);
|
CPY(gravatar);
|
||||||
CPY(notabs);
|
CPY(notabs);
|
||||||
|
@ -851,8 +845,6 @@ config_del(Config *config)
|
||||||
eina_stringshare_del(config->helper.local.video);
|
eina_stringshare_del(config->helper.local.video);
|
||||||
eina_stringshare_del(config->helper.local.image);
|
eina_stringshare_del(config->helper.local.image);
|
||||||
|
|
||||||
eina_stringshare_del(config->config_key); /* not in eet */
|
|
||||||
|
|
||||||
EINA_LIST_FREE(config->keys, key)
|
EINA_LIST_FREE(config->keys, key)
|
||||||
{
|
{
|
||||||
eina_stringshare_del(key->keyname);
|
eina_stringshare_del(key->keyname);
|
||||||
|
|
|
@ -99,16 +99,15 @@ struct _Config
|
||||||
|
|
||||||
Eina_Bool temporary; /* not in EET */
|
Eina_Bool temporary; /* not in EET */
|
||||||
Eina_Bool font_set; /* not in EET */
|
Eina_Bool font_set; /* not in EET */
|
||||||
const char *config_key; /* not in EET, the key that config was loaded */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void config_init(void);
|
void config_init(void);
|
||||||
void config_shutdown(void);
|
void config_shutdown(void);
|
||||||
void config_sync(const Config *config_src, Config *config);
|
void config_sync(const Config *config_src, Config *config);
|
||||||
void config_save(Config *config, const char *key);
|
void config_save(Config *config);
|
||||||
Config *config_load(const char *key);
|
Config *config_load(void);
|
||||||
Config *config_fork(const Config *config);
|
Config *config_fork(const Config *config);
|
||||||
Config *config_new();
|
Config *config_new(void);
|
||||||
void config_del(Config *config);
|
void config_del(Config *config);
|
||||||
void config_default_font_set(Config *config, Evas *evas);
|
void config_default_font_set(Config *config, Evas *evas);
|
||||||
void config_reset_keys(Config *config);
|
void config_reset_keys(Config *config);
|
||||||
|
|
|
@ -582,7 +582,7 @@ elm_main(int argc, char **argv)
|
||||||
|
|
||||||
config_init();
|
config_init();
|
||||||
|
|
||||||
_main_config = config_load("config");
|
_main_config = config_load();
|
||||||
if (key_bindings_load(_main_config) < 0)
|
if (key_bindings_load(_main_config) < 0)
|
||||||
{
|
{
|
||||||
CRITICAL(_("Could not initialize key bindings."));
|
CRITICAL(_("Could not initialize key bindings."));
|
||||||
|
|
|
@ -77,7 +77,7 @@ _cb_op_video_trans_chg(void *data,
|
||||||
config->translucent = elm_check_state_get(obj);
|
config->translucent = elm_check_state_get(obj);
|
||||||
elm_object_disabled_set(ctx->op_opacity, !config->translucent);
|
elm_object_disabled_set(ctx->op_opacity, !config->translucent);
|
||||||
main_trans_update(config);
|
main_trans_update(config);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -92,7 +92,7 @@ _cb_op_video_opacity_chg(void *data,
|
||||||
if (!config->translucent)
|
if (!config->translucent)
|
||||||
return;
|
return;
|
||||||
main_trans_update(config);
|
main_trans_update(config);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -227,12 +227,12 @@ _item_selected(void *data,
|
||||||
// no background
|
// no background
|
||||||
eina_stringshare_del(config->background);
|
eina_stringshare_del(config->background);
|
||||||
config->background = NULL;
|
config->background = NULL;
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
main_media_update(config);
|
main_media_update(config);
|
||||||
}
|
}
|
||||||
else if (eina_stringshare_replace(&(config->background), item->path))
|
else if (eina_stringshare_replace(&(config->background), item->path))
|
||||||
{
|
{
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
main_media_update(config);
|
main_media_update(config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -505,7 +505,7 @@ _cb_grid_doubleclick(void *data,
|
||||||
if (newfile)
|
if (newfile)
|
||||||
{
|
{
|
||||||
eina_stringshare_replace(&(config->background), newfile);
|
eina_stringshare_replace(&(config->background), newfile);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
main_media_update(config);
|
main_media_update(config);
|
||||||
eina_stringshare_del(newfile);
|
eina_stringshare_del(newfile);
|
||||||
_bubble_show(ctx, _("Picture imported"));
|
_bubble_show(ctx, _("Picture imported"));
|
||||||
|
|
|
@ -34,7 +34,7 @@ _cb_op_behavior_##_cfg_name(void *data, Evas_Object *obj, \
|
||||||
config->_cfg_name = elm_check_state_get(obj); \
|
config->_cfg_name = elm_check_state_get(obj); \
|
||||||
termio_config_update(ctx->term); \
|
termio_config_update(ctx->term); \
|
||||||
windows_update(); \
|
windows_update(); \
|
||||||
config_save(config, NULL); \
|
config_save(config); \
|
||||||
}
|
}
|
||||||
|
|
||||||
CB(jump_on_change, 0);
|
CB(jump_on_change, 0);
|
||||||
|
@ -94,7 +94,7 @@ _cb_op_behavior_sback_chg(void *data,
|
||||||
|
|
||||||
config->scrollback = (double) sback_double_to_expo_int(elm_slider_value_get(obj));
|
config->scrollback = (double) sback_double_to_expo_int(elm_slider_value_get(obj));
|
||||||
termio_config_update(ctx->term);
|
termio_config_update(ctx->term);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -107,7 +107,7 @@ _cb_op_behavior_tab_zoom_slider_chg(void *data,
|
||||||
|
|
||||||
config->tab_zoom = (double)(int)round(elm_slider_value_get(obj) * 10.0) / 10.0;
|
config->tab_zoom = (double)(int)round(elm_slider_value_get(obj) * 10.0) / 10.0;
|
||||||
termio_config_update(ctx->term);
|
termio_config_update(ctx->term);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -124,7 +124,7 @@ _cb_op_behavior_custom_geometry_current_set(void *data,
|
||||||
elm_spinner_value_set(ctx->op_w, config->cg_width);
|
elm_spinner_value_set(ctx->op_w, config->cg_width);
|
||||||
elm_spinner_value_set(ctx->op_h, config->cg_height);
|
elm_spinner_value_set(ctx->op_h, config->cg_height);
|
||||||
}
|
}
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -141,7 +141,7 @@ _cb_op_behavior_custom_geometry(void *data,
|
||||||
config->cg_width = (int) elm_spinner_value_get(ctx->op_w);
|
config->cg_width = (int) elm_spinner_value_get(ctx->op_w);
|
||||||
config->cg_height = (int) elm_spinner_value_get(ctx->op_h);
|
config->cg_height = (int) elm_spinner_value_get(ctx->op_h);
|
||||||
}
|
}
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
|
|
||||||
elm_object_disabled_set(ctx->op_w, !config->custom_geometry);
|
elm_object_disabled_set(ctx->op_w, !config->custom_geometry);
|
||||||
elm_object_disabled_set(ctx->op_h, !config->custom_geometry);
|
elm_object_disabled_set(ctx->op_h, !config->custom_geometry);
|
||||||
|
@ -159,7 +159,7 @@ _cb_op_behavior_cg_width(void *data,
|
||||||
if (config->custom_geometry)
|
if (config->custom_geometry)
|
||||||
{
|
{
|
||||||
config->cg_width = (int) elm_spinner_value_get(obj);
|
config->cg_width = (int) elm_spinner_value_get(obj);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ _cb_op_behavior_cg_height(void *data,
|
||||||
if (config->custom_geometry)
|
if (config->custom_geometry)
|
||||||
{
|
{
|
||||||
config->cg_height = (int) elm_spinner_value_get(obj);
|
config->cg_height = (int) elm_spinner_value_get(obj);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,7 +203,7 @@ _cursors_changed_cb(void *data, Evas_Object *obj,
|
||||||
|
|
||||||
termio_config_update(ctx->term);
|
termio_config_update(ctx->term);
|
||||||
windows_update();
|
windows_update();
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -224,7 +224,7 @@ _cb_op_hide_cursor_changed(void *data,
|
||||||
config->hide_cursor = CONFIG_CURSOR_IDLE_TIMEOUT_MAX + 1.0;
|
config->hide_cursor = CONFIG_CURSOR_IDLE_TIMEOUT_MAX + 1.0;
|
||||||
elm_object_disabled_set(ctx->sld_hide_cursor, EINA_TRUE);
|
elm_object_disabled_set(ctx->sld_hide_cursor, EINA_TRUE);
|
||||||
}
|
}
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -240,7 +240,7 @@ _cb_hide_cursor_slider_chg(void *data,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
config->hide_cursor = value;
|
config->hide_cursor = value;
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ _cb_op_color_chg(void *data,
|
||||||
config->colors[(j * 12) + i].b = b * a / 256;
|
config->colors[(j * 12) + i].b = b * a / 256;
|
||||||
config->colors[(j * 12) + i].a = a;
|
config->colors[(j * 12) + i].a = a;
|
||||||
termio_config_update(ctx->term);
|
termio_config_update(ctx->term);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,7 @@ _cb_op_reset(void *data,
|
||||||
elm_colorselector_palette_item_color_get(ctx->curitem, &r, &g, &b, &a);
|
elm_colorselector_palette_item_color_get(ctx->curitem, &r, &g, &b, &a);
|
||||||
elm_colorselector_color_set(ctx->colorsel, r, g, b, a);
|
elm_colorselector_color_set(ctx->colorsel, r, g, b, a);
|
||||||
termio_config_update(term);
|
termio_config_update(term);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make color palettes wrap back. :) works with elm git. */
|
/* make color palettes wrap back. :) works with elm git. */
|
||||||
|
|
|
@ -157,7 +157,7 @@ _cb_op_font_sel(void *data,
|
||||||
elm_object_disabled_set(ctx->op_fsml, f->bitmap);
|
elm_object_disabled_set(ctx->op_fsml, f->bitmap);
|
||||||
elm_object_disabled_set(ctx->op_fontslider, f->bitmap);
|
elm_object_disabled_set(ctx->op_fontslider, f->bitmap);
|
||||||
elm_object_disabled_set(ctx->op_fbig, f->bitmap);
|
elm_object_disabled_set(ctx->op_fbig, f->bitmap);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
win_font_update(term);
|
win_font_update(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ _cb_op_fontsize_sel(void *data,
|
||||||
config->font.size = size;
|
config->font.size = size;
|
||||||
_update_sizing(ctx);
|
_update_sizing(ctx);
|
||||||
elm_genlist_realized_items_update(ctx->op_fontlist);
|
elm_genlist_realized_items_update(ctx->op_fontlist);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
win_font_update(term);
|
win_font_update(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ _cb_font_bolditalic(void *data,
|
||||||
|
|
||||||
config->font.bolditalic = elm_check_state_get(obj);
|
config->font.bolditalic = elm_check_state_get(obj);
|
||||||
termio_config_update(ctx->term);
|
termio_config_update(ctx->term);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -15,7 +15,7 @@ _cb_op_helper_inline_chg(void *data,
|
||||||
Evas_Object *term = data;
|
Evas_Object *term = data;
|
||||||
Config *config = termio_config_get(term);
|
Config *config = termio_config_get(term);
|
||||||
config->helper.inline_please = elm_check_state_get(obj);
|
config->helper.inline_please = elm_check_state_get(obj);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -38,7 +38,7 @@ _cb_op_helper_email_chg(void *data,
|
||||||
config->helper.email = eina_stringshare_add(txt);
|
config->helper.email = eina_stringshare_add(txt);
|
||||||
free(txt);
|
free(txt);
|
||||||
}
|
}
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -61,7 +61,7 @@ _cb_op_helper_url_image_chg(void *data,
|
||||||
config->helper.url.image = eina_stringshare_add(txt);
|
config->helper.url.image = eina_stringshare_add(txt);
|
||||||
free(txt);
|
free(txt);
|
||||||
}
|
}
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -84,7 +84,7 @@ _cb_op_helper_url_video_chg(void *data,
|
||||||
config->helper.url.video = eina_stringshare_add(txt);
|
config->helper.url.video = eina_stringshare_add(txt);
|
||||||
free(txt);
|
free(txt);
|
||||||
}
|
}
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -107,7 +107,7 @@ _cb_op_helper_url_general_chg(void *data,
|
||||||
config->helper.url.general = eina_stringshare_add(txt);
|
config->helper.url.general = eina_stringshare_add(txt);
|
||||||
free(txt);
|
free(txt);
|
||||||
}
|
}
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -130,7 +130,7 @@ _cb_op_helper_local_image_chg(void *data,
|
||||||
config->helper.local.image = eina_stringshare_add(txt);
|
config->helper.local.image = eina_stringshare_add(txt);
|
||||||
free(txt);
|
free(txt);
|
||||||
}
|
}
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -153,7 +153,7 @@ _cb_op_helper_local_video_chg(void *data,
|
||||||
config->helper.local.video = eina_stringshare_add(txt);
|
config->helper.local.video = eina_stringshare_add(txt);
|
||||||
free(txt);
|
free(txt);
|
||||||
}
|
}
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -176,7 +176,7 @@ _cb_op_helper_local_general_chg(void *data,
|
||||||
config->helper.local.general = eina_stringshare_add(txt);
|
config->helper.local.general = eina_stringshare_add(txt);
|
||||||
free(txt);
|
free(txt);
|
||||||
}
|
}
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -51,7 +51,7 @@ _shortcut_delete(void *data,
|
||||||
eina_stringshare_del(cfg_key->cb);
|
eina_stringshare_del(cfg_key->cb);
|
||||||
free(cfg_key);
|
free(cfg_key);
|
||||||
|
|
||||||
config_save(ctx->config, NULL);
|
config_save(ctx->config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Evas_Object *
|
static Evas_Object *
|
||||||
|
@ -152,7 +152,7 @@ _cb_key_up(void *data,
|
||||||
evas_object_size_hint_min_set(bx, min_w, min_h);
|
evas_object_size_hint_min_set(bx, min_w, min_h);
|
||||||
elm_box_pack_before(bx, bt, last);
|
elm_box_pack_before(bx, bt, last);
|
||||||
|
|
||||||
config_save(ctx->config, NULL);
|
config_save(ctx->config);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -79,7 +79,7 @@ _cb_op_theme_sel(void *data,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
eina_stringshare_replace(&(config->theme), t->name);
|
eina_stringshare_replace(&(config->theme), t->name);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
change_theme(termio_win_get(t->ctx->term), config);
|
change_theme(termio_win_get(t->ctx->term), config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ _cb_op_video_mute_chg(void *data,
|
||||||
Config *config = termio_config_get(term);
|
Config *config = termio_config_get(term);
|
||||||
config->mute = elm_check_state_get(obj);
|
config->mute = elm_check_state_get(obj);
|
||||||
main_media_mute_update(config);
|
main_media_mute_update(config);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -29,7 +29,7 @@ _cb_op_video_visualize_chg(void *data,
|
||||||
Config *config = termio_config_get(term);
|
Config *config = termio_config_get(term);
|
||||||
config->visualize = elm_check_state_get(obj);
|
config->visualize = elm_check_state_get(obj);
|
||||||
main_media_visualize_update(config);
|
main_media_visualize_update(config);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -43,7 +43,7 @@ _cb_op_video_vidmod_chg(void *data,
|
||||||
if (v == config->vidmod) return;
|
if (v == config->vidmod) return;
|
||||||
config->vidmod = v;
|
config->vidmod = v;
|
||||||
main_media_update(config);
|
main_media_update(config);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -244,7 +244,7 @@ _scale_done(void *data,
|
||||||
ctx->term->wn->on_popover--;
|
ctx->term->wn->on_popover--;
|
||||||
term_unref(ctx->term);
|
term_unref(ctx->term);
|
||||||
elm_config_save();
|
elm_config_save();
|
||||||
config_save(ctx->term->config, NULL);
|
config_save(ctx->term->config);
|
||||||
free(ctx);
|
free(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3937,7 +3937,7 @@ term_apply_shine(Term *term, int shine)
|
||||||
{
|
{
|
||||||
config->shine = shine;
|
config->shine = shine;
|
||||||
background_set_shine(config, term->bg);
|
background_set_shine(config, term->bg);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4715,7 +4715,8 @@ _set_alpha(Config *config, const char *val, Eina_Bool save)
|
||||||
config->translucent = EINA_FALSE;
|
config->translucent = EINA_FALSE;
|
||||||
main_trans_update(config);
|
main_trans_update(config);
|
||||||
|
|
||||||
if (save) config_save(config, NULL);
|
if (save)
|
||||||
|
config_save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -5015,7 +5016,7 @@ _cb_command(void *data,
|
||||||
else
|
else
|
||||||
eina_stringshare_replace(&(config->background), NULL);
|
eina_stringshare_replace(&(config->background), NULL);
|
||||||
main_media_update(config);
|
main_media_update(config);
|
||||||
config_save(config, NULL);
|
config_save(config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue