forked from enlightenment/enlightenment
reopen fileman and dialog windows after restart of e.
- modules using e_configure_registry_add must be modified to use registry path as window class for this to work - fileman now uses e_remember to remember position instead of handling it separately - added option to window remember for remembering dialogs and fileman windows automatically SVN revision: 42607
This commit is contained in:
parent
74c9efaa78
commit
91211ef9c4
|
@ -1046,7 +1046,7 @@ e_config_load(void)
|
|||
E_CONFIG_LIMIT(e_config->desk_flip_pan_bg, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->desk_flip_pan_x_axis_factor, 0.0, 1.0);
|
||||
E_CONFIG_LIMIT(e_config->desk_flip_pan_y_axis_factor, 0.0, 1.0);
|
||||
E_CONFIG_LIMIT(e_config->remember_internal_windows, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->remember_internal_windows, 0, 3);
|
||||
E_CONFIG_LIMIT(e_config->desk_auto_switch, 0, 1);
|
||||
|
||||
E_CONFIG_LIMIT(e_config->dpms_enable, 0, 1);
|
||||
|
|
|
@ -167,11 +167,12 @@ _e_config_dialog_go(E_Config_Dialog *cfd, E_Config_Dialog_CFData_Type type)
|
|||
|
||||
pdia = cfd->dia;
|
||||
/* FIXME: get name/class form new call and use here */
|
||||
if (type == E_CONFIG_DIALOG_CFDATA_TYPE_BASIC)
|
||||
snprintf(buf, sizeof(buf), "%s...%s", cfd->class, "BASIC");
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "%s...%s", cfd->class, "ADVANCED");
|
||||
|
||||
/* if (type == E_CONFIG_DIALOG_CFDATA_TYPE_BASIC)
|
||||
* snprintf(buf, sizeof(buf), "%s...%s", cfd->class, "BASIC");
|
||||
* else
|
||||
* snprintf(buf, sizeof(buf), "%s...%s", cfd->class, "ADVANCED"); */
|
||||
snprintf(buf, sizeof(buf), "_config::%s", cfd->class);
|
||||
|
||||
if (!pdia) /* creating window for the first time */
|
||||
{
|
||||
if ((cfd->view->normal_win) || (e_config->cfgdlg_normal_wins))
|
||||
|
|
|
@ -213,7 +213,7 @@ _e_desktop_edit_view_create(E_Desktop_Edit *editor, E_Container *con)
|
|||
|
||||
editor->cfd =
|
||||
e_config_dialog_new(con, _("Desktop Entry Editor"), "E",
|
||||
"_desktop_editor_dialog",
|
||||
"applications/new_application",
|
||||
"preferences-applications", 0, v, editor);
|
||||
|
||||
if (!editor->cfd)
|
||||
|
|
|
@ -818,16 +818,6 @@ main(int argc, char **argv)
|
|||
}
|
||||
_e_main_shutdown_push(e_exec_shutdown);
|
||||
|
||||
e_init_status_set(_("Setup Remembers"));
|
||||
TS("remember");
|
||||
/* do remember stuff */
|
||||
if (!e_remember_init(after_restart ? E_STARTUP_RESTART: E_STARTUP_START))
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot setup remember settings."));
|
||||
_e_main_shutdown(-1);
|
||||
}
|
||||
_e_main_shutdown_push(e_remember_shutdown);
|
||||
|
||||
TS("container freeze");
|
||||
e_container_all_freeze();
|
||||
|
||||
|
@ -891,6 +881,16 @@ main(int argc, char **argv)
|
|||
}
|
||||
_e_main_shutdown_push(e_module_shutdown);
|
||||
|
||||
e_init_status_set(_("Setup Remembers"));
|
||||
TS("remember");
|
||||
/* do remember stuff */
|
||||
if (!e_remember_init(after_restart ? E_STARTUP_RESTART: E_STARTUP_START))
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot setup remember settings."));
|
||||
_e_main_shutdown(-1);
|
||||
}
|
||||
_e_main_shutdown_push(e_remember_shutdown);
|
||||
|
||||
e_init_status_set(_("Setup Color Classes"));
|
||||
TS("colorclasses");
|
||||
/* setup color_class */
|
||||
|
@ -1084,6 +1084,8 @@ main(int argc, char **argv)
|
|||
/* Store current selected desktops */
|
||||
_e_main_desk_save();
|
||||
|
||||
e_remember_internal_save();
|
||||
|
||||
/* unroll our stack of shutdown functions with exit code of 0 */
|
||||
_e_main_shutdown(0);
|
||||
|
||||
|
|
|
@ -24,12 +24,14 @@ static Ecore_Idler *_e_module_idler = NULL;
|
|||
static Eina_List *_e_modules_delayed = NULL;
|
||||
|
||||
EAPI int E_EVENT_MODULE_UPDATE = 0;
|
||||
EAPI int E_EVENT_MODULE_INIT_END = 0;
|
||||
|
||||
/* externally accessible functions */
|
||||
EAPI int
|
||||
e_module_init(void)
|
||||
{
|
||||
E_EVENT_MODULE_UPDATE = ecore_event_type_new();
|
||||
E_EVENT_MODULE_INIT_END = ecore_event_type_new();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -91,6 +93,11 @@ e_module_all_load(void)
|
|||
if (m) e_module_enable(m);
|
||||
}
|
||||
}
|
||||
|
||||
if (!_e_modules_delayed)
|
||||
{
|
||||
ecore_event_add(E_EVENT_MODULE_INIT_END, NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
EAPI E_Module *
|
||||
|
@ -514,16 +521,6 @@ _e_module_cb_dialog_disable(void *data, E_Dialog *dia)
|
|||
e_config_save_queue();
|
||||
}
|
||||
|
||||
static void
|
||||
_e_module_event_update_free(void *data, void *event)
|
||||
{
|
||||
E_Event_Module_Update *ev;
|
||||
|
||||
if (!(ev = event)) return;
|
||||
E_FREE(ev->name);
|
||||
E_FREE(ev);
|
||||
}
|
||||
|
||||
static int
|
||||
_e_module_cb_idler(void *data)
|
||||
{
|
||||
|
@ -539,7 +536,14 @@ _e_module_cb_idler(void *data)
|
|||
if (m) e_module_enable(m);
|
||||
eina_stringshare_del(name);
|
||||
}
|
||||
if (_e_modules_delayed) return 1;
|
||||
if (_e_modules_delayed)
|
||||
{
|
||||
e_util_wakeup();
|
||||
return 1;
|
||||
}
|
||||
|
||||
ecore_event_add(E_EVENT_MODULE_INIT_END, NULL, NULL, NULL);
|
||||
|
||||
_e_module_idler = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
@ -553,3 +557,14 @@ _e_module_sort_priority(const void *d1, const void *d2)
|
|||
m2 = d2;
|
||||
return (m2->priority - m1->priority);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_e_module_event_update_free(void *data, void *event)
|
||||
{
|
||||
E_Event_Module_Update *ev;
|
||||
|
||||
if (!(ev = event)) return;
|
||||
E_FREE(ev->name);
|
||||
E_FREE(ev);
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ typedef struct _E_Event_Module_Update E_Event_Module_Update;
|
|||
#define E_MODULE_TYPE 0xE0b0100b
|
||||
|
||||
extern EAPI int E_EVENT_MODULE_UPDATE;
|
||||
extern EAPI int E_EVENT_MODULE_INIT_END;
|
||||
|
||||
struct _E_Event_Module_Update
|
||||
{
|
||||
|
|
|
@ -6,16 +6,32 @@
|
|||
#define REMEMBER_HIERARCHY 1
|
||||
#define REMEMBER_SIMPLE 0
|
||||
|
||||
typedef struct _E_Remember_List E_Remember_List;
|
||||
|
||||
|
||||
struct _E_Remember_List
|
||||
{
|
||||
Eina_List *list;
|
||||
};
|
||||
|
||||
/* local subsystem functions */
|
||||
static void _e_remember_free(E_Remember *rem);
|
||||
static void _e_remember_update(E_Border *bd, E_Remember *rem);
|
||||
static E_Remember *_e_remember_find(E_Border *bd, int check_usable);
|
||||
static void _e_remember_cb_hook_pre_post_fetch(void *data, void *bd);
|
||||
static void _e_remember_cb_hook_eval_post_new_border(void *data, void *bd);
|
||||
static Eina_List *hooks = NULL;
|
||||
|
||||
/* FIXME: match netwm window type */
|
||||
static void _e_remember_init_edd(void);
|
||||
static int _e_remember_restore_cb(void *data, int type, void *event);
|
||||
|
||||
/* local subsystem globals */
|
||||
static Eina_List *hooks = NULL;
|
||||
static E_Config_DD *e_remember_edd = NULL;
|
||||
static E_Config_DD *e_remember_list_edd = NULL;
|
||||
static E_Remember_List *remembers = NULL;
|
||||
static Eina_List *handlers = NULL;
|
||||
|
||||
/* static Eina_List *e_remember_restart_list = NULL; */
|
||||
|
||||
|
||||
/* externally accessible functions */
|
||||
EAPI int
|
||||
|
@ -41,6 +57,16 @@ e_remember_init(E_Startup_Mode mode)
|
|||
_e_remember_cb_hook_eval_post_new_border, NULL);
|
||||
if (h) hooks = eina_list_append(hooks, h);
|
||||
|
||||
_e_remember_init_edd();
|
||||
remembers = e_config_domain_load("e_remember_restart", e_remember_list_edd);
|
||||
|
||||
if (remembers)
|
||||
{
|
||||
handlers = eina_list_append
|
||||
(handlers, ecore_event_handler_add
|
||||
(E_EVENT_MODULE_INIT_END, _e_remember_restore_cb, NULL));
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -48,13 +74,118 @@ EAPI int
|
|||
e_remember_shutdown(void)
|
||||
{
|
||||
E_Border_Hook *h;
|
||||
|
||||
Ecore_Event_Handler *hh;
|
||||
|
||||
EINA_LIST_FREE(hooks, h)
|
||||
e_border_hook_del(h);
|
||||
|
||||
E_CONFIG_DD_FREE(e_remember_edd);
|
||||
E_CONFIG_DD_FREE(e_remember_list_edd);
|
||||
|
||||
EINA_LIST_FREE(handlers, hh)
|
||||
ecore_event_handler_del(hh);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_remember_internal_save(void)
|
||||
{
|
||||
Eina_List *l;
|
||||
E_Border *bd;
|
||||
E_Remember *rem;
|
||||
|
||||
//printf("internal save %d\n", restart);
|
||||
if (!remembers)
|
||||
remembers = E_NEW(E_Remember_List, 1);
|
||||
else
|
||||
{
|
||||
EINA_LIST_FREE(remembers->list, rem)
|
||||
_e_remember_free(rem);
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(e_border_client_list(), l, bd)
|
||||
{
|
||||
if (!bd->internal) continue;
|
||||
|
||||
rem = E_NEW(E_Remember, 1);
|
||||
if (!rem) break;
|
||||
|
||||
e_remember_default_match_set(rem, bd);
|
||||
rem->apply = (E_REMEMBER_APPLY_POS | E_REMEMBER_APPLY_SIZE |
|
||||
E_REMEMBER_APPLY_BORDER | E_REMEMBER_APPLY_LAYER |
|
||||
E_REMEMBER_APPLY_SHADE | E_REMEMBER_APPLY_ZONE |
|
||||
E_REMEMBER_APPLY_DESKTOP | E_REMEMBER_APPLY_LOCKS |
|
||||
E_REMEMBER_APPLY_SKIP_WINLIST |
|
||||
E_REMEMBER_APPLY_SKIP_PAGER |
|
||||
E_REMEMBER_APPLY_SKIP_TASKBAR);
|
||||
_e_remember_update(bd, rem);
|
||||
|
||||
remembers->list = eina_list_append(remembers->list, rem);
|
||||
}
|
||||
|
||||
e_config_domain_save("e_remember_restart", e_remember_list_edd, remembers);
|
||||
}
|
||||
|
||||
static int
|
||||
_e_remember_restore_cb(void *data, int type, void *event)
|
||||
{
|
||||
E_Remember *rem;
|
||||
Eina_List *l;
|
||||
E_Action *act_fm, *act;
|
||||
const char *path;
|
||||
E_Container *con;
|
||||
|
||||
act_fm = e_action_find("fileman");
|
||||
|
||||
con = e_container_current_get(e_manager_current_get());
|
||||
|
||||
EINA_LIST_FOREACH(remembers->list, l, rem)
|
||||
{
|
||||
if (!rem->class) continue;
|
||||
//printf("internal restore %s\n", rem->class);
|
||||
|
||||
if (!strncmp(rem->class, "e_fwin::", 8))
|
||||
{
|
||||
//printf("internal restore fm %p\n", (void *) act_fm);
|
||||
if (!act_fm)
|
||||
continue;
|
||||
if (!strlen(rem->class) > 8)
|
||||
continue;
|
||||
|
||||
path = rem->class + 8;
|
||||
|
||||
act_fm->func.go(NULL, path);
|
||||
}
|
||||
else if (!strncmp(rem->class, "_config::", 9))
|
||||
{
|
||||
/* TODO parse _config::params::path */
|
||||
path = rem->class + 9;
|
||||
//printf("internal restore config %s\n", path);
|
||||
if (e_configure_registry_exists(path))
|
||||
{
|
||||
e_configure_registry_call(path, con, NULL);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(rem->class, "_configure"))
|
||||
{
|
||||
/* TODO this is just for settings panel. it could also
|
||||
use e_configure_registry_item_add */
|
||||
/* ..or make a general path for window that are started
|
||||
by actions */
|
||||
|
||||
act = e_action_find("configuration");
|
||||
if (act)
|
||||
act->func.go(NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (handlers) eina_list_free(handlers);
|
||||
handlers = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
EAPI E_Remember *
|
||||
e_remember_new(void)
|
||||
{
|
||||
|
@ -213,16 +344,16 @@ e_remember_default_match_set(E_Remember *rem, E_Border *bd)
|
|||
EAPI void
|
||||
e_remember_update(E_Border *bd)
|
||||
{
|
||||
E_Remember *rem;
|
||||
|
||||
if (bd->new_client) return;
|
||||
if (!bd->remember) return;
|
||||
if (bd->remember->keep_settings) return;
|
||||
|
||||
rem = bd->remember;
|
||||
|
||||
/* e_remember_match_update(rem); */
|
||||
_e_remember_update(bd, bd->remember);
|
||||
e_config_save_queue();
|
||||
}
|
||||
|
||||
static void
|
||||
_e_remember_update(E_Border *bd, E_Remember *rem)
|
||||
{
|
||||
if (rem->apply & E_REMEMBER_APPLY_POS ||
|
||||
rem->apply & E_REMEMBER_APPLY_SIZE)
|
||||
{
|
||||
|
@ -304,8 +435,6 @@ e_remember_update(E_Border *bd)
|
|||
e_desk_xy_get(bd->desk, &rem->prop.desk_x, &rem->prop.desk_y);
|
||||
if (rem->apply & E_REMEMBER_APPLY_FULLSCREEN)
|
||||
rem->prop.fullscreen = bd->fullscreen;
|
||||
|
||||
e_config_save_queue();
|
||||
}
|
||||
|
||||
/* local subsystem functions */
|
||||
|
@ -423,12 +552,51 @@ _e_remember_free(E_Remember *rem)
|
|||
free(rem);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_remember_cb_hook_eval_post_new_border(void *data, void *border)
|
||||
{
|
||||
E_Border *bd = border;
|
||||
|
||||
if (!bd->new_client) return;
|
||||
|
||||
if ((bd->internal) && (!bd->remember) &&
|
||||
(e_config->remember_internal_windows) &&
|
||||
(!bd->internal_no_remember) &&
|
||||
(bd->client.icccm.class && bd->client.icccm.class[0]))
|
||||
{
|
||||
E_Remember *rem;
|
||||
|
||||
if (!strncmp(bd->client.icccm.class, "e_fwin", 6))
|
||||
{
|
||||
if (!(e_config->remember_internal_windows & E_REMEMBER_INTERNAL_FM_WINS))
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(e_config->remember_internal_windows & E_REMEMBER_INTERNAL_DIALOGS))
|
||||
return;
|
||||
}
|
||||
|
||||
rem = e_remember_new();
|
||||
if (!rem) return;
|
||||
|
||||
e_remember_default_match_set(rem, bd);
|
||||
|
||||
rem->apply = E_REMEMBER_APPLY_POS | E_REMEMBER_APPLY_SIZE | E_REMEMBER_APPLY_BORDER;
|
||||
|
||||
e_remember_use(rem);
|
||||
e_remember_update(bd);
|
||||
bd->remember = rem;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_e_remember_cb_hook_pre_post_fetch(void *data, void *border)
|
||||
{
|
||||
E_Border *bd = border;
|
||||
E_Remember *rem = NULL;
|
||||
|
||||
int temporary = 0;
|
||||
|
||||
if (!bd->new_client) return;
|
||||
|
||||
if (!bd->remember)
|
||||
|
@ -440,256 +608,326 @@ _e_remember_cb_hook_pre_post_fetch(void *data, void *border)
|
|||
e_remember_use(rem);
|
||||
}
|
||||
}
|
||||
if (bd->remember)
|
||||
|
||||
if (bd->internal && remembers && bd->client.icccm.class)
|
||||
{
|
||||
rem = bd->remember;
|
||||
|
||||
if (rem->apply & E_REMEMBER_APPLY_ZONE)
|
||||
Eina_List *l;
|
||||
EINA_LIST_FOREACH(remembers->list, l, rem)
|
||||
{
|
||||
E_Zone *zone;
|
||||
|
||||
zone = e_container_zone_number_get(bd->zone->container, rem->prop.zone);
|
||||
if (zone)
|
||||
e_border_zone_set(bd, zone);
|
||||
if (!strcmp(rem->class, bd->client.icccm.class))
|
||||
break;
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_DESKTOP)
|
||||
if (rem)
|
||||
{
|
||||
E_Desk *desk;
|
||||
temporary = 1;
|
||||
remembers->list = eina_list_remove(remembers->list, rem);
|
||||
}
|
||||
else rem = bd->remember;
|
||||
}
|
||||
|
||||
if (!rem)
|
||||
return;
|
||||
|
||||
desk = e_desk_at_xy_get(bd->zone, rem->prop.desk_x, rem->prop.desk_y);
|
||||
if (desk)
|
||||
{
|
||||
e_border_desk_set(bd, desk);
|
||||
if (e_config->desk_auto_switch)
|
||||
e_desk_show(desk);
|
||||
}
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_SIZE)
|
||||
if (rem->apply & E_REMEMBER_APPLY_ZONE)
|
||||
{
|
||||
E_Zone *zone;
|
||||
|
||||
zone = e_container_zone_number_get(bd->zone->container, rem->prop.zone);
|
||||
if (zone)
|
||||
e_border_zone_set(bd, zone);
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_DESKTOP)
|
||||
{
|
||||
E_Desk *desk;
|
||||
|
||||
desk = e_desk_at_xy_get(bd->zone, rem->prop.desk_x, rem->prop.desk_y);
|
||||
if (desk)
|
||||
{
|
||||
bd->client.w = rem->prop.w;
|
||||
bd->client.h = rem->prop.h;
|
||||
/* we can trust internal windows */
|
||||
if (bd->internal)
|
||||
{
|
||||
if (bd->zone->w != rem->prop.res_x)
|
||||
{
|
||||
if (bd->client.w > (bd->zone->w - 64))
|
||||
bd->client.w = bd->zone->w - 64;
|
||||
}
|
||||
if (bd->zone->h != rem->prop.res_y)
|
||||
{
|
||||
if (bd->client.h > (bd->zone->h - 64))
|
||||
bd->client.h = bd->zone->h - 64;
|
||||
}
|
||||
if (bd->client.icccm.min_w > bd->client.w)
|
||||
bd->client.w = bd->client.icccm.min_w;
|
||||
if (bd->client.icccm.max_w < bd->client.w)
|
||||
bd->client.w = bd->client.icccm.max_w;
|
||||
if (bd->client.icccm.min_h > bd->client.h)
|
||||
bd->client.h = bd->client.icccm.min_h;
|
||||
if (bd->client.icccm.max_h < bd->client.h)
|
||||
bd->client.h = bd->client.icccm.max_h;
|
||||
}
|
||||
bd->w = bd->client.w + bd->client_inset.l + bd->client_inset.r;
|
||||
bd->h = bd->client.h + bd->client_inset.t + bd->client_inset.b;
|
||||
bd->changes.size = 1;
|
||||
bd->changes.shape = 1;
|
||||
e_border_desk_set(bd, desk);
|
||||
if (e_config->desk_auto_switch)
|
||||
e_desk_show(desk);
|
||||
}
|
||||
if ((rem->apply & E_REMEMBER_APPLY_POS) && (!bd->re_manage))
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_SIZE)
|
||||
{
|
||||
bd->client.w = rem->prop.w;
|
||||
bd->client.h = rem->prop.h;
|
||||
/* we can trust internal windows */
|
||||
if (bd->internal)
|
||||
{
|
||||
bd->x = rem->prop.pos_x;
|
||||
bd->y = rem->prop.pos_y;
|
||||
if (bd->zone->w != rem->prop.res_x)
|
||||
{
|
||||
int px;
|
||||
|
||||
px = bd->x + (bd->w / 2);
|
||||
if (px < ((rem->prop.res_x * 1) / 3))
|
||||
{
|
||||
if (bd->zone->w >= (rem->prop.res_x / 3))
|
||||
bd->x = rem->prop.pos_x;
|
||||
else
|
||||
bd->x = ((rem->prop.pos_x - 0) * bd->zone->w) /
|
||||
(rem->prop.res_x / 3);
|
||||
}
|
||||
else if (px < ((rem->prop.res_x * 2) / 3))
|
||||
{
|
||||
if (bd->zone->w >= (rem->prop.res_x / 3))
|
||||
bd->x = (bd->zone->w / 2) +
|
||||
(px - (rem->prop.res_x / 2)) -
|
||||
(bd->w / 2);
|
||||
else
|
||||
bd->x = (bd->zone->w / 2) +
|
||||
(((px - (rem->prop.res_x / 2)) * bd->zone->w) /
|
||||
(rem->prop.res_x / 3)) -
|
||||
(bd->w / 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bd->zone->w >= (rem->prop.res_x / 3))
|
||||
bd->x = bd->zone->w +
|
||||
rem->prop.pos_x - rem->prop.res_x +
|
||||
(rem->prop.w - bd->client.w);
|
||||
else
|
||||
bd->x = bd->zone->w +
|
||||
(((rem->prop.pos_x - rem->prop.res_x) * bd->zone->w) /
|
||||
(rem->prop.res_x / 3)) +
|
||||
(rem->prop.w - bd->client.w);
|
||||
}
|
||||
if ((rem->prop.pos_x >= 0) && (bd->x < 0))
|
||||
bd->x = 0;
|
||||
else if (((rem->prop.pos_x + rem->prop.w) < rem->prop.res_x) &&
|
||||
((bd->x + bd->w) > bd->zone->w))
|
||||
bd->x = bd->zone->w - bd->w;
|
||||
if (bd->client.w > (bd->zone->w - 64))
|
||||
bd->client.w = bd->zone->w - 64;
|
||||
}
|
||||
if (bd->zone->h != rem->prop.res_y)
|
||||
{
|
||||
int py;
|
||||
|
||||
py = bd->y + (bd->h / 2);
|
||||
if (py < ((rem->prop.res_y * 1) / 3))
|
||||
{
|
||||
if (bd->zone->h >= (rem->prop.res_y / 3))
|
||||
bd->y = rem->prop.pos_y;
|
||||
else
|
||||
bd->y = ((rem->prop.pos_y - 0) * bd->zone->h) /
|
||||
(rem->prop.res_y / 3);
|
||||
}
|
||||
else if (py < ((rem->prop.res_y * 2) / 3))
|
||||
{
|
||||
if (bd->zone->h >= (rem->prop.res_y / 3))
|
||||
bd->y = (bd->zone->h / 2) +
|
||||
(py - (rem->prop.res_y / 2)) -
|
||||
(bd->h / 2);
|
||||
else
|
||||
bd->y = (bd->zone->h / 2) +
|
||||
(((py - (rem->prop.res_y / 2)) * bd->zone->h) /
|
||||
(rem->prop.res_y / 3)) -
|
||||
(bd->h / 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bd->zone->h >= (rem->prop.res_y / 3))
|
||||
bd->y = bd->zone->h +
|
||||
rem->prop.pos_y - rem->prop.res_y +
|
||||
(rem->prop.h - bd->client.h);
|
||||
else
|
||||
bd->y = bd->zone->h +
|
||||
(((rem->prop.pos_y - rem->prop.res_y) * bd->zone->h) /
|
||||
(rem->prop.res_y / 3)) +
|
||||
(rem->prop.h - bd->client.h);
|
||||
}
|
||||
if ((rem->prop.pos_y >= 0) && (bd->y < 0))
|
||||
bd->y = 0;
|
||||
else if (((rem->prop.pos_y + rem->prop.h) < rem->prop.res_y) &&
|
||||
((bd->y + bd->h) > bd->zone->h))
|
||||
bd->y = bd->zone->h - bd->h;
|
||||
if (bd->client.h > (bd->zone->h - 64))
|
||||
bd->client.h = bd->zone->h - 64;
|
||||
}
|
||||
// if (bd->zone->w != rem->prop.res_x)
|
||||
// bd->x = (rem->prop.pos_x * bd->zone->w) / rem->prop.res_x;
|
||||
// if (bd->zone->h != rem->prop.res_y)
|
||||
// bd->y = (rem->prop.pos_y * bd->zone->h) / rem->prop.res_y;
|
||||
bd->x += bd->zone->x;
|
||||
bd->y += bd->zone->y;
|
||||
bd->placed = 1;
|
||||
bd->changes.pos = 1;
|
||||
if (bd->client.icccm.min_w > bd->client.w)
|
||||
bd->client.w = bd->client.icccm.min_w;
|
||||
if (bd->client.icccm.max_w < bd->client.w)
|
||||
bd->client.w = bd->client.icccm.max_w;
|
||||
if (bd->client.icccm.min_h > bd->client.h)
|
||||
bd->client.h = bd->client.icccm.min_h;
|
||||
if (bd->client.icccm.max_h < bd->client.h)
|
||||
bd->client.h = bd->client.icccm.max_h;
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_LAYER)
|
||||
{
|
||||
bd->layer = rem->prop.layer;
|
||||
if (bd->layer == 100)
|
||||
e_hints_window_stacking_set(bd, E_STACKING_NONE);
|
||||
else if (bd->layer == 150)
|
||||
e_hints_window_stacking_set(bd, E_STACKING_ABOVE);
|
||||
e_container_border_raise(bd);
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_BORDER)
|
||||
{
|
||||
if (rem->prop.border)
|
||||
{
|
||||
if (bd->bordername) eina_stringshare_del(bd->bordername);
|
||||
if (rem->prop.border) bd->bordername = eina_stringshare_add(rem->prop.border);
|
||||
else bd->bordername = NULL;
|
||||
bd->client.border.changed = 1;
|
||||
}
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_FULLSCREEN)
|
||||
{
|
||||
if (rem->prop.fullscreen)
|
||||
e_border_fullscreen(bd, e_config->fullscreen_policy);
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_STICKY)
|
||||
{
|
||||
if (rem->prop.sticky) e_border_stick(bd);
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_SHADE)
|
||||
{
|
||||
if (rem->prop.shaded >= 100)
|
||||
e_border_shade(bd, rem->prop.shaded - 100);
|
||||
else if (rem->prop.shaded >= 50)
|
||||
e_border_unshade(bd, rem->prop.shaded - 50);
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_LOCKS)
|
||||
{
|
||||
bd->lock_user_location = rem->prop.lock_user_location;
|
||||
bd->lock_client_location = rem->prop.lock_client_location;
|
||||
bd->lock_user_size = rem->prop.lock_user_size;
|
||||
bd->lock_client_size = rem->prop.lock_client_size;
|
||||
bd->lock_user_stacking = rem->prop.lock_user_stacking;
|
||||
bd->lock_client_stacking = rem->prop.lock_client_stacking;
|
||||
bd->lock_user_iconify = rem->prop.lock_user_iconify;
|
||||
bd->lock_client_iconify = rem->prop.lock_client_iconify;
|
||||
bd->lock_user_desk = rem->prop.lock_user_desk;
|
||||
bd->lock_client_desk = rem->prop.lock_client_desk;
|
||||
bd->lock_user_sticky = rem->prop.lock_user_sticky;
|
||||
bd->lock_client_sticky = rem->prop.lock_client_sticky;
|
||||
bd->lock_user_shade = rem->prop.lock_user_shade;
|
||||
bd->lock_client_shade = rem->prop.lock_client_shade;
|
||||
bd->lock_user_maximize = rem->prop.lock_user_maximize;
|
||||
bd->lock_client_maximize = rem->prop.lock_client_maximize;
|
||||
bd->lock_user_fullscreen = rem->prop.lock_user_fullscreen;
|
||||
bd->lock_client_fullscreen = rem->prop.lock_client_fullscreen;
|
||||
bd->lock_border = rem->prop.lock_border;
|
||||
bd->lock_close = rem->prop.lock_close;
|
||||
bd->lock_focus_in = rem->prop.lock_focus_in;
|
||||
bd->lock_focus_out = rem->prop.lock_focus_out;
|
||||
bd->lock_life = rem->prop.lock_life;
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_SKIP_WINLIST)
|
||||
bd->user_skip_winlist = rem->prop.skip_winlist;
|
||||
if (rem->apply & E_REMEMBER_APPLY_SKIP_PAGER)
|
||||
bd->client.netwm.state.skip_pager = rem->prop.skip_pager;
|
||||
if (rem->apply & E_REMEMBER_APPLY_SKIP_TASKBAR)
|
||||
bd->client.netwm.state.skip_taskbar = rem->prop.skip_taskbar;
|
||||
if (rem->apply & E_REMEMBER_APPLY_ICON_PREF)
|
||||
bd->icon_preference = rem->prop.icon_preference;
|
||||
if (rem->apply & E_REMEMBER_SET_FOCUS_ON_START)
|
||||
bd->want_focus = 1;
|
||||
bd->w = bd->client.w + bd->client_inset.l + bd->client_inset.r;
|
||||
bd->h = bd->client.h + bd->client_inset.t + bd->client_inset.b;
|
||||
bd->changes.size = 1;
|
||||
bd->changes.shape = 1;
|
||||
}
|
||||
if ((rem->apply & E_REMEMBER_APPLY_POS) && (!bd->re_manage))
|
||||
{
|
||||
bd->x = rem->prop.pos_x;
|
||||
bd->y = rem->prop.pos_y;
|
||||
if (bd->zone->w != rem->prop.res_x)
|
||||
{
|
||||
int px;
|
||||
|
||||
px = bd->x + (bd->w / 2);
|
||||
if (px < ((rem->prop.res_x * 1) / 3))
|
||||
{
|
||||
if (bd->zone->w >= (rem->prop.res_x / 3))
|
||||
bd->x = rem->prop.pos_x;
|
||||
else
|
||||
bd->x = ((rem->prop.pos_x - 0) * bd->zone->w) /
|
||||
(rem->prop.res_x / 3);
|
||||
}
|
||||
else if (px < ((rem->prop.res_x * 2) / 3))
|
||||
{
|
||||
if (bd->zone->w >= (rem->prop.res_x / 3))
|
||||
bd->x = (bd->zone->w / 2) +
|
||||
(px - (rem->prop.res_x / 2)) -
|
||||
(bd->w / 2);
|
||||
else
|
||||
bd->x = (bd->zone->w / 2) +
|
||||
(((px - (rem->prop.res_x / 2)) * bd->zone->w) /
|
||||
(rem->prop.res_x / 3)) -
|
||||
(bd->w / 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bd->zone->w >= (rem->prop.res_x / 3))
|
||||
bd->x = bd->zone->w +
|
||||
rem->prop.pos_x - rem->prop.res_x +
|
||||
(rem->prop.w - bd->client.w);
|
||||
else
|
||||
bd->x = bd->zone->w +
|
||||
(((rem->prop.pos_x - rem->prop.res_x) * bd->zone->w) /
|
||||
(rem->prop.res_x / 3)) +
|
||||
(rem->prop.w - bd->client.w);
|
||||
}
|
||||
if ((rem->prop.pos_x >= 0) && (bd->x < 0))
|
||||
bd->x = 0;
|
||||
else if (((rem->prop.pos_x + rem->prop.w) < rem->prop.res_x) &&
|
||||
((bd->x + bd->w) > bd->zone->w))
|
||||
bd->x = bd->zone->w - bd->w;
|
||||
}
|
||||
if (bd->zone->h != rem->prop.res_y)
|
||||
{
|
||||
int py;
|
||||
|
||||
py = bd->y + (bd->h / 2);
|
||||
if (py < ((rem->prop.res_y * 1) / 3))
|
||||
{
|
||||
if (bd->zone->h >= (rem->prop.res_y / 3))
|
||||
bd->y = rem->prop.pos_y;
|
||||
else
|
||||
bd->y = ((rem->prop.pos_y - 0) * bd->zone->h) /
|
||||
(rem->prop.res_y / 3);
|
||||
}
|
||||
else if (py < ((rem->prop.res_y * 2) / 3))
|
||||
{
|
||||
if (bd->zone->h >= (rem->prop.res_y / 3))
|
||||
bd->y = (bd->zone->h / 2) +
|
||||
(py - (rem->prop.res_y / 2)) -
|
||||
(bd->h / 2);
|
||||
else
|
||||
bd->y = (bd->zone->h / 2) +
|
||||
(((py - (rem->prop.res_y / 2)) * bd->zone->h) /
|
||||
(rem->prop.res_y / 3)) -
|
||||
(bd->h / 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bd->zone->h >= (rem->prop.res_y / 3))
|
||||
bd->y = bd->zone->h +
|
||||
rem->prop.pos_y - rem->prop.res_y +
|
||||
(rem->prop.h - bd->client.h);
|
||||
else
|
||||
bd->y = bd->zone->h +
|
||||
(((rem->prop.pos_y - rem->prop.res_y) * bd->zone->h) /
|
||||
(rem->prop.res_y / 3)) +
|
||||
(rem->prop.h - bd->client.h);
|
||||
}
|
||||
if ((rem->prop.pos_y >= 0) && (bd->y < 0))
|
||||
bd->y = 0;
|
||||
else if (((rem->prop.pos_y + rem->prop.h) < rem->prop.res_y) &&
|
||||
((bd->y + bd->h) > bd->zone->h))
|
||||
bd->y = bd->zone->h - bd->h;
|
||||
}
|
||||
// if (bd->zone->w != rem->prop.res_x)
|
||||
// bd->x = (rem->prop.pos_x * bd->zone->w) / rem->prop.res_x;
|
||||
// if (bd->zone->h != rem->prop.res_y)
|
||||
// bd->y = (rem->prop.pos_y * bd->zone->h) / rem->prop.res_y;
|
||||
bd->x += bd->zone->x;
|
||||
bd->y += bd->zone->y;
|
||||
bd->placed = 1;
|
||||
bd->changes.pos = 1;
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_LAYER)
|
||||
{
|
||||
bd->layer = rem->prop.layer;
|
||||
if (bd->layer == 100)
|
||||
e_hints_window_stacking_set(bd, E_STACKING_NONE);
|
||||
else if (bd->layer == 150)
|
||||
e_hints_window_stacking_set(bd, E_STACKING_ABOVE);
|
||||
e_container_border_raise(bd);
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_BORDER)
|
||||
{
|
||||
if (rem->prop.border)
|
||||
{
|
||||
if (bd->bordername) eina_stringshare_del(bd->bordername);
|
||||
if (rem->prop.border) bd->bordername = eina_stringshare_add(rem->prop.border);
|
||||
else bd->bordername = NULL;
|
||||
bd->client.border.changed = 1;
|
||||
}
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_FULLSCREEN)
|
||||
{
|
||||
if (rem->prop.fullscreen)
|
||||
e_border_fullscreen(bd, e_config->fullscreen_policy);
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_STICKY)
|
||||
{
|
||||
if (rem->prop.sticky) e_border_stick(bd);
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_SHADE)
|
||||
{
|
||||
if (rem->prop.shaded >= 100)
|
||||
e_border_shade(bd, rem->prop.shaded - 100);
|
||||
else if (rem->prop.shaded >= 50)
|
||||
e_border_unshade(bd, rem->prop.shaded - 50);
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_LOCKS)
|
||||
{
|
||||
bd->lock_user_location = rem->prop.lock_user_location;
|
||||
bd->lock_client_location = rem->prop.lock_client_location;
|
||||
bd->lock_user_size = rem->prop.lock_user_size;
|
||||
bd->lock_client_size = rem->prop.lock_client_size;
|
||||
bd->lock_user_stacking = rem->prop.lock_user_stacking;
|
||||
bd->lock_client_stacking = rem->prop.lock_client_stacking;
|
||||
bd->lock_user_iconify = rem->prop.lock_user_iconify;
|
||||
bd->lock_client_iconify = rem->prop.lock_client_iconify;
|
||||
bd->lock_user_desk = rem->prop.lock_user_desk;
|
||||
bd->lock_client_desk = rem->prop.lock_client_desk;
|
||||
bd->lock_user_sticky = rem->prop.lock_user_sticky;
|
||||
bd->lock_client_sticky = rem->prop.lock_client_sticky;
|
||||
bd->lock_user_shade = rem->prop.lock_user_shade;
|
||||
bd->lock_client_shade = rem->prop.lock_client_shade;
|
||||
bd->lock_user_maximize = rem->prop.lock_user_maximize;
|
||||
bd->lock_client_maximize = rem->prop.lock_client_maximize;
|
||||
bd->lock_user_fullscreen = rem->prop.lock_user_fullscreen;
|
||||
bd->lock_client_fullscreen = rem->prop.lock_client_fullscreen;
|
||||
bd->lock_border = rem->prop.lock_border;
|
||||
bd->lock_close = rem->prop.lock_close;
|
||||
bd->lock_focus_in = rem->prop.lock_focus_in;
|
||||
bd->lock_focus_out = rem->prop.lock_focus_out;
|
||||
bd->lock_life = rem->prop.lock_life;
|
||||
}
|
||||
if (rem->apply & E_REMEMBER_APPLY_SKIP_WINLIST)
|
||||
bd->user_skip_winlist = rem->prop.skip_winlist;
|
||||
if (rem->apply & E_REMEMBER_APPLY_SKIP_PAGER)
|
||||
bd->client.netwm.state.skip_pager = rem->prop.skip_pager;
|
||||
if (rem->apply & E_REMEMBER_APPLY_SKIP_TASKBAR)
|
||||
bd->client.netwm.state.skip_taskbar = rem->prop.skip_taskbar;
|
||||
if (rem->apply & E_REMEMBER_APPLY_ICON_PREF)
|
||||
bd->icon_preference = rem->prop.icon_preference;
|
||||
if (rem->apply & E_REMEMBER_SET_FOCUS_ON_START)
|
||||
bd->want_focus = 1;
|
||||
|
||||
if (temporary)
|
||||
_e_remember_free(rem);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_e_remember_cb_hook_eval_post_new_border(void *data, void *border)
|
||||
_e_remember_init_edd(void)
|
||||
{
|
||||
E_Border *bd = border;
|
||||
|
||||
if (!bd->new_client) return;
|
||||
|
||||
if ((bd->internal) && (!bd->remember) &&
|
||||
(e_config->remember_internal_windows) &&
|
||||
(!bd->internal_no_remember))
|
||||
{
|
||||
E_Remember *rem;
|
||||
|
||||
rem = e_remember_new();
|
||||
if (!rem) return;
|
||||
|
||||
e_remember_default_match_set(rem, bd);
|
||||
|
||||
rem->apply = E_REMEMBER_APPLY_POS | E_REMEMBER_APPLY_SIZE | E_REMEMBER_APPLY_BORDER;
|
||||
e_remember_use(rem);
|
||||
e_remember_update(bd);
|
||||
bd->remember = rem;
|
||||
}
|
||||
e_remember_edd = E_CONFIG_DD_NEW("E_Remember", E_Remember);
|
||||
#undef T
|
||||
#undef D
|
||||
#define T E_Remember
|
||||
#define D e_remember_edd
|
||||
E_CONFIG_VAL(D, T, match, INT);
|
||||
E_CONFIG_VAL(D, T, apply_first_only, UCHAR);
|
||||
E_CONFIG_VAL(D, T, keep_settings, UCHAR);
|
||||
E_CONFIG_VAL(D, T, name, STR);
|
||||
E_CONFIG_VAL(D, T, class, STR);
|
||||
E_CONFIG_VAL(D, T, title, STR);
|
||||
E_CONFIG_VAL(D, T, role, STR);
|
||||
E_CONFIG_VAL(D, T, type, INT);
|
||||
E_CONFIG_VAL(D, T, transient, UCHAR);
|
||||
E_CONFIG_VAL(D, T, apply, INT);
|
||||
E_CONFIG_VAL(D, T, max_score, INT);
|
||||
E_CONFIG_VAL(D, T, prop.pos_x, INT);
|
||||
E_CONFIG_VAL(D, T, prop.pos_y, INT);
|
||||
E_CONFIG_VAL(D, T, prop.res_x, INT);
|
||||
E_CONFIG_VAL(D, T, prop.res_y, INT);
|
||||
E_CONFIG_VAL(D, T, prop.pos_w, INT);
|
||||
E_CONFIG_VAL(D, T, prop.pos_h, INT);
|
||||
E_CONFIG_VAL(D, T, prop.w, INT);
|
||||
E_CONFIG_VAL(D, T, prop.h, INT);
|
||||
E_CONFIG_VAL(D, T, prop.layer, INT);
|
||||
E_CONFIG_VAL(D, T, prop.lock_user_location, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_client_location, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_user_size, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_client_size, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_user_stacking, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_client_stacking, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_user_iconify, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_client_iconify, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_user_desk, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_client_desk, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_user_sticky, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_client_sticky, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_user_shade, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_client_shade, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_user_maximize, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_client_maximize, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_user_fullscreen, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_client_fullscreen, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_border, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_close, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_focus_in, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_focus_out, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.lock_life, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.border, STR);
|
||||
E_CONFIG_VAL(D, T, prop.sticky, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.shaded, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.skip_winlist, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.skip_pager, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.skip_taskbar, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.fullscreen, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.desk_x, INT);
|
||||
E_CONFIG_VAL(D, T, prop.desk_y, INT);
|
||||
E_CONFIG_VAL(D, T, prop.zone, INT);
|
||||
E_CONFIG_VAL(D, T, prop.head, INT);
|
||||
E_CONFIG_VAL(D, T, prop.command, STR);
|
||||
E_CONFIG_VAL(D, T, prop.icon_preference, UCHAR);
|
||||
E_CONFIG_VAL(D, T, prop.desktop_file, STR);
|
||||
#undef T
|
||||
#undef D
|
||||
e_remember_list_edd = E_CONFIG_DD_NEW("E_Remember_List", E_Remember_List);
|
||||
#undef T
|
||||
#undef D
|
||||
#define T E_Remember_List
|
||||
#define D e_remember_list_edd
|
||||
E_CONFIG_LIST(D, T, list, e_remember_edd);
|
||||
#undef T
|
||||
#undef D
|
||||
}
|
||||
|
|
|
@ -29,13 +29,15 @@ typedef struct _E_Remember E_Remember;
|
|||
#define E_REMEMBER_SET_FOCUS_ON_START (1 << 14)
|
||||
#define E_REMEMBER_APPLY_FULLSCREEN (1 << 15)
|
||||
|
||||
#define E_REMEMBER_INTERNAL_DIALOGS (1 << 0)
|
||||
#define E_REMEMBER_INTERNAL_FM_WINS (1 << 1)
|
||||
|
||||
#else
|
||||
#ifndef E_REMEMBER_H
|
||||
#define E_REMEMBER_H
|
||||
|
||||
struct _E_Remember
|
||||
{
|
||||
unsigned char delete_me;
|
||||
int match;
|
||||
unsigned char apply_first_only;
|
||||
unsigned char keep_settings;
|
||||
|
@ -110,6 +112,6 @@ EAPI E_Remember *e_remember_find_usable(E_Border *bd);
|
|||
EAPI void e_remember_match_update(E_Remember *rem);
|
||||
EAPI void e_remember_update(E_Border *bd);
|
||||
EAPI int e_remember_default_match_set(E_Remember *rem, E_Border *bd);
|
||||
|
||||
EAPI void e_remember_internal_save(void);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -48,7 +48,7 @@ e_int_config_apps_favs(E_Container *con, const char *params __UNUSED__)
|
|||
e_user_dir_concat_static(buf, "applications/menu/favorite.menu");
|
||||
data = E_NEW(E_Config_Data, 1);
|
||||
data->title = eina_stringshare_add(_("Favorites Menu"));
|
||||
data->dialog = eina_stringshare_add("_config_apps_favs_dialog");
|
||||
data->dialog = eina_stringshare_add("menus/favorites_menu");
|
||||
data->icon = eina_stringshare_add("user-bookmarks");
|
||||
data->filename = eina_stringshare_add(buf);
|
||||
|
||||
|
@ -102,7 +102,7 @@ e_int_config_apps_ibar(E_Container *con, const char *params __UNUSED__)
|
|||
e_user_dir_concat_static(buf, "applications/bar/default/.order");
|
||||
data = E_NEW(E_Config_Data, 1);
|
||||
data->title = eina_stringshare_add(_("IBar Applications"));
|
||||
data->dialog = eina_stringshare_add("_config_apps_ibar_dialog");
|
||||
data->dialog = eina_stringshare_add("applications/ibar_applications");
|
||||
data->icon = eina_stringshare_add("preferences-applications-ibar");
|
||||
data->filename = eina_stringshare_add(buf);
|
||||
|
||||
|
@ -117,7 +117,7 @@ e_int_config_apps_ibar_other(E_Container *con, const char *path)
|
|||
if (!path) return NULL;
|
||||
data = E_NEW(E_Config_Data, 1);
|
||||
data->title = eina_stringshare_add(_("IBar Applications"));
|
||||
data->dialog = eina_stringshare_add("_config_apps_ibar_dialog");
|
||||
data->dialog = eina_stringshare_add("internal/ibar_other");
|
||||
data->icon = eina_stringshare_add("preferences-applications-ibar");
|
||||
data->filename = eina_stringshare_add(path);
|
||||
|
||||
|
@ -133,7 +133,7 @@ e_int_config_apps_startup(E_Container *con, const char *params __UNUSED__)
|
|||
e_user_dir_concat_static(buf, "applications/startup/.order");
|
||||
data = E_NEW(E_Config_Data, 1);
|
||||
data->title = eina_stringshare_add(_("Startup Applications"));
|
||||
data->dialog = eina_stringshare_add("_config_apps_startup_dialog");
|
||||
data->dialog = eina_stringshare_add("applications/startup_applications");
|
||||
data->icon = eina_stringshare_add("preferences-applications-startup");
|
||||
data->filename = eina_stringshare_add(buf);
|
||||
|
||||
|
@ -149,7 +149,7 @@ e_int_config_apps_restart(E_Container *con, const char *params __UNUSED__)
|
|||
e_user_dir_concat_static(buf, "applications/restart/.order");
|
||||
data = E_NEW(E_Config_Data, 1);
|
||||
data->title = eina_stringshare_add(_("Restart Applications"));
|
||||
data->dialog = eina_stringshare_add("_config_apps_restart_dialog");
|
||||
data->dialog = eina_stringshare_add("applications/restart_applications");
|
||||
data->icon = eina_stringshare_add("preferences-applications-restart");
|
||||
data->filename = eina_stringshare_add(buf);
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ e_int_config_borders(E_Container *con, const char *params __UNUSED__)
|
|||
v = _config_view_new();
|
||||
if (!v) return NULL;
|
||||
cfd = e_config_dialog_new(con, _("Default Border Style"),
|
||||
"E", "_config_border_style_dialog",
|
||||
"E", "appearance/borders",
|
||||
"preferences-system-windows", 0, v, con);
|
||||
return cfd;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ e_int_config_borders_border(E_Container *con __UNUSED__, const char *params)
|
|||
if (!v) return NULL;
|
||||
cfd = e_config_dialog_new(bd->zone->container,
|
||||
_("Window Border Selection"),
|
||||
"E", "_config_border_border_style_dialog",
|
||||
"E", "internal/borders_border",
|
||||
"preferences-system-windows", 0, v, bd);
|
||||
bd->border_border_dialog = cfd;
|
||||
return cfd;
|
||||
|
|
|
@ -38,7 +38,7 @@ e_int_config_clientlist(E_Container *con, const char *params __UNUSED__)
|
|||
v->advanced.create_widgets = NULL;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Client List Settings"), "E",
|
||||
"_config_clientlist_dialog",
|
||||
"menus/client_list_menu",
|
||||
"preferences-winlist", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ e_int_config_color_classes(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_color_classes_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "appearance/colors")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
if (!v) return NULL;
|
||||
|
||||
|
@ -127,7 +127,7 @@ e_int_config_color_classes(E_Container *con, const char *params __UNUSED__)
|
|||
v->advanced.apply_cfdata = _adv_apply_data;
|
||||
v->advanced.create_widgets = _adv_create_widgets;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Colors"), "E", "_config_color_classes_dialog",
|
||||
cfd = e_config_dialog_new(con, _("Colors"), "E", "appearance/colors",
|
||||
"preferences-desktop-color", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ e_int_config_desk(E_Container *con, const char *params)
|
|||
if (sscanf(params, "%i %i %i %i", &con_num, &zone_num, &dx, &dy) != 4)
|
||||
return NULL;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_desk_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "internal/desk")) return NULL;
|
||||
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
|
@ -49,7 +49,7 @@ e_int_config_desk(E_Container *con, const char *params)
|
|||
v->basic.create_widgets = _basic_create;
|
||||
v->override_auto_apply = 1;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Desk Settings"), "E", "_config_desk_dialog",
|
||||
cfd = e_config_dialog_new(con, _("Desk Settings"), "E", "internal/desk",
|
||||
"preferences-desktop", 0, v, cfdata);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ e_int_config_desklock(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_desklock_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "screen/screen_lock")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
if (!v) return NULL;
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -94,7 +94,7 @@ e_int_config_desklock(E_Container *con, const char *params __UNUSED__)
|
|||
v->override_auto_apply = 1;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Screen Lock Settings"), "E",
|
||||
"_config_desklock_dialog", "preferences-desklock",
|
||||
"screen/screen_lock", "preferences-desklock",
|
||||
0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ e_int_config_desks(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_desks_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "screen/virtual_desktops")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
/* methods */
|
||||
|
@ -60,7 +60,7 @@ e_int_config_desks(E_Container *con, const char *params __UNUSED__)
|
|||
/* create config diaolg for NULL object/data */
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Virtual Desktops Settings"),
|
||||
"E", "_config_desks_dialog",
|
||||
"E", "screen/virtual_desktops",
|
||||
"preferences-desktop", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ struct _E_Config_Dialog_Data
|
|||
int cfgdlg_auto_apply;
|
||||
int cfgdlg_default_mode;
|
||||
int cfgdlg_normal_wins;
|
||||
int remember_windows;
|
||||
};
|
||||
|
||||
EAPI E_Config_Dialog *
|
||||
|
@ -23,7 +24,7 @@ e_int_config_dialogs(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_config_dialog_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "settings/dialogs")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -34,7 +35,7 @@ e_int_config_dialogs(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Dialog Settings"),
|
||||
"E", "_config_config_dialog_dialog",
|
||||
"E", "settings/dialogs",
|
||||
"preferences-dialogs", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
@ -46,6 +47,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
cfdata->cfgdlg_auto_apply = e_config->cfgdlg_auto_apply;
|
||||
cfdata->cfgdlg_default_mode = e_config->cfgdlg_default_mode;
|
||||
cfdata->cfgdlg_normal_wins = e_config->cfgdlg_normal_wins;
|
||||
cfdata->remember_windows = (e_config->remember_internal_windows & E_REMEMBER_INTERNAL_DIALOGS);
|
||||
}
|
||||
|
||||
static void *
|
||||
|
@ -72,6 +74,11 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
/* (e_config->cfgdlg_auto_apply = cfdata->cfgdlg_auto_apply; */
|
||||
e_config->cfgdlg_default_mode = cfdata->cfgdlg_default_mode;
|
||||
e_config->cfgdlg_normal_wins = cfdata->cfgdlg_normal_wins;
|
||||
if (cfdata->remember_windows)
|
||||
e_config->remember_internal_windows |= E_REMEMBER_INTERNAL_DIALOGS;
|
||||
else
|
||||
e_config->remember_internal_windows &= ~E_REMEMBER_INTERNAL_DIALOGS;
|
||||
|
||||
e_config_save_queue();
|
||||
return 1;
|
||||
}
|
||||
|
@ -105,6 +112,11 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
|
||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||
|
||||
of = e_widget_framelist_add(evas, _("Remember"), 0);
|
||||
ob = e_widget_check_add(evas, _("Remember size and position of dialogs"), &(cfdata->remember_windows));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ e_int_config_display(E_Container *con, const char *params __UNUSED__)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (e_config_dialog_find("E", "_config_display_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "screen/screen_resolution")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
v->create_cfdata = _create_data;
|
||||
v->free_cfdata = _free_data;
|
||||
|
@ -226,7 +226,7 @@ e_int_config_display(E_Container *con, const char *params __UNUSED__)
|
|||
v->override_auto_apply = 1;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Screen Resolution Settings"),
|
||||
"E", "_config_display_dialog",
|
||||
"E", "screen/screen_resolution",
|
||||
"preferences-system-screen-resolution", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ e_int_config_dpms(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if ((e_config_dialog_find("E", "_config_dpms_dialog")) ||
|
||||
if ((e_config_dialog_find("E", "screen/power_management")) ||
|
||||
(!_e_int_config_dpms_available()) ||
|
||||
(!_e_int_config_dpms_capable()))
|
||||
return NULL;
|
||||
|
@ -110,7 +110,7 @@ e_int_config_dpms(E_Container *con, const char *params __UNUSED__)
|
|||
v->override_auto_apply = 1;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Display Power Management Settings"), "E",
|
||||
"_config_dpms_dialog", "preferences-system-power-management",
|
||||
"screen/power_management", "preferences-system-power-management",
|
||||
0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ e_int_config_edgebindings(E_Container *con, const char *params)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_edgebindings_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "keyboard_and_mouse/edge_bindings")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -100,7 +100,7 @@ e_int_config_edgebindings(E_Container *con, const char *params)
|
|||
v->override_auto_apply = 1;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Edge Binding Settings"), "E",
|
||||
"_config_edgebindings_dialog",
|
||||
"keyboard_and_mouse/edge_bindings",
|
||||
"enlightenment/edges", 0, v, NULL);
|
||||
if ((params) && (params[0]))
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ e_int_config_engine(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_engine_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "advanced/engine")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
if (!v) return NULL;
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -36,7 +36,7 @@ e_int_config_engine(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Engine Settings"),
|
||||
"E", "_config_engine_dialog",
|
||||
"E", "advanced/engine",
|
||||
"preferences-engine", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ e_int_config_exebuf(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_exebuf_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "advanced/run_command")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -47,7 +47,7 @@ e_int_config_exebuf(E_Container *con, const char *params __UNUSED__)
|
|||
v->advanced.create_widgets = _advanced_create_widgets;
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Run Command Settings"),
|
||||
"E", "_config_exebuf_dialog",
|
||||
"E", "advanced/run_command",
|
||||
"system-run", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -155,7 +155,7 @@ e_int_config_fonts(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_fonts_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "appearance/fonts")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -166,7 +166,7 @@ e_int_config_fonts(E_Container *con, const char *params __UNUSED__)
|
|||
v->advanced.apply_cfdata = _advanced_apply_data;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Font Settings"),
|
||||
"E", "_config_fonts_dialog",
|
||||
"E", "appearance/fonts",
|
||||
"preferences-desktop-font", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ e_int_config_icon_themes(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_icon_theme_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "appearance/icon_theme")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -41,7 +41,7 @@ e_int_config_icon_themes(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Icon Theme Settings"),
|
||||
"E", "_config_icon_theme_dialog",
|
||||
"E", "appearance/icon_theme",
|
||||
"preferences-icon-theme", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ e_int_config_imc(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_imc_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "language/input_method_settings")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -107,7 +107,7 @@ e_int_config_imc(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Input Method Settings"),
|
||||
"E", "_config_imc_dialog",
|
||||
"E", "language/input_method_settings",
|
||||
"preferences-imc", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ e_int_config_interaction(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_config_interaction_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "keyboard_and_mouse/interaction")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -35,7 +35,7 @@ e_int_config_interaction(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Interaction Settings"),
|
||||
"E", "_config_config_interaction_dialog",
|
||||
"E", "keyboard_and_mouse/interaction",
|
||||
"preferences-interaction", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -569,7 +569,7 @@ e_int_config_intl(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_intl_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "language/language_settings")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -581,7 +581,7 @@ e_int_config_intl(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Language Settings"),
|
||||
"E", "_config_intl_dialog",
|
||||
"E", "language/language_settings",
|
||||
"preferences-desktop-locale", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ e_int_config_keybindings(E_Container *con, const char *params)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_keybindings_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "keyboard_and_mouse/key_bindings")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -90,7 +90,7 @@ e_int_config_keybindings(E_Container *con, const char *params)
|
|||
v->override_auto_apply = 1;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Key Binding Settings"), "E",
|
||||
"_config_keybindings_dialog",
|
||||
"keyboard_and_mouse/key_bindings",
|
||||
"preferences-desktop-keyboard", 0, v, NULL);
|
||||
if ((params) && (params[0]))
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ e_int_config_menus(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_menus_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "menus/menu_settings")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -42,7 +42,7 @@ e_int_config_menus(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Menu Settings"),
|
||||
"E", "_config_menus_dialog",
|
||||
"E", "menus/menu_settings",
|
||||
"preferences-menus", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -54,14 +54,14 @@ e_int_config_mime(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_mime_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "fileman/file_icons")) return NULL;
|
||||
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
v->create_cfdata = _create_data;
|
||||
v->free_cfdata = _free_data;
|
||||
v->basic.create_widgets = _basic_create;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("File Icons"), "E", "_config_mime_dialog",
|
||||
cfd = e_config_dialog_new(con, _("File Icons"), "E", "fileman/file_icons",
|
||||
"preferences-file-icons", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ e_int_config_mouse(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_mouse_dialog"))
|
||||
if (e_config_dialog_find("E", "keyboard_and_mouse/mouse_settings"))
|
||||
return NULL;
|
||||
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
@ -35,7 +35,7 @@ e_int_config_mouse(E_Container *con, const char *params __UNUSED__)
|
|||
v->basic.check_changed = _basic_check_changed;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Mouse Settings"), "E",
|
||||
"_config_mouse_dialog",
|
||||
"keyboard_and_mouse/mouse_settings",
|
||||
"preferences-desktop-mouse", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ e_int_config_cursor(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_cursor_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "appearance/mouse_cursor")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -43,7 +43,7 @@ e_int_config_cursor(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Cursor Settings"),
|
||||
"E", "_config_cursor_dialog",
|
||||
"E", "appearance/mouse_cursor",
|
||||
"preferences-desktop-pointer", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ e_int_config_mousebindings(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_mousebindings_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "keyboard_and_mouse/mouse_bindings")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -110,7 +110,7 @@ e_int_config_mousebindings(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Mouse Binding Settings"),
|
||||
"E", "_config_mousebindings_dialog",
|
||||
"E", "keyboard_and_mouse/mouse_bindings",
|
||||
"preferences-desktop-mouse", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ e_int_config_paths(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_paths_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "advanced/search_directories")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -60,7 +60,7 @@ e_int_config_paths(E_Container *con, const char *params __UNUSED__)
|
|||
v->basic.apply_cfdata = _basic_apply_data;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Search Path Settings"),
|
||||
"E", "_config_paths_dialog",
|
||||
"E", "advanced/search_directories",
|
||||
"preferences-directories", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ e_int_config_performance(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_performance_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "advanced/performance")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -38,7 +38,7 @@ e_int_config_performance(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Performance Settings"),
|
||||
"E", "_config_performance_dialog",
|
||||
"E", "advanced/performance",
|
||||
"preferences-system-performance", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ e_int_config_profiles(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_profiles_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "settings/profiles")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
if (!v) return NULL;
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -53,7 +53,7 @@ e_int_config_profiles(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Profile Selector"),
|
||||
"E", "_config_profiles_dialog",
|
||||
"E", "settings/profiles",
|
||||
"preferences-profiles", 0, v, NULL);
|
||||
e_config_dialog_changed_auto_set(cfd, 0);
|
||||
return cfd;
|
||||
|
|
|
@ -45,7 +45,7 @@ e_int_config_scale(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_scale_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "appearance/scale")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -59,7 +59,7 @@ e_int_config_scale(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Scaling Settings"),
|
||||
"E", "_config_scale_dialog",
|
||||
"E", "appearance/scale",
|
||||
"preferences-scale", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ e_int_config_screensaver(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_screensaver_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "screen/screen_saver")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -65,7 +65,7 @@ e_int_config_screensaver(E_Container *con, const char *params __UNUSED__)
|
|||
v->override_auto_apply = 1;
|
||||
|
||||
cfd = e_config_dialog_new(con,_("Screen Saver Settings"),
|
||||
"E", "_config_screensaver_dialog",
|
||||
"E", "screen/screen_saver",
|
||||
"preferences-desktop-screensaver", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ e_int_config_shelf(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_shelf_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "extensions/shelves")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
if (!v) return NULL;
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -41,7 +41,7 @@ e_int_config_shelf(E_Container *con, const char *params __UNUSED__)
|
|||
v->basic.create_widgets = _basic_create;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Shelf Settings"), "E",
|
||||
"_config_shelf_dialog",
|
||||
"extensions/shelves",
|
||||
"preferences-desktop-shelf", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ e_int_config_startup(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_startup_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "appearance/startup")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -37,7 +37,7 @@ e_int_config_startup(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Startup Settings"),
|
||||
"E", "_config_startup_dialog",
|
||||
"E", "appearance/startup",
|
||||
"preferences-startup", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ e_int_config_theme(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_theme_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "appearance/theme")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -88,7 +88,7 @@ e_int_config_theme(E_Container *con, const char *params __UNUSED__)
|
|||
v->override_auto_apply = 1;
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Theme Selector"),
|
||||
"E", "_config_theme_dialog",
|
||||
"E", "appearance/theme",
|
||||
"preferences-desktop-theme", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ e_int_config_transitions(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_transitions_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "appearance/transitions")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
if (!v) return NULL;
|
||||
|
||||
|
@ -42,7 +42,7 @@ e_int_config_transitions(E_Container *con, const char *params __UNUSED__)
|
|||
v->basic.create_widgets = _basic_create_widgets;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Transition Settings"),
|
||||
"E", "_config_transitions_dialog",
|
||||
"E", "appearance/transitions",
|
||||
"preferences-transitions", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ _e_int_config_wallpaper_desk(E_Container *con, int con_num, int zone_num, int de
|
|||
E_Config_Dialog_View *v;
|
||||
E_Config_Wallpaper *cw;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_wallpaper_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "appearance/wallpaper")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
cw = E_NEW(E_Config_Wallpaper, 1);
|
||||
|
||||
|
@ -108,7 +108,7 @@ _e_int_config_wallpaper_desk(E_Container *con, int con_num, int zone_num, int de
|
|||
cw->desk_y = desk_y;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Wallpaper Settings"), "E",
|
||||
"_config_wallpaper_dialog",
|
||||
"appearance/wallpaper",
|
||||
"preferences-desktop-wallpaper", 0, v, cw);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -1149,7 +1149,7 @@ wp_browser_new(E_Container *con)
|
|||
info->dirs = eina_list_append(info->dirs, strdup(buf));
|
||||
|
||||
e_win_title_set(win, _("Wallpaper Settings"));
|
||||
e_win_name_class_set(win, "E", "_config_wallpaper_dialog");
|
||||
e_win_name_class_set(win, "E", "_config::appearance/wallpaper2");
|
||||
e_win_border_icon_set(win, "preferences-desktop-wallpaper");
|
||||
e_win_resize_callback_set(win, _resize);
|
||||
e_win_delete_callback_set(win, _delete);
|
||||
|
|
|
@ -31,7 +31,7 @@ struct _E_Config_Dialog_Data
|
|||
int border_shade_transition;
|
||||
double border_shade_speed;
|
||||
int use_app_icon;
|
||||
int remember_internal_windows;
|
||||
/* int remember_internal_windows; */
|
||||
};
|
||||
|
||||
Eina_List *shading_list = NULL;
|
||||
|
@ -43,7 +43,7 @@ e_int_config_window_display(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_window_display_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "windows/window_display")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
/* methods */
|
||||
|
@ -56,7 +56,7 @@ e_int_config_window_display(E_Container *con, const char *params __UNUSED__)
|
|||
/* create config diaolg for NULL object/data */
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Window Display"),
|
||||
"E", "_config_window_display_dialog",
|
||||
"E", "windows/window_display",
|
||||
"preferences-system-windows", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
cfdata->resize_info_visible) cfdata->move_resize_info = 1;
|
||||
if (cfdata->border_shade_animate) cfdata->animate_shading = 1;
|
||||
cfdata->use_app_icon = e_config->use_app_icon;
|
||||
cfdata->remember_internal_windows = e_config->remember_internal_windows;
|
||||
/* cfdata->remember_internal_windows = e_config->remember_internal_windows; */
|
||||
cfdata->desk_auto_switch = e_config->desk_auto_switch;
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
e_config->border_shade_transition = cfdata->border_shade_transition;
|
||||
e_config->border_shade_speed = cfdata->border_shade_speed;
|
||||
e_config->use_app_icon = cfdata->use_app_icon;
|
||||
e_config->remember_internal_windows = cfdata->remember_internal_windows;
|
||||
/* e_config->remember_internal_windows = cfdata->remember_internal_windows; */
|
||||
e_config->desk_auto_switch = cfdata->desk_auto_switch;
|
||||
e_config_save_queue();
|
||||
return 1; /* Apply was OK */
|
||||
|
@ -275,11 +275,11 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
|
|||
e_widget_framelist_object_append(of, ob);
|
||||
e_widget_table_object_append(ot, of, 0, 2, 1, 1, 1, 1, 1, 1);
|
||||
|
||||
of = e_widget_framelist_add(evas, _("Internal Windows"), 0);
|
||||
e_widget_framelist_content_align_set(of, 0.0, 0.0);
|
||||
ob = e_widget_check_add(evas, _("Always remember internal windows"), &(cfdata->remember_internal_windows));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
e_widget_table_object_append(ot, of, 1, 2, 1, 1, 1, 1, 1, 1);
|
||||
/* of = e_widget_framelist_add(evas, _("Internal Windows"), 0);
|
||||
* e_widget_framelist_content_align_set(of, 0.0, 0.0);
|
||||
* ob = e_widget_check_add(evas, _("Always remember internal windows"), &(cfdata->remember_internal_windows));
|
||||
* e_widget_framelist_object_append(of, ob);
|
||||
* e_widget_table_object_append(ot, of, 1, 2, 1, 1, 1, 1, 1, 1); */
|
||||
|
||||
return ot;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ e_int_config_focus(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_focus_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "windows/window_focus")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
/* methods */
|
||||
|
@ -48,7 +48,7 @@ e_int_config_focus(E_Container *con, const char *params __UNUSED__)
|
|||
/* create config diaolg for NULL object/data */
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Focus Settings"),
|
||||
"E", "_config_focus_dialog",
|
||||
"E", "windows/window_focus",
|
||||
"preferences-focus", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ e_int_config_window_geometry(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_window_geometry_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "windows/window_geometry")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
/* methods */
|
||||
|
@ -52,7 +52,7 @@ e_int_config_window_geometry(E_Container *con, const char *params __UNUSED__)
|
|||
/* create config diaolg for NULL object/data */
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Window Geometry"),
|
||||
"E", "_config_window_geometry_dialog",
|
||||
"E", "windows/window_geometry",
|
||||
"preferences-window-manipulation", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ e_int_config_window_maxpolicy(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_window_maxpolicy_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "windows/window_maxpolicy")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
/* methods */
|
||||
|
@ -42,7 +42,7 @@ e_int_config_window_maxpolicy(E_Container *con, const char *params __UNUSED__)
|
|||
/* create config diaolg for NULL object/data */
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Window Maximize Policy"),
|
||||
"E", "_config_window_maxpolicy_dialog",
|
||||
"E", "windows/window_maxpolicy",
|
||||
"preferences-window-manipulation", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ e_int_config_window_stacking(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_window_stacking_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "windows/window_stacking")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
/* methods */
|
||||
|
@ -46,7 +46,7 @@ e_int_config_window_stacking(E_Container *con, const char *params __UNUSED__)
|
|||
/* create config diaolg for NULL object/data */
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Window Stacking"),
|
||||
"E", "_config_window_stacking_dialog",
|
||||
"E", "windows/window_stacking",
|
||||
"preferences-window-stacking", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
/* function protos */
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static void _fill_remembers(E_Config_Dialog_Data *cfdata);
|
||||
static void _cb_delete(void *data, void *data2);
|
||||
|
@ -11,6 +12,8 @@ static void _cb_list_change(void *data, Evas_Object *obj);
|
|||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
Evas_Object *list, *btn, *name, *class, *title, *role;
|
||||
int remember_dialogs;
|
||||
int remember_fm_wins;
|
||||
};
|
||||
|
||||
EAPI E_Config_Dialog *
|
||||
|
@ -19,15 +22,16 @@ e_int_config_remembers(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_remembers_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "windows/window_remembers")) return NULL;
|
||||
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
v->create_cfdata = _create_data;
|
||||
v->free_cfdata = _free_data;
|
||||
v->basic.apply_cfdata = _basic_apply_data;
|
||||
v->basic.create_widgets = _basic_create;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Window Remembers"), "E",
|
||||
"_config_remembers_dialog",
|
||||
"windows/window_remembers",
|
||||
"preferences-desktop-window-remember", 0, v, NULL);
|
||||
e_dialog_resizable_set(cfd->dia, 1);
|
||||
return cfd;
|
||||
|
@ -75,6 +79,9 @@ _create_data(E_Config_Dialog *cfd)
|
|||
E_Config_Dialog_Data *cfdata;
|
||||
|
||||
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
||||
cfdata->remember_dialogs = (e_config->remember_internal_windows & E_REMEMBER_INTERNAL_DIALOGS);
|
||||
cfdata->remember_fm_wins = (e_config->remember_internal_windows & E_REMEMBER_INTERNAL_FM_WINS);
|
||||
|
||||
return cfdata;
|
||||
}
|
||||
|
||||
|
@ -84,6 +91,23 @@ _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
E_FREE(cfdata);
|
||||
}
|
||||
|
||||
static int
|
||||
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
if (cfdata->remember_dialogs)
|
||||
e_config->remember_internal_windows |= E_REMEMBER_INTERNAL_DIALOGS;
|
||||
else
|
||||
e_config->remember_internal_windows &= ~E_REMEMBER_INTERNAL_DIALOGS;
|
||||
|
||||
if (cfdata->remember_fm_wins)
|
||||
e_config->remember_internal_windows |= E_REMEMBER_INTERNAL_FM_WINS;
|
||||
else
|
||||
e_config->remember_internal_windows &= ~E_REMEMBER_INTERNAL_FM_WINS;
|
||||
|
||||
e_config_save_queue();
|
||||
return 1;
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
|
@ -92,6 +116,11 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
|||
o = e_widget_list_add(evas, 0, 0);
|
||||
of = e_widget_frametable_add(evas, _("Window Remembers"), 0);
|
||||
|
||||
ow = e_widget_check_add(evas, _("Remember internal dialogs"), &(cfdata->remember_dialogs));
|
||||
e_widget_frametable_object_append(of, ow, 0, 0, 1, 1, 1, 1, 1, 0);
|
||||
ow = e_widget_check_add(evas, _("Remember fileman windows"), &(cfdata->remember_fm_wins));
|
||||
e_widget_frametable_object_append(of, ow, 0, 1, 1, 1, 1, 1, 1, 0);
|
||||
|
||||
ow = e_widget_button_add(evas, _("Delete Remember(s)"), "list-remove",
|
||||
_cb_delete, cfdata, NULL);
|
||||
cfdata->btn = ow;
|
||||
|
@ -124,12 +153,11 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
|||
cfdata->role = ow;
|
||||
e_widget_frametable_object_append(of2, cfdata->role, 1, 3, 1, 1, 1, 1, 1, 0);
|
||||
|
||||
e_widget_frametable_object_append(of, cfdata->list, 0, 0, 1, 1, 1, 1, 1, 1);
|
||||
e_widget_frametable_object_append(of, of2, 0, 1, 1, 1, 1, 1, 1, 0);
|
||||
e_widget_frametable_object_append(of, cfdata->btn, 0, 2, 1, 1, 1, 1, 1, 0);
|
||||
|
||||
e_widget_frametable_object_append(of, cfdata->list, 0, 2, 1, 1, 1, 1, 1, 1);
|
||||
e_widget_frametable_object_append(of, of2, 0, 3, 1, 1, 1, 1, 1, 0);
|
||||
e_widget_frametable_object_append(of, cfdata->btn, 0, 4, 1, 1, 1, 1, 1, 0);
|
||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||
|
||||
|
||||
e_widget_disabled_set(cfdata->btn, 1);
|
||||
return o;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ e_int_config_winlist(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_winlist_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "windows/window_list")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -60,7 +60,7 @@ e_int_config_winlist(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Window List Settings"),
|
||||
"E", "_config_winlist_dialog",
|
||||
"E", "windows/window_list",
|
||||
"preferences-winlist", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ e_int_config_dropshadow_module(E_Container *con, const char *params __UNUSED__)
|
|||
Dropshadow *ds;
|
||||
|
||||
ds = dropshadow_mod->data;
|
||||
if (e_config_dialog_find("E", "_e_mod_dropshadow_config_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "appearance/dropshadow")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -38,7 +38,7 @@ e_int_config_dropshadow_module(E_Container *con, const char *params __UNUSED__)
|
|||
snprintf(buf, sizeof(buf), "%s/e-module-dropshadow.edj", e_module_dir_get(ds->module));
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Dropshadow Settings"),
|
||||
"E", "_e_mod_dropshadow_config_dialog",
|
||||
"E", "appearance/dropshadow",
|
||||
buf, 0, v, ds);
|
||||
ds->config_dialog = cfd;
|
||||
return cfd;
|
||||
|
|
|
@ -206,8 +206,8 @@ _config_init()
|
|||
{
|
||||
evry_conf = E_NEW(Config, 1);
|
||||
evry_conf->version = CONFIG_VERSION;
|
||||
evry_conf->rel_x = 50.0;
|
||||
evry_conf->rel_y = 50.0;
|
||||
evry_conf->rel_x = 0.5;
|
||||
evry_conf->rel_y = 0.33;
|
||||
evry_conf->width = 0;
|
||||
evry_conf->height = 0;
|
||||
evry_conf->scroll_animate = 0;
|
||||
|
|
|
@ -41,7 +41,7 @@ evry_config_dialog(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_everything_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "extensions/run_everything")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
||||
v->create_cfdata = _create_data;
|
||||
|
@ -52,7 +52,7 @@ evry_config_dialog(E_Container *con, const char *params __UNUSED__)
|
|||
v->advanced.create_widgets = NULL;
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Everything Settings"),
|
||||
"E", "_config_everything_dialog",
|
||||
"E", "extensions/run_everything",
|
||||
"system-run", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -44,8 +44,6 @@ struct _E_Fwin
|
|||
|
||||
Ecore_Event_Handler *zone_handler;
|
||||
Ecore_Event_Handler *zone_del_handler;
|
||||
|
||||
unsigned char geom_save_ready : 1;
|
||||
};
|
||||
|
||||
struct _E_Fwin_Page
|
||||
|
@ -172,55 +170,7 @@ e_fwin_shutdown(void)
|
|||
EAPI void
|
||||
e_fwin_new(E_Container *con, const char *dev, const char *path)
|
||||
{
|
||||
E_Fwin *fwin;
|
||||
E_Fm2_Custom_File *cf;
|
||||
char buf[PATH_MAX];
|
||||
int x, y, w, h;
|
||||
|
||||
fwin = _e_fwin_new(con, dev, path);
|
||||
|
||||
if (!fwin) return;
|
||||
|
||||
snprintf(buf, sizeof(buf), "dir::%s", e_fm2_real_path_get(fwin->cur_page->fm_obj));
|
||||
cf = e_fm2_custom_file_get(buf);
|
||||
if ((cf) && (cf->geom.valid))
|
||||
{
|
||||
int zx, zy, zw, zh;
|
||||
|
||||
x = cf->geom.x;
|
||||
y = cf->geom.y;
|
||||
w = cf->geom.w;
|
||||
h = cf->geom.h;
|
||||
|
||||
e_zone_useful_geometry_get(fwin->win->border->zone,
|
||||
&zx, &zy, &zw, &zh);
|
||||
|
||||
/* checking width and height */
|
||||
if (w < 24)
|
||||
w = 280 * e_scale;
|
||||
else if (w > zw)
|
||||
w = zw;
|
||||
if (h < 24)
|
||||
h = 200 * e_scale;
|
||||
else if (h > zh)
|
||||
h = zh;
|
||||
|
||||
/* checking left-top corner */
|
||||
if (x < zx)
|
||||
x = zx;
|
||||
if (y < zy)
|
||||
y = zy;
|
||||
|
||||
/* checking right-bottom corner */
|
||||
if ((zx + zw) < (x + w))
|
||||
x = zx + zw - w;
|
||||
if ((zy + zh) < (y + h))
|
||||
y = zy + zh - h;
|
||||
|
||||
e_win_move_resize(fwin->win, x, y, w, h);
|
||||
}
|
||||
|
||||
fwin->geom_save_ready = 1;
|
||||
_e_fwin_new(con, dev, path);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -409,7 +359,8 @@ _e_fwin_new(E_Container *con, const char *dev, const char *path)
|
|||
E_Fwin *fwin;
|
||||
E_Fwin_Page *page;
|
||||
Evas_Object *o;
|
||||
|
||||
char buf[PATH_MAX];
|
||||
|
||||
fwin = E_OBJECT_ALLOC(E_Fwin, E_FWIN_TYPE, _e_fwin_free);
|
||||
if (!fwin) return NULL;
|
||||
fwin->win = e_win_new(con);
|
||||
|
@ -448,10 +399,10 @@ _e_fwin_new(E_Container *con, const char *dev, const char *path)
|
|||
evas_object_pass_events_set(o, 1);
|
||||
fwin->over_obj = o;
|
||||
|
||||
e_win_name_class_set(fwin->win, "E", "e_fwin");
|
||||
|
||||
e_fm2_path_set(page->fm_obj, dev, path);
|
||||
_e_fwin_window_title_set(page);
|
||||
snprintf(buf, sizeof(buf), "e_fwin::%s", e_fm2_real_path_get(fwin->cur_page->fm_obj));
|
||||
e_win_name_class_set(fwin->win, "E", buf);
|
||||
|
||||
e_win_size_min_set(fwin->win, 24, 24);
|
||||
e_win_resize(fwin->win, 280 * e_scale, 200 * e_scale);
|
||||
|
@ -1084,27 +1035,27 @@ _e_fwin_cb_delete(E_Win *win)
|
|||
e_object_del(E_OBJECT(fwin));
|
||||
}
|
||||
|
||||
static void
|
||||
_e_fwin_geom_save(E_Fwin *fwin)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
E_Fm2_Custom_File *cf;
|
||||
|
||||
if (!fwin->geom_save_ready) return;
|
||||
snprintf(buf, sizeof(buf), "dir::%s", e_fm2_real_path_get(fwin->cur_page->fm_obj));
|
||||
cf = e_fm2_custom_file_get(buf);
|
||||
if (!cf)
|
||||
{
|
||||
cf = alloca(sizeof(E_Fm2_Custom_File));
|
||||
memset(cf, 0, sizeof(E_Fm2_Custom_File));
|
||||
}
|
||||
cf->geom.x = fwin->win->x;
|
||||
cf->geom.y = fwin->win->y;
|
||||
cf->geom.w = fwin->win->w;
|
||||
cf->geom.h = fwin->win->h;
|
||||
cf->geom.valid = 1;
|
||||
e_fm2_custom_file_set(buf, cf);
|
||||
}
|
||||
/* static void
|
||||
* _e_fwin_geom_save(E_Fwin *fwin)
|
||||
* {
|
||||
* char buf[PATH_MAX];
|
||||
* E_Fm2_Custom_File *cf;
|
||||
*
|
||||
* if (!fwin->geom_save_ready) return;
|
||||
* snprintf(buf, sizeof(buf), "dir::%s", e_fm2_real_path_get(fwin->cur_page->fm_obj));
|
||||
* cf = e_fm2_custom_file_get(buf);
|
||||
* if (!cf)
|
||||
* {
|
||||
* cf = alloca(sizeof(E_Fm2_Custom_File));
|
||||
* memset(cf, 0, sizeof(E_Fm2_Custom_File));
|
||||
* }
|
||||
* cf->geom.x = fwin->win->x;
|
||||
* cf->geom.y = fwin->win->y;
|
||||
* cf->geom.w = fwin->win->w;
|
||||
* cf->geom.h = fwin->win->h;
|
||||
* cf->geom.valid = 1;
|
||||
* e_fm2_custom_file_set(buf, cf);
|
||||
* } */
|
||||
|
||||
static void
|
||||
_e_fwin_cb_move(E_Win *win)
|
||||
|
@ -1113,7 +1064,7 @@ _e_fwin_cb_move(E_Win *win)
|
|||
|
||||
if (!win) return; //safety
|
||||
fwin = win->data;
|
||||
_e_fwin_geom_save(fwin);
|
||||
/* _e_fwin_geom_save(fwin); */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1147,7 +1098,7 @@ _e_fwin_cb_resize(E_Win *win)
|
|||
}
|
||||
else if (fwin->zone)
|
||||
evas_object_resize(fwin->cur_page->scrollframe_obj, fwin->zone->w, fwin->zone->h);
|
||||
_e_fwin_geom_save(fwin);
|
||||
/* _e_fwin_geom_save(fwin); */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1686,14 +1637,16 @@ _e_fwin_file_open_dialog(E_Fwin_Page *page, Eina_List *files, int always)
|
|||
{
|
||||
Evas_Object *oic;
|
||||
const char *itype = NULL;
|
||||
int ix, iy, iw, ih, nx, ny, nw, nh;
|
||||
int ix, iy, iw, ih, nx, ny, found = 0;
|
||||
E_Remember *rem = NULL;
|
||||
Eina_List *ll;
|
||||
|
||||
oic = e_fm2_icon_get(evas_object_evas_get(page->fm_obj),
|
||||
ici->ic, NULL, NULL, 0, &itype);
|
||||
if (oic)
|
||||
{
|
||||
const char *file = NULL, *group = NULL;
|
||||
E_Fm2_Custom_File *cf;
|
||||
/* E_Fm2_Custom_File *cf; */
|
||||
|
||||
if (fwin2->win->border->internal_icon)
|
||||
eina_stringshare_del(fwin2->win->border->internal_icon);
|
||||
|
@ -1721,42 +1674,18 @@ _e_fwin_file_open_dialog(E_Fwin_Page *page, Eina_List *files, int always)
|
|||
eina_stringshare_add(file);
|
||||
}
|
||||
evas_object_del(oic);
|
||||
|
||||
snprintf(buf, sizeof(buf), "dir::%s",
|
||||
e_fm2_real_path_get(fwin2->cur_page->fm_obj));
|
||||
cf = e_fm2_custom_file_get(buf);
|
||||
if ((cf) && (cf->geom.valid))
|
||||
{
|
||||
nx = cf->geom.x;
|
||||
ny = cf->geom.y;
|
||||
nw = cf->geom.w;
|
||||
nh = cf->geom.h;
|
||||
/* if it ended up too small - fix to a decent size */
|
||||
if (nw < 24) nw = 200 * e_scale;
|
||||
if (nh < 24) nh = 280 * e_scale;
|
||||
|
||||
/* if it ended up out of the zone */
|
||||
if (nx < fwin2->win->border->zone->x)
|
||||
nx = fwin2->win->border->zone->x;
|
||||
if (ny < fwin2->win->border->zone->y)
|
||||
ny = fwin2->win->border->zone->y;
|
||||
if ((fwin2->win->border->zone->x +
|
||||
fwin2->win->border->zone->w) <
|
||||
(fwin2->win->border->w + nx))
|
||||
nx = fwin2->win->border->zone->x +
|
||||
fwin2->win->border->zone->w -
|
||||
fwin2->win->border->w;
|
||||
if ((fwin2->win->border->zone->y +
|
||||
fwin2->win->border->zone->h) <
|
||||
(fwin2->win->border->h + ny))
|
||||
ny = fwin2->win->border->zone->y +
|
||||
fwin2->win->border->zone->h -
|
||||
fwin2->win->border->h;
|
||||
e_win_move_resize(fwin2->win, nx, ny, nw, nh);
|
||||
}
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "e_fwin::%s", e_fm2_real_path_get(fwin2->cur_page->fm_obj));
|
||||
EINA_LIST_FOREACH(e_config->remembers, ll, rem)
|
||||
if (rem->class && !strcmp(rem->class, buf))
|
||||
{
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
/* No custom info, so just put window near icon */
|
||||
/* No custom info, so just put window near icon */
|
||||
e_fm2_icon_geometry_get(ici->ic, &ix, &iy, &iw, &ih);
|
||||
nx = (ix + (iw / 2));
|
||||
ny = (iy + (ih / 2));
|
||||
|
@ -1777,7 +1706,6 @@ _e_fwin_file_open_dialog(E_Fwin_Page *page, Eina_List *files, int always)
|
|||
e_win_move(fwin2->win, nx, ny);
|
||||
}
|
||||
}
|
||||
fwin2->geom_save_ready = 1;
|
||||
if (ici->label)
|
||||
e_win_title_set(fwin2->win, ici->label);
|
||||
else if (ici->file)
|
||||
|
|
|
@ -85,7 +85,7 @@ e_int_config_fileman(E_Container *con, const char *params __UNUSED__)
|
|||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
||||
if (e_config_dialog_find("E", "_config_fileman_dialog")) return NULL;
|
||||
if (e_config_dialog_find("E", "fileman/fileman")) return NULL;
|
||||
v = E_NEW(E_Config_Dialog_View, 1);
|
||||
v->create_cfdata = _create_data;
|
||||
v->free_cfdata = _free_data;
|
||||
|
@ -93,7 +93,7 @@ e_int_config_fileman(E_Container *con, const char *params __UNUSED__)
|
|||
v->basic.create_widgets = _basic_create;
|
||||
v->basic.check_changed = _basic_check_changed;
|
||||
cfd = e_config_dialog_new(con, _("Fileman Settings"), "E",
|
||||
"_config_fileman_dialog",
|
||||
"fileman/fileman",
|
||||
"system-file-manager", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ _config_gadman_module(E_Container *con, const char *params __UNUSED__)
|
|||
char buf[4096];
|
||||
|
||||
/* check if config dialog exists ... */
|
||||
if (e_config_dialog_find("E", "_e_modules_gadman_config_dialog"))
|
||||
if (e_config_dialog_find("E", "extensions/gadman"))
|
||||
return NULL;
|
||||
|
||||
/* ... else create it */
|
||||
|
@ -56,7 +56,7 @@ _config_gadman_module(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
snprintf(buf, sizeof(buf), "%s/e-module-gadman.edj", Man->module->dir);
|
||||
cfd = e_config_dialog_new(con, _("Gadgets Manager"),
|
||||
"E", "_e_modules_gadman_config_dialog",
|
||||
"E", "extensions/gadman",
|
||||
buf, 0, v, Man);
|
||||
|
||||
Man->config_dialog = cfd;
|
||||
|
|
|
@ -172,7 +172,7 @@ e_mixer_config_module_dialog_new(E_Container *con, E_Mixer_Module_Context *ctxt)
|
|||
E_Config_Dialog *dialog;
|
||||
E_Config_Dialog_View *view;
|
||||
|
||||
if (e_config_dialog_find(_Name, "e_mixer_config_module_dialog_new"))
|
||||
if (e_config_dialog_find(_Name, "extensions/mixer"))
|
||||
return NULL;
|
||||
|
||||
view = E_NEW(E_Config_Dialog_View, 1);
|
||||
|
@ -185,7 +185,7 @@ e_mixer_config_module_dialog_new(E_Container *con, E_Mixer_Module_Context *ctxt)
|
|||
view->basic.apply_cfdata = _basic_apply;
|
||||
|
||||
dialog = e_config_dialog_new(con, _("Mixer Module Settings"),
|
||||
_Name, "e_mixer_config_module_dialog_new",
|
||||
_Name, "extensions/mixer",
|
||||
e_mixer_theme_path(), 0, view, ctxt);
|
||||
|
||||
return dialog;
|
||||
|
|
|
@ -1071,7 +1071,7 @@ _mixer_module_config(E_Container *con, const char *params __UNUSED__)
|
|||
}
|
||||
|
||||
static const char _reg_cat[] = "extensions";
|
||||
static const char _reg_item[] = "extensions/e";
|
||||
static const char _reg_item[] = "extensions/mixer";
|
||||
|
||||
static void
|
||||
_mixer_configure_registry_register(void)
|
||||
|
|
Loading…
Reference in New Issue