#include "e.h"
+#include "e_config_intern.h"
+#include "e_user_intern.h"
+#include "e_utils_intern.h"
+#include "e_prefix_intern.h"
E_API E_Config *e_config = NULL;
/* local subsystem globals */
static int _e_config_save_block = 0;
static const char *_e_config_profile = NULL;
+static int _e_config_save_queued = 0;
+static Ecore_Idle_Enterer *_idle_enter = NULL;
static E_Config_DD *_e_config_edd = NULL;
static E_Config_DD *_e_config_module_edd = NULL;
static E_Config_DD *_e_config_desktop_bg_edd = NULL;
static E_Config_DD *_e_config_desklock_bg_edd = NULL;
static E_Config_DD *_e_config_desktop_name_edd = NULL;
-static E_Config_DD *_e_config_desktop_window_profile_edd = NULL;
static E_Config_DD *_e_config_env_var_edd = NULL;
static E_Config_DD *_e_config_client_type_edd = NULL;
-
-E_API int E_EVENT_CONFIG_MODE_CHANGED = 0;
-
-#if 0
-static E_Dialog *_e_config_error_dialog = NULL;
-
-static void
-_e_config_error_dialog_cb_delete(void *dia)
-{
- if (dia == _e_config_error_dialog)
- _e_config_error_dialog = NULL;
-}
-#endif
+static E_Config_DD *_e_config_policy_desk_edd = NULL;
+static E_Config_DD *_e_config_socket_access_edd = NULL;
+static E_Config_DD *_e_config_aux_hint_supported_edd = NULL;
static void
_e_config_edd_shutdown(void)
E_CONFIG_DD_FREE(_e_config_desktop_bg_edd);
E_CONFIG_DD_FREE(_e_config_desklock_bg_edd);
E_CONFIG_DD_FREE(_e_config_desktop_name_edd);
- E_CONFIG_DD_FREE(_e_config_desktop_window_profile_edd);
E_CONFIG_DD_FREE(_e_config_env_var_edd);
E_CONFIG_DD_FREE(_e_config_client_type_edd);
+ E_CONFIG_DD_FREE(_e_config_policy_desk_edd);
+ E_CONFIG_DD_FREE(_e_config_socket_access_edd);
+ E_CONFIG_DD_FREE(_e_config_aux_hint_supported_edd);
}
static void
E_CONFIG_VAL(D, T, desk_y, INT);
E_CONFIG_VAL(D, T, name, STR);
- _e_config_desktop_window_profile_edd = E_CONFIG_DD_NEW("E_Config_Desktop_Window_Profile", E_Config_Desktop_Window_Profile);
-#undef T
-#undef D
-#define T E_Config_Desktop_Window_Profile
-#define D _e_config_desktop_window_profile_edd
- E_CONFIG_VAL(D, T, zone, INT);
- E_CONFIG_VAL(D, T, desk_x, INT);
- E_CONFIG_VAL(D, T, desk_y, INT);
- E_CONFIG_VAL(D, T, profile, STR);
-
_e_config_module_edd = E_CONFIG_DD_NEW("E_Config_Module", E_Config_Module);
#undef T
#undef D
E_CONFIG_VAL(D, T, window_type, INT);
E_CONFIG_VAL(D, T, client_type, INT);
+ _e_config_policy_desk_edd = E_CONFIG_DD_NEW("E_Config_Policy_Desk", E_Config_Policy_Desk);
+#undef T
+#undef D
+#define T E_Config_Policy_Desk
+#define D _e_config_policy_desk_edd
+ E_CONFIG_VAL(D, T, zone_num, UINT);
+ E_CONFIG_VAL(D, T, x, INT);
+ E_CONFIG_VAL(D, T, y, INT);
+ E_CONFIG_VAL(D, T, enable, INT);
+
+ _e_config_socket_access_edd = E_CONFIG_DD_NEW("E_Config_Socket_Access", E_Config_Socket_Access);
+#undef T
+#undef D
+#define T E_Config_Socket_Access
+#define D _e_config_socket_access_edd
+ E_CONFIG_VAL(D, T, sock_access.use, UCHAR);
+ E_CONFIG_VAL(D, T, sock_access.name, STR);
+ E_CONFIG_VAL(D, T, sock_access.owner, STR);
+ E_CONFIG_VAL(D, T, sock_access.group, STR);
+ E_CONFIG_VAL(D, T, sock_access.permissions, INT);
+ E_CONFIG_VAL(D, T, sock_access.smack.use, UCHAR);
+ E_CONFIG_VAL(D, T, sock_access.smack.name, STR);
+ E_CONFIG_VAL(D, T, sock_access.smack.value, STR);
+ E_CONFIG_VAL(D, T, sock_access.smack.flags, INT);
+ E_CONFIG_VAL(D, T, sock_symlink_access.use, UCHAR);
+ E_CONFIG_VAL(D, T, sock_symlink_access.link_name, STR);
+ E_CONFIG_VAL(D, T, sock_symlink_access.owner, STR);
+ E_CONFIG_VAL(D, T, sock_symlink_access.group, STR);
+ E_CONFIG_VAL(D, T, sock_symlink_access.smack.name, STR);
+ E_CONFIG_VAL(D, T, sock_symlink_access.smack.value, STR);
+ E_CONFIG_VAL(D, T, sock_symlink_access.smack.flags, INT);
+
+ _e_config_aux_hint_supported_edd = E_CONFIG_DD_NEW("E_Config_Aux_Hint_Supported", E_Config_Aux_Hint_Supported);
+#undef T
+#undef D
+#define T E_Config_Aux_Hint_Supported
+#define D _e_config_aux_hint_supported_edd
+ E_CONFIG_VAL(D, T, name, STR);
+
_e_config_edd = E_CONFIG_DD_NEW("E_Config", E_Config);
#undef T
#undef D
E_CONFIG_VAL(D, T, config_version, INT);
E_CONFIG_VAL(D, T, desktop_default_background, STR);
E_CONFIG_VAL(D, T, desktop_default_name, STR);
- E_CONFIG_VAL(D, T, desktop_default_window_profile, STR);
E_CONFIG_LIST(D, T, desktop_backgrounds, _e_config_desktop_bg_edd);
E_CONFIG_LIST(D, T, desktop_names, _e_config_desktop_name_edd);
- E_CONFIG_LIST(D, T, desktop_window_profiles, _e_config_desktop_window_profile_edd);
E_CONFIG_VAL(D, T, framerate, DOUBLE);
E_CONFIG_VAL(D, T, priority, INT);
E_CONFIG_VAL(D, T, zone_desks_x_count, INT);
E_CONFIG_VAL(D, T, zone_desks_y_count, INT);
E_CONFIG_LIST(D, T, modules, _e_config_module_edd);
E_CONFIG_VAL(D, T, window_placement_policy, INT);
+ E_CONFIG_VAL(D, T, use_e_policy, INT);
+ E_CONFIG_VAL(D, T, launcher.title, STR);
+ E_CONFIG_VAL(D, T, launcher.clas, STR);
+ E_CONFIG_VAL(D, T, launcher.type, UINT);
+ E_CONFIG_LIST(D, T, policy_desks, _e_config_policy_desk_edd);
+ E_CONFIG_VAL(D, T, use_configured_desks, INT);
+ E_CONFIG_VAL(D, T, use_softkey_service, INT);
+ E_CONFIG_VAL(D, T, use_softkey, INT);
+ E_CONFIG_VAL(D, T, softkey_size, INT);
E_CONFIG_VAL(D, T, focus_policy, INT);
E_CONFIG_VAL(D, T, focus_policy_ext, INT);
E_CONFIG_VAL(D, T, focus_setting, INT);
E_CONFIG_VAL(D, T, transient.desktop, INT);
E_CONFIG_VAL(D, T, transient.iconify, INT);
E_CONFIG_VAL(D, T, fullscreen_policy, INT);
+ E_CONFIG_VAL(D, T, fullscreen_layer, INT);
E_CONFIG_VAL(D, T, dpms_enable, INT);
E_CONFIG_VAL(D, T, dpms_standby_enable, INT);
E_CONFIG_VAL(D, T, dpms_suspend_enable, INT);
E_CONFIG_VAL(D, T, scale.min, DOUBLE);
E_CONFIG_VAL(D, T, scale.max, DOUBLE);
E_CONFIG_VAL(D, T, scale.factor, DOUBLE);
+ E_CONFIG_VAL(D, T, scale.profile_factor, DOUBLE);
+ E_CONFIG_VAL(D, T, scale.inch_correction, DOUBLE);
+ E_CONFIG_VAL(D, T, scale.inch_correction_bound, DOUBLE);
E_CONFIG_VAL(D, T, scale.base_dpi, INT);
E_CONFIG_VAL(D, T, scale.use_dpi, UCHAR);
E_CONFIG_VAL(D, T, scale.use_custom, UCHAR);
+ E_CONFIG_VAL(D, T, scale.for_tdm, UCHAR);
E_CONFIG_VAL(D, T, show_cursor, UCHAR);
E_CONFIG_VAL(D, T, idle_cursor, UCHAR);
E_CONFIG_LIST(D, T, env_vars, _e_config_env_var_edd);
E_CONFIG_VAL(D, T, xkb.dont_touch_my_damn_keyboard, UCHAR);
E_CONFIG_VAL(D, T, xkb.use_cache, UCHAR);
E_CONFIG_VAL(D, T, xkb.delay_held_key_input_to_focus, UINT);
+ E_CONFIG_VAL(D, T, xkb.default_rmlvo.rules, STR);
+ E_CONFIG_VAL(D, T, xkb.default_rmlvo.model, STR);
+ E_CONFIG_VAL(D, T, xkb.default_rmlvo.layout, STR);
+ E_CONFIG_VAL(D, T, xkb.default_rmlvo.variant, STR);
+ E_CONFIG_VAL(D, T, xkb.default_rmlvo.options, STR);
E_CONFIG_VAL(D, T, keyboard.repeat_delay, INT);
E_CONFIG_VAL(D, T, keyboard.repeat_rate, INT);
- E_CONFIG_VAL(D, T, use_desktop_window_profile, INT);
#ifdef _F_ZONE_WINDOW_ROTATION_
E_CONFIG_VAL(D, T, wm_win_rotation, UCHAR);
+ E_CONFIG_VAL(D, T, wm_win_rotation_swap_size, UCHAR);
#endif
+ E_CONFIG_VAL(D, T, screen_rotation_pre, UINT);
+ E_CONFIG_VAL(D, T, screen_rotation_setting, UINT);
+ E_CONFIG_VAL(D, T, screen_rotation_client_ignore, UCHAR);
+ E_CONFIG_VAL(D, T, eom_enable, UCHAR);
E_CONFIG_VAL(D, T, use_cursor_timer, INT);
E_CONFIG_VAL(D, T, cursor_timer_interval, INT);
E_CONFIG_LIST(D, T, client_types, _e_config_client_type_edd);
E_CONFIG_VAL(D, T, comp_shadow_file, STR);
- E_CONFIG_VAL(D, T, wl_sock_access.use, UCHAR);
- E_CONFIG_VAL(D, T, wl_sock_access.owner, STR);
- E_CONFIG_VAL(D, T, wl_sock_access.group, STR);
- E_CONFIG_VAL(D, T, wl_sock_access.permissions, INT);
- E_CONFIG_VAL(D, T, wl_sock_access.smack.use, UCHAR);
- E_CONFIG_VAL(D, T, wl_sock_access.smack.name, STR);
- E_CONFIG_VAL(D, T, wl_sock_access.smack.value, STR);
- E_CONFIG_VAL(D, T, wl_sock_access.smack.flags, INT);
- E_CONFIG_VAL(D, T, wl_sock_symlink_access.use, UCHAR);
- E_CONFIG_VAL(D, T, wl_sock_symlink_access.link_name, STR);
- E_CONFIG_VAL(D, T, wl_sock_symlink_access.owner, STR);
- E_CONFIG_VAL(D, T, wl_sock_symlink_access.group, STR);
- E_CONFIG_VAL(D, T, wl_sock_symlink_access.smack.name, STR);
- E_CONFIG_VAL(D, T, wl_sock_symlink_access.smack.value, STR);
- E_CONFIG_VAL(D, T, wl_sock_symlink_access.smack.flags, INT);
E_CONFIG_VAL(D, T, sleep_for_dri, INT);
E_CONFIG_VAL(D, T, create_wm_ready, INT);
+ E_CONFIG_VAL(D, T, create_wm_start, INT);
E_CONFIG_VAL(D, T, comp_canvas_bg.r, UCHAR);
E_CONFIG_VAL(D, T, comp_canvas_bg.g, UCHAR);
E_CONFIG_VAL(D, T, comp_canvas_bg.b, UCHAR);
E_CONFIG_VAL(D, T, comp_canvas_bg.a, UCHAR);
E_CONFIG_VAL(D, T, comp_canvas_bg.opmode, INT);
E_CONFIG_VAL(D, T, delayed_load_idle_count, INT);
+ E_CONFIG_VAL(D, T, use_buffer_flush, UCHAR);
+ E_CONFIG_VAL(D, T, use_buffer_flush_timeout, UCHAR);
+ E_CONFIG_VAL(D, T, buffer_flush_timer_interval, DOUBLE);
+ E_CONFIG_VAL(D, T, use_desk_smart_obj, UCHAR);
+ E_CONFIG_LIST(D, T, sock_accesses, _e_config_socket_access_edd);
+ E_CONFIG_LIST(D, T, aux_hint_supported, _e_config_aux_hint_supported_edd);
+ E_CONFIG_VAL(D, T, use_module_srv.qp, UCHAR);
+ E_CONFIG_VAL(D, T, launchscreen_timeout, DOUBLE);
+ E_CONFIG_VAL(D, T, enable_conformant_ack, UCHAR);
+ E_CONFIG_VAL(D, T, conformant_ack_timeout, DOUBLE);
+ E_CONFIG_VAL(D, T, calc_vis_without_effect, UCHAR);
+ E_CONFIG_VAL(D, T, save_win_buffer, UCHAR);
+ E_CONFIG_VAL(D, T, save_video_buffer, UCHAR);
+ E_CONFIG_VAL(D, T, hold_prev_win_img, UCHAR);
+ E_CONFIG_VAL(D, T, indicator_plug_name, STR);
+ E_CONFIG_VAL(D, T, launchscreen_without_timer, UCHAR);
+ E_CONFIG_VAL(D, T, log_type, INT);
+ E_CONFIG_VAL(D, T, rsm_buffer_release_mode, INT);
+ E_CONFIG_VAL(D, T, deiconify_approve, UCHAR);
+ E_CONFIG_VAL(D, T, deiconify_pending_timeout, DOUBLE);
+ E_CONFIG_VAL(D, T, use_pp_zoom, UCHAR);
+ E_CONFIG_VAL(D, T, priority_control, UCHAR);
+ E_CONFIG_VAL(D, T, comp_canvas_norender.use, UCHAR);
+ E_CONFIG_VAL(D, T, qp_ignore_indicator_mode, UCHAR);
+ E_CONFIG_VAL(D, T, qp_use_bg_rect, UCHAR);
+ E_CONFIG_VAL(D, T, qp_handler.use_alpha, UCHAR);
+ E_CONFIG_VAL(D, T, qp_handler.alpha, INT);
+ E_CONFIG_VAL(D, T, gesture_service.wait_time, DOUBLE);
+ E_CONFIG_VAL(D, T, gesture_service.wait_dist, INT);
+ E_CONFIG_VAL(D, T, gesture_service.use_cleanup_timer, INT);
+ E_CONFIG_VAL(D, T, gesture_service.cleanup_time, INT);
+ E_CONFIG_VAL(D, T, configured_output_resolution.use, UCHAR);
+ E_CONFIG_VAL(D, T, configured_output_resolution.w, INT);
+ E_CONFIG_VAL(D, T, configured_output_resolution.h, INT);
+ E_CONFIG_VAL(D, T, cursor_configured_output_resolution.use, UCHAR);
+ E_CONFIG_VAL(D, T, cursor_configured_output_resolution.w, INT);
+ E_CONFIG_VAL(D, T, cursor_configured_output_resolution.h, INT);
+ E_CONFIG_VAL(D, T, global_object_not_provide.launch_effect, UCHAR);
+ E_CONFIG_VAL(D, T, use_thread_max_cpu, UCHAR);
+ E_CONFIG_VAL(D, T, use_desk_area, UCHAR);
+ E_CONFIG_VAL(D, T, desk_zoom_effect.enable, UCHAR);
+ E_CONFIG_VAL(D, T, desk_zoom_effect.duration, DOUBLE);
+ E_CONFIG_VAL(D, T, fake_output_resolution.use, UCHAR);
+ E_CONFIG_VAL(D, T, fake_output_resolution.w, INT);
+ E_CONFIG_VAL(D, T, fake_output_resolution.h, INT);
+ E_CONFIG_VAL(D, T, raise_before_show, UCHAR);
+ E_CONFIG_VAL(D, T, configured_max_touch.use, UCHAR);
+ E_CONFIG_VAL(D, T, configured_max_touch.count, UINT);
+ E_CONFIG_VAL(D, T, interactive_resize, UCHAR);
+ E_CONFIG_VAL(D, T, resize_object.customize, UINT);
+ E_CONFIG_VAL(D, T, resize_object.r, INT);
+ E_CONFIG_VAL(D, T, resize_object.g, INT);
+ E_CONFIG_VAL(D, T, resize_object.b, INT);
+ E_CONFIG_VAL(D, T, resize_object.a, INT);
+ E_CONFIG_VAL(D, T, resize_object.type, INT);
+ E_CONFIG_VAL(D, T, resize_object.border_width.l, INT);
+ E_CONFIG_VAL(D, T, resize_object.border_width.r, INT);
+ E_CONFIG_VAL(D, T, resize_object.border_width.t, INT);
+ E_CONFIG_VAL(D, T, resize_object.border_width.b, INT);
+ E_CONFIG_VAL(D, T, resize_object.image_path, STR);
+ E_CONFIG_VAL(D, T, calc_vis_ignore_geometry, UINT);
+ E_CONFIG_VAL(D, T, input_thread_mode, UCHAR);
+ E_CONFIG_VAL(D, T, key_input_time_limit, UINT);
+ E_CONFIG_VAL(D, T, key_input_ttrace_enable, UCHAR);
+}
+
+static Eina_Bool
+_e_config_idle_cb(void *data)
+{
+ if (_e_config_save_queued)
+ {
+ _e_config_save_cb(NULL);
+ _e_config_save_queued = 0;
+ }
+
+ return ECORE_CALLBACK_RENEW;
}
/* externally accessible functions */
EINTERN int
e_config_init(void)
{
- E_EVENT_CONFIG_MODE_CHANGED = ecore_event_type_new();
+ /* TIZEN_ONLY: We don't save e.cfg file.
+ * Sometimes e.cfg file was broken after writing.
+ */
+ if (getenv("E_CONF_RO")) e_config_save_block_set(1);
/* if environment var set - use this profile name */
- _e_config_profile = eina_stringshare_add(getenv("E_CONF_PROFILE"));
+ char *s = e_util_env_get("E_CONF_PROFILE");
+ if (s)
+ {
+ _e_config_profile = eina_stringshare_add(s);
+ E_FREE(s);
+ }
_e_config_edd_init(EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_config, 0);
e_config_save_queue();
+
+ _idle_enter = ecore_idle_enterer_add(_e_config_idle_cb, NULL);
return 1;
}
EINTERN int
e_config_shutdown(void)
{
+ if (_idle_enter) ecore_idle_enterer_del(_idle_enter);
+ _idle_enter = NULL;
+
eina_stringshare_del(_e_config_profile);
_e_config_edd_shutdown();
return 1;
}
-E_API void
+EINTERN void
e_config_load(void)
{
int reload = 0;
#undef D
e_config_profile_set("default");
if (!reload) e_config_profile_del(e_config_profile_get());
- e_config_save_block_set(1);
+ if (getenv("E_CONF_RO")) e_config_save_block_set(1);
e_error_message_show(_("Could not load e.cfg"));
return;
}
CONFIG_VERSION_UPDATE_INFO(19);
/* set (400, 25) as the default values of repeat delay, rate */
- e_config->keyboard.repeat_delay = 400;
- e_config->keyboard.repeat_rate = 25;
+ atomic_store(&e_config->keyboard.repeat_delay, 400);
+ atomic_store(&e_config->keyboard.repeat_rate, 25);
}
}
E_CONFIG_LIMIT(e_config->priority, 0, 19);
E_CONFIG_LIMIT(e_config->zone_desks_x_count, 1, 64);
E_CONFIG_LIMIT(e_config->zone_desks_y_count, 1, 64);
+ E_CONFIG_LIMIT(e_config->use_e_policy, 0, 1);
+ E_CONFIG_LIMIT(e_config->use_configured_desks, 0, 1);
+ E_CONFIG_LIMIT(e_config->use_softkey_service, 0, 1);
+ E_CONFIG_LIMIT(e_config->use_softkey, 0, 1);
+ E_CONFIG_LIMIT(e_config->softkey_size, 0, 42);
E_CONFIG_LIMIT(e_config->window_placement_policy, E_WINDOW_PLACEMENT_SMART, E_WINDOW_PLACEMENT_MANUAL);
E_CONFIG_LIMIT(e_config->focus_policy, 0, 2);
E_CONFIG_LIMIT(e_config->focus_policy_ext, 0, 1);
E_CONFIG_LIMIT(e_config->xkb.delay_held_key_input_to_focus, 0,5000); // 5000(ms) == 5(s)
E_CONFIG_LIMIT(e_config->keyboard.repeat_delay, -1, 1000); // 1 second
E_CONFIG_LIMIT(e_config->keyboard.repeat_rate, -1, 1000); // 1 second
+ E_CONFIG_LIMIT(e_config->screen_rotation_pre, 0, 270);
+ E_CONFIG_LIMIT(e_config->screen_rotation_setting, 0, 270);
+ E_CONFIG_LIMIT(e_config->screen_rotation_client_ignore, 0, 1);
+ E_CONFIG_LIMIT(e_config->eom_enable, 0, 1);
E_CONFIG_LIMIT(e_config->use_cursor_timer, 0, 1);
E_CONFIG_LIMIT(e_config->sleep_for_dri, 0, 1);
E_CONFIG_LIMIT(e_config->create_wm_ready, 0, 1);
+ E_CONFIG_LIMIT(e_config->create_wm_start, 0, 1);
E_CONFIG_LIMIT(e_config->comp_canvas_bg.r, 0, 255);
E_CONFIG_LIMIT(e_config->comp_canvas_bg.g, 0, 255);
E_CONFIG_LIMIT(e_config->comp_canvas_bg.b, 0, 255);
E_CONFIG_LIMIT(e_config->comp_canvas_bg.a, 0, 255);
E_CONFIG_LIMIT(e_config->comp_canvas_bg.opmode, 0, 11);
E_CONFIG_LIMIT(e_config->delayed_load_idle_count, 0, 100);
+ E_CONFIG_LIMIT(e_config->use_buffer_flush, 0, 1);
+ E_CONFIG_LIMIT(e_config->use_buffer_flush_timeout, 0, 1);
+ E_CONFIG_LIMIT(e_config->use_desk_smart_obj, 0, 1);
+ E_CONFIG_LIMIT(e_config->use_module_srv.qp, 0, 1);
+ E_CONFIG_LIMIT(e_config->launchscreen_timeout, 7.0, 100.0);
+ E_CONFIG_LIMIT(e_config->enable_conformant_ack, 0, 1);
+ E_CONFIG_LIMIT(e_config->conformant_ack_timeout, 3.0, 100.0);
+ E_CONFIG_LIMIT(e_config->calc_vis_without_effect, 0, 1);
+ E_CONFIG_LIMIT(e_config->save_win_buffer, 0, 1);
+ E_CONFIG_LIMIT(e_config->save_video_buffer, 0, 1);
+ E_CONFIG_LIMIT(e_config->hold_prev_win_img, 0, 1);
+ E_CONFIG_LIMIT(e_config->launchscreen_without_timer, 0, 1);
+ E_CONFIG_LIMIT(e_config->log_type, 0, 255);
+ E_CONFIG_LIMIT(e_config->rsm_buffer_release_mode, 0, 2);
+ E_CONFIG_LIMIT(e_config->deiconify_approve, 0, 1);
+ E_CONFIG_LIMIT(e_config->deiconify_pending_timeout, 2.0, 10.0);
+ E_CONFIG_LIMIT(e_config->use_pp_zoom, 0, 1);
+ E_CONFIG_LIMIT(e_config->priority_control, 0, 1);
+ E_CONFIG_LIMIT(e_config->comp_canvas_norender.use, 0, 1);
+ E_CONFIG_LIMIT(e_config->qp_ignore_indicator_mode, 0, 1);
+ E_CONFIG_LIMIT(e_config->qp_use_bg_rect, 0, 1);
+ E_CONFIG_LIMIT(e_config->qp_handler.use_alpha, 0, 1);
+ E_CONFIG_LIMIT(e_config->qp_handler.alpha, 0, 255);
+ E_CONFIG_LIMIT(e_config->gesture_service.use_cleanup_timer, 0, 1);
+ E_CONFIG_LIMIT(e_config->configured_output_resolution.use, 0, 1);
+ E_CONFIG_LIMIT(e_config->global_object_not_provide.launch_effect, 0, 1);
+ E_CONFIG_LIMIT(e_config->use_thread_max_cpu, 0, 1);
+ E_CONFIG_LIMIT(e_config->use_desk_area, 0, 1);
+ E_CONFIG_LIMIT(e_config->desk_zoom_effect.enable, 0, 1);
+ E_CONFIG_LIMIT(e_config->desk_zoom_effect.duration, 0.0, 10.0);
+ E_CONFIG_LIMIT(e_config->fake_output_resolution.use, 0, 1);
+ E_CONFIG_LIMIT(e_config->raise_before_show, 0, 1);
+ E_CONFIG_LIMIT(e_config->configured_max_touch.use, 0, 1);
+ // FIXME : What's the proper maximum value for 'configured_max_touch.count' ?
+ E_CONFIG_LIMIT(e_config->configured_max_touch.count, 1, 20);
+ E_CONFIG_LIMIT(e_config->interactive_resize, 0, 1);
+ E_CONFIG_LIMIT(e_config->resize_object.customize, 0, 1);
+ E_CONFIG_LIMIT(e_config->resize_object.r, 0, 255);
+ E_CONFIG_LIMIT(e_config->resize_object.g, 0, 255);
+ E_CONFIG_LIMIT(e_config->resize_object.b, 0, 255);
+ E_CONFIG_LIMIT(e_config->resize_object.a, 0, 255);
+ E_CONFIG_LIMIT(e_config->resize_object.type, 0, 1);
+ E_CONFIG_LIMIT(e_config->resize_object.border_width.l, 0, 128);
+ E_CONFIG_LIMIT(e_config->resize_object.border_width.r, 0, 128);
+ E_CONFIG_LIMIT(e_config->resize_object.border_width.t, 0, 128);
+ E_CONFIG_LIMIT(e_config->resize_object.border_width.b, 0, 128);
+ E_CONFIG_LIMIT(e_config->calc_vis_ignore_geometry, 0, 1);
+ E_CONFIG_LIMIT(e_config->input_thread_mode, 0, 1);
+ E_CONFIG_LIMIT(e_config->key_input_time_limit, 0, 500);
+ E_CONFIG_LIMIT(e_config->key_input_ttrace_enable, 0, 1);
}
-E_API int
+EINTERN int
e_config_save(void)
{
_e_config_save_cb(NULL);
e_config_save_queue(void)
{
// TODO: add ecore_timer_add and call _e_config_save_cb
- _e_config_save_cb(NULL);
+ //_e_config_save_cb(NULL) moved to be called in idle time
+ _e_config_save_queued = 1;
}
-E_API const char *
+EINTERN const char *
e_config_profile_get(void)
{
return _e_config_profile;
}
-E_API void
+EINTERN void
e_config_profile_set(const char *prof)
{
eina_stringshare_replace(&_e_config_profile, prof);
e_util_env_set("E_CONF_PROFILE", _e_config_profile);
}
-E_API char *
+EINTERN char *
e_config_profile_dir_get(const char *prof)
{
char buf[PATH_MAX];
return strcmp(f1, f2);
}
-E_API Eina_List *
+EINTERN Eina_List *
e_config_profile_list(void)
{
Eina_List *files;
return flist;
}
-E_API void
+EINTERN void
e_config_profile_add(const char *prof)
{
char buf[4096];
ecore_file_mkdir(buf);
}
-E_API void
+EINTERN void
e_config_profile_del(const char *prof)
{
char buf[4096];
ecore_file_recursive_rm(buf);
}
-E_API void
+EINTERN void
e_config_save_block_set(int block)
{
_e_config_save_block = block;
}
-E_API int
+EINTERN int
e_config_save_block_get(void)
{
return _e_config_save_block;
}
-/**
- * Loads configurations from file located in the working profile
- * The configurations are stored in a struct declated by the
- * macros E_CONFIG_DD_NEW and E_CONFIG_<b>TYPE</b>
- *
- * @param domain of the configuration file.
- * @param edd to struct definition
- * @return returns allocated struct on success, if unable to find config returns null
- */
-E_API void *
-e_config_domain_load(const char *domain, E_Config_DD *edd)
+void *
+_e_config_domain_user_load(const char *domain, E_Config_DD *edd)
{
Eet_File *ef;
char buf[4096];
_e_config_eet_close_handle(ef, buf);
if (data)
{
- ELOGF("CFG", "Loaded %s", NULL, NULL, buf);
+ ELOGF("CFG", "Loaded %s", NULL, buf);
return data;
}
}
+
+ ELOGF("CFG", "Could not load %s", NULL, buf);
+
+ return data;
+}
+
+/**
+ * Loads configurations from file located in the working profile
+ * The configurations are stored in a struct declated by the
+ * macros E_CONFIG_DD_NEW and E_CONFIG_<b>TYPE</b>
+ *
+ * @param domain of the configuration file.
+ * @param edd to struct definition
+ * @return returns allocated struct on success, if unable to find config returns null
+ */
+E_API void *
+e_config_domain_load(const char *domain, E_Config_DD *edd)
+{
+ if (getenv("E_CONF_RO"))
+ {
+ return e_config_domain_system_load(domain, edd);
+ }
else
{
- ELOGF("CFG", "Could not load %s", NULL, NULL, buf);
+ void *data = _e_config_domain_user_load(domain, edd);
+
+ if (!data)
+ {
+ // load data from system and save it for next loading
+ void *sys_data = e_config_domain_system_load(domain, edd);
+ e_config_domain_save(domain, edd, sys_data);
+ data = _e_config_domain_user_load(domain, edd);
+ }
+ if (data) return data;
+
+ ELOGF("CFG", "Enlightenment has an error again while loading domain %s", NULL, domain);
}
return e_config_domain_system_load(domain, edd);
}
-E_API void *
+EINTERN void *
e_config_domain_system_load(const char *domain, E_Config_DD *edd)
{
Eet_File *ef;
_e_config_eet_close_handle(ef, buf);
if (data)
{
- ELOGF("CFG", "Loaded %s", NULL, NULL, buf);
+ ELOGF("CFG", "Loaded %s", NULL, buf);
return data;
}
- ELOGF("CFG", "Could not read data %s", NULL, NULL, buf);
+ ELOGF("CFG", "Could not read data %s", NULL, buf);
}
- ELOGF("CFG", "Could not load %s", NULL, NULL, buf);
+ ELOGF("CFG", "Could not load %s", NULL, buf);
return data;
}
-#if 0
-static void
-_e_config_mv_error(const char *from, const char *to)
-{
- E_Dialog *dia;
- char buf[8192];
-
- if (_e_config_error_dialog) return;
-
- dia = e_dialog_new(NULL, "E", "_sys_error_logout_slow");
- EINA_SAFETY_ON_NULL_RETURN(dia);
-
- e_dialog_title_set(dia, _("Enlightenment Settings Write Problems"));
- e_dialog_icon_set(dia, "dialog-error", 64);
- snprintf(buf, sizeof(buf),
- _("Enlightenment has had an error while moving config files<br>"
- "from:<br>"
- "%s<br>"
- "<br>"
- "to:<br>"
- "%s<br>"
- "<br>"
- "The rest of the write has been aborted for safety.<br>"),
- from, to);
- e_dialog_text_set(dia, buf);
- e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
- e_dialog_button_focus_num(dia, 0);
- //elm_win_center(dia->win, 1, 1);
- e_object_del_attach_func_set(E_OBJECT(dia),
- _e_config_error_dialog_cb_delete);
- e_dialog_show(dia);
- _e_config_error_dialog = dia;
-}
-#endif
-
-E_API int
+EINTERN int
e_config_profile_save(void)
{
#if 0
return ok;
}
-E_API void
-e_config_mode_changed(void)
-{
- ecore_event_add(E_EVENT_CONFIG_MODE_CHANGED, NULL, NULL, NULL);
-}
-
/* local subsystem functions */
static void
_e_config_save_cb(void *data EINA_UNUSED)
{
E_Config_Module *em;
E_Config_Env_Var *evr;
- E_Config_Desktop_Window_Profile *wp;
+ E_Config_Policy_Desk *pd;
+ E_Config_Socket_Access *sa;
+ E_Config_Aux_Hint_Supported *auxhint;
if (!ecf) return;
- EINA_LIST_FREE(ecf->desktop_window_profiles, wp)
- {
- eina_stringshare_del(wp->profile);
- E_FREE(wp);
- }
-
eina_stringshare_del(ecf->xkb.default_model);
-
- eina_stringshare_del(ecf->wl_sock_access.owner);
- eina_stringshare_del(ecf->wl_sock_access.group);
- eina_stringshare_del(ecf->wl_sock_access.smack.name);
- eina_stringshare_del(ecf->wl_sock_access.smack.value);
-
- eina_stringshare_del(ecf->wl_sock_symlink_access.link_name);
- eina_stringshare_del(ecf->wl_sock_symlink_access.owner);
- eina_stringshare_del(ecf->wl_sock_symlink_access.group);
- eina_stringshare_del(ecf->wl_sock_symlink_access.smack.name);
- eina_stringshare_del(ecf->wl_sock_symlink_access.smack.value);
+ eina_stringshare_del(ecf->xkb.default_rmlvo.rules);
+ eina_stringshare_del(ecf->xkb.default_rmlvo.model);
+ eina_stringshare_del(ecf->xkb.default_rmlvo.layout);
+ eina_stringshare_del(ecf->xkb.default_rmlvo.variant);
+ eina_stringshare_del(ecf->xkb.default_rmlvo.options);
EINA_LIST_FREE(ecf->modules, em)
{
if (ecf->comp_shadow_file) eina_stringshare_del(ecf->comp_shadow_file);
if (ecf->desktop_default_background) eina_stringshare_del(ecf->desktop_default_background);
if (ecf->desktop_default_name) eina_stringshare_del(ecf->desktop_default_name);
- if (ecf->desktop_default_window_profile) eina_stringshare_del(ecf->desktop_default_window_profile);
if (ecf->theme_default_border_style) eina_stringshare_del(ecf->theme_default_border_style);
EINA_LIST_FREE(ecf->env_vars, evr)
{
E_FREE(evr);
}
+ EINA_LIST_FREE(ecf->policy_desks, pd)
+ E_FREE(pd);
+
+ eina_stringshare_del(ecf->launcher.title);
+ eina_stringshare_del(ecf->launcher.clas);
+
+ EINA_LIST_FREE(ecf->sock_accesses, sa)
+ {
+ eina_stringshare_del(sa->sock_access.name);
+ eina_stringshare_del(sa->sock_access.owner);
+ eina_stringshare_del(sa->sock_access.group);
+ eina_stringshare_del(sa->sock_access.smack.name);
+ eina_stringshare_del(sa->sock_access.smack.value);
+ eina_stringshare_del(sa->sock_symlink_access.link_name);
+ eina_stringshare_del(sa->sock_symlink_access.owner);
+ eina_stringshare_del(sa->sock_symlink_access.group);
+ eina_stringshare_del(sa->sock_symlink_access.smack.name);
+ eina_stringshare_del(sa->sock_symlink_access.smack.value);
+ E_FREE(sa);
+ }
+
+ EINA_LIST_FREE(ecf->aux_hint_supported, auxhint)
+ {
+ eina_stringshare_del(auxhint->name);
+ E_FREE(auxhint);
+ }
+
E_FREE(ecf);
}
static Eina_Bool
_e_config_cb_timer(void *data)
{
- e_util_dialog_show(_("Settings Upgraded"), "%s", (char *)data);
return 0;
}
}
if (erstr)
{
- // TODO - yigl
-#if 0
- /* delete any partially-written file */
- ecore_file_unlink(file);
- /* only show dialog for first error - further ones are likely */
- /* more of the same error */
- if (!_e_config_error_dialog)
- {
- E_Dialog *dia;
-
- dia = e_dialog_new(NULL, "E", "_sys_error_logout_slow");
- if (dia)
- {
- char buf[8192];
-
- e_dialog_title_set(dia, _("Enlightenment Settings Write Problems"));
- e_dialog_icon_set(dia, "dialog-error", 64);
- snprintf(buf, sizeof(buf),
- _("Enlightenment has had an error while writing<br>"
- "its config file.<br>"
- "%s<br>"
- "<br>"
- "The file where the error occurred was:<br>"
- "%s<br>"
- "<br>"
- "This file has been deleted to avoid corrupt data.<br>"),
- erstr, file);
- e_dialog_text_set(dia, buf);
- e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
- e_dialog_button_focus_num(dia, 0);
- //elm_win_center(dia->win, 1, 1);
- e_object_del_attach_func_set(E_OBJECT(dia),
- _e_config_error_dialog_cb_delete);
- e_dialog_show(dia);
- _e_config_error_dialog = dia;
- }
- }
+ ELOGF("CFG", "EET ERROR %s", NULL, erstr);
return 0;
-#else
- ELOGF("CFG", "EET ERROR %s", NULL, NULL, erstr);
- return 0;
-#endif
}
return 1;
}