forked from enlightenment/enlightenment
add conf2 options for comp, tiling, notification, fileman, and quickaccess modules
SVN revision: 82079
This commit is contained in:
parent
9e207e6f92
commit
1b215e1cad
|
@ -3,6 +3,7 @@
|
|||
#include "e_mod_config.h"
|
||||
#include "e_mod_comp.h"
|
||||
|
||||
static Eina_Inlist *cfg_opts = NULL;
|
||||
//static Ecore_Event_Handler *init_done_handler = NULL;
|
||||
|
||||
//static int
|
||||
|
@ -27,6 +28,36 @@ EAPI E_Module_Api e_modapi =
|
|||
"Composite"
|
||||
};
|
||||
|
||||
static Eina_List *
|
||||
_e_mod_engine_info_cb(E_Configure_Option *co)
|
||||
{
|
||||
Eina_List *ret = NULL;
|
||||
E_Configure_Option_Info *oi;
|
||||
int x;
|
||||
const char *name[] =
|
||||
{
|
||||
"Software",
|
||||
NULL
|
||||
};
|
||||
|
||||
if (!getenv("ECORE_X_NO_XLIB"))
|
||||
{
|
||||
if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_X11))
|
||||
{
|
||||
name[1] = "OpenGL";
|
||||
}
|
||||
}
|
||||
|
||||
for (x = ENGINE_SW; x <= ENGINE_GL; x++)
|
||||
{
|
||||
if (!name[x - 1]) continue;
|
||||
oi = e_configure_option_info_new(co, _(name[x - 1]), (intptr_t*)(long)x);
|
||||
oi->current = (*(int*)co->valptr == x);
|
||||
ret = eina_list_append(ret, oi);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
EAPI void *
|
||||
e_modapi_init(E_Module *m)
|
||||
{
|
||||
|
@ -92,6 +123,33 @@ e_modapi_init(E_Module *m)
|
|||
|
||||
e_module_delayed_set(m, 0);
|
||||
e_module_priority_set(m, -1000);
|
||||
|
||||
{
|
||||
E_Configure_Option *co;
|
||||
|
||||
E_CONFIGURE_OPTION_ADD(co, CUSTOM, engine, mod->conf, "Composite settings panel", _("composite"), _("border"));
|
||||
co->info = eina_stringshare_add("appearance/comp");
|
||||
E_CONFIGURE_OPTION_ICON(co, buf);
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, vsync, mod->conf, "Tear-free compositing (VSYNC)", _("composite"), _("border"));
|
||||
co->requires_restart = 1;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, smooth_windows, mod->conf, "Smooth scaling of composited window content", _("composite"), _("border"));
|
||||
co->funcs[1].none = co->funcs[0].none = e_mod_comp_shadow_set;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, nocomp_fs, mod->conf, "Don't composite fullscreen windows", _("composite"), _("border"));
|
||||
co->funcs[1].none = co->funcs[0].none = e_mod_comp_shadow_set;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, ENUM, engine, mod->conf, "Compositing engine", _("composite"), _("border"));
|
||||
co->info_cb = _e_mod_engine_info_cb;
|
||||
co->requires_restart = 1;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
|
||||
e_configure_option_category_tag_add(_("windows"), _("composite"));
|
||||
e_configure_option_category_tag_add(_("composite"), _("composite"));
|
||||
e_configure_option_category_icon_set(_("composite"), buf);
|
||||
}
|
||||
|
||||
return mod;
|
||||
}
|
||||
|
||||
|
@ -127,6 +185,11 @@ e_modapi_shutdown(E_Module *m)
|
|||
e_object_del(E_OBJECT(mod->config_dialog));
|
||||
mod->config_dialog = NULL;
|
||||
}
|
||||
|
||||
E_CONFIGURE_OPTION_LIST_CLEAR(cfg_opts);
|
||||
e_configure_option_category_tag_del(_("composite"), _("composite"));
|
||||
e_configure_option_category_tag_del(_("windows"), _("composite"));
|
||||
|
||||
_e_mod_config_free(m);
|
||||
|
||||
E_CONFIG_DD_FREE(mod->conf_match_edd);
|
||||
|
|
|
@ -972,10 +972,15 @@ _e_conf2_content_get_cats(void *data, Evas_Object *obj, const char *part)
|
|||
if (!strcmp(part, "elm.swallow.end")) return NULL;
|
||||
icon = e_configure_option_category_icon_get(data);
|
||||
if (!icon) return NULL;
|
||||
snprintf(buf, sizeof(buf), "e/icons/%s", icon);
|
||||
if (eina_str_has_extension(icon, ".edj"))
|
||||
o = e_util_icon_add(icon, evas_object_evas_get(obj));
|
||||
else
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "e/icons/%s", icon);
|
||||
|
||||
o = e_icon_add(evas_object_evas_get(obj));
|
||||
e_util_icon_theme_set(o, icon);
|
||||
o = e_icon_add(evas_object_evas_get(obj));
|
||||
e_util_icon_theme_set(o, icon);
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ static E_Action *act = NULL;
|
|||
static E_Action *act2 = NULL;
|
||||
static E_Int_Menu_Augmentation *maug = NULL;
|
||||
static Ecore_Event_Handler *zone_add_handler = NULL;
|
||||
static Eina_Inlist *cfg_opts = NULL;
|
||||
|
||||
static E_Config_DD *paths_edd = NULL, *conf_edd = NULL;
|
||||
Config *fileman_config = NULL;
|
||||
|
@ -48,6 +49,8 @@ e_modapi_init(E_Module *m)
|
|||
e_int_config_mime);
|
||||
/* Setup Config edd */
|
||||
_e_mod_fileman_config_load();
|
||||
e_configure_option_category_tag_add(_("files"), _("files"));
|
||||
e_configure_option_category_icon_set(_("files"), "system-file-manager");
|
||||
|
||||
/* add module supplied action */
|
||||
act = e_action_add("fileman");
|
||||
|
@ -156,6 +159,8 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
|
|||
e_configure_registry_category_del("fileman");
|
||||
|
||||
e_config_domain_save("module.fileman", conf_edd, fileman_config);
|
||||
e_configure_option_category_tag_del(_("files"), _("files"));
|
||||
E_CONFIGURE_OPTION_LIST_CLEAR(cfg_opts);
|
||||
_e_mod_fileman_config_free();
|
||||
E_CONFIG_DD_FREE(conf_edd);
|
||||
E_CONFIG_DD_FREE(paths_edd);
|
||||
|
@ -225,6 +230,53 @@ _e_mod_menu_add(void *data __UNUSED__, E_Menu *m)
|
|||
e_mod_menu_add(m, NULL);
|
||||
}
|
||||
|
||||
static Eina_List *
|
||||
_cfg_view_mode_info_cb(E_Configure_Option *co)
|
||||
{
|
||||
Eina_List *ret = NULL;
|
||||
E_Configure_Option_Info *oi;
|
||||
int x;
|
||||
const char *name[] =
|
||||
{
|
||||
"Grid-placed icons", //1
|
||||
"Custom-placed icons", //2
|
||||
NULL, //3
|
||||
NULL, //4
|
||||
"List icons"//5
|
||||
};
|
||||
|
||||
for (x = E_FM2_VIEW_MODE_GRID_ICONS; x <= E_FM2_VIEW_MODE_LIST; x++)
|
||||
{
|
||||
if (!name[x]) continue;
|
||||
oi = e_configure_option_info_new(co, _(name[x - 1]), (intptr_t*)(long)x);
|
||||
oi->current = (*(int*)co->valptr == x);
|
||||
ret = eina_list_append(ret, oi);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static Eina_List *
|
||||
_cfg_toolbar_orient_cb_info_cb(E_Configure_Option *co)
|
||||
{
|
||||
Eina_List *ret = NULL;
|
||||
E_Configure_Option_Info *oi;
|
||||
int x;
|
||||
const char *name[] =
|
||||
{
|
||||
"Top",
|
||||
"Bottom"
|
||||
};
|
||||
|
||||
for (x = E_GADCON_ORIENT_TOP; x <= E_GADCON_ORIENT_BOTTOM; x++)
|
||||
{
|
||||
if (!name[x]) continue;
|
||||
oi = e_configure_option_info_new(co, _(name[x - E_GADCON_ORIENT_TOP]), (intptr_t*)(long)x);
|
||||
oi->current = (*(int*)co->valptr == x);
|
||||
ret = eina_list_append(ret, oi);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Abstract fileman config load/create to one function for maintainability */
|
||||
static void
|
||||
_e_mod_fileman_config_load(void)
|
||||
|
@ -312,6 +364,7 @@ _e_mod_fileman_config_load(void)
|
|||
fileman_config->view.toolbar_orient = E_GADCON_ORIENT_TOP;
|
||||
}
|
||||
fileman_config->config_version = MOD_CONFIG_FILE_VERSION;
|
||||
fileman_config->icon.icon.h = fileman_config->icon.icon.w;
|
||||
|
||||
/* UCHAR's give nasty compile warnings about comparisons so not gonna limit those */
|
||||
E_CONFIG_LIMIT(fileman_config->view.mode, E_FM2_VIEW_MODE_ICONS, E_FM2_VIEW_MODE_LIST);
|
||||
|
@ -326,6 +379,94 @@ _e_mod_fileman_config_load(void)
|
|||
E_CONFIG_LIMIT(fileman_config->icon.max_thumb_size, 0, 1024);
|
||||
|
||||
fileman_config->view.menu_shows_files = 0;
|
||||
|
||||
{
|
||||
E_Configure_Option *co;
|
||||
|
||||
E_CONFIGURE_OPTION_ADD(co, ENUM, view.mode, fileman_config, "Default view mode", _("files"));
|
||||
co->info_cb = _cfg_view_mode_info_cb;
|
||||
E_CONFIGURE_OPTION_ICON(co, "system-file-manager");
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, DOUBLE_INT, icon.icon.w, fileman_config, "Icon size", _("files"), _("image"));
|
||||
E_CONFIGURE_OPTION_MINMAX_STEP_FMT(co, 16, 256, 1, "%1.0f pixels");
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, icon.extension.show, fileman_config, "Show file extensions", _("files"));
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, view.show_full_path, fileman_config, "Show full path in filemanager window titles", _("files"), _("border"));
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, view.show_toolbar, fileman_config, "Show path toolbar in filemanager windows", _("files"));
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, ENUM, view.toolbar_orient, fileman_config, "Filemanager path toolbar position", _("files"));
|
||||
co->info_cb = _cfg_toolbar_orient_cb_info_cb;
|
||||
E_CONFIGURE_OPTION_ICON(co, "system-file-manager");
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, view.show_sidebar, fileman_config, "Show favorites sidebar in filemanager windows", _("files"));
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, list.sort.no_case, fileman_config, "Ignore letter case when sorting files", _("files"));
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, list.sort.extension, fileman_config, "Group files by extension", _("files"));
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, list.sort.mtime, fileman_config, "Sort files by modification time", _("files"));
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, list.sort.size, fileman_config, "Sort files by size", _("files"), _("size"));
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
|
||||
/* FIXME: exclusive */
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, list.sort.dirs.first, fileman_config, "Sort directories first", _("files"));
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, list.sort.dirs.last, fileman_config, "Sort directories last", _("files"));
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
|
||||
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, view.open_dirs_in_place, fileman_config, "Open directories in place", _("files"));
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, view.single_click, fileman_config, "Use single click to open files", _("files"));
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, selection.windows_modifiers, fileman_config, "Use alternate (Mac-style) selection modifiers", _("files"), _("key"));
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, view.desktop_navigation, fileman_config, "Allow navigation on desktop", _("files"));
|
||||
E_CONFIGURE_OPTION_HELP(co, "Normally, icons on the desktop come from $XDG_HOME_DIR/Desktop[-$SCREEN]. "
|
||||
"With this option enabled, the desktop can freely change directories using the Navigate "
|
||||
"menu or type buffer.");
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
|
||||
E_CONFIGURE_OPTION_ADD(co, DOUBLE_UINT, icon.max_thumb_size, fileman_config, "Maximum file size for which thumbnails should be generated", _("files"), _("size"), _("image"));
|
||||
E_CONFIGURE_OPTION_MINMAX_STEP_FMT(co, 0, 512, 1, "%1.0f MiB");
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
|
||||
E_CONFIGURE_OPTION_ADD(co, DOUBLE, view.spring_delay, fileman_config, "Spring folder delay", _("files"), _("delay"));
|
||||
E_CONFIGURE_OPTION_HELP(co, "A \"spring folder\" is the action that occurs when dragging a file onto a folder: "
|
||||
"the folder will \"spring\" open and create a new window to continue the drag operation in.");
|
||||
E_CONFIGURE_OPTION_MINMAX_STEP_FMT(co, 1, 10, 1, "%1.0f seconds");
|
||||
co->funcs[1].none = co->funcs[0].none = e_fwin_reload_all;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
|
||||
E_CONFIGURE_OPTION_ADD(co, CUSTOM, paths, fileman_config, "File icons", _("files"), _("image"));
|
||||
co->info = eina_stringshare_add("fileman/file_icons");
|
||||
E_CONFIGURE_OPTION_ICON(co, "preferences-file-icons");
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
}
|
||||
|
||||
e_config_save_queue();
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@ Config *notification_cfg = NULL;
|
|||
|
||||
static E_Config_DD *conf_edd = NULL;
|
||||
|
||||
static Eina_Inlist *cfg_opts = NULL;
|
||||
|
||||
static unsigned int
|
||||
_notification_notify(E_Notification *n)
|
||||
{
|
||||
|
@ -134,6 +136,29 @@ _notification_cb_initial_mode_timer(Config *m_cfg)
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static Eina_List *
|
||||
_notification_corner_info_cb(E_Configure_Option *co)
|
||||
{
|
||||
Eina_List *ret = NULL;
|
||||
E_Configure_Option_Info *oi;
|
||||
int x;
|
||||
const char *name[] =
|
||||
{
|
||||
"Top left corner",
|
||||
"Top right corner",
|
||||
"Bottom left corner",
|
||||
"Bottom right corner",
|
||||
};
|
||||
|
||||
for (x = 0; x <= CORNER_BR; x++)
|
||||
{
|
||||
oi = e_configure_option_info_new(co, _(name[x]), (intptr_t*)(long)x);
|
||||
oi->current = (*(int*)co->valptr == x);
|
||||
ret = eina_list_append(ret, oi);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Module Api Functions */
|
||||
EAPI E_Module_Api e_modapi = {E_MODULE_API_VERSION, "Notification"};
|
||||
|
||||
|
@ -142,6 +167,7 @@ e_modapi_init(E_Module *m)
|
|||
{
|
||||
E_Notification_Daemon *d;
|
||||
char buf[PATH_MAX];
|
||||
E_Configure_Option *co;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/e-module-notification.edj", m->dir);
|
||||
/* register config panel entry */
|
||||
|
@ -208,6 +234,27 @@ e_modapi_init(E_Module *m)
|
|||
(0.1, (Ecore_Task_Cb)_notification_cb_initial_mode_timer, notification_cfg);
|
||||
|
||||
notification_mod = m;
|
||||
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, show_low, notification_cfg, "Display low urgency notifications", _("notification"));
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, show_normal, notification_cfg, "Display normal urgency notifications", _("notification"));
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, show_critical, notification_cfg, "Display high urgency notifications", _("notification"));
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, force_timeout, notification_cfg, "Force a specified timeout on all notifications", _("notification"), _("delay"));
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, DOUBLE, timeout, notification_cfg, "Timeout to force on notifications", _("notification"), _("delay"));
|
||||
E_CONFIGURE_OPTION_MINMAX_STEP_FMT(co, 0.0, 15.0, 0.1, "%.1f seconds");
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, ENUM, corner, notification_cfg, "Corner in which to display notifications", _("notification"), _("screen"));
|
||||
co->info_cb = _notification_corner_info_cb;
|
||||
E_CONFIGURE_OPTION_ICON(co, buf);
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
|
||||
e_configure_option_category_tag_add(_("screen"), _("notification"));
|
||||
e_configure_option_category_tag_add(_("notification"), _("notification"));
|
||||
e_configure_option_category_icon_set(_("notification"), buf);
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
|
@ -228,6 +275,9 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
|
|||
|
||||
e_notification_daemon_free(notification_cfg->daemon);
|
||||
e_notification_daemon_shutdown();
|
||||
E_CONFIGURE_OPTION_LIST_CLEAR(cfg_opts);
|
||||
e_configure_option_category_tag_del(_("screen"), _("notification"));
|
||||
e_configure_option_category_tag_del(_("notification"), _("notification"));
|
||||
_notification_cfg_free(notification_cfg);
|
||||
E_CONFIG_DD_FREE(conf_edd);
|
||||
notification_mod = NULL;
|
||||
|
|
|
@ -4,7 +4,7 @@ EINTERN int _e_quick_access_log_dom = -1;
|
|||
static E_Config_DD *conf_edd = NULL;
|
||||
Mod *qa_mod = NULL;
|
||||
Config *qa_config = NULL;
|
||||
|
||||
static Eina_Inlist *qa_cfg_opts = NULL;
|
||||
|
||||
/**
|
||||
* in priority order:
|
||||
|
@ -30,6 +30,7 @@ EAPI void *
|
|||
e_modapi_init(E_Module *m)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
E_Configure_Option *co;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/e-module-quickaccess.edj", e_module_dir_get(m));
|
||||
e_configure_registry_category_add("launcher", 80, _("Launcher"), NULL,
|
||||
|
@ -63,6 +64,28 @@ e_modapi_init(E_Module *m)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
E_CONFIGURE_OPTION_ADD(co, CUSTOM, entries, qa_config, "Quickaccess settings panel", _("quickaccess"), _("border"));
|
||||
co->info = eina_stringshare_add("launcher/quickaccess");
|
||||
E_CONFIGURE_OPTION_ICON(co, buf);
|
||||
qa_cfg_opts = eina_inlist_append(qa_cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, hide_when_behind, qa_config, "Hide windows on activate instead of raising", _("quickaccess"), _("border"));
|
||||
E_CONFIGURE_OPTION_HELP(co, "By default, activating a Quickaccess binding when the window is behind other windows will raise the window. "
|
||||
"This option changes that behavior to hide the window instead.");
|
||||
qa_cfg_opts = eina_inlist_append(qa_cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, autohide, qa_config, "Hide windows when focus is lost", _("quickaccess"), _("border"), _("focus"));
|
||||
E_CONFIGURE_OPTION_HELP(co, "This option causes Quickaccess windows to automatically hide when they lose focus");
|
||||
qa_cfg_opts = eina_inlist_append(qa_cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, skip_taskbar, qa_config, "Skip taskbar", _("quickaccess"), _("border"));
|
||||
E_CONFIGURE_OPTION_HELP(co, "This option causes Quickaccess windows to not show up in taskbars");
|
||||
qa_cfg_opts = eina_inlist_append(qa_cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, skip_pager, qa_config, "Skip pager", _("quickaccess"), _("border"));
|
||||
E_CONFIGURE_OPTION_HELP(co, "This option causes Quickaccess windows to not show up in pagers");
|
||||
qa_cfg_opts = eina_inlist_append(qa_cfg_opts, EINA_INLIST_GET(co));
|
||||
|
||||
e_configure_option_category_tag_add(_("windows"), _("quickaccess"));
|
||||
e_configure_option_category_tag_add(_("quickaccess"), _("quickaccess"));
|
||||
e_configure_option_category_icon_set(_("quickaccess"), buf);
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
|
@ -78,6 +101,10 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
|
|||
e_configure_registry_item_del("launcher/quickaccess");
|
||||
e_configure_registry_category_del("launcher");
|
||||
|
||||
E_CONFIGURE_OPTION_LIST_CLEAR(qa_cfg_opts);
|
||||
e_configure_option_category_tag_del(_("quickaccess"), _("quickaccess"));
|
||||
e_configure_option_category_tag_del(_("windows"), _("quickaccess"));
|
||||
|
||||
e_qa_config_free(qa_config);
|
||||
E_FREE(qa_mod);
|
||||
qa_config = NULL;
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#define TILING_RESIZE_STEP 5
|
||||
#define TILING_WRAP_SPEED 0.1
|
||||
|
||||
static Eina_Inlist *cfg_opts = NULL;
|
||||
|
||||
typedef enum {
|
||||
TILING_RESIZE,
|
||||
TILING_MOVE,
|
||||
|
@ -3902,6 +3904,32 @@ e_modapi_init(E_Module *m)
|
|||
_G.currently_switching_desktop = 0;
|
||||
_G.action_cb = NULL;
|
||||
|
||||
{
|
||||
E_Configure_Option *co;
|
||||
|
||||
co = e_configure_option_add(E_CONFIGURE_OPTION_TYPE_CUSTOM, _("Tiling settings"), "tiling", EINA_TRUE, NULL, NULL);
|
||||
e_configure_option_tags_set(co, (const char*[]){_("tiling"), _("border"), NULL}, 0);
|
||||
co->info = eina_stringshare_add("windows/tiling");
|
||||
E_CONFIGURE_OPTION_ICON(co, _G.edj_path);
|
||||
co->funcs[0].one = co->funcs[0].none = e_tiling_update_conf;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, tile_dialogs, tiling_g.config, "Tile dialog windows", _("dialog"), _("tiling"), _("border"), _("placement"));
|
||||
co->funcs[0].one = co->funcs[0].none = e_tiling_update_conf;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, BOOL, show_titles, tiling_g.config, "Show window titles when tiling", _("tiling"), _("border"));
|
||||
co->funcs[0].one = co->funcs[0].none = e_tiling_update_conf;
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
E_CONFIGURE_OPTION_ADD(co, STR, keyhints, tiling_g.config, "Tiling key hints", _("key"), _("tiling"));
|
||||
co->funcs[0].one = co->funcs[0].none = e_tiling_update_conf;
|
||||
E_CONFIGURE_OPTION_ICON(co, _G.edj_path);
|
||||
cfg_opts = eina_inlist_append(cfg_opts, EINA_INLIST_GET(co));
|
||||
|
||||
e_configure_option_category_tag_add(_("windows"), _("tiling"));
|
||||
e_configure_option_category_tag_add(_("tiling"), _("tiling"));
|
||||
e_configure_option_category_icon_set(_("tiling"), _G.edj_path);
|
||||
}
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
|
@ -4022,6 +4050,19 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
|
|||
|
||||
end_special_input();
|
||||
|
||||
while (cfg_opts)
|
||||
{
|
||||
E_Configure_Option *co;
|
||||
|
||||
co = (E_Configure_Option*)cfg_opts;
|
||||
cfg_opts = eina_inlist_remove(cfg_opts, EINA_INLIST_GET(co));
|
||||
e_configure_option_del(co);
|
||||
}
|
||||
|
||||
e_configure_option_category_icon_set(_("tiling"), _G.edj_path);
|
||||
e_configure_option_category_tag_del(_("border"), _("tiling"));
|
||||
e_configure_option_category_tag_del(_("tiling"), _("tiling"));
|
||||
|
||||
free(tiling_g.config->keyhints);
|
||||
E_FREE(tiling_g.config);
|
||||
E_CONFIG_DD_FREE(_G.config_edd);
|
||||
|
|
Loading…
Reference in New Issue