formatting: all at once

SVN revision: 82625
This commit is contained in:
Mike Blumenkrantz 2013-01-11 10:34:29 +00:00
parent 845ba1ba12
commit 9e8e755cdf
145 changed files with 5219 additions and 4974 deletions

View File

@ -32,32 +32,32 @@ e_about_new(E_Container *con)
"To contact us please visit:<br>"
"<hilight>http://www.enlightenment.org</><br>"
"<br>"
),
"All rights reserved.<br>"
"<br>"
"Redistribution and use in source and binary forms, with or without "
"modification, are permitted provided that the following conditions "
"are met:<br>"
"<br>"
"1. Redistributions of source code must retain the above copyright "
"notice, this list of conditions and the following disclaimer.<br>"
"2. Redistributions in binary form must reproduce the above copyright "
"notice, this list of conditions and the following disclaimer in the "
"documentation and/or other materials provided with the "
"distribution.<br>"
"<br>"
"<hilight>THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR "
"IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED "
"WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE "
"ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR "
"CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, "
"SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT "
"LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF "
"USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED "
"AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT "
"LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN "
"ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE "
"POSSIBILITY OF SUCH DAMAGE.</><br>"
),
"All rights reserved.<br>"
"<br>"
"Redistribution and use in source and binary forms, with or without "
"modification, are permitted provided that the following conditions "
"are met:<br>"
"<br>"
"1. Redistributions of source code must retain the above copyright "
"notice, this list of conditions and the following disclaimer.<br>"
"2. Redistributions in binary form must reproduce the above copyright "
"notice, this list of conditions and the following disclaimer in the "
"documentation and/or other materials provided with the "
"distribution.<br>"
"<br>"
"<hilight>THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR "
"IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED "
"WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE "
"ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR "
"CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, "
"SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT "
"LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF "
"USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED "
"AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT "
"LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN "
"ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE "
"POSSIBILITY OF SUCH DAMAGE.</><br>"
);
e_obj_dialog_obj_part_text_set(od, "e.textblock.about", buf);

View File

@ -34,8 +34,8 @@ struct _E_ACPI_Device_Multiplexed
/* local function prototypes */
static Eina_Bool _e_acpi_cb_server_del(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _e_acpi_cb_server_data(void *data __UNUSED__, int type __UNUSED__, void *event);
static void _e_acpi_cb_event_free(void *data __UNUSED__, void *event);
static int _e_acpi_lid_status_get(const char *device, const char *bus);
static void _e_acpi_cb_event_free(void *data __UNUSED__, void *event);
static int _e_acpi_lid_status_get(const char *device, const char *bus);
static Eina_Bool _e_acpi_cb_event(void *data __UNUSED__, int type __UNUSED__, void *event);
/* local variables */
@ -47,48 +47,48 @@ static Eina_Strbuf *acpibuf = NULL;
static E_ACPI_Device_Simple _devices_simple[] =
{
/* NB: DO NOT TRANSLATE THESE. */
{"ac_adapter", E_ACPI_TYPE_AC_ADAPTER},
{"battery", E_ACPI_TYPE_BATTERY},
{"button/lid", E_ACPI_TYPE_LID},
{"ac_adapter", E_ACPI_TYPE_AC_ADAPTER},
{"battery", E_ACPI_TYPE_BATTERY},
{"button/lid", E_ACPI_TYPE_LID},
{"button/power", E_ACPI_TYPE_POWER},
{"button/sleep", E_ACPI_TYPE_SLEEP},
{"fan", E_ACPI_TYPE_FAN},
{"processor", E_ACPI_TYPE_PROCESSOR},
{"fan", E_ACPI_TYPE_FAN},
{"processor", E_ACPI_TYPE_PROCESSOR},
{"thermal_zone", E_ACPI_TYPE_THERMAL},
{"video", E_ACPI_TYPE_VIDEO},
{"video", E_ACPI_TYPE_VIDEO},
{NULL, E_ACPI_TYPE_UNKNOWN}
{NULL, E_ACPI_TYPE_UNKNOWN}
};
static E_ACPI_Device_Multiplexed _devices_multiplexed[] =
{
/* NB: DO NOT TRANSLATE THESE. */
/* Sony VAIO - VPCF115FM / PCG-81114L - nvidia gfx */
{"sony/hotkey", NULL, 0x10, E_ACPI_TYPE_BRIGHTNESS_DOWN},
{"sony/hotkey", NULL, 0x11, E_ACPI_TYPE_BRIGHTNESS_UP},
{"sony/hotkey", NULL, 0x12, E_ACPI_TYPE_VIDEO},
{"sony/hotkey", NULL, 0x14, E_ACPI_TYPE_ZOOM_OUT},
{"sony/hotkey", NULL, 0x15, E_ACPI_TYPE_ZOOM_IN},
{"sony/hotkey", NULL, 0x17, E_ACPI_TYPE_HIBERNATE},
{"sony/hotkey", NULL, 0xa6, E_ACPI_TYPE_ASSIST},
{"sony/hotkey", NULL, 0x20, E_ACPI_TYPE_S1},
{"sony/hotkey", NULL, 0xa5, E_ACPI_TYPE_VAIO},
{"sony/hotkey", NULL, 0x10, E_ACPI_TYPE_BRIGHTNESS_DOWN},
{"sony/hotkey", NULL, 0x11, E_ACPI_TYPE_BRIGHTNESS_UP},
{"sony/hotkey", NULL, 0x12, E_ACPI_TYPE_VIDEO},
{"sony/hotkey", NULL, 0x14, E_ACPI_TYPE_ZOOM_OUT},
{"sony/hotkey", NULL, 0x15, E_ACPI_TYPE_ZOOM_IN},
{"sony/hotkey", NULL, 0x17, E_ACPI_TYPE_HIBERNATE},
{"sony/hotkey", NULL, 0xa6, E_ACPI_TYPE_ASSIST},
{"sony/hotkey", NULL, 0x20, E_ACPI_TYPE_S1},
{"sony/hotkey", NULL, 0xa5, E_ACPI_TYPE_VAIO},
/* Sony VAIO - X505 - intel gfx */
{"sony/hotkey", NULL, 0x0e, E_ACPI_TYPE_MUTE},
{"sony/hotkey", NULL, 0x0f, E_ACPI_TYPE_VOLUME},
{"sony/hotkey", NULL, 0x10, E_ACPI_TYPE_BRIGHTNESS},
{"sony/hotkey", NULL, 0x12, E_ACPI_TYPE_VIDEO},
{"sony/hotkey", NULL, 0x0e, E_ACPI_TYPE_MUTE},
{"sony/hotkey", NULL, 0x0f, E_ACPI_TYPE_VOLUME},
{"sony/hotkey", NULL, 0x10, E_ACPI_TYPE_BRIGHTNESS},
{"sony/hotkey", NULL, 0x12, E_ACPI_TYPE_VIDEO},
/* HP Compaq Presario - CQ61 - intel gfx */
/** interesting these get auto-mapped to keys in x11. here for documentation
** but not enabled as we can use regular keybinds for these
** but not enabled as we can use regular keybinds for these
{"video", "DD03", 0x87, E_ACPI_TYPE_BRIGHTNESS_DOWN},
{"video", "DD03", 0x86, E_ACPI_TYPE_BRIGHTNESS_UP},
{"video", "OVGA", 0x80, E_ACPI_TYPE_VIDEO},
*/
*/
/* END */
{NULL, NULL, 0x00, E_ACPI_TYPE_UNKNOWN}
{NULL, NULL, 0x00, E_ACPI_TYPE_UNKNOWN}
};
/* public variables */
@ -105,24 +105,24 @@ e_acpi_init(void)
/* try to connect to acpid socket */
_e_acpid = ecore_con_server_connect(ECORE_CON_LOCAL_SYSTEM,
"/var/run/acpid.socket", -1, NULL);
"/var/run/acpid.socket", -1, NULL);
if (!_e_acpid) return 1;
/* setup handlers */
_e_acpid_hdls =
eina_list_append(_e_acpid_hdls,
ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DEL,
_e_acpi_cb_server_del, NULL));
eina_list_append(_e_acpid_hdls,
ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DEL,
_e_acpi_cb_server_del, NULL));
_e_acpid_hdls =
eina_list_append(_e_acpid_hdls,
ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA,
_e_acpi_cb_server_data, NULL));
eina_list_append(_e_acpid_hdls,
ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA,
_e_acpi_cb_server_data, NULL));
/* Add handlers for standard acpi events */
_e_acpid_hdls =
eina_list_append(_e_acpid_hdls,
ecore_event_handler_add(E_EVENT_ACPI,
_e_acpi_cb_event, NULL));
eina_list_append(_e_acpid_hdls,
ecore_event_handler_add(E_EVENT_ACPI,
_e_acpi_cb_event, NULL));
return 1;
}
@ -132,7 +132,8 @@ e_acpi_shutdown(void)
Ecore_Event_Handler *hdl;
/* cleanup event handlers */
EINA_LIST_FREE(_e_acpid_hdls, hdl) ecore_event_handler_del(hdl);
EINA_LIST_FREE(_e_acpid_hdls, hdl)
ecore_event_handler_del(hdl);
/* kill the server if existing */
if (_e_acpid)
@ -167,7 +168,8 @@ _e_acpi_cb_server_del(void *data __UNUSED__, int type __UNUSED__, void *event)
if (ev->server != _e_acpid) return ECORE_CALLBACK_PASS_ON;
/* cleanup event handlers */
EINA_LIST_FREE(_e_acpid_hdls, hdl) ecore_event_handler_del(hdl);
EINA_LIST_FREE(_e_acpid_hdls, hdl)
ecore_event_handler_del(hdl);
/* kill the server if existing */
if (_e_acpid)
@ -192,7 +194,7 @@ _e_acpi_cb_server_data(void *data __UNUSED__, int type __UNUSED__, void *event)
if ((!ev->data) || (ev->size < 1)) return ECORE_CALLBACK_PASS_ON;
/* write out actual acpi received data to stdout for debugging
res = fwrite(ev->data, ev->size, 1, stdout);
res = fwrite(ev->data, ev->size, 1, stdout);
*/
/* data from a server isnt a string - its not 0 byte terminated. it's just
* a blob of data. copy to string and 0 byte terminate it so it can be
@ -232,8 +234,8 @@ _e_acpi_cb_server_data(void *data __UNUSED__, int type __UNUSED__, void *event)
if ((!strcmp(device, _devices_multiplexed[i].name)) &&
// AND busname not set OR device name matches
(!_devices_multiplexed[i].bus ||
(_devices_multiplexed[i].bus &&
(!strcmp(bus, _devices_multiplexed[i].bus)))) &&
(_devices_multiplexed[i].bus &&
(!strcmp(bus, _devices_multiplexed[i].bus)))) &&
// AND status matches
(_devices_multiplexed[i].status == status))
{
@ -269,6 +271,7 @@ _e_acpi_cb_server_data(void *data __UNUSED__, int type __UNUSED__, void *event)
acpi_event->status =
_e_acpi_lid_status_get(device, bus);
break;
default:
break;
}
@ -350,15 +353,19 @@ _e_acpi_lid_status_get(const char *device, const char *bus)
/* parse out state file */
i = 0;
while (buff[i] != ':') i++;
while (!isalnum(buff[i])) i++;
while (buff[i] != ':')
i++;
while (!isalnum(buff[i]))
i++;
ret = &(buff[i]);
while (isalnum(buff[i])) i++;
while (isalnum(buff[i]))
i++;
buff[i] = 0;
/* compare value from state file and return something sane */
if (!strcmp(ret, "open")) return E_ACPI_LID_OPEN;
else if (!strcmp(ret, "closed")) return E_ACPI_LID_CLOSED;
else if (!strcmp(ret, "closed"))
return E_ACPI_LID_CLOSED;
else return E_ACPI_LID_UNKNOWN;
}
@ -372,3 +379,4 @@ _e_acpi_cb_event(void *data __UNUSED__, int type __UNUSED__, void *event)
e_bindings_acpi_event_handle(E_BINDING_CONTEXT_NONE, NULL, ev);
return ECORE_CALLBACK_PASS_ON;
}

View File

@ -82,7 +82,7 @@
static void _e_actions_act_##act##_go_acpi(E_Object * obj __UNUSED__, const char *params use, E_Event_Acpi * ev __UNUSED__)
/* local functions forward declarations (window_jump_to needs the definition of exec) */
ACT_FN_GO(exec,);
ACT_FN_GO(exec, );
/* local subsystem functions */
static void _e_action_free(E_Action *act);
@ -1175,9 +1175,9 @@ window_jump_to(const char *params)
* only if we don't have to warp the pointer anyway */
current_zone = e_util_zone_current_get(e_manager_current_get());
if (current_zone != bd->zone && e_config->focus_policy == E_FOCUS_CLICK)
ecore_x_pointer_warp(bd->zone->container->win,
bd->zone->x + (bd->zone->w / 2),
bd->zone->y + (bd->zone->h / 2));
ecore_x_pointer_warp(bd->zone->container->win,
bd->zone->x + (bd->zone->w / 2),
bd->zone->y + (bd->zone->h / 2));
/* Change the virtual desktop if the window isn't on the current virtual desktop */
e_desk_show(bd->desk);
@ -1193,12 +1193,12 @@ window_jump_to(const char *params)
return 0;
}
ACT_FN_GO(window_jump_to,)
ACT_FN_GO(window_jump_to, )
{
window_jump_to(params);
}
ACT_FN_GO(window_jump_to_or_start,)
ACT_FN_GO(window_jump_to_or_start, )
{
char *window_name, *start_name;
if (!params) return;
@ -1967,7 +1967,7 @@ ACT_FN_GO_KEY(menu_show, , __UNUSED__)
}
/***************************************************************************/
ACT_FN_GO(exec,)
ACT_FN_GO(exec, )
{
E_Zone *zone;
static double lock;
@ -2037,7 +2037,7 @@ ACT_FN_GO(app_new_instance, __UNUSED__)
E_Zone *zone;
zone = _e_actions_zone_get(obj);
if (!zone)
if (!zone)
zone = e_util_zone_current_get(e_manager_current_get());
if (!obj) obj = E_OBJECT(e_border_focused_get());
@ -2812,7 +2812,7 @@ _delayed_action_mouse_del(E_Object *obj, const char *params __UNUSED__, Ecore_Ev
}
// obj , params , ev
ACT_FN_GO_KEY(delayed_action, ,)
ACT_FN_GO_KEY(delayed_action, , )
{
_delayed_action_key_add(obj, params, ev);
}
@ -2889,7 +2889,7 @@ ACT_FN_GO(kbd_layout_prev, __UNUSED__)
ACT_FN_GO(module_enable, )
{
E_Module *m;
if (!params) return;
m = e_module_find(params);
if (!m)
@ -2903,7 +2903,7 @@ ACT_FN_GO(module_enable, )
ACT_FN_GO(module_disable, )
{
E_Module *m;
if (!params) return;
m = e_module_find(params);
if (!m) return;
@ -2913,7 +2913,7 @@ ACT_FN_GO(module_disable, )
ACT_FN_GO(module_toggle, )
{
E_Module *m;
fprintf(stderr, "toggle\n");
if (!params) return;
fprintf(stderr, "'%s'\n", params);
@ -3019,7 +3019,6 @@ e_actions_init(void)
e_action_predef_name_set(N_("Window : State"), N_("Fullscreen Mode Enable"),
"window_fullscreen", NULL, NULL, 0);
/* window_maximized_toggle */
ACT_GO(window_maximized_toggle);
e_action_predef_name_set(N_("Window : State"), N_("Maximize"),
@ -3062,7 +3061,7 @@ e_actions_init(void)
ACT_GO(window_shaded);
e_action_predef_name_set(N_("Window : State"), N_("Set Shaded State"),
"window_shaded", NULL, _("syntax: \"(0|1) (up|down|left|right)\"") , 1);
"window_shaded", NULL, _("syntax: \"(0|1) (up|down|left|right)\""), 1);
/* window_borderless_toggle */
ACT_GO(window_borderless_toggle);
@ -3228,8 +3227,6 @@ e_actions_init(void)
e_action_predef_name_set(N_("Window : List"), N_("Jump to window... or start..."),
"window_jump_to_or_start", NULL, "syntax: icccm_window_name application", 1);
/* screen_send_to */
ACT_GO(screen_send_to);
e_action_predef_name_set(N_("Screen"), N_("Send Mouse To Screen 0"),
@ -3392,7 +3389,7 @@ e_actions_init(void)
e_action_predef_name_set(N_("Enlightenment : Module"),
N_("Toggle the named module"),
"module_toggle", NULL, NULL, 1);
ACT_GO(logout);
e_action_predef_name_set(N_("System"), N_("Log Out"), "logout",
NULL, NULL, 0);
@ -3726,3 +3723,4 @@ _action_groups_sort_cb(const void *d1, const void *d2)
if (!(g2 = d2)) return -1;
return strcmp(g1->act_grp, g2->act_grp);
}

View File

@ -82,8 +82,8 @@ main(int argc, char **argv)
pid = atoi(argv[i]); // E's pid
else if (i == 3)
backtrace_str = argv[i];
else if (i == 4)
exit_gdb = atoi(argv[i]);
else if (i == 4)
exit_gdb = atoi(argv[i]);
}
fprintf(stderr, "exit_gdb: %i\n", exit_gdb);

View File

@ -20,17 +20,17 @@ e_atoms_init(void)
{
const char *atom_names[] = {
"__E_WINDOW_MANAGED",
"__E_WINDOW_CONTAINER",
"__E_WINDOW_ZONE",
"__E_WINDOW_DESK",
"__E_WINDOW_MAPPED",
"__E_WINDOW_SHADE_DIRECTION",
"__E_WINDOW_HIDDEN",
"__E_WINDOW_BORDER_SIZE",
"__E_ATOM_WINDOW_STATE",
"__E_ATOM_WINDOW_STATE_CENTERED",
"__E_ATOM_DESKTOP_FILE",
"E_ZONE_GEOMETRY"
"__E_WINDOW_CONTAINER",
"__E_WINDOW_ZONE",
"__E_WINDOW_DESK",
"__E_WINDOW_MAPPED",
"__E_WINDOW_SHADE_DIRECTION",
"__E_WINDOW_HIDDEN",
"__E_WINDOW_BORDER_SIZE",
"__E_ATOM_WINDOW_STATE",
"__E_ATOM_WINDOW_STATE_CENTERED",
"__E_ATOM_DESKTOP_FILE",
"E_ZONE_GEOMETRY"
};
Ecore_X_Atom atoms[12];
@ -56,3 +56,4 @@ e_atoms_shutdown(void)
/* Nothing really to do here yet, just present for consistency right now */
return 1;
}

View File

@ -26,8 +26,8 @@ static Ecore_Event_Handler *_e_backlight_handler_border_uniconify = NULL;
static Ecore_Event_Handler *_e_backlight_handler_border_desk_set = NULL;
static Ecore_Event_Handler *_e_backlight_handler_desk_show = NULL;
static void _e_backlight_update(E_Zone *zone);
static void _e_backlight_set(E_Zone *zone, double val);
static void _e_backlight_update(E_Zone *zone);
static void _e_backlight_set(E_Zone *zone, double val);
static Eina_Bool _bl_anim(void *data, double pos);
static Eina_Bool bl_avail = EINA_FALSE;
static Eina_Bool _e_backlight_handler(void *d, int type, void *ev);
@ -39,10 +39,10 @@ static Ecore_Exe *bl_sys_set_exe = NULL;
static Eina_Bool bl_sys_pending_set = EINA_FALSE;
static Eina_Bool bl_sys_set_exe_ready = EINA_TRUE;
static void _bl_sys_find(void);
static void _bl_sys_level_get(void);
static void _bl_sys_find(void);
static void _bl_sys_level_get(void);
static Eina_Bool _e_bl_cb_exit(void *data __UNUSED__, int type __UNUSED__, void *event);
static void _bl_sys_level_set(double val);
static void _bl_sys_level_set(double val);
#endif
EAPI int E_EVENT_BACKLIGHT_CHANGE = -1;
@ -59,28 +59,28 @@ e_backlight_init(void)
bl_avail = EINA_TRUE;
_e_backlight_handler_config_mode = ecore_event_handler_add
(E_EVENT_CONFIG_MODE_CHANGED, _e_backlight_handler, NULL);
(E_EVENT_CONFIG_MODE_CHANGED, _e_backlight_handler, NULL);
_e_backlight_handler_border_fullscreen = ecore_event_handler_add
(E_EVENT_BORDER_FULLSCREEN, _e_backlight_handler, NULL);
(E_EVENT_BORDER_FULLSCREEN, _e_backlight_handler, NULL);
_e_backlight_handler_border_unfullscreen = ecore_event_handler_add
(E_EVENT_BORDER_UNFULLSCREEN, _e_backlight_handler, NULL);
(E_EVENT_BORDER_UNFULLSCREEN, _e_backlight_handler, NULL);
_e_backlight_handler_border_remove = ecore_event_handler_add
(E_EVENT_BORDER_REMOVE, _e_backlight_handler, NULL);
(E_EVENT_BORDER_REMOVE, _e_backlight_handler, NULL);
_e_backlight_handler_border_iconify = ecore_event_handler_add
(E_EVENT_BORDER_ICONIFY, _e_backlight_handler, NULL);
(E_EVENT_BORDER_ICONIFY, _e_backlight_handler, NULL);
_e_backlight_handler_border_uniconify = ecore_event_handler_add
(E_EVENT_BORDER_UNICONIFY, _e_backlight_handler, NULL);
(E_EVENT_BORDER_UNICONIFY, _e_backlight_handler, NULL);
_e_backlight_handler_border_desk_set = ecore_event_handler_add
(E_EVENT_BORDER_DESK_SET, _e_backlight_handler, NULL);
(E_EVENT_BORDER_DESK_SET, _e_backlight_handler, NULL);
_e_backlight_handler_desk_show = ecore_event_handler_add
(E_EVENT_DESK_SHOW, _e_backlight_handler, NULL);
(E_EVENT_DESK_SHOW, _e_backlight_handler, NULL);
if (bl_avail)
{
@ -101,14 +101,15 @@ EINTERN int
e_backlight_shutdown(void)
{
const char *s;
if (bl_anim) ecore_animator_del(bl_anim);
bl_anim = NULL;
if (e_config->backlight.mode != E_BACKLIGHT_MODE_NORMAL)
e_backlight_level_set(NULL, e_config->backlight.normal, 0.0);
EINA_LIST_FREE(bl_devs, s) eina_stringshare_del(s);
EINA_LIST_FREE(bl_devs, s)
eina_stringshare_del(s);
#ifdef HAVE_EEZE
if (bl_sysval) eina_stringshare_del(bl_sysval);
bl_sysval = NULL;
@ -206,16 +207,18 @@ e_backlight_level_set(E_Zone *zone, double val, double tim)
// if tim == 0.0 - then do it instantnly, if time == -1 use some default
// transition time
if (val < 0.0) val = 0.0;
else if (val > 1.0) val = 1.0;
else if (val > 1.0)
val = 1.0;
if ((val == bl_val) && (!bl_anim)) return;
if (!zone) zone = e_util_zone_current_get(e_manager_current_get());
bl_now = bl_val;
bl_val = val;
// if (e_config->backlight.mode != E_BACKLIGHT_MODE_NORMAL) return;
if (e_config->backlight.mode == E_BACKLIGHT_MODE_NORMAL)
tim = 0.5;
tim = 0.5;
else
if (tim < 0.0) tim = e_config->backlight.transition;
if (tim < 0.0)
tim = e_config->backlight.transition;
ecore_event_add(E_EVENT_BACKLIGHT_CHANGE, NULL, NULL, NULL);
if (tim == 0.0)
{
@ -225,7 +228,7 @@ e_backlight_level_set(E_Zone *zone, double val, double tim)
bl_anim = NULL;
}
_e_backlight_set(zone, val);
return;
return;
}
if (bl_anim) ecore_animator_del(bl_anim);
bl_anim = ecore_animator_timeline_add(tim, _bl_anim, zone);
@ -245,7 +248,7 @@ e_backlight_mode_set(E_Zone *zone, E_Backlight_Mode mode)
// zone == NULL == everything
if (e_config->backlight.mode == mode) return;
e_config->backlight.mode = mode;
if (e_config->backlight.mode == E_BACKLIGHT_MODE_NORMAL)
if (e_config->backlight.mode == E_BACKLIGHT_MODE_NORMAL)
{
e_backlight_level_set(zone, e_config->backlight.normal, -1.0);
}
@ -258,7 +261,7 @@ e_backlight_mode_set(E_Zone *zone, E_Backlight_Mode mode)
e_backlight_level_set(zone, e_config->backlight.dim, -1.0);
}
else if (e_config->backlight.mode == E_BACKLIGHT_MODE_MAX)
e_backlight_level_set(zone, 1.0, -1.0);
e_backlight_level_set(zone, 1.0, -1.0);
}
EAPI E_Backlight_Mode
@ -299,8 +302,9 @@ _e_backlight_update(E_Zone *zone)
char *name;
const char *s;
Eina_Bool gotten = EINA_FALSE;
EINA_LIST_FREE(bl_devs, s) eina_stringshare_del(s);
EINA_LIST_FREE(bl_devs, s)
eina_stringshare_del(s);
for (i = 0; i < num; i++)
{
name = ecore_x_randr_output_name_get(root, out[i], NULL);
@ -390,7 +394,7 @@ _bl_anim(void *data, double pos)
// FIXME: if zone is deleted while anim going... bad things.
pos = ecore_animator_pos_map(pos, ECORE_POS_MAP_DECELERATE, 0.0, 0.0);
v = (bl_animval * (1.0 - pos)) + (bl_val *pos);
v = (bl_animval * (1.0 - pos)) + (bl_val * pos);
_e_backlight_set(zone, v);
if (pos >= 1.0)
{
@ -470,7 +474,8 @@ _bl_sys_find(void)
eina_stringshare_del(bl_sysval);
bl_sysval = NULL;
}
EINA_LIST_FREE(bl_devs, s) eina_stringshare_del(s);
EINA_LIST_FREE(bl_devs, s)
eina_stringshare_del(s);
/* if configured backlight is there - use it, or if not use first */
EINA_LIST_FOREACH(pdevs, l, f)
{
@ -504,7 +509,7 @@ _bl_sys_level_get(void)
const char *str;
if (bl_anim) return;
str = eeze_udev_syspath_get_sysattr(bl_sysval, "max_brightness");
if (!str) return;
@ -528,7 +533,7 @@ _e_bl_cb_ext_delay(void *data __UNUSED__)
if (bl_sys_pending_set)
{
bl_sys_pending_set = EINA_FALSE;
_bl_sys_level_set(bl_delayval);
}
return EINA_FALSE;
@ -555,8 +560,8 @@ _bl_sys_level_set(double val)
char buf[PATH_MAX];
if (!bl_sys_exit_handler)
bl_sys_exit_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
_e_bl_cb_exit, NULL);
bl_sys_exit_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
_e_bl_cb_exit, NULL);
bl_delayval = val;
if ((bl_sys_set_exe) || (!bl_sys_set_exe_ready))
{
@ -569,4 +574,5 @@ _bl_sys_level_set(double val)
e_prefix_lib_get(), (int)(val * 1000.0), bl_sysval);
bl_sys_set_exe = ecore_exe_run(buf, NULL);
}
#endif

View File

@ -61,7 +61,7 @@ main(int argc, char **argv)
}
else
exit(1);
if (!dev) return -1;
if (setuid(0) != 0)
@ -94,9 +94,9 @@ main(int argc, char **argv)
}
}
}
if (!devok) return -1;
str = eeze_udev_syspath_get_sysattr(dev, "max_brightness");
if (str)
{
@ -109,19 +109,21 @@ main(int argc, char **argv)
eina_stringshare_del(str);
}
}
if (maxlevel <= 0) maxlevel = 255;
if (curlevel >= 0)
{
curlevel = ((maxlevel * level) + 500) / 1000;
if (curlevel > maxlevel) curlevel = maxlevel;
else if (curlevel < 0) curlevel = 0;
else if (curlevel < 0)
curlevel = 0;
snprintf(buf, sizeof(buf), "%s/brightness", f);
return _bl_write_file(buf, curlevel);
}
EINA_LIST_FREE(devs, f)
eina_stringshare_del(f);
return -1;
}

View File

@ -4,7 +4,7 @@
static void _e_bg_signal(void *data, Evas_Object *obj, const char *emission, const char *source);
static void _e_bg_event_bg_update_free(void *data, void *event);
static void e_bg_handler_set(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *path);
static int e_bg_handler_test(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *path);
static int e_bg_handler_test(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *path);
static void _e_bg_handler_image_imported(const char *image_path, void *data);
/* local subsystem globals */
@ -187,7 +187,7 @@ e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y)
ok = 1;
if (!ok)
eina_stringshare_replace(&bgfile, e_theme_edje_file_get("base/theme/background",
"e/desktop/background"));
"e/desktop/background"));
return bgfile;
}
@ -538,7 +538,6 @@ _e_bg_event_bg_update_free(void *data __UNUSED__, void *event)
static void
_e_bg_handler_image_imported(const char *image_path, void *data __UNUSED__)
{
e_bg_default_set(image_path);
e_bg_update();
e_config_save_queue();

View File

@ -1,18 +1,18 @@
#include "e.h"
/* local subsystem functions */
static Eina_Bool _e_bindings_mapping_change_event_cb(void *data, int type, void *event);
static Eina_Bool _e_bindings_mapping_change_event_cb(void *data, int type, void *event);
static void _e_bindings_mouse_free(E_Binding_Mouse *bind);
static void _e_bindings_key_free(E_Binding_Key *bind);
static void _e_bindings_edge_free(E_Binding_Edge *bind);
static void _e_bindings_signal_free(E_Binding_Signal *bind);
static void _e_bindings_wheel_free(E_Binding_Wheel *bind);
static void _e_bindings_acpi_free(E_Binding_Acpi *bind);
static int _e_bindings_context_match(E_Binding_Context bctxt, E_Binding_Context ctxt);
static void _e_bindings_mouse_free(E_Binding_Mouse *bind);
static void _e_bindings_key_free(E_Binding_Key *bind);
static void _e_bindings_edge_free(E_Binding_Edge *bind);
static void _e_bindings_signal_free(E_Binding_Signal *bind);
static void _e_bindings_wheel_free(E_Binding_Wheel *bind);
static void _e_bindings_acpi_free(E_Binding_Acpi *bind);
static int _e_bindings_context_match(E_Binding_Context bctxt, E_Binding_Context ctxt);
static E_Binding_Modifier _e_bindings_modifiers(unsigned int modifiers);
static int _e_ecore_modifiers(E_Binding_Modifier modifiers);
static Eina_Bool _e_bindings_edge_cb_timer(void *data);
static int _e_ecore_modifiers(E_Binding_Modifier modifiers);
static Eina_Bool _e_bindings_edge_cb_timer(void *data);
/* local subsystem globals */
@ -50,7 +50,7 @@ e_bindings_init(void)
Eina_List *l;
mapping_handler = ecore_event_handler_add
(ECORE_X_EVENT_MAPPING_CHANGE, _e_bindings_mapping_change_event_cb, NULL);
(ECORE_X_EVENT_MAPPING_CHANGE, _e_bindings_mapping_change_event_cb, NULL);
EINA_LIST_FOREACH(e_config->mouse_bindings, l, ebm)
e_bindings_mouse_add(ebm->context, ebm->button, ebm->modifiers,
@ -107,10 +107,10 @@ e_bindings_shutdown(void)
E_FREE_LIST(acpi_bindings, _e_bindings_acpi_free);
if (mapping_handler)
{
ecore_event_handler_del(mapping_handler);
mapping_handler = NULL;
}
{
ecore_event_handler_del(mapping_handler);
mapping_handler = NULL;
}
return 1;
}
@ -175,9 +175,9 @@ e_bindings_edge_reset(void)
{
E_Config_Binding_Edge *ebe;
Eina_List *l;
E_FREE_LIST(edge_bindings, _e_bindings_edge_free);
EINA_LIST_FOREACH(e_config->edge_bindings, l, ebe)
e_bindings_edge_add(ebe->context, ebe->edge, ebe->modifiers,
ebe->any_mod, ebe->action, ebe->params, ebe->delay);
@ -194,7 +194,6 @@ e_bindings_mouse_reset(void)
EINA_LIST_FOREACH(e_config->mouse_bindings, l, ebm)
e_bindings_mouse_add(ebm->context, ebm->button, ebm->modifiers,
ebm->any_mod, ebm->action, ebm->params);
}
EAPI void
@ -307,7 +306,7 @@ e_bindings_mouse_down_find(E_Binding_Context ctxt, E_Object *obj __UNUSED__, Eco
mod = _e_bindings_modifiers(ev->modifiers);
EINA_LIST_FOREACH(mouse_bindings, l, binding)
{
if ((binding->button == (int) ev->buttons) &&
if ((binding->button == (int)ev->buttons) &&
((binding->any_mod) || (binding->mod == mod)))
{
if (_e_bindings_context_match(binding->ctxt, ctxt))
@ -351,7 +350,7 @@ e_bindings_mouse_up_find(E_Binding_Context ctxt, E_Object *obj __UNUSED__, Ecore
mod = _e_bindings_modifiers(ev->modifiers);
EINA_LIST_FOREACH(mouse_bindings, l, binding)
{
if ((binding->button == (int) ev->buttons) &&
if ((binding->button == (int)ev->buttons) &&
((binding->any_mod) || (binding->mod == mod)))
{
if (_e_bindings_context_match(binding->ctxt, ctxt))
@ -634,7 +633,7 @@ e_bindings_edge_flippable_get(E_Zone_Edge edge)
{
if ((!strcmp(binding->action, "desk_flip_in_direction")) ||
(!strcmp(binding->action, "desk_flip_by")))
return EINA_TRUE;
return EINA_TRUE;
}
}
return EINA_FALSE;
@ -652,7 +651,7 @@ e_bindings_edge_non_flippable_get(E_Zone_Edge edge)
{
if ((!strcmp(binding->action, "desk_flip_in_direction")) ||
(!strcmp(binding->action, "desk_flip_by")))
continue;
continue;
return EINA_TRUE;
}
}
@ -740,16 +739,16 @@ e_bindings_edge_in_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Z
/* The original event will be freed before it can be
* used again */
ev2->zone = ev->zone;
ev2->edge = ev->edge;
ev2->x = ev->x;
ev2->y = ev->y;
ev2->zone = ev->zone;
ev2->edge = ev->edge;
ev2->x = ev->x;
ev2->y = ev->y;
ed->bind = binding;
ed->obj = obj;
ed->act = act;
ed->ev = ev2;
binding->timer = ecore_timer_add(((double) binding->delay), _e_bindings_edge_cb_timer, ed);
ed->obj = obj;
ed->act = act;
ed->ev = ev2;
binding->timer = ecore_timer_add(((double)binding->delay), _e_bindings_edge_cb_timer, ed);
}
}
}
@ -907,7 +906,7 @@ e_bindings_signal_del(E_Binding_Context ctxt, const char *sig, const char *src,
}
}
EAPI E_Action *
EAPI E_Action *
e_bindings_signal_find(E_Binding_Context ctxt, E_Object *obj __UNUSED__, const char *sig, const char *src, E_Binding_Signal **bind_ret)
{
E_Binding_Modifier mod = 0;
@ -1013,12 +1012,14 @@ e_bindings_wheel_grab(E_Binding_Context ctxt, Ecore_X_Window win)
if (binding->direction == 0)
{
if (binding->z < 0) button = 4;
else if (binding->z > 0) button = 5;
else if (binding->z > 0)
button = 5;
}
else if (binding->direction == 1)
{
if (binding->z < 0) button = 6;
else if (binding->z > 0) button = 7;
else if (binding->z > 0)
button = 7;
}
if (button != 0)
ecore_x_window_button_grab(win, button,
@ -1043,12 +1044,14 @@ e_bindings_wheel_ungrab(E_Binding_Context ctxt, Ecore_X_Window win)
if (binding->direction == 0)
{
if (binding->z < 0) button = 4;
else if (binding->z > 0) button = 5;
else if (binding->z > 0)
button = 5;
}
else if (binding->direction == 1)
{
if (binding->z < 0) button = 6;
else if (binding->z > 0) button = 7;
else if (binding->z > 0)
button = 7;
}
if (button != 0)
ecore_x_window_button_ungrab(win, button,
@ -1200,12 +1203,12 @@ e_bindings_mapping_change_enable(Eina_Bool enable)
static Eina_Bool
_e_bindings_mapping_change_event_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
{
if (!_e_bindings_mapping_change_enabled) return ECORE_CALLBACK_RENEW;
e_managers_keys_ungrab();
e_border_button_bindings_ungrab_all();
e_border_button_bindings_grab_all();
e_managers_keys_grab();
return ECORE_CALLBACK_PASS_ON;
if (!_e_bindings_mapping_change_enabled) return ECORE_CALLBACK_RENEW;
e_managers_keys_ungrab();
e_border_button_bindings_ungrab_all();
e_border_button_bindings_grab_all();
e_managers_keys_grab();
return ECORE_CALLBACK_PASS_ON;
}
static void
@ -1299,7 +1302,7 @@ _e_bindings_modifiers(unsigned int modifiers)
* may vary from system to system as different xservers may have differing
* modifier masks for numlock (it is queried at startup).
*
if (ev->modifiers & ECORE_X_LOCK_NUM) mod |= ECORE_X_LOCK_NUM;
if (ev->modifiers & ECORE_X_LOCK_NUM) mod |= ECORE_X_LOCK_NUM;
*/
return mod;
@ -1316,7 +1319,7 @@ _e_ecore_modifiers(E_Binding_Modifier modifiers)
if (modifiers & E_BINDING_MODIFIER_WIN) mod |= ECORE_EVENT_MODIFIER_WIN;
/* see comment in e_bindings on numlock
if (modifiers & ECORE_X_LOCK_NUM) mod |= ECORE_X_LOCK_NUM;
*/
*/
return mod;
}
@ -1350,3 +1353,4 @@ _e_bindings_edge_cb_timer(void *data)
return ECORE_CALLBACK_CANCEL;
}

View File

@ -130,7 +130,7 @@ static void _e_border_cb_drag_finished(E_Drag *drag,
int dropped);
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
static Eina_Bool _e_border_cb_desk_window_profile_change(void *data,
int ev_type,
int ev_type,
void *ev);
#endif
static void _e_border_eval(E_Border *bd);
@ -214,7 +214,7 @@ static void _e_border_shape_input_rectangle_set(E_Border *bd);
static void _e_border_show(E_Border *bd);
static void _e_border_hide(E_Border *bd);
static void _e_border_move_lost_window_to_center(E_Border *bd);
static void _e_border_move_lost_window_to_center(E_Border *bd);
static void _e_border_reset_lost_window(E_Border *bd);
static Eina_Bool _e_border_pointer_warp_to_center_timer(void *data);
/* local subsystem globals */
@ -272,10 +272,10 @@ EAPI int E_EVENT_BORDER_PROPERTY = 0;
EAPI int E_EVENT_BORDER_FULLSCREEN = 0;
EAPI int E_EVENT_BORDER_UNFULLSCREEN = 0;
#define GRAV_SET(bd, grav) \
ecore_x_window_gravity_set(bd->bg_win, grav); \
ecore_x_window_gravity_set(bd->client.shell_win, grav); \
if (bd->client.lock_win) ecore_x_window_gravity_set(bd->client.lock_win, grav); \
#define GRAV_SET(bd, grav) \
ecore_x_window_gravity_set(bd->bg_win, grav); \
ecore_x_window_gravity_set(bd->client.shell_win, grav); \
if (bd->client.lock_win) ecore_x_window_gravity_set(bd->client.lock_win, grav); \
ecore_x_window_gravity_set(bd->client.win, grav);
static Eina_List *
@ -1000,7 +1000,7 @@ e_border_desk_set(E_Border *bd,
Eina_List *list = _e_border_sub_borders_new(bd);
EINA_LIST_FREE(list, child)
e_border_desk_set(child, bd->desk);
e_border_desk_set(child, bd->desk);
}
e_remember_update(bd);
}
@ -1091,16 +1091,18 @@ e_border_hide(E_Border *bd,
switch (manage)
{
case 2: break;
case 3:
bd->hidden = 1;
case 1:
default:
if (!e_manager_comp_evas_get(bd->zone->container->manager))
{
/* Make sure that this border isn't deleted */
bd->await_hide_event++;
ecore_x_window_hide(bd->client.win);
}
if (!e_manager_comp_evas_get(bd->zone->container->manager))
{
/* Make sure that this border isn't deleted */
bd->await_hide_event++;
ecore_x_window_hide(bd->client.win);
}
}
}
@ -1785,7 +1787,7 @@ e_border_layer_set(E_Border *bd,
*/
e_config->transient.raise = 1;
EINA_LIST_FREE(list, child)
e_border_layer_set(child, layer);
e_border_layer_set(child, layer);
}
e_border_raise(bd);
if (layer == E_LAYER_BELOW)
@ -1814,39 +1816,39 @@ e_border_raise(E_Border *bd)
Eina_List *list = _e_border_sub_borders_new(bd);
EINA_LIST_REVERSE_FOREACH_SAFE(list, l, l_prev, child)
{
/* Don't stack iconic transients. If the user wants these shown,
* thats another option.
*/
if (!child->iconic)
{
if (last)
e_border_stack_below(child, last);
else
{
E_Border *above;
{
/* Don't stack iconic transients. If the user wants these shown,
* thats another option.
*/
if (!child->iconic)
{
if (last)
e_border_stack_below(child, last);
else
{
E_Border *above;
/* First raise the border to find out which border we will end up above */
above = e_container_border_raise(child);
/* First raise the border to find out which border we will end up above */
above = e_container_border_raise(child);
if (above)
{
/* We ended up above a border, now we must stack this border to
* generate the stacking event, and to check if this transient
* has other transients etc.
*/
e_border_stack_above(child, above);
}
else
{
/* If we didn't end up above any border, we are on the bottom! */
e_border_lower(child);
}
}
last = child;
}
list = eina_list_remove_list(list, l);
}
if (above)
{
/* We ended up above a border, now we must stack this border to
* generate the stacking event, and to check if this transient
* has other transients etc.
*/
e_border_stack_above(child, above);
}
else
{
/* If we didn't end up above any border, we are on the bottom! */
e_border_lower(child);
}
}
last = child;
}
list = eina_list_remove_list(list, l);
}
}
ev = E_NEW(E_Event_Border_Stack, 1);
@ -1903,39 +1905,39 @@ e_border_lower(E_Border *bd)
Eina_List *list = _e_border_sub_borders_new(bd);
EINA_LIST_REVERSE_FOREACH_SAFE(list, l, l_prev, child)
{
/* Don't stack iconic transients. If the user wants these shown,
* thats another option.
*/
if (!child->iconic)
{
if (last)
e_border_stack_below(child, last);
else
{
E_Border *below;
{
/* Don't stack iconic transients. If the user wants these shown,
* thats another option.
*/
if (!child->iconic)
{
if (last)
e_border_stack_below(child, last);
else
{
E_Border *below;
/* First lower the border to find out which border we will end up below */
below = e_container_border_lower(child);
/* First lower the border to find out which border we will end up below */
below = e_container_border_lower(child);
if (below)
{
/* We ended up below a border, now we must stack this border to
* generate the stacking event, and to check if this transient
* has other transients etc.
*/
e_border_stack_below(child, below);
}
else
{
/* If we didn't end up below any border, we are on top! */
e_border_raise(child);
}
}
last = child;
}
list = eina_list_remove_list(list, l);
}
if (below)
{
/* We ended up below a border, now we must stack this border to
* generate the stacking event, and to check if this transient
* has other transients etc.
*/
e_border_stack_below(child, below);
}
else
{
/* If we didn't end up below any border, we are on top! */
e_border_raise(child);
}
}
last = child;
}
list = eina_list_remove_list(list, l);
}
}
ev = E_NEW(E_Event_Border_Stack, 1);
@ -1993,20 +1995,20 @@ e_border_stack_above(E_Border *bd,
Eina_List *list = _e_border_sub_borders_new(bd);
EINA_LIST_REVERSE_FOREACH_SAFE(list, l, l_prev, child)
{
/* Don't stack iconic transients. If the user wants these shown,
* thats another option.
*/
if (!child->iconic)
{
if (last)
e_border_stack_below(child, last);
else
e_border_stack_above(child, above);
last = child;
}
list = eina_list_remove_list(list, l);
}
{
/* Don't stack iconic transients. If the user wants these shown,
* thats another option.
*/
if (!child->iconic)
{
if (last)
e_border_stack_below(child, last);
else
e_border_stack_above(child, above);
last = child;
}
list = eina_list_remove_list(list, l);
}
}
ev = E_NEW(E_Event_Border_Stack, 1);
@ -2051,20 +2053,20 @@ e_border_stack_below(E_Border *bd,
Eina_List *list = _e_border_sub_borders_new(bd);
EINA_LIST_REVERSE_FOREACH_SAFE(bd->transients, l, l_prev, child)
{
/* Don't stack iconic transients. If the user wants these shown,
* thats another option.
*/
if (!child->iconic)
{
if (last)
e_border_stack_below(child, last);
else
e_border_stack_below(child, below);
last = child;
}
list = eina_list_remove_list(list, l);
}
{
/* Don't stack iconic transients. If the user wants these shown,
* thats another option.
*/
if (!child->iconic)
{
if (last)
e_border_stack_below(child, last);
else
e_border_stack_below(child, below);
last = child;
}
list = eina_list_remove_list(list, l);
}
}
ev = E_NEW(E_Event_Border_Stack, 1);
@ -2744,7 +2746,7 @@ _e_border_maximize(E_Border *bd, E_Maximize max)
_e_border_client_inset_calc(bd);
}
e_border_resize_limit(bd, &w, &h);
if (bd->w < zw)
w = bd->w;
else
@ -3217,7 +3219,7 @@ e_border_iconify(E_Border *bd)
Eina_List *list = _e_border_sub_borders_new(bd);
EINA_LIST_FREE(list, child)
e_border_iconify(child);
e_border_iconify(child);
}
e_remember_update(bd);
}
@ -3258,7 +3260,7 @@ e_border_uniconify(E_Border *bd)
Eina_List *list = _e_border_sub_borders_new(bd);
EINA_LIST_FREE(list, child)
e_border_uniconify(child);
e_border_uniconify(child);
}
e_remember_update(bd);
}
@ -3541,14 +3543,14 @@ e_border_idler_before(void)
bd->changes.visible = 0;
}
if (bd->zone && (!bd->new_client) &&
(!E_INSIDE(bd->x, bd->y, 0, 0, bd->zone->w - 5, bd->zone->h - 5)) &&
(!E_INSIDE(bd->x, bd->y, 0 - bd->w + 5, 0 - bd->h + 5, bd->zone->w - 5, bd->zone->h - 5))
if (bd->zone && (!bd->new_client) &&
(!E_INSIDE(bd->x, bd->y, 0, 0, bd->zone->w - 5, bd->zone->h - 5)) &&
(!E_INSIDE(bd->x, bd->y, 0 - bd->w + 5, 0 - bd->h + 5, bd->zone->w - 5, bd->zone->h - 5))
)
{
{
if (e_config->screen_limits != E_SCREEN_LIMITS_COMPLETELY)
_e_border_move_lost_window_to_center(bd);
}
_e_border_move_lost_window_to_center(bd);
}
}
e_container_border_list_free(bl);
@ -4389,30 +4391,30 @@ _e_border_zones_layout_calc(E_Border *bd, int *zx, int *zy, int *zw, int *zh)
zone_right = e_container_zone_at_point_get(bd->zone->container, (x + w + 5), y);
zone_above = e_container_zone_at_point_get(bd->zone->container, x, (y - h + 5));
zone_below = e_container_zone_at_point_get(bd->zone->container, x, (y + h + 5));
if (!(zone_above) && (y))
zone_above = e_container_zone_at_point_get(bd->zone->container, x, (h - 5));
if (!(zone_left) &&(x))
zone_left = e_container_zone_at_point_get(bd->zone->container, (x - 5), y);
zone_above = e_container_zone_at_point_get(bd->zone->container, x, (h - 5));
if (!(zone_left) && (x))
zone_left = e_container_zone_at_point_get(bd->zone->container, (x - 5), y);
if (zone_right)
w = zone_right->x + zone_right->w;
w = zone_right->x + zone_right->w;
if (zone_left)
w = bd->zone->x + bd->zone->w;
w = bd->zone->x + bd->zone->w;
if (zone_below)
h = zone_below->y + zone_below->h;
h = zone_below->y + zone_below->h;
if (zone_above)
h = bd->zone->y + bd->zone->h;
h = bd->zone->y + bd->zone->h;
if ((zone_left) && (zone_right))
w = bd->zone->w + zone_right->x;
w = bd->zone->w + zone_right->x;
if ((zone_above) && (zone_below))
h = bd->zone->h + zone_below->y;
h = bd->zone->h + zone_below->y;
if (x) x -= bd->zone->w;
if (y) y -= bd->zone->h;
@ -4442,7 +4444,7 @@ _e_border_move_lost_window_to_center(E_Border *bd)
{
if (e_config->edge_flip_dragging)
{
Eina_Bool lf, rf, tf, bf;
Eina_Bool lf, rf, tf, bf;
lf = rf = tf = bf = EINA_TRUE;
@ -4459,7 +4461,7 @@ _e_border_move_lost_window_to_center(E_Border *bd)
if (bd->zone->desk_y_current == 0) tf = EINA_FALSE;
if (bd->zone->desk_y_current == (bd->zone->desk_y_count - 1)) bf = EINA_FALSE;
}
if (!(lf) && (bd->x <= loss_overlap) && !(bd->zone->flip.switching))
_e_border_reset_lost_window(bd);
@ -4470,11 +4472,11 @@ _e_border_move_lost_window_to_center(E_Border *bd)
_e_border_reset_lost_window(bd);
if (!(bf) && (bd->y >= (bd->zone->h - loss_overlap)) && !(bd->zone->flip.switching))
_e_border_reset_lost_window(bd);
}
if (!e_config->edge_flip_dragging)
_e_border_reset_lost_window(bd);
_e_border_reset_lost_window(bd);
}
if (!e_config->edge_flip_dragging)
_e_border_reset_lost_window(bd);
}
}
@ -4484,7 +4486,7 @@ _e_border_reset_lost_window(E_Border *bd)
int x, y, w, h;
E_OBJECT_CHECK(bd);
if (bd->during_lost) return ;
if (bd->during_lost) return;
bd->during_lost = EINA_TRUE;
if (bd->iconic) e_border_uniconify(bd);
@ -6151,7 +6153,7 @@ _e_border_cb_window_focus_out(void *data __UNUSED__,
static Eina_Bool
_e_border_cb_client_message(void *data __UNUSED__,
int ev_type __UNUSED__,
void *ev)
void *ev)
{
E_Border *bd;
Ecore_X_Event_Client_Message *e;
@ -6199,6 +6201,7 @@ _e_border_cb_client_message(void *data __UNUSED__,
return ECORE_CALLBACK_PASS_ON;
}
#endif
static Eina_Bool
_e_border_cb_window_state_request(void *data __UNUSED__,
@ -6586,7 +6589,8 @@ _e_border_cb_mouse_in(void *data,
if (!bd->iconic)
e_focus_event_mouse_in(bd);
}
else if (focus_locked) return ECORE_CALLBACK_RENEW;
else if (focus_locked)
return ECORE_CALLBACK_RENEW;
#if 0
if ((ev->win != bd->win) &&
(ev->win != bd->event_win) &&
@ -6880,7 +6884,7 @@ _e_border_stay_within_container(E_Border *bd, int x, int y, int *new_x, int *new
new_y_max = zh - bd->h;
lw = bd->w > zw ? EINA_TRUE : EINA_FALSE;
lh = bd->h > zh ? EINA_TRUE : EINA_FALSE;
if (lw)
{
if (x <= new_x_max)
@ -6960,12 +6964,12 @@ _e_border_cb_mouse_move(void *data,
e_resist_container_border_position(bd->zone->container, skiplist,
bd->x, bd->y, bd->w, bd->h,
x, y, bd->w, bd->h,
&new_x, &new_y, &new_w, &new_h);
&new_x, &new_y, &new_w, &new_h);
eina_list_free(skiplist);
if (e_config->screen_limits == E_SCREEN_LIMITS_WITHIN)
_e_border_stay_within_container(bd, x, y, &new_x, &new_y);
bd->shelf_fix.x = 0;
bd->shelf_fix.y = 0;
bd->shelf_fix.modified = 0;
@ -7122,6 +7126,7 @@ _e_border_cb_desk_window_profile_change(void *data __UNUSED__,
}
return ECORE_CALLBACK_PASS_ON;
}
#endif
static Eina_Bool
_e_border_post_move_resize_job(void *data)
@ -7220,7 +7225,7 @@ _e_border_eval0(E_Border *bd)
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
Eina_Bool need_desk_set = EINA_FALSE;
#endif
if (e_object_is_del(E_OBJECT(bd)))
{
CRI("_e_border_eval(%p) with deleted border!\n", bd);
@ -8250,7 +8255,7 @@ _e_border_eval0(E_Border *bd)
else if ((bd->internal) && (bd->client.icccm.class) &&
(!strncmp(bd->client.icccm.class, "e_fwin", 6)))
bordername = "internal_fileman";
*/
*/
else
bordername = e_config->theme_default_border_style;
if (!bordername) bordername = "default";
@ -8312,7 +8317,6 @@ _e_border_eval0(E_Border *bd)
if (use_argb != bd->argb)
_e_border_frame_replace(bd, use_argb);
if (bd->icon_object != o)
{
if (bd->bg_object)
@ -8564,11 +8568,11 @@ _e_border_eval(E_Border *bd)
{
if (((abs((bd->zone->container->w / 2) - bd->x) < 3) || //bd->x is center of container
((abs((bd->zone->container->w / 2) - bd->x - bd->w) < 3) || //bd->x - bd->w is center of container
(abs((bd->zone->container->w / 2) - bd->x - (bd->w / 2)) < 3))) || //bd->x - bd->w/2 is center of container
(abs((bd->zone->container->w / 2) - bd->x - (bd->w / 2)) < 3))) || //bd->x - bd->w/2 is center of container
((abs((bd->zone->container->h / 2) - bd->y) < 3) || //bd->y is center of container
((abs((bd->zone->container->h / 2) - bd->y - bd->h) < 3) || //bd->y - bd->h is center of container
(abs((bd->zone->container->h / 2) - bd->y - (bd->h / 2)) < 3))) //bd->y - bd->h/2 is center of container
)
(abs((bd->zone->container->h / 2) - bd->y - (bd->h / 2)) < 3))) //bd->y - bd->h/2 is center of container
)
e_border_center(bd);
else
_e_border_move_internal(bd, bd->x, bd->y, 1);

View File

@ -12,8 +12,8 @@ struct _E_Smart_Data
unsigned char changed : 1;
unsigned char horizontal : 1;
unsigned char homogenous : 1;
E_Box_Item *items;
unsigned int item_count;
E_Box_Item *items;
unsigned int item_count;
struct
{
Evas_Coord w, h;
@ -40,7 +40,7 @@ struct _E_Box_Item
{
double x, y;
} align;
int x, y, w, h;
int x, y, w, h;
Evas_Object *obj;
};
@ -232,7 +232,7 @@ e_box_pack_before(Evas_Object *obj, Evas_Object *child, Evas_Object *before)
l = eina_inlist_prepend_relative(l, EINA_INLIST_GET(bi), EINA_INLIST_GET(bi2));
sd->items = EINA_INLIST_CONTAINER_GET(l, E_Box_Item);
sd->item_count++;
for (l = EINA_INLIST_GET(bi)->prev; l; l = l->prev)
i++;
sd->changed = 1;

View File

@ -3,30 +3,30 @@
void
e_color_update_rgb(E_Color *ec)
{
if (!ec) return;
evas_color_rgb_to_hsv(ec->r, ec->g, ec->b, &(ec->h), &(ec->s), &(ec->v));
if (!ec) return;
evas_color_rgb_to_hsv(ec->r, ec->g, ec->b, &(ec->h), &(ec->s), &(ec->v));
}
void
e_color_update_hsv(E_Color *ec)
{
if (!ec) return;
if (ec->v == 0)
ec->r = ec->g = ec->b = 0;
else
evas_color_hsv_to_rgb(ec->h, ec->s, ec->v, &(ec->r), &(ec->g), &(ec->b));
if (!ec) return;
if (ec->v == 0)
ec->r = ec->g = ec->b = 0;
else
evas_color_hsv_to_rgb(ec->h, ec->s, ec->v, &(ec->r), &(ec->g), &(ec->b));
}
void
e_color_copy(const E_Color *from, E_Color *to)
{
if (!from || !to) return;
to->r = from->r;
to->g = from->g;
to->b = from->b;
to->h = from->h;
to->s = from->s;
to->v = from->v;
to->a = from->a;
if (!from || !to) return;
to->r = from->r;
to->g = from->g;
to->b = from->b;
to->h = from->h;
to->s = from->s;
to->v = from->v;
to->a = from->a;
}

View File

@ -6,18 +6,17 @@ e_color_class_init(void)
const Eina_List *l;
const E_Color_Class *cc;
EINA_LIST_FOREACH(e_config->color_classes, l, cc)
{
if (!cc) continue;
EINA_LIST_FOREACH(e_config->color_classes, l, cc)
{
if (!cc) continue;
printf("INIT CC: %s, %d %d %d %d\n", cc->name, cc->r, cc->g, cc->b, cc->a);
edje_color_class_set(cc->name,
cc->r, cc->g, cc->b, cc->a,
cc->r2, cc->g2, cc->b2, cc->a2,
cc->r3, cc->g3, cc->b3, cc->a3);
}
return 1;
printf("INIT CC: %s, %d %d %d %d\n", cc->name, cc->r, cc->g, cc->b, cc->a);
edje_color_class_set(cc->name,
cc->r, cc->g, cc->b, cc->a,
cc->r2, cc->g2, cc->b2, cc->a2,
cc->r3, cc->g3, cc->b3, cc->a3);
}
return 1;
}
EINTERN int
@ -77,32 +76,32 @@ e_color_class_instance_set(E_Color_Class *cc, int r, int g, int b, int a, int r2
if (a3 != -1) cc->a3 = E_CLAMP(a3, 0, 255);
edje_color_class_set(cc->name,
cc->r, cc->g, cc->b, cc->a,
cc->r2, cc->g2, cc->b2, cc->a2,
cc->r3, cc->g3, cc->b3, cc->a3);
cc->r, cc->g, cc->b, cc->a,
cc->r2, cc->g2, cc->b2, cc->a2,
cc->r3, cc->g3, cc->b3, cc->a3);
e_config_save_queue();
}
EAPI E_Color_Class *
e_color_class_set_stringshared(const char *color_class, int r, int g, int b, int a, int r2, int b2, int g2, int a2, int r3, int g3, int b3, int a3)
{
E_Color_Class *cc = e_color_class_find_stringshared(color_class);
if (!cc)
{
cc = E_NEW(E_Color_Class, 1);
if (!cc) return NULL;
e_config->color_classes = eina_list_append(e_config->color_classes, cc);
cc->name = eina_stringshare_ref(color_class);
cc->r = cc->g = cc->b = cc->a = 255;
cc->r2 = cc->g2 = cc->b2 = cc->a2 = 255;
cc->r3 = cc->g3 = cc->b3 = cc->a3 = 255;
}
E_Color_Class *cc = e_color_class_find_stringshared(color_class);
if (!cc)
{
cc = E_NEW(E_Color_Class, 1);
if (!cc) return NULL;
e_config->color_classes = eina_list_append(e_config->color_classes, cc);
cc->name = eina_stringshare_ref(color_class);
cc->r = cc->g = cc->b = cc->a = 255;
cc->r2 = cc->g2 = cc->b2 = cc->a2 = 255;
cc->r3 = cc->g3 = cc->b3 = cc->a3 = 255;
}
e_color_class_instance_set(cc,
r, g, b, a,
r2, g2, b2, a2,
r3, g3, b3, a3);
return cc;
e_color_class_instance_set(cc,
r, g, b, a,
r2, g2, b2, a2,
r3, g3, b3, a3);
return cc;
}
EAPI E_Color_Class *
@ -112,9 +111,9 @@ e_color_class_set(const char *color_class, int r, int g, int b, int a, int r2, i
color_class = eina_stringshare_add(color_class);
cc = e_color_class_set_stringshared(color_class,
r, g, b, a,
r2, g2, b2, a2,
r3, g3, b3, a3);
r, g, b, a,
r2, g2, b2, a2,
r3, g3, b3, a3);
eina_stringshare_del(color_class);
return cc;
@ -159,5 +158,6 @@ e_color_class_del(const char *name)
EAPI Eina_List *
e_color_class_list(void)
{
return e_config->color_classes;
return e_config->color_classes;
}

View File

@ -13,7 +13,7 @@ static void _e_color_dialog_cb_csel_change(void *data, Evas_Object *obj);
* @param color color to initialize to (or NULL for black).
* @param alpha_enabled if set, uses alpha and let user edit it.
*/
E_Color_Dialog *
E_Color_Dialog *
e_color_dialog_new(E_Container *con, const E_Color *color, Eina_Bool alpha_enabled)
{
E_Color_Dialog *dia;
@ -124,9 +124,9 @@ _e_color_dialog_free(E_Color_Dialog *dia)
{
if (dia->dia)
{
e_object_del_attach_func_set(E_OBJECT(dia->dia), NULL);
e_object_del(E_OBJECT(dia->dia));
dia->dia = NULL;
e_object_del_attach_func_set(E_OBJECT(dia->dia), NULL);
e_object_del(E_OBJECT(dia->dia));
dia->dia = NULL;
}
E_FREE(dia->color);
E_FREE(dia);
@ -143,3 +143,4 @@ _e_color_dialog_dia_del(void *obj)
cdia->dia = NULL;
e_object_del(E_OBJECT(cdia));
}

View File

@ -66,14 +66,14 @@ struct _E_Comp
struct _E_Comp_Zone
{
E_Zone *zone; // never deref - just use for handle cmp's
Evas_Object *base;
Evas_Object *over;
int container_num;
int zone_num;
int x, y, w, h;
double bl;
Eina_Bool bloff;
E_Zone *zone; // never deref - just use for handle cmp's
Evas_Object *base;
Evas_Object *over;
int container_num;
int zone_num;
int x, y, w, h;
double bl;
Eina_Bool bloff;
};
struct _E_Comp_Win
@ -262,7 +262,7 @@ _e_comp_fullscreen_check(E_Comp *c)
((cw->x + cw->w) >= c->man->w) &&
((cw->y + cw->h) >= c->man->h) &&
(!cw->argb) && (!cw->shaped)
)
)
{
return cw;
}
@ -471,7 +471,7 @@ _e_comp_win_ready_timeout_setup(E_Comp_Win *cw)
else
{
cw->ready_timeout = ecore_timer_add
(conf->first_draw_delay, _e_comp_cb_win_show_ready_timeout, cw);
(conf->first_draw_delay, _e_comp_cb_win_show_ready_timeout, cw);
}
}
@ -656,7 +656,7 @@ _e_comp_win_update(E_Comp_Win *cw)
}
}
}
*/
*/
ecore_x_pixmap_free(oldpm);
}
}
@ -836,10 +836,10 @@ _e_comp_win_update(E_Comp_Win *cw)
int srcbpp = 0, srcbpl = 0;
// why do we neeed these 2? this smells wrong
srcpix = ecore_x_image_data_get
(cw->xim, &srcbpl, NULL, &srcbpp);
ecore_x_image_to_argb_convert(srcpix,
(cw->xim, &srcbpl, NULL, &srcbpp);
ecore_x_image_to_argb_convert(srcpix,
srcbpp,
srcbpl,
srcbpl,
cw->cmap,
cw->vis,
x, y, w, h,
@ -878,7 +878,7 @@ _e_comp_win_update(E_Comp_Win *cw)
}
// FIXME: below cw update check screws with show
if (/*(!cw->update) &&*/ (cw->visible) && (cw->dmg_updates >= 1) &&
(cw->show_ready) && (!cw->bd || cw->bd->visible))
(cw->show_ready) && (!cw->bd || cw->bd->visible))
{
if (!evas_object_visible_get(cw->shobj))
{
@ -900,8 +900,8 @@ _e_comp_win_update(E_Comp_Win *cw)
cw->pending_count++;
e_manager_comp_event_src_visibility_send
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
cw->show_anim = EINA_TRUE;
}
@ -1039,7 +1039,7 @@ _e_comp_win_adopt(E_Comp_Win *cw)
if (!cw->damage)
{
cw->damage = ecore_x_damage_new
(cw->win, ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES);
(cw->win, ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES);
eina_hash_add(damages, e_util_winid_str_get(cw->damage), cw);
}
if (!cw->update)
@ -1081,7 +1081,7 @@ _e_comp_cb_nocomp_begin(E_Comp *c)
_e_comp_win_release(cw);
ecore_x_composite_unredirect_subwindows
(c->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
(c->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
c->nocomp = 1;
c->render_overflow = OVER_FLOW;
ecore_x_window_hide(c->win);
@ -1128,7 +1128,7 @@ _e_comp_cb_nocomp_end(E_Comp *c)
if (!c->nocomp) return;
ecore_x_composite_redirect_subwindows
(c->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
(c->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
fprintf(stderr, "COMP!\n");
c->nocomp = 0;
@ -1164,8 +1164,8 @@ _e_comp_cb_nocomp_end(E_Comp *c)
if (!cw->hidden_override) _e_comp_child_show(cw);
cw->pending_count++;
e_manager_comp_event_src_visibility_send
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
// no need for effect
}
if (cw->counter)
@ -1270,24 +1270,24 @@ _e_comp_cb_update(E_Comp *c)
switch (conf->fps_corner)
{
case 3: // bottom-right
x = z->x + z->w - w;
y = z->y + z->h - h;
break;
x = z->x + z->w - w;
y = z->y + z->h - h;
break;
case 2: // bottom-left
x = z->x;
y = z->y + z->h - h;
break;
x = z->x;
y = z->y + z->h - h;
break;
case 1: // top-right
x = z->x + z->w - w;
y = z->y;
break;
x = z->x + z->w - w;
y = z->y;
break;
default: // 0 // top-left
x = z->x;
y = z->y;
break;
x = z->x;
y = z->y;
break;
}
}
evas_object_move(c->fps_bg, x, y);
@ -1319,7 +1319,7 @@ _e_comp_cb_update(E_Comp *c)
DBG("JOB1...\n");
if (c->new_up_timer) ecore_timer_del(c->new_up_timer);
c->new_up_timer =
ecore_timer_add(0.001, _e_comp_cb_delayed_update_timer, c);
ecore_timer_add(0.001, _e_comp_cb_delayed_update_timer, c);
// _e_comp_render_queue(c);
}
c->updates = new_updates;
@ -1347,7 +1347,7 @@ _e_comp_cb_update(E_Comp *c)
}
t0 = t;
}
*/
*/
nocomp:
cw = _e_comp_fullscreen_check(c);
if (cw)
@ -1358,7 +1358,7 @@ nocomp:
{
if (!c->nocomp_delay_timer)
c->nocomp_delay_timer = ecore_timer_add
(1.0, _e_comp_cb_nocomp_begin_timeout, c);
(1.0, _e_comp_cb_nocomp_begin_timeout, c);
}
}
}
@ -1994,7 +1994,7 @@ _e_comp_win_add(E_Comp *c,
int num;
cw->damage = ecore_x_damage_new
(cw->win, ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES);
(cw->win, ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES);
eina_hash_add(damages, e_util_winid_str_get(cw->damage), cw);
cw->shobj = edje_object_add(c->evas);
cw->obj = evas_object_image_filled_add(c->evas);
@ -2042,8 +2042,8 @@ _e_comp_win_add(E_Comp *c,
cw->pending_count++;
e_manager_comp_event_src_add_send
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
}
else
{
@ -2064,7 +2064,7 @@ _e_comp_win_add(E_Comp *c,
e_comp_update_tile_size_set(cw->up, 32, 32);
// for software:
e_comp_update_policy_set
(cw->up, E_UPDATE_POLICY_HALF_WIDTH_OR_MORE_ROUND_UP_TO_FULL_WIDTH);
(cw->up, E_UPDATE_POLICY_HALF_WIDTH_OR_MORE_ROUND_UP_TO_FULL_WIDTH);
if (((!cw->input_only) && (!cw->invalid)) && (cw->override))
{
cw->redirected = 1;
@ -2092,8 +2092,8 @@ _e_comp_win_del(E_Comp_Win *cw)
{
cw->pending_count++;
e_manager_comp_event_src_del_send
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
}
e_comp_update_free(cw->up);
@ -2297,8 +2297,8 @@ _e_comp_win_show(E_Comp_Win *cw)
cw->pending_count++;
e_manager_comp_event_src_visibility_send
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
}
_e_comp_win_render_queue(cw);
}
@ -2338,8 +2338,8 @@ _e_comp_win_hide(E_Comp_Win *cw)
cw->pending_count++;
e_manager_comp_event_src_visibility_send
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
return;
}
cw->defer_hide = 0;
@ -2436,8 +2436,8 @@ _e_comp_win_raise_above(E_Comp_Win *cw,
_e_comp_win_render_queue(cw);
cw->pending_count++;
e_manager_comp_event_src_config_send
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
}
static void
@ -2451,8 +2451,8 @@ _e_comp_win_raise(E_Comp_Win *cw)
_e_comp_win_render_queue(cw);
cw->pending_count++;
e_manager_comp_event_src_config_send
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
}
static void
@ -2466,8 +2466,8 @@ _e_comp_win_lower(E_Comp_Win *cw)
_e_comp_win_render_queue(cw);
cw->pending_count++;
e_manager_comp_event_src_config_send
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
}
static void
@ -2612,7 +2612,7 @@ _e_comp_win_damage(E_Comp_Win *cw,
{
if (!cw->update_timeout)
cw->update_timeout = ecore_timer_add
(ecore_animator_frametime_get() * 2,
(ecore_animator_frametime_get() * 2,
_e_comp_win_damage_timeout, cw);
return;
}
@ -2687,24 +2687,24 @@ _e_comp_show(void *data __UNUSED__,
/*
Vincent Torri via lists.sourceforge.net
2:31 PM (8 minutes ago)
2:31 PM (8 minutes ago)
to enlightenment-devel.
would it be possible to add a note in the code, about the reason of
that change ?
to enlightenment-devel.
would it be possible to add a note in the code, about the reason of
that change ?
Vincent
Vincent
On Thu, Jun 21, 2012 at 3:29 PM, Enlightenment SVN
<no-reply@enlightenment.org> wrote:
> Log:
> gtk developers with IQs over 180 enjoy hiding and showing their windows constantly,
> especially when resizing. this broke e's comp since we are not nearly that clever
> and try to defer hide animations in most cases. undoing the defer whenever
> this happens allows us to keep up with their towering genius.
> fixes ticket #765 and probably some others.
> affected apps: claws-mail, firefox
*/
On Thu, Jun 21, 2012 at 3:29 PM, Enlightenment SVN
<no-reply@enlightenment.org> wrote:
> Log:
> gtk developers with IQs over 180 enjoy hiding and showing their windows constantly,
> especially when resizing. this broke e's comp since we are not nearly that clever
> and try to defer hide animations in most cases. undoing the defer whenever
> this happens allows us to keep up with their towering genius.
> fixes ticket #765 and probably some others.
> affected apps: claws-mail, firefox
*/
if (cw->defer_hide)
{
/*
@ -2873,11 +2873,11 @@ _e_comp_message(void *data __UNUSED__,
if ((cw->bd->shading) || (cw->bd->shaded)) force = 1;
clw = cw->hidden.w -
cw->bd->client_inset.l -
cw->bd->client_inset.r;
cw->bd->client_inset.l -
cw->bd->client_inset.r;
clh = cw->hidden.h -
cw->bd->client_inset.t -
cw->bd->client_inset.b;
cw->bd->client_inset.t -
cw->bd->client_inset.b;
DBG(" [0x%x] sync draw done @%4ix%4i, bd %4ix%4i\n", cw->win,
w, h, cw->bd->client.w, cw->bd->client.h);
if ((w != clw) || (h != clh))
@ -2909,40 +2909,40 @@ _e_comp_message(void *data __UNUSED__,
}
DBG(" [0x%x] sync draw done %4ix%4i\n", cw->win, cw->w, cw->h);
// if (cw->bd)
{
if (cw->counter)
{
DBG(" [0x%x] have counter\n", cw->win);
cw->show_ready = 1;
if (!cw->update)
{
DBG(" [0x%x] set update\n", cw->win);
if (cw->update_timeout)
{
DBG(" [0x%x] del timeout\n", cw->win);
ecore_timer_del(cw->update_timeout);
cw->update_timeout = NULL;
}
cw->update = 1;
cw->c->updates = eina_list_append(cw->c->updates, cw);
}
if ((cw->w != cw->hidden.w) ||
(cw->h != cw->hidden.h) ||
(force))
{
DBG(" [0x%x] rsz done msg %4ix%4i\n", cw->win, cw->hidden.w, cw->hidden.h);
cw->w = cw->hidden.w;
cw->h = cw->hidden.h;
cw->needpix = 1;
// was cw->w / cw->h
// evas_object_resize(cw->shobj, cw->pw, cw->ph);
_e_comp_win_geometry_update(cw);
_e_comp_win_damage(cw, 0, 0, cw->w, cw->h, 0);
}
cw->drawme = 1;
_e_comp_win_render_queue(cw);
}
}
{
if (cw->counter)
{
DBG(" [0x%x] have counter\n", cw->win);
cw->show_ready = 1;
if (!cw->update)
{
DBG(" [0x%x] set update\n", cw->win);
if (cw->update_timeout)
{
DBG(" [0x%x] del timeout\n", cw->win);
ecore_timer_del(cw->update_timeout);
cw->update_timeout = NULL;
}
cw->update = 1;
cw->c->updates = eina_list_append(cw->c->updates, cw);
}
if ((cw->w != cw->hidden.w) ||
(cw->h != cw->hidden.h) ||
(force))
{
DBG(" [0x%x] rsz done msg %4ix%4i\n", cw->win, cw->hidden.w, cw->hidden.h);
cw->w = cw->hidden.w;
cw->h = cw->hidden.h;
cw->needpix = 1;
// was cw->w / cw->h
// evas_object_resize(cw->shobj, cw->pw, cw->ph);
_e_comp_win_geometry_update(cw);
_e_comp_win_damage(cw, 0, 0, cw->w, cw->h, 0);
}
cw->drawme = 1;
_e_comp_win_render_queue(cw);
}
}
return ECORE_CALLBACK_PASS_ON;
}
@ -3019,7 +3019,7 @@ _e_comp_override_timed_pop(E_Comp *c)
if (c->nocomp_override_timer)
ecore_timer_del(c->nocomp_override_timer);
c->nocomp_override_timer =
ecore_timer_add(5.0, _e_comp_override_expire, c);
ecore_timer_add(5.0, _e_comp_override_expire, c);
}
/* here for completeness
@ -3033,7 +3033,7 @@ _e_comp_override_timed_pop(E_Comp *c)
if (c->nocomp_want) _e_comp_cb_nocomp_begin(c);
}
}
*/
*/
static void
_e_comp_override_push(E_Comp *c)
@ -3088,9 +3088,9 @@ _e_comp_screensaver_on(void *data __UNUSED__,
{
_e_comp_override_push(c);
_e_comp_fade_handle(cz, 1, 3.0);
edje_object_signal_emit(cz->base,
edje_object_signal_emit(cz->base,
"e,state,screensaver,on", "e");
edje_object_signal_emit(cz->over,
edje_object_signal_emit(cz->over,
"e,state,screensaver,on", "e");
}
}
@ -3115,9 +3115,9 @@ _e_comp_screensaver_off(void *data __UNUSED__,
c->saver = EINA_FALSE;
EINA_LIST_FOREACH(c->zones, ll, cz)
{
edje_object_signal_emit(cz->base,
edje_object_signal_emit(cz->base,
"e,state,screensaver,off", "e");
edje_object_signal_emit(cz->over,
edje_object_signal_emit(cz->over,
"e,state,screensaver,off", "e");
_e_comp_fade_handle(cz, 0, 0.5);
_e_comp_override_timed_pop(c);
@ -3140,7 +3140,7 @@ _e_comp_zone_fill(E_Comp *c, E_Comp_Zone *cz)
if (cz->over)
{
e_theme_edje_object_set(cz->over, "base/theme/modules/comp",
styles[conf->disable_screen_effects]);
styles[conf->disable_screen_effects]);
return;
}
cz->base = o = edje_object_add(c->evas);
@ -3469,7 +3469,8 @@ _e_comp_fps_toggle(void)
conf->fps_show = 1;
e_config_save_queue();
}
EINA_LIST_FOREACH(compositors, l, c) _e_comp_cb_update(c);
EINA_LIST_FOREACH(compositors, l, c)
_e_comp_cb_update(c);
}
static Eina_Bool
@ -3480,9 +3481,9 @@ _e_comp_key_down(void *data __UNUSED__,
Ecore_Event_Key *ev = event;
if ((!strcasecmp(ev->keyname, "f")) &&
(ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) &&
(ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) &&
(ev->modifiers & ECORE_EVENT_MODIFIER_ALT))
(ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) &&
(ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) &&
(ev->modifiers & ECORE_EVENT_MODIFIER_ALT))
{
_e_comp_fps_toggle();
}
@ -3691,9 +3692,9 @@ _e_comp_add(E_Manager *man)
if (res)
{
e_util_dialog_internal
(_("Compositor Error"),
_("Another compositor is already running<br>"
"on your display server."));
(_("Compositor Error"),
_("Another compositor is already running<br>"
"on your display server."));
free(c);
return NULL;
}
@ -3713,10 +3714,10 @@ _e_comp_add(E_Manager *man)
if (!c->win)
{
e_util_dialog_internal
(_("Compositor Error"),
_("Your display server does not support the<br>"
"compositor overlay window. This is needed<br>"
"for it to function."));
(_("Compositor Error"),
_("Your display server does not support the<br>"
"compositor overlay window. This is needed<br>"
"for it to function."));
free(c);
return NULL;
}
@ -3726,7 +3727,7 @@ _e_comp_add(E_Manager *man)
if ((att.depth != 24) && (att.depth != 32))
{
/*
/*
e_util_dialog_internal
(_("Compositor Error"),
_("Your screen is not in 24/32bit display mode.<br>"
@ -3735,7 +3736,7 @@ _e_comp_add(E_Manager *man)
ecore_x_composite_render_window_disable(c->win);
free(c);
return NULL;
*/
*/
}
if (c->man->num == 0) e_alert_composite_win(c->man->root, c->win);
@ -3767,12 +3768,12 @@ _e_comp_add(E_Manager *man)
opt[opt_i] = conf->swap_mode;
opt_i++;
}
#endif
#endif
if (opt_i > 0)
{
opt[opt_i] = ECORE_EVAS_GL_X11_OPT_NONE;
c->ee = ecore_evas_gl_x11_options_new
(NULL, c->win, 0, 0, man->w, man->h, opt);
(NULL, c->win, 0, 0, man->w, man->h, opt);
}
if (!c->ee)
c->ee = ecore_evas_gl_x11_new(NULL, c->win, 0, 0, man->w, man->h);
@ -3780,7 +3781,7 @@ _e_comp_add(E_Manager *man)
{
c->gl = 1;
ecore_evas_gl_x11_pre_post_swap_callback_set
(c->ee, c, _e_comp_pre_swap, NULL);
(c->ee, c, _e_comp_pre_swap, NULL);
}
}
if (!c->ee)
@ -3788,10 +3789,10 @@ _e_comp_add(E_Manager *man)
if (conf->engine == E_COMP_ENGINE_GL)
{
e_util_dialog_internal
(_("Compositor Warning"),
_("Your display driver does not support OpenGL, or<br>"
"no OpenGL engines were compiled or installed for<br>"
"Evas or Ecore-Evas. Falling back to software engine."));
(_("Compositor Warning"),
_("Your display driver does not support OpenGL, or<br>"
"no OpenGL engines were compiled or installed for<br>"
"Evas or Ecore-Evas. Falling back to software engine."));
}
c->ee = ecore_evas_software_x11_new(NULL, c->win, 0, 0, man->w, man->h);
@ -3809,7 +3810,7 @@ _e_comp_add(E_Manager *man)
c->ee_win = ecore_evas_window_get(c->ee);
ecore_x_composite_redirect_subwindows
(c->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
(c->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
wins = ecore_x_window_children_get(c->man->root, &num);
if (wins)
@ -3949,7 +3950,7 @@ _e_comp_del(E_Comp *c)
ecore_evas_free(c->ee);
ecore_x_composite_unredirect_subwindows
(c->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
(c->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
ecore_x_composite_render_window_disable(c->win);
if (c->man->num == 0) e_alert_composite_win(c->man->root, 0);
if (c->render_animator) ecore_animator_del(c->render_animator);
@ -3975,7 +3976,6 @@ _e_comp_del(E_Comp *c)
//////////////////////////////////////////////////////////////////////////
static void
_e_comp_sys_done_cb(void *data, Evas_Object *obj, const char *sig, const char *src)
{
@ -4072,8 +4072,8 @@ _e_comp_config_engine_info_cb(E_Configure_Option *co)
int x;
const char *name[] =
{
"Software",
NULL
"Software",
NULL
};
#define ENGINE_SW 1
@ -4089,14 +4089,13 @@ _e_comp_config_engine_info_cb(E_Configure_Option *co)
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);
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_Bool
_e_comp_config_style_thumb_timer_cb(void *data)
{
@ -4105,7 +4104,7 @@ _e_comp_config_style_thumb_timer_cb(void *data)
demo_state = (long)(intptr_t)evas_object_data_get(data, "style_demo_state");
demo_state = (demo_state + 1) % 4;
evas_object_data_set(data, "style_demo_state", (intptr_t*)(long)demo_state);
evas_object_data_set(data, "style_demo_state", (intptr_t *)(long)demo_state);
oo = evas_object_data_get(ofr, "comp_preview");
switch (demo_state)
@ -4321,19 +4320,19 @@ e_comp_init(void)
if (!ecore_x_composite_query())
{
e_util_dialog_internal
(_("Compositor Error"),
_("Your display server does not support XComposite,<br>"
"or Ecore-X was built without XComposite support.<br>"
"Note that for composite support you will also need<br>"
"XRender and XFixes support in X11 and Ecore."));
(_("Compositor Error"),
_("Your display server does not support XComposite,<br>"
"or Ecore-X was built without XComposite support.<br>"
"Note that for composite support you will also need<br>"
"XRender and XFixes support in X11 and Ecore."));
return EINA_FALSE;
}
if (!ecore_x_damage_query())
{
e_util_dialog_internal
(_("Compositor Error"),
_("Your display server does not support XDamage<br>"
"or Ecore was built without XDamage support."));
(_("Compositor Error"),
_("Your display server does not support XDamage<br>"
"or Ecore was built without XDamage support."));
return EINA_FALSE;
}
@ -4425,7 +4424,7 @@ e_comp_shadows_reset(void)
// ecore_evas_manual_render_set(c->ee, conf->lock_fps);
_e_comp_fps_update(c);
EINA_LIST_FOREACH(c->zones, ll, cz)
_e_comp_zone_fill(c, cz);
_e_comp_zone_fill(c, cz);
EINA_INLIST_FOREACH(c->wins, cw)
{
if ((cw->shobj) && (cw->obj))
@ -4444,8 +4443,8 @@ e_comp_shadows_reset(void)
cw->pending_count++;
e_manager_comp_event_src_visibility_send
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
(cw->c->man, (E_Manager_Comp_Source *)cw,
_e_comp_cb_pending_after, cw->c);
}
}
}

View File

@ -88,7 +88,7 @@ e_comp_cfdata_config_new(void)
cfg->vsync = 1;
#ifdef ECORE_EVAS_GL_X11_OPT_SWAP_MODE
cfg->swap_mode = ECORE_EVAS_GL_X11_SWAP_MODE_AUTO;
#else
#else
cfg->swap_mode = 0;
#endif
cfg->keep_unmapped = 1;
@ -208,3 +208,4 @@ e_comp_cfdata_config_free(E_Comp_Config *cfg)
free(cfg);
}

View File

@ -33,15 +33,15 @@ e_comp_update_free(E_Update *up)
void
e_comp_update_policy_set(E_Update *up,
E_Update_Policy pol)
E_Update_Policy pol)
{
up->pol = pol;
}
void
e_comp_update_tile_size_set(E_Update *up,
int tsw,
int tsh)
int tsw,
int tsh)
{
if ((up->tsw == tsw) && (up->tsh == tsh)) return;
up->tsw = tsw;
@ -51,8 +51,8 @@ e_comp_update_tile_size_set(E_Update *up,
void
e_comp_update_resize(E_Update *up,
int w,
int h)
int w,
int h)
{
unsigned char *ptiles, *p, *pp;
int ptw, pth, x, y;
@ -105,10 +105,10 @@ e_comp_update_resize(E_Update *up,
void
e_comp_update_add(E_Update *up,
int x,
int y,
int w,
int h)
int x,
int y,
int w,
int h)
{
int tx, ty, txx, tyy, xx, yy;
unsigned char *t, *t2;

View File

@ -81,7 +81,7 @@ e_comp_wl_init(void)
fd = wl_event_loop_get_fd(loop);
_wl_fd_handler =
ecore_main_fd_handler_add(fd, ECORE_FD_READ,// | ECORE_FD_WRITE,
ecore_main_fd_handler_add(fd, ECORE_FD_READ, // | ECORE_FD_WRITE,
_e_comp_wl_fd_handle, NULL, NULL, NULL);
wl_event_loop_dispatch(loop, 0);

View File

@ -200,7 +200,7 @@ e_comp_wl_comp_repick(struct wl_seat *seat, uint32_t timestamp __UNUSED__)
ws =
_e_comp_wl_comp_pick_surface(pointer->x, pointer->y,
&pointer->current_x, &pointer->current_y);
&pointer->current_x, &pointer->current_y);
if (!ws) return;
if (&ws->surface != pointer->current)
{
@ -413,7 +413,7 @@ _e_comp_wl_cb_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event
/* ev = event; */
input = e_comp_wl_input_get();
if ((!input) || (!input->seat.keyboard))
if ((!input) || (!input->seat.keyboard))
return ECORE_CALLBACK_PASS_ON;
wl_keyboard_set_focus(input->seat.keyboard, NULL);
wl_data_device_set_keyboard_focus(&input->seat);

View File

@ -20,7 +20,7 @@ static const struct wl_seat_interface _wl_seat_interface =
_e_comp_wl_input_touch_get
};
static const struct wl_pointer_interface _wl_pointer_interface =
static const struct wl_pointer_interface _wl_pointer_interface =
{
_e_comp_wl_input_pointer_cursor_set
};
@ -108,7 +108,7 @@ _e_comp_wl_input_unbind(struct wl_resource *resource)
free(resource);
}
static void
static void
_e_comp_wl_input_pointer_get(struct wl_client *client, struct wl_resource *resource, unsigned int id)
{
Wayland_Input *wi;
@ -119,23 +119,23 @@ _e_comp_wl_input_pointer_get(struct wl_client *client, struct wl_resource *resou
if (!(wi = resource->data)) return;
if (!wi->seat.pointer) return;
res = wl_client_add_object(client, &wl_pointer_interface,
res = wl_client_add_object(client, &wl_pointer_interface,
&_wl_pointer_interface, id, wi);
wl_list_insert(&wi->seat.pointer->resource_list, &res->link);
res->destroy = _e_comp_wl_input_unbind;
if ((wi->seat.pointer->focus) &&
if ((wi->seat.pointer->focus) &&
(wi->seat.pointer->focus->resource.client == client))
{
/* TODO: surface_from_global_fixed ?? */
wl_pointer_set_focus(wi->seat.pointer, wi->seat.pointer->focus,
wi->seat.pointer->x,
wl_pointer_set_focus(wi->seat.pointer, wi->seat.pointer->focus,
wi->seat.pointer->x,
wi->seat.pointer->y);
}
}
static void
static void
_e_comp_wl_input_keyboard_get(struct wl_client *client, struct wl_resource *resource, unsigned int id)
{
Wayland_Input *wi;
@ -152,14 +152,14 @@ _e_comp_wl_input_keyboard_get(struct wl_client *client, struct wl_resource *reso
/* TODO: wl_keyboard_send_keymap ?? */
if ((wi->seat.keyboard->focus) &&
if ((wi->seat.keyboard->focus) &&
(wi->seat.keyboard->focus->resource.client == client))
{
wl_keyboard_set_focus(wi->seat.keyboard, wi->seat.keyboard->focus);
}
}
static void
static void
_e_comp_wl_input_touch_get(struct wl_client *client, struct wl_resource *resource, unsigned int id)
{
Wayland_Input *wi;
@ -175,7 +175,7 @@ _e_comp_wl_input_touch_get(struct wl_client *client, struct wl_resource *resourc
res->destroy = _e_comp_wl_input_unbind;
}
static void
static void
_e_comp_wl_input_pointer_cursor_set(struct wl_client *client, struct wl_resource *resource, unsigned int serial, struct wl_resource *surface_resource, int x, int y)
{
/* Wayland_Input *wi; */
@ -213,8 +213,8 @@ _e_comp_wl_input_pointer_cursor_set(struct wl_client *client, struct wl_resource
/* if (ws->buffer) */
/* { */
/* TODO: cursor surface configure */
/* } */
/* TODO: cursor surface configure */
/* } */
}
/* static void */

View File

@ -180,7 +180,7 @@ _e_comp_wl_shell_map(Wayland_Shell *base, Wayland_Surface *surface, int32_t widt
if (do_configure)
e_comp_wl_surface_configure(surface, surface->x, surface->y,
surface->w, surface->h);
surface->w, surface->h);
switch (type)
{

View File

@ -183,7 +183,7 @@ e_comp_wl_surface_set_input_region(struct wl_client *client __UNUSED__, struct w
e_comp_wl_comp_repick(&input->seat, e_comp_wl_time_get());
}
void
void
e_comp_wl_surface_commit(struct wl_client *client, struct wl_resource *resource)
{
Wayland_Surface *ws;
@ -371,3 +371,4 @@ _e_comp_wl_surface_frame_destroy_callback(struct wl_resource *resource)
wl_list_remove(&cb->link);
free(cb);
}

View File

@ -856,7 +856,7 @@ e_config_init(void)
E_CONFIG_VAL(D, T, desk_auto_switch, INT);
E_CONFIG_VAL(D, T, screen_actions_fullscreen_windows_ignore, UCHAR);
E_CONFIG_VAL(D, T, screen_limits, INT);
E_CONFIG_VAL(D, T, screen_limits, INT);
E_CONFIG_VAL(D, T, thumb_nice, INT);
@ -1086,189 +1086,189 @@ e_config_load(void)
e_sys_action_do(E_SYS_RESTART, NULL);
}
}
if (!e_config->remember_internal_fm_windows)
e_config->remember_internal_fm_windows = !!(e_config->remember_internal_windows & E_REMEMBER_INTERNAL_FM_WINS);
if (!e_config->remember_internal_fm_windows)
e_config->remember_internal_fm_windows = !!(e_config->remember_internal_windows & E_REMEMBER_INTERNAL_FM_WINS);
e_config->config_version = E_CONFIG_FILE_VERSION;
e_config->config_version = E_CONFIG_FILE_VERSION;
/* limit values so they are sane */
E_CONFIG_LIMIT(e_config->menus_scroll_speed, 1.0, 20000.0);
E_CONFIG_LIMIT(e_config->show_splash, 0, 1);
E_CONFIG_LIMIT(e_config->menus_fast_mouse_move_threshhold, 1.0, 2000.0);
E_CONFIG_LIMIT(e_config->menus_click_drag_timeout, 0.0, 10.0);
E_CONFIG_LIMIT(e_config->border_shade_animate, 0, 1);
E_CONFIG_LIMIT(e_config->border_shade_transition, 0, 8);
E_CONFIG_LIMIT(e_config->border_shade_speed, 1.0, 20000.0);
E_CONFIG_LIMIT(e_config->framerate, 1.0, 200.0);
E_CONFIG_LIMIT(e_config->priority, 0, 19);
E_CONFIG_LIMIT(e_config->image_cache, 0, 256 * 1024);
E_CONFIG_LIMIT(e_config->font_cache, 0, 32 * 1024);
E_CONFIG_LIMIT(e_config->edje_cache, 0, 256);
E_CONFIG_LIMIT(e_config->edje_collection_cache, 0, 512);
E_CONFIG_LIMIT(e_config->cache_flush_poll_interval, 8, 32768);
E_CONFIG_LIMIT(e_config->zone_desks_x_count, 1, 64);
E_CONFIG_LIMIT(e_config->zone_desks_y_count, 1, 64);
E_CONFIG_LIMIT(e_config->show_desktop_icons, 0, 1);
E_CONFIG_LIMIT(e_config->edge_flip_dragging, 0, 1);
E_CONFIG_LIMIT(e_config->window_placement_policy, E_WINDOW_PLACEMENT_SMART, E_WINDOW_PLACEMENT_MANUAL);
E_CONFIG_LIMIT(e_config->window_grouping, 0, 1);
E_CONFIG_LIMIT(e_config->focus_policy, 0, 2);
E_CONFIG_LIMIT(e_config->focus_setting, 0, 3);
E_CONFIG_LIMIT(e_config->pass_click_on, 0, 1);
E_CONFIG_LIMIT(e_config->window_activehint_policy, 0, 2);
E_CONFIG_LIMIT(e_config->always_click_to_raise, 0, 1);
E_CONFIG_LIMIT(e_config->always_click_to_focus, 0, 1);
E_CONFIG_LIMIT(e_config->use_auto_raise, 0, 1);
E_CONFIG_LIMIT(e_config->auto_raise_delay, 0.0, 9.9);
E_CONFIG_LIMIT(e_config->use_resist, 0, 1);
E_CONFIG_LIMIT(e_config->drag_resist, 0, 100);
E_CONFIG_LIMIT(e_config->desk_resist, 0, 100);
E_CONFIG_LIMIT(e_config->window_resist, 0, 100);
E_CONFIG_LIMIT(e_config->gadget_resist, 0, 100);
E_CONFIG_LIMIT(e_config->geometry_auto_move, 0, 1);
E_CONFIG_LIMIT(e_config->geometry_auto_resize_limit, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_warp_while_selecting, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_warp_at_end, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_no_warp_on_direction, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_warp_speed, 0.0, 1.0);
E_CONFIG_LIMIT(e_config->winlist_scroll_animate, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_scroll_speed, 0.0, 1.0);
E_CONFIG_LIMIT(e_config->winlist_list_show_iconified, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_list_show_other_desk_iconified, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_list_show_other_screen_iconified, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_list_show_other_desk_windows, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_list_show_other_screen_windows, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_list_uncover_while_selecting, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_list_jump_desk_while_selecting, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_pos_align_x, 0.0, 1.0);
E_CONFIG_LIMIT(e_config->winlist_pos_align_y, 0.0, 1.0);
E_CONFIG_LIMIT(e_config->winlist_pos_size_w, 0.0, 1.0);
E_CONFIG_LIMIT(e_config->winlist_pos_size_h, 0.0, 1.0);
E_CONFIG_LIMIT(e_config->winlist_pos_min_w, 0, 4000);
E_CONFIG_LIMIT(e_config->winlist_pos_min_h, 0, 4000);
E_CONFIG_LIMIT(e_config->winlist_pos_max_w, 8, 4000);
E_CONFIG_LIMIT(e_config->winlist_pos_max_h, 8, 4000);
E_CONFIG_LIMIT(e_config->maximize_policy, E_MAXIMIZE_FULLSCREEN, E_MAXIMIZE_DIRECTION);
E_CONFIG_LIMIT(e_config->allow_manip, 0, 1);
E_CONFIG_LIMIT(e_config->border_fix_on_shelf_toggle, 0, 1);
E_CONFIG_LIMIT(e_config->allow_above_fullscreen, 0, 1);
E_CONFIG_LIMIT(e_config->kill_if_close_not_possible, 0, 1);
E_CONFIG_LIMIT(e_config->kill_process, 0, 1);
E_CONFIG_LIMIT(e_config->kill_timer_wait, 0.0, 120.0);
E_CONFIG_LIMIT(e_config->ping_clients, 0, 1);
E_CONFIG_LIMIT(e_config->move_info_follows, 0, 1);
E_CONFIG_LIMIT(e_config->resize_info_follows, 0, 1);
E_CONFIG_LIMIT(e_config->move_info_visible, 0, 1);
E_CONFIG_LIMIT(e_config->resize_info_visible, 0, 1);
E_CONFIG_LIMIT(e_config->focus_last_focused_per_desktop, 0, 1);
E_CONFIG_LIMIT(e_config->focus_revert_on_hide_or_close, 0, 1);
E_CONFIG_LIMIT(e_config->pointer_slide, 0, 1);
E_CONFIG_LIMIT(e_config->show_cursor, 0, 1);
E_CONFIG_LIMIT(e_config->use_e_cursor, 0, 1);
E_CONFIG_LIMIT(e_config->cursor_size, 0, 1024);
E_CONFIG_LIMIT(e_config->menu_autoscroll_margin, 0, 50);
E_CONFIG_LIMIT(e_config->menu_autoscroll_cursor_margin, 0, 50);
E_CONFIG_LIMIT(e_config->menu_eap_name_show, 0, 1);
E_CONFIG_LIMIT(e_config->menu_eap_generic_show, 0, 1);
E_CONFIG_LIMIT(e_config->menu_eap_comment_show, 0, 1);
E_CONFIG_LIMIT(e_config->use_app_icon, 0, 1);
E_CONFIG_LIMIT(e_config->cnfmdlg_disabled, 0, 1);
E_CONFIG_LIMIT(e_config->cfgdlg_auto_apply, 0, 1);
E_CONFIG_LIMIT(e_config->cfgdlg_default_mode, 0, 1);
E_CONFIG_LIMIT(e_config->font_hinting, 0, 2);
E_CONFIG_LIMIT(e_config->desklock_login_box_zone, -2, 1000);
E_CONFIG_LIMIT(e_config->desklock_autolock_screensaver, 0, 1);
E_CONFIG_LIMIT(e_config->desklock_post_screensaver_time, 0.0, 300.0);
E_CONFIG_LIMIT(e_config->desklock_autolock_idle, 0, 1);
E_CONFIG_LIMIT(e_config->desklock_autolock_idle_timeout, 1.0, 5400.0);
E_CONFIG_LIMIT(e_config->desklock_use_custom_desklock, 0, 1);
E_CONFIG_LIMIT(e_config->desklock_ask_presentation, 0, 1);
E_CONFIG_LIMIT(e_config->desklock_ask_presentation_timeout, 1.0, 300.0);
E_CONFIG_LIMIT(e_config->border_raise_on_mouse_action, 0, 1);
E_CONFIG_LIMIT(e_config->border_raise_on_focus, 0, 1);
E_CONFIG_LIMIT(e_config->desk_flip_wrap, 0, 1);
E_CONFIG_LIMIT(e_config->fullscreen_flip, 0, 1);
E_CONFIG_LIMIT(e_config->icon_theme_overrides, 0, 1);
E_CONFIG_LIMIT(e_config->remember_internal_windows, 0, 3);
E_CONFIG_LIMIT(e_config->remember_internal_fm_windows, 0, 1);
E_CONFIG_LIMIT(e_config->desk_auto_switch, 0, 1);
/* limit values so they are sane */
E_CONFIG_LIMIT(e_config->menus_scroll_speed, 1.0, 20000.0);
E_CONFIG_LIMIT(e_config->show_splash, 0, 1);
E_CONFIG_LIMIT(e_config->menus_fast_mouse_move_threshhold, 1.0, 2000.0);
E_CONFIG_LIMIT(e_config->menus_click_drag_timeout, 0.0, 10.0);
E_CONFIG_LIMIT(e_config->border_shade_animate, 0, 1);
E_CONFIG_LIMIT(e_config->border_shade_transition, 0, 8);
E_CONFIG_LIMIT(e_config->border_shade_speed, 1.0, 20000.0);
E_CONFIG_LIMIT(e_config->framerate, 1.0, 200.0);
E_CONFIG_LIMIT(e_config->priority, 0, 19);
E_CONFIG_LIMIT(e_config->image_cache, 0, 256 * 1024);
E_CONFIG_LIMIT(e_config->font_cache, 0, 32 * 1024);
E_CONFIG_LIMIT(e_config->edje_cache, 0, 256);
E_CONFIG_LIMIT(e_config->edje_collection_cache, 0, 512);
E_CONFIG_LIMIT(e_config->cache_flush_poll_interval, 8, 32768);
E_CONFIG_LIMIT(e_config->zone_desks_x_count, 1, 64);
E_CONFIG_LIMIT(e_config->zone_desks_y_count, 1, 64);
E_CONFIG_LIMIT(e_config->show_desktop_icons, 0, 1);
E_CONFIG_LIMIT(e_config->edge_flip_dragging, 0, 1);
E_CONFIG_LIMIT(e_config->window_placement_policy, E_WINDOW_PLACEMENT_SMART, E_WINDOW_PLACEMENT_MANUAL);
E_CONFIG_LIMIT(e_config->window_grouping, 0, 1);
E_CONFIG_LIMIT(e_config->focus_policy, 0, 2);
E_CONFIG_LIMIT(e_config->focus_setting, 0, 3);
E_CONFIG_LIMIT(e_config->pass_click_on, 0, 1);
E_CONFIG_LIMIT(e_config->window_activehint_policy, 0, 2);
E_CONFIG_LIMIT(e_config->always_click_to_raise, 0, 1);
E_CONFIG_LIMIT(e_config->always_click_to_focus, 0, 1);
E_CONFIG_LIMIT(e_config->use_auto_raise, 0, 1);
E_CONFIG_LIMIT(e_config->auto_raise_delay, 0.0, 9.9);
E_CONFIG_LIMIT(e_config->use_resist, 0, 1);
E_CONFIG_LIMIT(e_config->drag_resist, 0, 100);
E_CONFIG_LIMIT(e_config->desk_resist, 0, 100);
E_CONFIG_LIMIT(e_config->window_resist, 0, 100);
E_CONFIG_LIMIT(e_config->gadget_resist, 0, 100);
E_CONFIG_LIMIT(e_config->geometry_auto_move, 0, 1);
E_CONFIG_LIMIT(e_config->geometry_auto_resize_limit, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_warp_while_selecting, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_warp_at_end, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_no_warp_on_direction, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_warp_speed, 0.0, 1.0);
E_CONFIG_LIMIT(e_config->winlist_scroll_animate, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_scroll_speed, 0.0, 1.0);
E_CONFIG_LIMIT(e_config->winlist_list_show_iconified, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_list_show_other_desk_iconified, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_list_show_other_screen_iconified, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_list_show_other_desk_windows, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_list_show_other_screen_windows, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_list_uncover_while_selecting, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_list_jump_desk_while_selecting, 0, 1);
E_CONFIG_LIMIT(e_config->winlist_pos_align_x, 0.0, 1.0);
E_CONFIG_LIMIT(e_config->winlist_pos_align_y, 0.0, 1.0);
E_CONFIG_LIMIT(e_config->winlist_pos_size_w, 0.0, 1.0);
E_CONFIG_LIMIT(e_config->winlist_pos_size_h, 0.0, 1.0);
E_CONFIG_LIMIT(e_config->winlist_pos_min_w, 0, 4000);
E_CONFIG_LIMIT(e_config->winlist_pos_min_h, 0, 4000);
E_CONFIG_LIMIT(e_config->winlist_pos_max_w, 8, 4000);
E_CONFIG_LIMIT(e_config->winlist_pos_max_h, 8, 4000);
E_CONFIG_LIMIT(e_config->maximize_policy, E_MAXIMIZE_FULLSCREEN, E_MAXIMIZE_DIRECTION);
E_CONFIG_LIMIT(e_config->allow_manip, 0, 1);
E_CONFIG_LIMIT(e_config->border_fix_on_shelf_toggle, 0, 1);
E_CONFIG_LIMIT(e_config->allow_above_fullscreen, 0, 1);
E_CONFIG_LIMIT(e_config->kill_if_close_not_possible, 0, 1);
E_CONFIG_LIMIT(e_config->kill_process, 0, 1);
E_CONFIG_LIMIT(e_config->kill_timer_wait, 0.0, 120.0);
E_CONFIG_LIMIT(e_config->ping_clients, 0, 1);
E_CONFIG_LIMIT(e_config->move_info_follows, 0, 1);
E_CONFIG_LIMIT(e_config->resize_info_follows, 0, 1);
E_CONFIG_LIMIT(e_config->move_info_visible, 0, 1);
E_CONFIG_LIMIT(e_config->resize_info_visible, 0, 1);
E_CONFIG_LIMIT(e_config->focus_last_focused_per_desktop, 0, 1);
E_CONFIG_LIMIT(e_config->focus_revert_on_hide_or_close, 0, 1);
E_CONFIG_LIMIT(e_config->pointer_slide, 0, 1);
E_CONFIG_LIMIT(e_config->show_cursor, 0, 1);
E_CONFIG_LIMIT(e_config->use_e_cursor, 0, 1);
E_CONFIG_LIMIT(e_config->cursor_size, 0, 1024);
E_CONFIG_LIMIT(e_config->menu_autoscroll_margin, 0, 50);
E_CONFIG_LIMIT(e_config->menu_autoscroll_cursor_margin, 0, 50);
E_CONFIG_LIMIT(e_config->menu_eap_name_show, 0, 1);
E_CONFIG_LIMIT(e_config->menu_eap_generic_show, 0, 1);
E_CONFIG_LIMIT(e_config->menu_eap_comment_show, 0, 1);
E_CONFIG_LIMIT(e_config->use_app_icon, 0, 1);
E_CONFIG_LIMIT(e_config->cnfmdlg_disabled, 0, 1);
E_CONFIG_LIMIT(e_config->cfgdlg_auto_apply, 0, 1);
E_CONFIG_LIMIT(e_config->cfgdlg_default_mode, 0, 1);
E_CONFIG_LIMIT(e_config->font_hinting, 0, 2);
E_CONFIG_LIMIT(e_config->desklock_login_box_zone, -2, 1000);
E_CONFIG_LIMIT(e_config->desklock_autolock_screensaver, 0, 1);
E_CONFIG_LIMIT(e_config->desklock_post_screensaver_time, 0.0, 300.0);
E_CONFIG_LIMIT(e_config->desklock_autolock_idle, 0, 1);
E_CONFIG_LIMIT(e_config->desklock_autolock_idle_timeout, 1.0, 5400.0);
E_CONFIG_LIMIT(e_config->desklock_use_custom_desklock, 0, 1);
E_CONFIG_LIMIT(e_config->desklock_ask_presentation, 0, 1);
E_CONFIG_LIMIT(e_config->desklock_ask_presentation_timeout, 1.0, 300.0);
E_CONFIG_LIMIT(e_config->border_raise_on_mouse_action, 0, 1);
E_CONFIG_LIMIT(e_config->border_raise_on_focus, 0, 1);
E_CONFIG_LIMIT(e_config->desk_flip_wrap, 0, 1);
E_CONFIG_LIMIT(e_config->fullscreen_flip, 0, 1);
E_CONFIG_LIMIT(e_config->icon_theme_overrides, 0, 1);
E_CONFIG_LIMIT(e_config->remember_internal_windows, 0, 3);
E_CONFIG_LIMIT(e_config->remember_internal_fm_windows, 0, 1);
E_CONFIG_LIMIT(e_config->desk_auto_switch, 0, 1);
E_CONFIG_LIMIT(e_config->screen_actions_fullscreen_windows_ignore, 0, 1);
E_CONFIG_LIMIT(e_config->screen_limits, 0, 2);
E_CONFIG_LIMIT(e_config->screen_actions_fullscreen_windows_ignore, 0, 1);
E_CONFIG_LIMIT(e_config->screen_limits, 0, 2);
E_CONFIG_LIMIT(e_config->dpms_enable, 0, 1);
E_CONFIG_LIMIT(e_config->dpms_standby_enable, 0, 1);
E_CONFIG_LIMIT(e_config->dpms_suspend_enable, 0, 1);
E_CONFIG_LIMIT(e_config->dpms_off_enable, 0, 1);
E_CONFIG_LIMIT(e_config->dpms_standby_timeout, 30, 5400);
E_CONFIG_LIMIT(e_config->dpms_suspend_timeout, 30, 5400);
E_CONFIG_LIMIT(e_config->dpms_off_timeout, 30, 5400);
E_CONFIG_LIMIT(e_config->dpms_enable, 0, 1);
E_CONFIG_LIMIT(e_config->dpms_standby_enable, 0, 1);
E_CONFIG_LIMIT(e_config->dpms_suspend_enable, 0, 1);
E_CONFIG_LIMIT(e_config->dpms_off_enable, 0, 1);
E_CONFIG_LIMIT(e_config->dpms_standby_timeout, 30, 5400);
E_CONFIG_LIMIT(e_config->dpms_suspend_timeout, 30, 5400);
E_CONFIG_LIMIT(e_config->dpms_off_timeout, 30, 5400);
E_CONFIG_LIMIT(e_config->backlight.timer, 1, 3600);
E_CONFIG_LIMIT(e_config->backlight.timer, 1, 3600);
E_CONFIG_LIMIT(e_config->screensaver_timeout, 30, 5400);
E_CONFIG_LIMIT(e_config->screensaver_interval, 0, 5400);
E_CONFIG_LIMIT(e_config->screensaver_blanking, 0, 2);
E_CONFIG_LIMIT(e_config->screensaver_expose, 0, 2);
E_CONFIG_LIMIT(e_config->screensaver_ask_presentation, 0, 1);
E_CONFIG_LIMIT(e_config->screensaver_ask_presentation_timeout, 1.0, 300.0);
E_CONFIG_LIMIT(e_config->screensaver_timeout, 30, 5400);
E_CONFIG_LIMIT(e_config->screensaver_interval, 0, 5400);
E_CONFIG_LIMIT(e_config->screensaver_blanking, 0, 2);
E_CONFIG_LIMIT(e_config->screensaver_expose, 0, 2);
E_CONFIG_LIMIT(e_config->screensaver_ask_presentation, 0, 1);
E_CONFIG_LIMIT(e_config->screensaver_ask_presentation_timeout, 1.0, 300.0);
E_CONFIG_LIMIT(e_config->clientlist_group_by, 0, 2);
E_CONFIG_LIMIT(e_config->clientlist_include_all_zones, 0, 1);
E_CONFIG_LIMIT(e_config->clientlist_separate_with, 0, 2);
E_CONFIG_LIMIT(e_config->clientlist_sort_by, 0, 3);
E_CONFIG_LIMIT(e_config->clientlist_separate_iconified_apps, 0, 2);
E_CONFIG_LIMIT(e_config->clientlist_warp_to_iconified_desktop, 0, 1);
E_CONFIG_LIMIT(e_config->mouse_hand, 0, 1);
E_CONFIG_LIMIT(e_config->clientlist_limit_caption_len, 0, 1);
E_CONFIG_LIMIT(e_config->clientlist_max_caption_len, 2, E_CLIENTLIST_MAX_CAPTION_LEN);
E_CONFIG_LIMIT(e_config->clientlist_group_by, 0, 2);
E_CONFIG_LIMIT(e_config->clientlist_include_all_zones, 0, 1);
E_CONFIG_LIMIT(e_config->clientlist_separate_with, 0, 2);
E_CONFIG_LIMIT(e_config->clientlist_sort_by, 0, 3);
E_CONFIG_LIMIT(e_config->clientlist_separate_iconified_apps, 0, 2);
E_CONFIG_LIMIT(e_config->clientlist_warp_to_iconified_desktop, 0, 1);
E_CONFIG_LIMIT(e_config->mouse_hand, 0, 1);
E_CONFIG_LIMIT(e_config->clientlist_limit_caption_len, 0, 1);
E_CONFIG_LIMIT(e_config->clientlist_max_caption_len, 2, E_CLIENTLIST_MAX_CAPTION_LEN);
E_CONFIG_LIMIT(e_config->mouse_accel_numerator, 1, 10);
E_CONFIG_LIMIT(e_config->mouse_accel_denominator, 1, 10);
E_CONFIG_LIMIT(e_config->mouse_accel_threshold, 1, 10);
E_CONFIG_LIMIT(e_config->mouse_accel_numerator, 1, 10);
E_CONFIG_LIMIT(e_config->mouse_accel_denominator, 1, 10);
E_CONFIG_LIMIT(e_config->mouse_accel_threshold, 1, 10);
E_CONFIG_LIMIT(e_config->menu_favorites_show, 0, 1);
E_CONFIG_LIMIT(e_config->menu_apps_show, 0, 1);
E_CONFIG_LIMIT(e_config->menu_gadcon_client_toplevel, 0, 1);
E_CONFIG_LIMIT(e_config->menu_favorites_show, 0, 1);
E_CONFIG_LIMIT(e_config->menu_apps_show, 0, 1);
E_CONFIG_LIMIT(e_config->menu_gadcon_client_toplevel, 0, 1);
E_CONFIG_LIMIT(e_config->ping_clients_interval, 16, 1024);
E_CONFIG_LIMIT(e_config->ping_clients_interval, 16, 1024);
E_CONFIG_LIMIT(e_config->mode.presentation, 0, 1);
E_CONFIG_LIMIT(e_config->mode.offline, 0, 1);
E_CONFIG_LIMIT(e_config->mode.presentation, 0, 1);
E_CONFIG_LIMIT(e_config->mode.offline, 0, 1);
E_CONFIG_LIMIT(e_config->exec.expire_timeout, 0.1, 1000);
E_CONFIG_LIMIT(e_config->exec.show_run_dialog, 0, 1);
E_CONFIG_LIMIT(e_config->exec.show_exit_dialog, 0, 1);
E_CONFIG_LIMIT(e_config->exec.expire_timeout, 0.1, 1000);
E_CONFIG_LIMIT(e_config->exec.show_run_dialog, 0, 1);
E_CONFIG_LIMIT(e_config->exec.show_exit_dialog, 0, 1);
E_CONFIG_LIMIT(e_config->null_container_win, 0, 1);
E_CONFIG_LIMIT(e_config->null_container_win, 0, 1);
E_CONFIG_LIMIT(e_config->powersave.none, 0.01, 5400.00);
E_CONFIG_LIMIT(e_config->powersave.low, 0.01, 5400.00);
E_CONFIG_LIMIT(e_config->powersave.medium, 0.01, 5400.00);
E_CONFIG_LIMIT(e_config->powersave.high, 0.01, 5400.00);
E_CONFIG_LIMIT(e_config->powersave.extreme, 0.01, 5400.00);
E_CONFIG_LIMIT(e_config->powersave.min, E_POWERSAVE_MODE_NONE, E_POWERSAVE_MODE_EXTREME);
E_CONFIG_LIMIT(e_config->powersave.max, E_POWERSAVE_MODE_NONE, E_POWERSAVE_MODE_EXTREME);
E_CONFIG_LIMIT(e_config->powersave.none, 0.01, 5400.00);
E_CONFIG_LIMIT(e_config->powersave.low, 0.01, 5400.00);
E_CONFIG_LIMIT(e_config->powersave.medium, 0.01, 5400.00);
E_CONFIG_LIMIT(e_config->powersave.high, 0.01, 5400.00);
E_CONFIG_LIMIT(e_config->powersave.extreme, 0.01, 5400.00);
E_CONFIG_LIMIT(e_config->powersave.min, E_POWERSAVE_MODE_NONE, E_POWERSAVE_MODE_EXTREME);
E_CONFIG_LIMIT(e_config->powersave.max, E_POWERSAVE_MODE_NONE, E_POWERSAVE_MODE_EXTREME);
E_CONFIG_LIMIT(e_config->border_keyboard.move.dx, 1, 255);
E_CONFIG_LIMIT(e_config->border_keyboard.move.dy, 1, 255);
E_CONFIG_LIMIT(e_config->border_keyboard.resize.dx, 1, 255);
E_CONFIG_LIMIT(e_config->border_keyboard.resize.dy, 1, 255);
E_CONFIG_LIMIT(e_config->border_keyboard.move.dx, 1, 255);
E_CONFIG_LIMIT(e_config->border_keyboard.move.dy, 1, 255);
E_CONFIG_LIMIT(e_config->border_keyboard.resize.dx, 1, 255);
E_CONFIG_LIMIT(e_config->border_keyboard.resize.dy, 1, 255);
E_CONFIG_LIMIT(e_config->multiscreen_flip, 0, 1);
E_CONFIG_LIMIT(e_config->multiscreen_flip, 0, 1);
if (!e_config->icon_theme)
e_config->icon_theme = eina_stringshare_add("hicolor"); // FDO default
if (!e_config->icon_theme)
e_config->icon_theme = eina_stringshare_add("hicolor"); // FDO default
/* FIXME: disabled auto apply because it causes problems */
e_config->cfgdlg_auto_apply = 0;
/* FIXME: desklock personalized password id disabled for security reasons */
e_config->desklock_auth_method = 0;
if (e_config->desklock_personal_passwd)
eina_stringshare_del(e_config->desklock_personal_passwd);
e_config->desklock_personal_passwd = NULL;
/* FIXME: disabled auto apply because it causes problems */
e_config->cfgdlg_auto_apply = 0;
/* FIXME: desklock personalized password id disabled for security reasons */
e_config->desklock_auth_method = 0;
if (e_config->desklock_personal_passwd)
eina_stringshare_del(e_config->desklock_personal_passwd);
e_config->desklock_personal_passwd = NULL;
ecore_event_add(E_EVENT_CONFIG_LOADED, NULL, NULL, NULL);
ecore_event_add(E_EVENT_CONFIG_LOADED, NULL, NULL, NULL);
}
EAPI int
@ -2175,3 +2175,4 @@ _e_config_eet_close_handle(Eet_File *ef, char *file)
}
return 1;
}

View File

@ -10,7 +10,8 @@ e_config_descriptor_new(const char *name, int size)
/* FIXME: We can directly map string inside an Eet_File and reuse it.
But this need a break in all user of config every where in E.
*/
*/
return (E_Config_DD *) eet_data_descriptor_stream_new(&eddc);
return (E_Config_DD *)eet_data_descriptor_stream_new(&eddc);
}

View File

@ -18,8 +18,8 @@ static Eina_List *_e_config_dialog_list = NULL;
/* externally accessible functions */
/**
* Creates a new dialog
/**
* Creates a new dialog
*
* @param con the container the dialog will be added too
* @param title to display for the dialog

View File

@ -101,10 +101,10 @@ e_configure_registry_item_params_add(const char *path, int pri, const char *labe
_e_configure_registry_item_full_add(path, pri, label, icon_file, icon, func, NULL, NULL, params);
}
/**
/**
* Delete an item in the configuration panel.
*
* @param path location the item to delete
*
* @param path location the item to delete
*/
EAPI void
e_configure_registry_item_del(const char *path)
@ -138,15 +138,15 @@ e_configure_registry_item_del(const char *path)
free(cat);
}
/**
/**
* Add a category to the configuration panel.
*
* @param path location the new category
* @param path location the new category
* @param pri the priority for sorting the category in the category list
* @param label the name the user will see in configuration panel
* @param icon_file the edje file that holds the icon for the category.
* Can be null to use current theme.
* @param icon the name of the edje group to use as icon
* @param icon the name of the edje group to use as icon
*/
static int
_E_configure_category_pri_cb(E_Configure_Cat *ecat, E_Configure_Cat *ecat2)
@ -180,10 +180,10 @@ e_configure_registry_category_add(const char *path, int pri, const char *label,
ecat);
}
/**
/**
* Delete a category in the configuration panel.
*
* @param path location the category to delete
*
* @param path location the category to delete
*/
EAPI void
e_configure_registry_category_del(const char *path)
@ -209,10 +209,10 @@ e_configure_registry_category_del(const char *path)
free(cat);
}
/**
/**
* Add a item to the configuration panel.
*
* @param path location the location to place configuration item
* @param path location the location to place configuration item
* @param pri the priority for sorting the item in the category list
* @param label the name the user will see in configuration panel
* @param icon_file the edje file that holds the icon for the category.
@ -313,7 +313,7 @@ _e_configure_efreet_desktop_cleanup(void)
E_Configure_It *eci;
Eina_List *ll, *ln;
EINA_LIST_FOREACH_SAFE (ecat->items, ll, ln, eci)
EINA_LIST_FOREACH_SAFE(ecat->items, ll, ln, eci)
if (eci->desktop)
{
_e_configure_registry_item_free(eci);

View File

@ -18,13 +18,13 @@ static Eina_List *gtk_theme_mons = NULL; //Eio_Monitor
static Eio_File *bg_ls[2] = {NULL, NULL};
static Eio_Monitor *bg_mon[2] = {NULL, NULL};
static Eina_Inlist *opts_list = NULL;
static Eina_Hash *tags_name_hash = NULL;/* (const char*)tag:(Eina_Stringshare*)tag */
static Eina_Hash *tags_hash = NULL;/* tag:item */
static Eina_Hash *tags_name_hash = NULL; /* (const char*)tag:(Eina_Stringshare*)tag */
static Eina_Hash *tags_hash = NULL; /* tag:item */
static Eina_Hash *tags_alias_hash = NULL; /* alias:tag */
static Eina_Hash *tags_tag_alias_hash = NULL; /* tag:Eina_List(aliases) */
static Eina_Hash *tags_alias_name_hash = NULL;/* (const char*)alias:(Eina_Stringshare*)alias */
static Eina_Hash *tags_alias_name_hash = NULL; /* (const char*)alias:(Eina_Stringshare*)alias */
static Eina_List *tags_alias_list = NULL; /* alias:tag */
static Eina_List *tags_list = NULL;/* Eina_Stringshare */
static Eina_List *tags_list = NULL; /* Eina_Stringshare */
static Eina_List *opts_changed_list = NULL; //co->changed
static Eina_List *handlers = NULL;
static Eina_List *bgs = NULL;
@ -113,7 +113,6 @@ _e_configure_option_tag_remove(E_Configure_Option *co, Eina_Stringshare *tag)
eina_hash_set(tags_hash, tag, items);
}
static void
_e_configure_option_free(E_Configure_Option *co)
{
@ -225,22 +224,27 @@ _e_configure_option_value_reset(E_Configure_Option *co)
case E_CONFIGURE_OPTION_TYPE_BOOL:
eina_value_setup(&co->val, EINA_VALUE_TYPE_UCHAR);
break;
case E_CONFIGURE_OPTION_TYPE_INT:
case E_CONFIGURE_OPTION_TYPE_ENUM:
eina_value_setup(&co->val, EINA_VALUE_TYPE_INT);
break;
case E_CONFIGURE_OPTION_TYPE_UINT:
eina_value_setup(&co->val, EINA_VALUE_TYPE_UINT);
break;
case E_CONFIGURE_OPTION_TYPE_DOUBLE_UCHAR:
case E_CONFIGURE_OPTION_TYPE_DOUBLE_INT:
case E_CONFIGURE_OPTION_TYPE_DOUBLE_UINT:
case E_CONFIGURE_OPTION_TYPE_DOUBLE:
eina_value_setup(&co->val, EINA_VALUE_TYPE_DOUBLE);
break;
case E_CONFIGURE_OPTION_TYPE_STR:
eina_value_setup(&co->val, EINA_VALUE_TYPE_STRINGSHARE);
break;
case E_CONFIGURE_OPTION_TYPE_CUSTOM:
break;
}
@ -261,9 +265,9 @@ _e_configure_option_apply(E_Configure_Option *co, Eina_List **events, Eina_List
eina_value_get(&co->val, &dbl);
x = lround(dbl);
if (co->type == E_CONFIGURE_OPTION_TYPE_DOUBLE_INT)
*(int*)co->valptr = x;
*(int *)co->valptr = x;
else
*(unsigned int*)co->valptr = MAX(x, 0);
*(unsigned int *)co->valptr = MAX(x, 0);
}
else if (co->type == E_CONFIGURE_OPTION_TYPE_STR)
{
@ -282,7 +286,7 @@ _e_configure_option_apply(E_Configure_Option *co, Eina_List **events, Eina_List
{
if (!acts)
{
act->func.go((E_Object*)e_util_container_current_get(), NULL);
act->func.go((E_Object *)e_util_container_current_get(), NULL);
break;
}
if (*acts && eina_list_data_find(*acts, act)) break;
@ -297,12 +301,12 @@ _e_configure_option_apply(E_Configure_Option *co, Eina_List **events, Eina_List
ecore_event_add(co->event_type, NULL, NULL, NULL);
break;
}
if (*events && eina_list_data_find(*events, (intptr_t*)(long)co->event_type)) break;
*events = eina_list_append(*events, (intptr_t*)(long)co->event_type);
break;
if (*events && eina_list_data_find(*events, (intptr_t *)(long)co->event_type)) break;
*events = eina_list_append(*events, (intptr_t *)(long)co->event_type);
break;
}
if (co->type == E_CONFIGURE_OPTION_TYPE_BOOL)
none = co->funcs[*(Eina_Bool*)co->valptr].none;
none = co->funcs[*(Eina_Bool *)co->valptr].none;
else if (co->funcs[0].none)
none = co->funcs[0].none;
while (none)
@ -321,26 +325,32 @@ _e_configure_option_apply(E_Configure_Option *co, Eina_List **events, Eina_List
switch (co->type)
{
case E_CONFIGURE_OPTION_TYPE_BOOL:
co->funcs[0].one(*(Eina_Bool*)co->valptr);
co->funcs[0].one(*(Eina_Bool *)co->valptr);
break;
case E_CONFIGURE_OPTION_TYPE_DOUBLE_UCHAR:
co->funcs[0].one(*(unsigned char*)co->valptr);
co->funcs[0].one(*(unsigned char *)co->valptr);
break;
case E_CONFIGURE_OPTION_TYPE_DOUBLE_INT: //lround(double)
case E_CONFIGURE_OPTION_TYPE_INT:
case E_CONFIGURE_OPTION_TYPE_ENUM:
co->funcs[0].one(*(int*)co->valptr);
co->funcs[0].one(*(int *)co->valptr);
break;
case E_CONFIGURE_OPTION_TYPE_DOUBLE_UINT: //lround(double)
case E_CONFIGURE_OPTION_TYPE_UINT:
co->funcs[0].one(*(unsigned int*)co->valptr);
co->funcs[0].one(*(unsigned int *)co->valptr);
break;
case E_CONFIGURE_OPTION_TYPE_DOUBLE:
co->funcs[0].one(*(double*)co->valptr);
co->funcs[0].one(*(double *)co->valptr);
break;
case E_CONFIGURE_OPTION_TYPE_STR:
co->funcs[0].one(*(Eina_Stringshare**)co->valptr);
co->funcs[0].one(*(Eina_Stringshare **)co->valptr);
break;
case E_CONFIGURE_OPTION_TYPE_CUSTOM:
break;
}
@ -418,7 +428,6 @@ _e_configure_zone_desks_count_changed(void)
e_zone_desk_count_set(zone, e_config->zone_desks_x_count, e_config->zone_desks_x_count);
}
/********************************************************
* THUMB CALLBACKS
*/
@ -531,7 +540,6 @@ _e_configure_border_style_thumb_cb(E_Configure_Option_Info *oi, Evas *evas)
return ob;
}
static Evas_Object *
_e_configure_icon_theme_thumb_cb(E_Configure_Option_Info *oi, Evas *evas)
{
@ -584,7 +592,7 @@ _e_configure_netwm_theme_thumb_cb(E_Configure_Option_Info *oi EINA_UNUSED, Evas
Evas_Object *o;
/* FIXME: uhhhhhhhhhhhhhhhhhhhhhh */
//o = e_widget_label_add(evas, oi->name);
//o = e_widget_label_add(evas, oi->name);
o = e_box_add(evas);
return o;
}
@ -593,11 +601,10 @@ _e_configure_netwm_theme_thumb_cb(E_Configure_Option_Info *oi EINA_UNUSED, Evas
* INFO CALLBACKS
*/
/* FIXME
static Eina_List *
_e_configure_language_info_cb(E_Configure_Option *co)
{
static Eina_List *
_e_configure_language_info_cb(E_Configure_Option *co)
{
Eina_List *l, *ret = NULL;
E_Configure_Option_Info *oi;
char *lang;
@ -611,8 +618,8 @@ _e_configure_language_info_cb(E_Configure_Option *co)
}
return ret;
}
*/
}
*/
static Eina_List *
_e_configure_border_shade_transition_info_cb(E_Configure_Option *co)
@ -622,21 +629,21 @@ _e_configure_border_shade_transition_info_cb(E_Configure_Option *co)
int x;
const char *name[] =
{
"Linear",
"Accelerate, then decelerate",
"Accelerate",
"Decelerate",
"Pronounced accelerate",
"Pronounced decelerate",
"Pronounced accelerate, then decelerate",
"Bounce",
"Bounce more"
"Linear",
"Accelerate, then decelerate",
"Accelerate",
"Decelerate",
"Pronounced accelerate",
"Pronounced decelerate",
"Pronounced accelerate, then decelerate",
"Bounce",
"Bounce more"
};
for (x = 0; x <= E_TRANSITION_BOUNCE_LOTS; x++)
{
oi = e_configure_option_info_new(co, _(name[x]), (intptr_t*)(long)x);
oi->current = (*(int*)co->valptr == 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;
@ -650,16 +657,16 @@ _e_configure_window_placement_policy_info_cb(E_Configure_Option *co)
int x;
const char *name[] =
{
"Try not to cover other windows",
"Try not to cover gadgets",
"Place at mouse pointer (automatic)",
"Place at mouse pointer (interactive)"
"Try not to cover other windows",
"Try not to cover gadgets",
"Place at mouse pointer (automatic)",
"Place at mouse pointer (interactive)"
};
for (x = 0; x <= E_WINDOW_PLACEMENT_MANUAL; x++)
{
oi = e_configure_option_info_new(co, _(name[x]), (intptr_t*)(long)x);
oi->current = (*(int*)co->valptr == 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;
@ -673,15 +680,15 @@ _e_configure_focus_policy_info_cb(E_Configure_Option *co)
int x;
const char *name[] =
{
"Click",
"Pointer",
"Sloppy"
"Click",
"Pointer",
"Sloppy"
};
for (x = 0; x <= E_FOCUS_SLOPPY; x++)
{
oi = e_configure_option_info_new(co, _(name[x]), (intptr_t*)(long)x);
oi->current = (*(int*)co->valptr == 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;
@ -695,16 +702,16 @@ _e_configure_focus_setting_info_cb(E_Configure_Option *co)
int x;
const char *name[] =
{
"Don't set focus on new windows",
"Set focus on all new windows",
"Set focus only on all new dialog windows",
"Set focus only on new dialog windows if dialog's parent window has focus"
"Don't set focus on new windows",
"Set focus on all new windows",
"Set focus only on all new dialog windows",
"Set focus only on new dialog windows if dialog's parent window has focus"
};
for (x = 0; x <= E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED; x++)
{
oi = e_configure_option_info_new(co, _(name[x]), (intptr_t*)(long)x);
oi->current = (*(int*)co->valptr == 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;
@ -718,15 +725,15 @@ _e_configure_window_activehint_policy_info_cb(E_Configure_Option *co)
int x;
const char *name[] =
{
"Ignore application",
"Animate application window",
"Raise and set focus to application window"
"Ignore application",
"Animate application window",
"Raise and set focus to application window"
};
for (x = 0; x <= E_ACTIVEHINT_POLICY_ACTIVATE; x++)
{
oi = e_configure_option_info_new(co, _(name[x]), (intptr_t*)(long)x);
oi->current = (*(int*)co->valptr == 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;
@ -740,14 +747,14 @@ _e_configure_fullscreen_policy_info_cb(E_Configure_Option *co)
int x;
const char *name[] =
{
"Resize window, do not resize screen",
"Resize window and screen"
"Resize window, do not resize screen",
"Resize window and screen"
};
for (x = 0; x <= E_FULLSCREEN_ZOOM; x++)
{
oi = e_configure_option_info_new(co, _(name[x]), (intptr_t*)(long)x);
oi->current = (*(int*)co->valptr == 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;
@ -761,17 +768,17 @@ _e_configure_maximize_policy_info_cb(E_Configure_Option *co)
int x;
const char *name[] =
{
"Fullscreen", /* 1 */
"Expand to maximum size without covering shelves", /* 2 */
NULL,
"Expand to maximum size ignoring shelves" /* 4 */
"Fullscreen", /* 1 */
"Expand to maximum size without covering shelves", /* 2 */
NULL,
"Expand to maximum size ignoring shelves" /* 4 */
};
for (x = E_MAXIMIZE_FULLSCREEN; x <= E_MAXIMIZE_FILL; 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);
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;
@ -785,15 +792,15 @@ _e_configure_font_hinting_info_cb(E_Configure_Option *co)
int x;
const char *name[] =
{
"No hinting",
"Automatic hinting",
"Bytecode hinting"
"No hinting",
"Automatic hinting",
"Bytecode hinting"
};
for (x = 0; x <= EVAS_FONT_HINTING_BYTECODE; x++)
{
oi = e_configure_option_info_new(co, _(name[x]), (intptr_t*)(long)x);
oi->current = (*(int*)co->valptr == 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;
@ -810,9 +817,9 @@ _e_configure_desklock_login_box_zone_info_cb(E_Configure_Option *co)
Eina_List *ml;
const char *name[] =
{
"Show on all screens",
"Show on screen of pointer",
"Show on screen %d"
"Show on all screens",
"Show on screen of pointer",
"Show on screen %d"
};
EINA_LIST_FOREACH(e_manager_list(), ml, m)
@ -829,13 +836,13 @@ _e_configure_desklock_login_box_zone_info_cb(E_Configure_Option *co)
char buf[128];
if (x < 0)
oi = e_configure_option_info_new(co, _(name[x + 2]), (intptr_t*)(long)x);
oi = e_configure_option_info_new(co, _(name[x + 2]), (intptr_t *)(long)x);
else
{
snprintf(buf, sizeof(buf), _(name[2]), x);
oi = e_configure_option_info_new(co, buf, (intptr_t*)(long)x);
oi = e_configure_option_info_new(co, buf, (intptr_t *)(long)x);
}
oi->current = (*(int*)co->valptr == x);
oi->current = (*(int *)co->valptr == x);
ret = eina_list_append(ret, oi);
}
return ret;
@ -849,15 +856,15 @@ _e_configure_clientlist_group_by_info_cb(E_Configure_Option *co)
int x;
const char *name[] =
{
"No grouping",
"Virtual desktop",
"Window class"
"No grouping",
"Virtual desktop",
"Window class"
};
for (x = 0; x <= E_CLIENTLIST_GROUP_CLASS; x++)
{
oi = e_configure_option_info_new(co, _(name[x]), (intptr_t*)(long)x);
oi->current = (*(int*)co->valptr == 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;
@ -871,15 +878,15 @@ _e_configure_clientlist_separate_with_info_cb(E_Configure_Option *co)
int x;
const char *name[] =
{
"No separation",
"Separator bars",
"Separate menus"
"No separation",
"Separator bars",
"Separate menus"
};
for (x = 0; x <= E_CLIENTLIST_GROUP_SEP_MENU; x++)
{
oi = e_configure_option_info_new(co, _(name[x]), (intptr_t*)(long)x);
oi->current = (*(int*)co->valptr == 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;
@ -893,16 +900,16 @@ _e_configure_clientlist_sort_by_info_cb(E_Configure_Option *co)
int x;
const char *name[] =
{
"No sorting",
"Alphabetical order",
"Window stacking layer",
"Recently used windows first"
"No sorting",
"Alphabetical order",
"Window stacking layer",
"Recently used windows first"
};
for (x = 0; x <= E_CLIENTLIST_SORT_MOST_RECENT; x++)
{
oi = e_configure_option_info_new(co, _(name[x]), (intptr_t*)(long)x);
oi->current = (*(int*)co->valptr == 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;
@ -916,15 +923,15 @@ _e_configure_clientlist_separate_iconified_apps_info_cb(E_Configure_Option *co)
int x;
const char *name[] =
{
"Group by owner virtual desktop",
"Group by current virtual desktop",
"Separate group"
"Group by owner virtual desktop",
"Group by current virtual desktop",
"Separate group"
};
for (x = 0; x <= E_CLIENTLIST_GROUPICONS_SEP; x++)
{
oi = e_configure_option_info_new(co, _(name[x]), (intptr_t*)(long)x);
oi->current = (*(int*)co->valptr == 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;
@ -938,15 +945,15 @@ _e_configure_desk_flip_animate_mode_info_cb(E_Configure_Option *co)
int x;
const char *name[] =
{
"No animation",
"Pane",
"Zoom"
"No animation",
"Pane",
"Zoom"
};
for (x = 0; x <= E_DESKFLIP_ANIMATION_MODE_ZOOM; x++)
{
oi = e_configure_option_info_new(co, _(name[x]), (intptr_t*)(long)x);
oi->current = (*(int*)co->valptr == 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;
@ -960,15 +967,15 @@ _e_configure_screen_limits_info_cb(E_Configure_Option *co)
int x;
const char *name[] =
{
"Allow windows partly out of the screen limits",
"Allow windows completely out of the screen limits",
"Keep windows completely within the screen limits"
"Allow windows partly out of the screen limits",
"Allow windows completely out of the screen limits",
"Keep windows completely within the screen limits"
};
for (x = 0; x <= E_SCREEN_LIMITS_WITHIN; x++)
{
oi = e_configure_option_info_new(co, _(name[x]), (intptr_t*)(long)x);
oi->current = (*(int*)co->valptr == 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;
@ -998,8 +1005,8 @@ _e_configure_icon_theme_info_cb(E_Configure_Option *co)
l = eina_list_sort(l, 0, _e_configure_icon_theme_info_sort_cb);
EINA_LIST_FREE(l, theme)
{
if (!theme->directories) continue; //invalid
if (!e_util_strcasecmp(theme->name.internal, "hicolor")) continue; //default
if (!theme->directories) continue; //invalid
if (!e_util_strcasecmp(theme->name.internal, "hicolor")) continue; //default
oi = e_configure_option_info_new(co, theme->name.name, eina_stringshare_add(theme->name.internal));
oi->current = !e_util_strcmp(e_config->icon_theme, theme->name.internal);
oi->thumb_file = eina_stringshare_add(theme->example_icon);
@ -1028,7 +1035,7 @@ _e_configure_netwm_theme_info_cb(E_Configure_Option *co)
if ((!gtk2) && (!gtk3)) continue;
name = ecore_file_file_get(dir);
snprintf(buf, sizeof(buf), "%s (%s)%s%s%s", name, gtk2 ? "gtk2" : "gtk3",
(gtk2 && gtk3) ? " (" : "", (gtk2 && gtk3) ? "gtk3" : "", (gtk2 && gtk3) ? ")" : "");
(gtk2 && gtk3) ? " (" : "", (gtk2 && gtk3) ? "gtk3" : "", (gtk2 && gtk3) ? ")" : "");
oi = e_configure_option_info_new(co, buf, eina_stringshare_add(name));
oi->current = (e_config->xsettings.net_theme_name == oi->value);
ret = eina_list_append(ret, oi);
@ -1048,7 +1055,7 @@ _e_configure_transition_info_cb(E_Configure_Option *co)
file = e_theme_edje_file_get("base/theme/widgets", "e/transpreview/0");
key = "e/transitions/%s";
cur = *(Eina_Stringshare**)co->valptr;
cur = *(Eina_Stringshare **)co->valptr;
oi = e_configure_option_info_new(co, _("None"), NULL);
oi->thumb_file = eina_stringshare_ref(file);
@ -1121,7 +1128,7 @@ _e_configure_init_default_theme_info_cb(E_Configure_Option *co)
oi->thumb_file = eina_stringshare_ref(file);
oi->thumb_key = eina_stringshare_ref(key);
ret = eina_list_append(ret, oi);
oi->current = (oi->name == *(Eina_Stringshare**)co->valptr);
oi->current = (oi->name == *(Eina_Stringshare **)co->valptr);
}
if (ret && sthemes)
ret = eina_list_append(ret, e_configure_option_info_new(co, NULL, NULL));
@ -1134,7 +1141,7 @@ _e_configure_init_default_theme_info_cb(E_Configure_Option *co)
ret = eina_list_append(ret, oi);
oi->thumb_file = eina_stringshare_ref(file);
oi->thumb_key = eina_stringshare_ref(key);
oi->current = (oi->name == *(Eina_Stringshare**)co->valptr);
oi->current = (oi->name == *(Eina_Stringshare **)co->valptr);
}
eina_stringshare_del(key);
return ret;
@ -1152,7 +1159,7 @@ _e_configure_background_info_cb(E_Configure_Option *co)
Eina_Stringshare *key;
key = eina_stringshare_add("e/desktop/background");
cur = *(Eina_Stringshare**)co->valptr;
cur = *(Eina_Stringshare **)co->valptr;
if (!cur)
{
E_Config_Theme *ct;
@ -1171,7 +1178,6 @@ _e_configure_background_info_cb(E_Configure_Option *co)
oi->thumb_key = eina_stringshare_ref(key);
ret = eina_list_append(ret, oi);
oi->current = ((file == cur) || (!e_util_strcmp(f, cur)));
}
EINA_LIST_FOREACH(sthemes, l, file)
{
@ -1426,16 +1432,16 @@ e_configure_option_init(void)
tags_tag_alias_hash = eina_hash_stringshared_new((Eina_Free_Cb)_e_configure_option_tag_alias_list_free);
tags_alias_hash = eina_hash_string_superfast_new(NULL);
tags_alias_name_hash = eina_hash_string_superfast_new(NULL);
#define OPT_ADD(TYPE, NAME, DESC, ...) \
co = e_configure_option_add(E_CONFIGURE_OPTION_TYPE_##TYPE, DESC, #NAME, EINA_FALSE, &e_config->NAME, NULL);\
e_configure_option_tags_set(co, (const char*[]){__VA_ARGS__, NULL}, 0)
#define OPT_ADD(TYPE, NAME, DESC, ...) \
co = e_configure_option_add(E_CONFIGURE_OPTION_TYPE_##TYPE, DESC, #NAME, EINA_FALSE, &e_config->NAME, NULL); \
e_configure_option_tags_set(co, (const char *[]){__VA_ARGS__, NULL}, 0)
#define OPT_HELP(STR) \
co->help = eina_stringshare_add(STR)
#define OPT_MINMAX_STEP_FMT(MIN, MAX, STEP, FMT) \
co->minmax[0] = (MIN), co->minmax[1] = (MAX), co->step = (STEP),\
co->info = eina_stringshare_add(_(FMT))
co->help = eina_stringshare_add(STR)
#define OPT_MINMAX_STEP_FMT(MIN, MAX, STEP, FMT) \
co->minmax[0] = (MIN), co->minmax[1] = (MAX), co->step = (STEP), \
co->info = eina_stringshare_add(_(FMT))
#define OPT_ICON(ICON) \
e_configure_option_data_set(co, "icon", eina_stringshare_add(ICON))
e_configure_option_data_set(co, "icon", eina_stringshare_add(ICON))
OPT_ADD(BOOL, show_splash, _("Show splash screen on startup"), _("splash"), _("startup"));
OPT_ADD(STR, init_default_theme, _("Startup splash theme"), _("splash"), _("startup"), _("theme"), _("animate"));
@ -1544,7 +1550,7 @@ e_configure_option_init(void)
OPT_ICON("preferences-plugin");
OPT_ADD(BOOL, no_module_delay, _("Disable module delay"), _("module"), _("delay"));
OPT_HELP(_("If enabled, this causes E to load all modules at once during startup "
"instead of loading them incrementally"));
"instead of loading them incrementally"));
/* FIXME */
OPT_ADD(CUSTOM, language, _("Language"), _("language"));
@ -1776,7 +1782,7 @@ e_configure_option_init(void)
/* seems to be disabled ?
OPT_ADD(STR, desklock_personal_passwd, _("Desklock custom password"), _("desklock")); //passwd
OPT_HELP(_("This option causes desklock to use a custom-provided password instead of the user's password"));
*/
*/
OPT_ADD(BOOL, desklock_auth_method, _("Use custom command for desklock"), _("desklock"), _("exec"));
OPT_HELP(_("This option allows an external application to manage desklock"));
OPT_ADD(STR, desklock_custom_desklock_cmd, _("Custom desklock command"), _("desklock"), _("exec"));
@ -1828,7 +1834,7 @@ e_configure_option_init(void)
OPT_ADD(BOOL, dpms_off_enable, _("dpms"));
OPT_ADD(DOUBLE_INT, dpms_off_timeout, _("dpms"), _("delay"));
OPT_MINMAX_STEP_FMT(30, 5400);
*/
*/
OPT_ADD(ENUM, clientlist_group_by, _("Window list menu grouping policy"), _("menu"), _("border")); //enum
co->info_cb = _e_configure_clientlist_group_by_info_cb;
OPT_ICON("preferences-winlist");
@ -1859,11 +1865,11 @@ e_configure_option_init(void)
OPT_ADD(BOOL, mouse_hand, _("Enable left-handed mouse"), _("mouse"));
co->funcs[0].none = co->funcs[1].none = _e_configure_pointer_changed;
/* FIXME: need to group these two
OPT_ADD(DOUBLE_INT, mouse_accel_numerator, _("mouse"), _("speed")); //slider
OPT_MINMAX_STEP_FMT(1, 10);
OPT_ADD(DOUBLE_INT, mouse_accel_denominator, _("mouse"), _("speed")); //also slider
OPT_MINMAX_STEP_FMT(1, 10);
*/
OPT_ADD(DOUBLE_INT, mouse_accel_numerator, _("mouse"), _("speed")); //slider
OPT_MINMAX_STEP_FMT(1, 10);
OPT_ADD(DOUBLE_INT, mouse_accel_denominator, _("mouse"), _("speed")); //also slider
OPT_MINMAX_STEP_FMT(1, 10);
*/
OPT_ADD(DOUBLE_INT, mouse_accel_threshold, _("Mouse acceleration threshold"), _("mouse"), _("speed"));
OPT_MINMAX_STEP_FMT(1, 10, 1, "%1.0f");
co->funcs[0].none = co->funcs[1].none = _e_configure_pointer_changed;
@ -1967,21 +1973,21 @@ e_configure_option_init(void)
co->funcs[0].none = _e_configure_dpms_changed;
/* FIXME
OPT_ADD(DOUBLE, powersave.none, _("powersave"));
OPT_MINMAX_STEP_FMT(0.01, 5400.00);
OPT_ADD(DOUBLE, powersave.low, _("powersave"));
OPT_MINMAX_STEP_FMT(0.01, 5400.00);
OPT_ADD(DOUBLE, powersave.medium, _("powersave"));
OPT_MINMAX_STEP_FMT(0.01, 5400.00);
OPT_ADD(DOUBLE, powersave.high, _("powersave"));
OPT_MINMAX_STEP_FMT(0.01, 5400.00);
OPT_ADD(DOUBLE, powersave.extreme, _("powersave"));
OPT_MINMAX_STEP_FMT(0.01, 5400.00);
OPT_ADD(DOUBLE_UINT, powersave.min, _("powersave"));
OPT_MINMAX_STEP_FMT(E_POWERSAVE_MODE_NONE, E_POWERSAVE_MODE_EXTREME);
OPT_ADD(DOUBLE_UINT, powersave.max, _("powersave"));
OPT_MINMAX_STEP_FMT(E_POWERSAVE_MODE_NONE, E_POWERSAVE_MODE_EXTREME);
*/
OPT_ADD(DOUBLE, powersave.none, _("powersave"));
OPT_MINMAX_STEP_FMT(0.01, 5400.00);
OPT_ADD(DOUBLE, powersave.low, _("powersave"));
OPT_MINMAX_STEP_FMT(0.01, 5400.00);
OPT_ADD(DOUBLE, powersave.medium, _("powersave"));
OPT_MINMAX_STEP_FMT(0.01, 5400.00);
OPT_ADD(DOUBLE, powersave.high, _("powersave"));
OPT_MINMAX_STEP_FMT(0.01, 5400.00);
OPT_ADD(DOUBLE, powersave.extreme, _("powersave"));
OPT_MINMAX_STEP_FMT(0.01, 5400.00);
OPT_ADD(DOUBLE_UINT, powersave.min, _("powersave"));
OPT_MINMAX_STEP_FMT(E_POWERSAVE_MODE_NONE, E_POWERSAVE_MODE_EXTREME);
OPT_ADD(DOUBLE_UINT, powersave.max, _("powersave"));
OPT_MINMAX_STEP_FMT(E_POWERSAVE_MODE_NONE, E_POWERSAVE_MODE_EXTREME);
*/
OPT_ADD(BOOL, deskenv.load_xrdb, _("Load ~/.xrdb on startup"), _("environment"));
OPT_ADD(BOOL, deskenv.load_xmodmap, _("Load ~/.Xmodmap"), _("environment"));
OPT_ADD(BOOL, deskenv.load_gnome, _("Run gnome-settings-daemon"), _("environment"));
@ -2011,7 +2017,6 @@ e_configure_option_init(void)
OPT_ADD(BOOL, exe_always_single_instance, _("Always launch applications as single-instance"), _("exec"));
//OPT_ADD(INT, use_desktop_window_profile,
e_user_dir_concat_static(buf, "themes");
theme_ls[0] = eio_file_ls(buf, _edj_filter_cb, _init_main_cb, _init_done_cb, _init_error_cb, NULL);
theme_mon[0] = eio_monitor_add(buf);
@ -2125,7 +2130,7 @@ e_configure_option_shutdown(void)
E_FREE_LIST(tags_list, eina_stringshare_del);
E_FREE_LIST(tags_alias_list, eina_stringshare_del);
while (opts_list)
_e_configure_option_free((E_Configure_Option*)opts_list);
_e_configure_option_free((E_Configure_Option *)opts_list);
E_FN_DEL(eina_hash_free, tags_hash);
E_FN_DEL(eina_hash_free, tags_tag_alias_hash);
E_FN_DEL(eina_hash_free, tags_name_hash);
@ -2168,7 +2173,7 @@ e_configure_option_add(E_Configure_Option_Type type, const char *desc, const cha
co->name = eina_stringshare_add(name);
co->desc = eina_stringshare_add(desc);
co->valptr = valptr;
co->data = (void*)data;
co->data = (void *)data;
co->private = !!private_scope;
_e_configure_option_event_changed(co);
return co;
@ -2190,7 +2195,6 @@ e_configure_option_tags_set(E_Configure_Option *co, const char **const tags, uns
{
for (x = 0; x < num_tags; x++)
_e_configure_option_tag_append(co, tags[x]);
}
else
{
@ -2207,7 +2211,7 @@ e_configure_option_info_new(E_Configure_Option *co, const char *name, const void
oi = E_NEW(E_Configure_Option_Info, 1);
oi->co = co;
oi->name = eina_stringshare_add(name);
oi->value = (void*)value;
oi->value = (void *)value;
return oi;
}
@ -2295,49 +2299,57 @@ e_configure_option_changed(E_Configure_Option *co)
{
case E_CONFIGURE_OPTION_TYPE_BOOL:
eina_value_get(&co->val, &u);
if (*(unsigned char*)co->valptr != u) break;
if (*(unsigned char *)co->valptr != u) break;
co->changed = EINA_FALSE;
break;
case E_CONFIGURE_OPTION_TYPE_DOUBLE_UCHAR:
eina_value_get(&co->val, &d);
l = lround(d);
u = MAX(0, l);
if (*(unsigned char*)co->valptr != u) break;
if (*(unsigned char *)co->valptr != u) break;
co->changed = EINA_FALSE;
break;
case E_CONFIGURE_OPTION_TYPE_DOUBLE_INT: //lround(double)
eina_value_get(&co->val, &d);
if (*(int*)co->valptr != lround(d)) break;
if (*(int *)co->valptr != lround(d)) break;
co->changed = EINA_FALSE;
break;
case E_CONFIGURE_OPTION_TYPE_INT:
case E_CONFIGURE_OPTION_TYPE_ENUM:
eina_value_get(&co->val, &i);
if (*(int*)co->valptr != i) break;
if (*(int *)co->valptr != i) break;
co->changed = EINA_FALSE;
break;
case E_CONFIGURE_OPTION_TYPE_DOUBLE_UINT: //lround(double)
eina_value_get(&co->val, &d);
l = lround(d);
ui = MAX(0, l);
if (*(unsigned int*)co->valptr != ui) break;
if (*(unsigned int *)co->valptr != ui) break;
co->changed = EINA_FALSE;
break;
case E_CONFIGURE_OPTION_TYPE_UINT:
eina_value_get(&co->val, &ui);
if (*(unsigned int*)co->valptr != ui) break;
if (*(unsigned int *)co->valptr != ui) break;
co->changed = EINA_FALSE;
break;
case E_CONFIGURE_OPTION_TYPE_DOUBLE:
eina_value_get(&co->val, &d);
if (fabs(*(double*)co->valptr - d) > DBL_EPSILON) break;
if (fabs(*(double *)co->valptr - d) > DBL_EPSILON) break;
co->changed = EINA_FALSE;
break;
case E_CONFIGURE_OPTION_TYPE_STR:
eina_value_get(&co->val, &s);
if (*(Eina_Stringshare**)co->valptr != s) break;
if (*(Eina_Stringshare **)co->valptr != s) break;
co->changed = EINA_FALSE;
break;
case E_CONFIGURE_OPTION_TYPE_CUSTOM:
break;
}
@ -2416,7 +2428,7 @@ e_configure_option_apply_all(void)
EINA_LIST_FREE(funcs, none)
none();
EINA_LIST_FREE(acts, act)
act->func.go((E_Object*)e_util_container_current_get(), NULL);
act->func.go((E_Object *)e_util_container_current_get(), NULL);
e_config_save_queue();
if (e_restart) e_sys_action_do(E_SYS_RESTART, NULL);
}
@ -2437,6 +2449,7 @@ e_configure_option_value_get(E_Configure_Option *co)
case E_CONFIGURE_OPTION_TYPE_BOOL:
eina_value_get(&co->val, &u);
return &u;
case E_CONFIGURE_OPTION_TYPE_DOUBLE_UCHAR:
case E_CONFIGURE_OPTION_TYPE_DOUBLE_INT: //lround(double)
case E_CONFIGURE_OPTION_TYPE_DOUBLE_UINT: //lround(double)
@ -2444,15 +2457,19 @@ e_configure_option_value_get(E_Configure_Option *co)
case E_CONFIGURE_OPTION_TYPE_DOUBLE:
eina_value_get(&co->val, &d);
return &d;
case E_CONFIGURE_OPTION_TYPE_INT:
eina_value_get(&co->val, &l);
return &l;
case E_CONFIGURE_OPTION_TYPE_UINT:
eina_value_get(&co->val, &i);
return &i;
case E_CONFIGURE_OPTION_TYPE_STR:
eina_value_get(&co->val, &s);
return &s;
case E_CONFIGURE_OPTION_TYPE_CUSTOM:
break;
}
@ -2573,7 +2590,7 @@ e_configure_option_tag_alias_add(const char *tag, const char *alias)
t = eina_hash_find(tags_name_hash, tag);
if (!t) return;
o = eina_hash_set(tags_alias_hash, alias, t);
if (o) return; //alias already in list
if (o) return; //alias already in list
o = eina_stringshare_add(alias);
tags_alias_list = eina_list_append(tags_alias_list, o);
l = eina_hash_find(tags_tag_alias_hash, t);
@ -2590,7 +2607,7 @@ e_configure_option_tag_alias_del(const char *tag, const char *alias)
EINA_SAFETY_ON_NULL_RETURN(alias);
t = eina_hash_set(tags_alias_hash, alias, NULL);
if (!t) return; //alias doesn't exist
if (!t) return; //alias doesn't exist
a = eina_hash_find(tags_alias_name_hash, alias);
tags_alias_list = eina_list_remove(tags_alias_list, a);
l = eina_hash_find(tags_tag_alias_hash, t);
@ -2780,3 +2797,4 @@ e_configure_option_ctx_free(E_Configure_Option_Ctx *ctx)
eina_list_free(ctx->match_tags);
free(ctx);
}

View File

@ -362,7 +362,7 @@ e_container_zone_id_get(E_Container *con, int id)
EAPI E_Desk *
e_container_desk_window_profile_get(E_Container *con,
const char *profile)
const char *profile)
{
Eina_List *l = NULL;
E_Zone *zone = NULL;
@ -767,7 +767,7 @@ e_container_border_stack_above(E_Border *bd, E_Border *above)
/* Add to new layer */
bd->layer = above->layer;
pos = _e_container_layer_map(bd->layer);
ecore_x_window_configure(bd->win,
ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,

View File

@ -4,11 +4,11 @@
struct _E_DBusMenu_Ctx
{
EDBus_Proxy *proxy;
E_DBusMenu_Item *root_menu;
void *data;
EDBus_Proxy *proxy;
E_DBusMenu_Item *root_menu;
void *data;
E_DBusMenu_Pop_Request_Cb pop_request_cb;
E_DBusMenu_Update_Cb update_cb;
E_DBusMenu_Update_Cb update_cb;
};
static const char *Menu_Item_Type_Names[] =
@ -40,7 +40,7 @@ id_find(const char *text, const char *array_of_names[], unsigned max)
if (strcmp(text, array_of_names[i]))
continue;
return i;
}
}
return 0;
}
@ -63,7 +63,7 @@ dbus_menu_prop_dict_cb(void *data, const void *key, EDBus_Message_Iter *var)
continue;
}
if (label[i+1] == '_')
if (label[i + 1] == '_')
{
eina_strbuf_append_char(label_buf, label[i]);
i++;
@ -186,7 +186,7 @@ dbus_menu_free(E_DBusMenu_Item *m)
if (m->icon_name)
eina_stringshare_del(m->icon_name);
if (m->label)
eina_stringshare_del(m->label);
eina_stringshare_del(m->label);
EINA_INLIST_FOREACH_SAFE(m->sub_items, inlist, child)
dbus_menu_free(child);
if (m->parent)
@ -426,3 +426,4 @@ e_dbusmenu_update_cb_set(E_DBusMenu_Ctx *ctx, E_DBusMenu_Update_Cb cb)
{
ctx->update_cb = cb;
}

View File

@ -107,7 +107,7 @@ e_desk_new(E_Zone *zone, int x, int y)
if (!ok)
{
desk->window_profile = eina_stringshare_add
(e_config->desktop_default_window_profile);
(e_config->desktop_default_window_profile);
}
#endif
return desk;
@ -374,8 +374,8 @@ e_desk_deskshow(E_Zone *zone)
{
if (bd->deskshow)
{
bd->deskshow = 0;
e_border_uniconify(bd);
bd->deskshow = 0;
e_border_uniconify(bd);
}
}
else
@ -453,7 +453,7 @@ e_desk_current_get(E_Zone *zone)
{
E_OBJECT_CHECK_RETURN(zone, NULL);
E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, NULL);
return e_desk_at_xy_get(zone, zone->desk_x_current, zone->desk_y_current);
}
@ -550,7 +550,7 @@ e_desk_prev(E_Zone *zone)
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
EAPI void
e_desk_window_profile_set(E_Desk *desk,
e_desk_window_profile_set(E_Desk *desk,
const char *profile)
{
E_Event_Desk_Window_Profile_Change *ev;
@ -568,10 +568,10 @@ e_desk_window_profile_set(E_Desk *desk,
}
EAPI void
e_desk_window_profile_add(int container,
int zone,
int desk_x,
int desk_y,
e_desk_window_profile_add(int container,
int zone,
int desk_x,
int desk_y,
const char *profile)
{
E_Config_Desktop_Window_Profile *cfprof;
@ -666,6 +666,7 @@ e_desk_window_profile_update(void)
}
}
}
#endif
static void
@ -727,6 +728,7 @@ _e_desk_event_desk_name_change_free(void *data __UNUSED__, void *event)
e_object_unref(E_OBJECT(ev->desk));
free(ev);
}
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
static void
_e_desk_event_desk_window_profile_change_free(void *data __UNUSED__, void *event)
@ -736,6 +738,7 @@ _e_desk_event_desk_window_profile_change_free(void *data __UNUSED__, void *event
e_object_unref(E_OBJECT(ev->desk));
E_FREE(ev);
}
#endif
static void
_e_desk_show_begin(E_Desk *desk, int mode, int dx, int dy)
@ -1076,4 +1079,5 @@ _e_desk_window_profile_change_protocol_set(void)
(man->root, e_config->use_desktop_window_profile);
}
}
#endif

View File

@ -58,3 +58,4 @@ e_deskenv_xmodmap_run(void)
snprintf(buf2, sizeof(buf2), "xmodmap %s", buf);
ecore_exe_run(buf2, NULL);
}

View File

@ -17,7 +17,7 @@ typedef struct _E_Desklock_Popup_Data E_Desklock_Popup_Data;
typedef struct _E_Desklock_Auth E_Desklock_Auth;
#endif
typedef struct _E_Desklock_Run E_Desklock_Run;
typedef struct _E_Desklock_Run E_Desklock_Run;
struct _E_Desklock_Popup_Data
{
@ -28,20 +28,20 @@ struct _E_Desklock_Popup_Data
struct _E_Desklock_Data
{
Eina_List *elock_wnd_list;
Ecore_X_Window elock_wnd;
Eina_List *handlers;
Eina_List *elock_wnd_list;
Ecore_X_Window elock_wnd;
Eina_List *handlers;
Ecore_Event_Handler *move_handler;
Ecore_X_Window elock_grab_break_wnd;
char passwd[PASSWD_LEN];
int state;
Eina_Bool selected : 1;
Ecore_X_Window elock_grab_break_wnd;
char passwd[PASSWD_LEN];
int state;
Eina_Bool selected : 1;
};
struct _E_Desklock_Run
{
E_Order *desk_run;
int position;
int position;
};
#ifdef HAVE_PAM
@ -133,7 +133,7 @@ e_desklock_init(void)
E_EVENT_DESKLOCK = ecore_event_type_new();
_e_desklock_run_handler = ecore_event_handler_add(E_EVENT_DESKLOCK,
_e_desklock_cb_run, NULL);
_e_desklock_cb_run, NULL);
return 1;
}
@ -202,7 +202,7 @@ e_desklock_show_autolocked(void)
{
if ((e_config->screen_actions_fullscreen_windows_ignore) ||
((!e_config->screen_actions_fullscreen_windows_ignore) && (!e_util_fullscreen_any())))
return 0;
return 0;
if (_e_desklock_autolock_time < 1.0)
_e_desklock_autolock_time = ecore_loop_time_get();
return e_desklock_show(EINA_FALSE);
@ -657,7 +657,7 @@ _e_desklock_cb_zone_del(void *data __UNUSED__,
if (!edd) return ECORE_CALLBACK_PASS_ON;
if ((eina_list_count(e_container_current_get(e_manager_current_get())->zones) == 1) && (e_config->desklock_login_box_zone == -2))
edd->move_handler = ecore_event_handler_del(edd->move_handler);
l = _e_desklock_popup_find(ev->zone);
if (l)
{
@ -801,8 +801,9 @@ _e_desklock_passwd_update(void)
*pp = 0;
EINA_LIST_FOREACH(edd->elock_wnd_list, l, edp)
if (edp->login_box) edje_object_part_text_set(edp->login_box, "e.text.password",
passwd_hidden);
if (edp->login_box)
edje_object_part_text_set(edp->login_box, "e.text.password",
passwd_hidden);
}
static void
@ -885,7 +886,7 @@ _e_desklock_check_auth(void)
if (e_config->desklock_auth_method == 0)
{
int ret;
ret = _desklock_auth(edd->passwd);
// passwd off in child proc now - null out from parent
memset(edd->passwd, 0, sizeof(char) * PASSWD_LEN);
@ -894,20 +895,20 @@ _e_desklock_check_auth(void)
else if (e_config->desklock_auth_method == 1)
{
#endif
if ((e_config->desklock_personal_passwd) &&
(!strcmp(!edd->passwd ? "" : edd->passwd,
!e_config->desklock_personal_passwd ? "" :
e_config->desklock_personal_passwd)))
{
/* password ok */
/* security - null out passwd string once we are done with it */
memset(edd->passwd, 0, sizeof(char) * PASSWD_LEN);
e_desklock_hide();
return 1;
}
#ifdef HAVE_PAM
if ((e_config->desklock_personal_passwd) &&
(!strcmp(!edd->passwd ? "" : edd->passwd,
!e_config->desklock_personal_passwd ? "" :
e_config->desklock_personal_passwd)))
{
/* password ok */
/* security - null out passwd string once we are done with it */
memset(edd->passwd, 0, sizeof(char) * PASSWD_LEN);
e_desklock_hide();
return 1;
}
#ifdef HAVE_PAM
}
#endif
/* password is definitely wrong */
_e_desklock_state_set(E_DESKLOCK_STATE_INVALID);
@ -1356,7 +1357,7 @@ _e_desklock_job(void *data __UNUSED__)
E_Desklock_Run *task;
job = NULL;
if (!tasks) return ;
if (!tasks) return;
task = eina_list_data_get(tasks);
if (!_e_desklock_run(task))

View File

@ -349,7 +349,7 @@ e_drop_xds_update(Eina_Bool enable, const char *value)
size_t len;
enable = !!enable;
xwin = ecore_x_selection_owner_get(ECORE_X_ATOM_SELECTION_XDND);
if (enable)
{
@ -364,7 +364,7 @@ e_drop_xds_update(Eina_Bool enable, const char *value)
snprintf(buf, sizeof(buf), "file://%s/", value);
strncat(buf, file, size);
free(file);
ecore_x_window_prop_property_set(xwin, _xds_atom, _text_atom, 8, (void*)buf, size + len + 8);
ecore_x_window_prop_property_set(xwin, _xds_atom, _text_atom, 8, (void *)buf, size + len + 8);
}
else
ecore_x_window_prop_property_del(xwin, _xds_atom);
@ -621,9 +621,10 @@ _e_drag_coords_update(const E_Drop_Handler *h, int *dx, int *dy)
{
switch (h->obj->type)
{
E_Gadcon *gc;
E_Gadcon *gc;
case E_GADCON_TYPE:
gc = (E_Gadcon*)h->obj;
gc = (E_Gadcon *)h->obj;
e_gadcon_canvas_zone_geometry_get(gc, &px, &py, NULL, NULL);
if (!gc->toolbar) break;
px += gc->toolbar->fwin->x;
@ -1374,7 +1375,7 @@ _e_dnd_cb_event_dnd_finished(void *data __UNUSED__, int type __UNUSED__, void *e
ev = event;
if (!ev->completed) return ECORE_CALLBACK_PASS_ON;
*/
*/
if (_drag_current)
{
E_Drag *tmp;

View File

@ -14,7 +14,6 @@ static unsigned int _e_dpms_timeout_suspend = 0;
static unsigned int _e_dpms_timeout_off = 0;
static int _e_dpms_enabled = EINA_FALSE;
EAPI void
e_dpms_update(void)
{
@ -63,12 +62,12 @@ e_dpms_force_update(void)
unsigned int standby = 0, suspend = 0, off = 0;
int enabled;
enabled = ((e_config->screensaver_enable) &&
enabled = ((e_config->screensaver_enable) &&
(!e_config->mode.presentation) &&
(!e_util_fullscreen_current_any()));
ecore_x_dpms_enabled_set(enabled);
if (!enabled) return;
if (e_config->screensaver_enable)
{
off = suspend = standby = e_screensaver_timeout_get(EINA_FALSE);
@ -112,28 +111,28 @@ EINTERN int
e_dpms_init(void)
{
_e_dpms_handler_config_mode = ecore_event_handler_add
(E_EVENT_CONFIG_MODE_CHANGED, _e_dpms_handler_config_mode_cb, NULL);
(E_EVENT_CONFIG_MODE_CHANGED, _e_dpms_handler_config_mode_cb, NULL);
_e_dpms_handler_border_fullscreen = ecore_event_handler_add
(E_EVENT_BORDER_FULLSCREEN, _e_dpms_handler_border_fullscreen_check_cb, NULL);
(E_EVENT_BORDER_FULLSCREEN, _e_dpms_handler_border_fullscreen_check_cb, NULL);
_e_dpms_handler_border_unfullscreen = ecore_event_handler_add
(E_EVENT_BORDER_UNFULLSCREEN, _e_dpms_handler_border_fullscreen_check_cb, NULL);
(E_EVENT_BORDER_UNFULLSCREEN, _e_dpms_handler_border_fullscreen_check_cb, NULL);
_e_dpms_handler_border_remove = ecore_event_handler_add
(E_EVENT_BORDER_REMOVE, _e_dpms_handler_border_fullscreen_check_cb, NULL);
(E_EVENT_BORDER_REMOVE, _e_dpms_handler_border_fullscreen_check_cb, NULL);
_e_dpms_handler_border_iconify = ecore_event_handler_add
(E_EVENT_BORDER_ICONIFY, _e_dpms_handler_border_fullscreen_check_cb, NULL);
(E_EVENT_BORDER_ICONIFY, _e_dpms_handler_border_fullscreen_check_cb, NULL);
_e_dpms_handler_border_uniconify = ecore_event_handler_add
(E_EVENT_BORDER_UNICONIFY, _e_dpms_handler_border_fullscreen_check_cb, NULL);
(E_EVENT_BORDER_UNICONIFY, _e_dpms_handler_border_fullscreen_check_cb, NULL);
_e_dpms_handler_border_desk_set = ecore_event_handler_add
(E_EVENT_BORDER_DESK_SET, _e_dpms_handler_border_desk_set_cb, NULL);
(E_EVENT_BORDER_DESK_SET, _e_dpms_handler_border_desk_set_cb, NULL);
_e_dpms_handler_desk_show = ecore_event_handler_add
(E_EVENT_DESK_SHOW, _e_dpms_handler_desk_show_cb, NULL);
(E_EVENT_DESK_SHOW, _e_dpms_handler_desk_show_cb, NULL);
_e_dpms_enabled = ecore_x_dpms_enabled_get();
ecore_x_dpms_timeouts_get
@ -197,3 +196,4 @@ e_dpms_shutdown(void)
return 1;
}

View File

@ -6,50 +6,49 @@ typedef struct _E_Entry_Smart_Data E_Entry_Smart_Data;
struct _E_Entry_Smart_Data
{
Evas_Object *entry_object;
Evas_Object *scroll_object;
E_Menu *popup;
Evas_Object *entry_object;
Evas_Object *scroll_object;
E_Menu *popup;
Ecore_Event_Handler *selection_handler;
int min_width;
int height;
Evas_Coord theme_width;
Evas_Coord theme_height;
int preedit_start_pos;
int preedit_end_pos;
int changing;
Eina_Bool enabled : 1;
Eina_Bool noedit : 1;
Eina_Bool focused : 1;
Eina_Bool password_mode : 1;
int min_width;
int height;
Evas_Coord theme_width;
Evas_Coord theme_height;
int preedit_start_pos;
int preedit_end_pos;
int changing;
Eina_Bool enabled : 1;
Eina_Bool noedit : 1;
Eina_Bool focused : 1;
Eina_Bool password_mode : 1;
};
/* local subsystem functions */
static Eina_Bool _e_entry_x_selection_notify_handler(void *data, int type, void *event);
static void _e_entry_x_selection_update(Evas_Object *entry);
static void _e_entry_x_selection_update(Evas_Object *entry);
static void _e_entry_smart_add(Evas_Object *object);
static void _e_entry_smart_del(Evas_Object *object);
static void _e_entry_smart_move(Evas_Object *object, Evas_Coord x, Evas_Coord y);
static void _e_entry_smart_resize(Evas_Object *object, Evas_Coord w, Evas_Coord h);
static void _e_entry_smart_show(Evas_Object *object);
static void _e_entry_smart_hide(Evas_Object *object);
static void _e_entry_color_set(Evas_Object *object, int r, int g, int b, int a);
static void _e_entry_clip_set(Evas_Object *object, Evas_Object *clip);
static void _e_entry_clip_unset(Evas_Object *object);
static void _e_entry_cb_menu_post(void *data, E_Menu *m);
static void _e_entry_cb_cut(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_entry_cb_copy(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_entry_cb_paste(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_entry_cb_select_all(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_entry_cb_delete(void *data, E_Menu *m , E_Menu_Item *mi );
static void _e_entry_mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _e_entry_smart_add(Evas_Object *object);
static void _e_entry_smart_del(Evas_Object *object);
static void _e_entry_smart_move(Evas_Object *object, Evas_Coord x, Evas_Coord y);
static void _e_entry_smart_resize(Evas_Object *object, Evas_Coord w, Evas_Coord h);
static void _e_entry_smart_show(Evas_Object *object);
static void _e_entry_smart_hide(Evas_Object *object);
static void _e_entry_color_set(Evas_Object *object, int r, int g, int b, int a);
static void _e_entry_clip_set(Evas_Object *object, Evas_Object *clip);
static void _e_entry_clip_unset(Evas_Object *object);
static void _e_entry_cb_menu_post(void *data, E_Menu *m);
static void _e_entry_cb_cut(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_entry_cb_copy(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_entry_cb_paste(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_entry_cb_select_all(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_entry_cb_delete(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_entry_mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
/* local subsystem globals */
static Evas_Smart *_e_entry_smart = NULL;
static int _e_entry_smart_use = 0;
/* externally accessible functions */
/**
@ -67,26 +66,26 @@ e_entry_add(Evas *evas)
if (!_e_entry_smart)
{
static const Evas_Smart_Class sc =
{
"e_entry",
EVAS_SMART_CLASS_VERSION,
_e_entry_smart_add,
_e_entry_smart_del,
_e_entry_smart_move,
_e_entry_smart_resize,
_e_entry_smart_show,
_e_entry_smart_hide,
_e_entry_color_set,
_e_entry_clip_set,
_e_entry_clip_unset,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
};
{
"e_entry",
EVAS_SMART_CLASS_VERSION,
_e_entry_smart_add,
_e_entry_smart_del,
_e_entry_smart_move,
_e_entry_smart_resize,
_e_entry_smart_show,
_e_entry_smart_hide,
_e_entry_color_set,
_e_entry_clip_set,
_e_entry_clip_unset,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
};
_e_entry_smart = evas_smart_class_new(&sc);
_e_entry_smart_use = 0;
}
@ -113,8 +112,8 @@ e_entry_text_set(Evas_Object *entry, const char *_text)
return;
text = evas_textblock_text_utf8_to_markup(
edje_object_part_object_get(sd->entry_object, ENTRY_PART_NAME),
_text);
edje_object_part_object_get(sd->entry_object, ENTRY_PART_NAME),
_text);
otext = edje_object_part_text_get(sd->entry_object, ENTRY_PART_NAME);
if ((text) && (otext) && (!strcmp(text, otext)))
{
@ -151,8 +150,8 @@ e_entry_text_get(Evas_Object *entry)
E_FREE(text);
}
text = evas_textblock_text_markup_to_utf8(
edje_object_part_object_get(sd->entry_object, ENTRY_PART_NAME),
edje_object_part_text_get(sd->entry_object, ENTRY_PART_NAME));
edje_object_part_object_get(sd->entry_object, ENTRY_PART_NAME),
edje_object_part_text_get(sd->entry_object, ENTRY_PART_NAME));
return text;
}
@ -202,16 +201,16 @@ e_entry_password_set(Evas_Object *entry, int password_mode)
if ((!entry) || (!(sd = evas_object_smart_data_get(entry))))
return;
if (sd->password_mode == password_mode)
return;
return;
text = eina_stringshare_add(
edje_object_part_text_get(sd->entry_object, ENTRY_PART_NAME));
edje_object_part_text_get(sd->entry_object, ENTRY_PART_NAME));
sd->password_mode = !!password_mode;
if (!sd->password_mode)
e_theme_edje_object_set(sd->entry_object, "base/theme/widgets", "e/widgets/entry/text");
e_theme_edje_object_set(sd->entry_object, "base/theme/widgets", "e/widgets/entry/text");
else
e_theme_edje_object_set(sd->entry_object, "base/theme/widgets", "e/widgets/entry/password");
e_theme_edje_object_set(sd->entry_object, "base/theme/widgets", "e/widgets/entry/password");
/* Set the text back. */
if (text)
@ -273,7 +272,7 @@ e_entry_focus(Evas_Object *entry)
edje_object_part_text_cursor_end_set(sd->entry_object, ENTRY_PART_NAME, EDJE_CURSOR_MAIN);
if ((sd->enabled) && (!sd->noedit))
edje_object_signal_emit(sd->entry_object, "e,action,show,cursor", "e");
edje_object_signal_emit(sd->entry_object, "e,action,show,cursor", "e");
sd->focused = EINA_TRUE;
}
@ -318,10 +317,10 @@ e_entry_enable(Evas_Object *entry)
return;
edje_object_signal_emit(e_scrollframe_edje_object_get(sd->scroll_object),
"e,state,enabled", "e");
"e,state,enabled", "e");
edje_object_signal_emit(sd->entry_object, "e,state,enabled", "e");
if (sd->focused)
edje_object_signal_emit(sd->entry_object, "e,action,show,cursor", "e");
edje_object_signal_emit(sd->entry_object, "e,action,show,cursor", "e");
sd->enabled = EINA_TRUE;
}
@ -343,7 +342,7 @@ e_entry_disable(Evas_Object *entry)
return;
edje_object_signal_emit(e_scrollframe_edje_object_get(sd->scroll_object),
"e,state,disabled", "e");
"e,state,disabled", "e");
edje_object_signal_emit(sd->entry_object, "e,state,disabled", "e");
edje_object_signal_emit(sd->entry_object, "e,action,hide,cursor", "e");
sd->enabled = EINA_FALSE;
@ -367,7 +366,7 @@ e_entry_edit(Evas_Object *entry)
sd->noedit = EINA_FALSE;
edje_object_signal_emit(e_scrollframe_edje_object_get(sd->scroll_object),
"e,state,edit", "e");
"e,state,edit", "e");
edje_object_signal_emit(sd->entry_object, "e,state,edit", "e");
if (sd->focused)
{
@ -395,7 +394,7 @@ e_entry_noedit(Evas_Object *entry)
sd->noedit = EINA_TRUE;
edje_object_signal_emit(e_scrollframe_edje_object_get(sd->scroll_object),
"e,state,noedit", "e");
"e,state,noedit", "e");
edje_object_signal_emit(sd->entry_object, "e,state,noedit", "e");
edje_object_signal_emit(sd->entry_object, "e,action,hide,cursor", "e");
}
@ -408,7 +407,7 @@ e_entry_nomenu(Evas_Object *entry)
{
if (evas_object_smart_smart_get(entry) != _e_entry_smart) SMARTERRNR();
evas_object_event_callback_del_full(entry, EVAS_CALLBACK_MOUSE_DOWN,
_e_entry_mouse_down_cb, entry);
_e_entry_mouse_down_cb, entry);
}
/* Private functions */
@ -432,7 +431,6 @@ _e_entry_is_empty(const Evas_Object *entry_edje)
evas_textblock_cursor_free(cur);
return !ret;
}
/* Called when the entry object is pressed by the mouse */
@ -480,10 +478,10 @@ _e_entry_mouse_down_cb(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *o
e_menu_item_label_set(mi, _("Delete"));
e_util_menu_item_theme_icon_set(mi, "edit-delete");
e_menu_item_callback_set(mi, _e_entry_cb_delete, sd);
mi = e_menu_item_new(sd->popup);
e_menu_item_separator_set(mi, 1);
if (!s_passwd)
{
mi = e_menu_item_new(sd->popup);
@ -543,20 +541,20 @@ _e_entry_x_selection_notify_handler(void *data, int type __UNUSED__, void *event
ev = event;
if (((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
(ev->selection == ECORE_X_SELECTION_PRIMARY)) &&
(strcmp(ev->target, ECORE_X_SELECTION_TARGET_UTF8_STRING) == 0))
(ev->selection == ECORE_X_SELECTION_PRIMARY)) &&
(strcmp(ev->target, ECORE_X_SELECTION_TARGET_UTF8_STRING) == 0))
{
Ecore_X_Selection_Data_Text *text_data;
text_data = ev->data;
if ((text_data->data.content == ECORE_X_SELECTION_CONTENT_TEXT) &&
(text_data->text))
(text_data->text))
{
char *txt = evas_textblock_text_utf8_to_markup(NULL, text_data->text);
if (txt)
{
edje_object_part_text_user_insert(sd->entry_object,
ENTRY_PART_NAME, txt);
ENTRY_PART_NAME, txt);
free(txt);
}
}
@ -591,7 +589,7 @@ _e_entry_x_selection_update(Evas_Object *entry)
xwin = win->evas_win;
if (sd->password_mode)
return;
return;
text = edje_object_part_text_selection_get(sd->entry_object, ENTRY_PART_NAME);
if (text)
@ -600,14 +598,14 @@ _e_entry_x_selection_update(Evas_Object *entry)
static void
_entry_paste_request_signal_cb(void *data,
Evas_Object *obj EINA_UNUSED,
const char *emission,
const char *source EINA_UNUSED)
Evas_Object *obj EINA_UNUSED,
const char *emission,
const char *source EINA_UNUSED)
{
Ecore_X_Window xwin;
E_Win *win;
E_Container *con;
if (!(win = e_win_evas_object_win_get(data)))
{
xwin = e_grabinput_key_win_get();
@ -624,38 +622,38 @@ _entry_paste_request_signal_cb(void *data,
if (emission[sizeof("ntry,paste,request,")] == '1')
{
ecore_x_selection_primary_request(xwin,
ECORE_X_SELECTION_TARGET_UTF8_STRING);
ECORE_X_SELECTION_TARGET_UTF8_STRING);
}
else
{
ecore_x_selection_clipboard_request(xwin,
ECORE_X_SELECTION_TARGET_UTF8_STRING);
ECORE_X_SELECTION_TARGET_UTF8_STRING);
}
}
static void
_entry_selection_changed_signal_cb(void *data,
Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED,
const char *source EINA_UNUSED)
Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED,
const char *source EINA_UNUSED)
{
_e_entry_x_selection_update(data);
}
static void
_entry_selection_all_signal_cb(void *data,
Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED,
const char *source EINA_UNUSED)
Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED,
const char *source EINA_UNUSED)
{
e_entry_select_all(data);
}
static void
_entry_copy_notify_signal_cb(void *data,
Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED,
const char *source EINA_UNUSED)
Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED,
const char *source EINA_UNUSED)
{
E_Entry_Smart_Data *sd;
@ -667,9 +665,9 @@ _entry_copy_notify_signal_cb(void *data,
static void
_entry_cut_notify_signal_cb(void *data,
Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED,
const char *source EINA_UNUSED)
Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED,
const char *source EINA_UNUSED)
{
E_Entry_Smart_Data *sd;
@ -698,9 +696,9 @@ _entry_recalc_size(Evas_Object *object)
static void
_entry_changed_signal_cb(void *data,
Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED,
const char *source EINA_UNUSED)
Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED,
const char *source EINA_UNUSED)
{
Evas_Object *object = data;
E_Entry_Smart_Data *sd;
@ -715,9 +713,9 @@ _entry_changed_signal_cb(void *data,
static void
_entry_cursor_changed_signal_cb(void *data,
Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED,
const char *source EINA_UNUSED)
Evas_Object *obj EINA_UNUSED,
const char *emission EINA_UNUSED,
const char *source EINA_UNUSED)
{
Evas_Object *object = data;
E_Entry_Smart_Data *sd;
@ -727,7 +725,7 @@ _entry_cursor_changed_signal_cb(void *data,
return;
edje_object_part_text_cursor_geometry_get(sd->entry_object, ENTRY_PART_NAME,
&cx, &cy, &cw, &ch);
&cx, &cy, &cw, &ch);
e_scrollframe_child_region_show(sd->scroll_object, cx, cy, cw, ch);
}
@ -763,7 +761,7 @@ _e_entry_smart_add(Evas_Object *object)
evas_object_propagate_events_set(sd->scroll_object, EINA_TRUE);
e_scrollframe_custom_theme_set(sd->scroll_object, "base/theme/widgets", "e/widgets/entry/scrollframe");
edje_object_size_min_calc(e_scrollframe_edje_object_get(sd->scroll_object),
&sd->theme_width, &sd->theme_height);
&sd->theme_width, &sd->theme_height);
evas_object_smart_member_add(sd->scroll_object, object);
evas_object_show(sd->scroll_object);
@ -778,28 +776,28 @@ _e_entry_smart_add(Evas_Object *object)
evas_object_show(o);
evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_DOWN,
_e_entry_mouse_down_cb, object);
_e_entry_mouse_down_cb, object);
edje_object_signal_callback_add(sd->entry_object,
"selection,changed", ENTRY_PART_NAME,
_entry_selection_changed_signal_cb, object);
"selection,changed", ENTRY_PART_NAME,
_entry_selection_changed_signal_cb, object);
edje_object_signal_callback_add(sd->entry_object,
"entry,selection,all,request", ENTRY_PART_NAME,
_entry_selection_all_signal_cb, object);
"entry,selection,all,request", ENTRY_PART_NAME,
_entry_selection_all_signal_cb, object);
edje_object_signal_callback_add(sd->entry_object,
"entry,changed", ENTRY_PART_NAME,
_entry_changed_signal_cb, object);
"entry,changed", ENTRY_PART_NAME,
_entry_changed_signal_cb, object);
edje_object_signal_callback_add(sd->entry_object,
"entry,paste,request,*", ENTRY_PART_NAME,
_entry_paste_request_signal_cb, object);
"entry,paste,request,*", ENTRY_PART_NAME,
_entry_paste_request_signal_cb, object);
edje_object_signal_callback_add(sd->entry_object,
"entry,copy,notify", ENTRY_PART_NAME,
_entry_copy_notify_signal_cb, object);
"entry,copy,notify", ENTRY_PART_NAME,
_entry_copy_notify_signal_cb, object);
edje_object_signal_callback_add(sd->entry_object,
"entry,cut,notify", ENTRY_PART_NAME,
_entry_cut_notify_signal_cb, object);
"entry,cut,notify", ENTRY_PART_NAME,
_entry_cut_notify_signal_cb, object);
edje_object_signal_callback_add(sd->entry_object,
"cursor,changed", ENTRY_PART_NAME,
_entry_cursor_changed_signal_cb, object);
"cursor,changed", ENTRY_PART_NAME,
_entry_cursor_changed_signal_cb, object);
_entry_recalc_size(object);
@ -817,29 +815,29 @@ _e_entry_smart_del(Evas_Object *object)
return;
evas_object_event_callback_del_full(object, EVAS_CALLBACK_MOUSE_DOWN,
_e_entry_mouse_down_cb, object);
_e_entry_mouse_down_cb, object);
edje_object_signal_callback_del_full(sd->entry_object,
"selection,changed", ENTRY_PART_NAME,
_entry_selection_changed_signal_cb, object);
"selection,changed", ENTRY_PART_NAME,
_entry_selection_changed_signal_cb, object);
edje_object_signal_callback_del_full(sd->entry_object,
"entry,selection,all,request", ENTRY_PART_NAME,
_entry_selection_all_signal_cb, object);
"entry,selection,all,request", ENTRY_PART_NAME,
_entry_selection_all_signal_cb, object);
edje_object_signal_callback_del_full(sd->entry_object,
"entry,changed", ENTRY_PART_NAME,
_entry_changed_signal_cb, object);
"entry,changed", ENTRY_PART_NAME,
_entry_changed_signal_cb, object);
edje_object_signal_callback_del_full(sd->entry_object,
"entry,paste,request,*", ENTRY_PART_NAME,
_entry_paste_request_signal_cb, object);
"entry,paste,request,*", ENTRY_PART_NAME,
_entry_paste_request_signal_cb, object);
edje_object_signal_callback_del_full(sd->entry_object,
"entry,copy,notify", ENTRY_PART_NAME,
_entry_copy_notify_signal_cb, object);
"entry,copy,notify", ENTRY_PART_NAME,
_entry_copy_notify_signal_cb, object);
edje_object_signal_callback_del_full(sd->entry_object,
"entry,cut,notify", ENTRY_PART_NAME,
_entry_cut_notify_signal_cb, object);
"entry,cut,notify", ENTRY_PART_NAME,
_entry_cut_notify_signal_cb, object);
edje_object_signal_callback_del_full(sd->entry_object,
"cursor,changed", ENTRY_PART_NAME,
_entry_cursor_changed_signal_cb, object);
"cursor,changed", ENTRY_PART_NAME,
_entry_cursor_changed_signal_cb, object);
if (sd->selection_handler)
ecore_event_handler_del(sd->selection_handler);
evas_object_del(sd->entry_object);

View File

@ -12,9 +12,9 @@ e_env_init(void)
EINA_LIST_FOREACH(e_config->env_vars, l, evr)
{
if (evr->unset)
e_env_unset(evr->var);
e_env_unset(evr->var);
else
e_env_set(evr->var, evr->val);
e_env_set(evr->var, evr->val);
}
return 1;
}

View File

@ -11,7 +11,7 @@
typedef struct _E_Exec_Launch E_Exec_Launch;
typedef struct _E_Exec_Search E_Exec_Search;
typedef struct _E_Exec_Watch E_Exec_Watch;
typedef struct _E_Exec_Watch E_Exec_Watch;
struct _E_Exec_Launch
{
@ -29,9 +29,9 @@ struct _E_Exec_Search
struct _E_Exec_Watch
{
void (*func) (void *data, E_Exec_Instance *inst, E_Exec_Watch_Type type);
void (*func)(void *data, E_Exec_Instance *inst, E_Exec_Watch_Type type);
const void *data;
Eina_Bool delete_me : 1;
Eina_Bool delete_me : 1;
};
struct _E_Config_Dialog_Data
@ -71,7 +71,7 @@ static int startup_id = 0;
static Ecore_Event_Handler *_e_exec_exit_handler = NULL;
static Ecore_Event_Handler *_e_exec_border_add_handler = NULL;
static E_Exec_Instance *(*_e_exec_executor_func) (void *data, E_Zone *zone, Efreet_Desktop *desktop, const char *exec, Eina_List *files, const char *launch_method) = NULL;
static E_Exec_Instance *(*_e_exec_executor_func)(void *data, E_Zone * zone, Efreet_Desktop * desktop, const char *exec, Eina_List *files, const char *launch_method) = NULL;
static void *_e_exec_executor_data = NULL;
/* externally accessible functions */
@ -106,7 +106,7 @@ e_exec_shutdown(void)
}
EAPI void
e_exec_executor_set(E_Exec_Instance *(*func) (void *data, E_Zone *zone, Efreet_Desktop *desktop, const char *exec, Eina_List *files, const char *launch_method), const void *data)
e_exec_executor_set(E_Exec_Instance *(*func)(void *data, E_Zone * zone, Efreet_Desktop * desktop, const char *exec, Eina_List *files, const char *launch_method), const void *data)
{
_e_exec_executor_func = func;
_e_exec_executor_data = (void *)data;
@ -120,7 +120,7 @@ e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec,
E_Exec_Instance *inst = NULL;
if ((!desktop) && (!exec)) return NULL;
if (_e_exec_executor_func)
return _e_exec_executor_func(_e_exec_executor_data, zone,
desktop, exec, files, launch_method);
@ -128,34 +128,34 @@ e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec,
if (desktop)
{
const char *single;
single = eina_hash_find(desktop->x, "X-Enlightenment-Single-Instance");
if ((single) ||
(e_config->exe_always_single_instance))
{
Eina_Bool dosingle = EINA_FALSE;
// first take system config for always single instance if set
if (e_config->exe_always_single_instance) dosingle = EINA_TRUE;
// and now let desktop file override it
if (single)
{
if ((!strcasecmp(single, "true")) ||
(!strcasecmp(single, "yes"))||
(!strcasecmp(single, "yes")) ||
(!strcasecmp(single, "1")))
dosingle = EINA_TRUE;
else if ((!strcasecmp(single, "false")) ||
(!strcasecmp(single, "no"))||
(!strcasecmp(single, "no")) ||
(!strcasecmp(single, "0")))
dosingle = EINA_FALSE;
}
if (dosingle)
{
Eina_List *l;
E_Border *bd;
EINA_LIST_FOREACH(e_border_client_list(), l, bd)
{
if (bd && bd->desktop == desktop)
@ -170,7 +170,7 @@ e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec,
}
}
}
launch = E_NEW(E_Exec_Launch, 1);
if (!launch) return NULL;
if (zone)
@ -187,7 +187,7 @@ e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec,
inst = _e_exec_cb_exec(launch, NULL, strdup(exec), 0);
else
inst = efreet_desktop_command_get
(desktop, files, (Efreet_Desktop_Command_Cb)_e_exec_cb_exec, launch);
(desktop, files, (Efreet_Desktop_Command_Cb)_e_exec_cb_exec, launch);
}
else
inst = _e_exec_cb_exec(launch, NULL, strdup(exec), 0);
@ -227,7 +227,7 @@ EAPI E_Exec_Instance *
e_exec_startup_desktop_instance_find(Efreet_Desktop *desktop)
{
E_Exec_Search search;
search.inst = NULL;
search.desktop = desktop;
search.startup_id = 0;
@ -241,7 +241,7 @@ _e_exe_instance_watchers_call(E_Exec_Instance *inst, E_Exec_Watch_Type type)
{
E_Exec_Watch *iw;
Eina_List *l, *ln;
inst->walking++;
EINA_LIST_FOREACH(inst->watchers, l, iw)
{
@ -268,10 +268,10 @@ e_exec_instance_found(E_Exec_Instance *inst)
}
EAPI void
e_exec_instance_watcher_add(E_Exec_Instance *inst, void (*func) (void *data, E_Exec_Instance *inst, E_Exec_Watch_Type type), const void *data)
e_exec_instance_watcher_add(E_Exec_Instance *inst, void (*func)(void *data, E_Exec_Instance *inst, E_Exec_Watch_Type type), const void *data)
{
E_Exec_Watch *iw;
iw = E_NEW(E_Exec_Watch, 1);
if (!iw) return;
iw->func = func;
@ -280,11 +280,11 @@ e_exec_instance_watcher_add(E_Exec_Instance *inst, void (*func) (void *data, E_E
}
EAPI void
e_exec_instance_watcher_del(E_Exec_Instance *inst, void (*func) (void *data, E_Exec_Instance *inst, E_Exec_Watch_Type type), const void *data)
e_exec_instance_watcher_del(E_Exec_Instance *inst, void (*func)(void *data, E_Exec_Instance *inst, E_Exec_Watch_Type type), const void *data)
{
E_Exec_Watch *iw;
Eina_List *l, *ln;
EINA_LIST_FOREACH_SAFE(inst->watchers, l, ln, iw)
{
if ((iw->func == func) && (iw->data == data))
@ -398,7 +398,7 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
free(inst);
e_util_dialog_show
(_("Run Error"),
_("Enlightenment was unable to get current directory"));
_("Enlightenment was unable to get current directory"));
return NULL;
}
if (chdir(desktop->path))
@ -406,10 +406,10 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
free(inst);
e_util_dialog_show
(_("Run Error"),
_("Enlightenment was unable to change to directory:<br>"
"<br>"
"%s"),
desktop->path);
_("Enlightenment was unable to change to directory:<br>"
"<br>"
"%s"),
desktop->path);
return NULL;
}
exe = ecore_exe_run(exec, inst);
@ -417,10 +417,10 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
{
e_util_dialog_show
(_("Run Error"),
_("Enlightenment was unable to restore to directory:<br>"
"<br>"
"%s"),
buf);
_("Enlightenment was unable to restore to directory:<br>"
"<br>"
"%s"),
buf);
free(inst);
return NULL;
}
@ -430,7 +430,7 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
if ((desktop) && (desktop->terminal))
{
Efreet_Desktop *tdesktop;
tdesktop = e_util_terminal_desktop_get();
if (tdesktop)
{
@ -534,10 +534,11 @@ _e_exec_instance_free(E_Exec_Instance *inst)
{
Eina_List *instances;
E_Exec_Watch *iw;
_e_exe_instance_watchers_call(inst, E_EXEC_WATCH_STOPPED);
EINA_LIST_FREE(inst->watchers, iw) free(iw);
EINA_LIST_FREE(inst->watchers, iw)
free(iw);
if (inst->key)
{
instances = eina_hash_find(e_exec_instances, inst->key);
@ -558,14 +559,15 @@ _e_exec_instance_free(E_Exec_Instance *inst)
if (inst->desktop) efreet_desktop_free(inst->desktop);
free(inst);
}
/*
static Eina_Bool
_e_exec_cb_instance_finish(void *data)
{
static Eina_Bool
_e_exec_cb_instance_finish(void *data)
{
_e_exec_instance_free(data);
return ECORE_CALLBACK_CANCEL;
}
*/
}
*/
static Eina_Bool
_e_exec_cb_exit(void *data __UNUSED__, int type __UNUSED__, void *event)
@ -640,7 +642,7 @@ _e_exec_cb_exit(void *data __UNUSED__, int type __UNUSED__, void *event)
/* scripts that fork off children with & break child tracking... but this hack
* also breaks apps that handle single-instance themselves */
/*
/*
if ((ecore_time_get() - inst->launch_time) < 2.0)
{
inst->exe = NULL;
@ -649,7 +651,7 @@ _e_exec_cb_exit(void *data __UNUSED__, int type __UNUSED__, void *event)
}
else
*/
_e_exec_instance_free(inst);
_e_exec_instance_free(inst);
return ECORE_CALLBACK_PASS_ON;
}
@ -666,10 +668,10 @@ _e_exec_startup_id_pid_find(const Eina_Hash *hash __UNUSED__, const void *key __
{
if (((search->desktop) &&
(search->desktop == inst->desktop)) ||
((search->startup_id > 0) &&
(search->startup_id == inst->startup_id)) ||
((inst->exe) && (search->pid > 1) &&
(search->pid == ecore_exe_pid_get(inst->exe))))
{
@ -1082,3 +1084,4 @@ _dialog_save_cb(void *data __UNUSED__, void *data2)
fclose(f);
}

View File

@ -11,12 +11,12 @@ typedef struct _Filereg_Item Filereg_Item;
struct _Filereg_Item
{
const char *path;
int ref_count;
int ref_count;
};
static Eina_Bool _filereg_hash_cb_free(const Eina_Hash *hash __UNUSED__,
const void *key __UNUSED__,
void *data, void *fdata __UNUSED__);
const void *key __UNUSED__,
void *data, void *fdata __UNUSED__);
/* Externally accessible functions */
EINTERN int
@ -44,8 +44,8 @@ e_filereg_register(const char *path)
fi = eina_hash_find(_e_filereg, path);
if (fi)
{
fi->ref_count++;
return 1;
fi->ref_count++;
return 1;
}
fi = E_NEW(Filereg_Item, 1);
if (!fi) return 0;
@ -63,13 +63,13 @@ e_filereg_deregister(const char *path)
fi = eina_hash_find(_e_filereg, path);
if (fi)
{
fi->ref_count--;
if (fi->ref_count == 0)
{
eina_hash_del(_e_filereg, path, fi);
if (fi->path) eina_stringshare_del(fi->path);
E_FREE(fi);
}
fi->ref_count--;
if (fi->ref_count == 0)
{
eina_hash_del(_e_filereg, path, fi);
if (fi->path) eina_stringshare_del(fi->path);
E_FREE(fi);
}
}
}
@ -83,7 +83,7 @@ e_filereg_file_protected(const char *path)
/* Private Functions */
static Eina_Bool
_filereg_hash_cb_free(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__,
void *data, void *fdata __UNUSED__)
void *data, void *fdata __UNUSED__)
{
Filereg_Item *fi;
@ -93,3 +93,4 @@ _filereg_hash_cb_free(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED
E_FREE(fi);
return EINA_TRUE;
}

View File

@ -16,12 +16,13 @@
* being able to save/load icon placement. it doesn't support custom frames or icons yet
*/
#define EFM_SMART_CHECK(args...) \
E_Fm2_Smart_Data *sd; \
\
if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR() args; \
sd = evas_object_smart_data_get(obj); \
if ((!sd) || (e_util_strcmp(evas_object_type_get(obj), "e_fm"))) return args
#define EFM_SMART_CHECK(args ...) \
E_Fm2_Smart_Data * sd; \
\
if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR() args; \
sd = evas_object_smart_data_get(obj); \
if ((!sd) || (e_util_strcmp(evas_object_type_get(obj), "e_fm"))) \
return args
typedef enum _E_Fm2_Action_Type
{
@ -81,8 +82,8 @@ struct _E_Fm2_Smart_Data
struct
{
Ecore_Thread *thread;
const char *filename;
Ecore_Thread *thread;
const char *filename;
} new_file;
E_Fm2_Icon *last_selected;
@ -132,40 +133,40 @@ struct _E_Fm2_Smart_Data
struct
{
char *buf;
const char *start;
const char *start;
Ecore_Timer *timer;
unsigned int wildcard;
Eina_Bool setting : 1;
Eina_Bool disabled : 1;
Eina_Bool setting : 1;
Eina_Bool disabled : 1;
} typebuf;
int busy_count;
int busy_count;
E_Object *eobj;
E_Drop_Handler *drop_handler;
E_Fm2_Icon *drop_icon;
Ecore_Animator *dnd_scroller;
Evas_Point dnd_current;
Eina_List *mount_ops;
E_Fm2_Mount *mount;
signed char drop_after;
Eina_Bool drop_show : 1;
Eina_Bool drop_in_show : 1;
Eina_Bool drop_all : 1;
Eina_Bool drag : 1;
Eina_Bool selecting : 1;
Eina_Bool toomany : 1;
E_Object *eobj;
E_Drop_Handler *drop_handler;
E_Fm2_Icon *drop_icon;
Ecore_Animator *dnd_scroller;
Evas_Point dnd_current;
Eina_List *mount_ops;
E_Fm2_Mount *mount;
signed char drop_after;
Eina_Bool drop_show : 1;
Eina_Bool drop_in_show : 1;
Eina_Bool drop_all : 1;
Eina_Bool drag : 1;
Eina_Bool selecting : 1;
Eina_Bool toomany : 1;
struct
{
int ox, oy;
int x, y, w, h;
} selrect;
E_Fm2_Icon *iop_icon;
E_Fm2_Icon *iop_icon;
Eina_List *handlers;
Eina_List *handlers;
Ecore_Event_Handler *efreet_cache_update;
Efreet_Desktop *desktop;
Efreet_Desktop *desktop;
};
struct _E_Fm2_Region
@ -193,31 +194,31 @@ struct _E_Fm2_Icon
E_Dialog *dialog;
E_Fm2_Icon_Info info;
E_Fm2_Mount *mount; // for dnd into unmounted dirs
Ecore_Timer *mount_timer; // autounmount in 15s
E_Fm2_Mount *mount; // for dnd into unmounted dirs
Ecore_Timer *mount_timer; // autounmount in 15s
struct
{
Evas_Coord x, y;
Evas_Coord x, y;
Ecore_Timer *dnd_end_timer; //we need this for XDirectSave drops so we don't lose the icon
Eina_Bool start : 1;
Eina_Bool dnd : 1; // currently dragging
Eina_Bool src : 1; // drag source
Eina_Bool hidden : 1; // dropped into different dir
Eina_Bool start : 1;
Eina_Bool dnd : 1; // currently dragging
Eina_Bool src : 1; // drag source
Eina_Bool hidden : 1; // dropped into different dir
} drag;
int saved_rel;
Eina_Bool realized : 1;
Eina_Bool selected : 1;
Eina_Bool last_selected : 1;
Eina_Bool saved_pos : 1;
Eina_Bool odd : 1;
Eina_Bool down_sel : 1;
Eina_Bool removable_state_change : 1;
Eina_Bool thumb_failed : 1;
Eina_Bool queued : 1;
Eina_Bool inserted : 1;
int saved_rel;
Eina_Bool realized : 1;
Eina_Bool selected : 1;
Eina_Bool last_selected : 1;
Eina_Bool saved_pos : 1;
Eina_Bool odd : 1;
Eina_Bool down_sel : 1;
Eina_Bool removable_state_change : 1;
Eina_Bool thumb_failed : 1;
Eina_Bool queued : 1;
Eina_Bool inserted : 1;
};
struct _E_Fm2_Finfo
@ -252,10 +253,10 @@ struct _E_Fm2_Uri
struct _E_Fm2_Context_Menu_Data
{
E_Fm2_Icon *icon;
E_Fm2_Smart_Data *sd;
E_Fm2_Smart_Data *sd;
E_Fm2_Mime_Handler *handler;
};
static Eina_Bool _e_fm2_cb_drag_finished_show(E_Fm2_Icon *ic);
static Eina_Bool _e_fm2_cb_drag_finished_show(E_Fm2_Icon *ic);
static const char *_e_fm2_dev_path_map(E_Fm2_Smart_Data *sd, const char *dev, const char *path);
static void _e_fm2_file_add(Evas_Object *obj, const char *file, int unique, Eina_Stringshare *file_rel, int after, E_Fm2_Finfo *finf);
static void _e_fm2_file_del(Evas_Object *obj, const char *file);
@ -315,7 +316,7 @@ static void _e_fm2_typebuf_hide(Evas_Object *obj);
//static void _e_fm2_typebuf_history_prev(Evas_Object *obj);
//static void _e_fm2_typebuf_history_next(Evas_Object *obj);
static void _e_fm2_typebuf_run(Evas_Object *obj);
static E_Fm2_Icon *_e_fm2_typebuf_match(Evas_Object *obj, int next);
static E_Fm2_Icon *_e_fm2_typebuf_match(Evas_Object *obj, int next);
static void _e_fm2_typebuf_complete(Evas_Object *obj);
static void _e_fm2_typebuf_char_append(Evas_Object *obj, const char *ch);
static void _e_fm2_typebuf_char_backspace(Evas_Object *obj);
@ -464,13 +465,13 @@ static void _e_fm2_volume_eject(void *data, E_Menu *m, E_Menu_Item *mi)
static void _e_fm2_icon_removable_update(E_Fm2_Icon *ic);
static void _e_fm2_volume_icon_update(E_Volume *v);
static int _e_fm2_desktop_open(E_Fm2_Smart_Data *sd);
static int _e_fm2_desktop_open(E_Fm2_Smart_Data *sd);
static void _e_fm2_operation_abort_internal(E_Fm2_Op_Registry_Entry *ere);
static Eina_Bool _e_fm2_sys_suspend_hibernate(void *, int, void *);
static Eina_Bool _e_fm2_sys_suspend_hibernate(void *, int, void *);
static void _e_fm2_favorites_thread_cb(void *d, Ecore_Thread *et);
static void _e_fm2_thread_cleanup_cb(void *d, Ecore_Thread *et);
static void _e_fm2_favorites_thread_cb(void *d, Ecore_Thread *et);
static void _e_fm2_thread_cleanup_cb(void *d, Ecore_Thread *et);
static char *_e_fm2_meta_path = NULL;
static Evas_Smart *_e_fm2_smart = NULL;
@ -606,7 +607,7 @@ static inline Eina_Bool
_e_fm2_toomany_get(const E_Fm2_Smart_Data *sd)
{
char mode;
mode = sd->config->view.mode;
if (sd->view_mode > -1) mode = sd->view_mode;
if (((mode >= E_FM2_VIEW_MODE_CUSTOM_ICONS) &&
@ -620,7 +621,7 @@ static inline char
_e_fm2_view_mode_get(const E_Fm2_Smart_Data *sd)
{
char mode;
mode = sd->config->view.mode;
if (sd->view_mode > -1) mode = sd->view_mode;
if ((sd->toomany) &&
@ -731,13 +732,13 @@ _e_fm2_op_registry_entry_print(const E_Fm2_Op_Registry_Entry *ere)
status = status_strings[0];
DBG("id: %8d, op: %2d [%s] finished: %hhu, needs_attention: %hhu\n"
" %3d%% (%" PRIi64 "/%" PRIi64 "), start_time: %10.0f, eta: %5ds, xwin: %#x\n"
" src=[%s]\n"
" dst=[%s]",
ere->id, ere->op, status, ere->finished, ere->needs_attention,
ere->percent, ere->done, ere->total, ere->start_time, ere->eta,
e_fm2_op_registry_entry_xwin_get(ere),
ere->src, ere->dst);
" %3d%% (%" PRIi64 "/%" PRIi64 "), start_time: %10.0f, eta: %5ds, xwin: %#x\n"
" src=[%s]\n"
" dst=[%s]",
ere->id, ere->op, status, ere->finished, ere->needs_attention,
ere->percent, ere->done, ere->total, ere->start_time, ere->eta,
e_fm2_op_registry_entry_xwin_get(ere),
ere->src, ere->dst);
}
static Eina_Bool
@ -898,7 +899,7 @@ _e_fm2_cb_dnd_drop(void *data, const char *type)
else
allow = (sd->realpath && ecore_file_can_write(sd->realpath));
}
e_drop_xds_update(allow, sd->drop_icon ? buf : sd->realpath);
if (sd->dnd_scroller) ecore_animator_del(sd->dnd_scroller);
sd->dnd_scroller = NULL;
@ -1438,7 +1439,6 @@ e_fm2_parent_go(Evas_Object *obj)
e_fm2_path_set(obj, "/", path);
free(path);
}
}
EAPI void
@ -2777,7 +2777,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
}
break;
}
/*file add - listing*/
/*file add - listing*/
if (e->minor == E_FM_OP_FILE_ADD) /*file add*/
{
if (!sd->scan_timer)
@ -2798,7 +2798,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
* dramatically improve load times
*/
ecore_timer_interval_set(sd->scan_timer, 1.5);
ecore_timer_reset(sd->scan_timer);
ecore_timer_reset(sd->scan_timer);
}
}
if (path[0] != 0)
@ -2821,7 +2821,6 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
NULL, 0, &finf);
if (n - sd->overlay_count > 150)
{
sd->overlay_count = n + 1;
snprintf(buf, sizeof(buf), P_("%u file", "%u files", sd->overlay_count), sd->overlay_count);
edje_object_part_text_set(sd->overlay, "e.text.busy_label", buf);
@ -2951,6 +2950,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
case E_FM_OP_VOLUME_LIST_DONE:
e_fm2_device_check_desktop_icons();
break;
case E_FM_OP_VOLUME_ADD: /*volume add*/
if ((e->data) && (e->size > 0))
{
@ -3491,7 +3491,7 @@ _e_fm2_file_paste(Evas_Object *obj)
size_t size = 0;
char *args = NULL;
Eina_Bool memerr = EINA_FALSE;
sd = evas_object_smart_data_get(obj);
if (!sd) return;
@ -3524,7 +3524,7 @@ _e_fm2_file_paste(Evas_Object *obj)
eina_stringshare_del(filepath);
}
if (memerr) return;
/* Add destination to the arguments. */
{
E_Fm2_Icon *ic = NULL;
@ -3579,7 +3579,7 @@ _e_fm2_file_symlink(Evas_Object *obj)
size_t size = 0;
char *args = NULL;
Eina_Bool memerr = EINA_FALSE;
sd = evas_object_smart_data_get(obj);
if (!sd) return;
@ -3615,7 +3615,7 @@ _e_fm2_file_symlink(Evas_Object *obj)
eina_stringshare_del(filepath);
}
if (memerr) return;
/* Add destination to the arguments. */
args = e_util_string_append_quoted(args, &size, &length, sd->realpath);
if (!args) return;
@ -3703,7 +3703,7 @@ _e_fm2_queue_process(Evas_Object *obj)
i = (p0 + p1) / 2;
ll = sd->tmp.list_index;
if (ll[i])
do /* avoid garbage deref */
do /* avoid garbage deref */
{
ic2 = eina_list_data_get(ll[i]);
v = _e_fm2_cb_icon_sort(ic, ic2);
@ -4181,7 +4181,8 @@ _e_fm2_icons_place_list(E_Fm2_Smart_Data *sd)
y += ic->h;
ic->odd = (i & 0x01);
if ((ic->w != sd->w) && ((ic->x + ic->w) > sd->max.w)) sd->max.w = ic->x + ic->w;
else if (ic->min_w > sd->max.w) sd->max.w = ic->min_w;
else if (ic->min_w > sd->max.w)
sd->max.w = ic->min_w;
if ((ic->y + ic->h) > sd->max.h) sd->max.h = ic->y + ic->h;
w = MAX(w, ic->min_w);
w = MAX(w, sd->w);
@ -4246,7 +4247,6 @@ _e_fm2_icons_free(Evas_Object *obj)
{
E_Fm2_Smart_Data *sd;
E_Fm2_Icon *ic;
sd = evas_object_smart_data_get(obj);
if (!sd) return;
@ -4397,7 +4397,7 @@ _e_fm2_uri_parse(const char *val)
hostname[i] = '\0';
/* See http://www.faqs.org/rfcs/rfc1738.html for the escaped chars */
for (i = 0; (*p != '\0') && (i < (PATH_MAX-1)); i++, p++)
for (i = 0; (*p != '\0') && (i < (PATH_MAX - 1)); i++, p++)
{
if (*p == '%')
{
@ -5050,7 +5050,7 @@ _e_fm2_cb_eio_stat(void *data, Eio_File *handler __UNUSED__, const Eina_Stat *st
E_Fm2_Icon *ic = data;
ic->eio = NULL;
#define FUCK_EINA_STAT_WHY_IS_IT_NOT_THE_SAME_AS_STAT(member) \
ic->info.statinfo.st_##member = st->member
ic->info.statinfo.st_##member = st->member
FUCK_EINA_STAT_WHY_IS_IT_NOT_THE_SAME_AS_STAT(dev);
FUCK_EINA_STAT_WHY_IS_IT_NOT_THE_SAME_AS_STAT(ino);
@ -5718,9 +5718,9 @@ _e_fm2_inplace_open(const E_Fm2_Icon *ic)
char buf[PATH_MAX];
if (((!S_ISDIR(ic->info.statinfo.st_mode)) ||
(ic->info.link && (!S_ISDIR(ic->info.statinfo.st_mode))) ||
(!ic->sd->config->view.open_dirs_in_place) ||
(ic->sd->config->view.no_subdir_jump)))
(ic->info.link && (!S_ISDIR(ic->info.statinfo.st_mode))) ||
(!ic->sd->config->view.open_dirs_in_place) ||
(ic->sd->config->view.no_subdir_jump)))
return 0;
if (!_e_fm2_icon_path(ic, buf, sizeof(buf)))
@ -5754,7 +5754,6 @@ _e_fm2_typebuf_match_func(E_Fm2_Icon *ic, void *data)
(e_util_glob_case_match(ic->info.label, tb))) ||
((ic->info.file) &&
(e_util_glob_case_match(ic->info.file, tb)));
}
static Eina_Bool
@ -5835,6 +5834,7 @@ _e_fm2_typebuf_match(Evas_Object *obj, int next)
x++;
break;
}
case 1:
_e_fm2_icon_desel_any(obj);
if (sel)
@ -5846,7 +5846,8 @@ _e_fm2_typebuf_match(Evas_Object *obj, int next)
}
evas_object_smart_callback_call(obj, "selection_change", NULL);
}
} while (0);
} while (0)
;
if (sd->typebuf.timer) ecore_timer_reset(sd->typebuf.timer);
else sd->typebuf.timer = ecore_timer_add(3.5, _e_fm_typebuf_timer_cb, sd);
@ -6253,17 +6254,17 @@ _e_fm2_cb_dnd_scroller(E_Fm2_Smart_Data *sd)
x = MAX(0, x);
y = MAX(0, y);
e_fm2_pan_set(sd->obj, x, y);
if ((sd->drop_icon) &&
(!E_INSIDE(sd->dnd_current.x, sd->dnd_current.y,
sd->drop_icon->x - sd->drop_icon->sd->pos.x,
sd->drop_icon->y - sd->drop_icon->sd->pos.y,
if ((sd->drop_icon) &&
(!E_INSIDE(sd->dnd_current.x, sd->dnd_current.y,
sd->drop_icon->x - sd->drop_icon->sd->pos.x,
sd->drop_icon->y - sd->drop_icon->sd->pos.y,
sd->drop_icon->w, sd->drop_icon->h)))
_e_fm2_dnd_drop_hide(sd->obj);
/*
* FIXME: this is slow and doesn't do much, need a better way...
if (!sd->drop_icon)
_e_fm2_cb_dnd_move(sd, NULL, NULL);
*/
*/
#undef EFM_MAX_PIXEL_DRAG
return EINA_TRUE;
}
@ -6285,7 +6286,6 @@ _e_fm2_cb_dnd_enter(void *data, const char *type, void *event)
static Eina_Bool
_e_fm2_cb_dnd_move_helper(E_Fm2_Smart_Data *sd, E_Fm2_Icon *ic, int dx, int dy)
{
if (!E_INSIDE(dx, dy, ic->x - ic->sd->pos.x, ic->y - ic->sd->pos.y, ic->w, ic->h)) return EINA_FALSE;
if (ic->drag.dnd) return EINA_FALSE;
if (!S_ISDIR(ic->info.statinfo.st_mode))
@ -6371,7 +6371,7 @@ _e_fm2_cb_dnd_move(void *data, const char *type, void *event)
if (E_INSIDE(dx, dy, 0, 0, sd->w, sd->h))
{
#if 0 //this is broken since we don't allow custom list sorting
/* if listview - it is now after last file */
/* if listview - it is now after last file */
if (_e_fm2_view_mode_get(sd) == E_FM2_VIEW_MODE_LIST)
{
/* if there is a .order file - we can re-order files */
@ -6393,7 +6393,7 @@ _e_fm2_cb_dnd_move(void *data, const char *type, void *event)
}
else
#endif
_e_fm2_dnd_drop_all_show(sd->obj);
_e_fm2_dnd_drop_all_show(sd->obj);
return;
}
/* outside fm view */
@ -6480,9 +6480,11 @@ _e_fm_drop_menu_queue(Evas_Object *e_fm, void *args, int op)
case 0: //copy
mop->action = ECORE_X_ATOM_XDND_ACTION_COPY;
break;
case 1: //move
mop->action = ECORE_X_ATOM_XDND_ACTION_MOVE;
break;
case 2: //link
mop->action = ECORE_X_ATOM_XDND_ACTION_LINK;
break;
@ -6494,9 +6496,11 @@ _e_fm_drop_menu_queue(Evas_Object *e_fm, void *args, int op)
case 0: //copy
e_fm2_client_file_copy(e_fm, mop->args);
break;
case 1: //move
e_fm2_client_file_move(e_fm, mop->args);
break;
case 2: //link
e_fm2_client_file_symlink(e_fm, mop->args);
break;
@ -6560,16 +6564,16 @@ static void
_e_fm2_cb_dnd_selection_notify_post_mount_fail(E_Volume *vol)
{
E_Fm2_Device_Mount_Op *mop;
while (vol->mount_ops)
{
E_Fm2_Icon *ic;
mop = (E_Fm2_Device_Mount_Op*) vol->mount_ops;
mop = (E_Fm2_Device_Mount_Op *)vol->mount_ops;
ic = mop->ic;
vol->mount_ops = eina_inlist_remove(vol->mount_ops, EINA_INLIST_GET(mop));
/* FIXME: this can be made more clear */
e_util_dialog_show(_("Error"), _("The recent DND operation requested for '%s' has failed."), vol->label ?: vol->udi);
e_util_dialog_show(_("Error"), _("The recent DND operation requested for '%s' has failed."), vol->label ? : vol->udi);
evas_object_data_del(ic->sd->obj, "dnd_queue");
free(mop->args);
ic->sd->mount_ops = eina_list_remove(ic->sd->mount_ops, mop);
@ -6595,14 +6599,14 @@ _e_fm2_cb_dnd_selection_notify_post_mount(E_Volume *vol)
if (mop->action == ECORE_X_ATOM_XDND_ACTION_ASK)
continue;
else if (mop->action == ECORE_X_ATOM_XDND_ACTION_MOVE)
e_fm2_client_file_move(ic->sd->obj, mop->args);
e_fm2_client_file_move(ic->sd->obj, mop->args);
else if (mop->action == ECORE_X_ATOM_XDND_ACTION_COPY)
e_fm2_client_file_copy(ic->sd->obj, mop->args);
else if (mop->action == ECORE_X_ATOM_XDND_ACTION_LINK)
e_fm2_client_file_symlink(ic->sd->obj, mop->args);
}
else
e_util_dialog_show(_("Error"), _("The recent DND operation requested for '%s' has failed."), vol->label ?: vol->udi);
e_util_dialog_show(_("Error"), _("The recent DND operation requested for '%s' has failed."), vol->label ? : vol->udi);
free(mop->args);
vol->mount_ops = eina_inlist_remove(vol->mount_ops, EINA_INLIST_GET(mop));
ic->sd->mount_ops = eina_list_remove(ic->sd->mount_ops, mop);
@ -6655,7 +6659,7 @@ _e_fm2_cb_dnd_selection_notify(void *data, const char *type, void *event)
size_t length = 0;
Eina_Bool lnk = EINA_FALSE, memerr = EINA_FALSE, mnt = EINA_FALSE;
E_Fm2_Device_Mount_Op *mop = NULL;
sd = data;
ev = event;
if (!_e_fm2_dnd_type_implemented(type)) return;
@ -6671,7 +6675,7 @@ _e_fm2_cb_dnd_selection_notify(void *data, const char *type, void *event)
*/
f = ecore_file_file_get(fp);
if ((((f - fp - 1 == 0) && (!strcmp(sd->realpath, "/"))) ||
((f - fp - 1 > 0) && (!strncmp(sd->realpath, fp, f - fp - 1)))) &&
((f - fp - 1 > 0) && (!strncmp(sd->realpath, fp, f - fp - 1)))) &&
((size_t)(f - fp - 1) == strlen(sd->realpath)))
{
if ((e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_MOVE) || (sd->config->view.link_drop))
@ -6683,7 +6687,7 @@ _e_fm2_cb_dnd_selection_notify(void *data, const char *type, void *event)
}
}
}
isel = _e_fm2_uri_icon_list_get(fsel);
ox = 0; oy = 0;
EINA_LIST_FOREACH(isel, l, ic)
@ -6752,7 +6756,8 @@ _e_fm2_cb_dnd_selection_notify(void *data, const char *type, void *event)
{
args = e_util_string_append_char(args, &size, &length, ' ');
if (!args) memerr = EINA_TRUE;
else if (ic) ic->drag.hidden = EINA_TRUE;
else if (ic)
ic->drag.hidden = EINA_TRUE;
}
}
eina_stringshare_del(fp);
@ -6823,8 +6828,8 @@ _e_fm2_cb_dnd_selection_notify(void *data, const char *type, void *event)
}
else if (!sd->drop_icon->mount)
sd->drop_icon->mount = e_fm2_device_mount(vol, (Ecore_Cb)_e_fm2_cb_dnd_selection_notify_post_mount,
(Ecore_Cb)_e_fm2_cb_dnd_selection_notify_post_mount_fail, (Ecore_Cb)_e_fm2_cb_dnd_selection_notify_post_umount,
NULL, vol);
(Ecore_Cb)_e_fm2_cb_dnd_selection_notify_post_mount_fail, (Ecore_Cb)_e_fm2_cb_dnd_selection_notify_post_umount,
NULL, vol);
if (sd->drop_icon->mount_timer) ecore_timer_reset(sd->drop_icon->mount_timer);
else sd->drop_icon->mount_timer = ecore_timer_add(15., (Ecore_Task_Cb)_e_fm2_cb_dnd_selection_notify_post_mount_timer, sd->drop_icon);
@ -7241,7 +7246,7 @@ _e_fm2_cb_icon_mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
ic = data;
ev = event_info;
edje_object_message_signal_process(ic->obj);
edje_object_message_signal_process(ic->obj);
@ -8203,8 +8208,10 @@ _e_fm2_cb_icon_sort(const void *data1, const void *data2)
cmp = strcasecmp(f1, f2);
if (cmp) return cmp;
}
else if (f1) return 1;
else if (f2) return -1;
else if (f1)
return 1;
else if (f2)
return -1;
}
if (ic1->sd->config->list.sort.size)
{
@ -8616,8 +8623,6 @@ _e_fm2_overlay_clip_move(void *data, Evas *e __UNUSED__, Evas_Object *obj, void
evas_object_move(sd->overlay, x, y);
}
static void
_e_fm2_view_menu_sorting_change_case(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi)
{
@ -8765,7 +8770,7 @@ _e_fm2_menu(Evas_Object *obj, unsigned int timestamp)
e_menu_item_submenu_pre_callback_set(mi, _e_fm2_view_menu_sorting_pre, sd);
}
if (!(sd->icon_menu.flags &
(E_FM2_MENU_NO_SHOW_HIDDEN | E_FM2_MENU_NO_REMEMBER_ORDERING | E_FM2_MENU_NO_ACTIVATE_CHANGE)))
(E_FM2_MENU_NO_SHOW_HIDDEN | E_FM2_MENU_NO_REMEMBER_ORDERING | E_FM2_MENU_NO_ACTIVATE_CHANGE)))
{
mi = e_menu_item_new(mn);
e_menu_item_label_set(mi, _("Options"));
@ -8925,7 +8930,7 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
e_menu_item_submenu_pre_callback_set(mi, _e_fm2_view_menu_sorting_pre, sd);
}
if (!(sd->icon_menu.flags &
(E_FM2_MENU_NO_SHOW_HIDDEN | E_FM2_MENU_NO_REMEMBER_ORDERING | E_FM2_MENU_NO_ACTIVATE_CHANGE)))
(E_FM2_MENU_NO_SHOW_HIDDEN | E_FM2_MENU_NO_REMEMBER_ORDERING | E_FM2_MENU_NO_ACTIVATE_CHANGE)))
{
mi = e_menu_item_new(mn);
e_menu_item_label_set(mi, _("Options"));
@ -9012,7 +9017,7 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
_e_fm2_context_menu_append(sd, buf, l, subm, ic);
eina_list_free(l);
}
}
}
}
if (!ic->info.removable)
{
@ -9163,7 +9168,6 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
if ((!ic->info.removable) && ic->info.file && (ic->info.file[0] != '|') && ic->info.mime && (!strcmp(ic->info.mime, "application/x-desktop")))
{
mi = e_menu_item_new(mn);
e_menu_item_label_set(mi, _("Properties"));
e_util_menu_item_theme_icon_set(mi, "document-properties");
@ -9180,7 +9184,7 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
else
sub = NULL;
mi = e_menu_item_new(sub ?: mn);
mi = e_menu_item_new(sub ? : mn);
e_menu_item_label_set(mi, _("File Properties"));
e_util_menu_item_theme_icon_set(mi, "document-properties");
e_menu_item_callback_set(mi, _e_fm2_file_properties, ic);
@ -9425,7 +9429,6 @@ _e_fm2_view_menu_common(E_Menu *subm, E_Fm2_Smart_Data *sd)
view_mode = _e_fm2_view_mode_get(sd);
if (!(sd->icon_menu.flags & E_FM2_MENU_NO_VIEW_CHANGE))
{
mi = e_menu_item_new(subm);
e_menu_item_label_set(mi, _("Grid Icons"));
e_menu_item_radio_group_set(mi, 1);
@ -9456,7 +9459,6 @@ _e_fm2_view_menu_common(E_Menu *subm, E_Fm2_Smart_Data *sd)
e_menu_item_toggle_set(mi, sd->view_mode == -1);
e_menu_item_callback_set(mi, _e_fm2_view_menu_use_default_cb, sd);
mi = e_menu_item_new(subm);
e_menu_item_separator_set(mi, 1);
}
@ -9535,7 +9537,7 @@ _e_fm2_new_thread_helper(Ecore_Thread *eth, Eina_Bool dir)
}
else
{
fd = open(buf, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR | S_IWUSR);
fd = open(buf, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
if (fd)
{
close(fd);
@ -9560,7 +9562,7 @@ _e_fm2_new_thread_helper(Ecore_Thread *eth, Eina_Bool dir)
}
else
{
fd = open(buf, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR | S_IWUSR);
fd = open(buf, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
if (fd)
{
close(fd);
@ -9582,6 +9584,7 @@ _e_fm2_new_file_thread(void *data __UNUSED__, Ecore_Thread *eth)
{
_e_fm2_new_thread_helper(eth, EINA_FALSE);
}
static void
_e_fm2_new_dir_thread(void *data __UNUSED__, Ecore_Thread *eth)
{
@ -9623,7 +9626,7 @@ _e_fm2_new_file(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
}
sd->new_file.thread = ecore_thread_feedback_run(_e_fm2_new_file_thread, (Ecore_Thread_Notify_Cb)_e_fm2_new_file_notify,
_e_fm2_new_file_end, _e_fm2_new_file_cancel, sd, EINA_FALSE);
ecore_thread_global_data_add("path", (void*)eina_stringshare_ref(sd->realpath), (void*)eina_stringshare_del, EINA_FALSE);
ecore_thread_global_data_add("path", (void *)eina_stringshare_ref(sd->realpath), (void *)eina_stringshare_del, EINA_FALSE);
evas_object_ref(sd->obj);
}
@ -9644,7 +9647,7 @@ _e_fm2_new_directory(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED_
}
sd->new_file.thread = ecore_thread_feedback_run(_e_fm2_new_dir_thread, (Ecore_Thread_Notify_Cb)_e_fm2_new_dir_notify,
_e_fm2_new_file_end, _e_fm2_new_file_cancel, sd, EINA_FALSE);
ecore_thread_global_data_add("path", (void*)eina_stringshare_ref(sd->realpath), (void*)eina_stringshare_del, EINA_FALSE);
ecore_thread_global_data_add("path", (void *)eina_stringshare_ref(sd->realpath), (void *)eina_stringshare_del, EINA_FALSE);
evas_object_ref(sd->obj);
}
@ -9766,7 +9769,6 @@ _e_fm2_options_menu_pre(void *data, E_Menu *subm)
e_menu_item_callback_set(mi, _e_fm2_settings_icon_item, sd);
}
static void
_custom_file_key_del(E_Fm2_Smart_Data *sd, const char *key)
{
@ -9991,7 +9993,7 @@ _e_fm2_desktop_open(E_Fm2_Smart_Data *sd)
snprintf(buf, sizeof(buf), "%s/.directory.desktop", sd->realpath);
ret = ecore_file_exists(buf) ? ecore_file_can_write(buf)
: ecore_file_can_write(sd->realpath);
: ecore_file_can_write(sd->realpath);
if (!ret) return -1;
ef = efreet_desktop_new(buf);
if (!ef) return 0;
@ -10268,11 +10270,14 @@ _e_fm2_icon_entry_widget_accept(E_Fm2_Icon *ic)
case -2:
e_util_dialog_show(_("Error"), _("%s already exists!"), txt);
return;
case -1:
e_util_dialog_show(_("Error"), _("%s could not be renamed because it is protected"), ic->info.file);
break;
case 0:
e_util_dialog_show(_("Error"), _("Internal filemanager error :("));
default: /* success! */
break;
}
@ -10302,11 +10307,14 @@ _e_fm2_file_rename_yes_cb(void *data, char *text)
e_util_dialog_show(_("Error"), _("%s already exists!"), text);
_e_fm2_file_rename(ic, NULL, NULL);
break;
case -1:
e_util_dialog_show(_("Error"), _("%s could not be renamed because it is protected"), ic->info.file);
break;
case 0:
e_util_dialog_show(_("Error"), _("Internal filemanager error :("));
default: /* success! */
break;
}
@ -10356,7 +10364,7 @@ _e_fm_retry_abort_dialog(int pid, const char *str)
void *id;
char text[4096 + PATH_MAX];
id = (intptr_t*)(long)pid;
id = (intptr_t *)(long)pid;
dialog = e_dialog_new(NULL, "E", "_fm_overwrite_dialog");
E_OBJECT(dialog)->data = id;
@ -10402,7 +10410,7 @@ _e_fm_overwrite_dialog(int pid, const char *str)
char text[4096 + PATH_MAX];
E_Fm2_Op_Registry_Entry *ere;
id = (intptr_t*)(long)pid;
id = (intptr_t *)(long)pid;
ere = e_fm2_op_registry_entry_get(pid);
if (ere)
{
@ -10412,7 +10420,6 @@ _e_fm_overwrite_dialog(int pid, const char *str)
if (sd)
E_LIST_FOREACH(sd->icons, _e_fm2_cb_drag_finished_show);
}
dialog = e_dialog_new(NULL, "E", "_fm_overwrite_dialog");
E_OBJECT(dialog)->data = id;
@ -10555,7 +10562,7 @@ _e_fm_error_dialog(int pid, const char *str)
E_Fm2_Mount *m;
Eina_Bool devlink = EINA_FALSE;
id = (intptr_t*)(long)pid;
id = (intptr_t *)(long)pid;
ere = e_fm2_op_registry_entry_get(pid);
if (!ere) return NULL;
sd = evas_object_smart_data_get(ere->e_fm);
@ -10632,7 +10639,7 @@ _e_fm_error_link_source(void *data, E_Dialog *dialog)
size_t length = 0;
file = ecore_file_readlink(ere->src);
if (!file) file = (char*)ere->src;
if (!file) file = (char *)ere->src;
f = ecore_file_file_get(file);
if (!f) return;
@ -10843,7 +10850,7 @@ _e_fm2_file_delete_yes_cb(void *data, E_Dialog *dialog)
Eina_List *sel, *l;
E_Fm2_Icon_Info *ici;
Eina_Bool memerr = EINA_FALSE;
ic = data;
ic->dialog = NULL;
@ -11373,6 +11380,7 @@ e_fm2_optimal_size_calc(Evas_Object *obj, int maxw, int maxh, int *w, int *h)
*w = MIN(minw, maxw);
*h = MIN(minh * eina_list_count(sd->icons), (unsigned int)maxh);
return;
default:
break;
}
@ -11583,3 +11591,4 @@ error:
e_object_del(E_OBJECT(menu));
sd->menu = NULL;
}

View File

@ -118,11 +118,11 @@ main(int argc, char *argv[])
{
Eina_Bool quit_option = EINA_FALSE;
Ecore_Getopt_Value values[] = {
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_NONE
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_NONE
};
int args;
@ -158,9 +158,10 @@ main(int argc, char *argv[])
ecore_main_loop_begin();
edbus_connection_unref(conn);
end:
end:
edbus_shutdown();
ecore_file_shutdown();
ecore_shutdown();
return retval;
}

View File

@ -50,8 +50,7 @@ _e_fm2_device_volume_setup(E_Volume *v)
/* Choose the label */
if ((v->label) && (v->label[0]))
{}
else if ((v->partition_label) && (v->partition_label[0]))
{}else if ((v->partition_label) && (v->partition_label[0]))
snprintf(label, sizeof(label) - 1, "%s", v->partition_label);
else if (((v->storage->vendor) && (v->storage->vendor[0])) &&
((v->storage->model) && (v->storage->model[0])))
@ -190,8 +189,8 @@ EAPI void
e_fm2_device_storage_del(E_Storage *s)
{
// printf("STO- %s\n", s->udi);
_e_stores = eina_list_remove(_e_stores, s);
_e_fm_shared_device_storage_free(s);
_e_stores = eina_list_remove(_e_stores, s);
_e_fm_shared_device_storage_free(s);
}
EAPI E_Storage *
@ -208,7 +207,6 @@ e_fm2_device_storage_find(const char *udi)
return NULL;
}
EAPI void
e_fm2_device_volume_add(E_Volume *v)
{
@ -280,7 +278,6 @@ e_fm2_device_volume_add(E_Volume *v)
}
if (v->storage) _e_fm2_device_volume_setup(v);
}
EAPI void
@ -305,7 +302,7 @@ e_fm2_device_volume_del(E_Volume *v)
{
E_Fm2_Device_Mount_Op *mop;
mop = (E_Fm2_Device_Mount_Op*)v->mount_ops;
mop = (E_Fm2_Device_Mount_Op *)v->mount_ops;
v->mount_ops = eina_inlist_remove(v->mount_ops, v->mount_ops);
_e_fm2_device_mount_op_free(mop);
}
@ -419,7 +416,7 @@ e_fm2_device_volume_mountpoint_get(E_Volume *v)
if (v->mount_point)
{
// printf("GET MOUNTPOINT = %s\n", v->mount_point);
return eina_stringshare_add(v->mount_point);
return eina_stringshare_add(v->mount_point);
}
else if (v->efm_mode != EFM_MODE_USING_HAL_MOUNT)
return NULL;
@ -450,7 +447,7 @@ e_fm2_device_mount_op_add(E_Fm2_Mount *m, char *args, size_t size, size_t length
}
EAPI void
e_fm2_device_mount_add(E_Volume *v,
e_fm2_device_mount_add(E_Volume *v,
const char *mountpoint)
{
v->mounted = EINA_TRUE;
@ -512,11 +509,11 @@ e_fm2_device_mount_find(const char *path)
EAPI E_Fm2_Mount *
e_fm2_device_mount(E_Volume *v,
Ecore_Cb mount_ok,
Ecore_Cb mount_fail,
Ecore_Cb unmount_ok,
Ecore_Cb unmount_fail,
void *data)
Ecore_Cb mount_ok,
Ecore_Cb mount_fail,
Ecore_Cb unmount_ok,
Ecore_Cb unmount_fail,
void *data)
{
E_Fm2_Mount *m;
@ -535,7 +532,6 @@ e_fm2_device_mount(E_Volume *v,
v->mounts = eina_list_prepend(v->mounts, m);
if (!v->mounted)
{
//printf("BEGIN MOUNT %p '%s'\n", m, v->mount_point);
@ -671,14 +667,14 @@ _e_fm2_device_check_desktop_icons_list_cb(const char *name, const char *path, vo
Eina_List *l;
char *file;
if (path[0] != '|') return; // not e17 link
if (path[0] != '|') return; // not e17 link
if (!eina_str_has_extension(name, ".desktop")) return;
snprintf(buf, sizeof(buf), "%s/%s", path, name);
if (ecore_file_size(buf) > 200) return; // unlikely that we're going to write a desktop file this long
if (ecore_file_size(buf) > 200) return; // unlikely that we're going to write a desktop file this long
e_user_dir_snprintf(buf2, sizeof(buf2), "fileman/favorites/%s", name);
if (!ecore_file_exists(buf2)) return;
EINA_LIST_FOREACH(data, l, file)
if (!strcmp(file, buf)) return; // valid link
if (!strcmp(file, buf)) return; // valid link
ecore_file_unlink(buf);
ecore_file_unlink(buf2);
@ -791,3 +787,4 @@ e_fm2_device_volume_list_get(void)
{
return _e_vols;
}

View File

@ -137,7 +137,8 @@ e_fm_mime_icon_cache_flush(void)
}
/* create (allocate), set properties, and return a new mime handler */
EAPI E_Fm2_Mime_Handler *e_fm2_mime_handler_new(const char *label, const char *icon_group, void (*action_func) (void *data, Evas_Object *obj, const char *path), void *action_data, int (test_func) (void *data, Evas_Object *obj, const char *path), void *test_data)
EAPI E_Fm2_Mime_Handler *
e_fm2_mime_handler_new(const char *label, const char *icon_group, void (*action_func)(void *data, Evas_Object *obj, const char *path), void *action_data, int(test_func) (void *data, Evas_Object * obj, const char *path), void *test_data)
{
E_Fm2_Mime_Handler *handler;

View File

@ -142,17 +142,17 @@ struct _E_Fm_Op_Task
size_t done;
} dst;
int started, finished;
unsigned int passes;
off_t pos;
int started, finished;
unsigned int passes;
off_t pos;
void *data;
void *data;
E_Fm_Op_Task *parent;
E_Fm_Op_Type type;
E_Fm_Op_Type overwrite;
E_Fm_Op_Type type;
E_Fm_Op_Type overwrite;
Eina_List *link;
Eina_List *link;
};
struct _E_Fm_Op_Copy_Data
@ -252,7 +252,7 @@ main(int argc, char **argv)
memcpy(p3, name, name_len + 1);
if ((type == E_FM_OP_SYMLINK) &&
(symlink(argv[i], buf) == 0))
(symlink(argv[i], buf) == 0))
{
done++;
_e_fm_op_update_progress_report_simple
@ -363,7 +363,7 @@ skip_arg:
if (i) goto quit;
if ((type == E_FM_OP_SYMLINK) &&
(symlink(argv[2], argv[3]) == 0))
(symlink(argv[2], argv[3]) == 0))
{
_e_fm_op_update_progress_report_simple(100, argv[2], argv[3]);
goto quit;
@ -1705,30 +1705,30 @@ _e_fm_op_destroy_atom(E_Fm_Op_Task *task)
if (fd == -1)
{
E_FM_OP_DEBUG("Secure remove: %s\n", task->src.name);
struct stat st2;
E_FM_OP_DEBUG("Secure remove: %s\n", task->src.name);
struct stat st2;
if (!S_ISREG(task->src.st.st_mode))
goto finish;
if (!S_ISREG(task->src.st.st_mode))
goto finish;
if (task->src.st.st_nlink > 1)
goto finish;
if (task->src.st.st_nlink > 1)
goto finish;
if ((fd = open(task->src.name, O_WRONLY|O_NOFOLLOW, 0)) == -1)
goto finish;
if ((fd = open(task->src.name, O_WRONLY | O_NOFOLLOW, 0)) == -1)
goto finish;
if (fstat(fd, &st2) == -1)
goto finish;
if (fstat(fd, &st2) == -1)
goto finish;
if (st2.st_dev != task->src.st.st_dev ||
st2.st_ino != task->src.st.st_ino ||
st2.st_mode != task->src.st.st_mode)
goto finish;
if (st2.st_dev != task->src.st.st_dev ||
st2.st_ino != task->src.st.st_ino ||
st2.st_mode != task->src.st.st_mode)
goto finish;
if ((buf = malloc(READBUFSIZE)) == NULL)
goto finish;
if ((buf = malloc(READBUFSIZE)) == NULL)
goto finish;
task->src.st.st_size = st2.st_size;
task->src.st.st_size = st2.st_size;
}
if (task->pos + READBUFSIZE > task->src.st.st_size) sz = task->src.st.st_size - task->pos;
@ -1742,20 +1742,20 @@ _e_fm_op_destroy_atom(E_Fm_Op_Task *task)
task->pos += sz;
_e_fm_op_update_progress_report_simple(lround((double) ((task->pos + (task->passes * task->src.st.st_size)) /
(double)(task->src.st.st_size * NB_PASS)) * 100.),
_e_fm_op_update_progress_report_simple(lround((double)((task->pos + (task->passes * task->src.st.st_size)) /
(double)(task->src.st.st_size * NB_PASS)) * 100.),
"/dev/urandom", task->src.name);
if (task->pos >= task->src.st.st_size)
{
task->passes++;
task->passes++;
if (task->passes == NB_PASS)
goto finish;
if (lseek(fd, 0, SEEK_SET) == -1)
goto finish;
if (task->passes == NB_PASS)
goto finish;
if (lseek(fd, 0, SEEK_SET) == -1)
goto finish;
task->pos = 0;
task->pos = 0;
}
return 1;
@ -1791,7 +1791,7 @@ _e_fm_op_random_char(char *buf, size_t len)
{
size_t i;
static int sranded = 0;
if (!sranded)
{
srand((unsigned int)time(NULL));
@ -1803,3 +1803,4 @@ _e_fm_op_random_char(char *buf, size_t len)
buf[i] = (rand() % 256) + 'a';
}
}

View File

@ -555,8 +555,8 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
if (cfdata->fi->broken_link)
{
ob = e_widget_label_add(evas, _("This link is broken."));
e_widget_frametable_object_append(ot, ob, 0, 1, 1, 1, 1, 0, 1, 0);
ob = e_widget_label_add(evas, _("This link is broken."));
e_widget_frametable_object_append(ot, ob, 0, 1, 1, 1, 1, 0, 1, 0);
}
e_widget_table_object_append(o, ot, 1, 1, 2, 1, 1, 1, 1, 1);

View File

@ -83,7 +83,6 @@ _e_fm_shared_codec_storage_decode(void *s, int size)
return eet_data_descriptor_decode(_e_storage_edd, s, size);
}
void *
_e_fm_shared_codec_volume_encode(E_Volume *v, int *size)
{
@ -117,3 +116,4 @@ _e_storage_volume_edd_shutdown(void)
_e_storage_edd = NULL;
}
}

View File

@ -25,14 +25,13 @@ _e_fm_shared_device_storage_free(E_Storage *s)
free(s);
}
void
_e_fm_shared_device_volume_free(E_Volume *v)
{
if (v->storage)
{
v->storage->volumes = eina_list_remove(v->storage->volumes, v);
v->storage = NULL;
v->storage = NULL;
}
if (v->udi) eina_stringshare_del(v->udi);
if (v->uuid) eina_stringshare_del(v->uuid);
@ -45,3 +44,4 @@ _e_fm_shared_device_volume_free(E_Volume *v)
eina_stringshare_del(v->dbus_path);
free(v);
}

View File

@ -6,7 +6,7 @@
#define E_LAYOUT_ITEM_DRAG_RESIST_LEVEL 10
static void _e_gadcon_event_populate(E_Gadcon *gc);
static Eina_Bool _e_gadcon_client_populate(E_Gadcon *gc, const E_Gadcon_Client_Class *cc, E_Config_Gadcon_Client *cf_gcc);
static Eina_Bool _e_gadcon_client_populate(E_Gadcon *gc, const E_Gadcon_Client_Class *cc, E_Config_Gadcon_Client *cf_gcc);
static void _e_gadcon_client_unpopulate(E_Gadcon_Client *gcc);
static void _e_gadcon_free(E_Gadcon *gc);
static void _e_gadcon_client_free(E_Gadcon_Client *gcc);
@ -251,11 +251,11 @@ e_gadcon_shutdown(void)
return 1;
}
/**
/**
* Registers a new gadget class in e
*
* @param cc version of gadcon, name and callbacks to use
* for handling creation and destroying a gadget
* @param cc version of gadcon, name and callbacks to use
* for handling creation and destroying a gadget
*/
EAPI void
e_gadcon_provider_register(const E_Gadcon_Client_Class *cc)
@ -287,7 +287,7 @@ e_gadcon_provider_register(const E_Gadcon_Client_Class *cc)
}
}
/**
/**
* unregisters a gadget class in e
*
* @param cc the gadget class that was used to register the gadget
@ -639,7 +639,7 @@ e_gadcon_orient(E_Gadcon *gc, E_Gadcon_Orient orient)
E_OBJECT_CHECK(gc);
E_OBJECT_IF_NOT_TYPE(gc, E_GADCON_DUMMY_TYPE)
E_OBJECT_TYPE_CHECK(gc, E_GADCON_TYPE);
E_OBJECT_TYPE_CHECK(gc, E_GADCON_TYPE);
if (gc->orient == orient) return;
gc->orient = orient;
if (gc->dummy) return;
@ -905,16 +905,17 @@ e_gadcon_client_config_new(E_Gadcon *gc, const char *name)
evas_object_geometry_get(gc->o_container, NULL, NULL, &w, &h);
switch (gc->orient)
{
case E_GADCON_ORIENT_VERT:
case E_GADCON_ORIENT_LEFT:
case E_GADCON_ORIENT_RIGHT:
case E_GADCON_ORIENT_CORNER_LT:
case E_GADCON_ORIENT_CORNER_RT:
case E_GADCON_ORIENT_CORNER_LB:
case E_GADCON_ORIENT_CORNER_RB:
case E_GADCON_ORIENT_VERT:
case E_GADCON_ORIENT_LEFT:
case E_GADCON_ORIENT_RIGHT:
case E_GADCON_ORIENT_CORNER_LT:
case E_GADCON_ORIENT_CORNER_RT:
case E_GADCON_ORIENT_CORNER_LB:
case E_GADCON_ORIENT_CORNER_RB:
cf_gcc->geom.res = h;
break;
default:
default:
cf_gcc->geom.res = w;
}
}
@ -1005,12 +1006,12 @@ e_gadcon_drag_finished_cb(E_Drag *drag, int dropped)
e_object_unref(E_OBJECT(gcc));
}
/**
* Creates a new gadget
/**
* Creates a new gadget
*
* @param gc gadcon pointer
* @param name to use for gadget
* @param id assigned to gadget
* @param id assigned to gadget
* @param style to for gadget
* @param base_obj the evas object that will show up in the shelf or gadget module
* @return returns pointer to created gadget, on failure returns null
@ -1570,7 +1571,7 @@ _e_gadcon_client_populate(E_Gadcon *gc, const E_Gadcon_Client_Class *cc, E_Confi
if (!gcc->autoscroll_set)
e_gadcon_client_autoscroll_set(gcc, cf_gcc->autoscroll);
// e_gadcon_client_resizable_set(gcc, cf_gcc->resizable);
// e_gadcon_client_resizable_set(gcc, cf_gcc->resizable);
if (gcc->client_class->func.orient)
gcc->client_class->func.orient(gcc, gc->orient);
@ -1721,7 +1722,7 @@ e_gadcon_client_util_menu_items_append(E_Gadcon_Client *gcc, E_Menu *menu_gadget
mi = e_menu_item_new(menu_gadget);
e_menu_item_separator_set(mi, 1);
}
/*
/*
if (!gcc->o_control)
{
mi = e_menu_item_new(menu_gadget);
@ -1759,7 +1760,7 @@ e_gadcon_client_util_menu_items_append(E_Gadcon_Client *gcc, E_Menu *menu_gadget
if (!e_util_strcmp(gcc->style, E_GADCON_CLIENT_STYLE_PLAIN))
e_menu_item_toggle_set(mi, 1);
else if ((!gcc->style) &&
(!e_util_strcmp(gcc->client_class->default_style, E_GADCON_CLIENT_STYLE_PLAIN)))
(!e_util_strcmp(gcc->client_class->default_style, E_GADCON_CLIENT_STYLE_PLAIN)))
e_menu_item_toggle_set(mi, 1);
e_menu_item_disabled_set(mi, mi->toggle);
e_menu_item_callback_set(mi, _e_gadcon_client_cb_menu_style_plain, gcc);
@ -1772,7 +1773,7 @@ e_gadcon_client_util_menu_items_append(E_Gadcon_Client *gcc, E_Menu *menu_gadget
if (!e_util_strcmp(gcc->style, E_GADCON_CLIENT_STYLE_INSET))
e_menu_item_toggle_set(mi, 1);
else if ((!gcc->style) &&
(!e_util_strcmp(gcc->client_class->default_style, E_GADCON_CLIENT_STYLE_INSET)))
(!e_util_strcmp(gcc->client_class->default_style, E_GADCON_CLIENT_STYLE_INSET)))
e_menu_item_toggle_set(mi, 1);
e_menu_item_disabled_set(mi, mi->toggle);
e_menu_item_callback_set(mi, _e_gadcon_client_cb_menu_style_inset, gcc);
@ -1836,11 +1837,11 @@ e_gadcon_client_util_menu_attach(E_Gadcon_Client *gcc)
if (gcc->o_frame)
{
evas_object_event_callback_del_full(gcc->o_frame, EVAS_CALLBACK_MOUSE_DOWN,
_e_gadcon_client_cb_mouse_down, gcc);
_e_gadcon_client_cb_mouse_down, gcc);
evas_object_event_callback_del_full(gcc->o_frame, EVAS_CALLBACK_MOUSE_UP,
_e_gadcon_client_cb_mouse_up, gcc);
_e_gadcon_client_cb_mouse_up, gcc);
evas_object_event_callback_del_full(gcc->o_frame, EVAS_CALLBACK_MOUSE_MOVE,
_e_gadcon_client_cb_mouse_move, gcc);
_e_gadcon_client_cb_mouse_move, gcc);
evas_object_event_callback_add(gcc->o_frame, EVAS_CALLBACK_MOUSE_DOWN,
_e_gadcon_client_cb_mouse_down, gcc);
evas_object_event_callback_add(gcc->o_frame, EVAS_CALLBACK_MOUSE_UP,
@ -1851,11 +1852,11 @@ e_gadcon_client_util_menu_attach(E_Gadcon_Client *gcc)
else if (gcc->o_base)
{
evas_object_event_callback_del_full(gcc->o_base, EVAS_CALLBACK_MOUSE_DOWN,
_e_gadcon_client_cb_mouse_down, gcc);
_e_gadcon_client_cb_mouse_down, gcc);
evas_object_event_callback_del_full(gcc->o_base, EVAS_CALLBACK_MOUSE_UP,
_e_gadcon_client_cb_mouse_up, gcc);
_e_gadcon_client_cb_mouse_up, gcc);
evas_object_event_callback_del_full(gcc->o_base, EVAS_CALLBACK_MOUSE_MOVE,
_e_gadcon_client_cb_mouse_move, gcc);
_e_gadcon_client_cb_mouse_move, gcc);
evas_object_event_callback_add(gcc->o_base, EVAS_CALLBACK_MOUSE_DOWN,
_e_gadcon_client_cb_mouse_down, gcc);
evas_object_event_callback_add(gcc->o_base, EVAS_CALLBACK_MOUSE_UP,
@ -2278,8 +2279,8 @@ _e_gadcon_client_drag_begin(E_Gadcon_Client *gcc, int x, int y)
ecore_x_pointer_xy_get(gcc->gadcon->zone->container->win, &x, &y);
gcc->drag.drag = drag = e_drag_new(gcc->gadcon->zone->container, x, y,
drag_types, 1, gcc, -1, NULL,
e_gadcon_drag_finished_cb);
drag_types, 1, gcc, -1, NULL,
e_gadcon_drag_finished_cb);
if (!drag) return;
o = gcc->client_class->func.icon((E_Gadcon_Client_Class *)gcc->client_class,
@ -2849,7 +2850,7 @@ _e_gadcon_cb_dnd_enter(void *data, const char *type __UNUSED__, void *event)
gc = data;
//INF("DND ENTER");
gcc = gc->drag_gcc;
if (!gcc) return; // dnd from efm or something
if (!gcc) return; // dnd from efm or something
if ((!gcc->hidden) && (gcc->gadcon == gc))
{
if (gc->dnd_enter_cb) gc->dnd_enter_cb(gc, gc->drag_gcc);
@ -2883,10 +2884,10 @@ _e_gadcon_cb_dnd_enter(void *data, const char *type __UNUSED__, void *event)
if (!cc) break;
if (!gcc->style)
gc->new_gcc = cc->func.init(gc, gcc->name, gcc->cf->id,
cc->default_style);
cc->default_style);
else
gc->new_gcc = cc->func.init(gc, gcc->name, gcc->cf->id,
gcc->style);
gcc->style);
if (!gc->new_gcc) break;
gc->new_gcc->cf = gcc->cf;
@ -2931,7 +2932,7 @@ _e_gadcon_cb_dnd_enter(void *data, const char *type __UNUSED__, void *event)
}
if ((!gc->new_gcc->config.size_w) && (!gc->new_gcc->config.size_h))
{
evas_object_geometry_get(gcc->o_frame ?: gcc->o_base, NULL, NULL, &gw, &gh);
evas_object_geometry_get(gcc->o_frame ? : gcc->o_base, NULL, NULL, &gw, &gh);
gc->new_gcc->config.size_w = (double)gw / (double)w;
gc->new_gcc->config.size_h = (double)gh / (double)h;
}
@ -2970,7 +2971,7 @@ _e_gadcon_cb_dnd_move(void *data, const char *type __UNUSED__, void *event)
ev = event;
gc = data;
//INF("DND (%d,%d)", ev->x, ev->y);
gcc = gc->new_gcc ?: gc->drag_gcc;
gcc = gc->new_gcc ? : gc->drag_gcc;
if (!gcc) return;
if (gcc->state_info.resist > 0)
@ -2992,7 +2993,8 @@ _e_gadcon_cb_dnd_move(void *data, const char *type __UNUSED__, void *event)
gcc->config.pos_x = (double)ev->x / (double)w;
gcc->config.pos_y = (double)ev->y / (double)h;
if (gcc->o_frame) evas_object_move(gcc->o_frame, ev->x, ev->y);
else if (gcc->o_base) evas_object_move(gcc->o_base, ev->x, ev->y);
else if (gcc->o_base)
evas_object_move(gcc->o_base, ev->x, ev->y);
}
else
evas_object_geometry_get(gc->o_container, &dx, &dy, NULL, NULL);
@ -3309,8 +3311,8 @@ _e_gadcon_client_cb_menu_pre(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi)
{
// e menu ASSUMES... EXPECTS the icon to be an.... e_icon!
// if it's not, spankies for whoever wrote the icon callback!
mi->icon_object =
gcc->client_class->func.icon((E_Gadcon_Client_Class *)gcc->client_class,
mi->icon_object =
gcc->client_class->func.icon((E_Gadcon_Client_Class *)gcc->client_class,
mi->menu->evas);
}
else
@ -5619,9 +5621,9 @@ _e_gadcon_provider_populate_job(void *data __UNUSED__)
}
x++;
}
if (freeze) e_gadcon_layout_thaw(gc->o_container);
if (x && _modules_loaded) _e_gadcon_event_populate(gc);
}
if (freeze) e_gadcon_layout_thaw(gc->o_container);
if (x && _modules_loaded) _e_gadcon_event_populate(gc);
}
//out:
#ifndef E17_RELEASE_BUILD
if (first)
@ -5726,3 +5728,4 @@ _e_gadcon_location_change(E_Gadcon_Client *gcc, E_Gadcon_Location *src, E_Gadcon
src->gadget_remove.func(src->gadget_remove.data, gcc);
return 1;
}

View File

@ -1,7 +1,7 @@
#include "e.h"
#define TEXT_PRESS_KEY_SEQUENCE _("Please press key sequence,<br><br>" \
"or <hilight>Escape</hilight> to abort.")
#define TEXT_PRESS_KEY_SEQUENCE _("Please press key sequence,<br><br>" \
"or <hilight>Escape</hilight> to abort.")
#define TEXT_PRESS_MOUSE_BINIDING_SEQUENCE _("Please hold any modifier you want<br>" \
"and press any button on your mouse,<br> or roll a" \
" wheel, to assign mouse binding." \
@ -22,11 +22,11 @@ _e_grab_dialog_key_handler(void *data, int type __UNUSED__, Ecore_Event_Key *ev)
e_object_del(data);
return ECORE_CALLBACK_RENEW;
}
if (eg->key)
{
e_object_ref(data);
eg->key(eg->data ?: eg, type, ev);
eg->key(eg->data ? : eg, type, ev);
e_object_unref(data);
}
return ECORE_CALLBACK_RENEW;
@ -42,7 +42,7 @@ _e_grab_dialog_wheel_handler(void *data, int type __UNUSED__, Ecore_Event_Mouse_
if (eg->wheel)
{
e_object_ref(data);
eg->wheel(eg->data ?: eg, type, ev);
eg->wheel(eg->data ? : eg, type, ev);
e_object_unref(data);
}
return ECORE_CALLBACK_RENEW;
@ -58,7 +58,7 @@ _e_grab_dialog_mouse_handler(void *data, int type __UNUSED__, Ecore_Event_Mouse_
if (eg->mouse)
{
e_object_ref(data);
eg->mouse(eg->data ?: eg, type, ev);
eg->mouse(eg->data ? : eg, type, ev);
e_object_unref(data);
}
else
@ -149,7 +149,7 @@ e_grab_dialog_show(E_Win *parent, Eina_Bool is_mouse, Ecore_Event_Handler_Cb key
eg->key = key;
eg->mouse = mouse;
eg->wheel = wheel;
eg->data = (void*)data;
eg->data = (void *)data;
eh = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, (Ecore_Event_Handler_Cb)_e_grab_dialog_key_handler, eg);
eg->handlers = eina_list_append(eg->handlers, eh);
@ -166,3 +166,4 @@ e_grab_dialog_show(E_Win *parent, Eina_Bool is_mouse, Ecore_Event_Handler_Cb key
e_dialog_parent_set(eg->dia, parent);
return eg;
}

View File

@ -2,8 +2,8 @@
/* local subsystem functions */
static Eina_Bool _e_grabinput_focus_check(void *data);
static void _e_grabinput_focus_do(Ecore_X_Window win, E_Focus_Method method);
static void _e_grabinput_focus(Ecore_X_Window win, E_Focus_Method method);
static void _e_grabinput_focus_do(Ecore_X_Window win, E_Focus_Method method);
static void _e_grabinput_focus(Ecore_X_Window win, E_Focus_Method method);
/* local subsystem globals */
static Ecore_X_Window grab_mouse_win = 0;
@ -154,16 +154,20 @@ _e_grabinput_focus_do(Ecore_X_Window win, E_Focus_Method method)
{
case E_FOCUS_METHOD_NO_INPUT:
break;
case E_FOCUS_METHOD_LOCALLY_ACTIVE:
ecore_x_window_focus_at_time(win, ecore_x_current_time_get());
ecore_x_icccm_take_focus_send(win, ecore_x_current_time_get());
break;
case E_FOCUS_METHOD_GLOBALLY_ACTIVE:
ecore_x_icccm_take_focus_send(win, ecore_x_current_time_get());
break;
case E_FOCUS_METHOD_PASSIVE:
ecore_x_window_focus_at_time(win, ecore_x_current_time_get());
break;
default:
break;
}
@ -180,3 +184,4 @@ _e_grabinput_focus(Ecore_X_Window win, E_Focus_Method method)
if (focus_fix_timer) ecore_timer_del(focus_fix_timer);
focus_fix_timer = ecore_timer_add(0.2, _e_grabinput_focus_check, NULL);
}

View File

@ -218,47 +218,47 @@ EINTERN void
e_hints_manager_init(E_Manager *man)
{
/* Set desktop count, desktop names and workarea */
int i = 0, num = 0;
unsigned int *areas = NULL;
Eina_List *cl;
E_Container *c;
Ecore_X_Window *vroots = NULL;
/* FIXME: Desktop names not yet implemented */
int i = 0, num = 0;
unsigned int *areas = NULL;
Eina_List *cl;
E_Container *c;
Ecore_X_Window *vroots = NULL;
/* FIXME: Desktop names not yet implemented */
/* char **names; */
e_hints_e16_comms_pretend(man);
e_hints_e16_comms_pretend(man);
num = eina_list_count(man->containers);
num = eina_list_count(man->containers);
vroots = calloc(num, sizeof(Ecore_X_Window));
if (!vroots) return;
vroots = calloc(num, sizeof(Ecore_X_Window));
if (!vroots) return;
/* names = calloc(num, sizeof(char *));*/
areas = calloc(4 * num, sizeof(unsigned int));
if (!areas)
{
free(vroots);
return;
}
areas = calloc(4 * num, sizeof(unsigned int));
if (!areas)
{
free(vroots);
return;
}
EINA_LIST_FOREACH(man->containers, cl, c)
{
areas[4 * i] = c->x;
areas[4 * i + 1] = c->y;
areas[4 * i + 2] = c->w;
areas[4 * i + 3] = c->h;
vroots[i++] = c->win;
}
EINA_LIST_FOREACH(man->containers, cl, c)
{
areas[4 * i] = c->x;
areas[4 * i + 1] = c->y;
areas[4 * i + 2] = c->w;
areas[4 * i + 3] = c->h;
vroots[i++] = c->win;
}
#if 0
ecore_x_netwm_desk_count_set(man->root, num);
/* No need for workarea without desktops */
ecore_x_netwm_desk_workareas_set(man->root, num, areas);
ecore_x_netwm_desk_count_set(man->root, num);
/* No need for workarea without desktops */
ecore_x_netwm_desk_workareas_set(man->root, num, areas);
#endif
free(vroots);
free(areas);
free(vroots);
free(areas);
}
/* FIXME, this should set the list in map order, not stack order */
@ -395,7 +395,7 @@ e_hints_client_stacking_set(void)
EAPI void
e_hints_active_window_set(E_Manager *man,
E_Border *bd)
E_Border *bd)
{
E_OBJECT_CHECK(man);
if (bd)
@ -466,13 +466,13 @@ e_hints_window_init(E_Border *bd)
else
{
/* Update netwm desktop with current desktop */
e_hints_window_desktop_set(bd);
e_hints_window_desktop_set(bd);
}
}
else
{
/* Update netwm desktop with current desktop */
e_hints_window_desktop_set(bd);
e_hints_window_desktop_set(bd);
}
#endif
@ -692,8 +692,8 @@ e_hints_window_type_get(E_Border *bd)
}
EAPI void
e_hints_window_state_update(E_Border *bd,
Ecore_X_Window_State state,
e_hints_window_state_update(E_Border *bd,
Ecore_X_Window_State state,
Ecore_X_Window_State_Action action)
{
switch (state)
@ -1175,7 +1175,7 @@ _e_hints_process_wakeup(E_Border *bd)
if (bd->client.netwm.pid <= 0) return;
#ifdef SIGCHLD
kill(bd->client.netwm.pid, SIGCHLD);
#endif
#endif
}
EAPI void
@ -1231,7 +1231,7 @@ e_hints_window_hidden_set(E_Border *bd)
EAPI void
e_hints_window_shaded_set(E_Border *bd,
int on)
int on)
{
if ((!bd->client.netwm.state.shaded) && (on))
{
@ -1249,7 +1249,7 @@ e_hints_window_shaded_set(E_Border *bd,
}
EAPI void
e_hints_window_shade_direction_set(E_Border *bd,
e_hints_window_shade_direction_set(E_Border *bd,
E_Direction dir)
{
ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_SHADE_DIRECTION, &dir, 1);
@ -1310,8 +1310,8 @@ e_hints_window_size_get(E_Border *bd)
EAPI void
e_hints_window_maximized_set(E_Border *bd,
int horizontal,
int vertical)
int horizontal,
int vertical)
{
if ((horizontal) && (!bd->client.netwm.state.maximized_h))
{
@ -1341,7 +1341,7 @@ e_hints_window_maximized_set(E_Border *bd,
EAPI void
e_hints_window_fullscreen_set(E_Border *bd,
int on)
int on)
{
if ((!bd->client.netwm.state.fullscreen) && (on))
{
@ -1359,7 +1359,7 @@ e_hints_window_fullscreen_set(E_Border *bd,
EAPI void
e_hints_window_sticky_set(E_Border *bd,
int on)
int on)
{
if ((!bd->client.netwm.state.sticky) && (on))
{
@ -1376,7 +1376,7 @@ e_hints_window_sticky_set(E_Border *bd,
}
EAPI void
e_hints_window_stacking_set(E_Border *bd,
e_hints_window_stacking_set(E_Border *bd,
E_Stacking stacking)
{
if (bd->client.netwm.state.stacking == stacking) return;
@ -1391,21 +1391,21 @@ e_hints_window_desktop_set(E_Border *bd)
/* This function is only called when really changing desktop,
* so just set the property and don't care about the roundtrip.
*/
unsigned int deskpos[2];
unsigned int deskpos[2];
/* if valgrind complains here it is complaining bd->client.netwm.desktop
* is an uninitialised variable - but it isn't. it can't be. its part of
* a calloc()'d struct and thus has to have been set to 0. hell even
* e_border.c explicitly sets it to 0 on creation of the border object.
*/
deskpos[0] = bd->desk->x;
deskpos[1] = bd->desk->y;
ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_DESK, deskpos, 2);
/* if valgrind complains here it is complaining bd->client.netwm.desktop
* is an uninitialised variable - but it isn't. it can't be. its part of
* a calloc()'d struct and thus has to have been set to 0. hell even
* e_border.c explicitly sets it to 0 on creation of the border object.
*/
deskpos[0] = bd->desk->x;
deskpos[1] = bd->desk->y;
ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_DESK, deskpos, 2);
#if 0
ecore_x_netwm_desktop_set(bd->client.win, current);
ecore_x_netwm_desktop_set(bd->client.win, current);
#endif
bd->client.netwm.desktop = (bd->desk->y * bd->zone->desk_x_count) + bd->desk->x;
bd->client.netwm.desktop = (bd->desk->y * bd->zone->desk_x_count) + bd->desk->x;
}
EAPI void
@ -1466,7 +1466,7 @@ e_hints_window_virtual_keyboard_state_get(E_Border *bd)
{
Ecore_X_Atom atom = 0;
bd->client.vkbd.state = ecore_x_e_virtual_keyboard_state_get(bd->client.win);
if (ecore_x_window_prop_atom_get(bd->client.win,
if (ecore_x_window_prop_atom_get(bd->client.win,
ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE,
&atom, 1))
bd->client.vkbd.have_property = 1;
@ -1514,3 +1514,4 @@ e_hints_scale_update(void)
free(roots);
}
}

View File

@ -26,7 +26,7 @@ struct _E_Smart_Data
unsigned char preload : 1;
unsigned char loading : 1;
unsigned char animated : 1;
Eina_Bool edje : 1;
Eina_Bool edje : 1;
};
struct _Cache_Item
@ -480,7 +480,7 @@ e_icon_object_set(Evas_Object *obj, Evas_Object *o)
if (!(sd = evas_object_smart_data_get(obj))) return;
str = evas_object_type_get(o);
if ((!str) || strcmp(str, "image"))
CRI(EINA_COLOR_RED"******************\ntrying to set an image object of type '%s'! this is not what you want!\n******************\n"EINA_COLOR_RESET, str);
CRI(EINA_COLOR_RED "******************\ntrying to set an image object of type '%s'! this is not what you want!\n******************\n"EINA_COLOR_RESET, str);
if (sd->timer) ecore_timer_del(sd->timer);
sd->timer = NULL;
@ -512,8 +512,8 @@ e_icon_file_get(const Evas_Object *obj, const char **file, const char **group)
#ifdef USE_ICON_CACHE
if (sd->file)
{
if (file) *file = sd->file;
return EINA_TRUE;
if (file) *file = sd->file;
return EINA_TRUE;
}
#endif
if (sd->edje)
@ -905,7 +905,7 @@ _e_icon_fdo_reload(void *data)
sd->size = MAX(sd->w, sd->h);
path = efreet_icon_path_find(e_config->icon_theme, sd->fdo, sd->size);
if (!path) return EINA_FALSE;
/* smart code here */
evas_object_image_load_size_set(sd->obj, sd->size, sd->size);
evas_object_image_file_set(sd->obj, path, NULL);
@ -933,7 +933,7 @@ _e_icon_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
}
if ((!sd->edje) && ((sd->loading && sd->preload) ||
(!sd->loading && !sd->preload))
(!sd->loading && !sd->preload))
&& !sd->animated)
{
evas_object_image_scale_hint_set(sd->obj,

View File

@ -12,7 +12,7 @@ struct _E_Smart_Data
Eina_List *items;
Eina_List *selected_items;
int selected;
const char *theme;
const char *theme;
unsigned char selector : 1;
unsigned char multi_select : 1;
unsigned char on_hold : 1;
@ -25,34 +25,34 @@ struct _E_Smart_Data
} typebuf;
};
static void _e_smart_init(void);
static void _e_smart_add(Evas_Object *obj);
static void _e_smart_del(Evas_Object *obj);
static void _e_smart_show(Evas_Object *obj);
static void _e_smart_hide(Evas_Object *obj);
static void _e_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
static void _e_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
static void _e_smart_color_set(Evas_Object *obj, int r, int g, int b, int a);
static void _e_smart_clip_set(Evas_Object *obj, Evas_Object *clip);
static void _e_smart_clip_unset(Evas_Object *obj);
static void _e_smart_reconfigure(E_Smart_Data *sd);
static void _e_smart_event_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_info);
static void _e_smart_event_mouse_up(void *data, Evas *evas, Evas_Object *obj, void *event_info);
static void _e_smart_event_key_down(void *data, Evas *evas, Evas_Object *obj, void *event_info);
static void _e_smart_init(void);
static void _e_smart_add(Evas_Object *obj);
static void _e_smart_del(Evas_Object *obj);
static void _e_smart_show(Evas_Object *obj);
static void _e_smart_hide(Evas_Object *obj);
static void _e_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
static void _e_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
static void _e_smart_color_set(Evas_Object *obj, int r, int g, int b, int a);
static void _e_smart_clip_set(Evas_Object *obj, Evas_Object *clip);
static void _e_smart_clip_unset(Evas_Object *obj);
static void _e_smart_reconfigure(E_Smart_Data *sd);
static void _e_smart_event_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_info);
static void _e_smart_event_mouse_up(void *data, Evas *evas, Evas_Object *obj, void *event_info);
static void _e_smart_event_key_down(void *data, Evas *evas, Evas_Object *obj, void *event_info);
static void _e_typebuf_add(Evas_Object *obj, const char *s);
static void _e_typebuf_match(Evas_Object *obj);
static Eina_Bool _e_typebuf_timer_cb(void *data);
static void _e_typebuf_timer_update(Evas_Object *obj);
static void _e_typebuf_timer_delete(Evas_Object *obj);
static void _e_typebuf_clean(Evas_Object *obj);
static void _e_typebuf_add(Evas_Object *obj, const char *s);
static void _e_typebuf_match(Evas_Object *obj);
static Eina_Bool _e_typebuf_timer_cb(void *data);
static void _e_typebuf_timer_update(Evas_Object *obj);
static void _e_typebuf_timer_delete(Evas_Object *obj);
static void _e_typebuf_clean(Evas_Object *obj);
static E_Ilist_Item *_e_ilist_item_new(E_Smart_Data *sd, Evas_Object *icon, Evas_Object *end, const char *label, int header, Ecore_End_Cb func, Ecore_End_Cb func_hilight, void *data, void *data2);
static void _e_ilist_item_theme_set(E_Ilist_Item *si, Eina_Bool custom, Eina_Bool header, Eina_Bool even);
static void _e_ilist_widget_hack_cb(E_Smart_Data *sd, Evas_Object *obj __UNUSED__, Evas_Object *scr);
static void _e_ilist_item_theme_set(E_Ilist_Item *si, Eina_Bool custom, Eina_Bool header, Eina_Bool even);
static void _e_ilist_widget_hack_cb(E_Smart_Data *sd, Evas_Object *obj __UNUSED__, Evas_Object *scr);
static void _item_select(E_Ilist_Item *si);
static void _item_unselect(E_Ilist_Item *si);
static void _item_select(E_Ilist_Item *si);
static void _item_unselect(E_Ilist_Item *si);
static Evas_Smart *_e_smart = NULL;
@ -1392,3 +1392,4 @@ _e_ilist_item_new(E_Smart_Data *sd, Evas_Object *icon, Evas_Object *end, const c
_e_smart_event_mouse_up, si);
return si;
}

View File

@ -27,94 +27,95 @@ main(int argc, char **argv)
/* handle some command-line parameters */
for (i = 1; i < argc; i++)
{
if ((!strcmp(argv[i], "-set-name")) && (i < (argc - 1)))
{
i++;
set_name = argv[i];
if ((!strcmp(argv[i], "-set-name")) && (i < (argc - 1)))
{
i++;
set_name = argv[i];
valid_args++;
write_ops++;
}
else if ((!strcmp(argv[i], "-set-exe")) && (i < (argc - 1)))
{
i++;
set_exe = argv[i];
}
else if ((!strcmp(argv[i], "-set-exe")) && (i < (argc - 1)))
{
i++;
set_exe = argv[i];
valid_args++;
write_ops++;
}
else if ((!strcmp(argv[i], "-set-setup")) && (i < (argc - 1)))
{
i++;
set_setup = argv[i];
}
else if ((!strcmp(argv[i], "-set-setup")) && (i < (argc - 1)))
{
i++;
set_setup = argv[i];
valid_args++;
write_ops++;
}
else if ((!strcmp(argv[i], "-set-gtk-im-module")) && (i < (argc - 1)))
{
i++;
set_gtk_im_module = argv[i];
}
else if ((!strcmp(argv[i], "-set-gtk-im-module")) && (i < (argc - 1)))
{
i++;
set_gtk_im_module = argv[i];
valid_args++;
write_ops++;
}
else if ((!strcmp(argv[i], "-set-qt-im-module")) && (i < (argc - 1)))
{
i++;
set_qt_im_module = argv[i];
}
else if ((!strcmp(argv[i], "-set-qt-im-module")) && (i < (argc - 1)))
{
i++;
set_qt_im_module = argv[i];
valid_args++;
write_ops++;
}
else if ((!strcmp(argv[i], "-set-xmodifiers")) && (i < (argc - 1)))
{
i++;
set_xmodifiers = argv[i];
}
else if ((!strcmp(argv[i], "-set-xmodifiers")) && (i < (argc - 1)))
{
i++;
set_xmodifiers = argv[i];
valid_args++;
write_ops++;
}
else if ((!strcmp(argv[i], "-set-ecore-imf-module")) && (i < (argc - 1)))
{
i++;
set_ecore_imf_module = argv[i];
}
else if ((!strcmp(argv[i], "-set-ecore-imf-module")) && (i < (argc - 1)))
{
i++;
set_ecore_imf_module = argv[i];
valid_args++;
write_ops++;
}
else if ((!strcmp(argv[i], "-h")) ||
(!strcmp(argv[i], "-help")) ||
(!strcmp(argv[i], "--h")) ||
(!strcmp(argv[i], "--help")))
{
_e_help();
exit(0);
}
else if ((!strcmp(argv[i], "-list")))
{
list = 1;
valid_args++;
}
else
file = argv[i];
}
else if ((!strcmp(argv[i], "-h")) ||
(!strcmp(argv[i], "-help")) ||
(!strcmp(argv[i], "--h")) ||
(!strcmp(argv[i], "--help")))
{
_e_help();
exit(0);
}
else if ((!strcmp(argv[i], "-list")))
{
list = 1;
valid_args++;
}
else
file = argv[i];
}
if (!file)
{
printf("ERROR: no file specified!\n");
_e_help();
exit(0);
printf("ERROR: no file specified!\n");
_e_help();
exit(0);
}
if (valid_args == 0) {
if (valid_args == 0)
{
printf("ERROR: no valid arguments!\n");
_e_help();
exit(0);
}
}
eet_init();
e_intl_data_init();
if (write_ops != 0 && ecore_file_exists(file))
{
ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
}
else if (write_ops != 0)
{
ef = eet_open(file, EET_FILE_MODE_WRITE);
ef = eet_open(file, EET_FILE_MODE_WRITE);
}
else
{
@ -123,9 +124,9 @@ main(int argc, char **argv)
if (!ef)
{
printf("ERROR: cannot open file %s for READ/WRITE (%i:%s)\n",
printf("ERROR: cannot open file %s for READ/WRITE (%i:%s)\n",
file, errno, strerror(errno));
return -1;
return -1;
}
/* If File Exists, Try to read imc */
@ -134,51 +135,49 @@ main(int argc, char **argv)
/* else create new imc */
if (write_ops != 0)
{
write_imc = calloc(sizeof(E_Input_Method_Config), 1);
write_imc->version = E_INTL_INPUT_METHOD_CONFIG_VERSION;
if (read_imc)
{
write_imc->e_im_name = read_imc->e_im_name;
write_imc->gtk_im_module = read_imc->gtk_im_module;
write_imc->qt_im_module = read_imc->qt_im_module;
write_imc->xmodifiers = read_imc->xmodifiers;
write_imc->ecore_imf_module = read_imc->ecore_imf_module;
write_imc->e_im_exec = read_imc->e_im_exec;
write_imc->e_im_setup_exec = read_imc->e_im_setup_exec;
}
write_imc = calloc(sizeof(E_Input_Method_Config), 1);
write_imc->version = E_INTL_INPUT_METHOD_CONFIG_VERSION;
if (read_imc)
{
write_imc->e_im_name = read_imc->e_im_name;
write_imc->gtk_im_module = read_imc->gtk_im_module;
write_imc->qt_im_module = read_imc->qt_im_module;
write_imc->xmodifiers = read_imc->xmodifiers;
write_imc->ecore_imf_module = read_imc->ecore_imf_module;
write_imc->e_im_exec = read_imc->e_im_exec;
write_imc->e_im_setup_exec = read_imc->e_im_setup_exec;
}
if (set_name)
write_imc->e_im_name = set_name;
if (set_gtk_im_module)
write_imc->gtk_im_module = set_gtk_im_module;
if (set_qt_im_module)
write_imc->qt_im_module = set_qt_im_module;
if (set_xmodifiers)
write_imc->xmodifiers = set_xmodifiers;
if (set_ecore_imf_module)
write_imc->ecore_imf_module = set_ecore_imf_module;
if (set_exe)
write_imc->e_im_exec = set_exe;
if (set_setup)
write_imc->e_im_setup_exec = set_setup;
if (set_name)
write_imc->e_im_name = set_name;
if (set_gtk_im_module)
write_imc->gtk_im_module = set_gtk_im_module;
if (set_qt_im_module)
write_imc->qt_im_module = set_qt_im_module;
if (set_xmodifiers)
write_imc->xmodifiers = set_xmodifiers;
if (set_ecore_imf_module)
write_imc->ecore_imf_module = set_ecore_imf_module;
if (set_exe)
write_imc->e_im_exec = set_exe;
if (set_setup)
write_imc->e_im_setup_exec = set_setup;
/* write imc to file */
e_intl_input_method_config_write(ef, write_imc);
/* write imc to file */
e_intl_input_method_config_write(ef, write_imc);
}
if (list)
{
printf("Config File List:\n");
printf("Config Version: %i\n", read_imc->version);
printf("Config Name: %s\n", read_imc->e_im_name);
printf("Command Line: %s\n", read_imc->e_im_exec);
printf("Setup Line: %s\n", read_imc->e_im_setup_exec);
printf("gtk_im_module: %s\n", read_imc->gtk_im_module);
printf("qt_im_module: %s\n", read_imc->qt_im_module);
printf("xmodifiers: %s\n", read_imc->xmodifiers);
printf("ecore_imf_module: %s\n", read_imc->ecore_imf_module);
printf("Config File List:\n");
printf("Config Version: %i\n", read_imc->version);
printf("Config Name: %s\n", read_imc->e_im_name);
printf("Command Line: %s\n", read_imc->e_im_exec);
printf("Setup Line: %s\n", read_imc->e_im_setup_exec);
printf("gtk_im_module: %s\n", read_imc->gtk_im_module);
printf("qt_im_module: %s\n", read_imc->qt_im_module);
printf("xmodifiers: %s\n", read_imc->xmodifiers);
printf("ecore_imf_module: %s\n", read_imc->ecore_imf_module);
}
e_intl_input_method_config_free(read_imc);
@ -194,13 +193,14 @@ static void
_e_help(void)
{
printf("OPTIONS:\n"
" -set-name NAME Set the application name\n"
" -set-exe EXE Set the application execute line\n"
" -set-setup EXE Set the setup application execute line\n"
" -set-gtk-im-module Set the gtk_im_module env var\n"
" -set-qt-im-module Set the qt_im_module env var\n"
" -set-ecore-imf-module Set the ecore_imf_module env var\n"
" -set-xmodifiers Set the xmodifiers env var\n"
" -list List Contents of Input Method Config file\n"
);
" -set-name NAME Set the application name\n"
" -set-exe EXE Set the application execute line\n"
" -set-setup EXE Set the setup application execute line\n"
" -set-gtk-im-module Set the gtk_im_module env var\n"
" -set-qt-im-module Set the qt_im_module env var\n"
" -set-ecore-imf-module Set the ecore_imf_module env var\n"
" -set-xmodifiers Set the xmodifiers env var\n"
" -list List Contents of Input Method Config file\n"
);
}

View File

@ -10,7 +10,6 @@
static void _import_edj_gen(E_Import_Config_Dialog *import);
static Eina_Bool _import_cb_edje_cc_exit(void *data, int type, void *event);
static void
_import_edj_gen(E_Import_Config_Dialog *import)
{
@ -301,7 +300,7 @@ _import_cb_edje_cc_exit(void *data, __UNUSED__ int type, void *event)
if (r && import->ok)
{
e_object_ref(E_OBJECT(import));
import->ok((void*)import->fdest, import);
import->ok((void *)import->fdest, import);
e_object_del(E_OBJECT(import));
e_object_unref(E_OBJECT(import));
}
@ -369,7 +368,7 @@ _import_cb_ok(void *data, E_Dialog *dia __UNUSED__)
if (r)
{
e_object_ref(E_OBJECT(import));
if (import->ok) import->ok((void*)buf, import);
if (import->ok) import->ok((void *)buf, import);
e_object_del(E_OBJECT(import));
e_object_unref(E_OBJECT(import));
}
@ -378,16 +377,16 @@ _import_cb_ok(void *data, E_Dialog *dia __UNUSED__)
}
static void
_e_import_config_preview_size_get(int size, int w, int h,int *tw, int *th)
_e_import_config_preview_size_get(int size, int w, int h, int *tw, int *th)
{
if (size <= 0) return;
double aspect;
aspect = (double)w/h;
if(w > size)
aspect = (double)w / h;
if (w > size)
{
w = size;
h = (w/aspect);
h = (w / aspect);
}
*tw = w;
*th = h;
@ -430,8 +429,8 @@ _e_import_config_dialog_win_del(E_Win *win)
e_object_del(E_OBJECT(import));
e_object_unref(E_OBJECT(import));
}
///////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
EAPI E_Import_Config_Dialog *
e_import_config_dialog_show(E_Container *con, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel)
@ -451,7 +450,7 @@ e_import_config_dialog_show(E_Container *con, const char *path, Ecore_End_Cb ok,
dia = e_dialog_new(con, "E", "_import_config_dialog");
if (!dia) return NULL;
e_dialog_resizable_set(dia, 1);
e_dialog_title_set(dia, _("Import Settings..."));
dia->data = import;
import->dia = dia;
@ -471,14 +470,14 @@ e_import_config_dialog_show(E_Container *con, const char *path, Ecore_End_Cb ok,
ot = e_widget_list_add(evas, 0, 0);
frame = e_widget_frametable_add(evas, _("Preview"), 1);
preview = evas_object_image_add(evas);
evas_object_image_file_set(preview, path, NULL);
evas_object_image_size_get(preview,&w, &h);
evas_object_image_size_get(preview, &w, &h);
evas_object_del(preview);
_e_import_config_preview_size_get(320, w, h, &tw, &th);
preview = e_widget_preview_add(evas, tw, th);
e_widget_preview_thumb_set(preview, path, NULL, tw, th);
@ -498,7 +497,7 @@ e_import_config_dialog_show(E_Container *con, const char *path, Ecore_End_Cb ok,
"enlightenment/wallpaper_tile",
24, 24, IMPORT_TILE, rg);
e_widget_frametable_object_append(of, ord, 2, 0, 1, 1, 1, 0, 1, 0);
ord = e_widget_radio_icon_add(evas, _("Within"),
"enlightenment/wallpaper_scale_aspect_in",
24, 24, IMPORT_SCALE_ASPECT_IN, rg);
@ -542,3 +541,4 @@ e_import_config_dialog_show(E_Container *con, const char *path, Ecore_End_Cb ok,
return import;
}

View File

@ -99,7 +99,6 @@ _fsel_cb_ok(void *data, E_Dialog *dia __UNUSED__)
_fsel_cb_close(id, NULL);
}
static void
_e_import_dia_del(void *data)
{
@ -148,7 +147,7 @@ e_import_dialog_show(E_Container *con, const char *dev, const char *path, Ecore_
dia = e_dialog_new(con, "E", "_import_fsel_dialog");
if (!dia) return NULL;
e_dialog_resizable_set(dia, 1);
dia->data = id;
id->dia = dia;
id->ok = ok, id->cancel = cancel;
@ -158,8 +157,8 @@ e_import_dialog_show(E_Container *con, const char *dev, const char *path, Ecore_
evas = e_win_evas_get(dia->win);
e_dialog_title_set(dia, _("Select a Picture..."));
fdev = dev ?: e_config->wallpaper_import_last_dev;
fpath = path ?: e_config->wallpaper_import_last_path;
fdev = dev ? : e_config->wallpaper_import_last_dev;
fpath = path ? : e_config->wallpaper_import_last_path;
if (fdev)
snprintf(buf, sizeof(buf), "%s/%s",
fdev, path);
@ -170,7 +169,7 @@ e_import_dialog_show(E_Container *con, const char *dev, const char *path, Ecore_
if (!ecore_file_exists(rpath))
fpath = "/";
else
fpath = path ?: e_config->wallpaper_import_last_path;
fpath = path ? : e_config->wallpaper_import_last_path;
free(rpath);
if ((!fdev) && (!fpath))
@ -183,7 +182,7 @@ e_import_dialog_show(E_Container *con, const char *dev, const char *path, Ecore_
/* if we ever use the second param in _fsel_cb_ok() then we will have to create a second function
* for this callback, but as of now it's okay
*/
ofm = e_widget_fsel_add(evas, fdev, fpath, NULL, NULL, (void*)_fsel_cb_ok, id,
ofm = e_widget_fsel_add(evas, fdev, fpath, NULL, NULL, (void *)_fsel_cb_ok, id,
NULL, NULL, 1);
e_widget_fsel_window_object_set(ofm, E_OBJECT(dia->win));
id->fsel_obj = ofm;
@ -199,3 +198,4 @@ e_import_dialog_show(E_Container *con, const char *dev, const char *path, Ecore_
return id;
}

View File

@ -356,7 +356,6 @@ _advanced_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_D
ob = e_widget_check_add(evas, _("Remember these Locks"), &(cfdata->lock.remember));
e_widget_list_object_append(ol, ob, 1, 1, 0.5);
return ol;
}

View File

@ -62,7 +62,7 @@ e_int_border_menu_hook_add(E_Border_Menu_Hook_Cb cb, const void *data)
if (!h) return NULL;
h->cb = cb;
h->data = (void*)data;
h->data = (void *)data;
menu_hooks = eina_list_append(menu_hooks, h);
return h;
}

View File

@ -403,25 +403,25 @@ _bd_go(void *data, void *data2)
e_dialog_show(dia);
}
#define STR_ENTRY(label, x, y, val) \
{ \
Evas_Coord mw, mh; \
ob = e_widget_label_add(evas, label); \
if (!cfdata->val) e_widget_disabled_set(ob, 1); \
e_widget_table_object_append(o, ob, x, y, 1, 1, 1, 1, 0, 1); \
ob = e_widget_entry_add(evas, &(cfdata->val), NULL, NULL, NULL); \
e_widget_entry_readonly_set(ob, 1); \
e_widget_size_min_get(ob, &mw, &mh); \
e_widget_size_min_set(ob, 160, mh); \
e_widget_table_object_append(o, ob, x + 1, y, 1, 1, 1, 0, 1, 0); \
#define STR_ENTRY(label, x, y, val) \
{ \
Evas_Coord mw, mh; \
ob = e_widget_label_add(evas, label); \
if (!cfdata->val) e_widget_disabled_set(ob, 1); \
e_widget_table_object_append(o, ob, x, y, 1, 1, 1, 1, 0, 1); \
ob = e_widget_entry_add(evas, & (cfdata->val), NULL, NULL, NULL); \
e_widget_entry_readonly_set(ob, 1); \
e_widget_size_min_get(ob, &mw, &mh); \
e_widget_size_min_set(ob, 160, mh); \
e_widget_table_object_append(o, ob, x + 1, y, 1, 1, 1, 0, 1, 0); \
}
#define CHK_ENTRY(label, x, y, val) \
{ \
ob = e_widget_label_add(evas, label); \
e_widget_table_object_append(o, ob, x, y, 1, 1, 1, 1, 0, 1); \
ob = e_widget_check_add(evas, "", & (cfdata->val)); \
e_widget_disabled_set(ob, 1); \
e_widget_table_object_append(o, ob, x + 1, y, 1, 1, 1, 0, 1, 0); \
#define CHK_ENTRY(label, x, y, val) \
{ \
ob = e_widget_label_add(evas, label); \
e_widget_table_object_append(o, ob, x, y, 1, 1, 1, 1, 0, 1); \
ob = e_widget_check_add(evas, "", & (cfdata->val)); \
e_widget_disabled_set(ob, 1); \
e_widget_table_object_append(o, ob, x + 1, y, 1, 1, 1, 0, 1, 0); \
}
static Evas_Object *

View File

@ -14,11 +14,11 @@ static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E
#define MODE_LOCKS E_REMEMBER_APPLY_LOCKS
#define MODE_GEOMETRY_LOCKS E_REMEMBER_APPLY_POS | E_REMEMBER_APPLY_SIZE | E_REMEMBER_APPLY_LOCKS
#define MODE_ALL E_REMEMBER_APPLY_POS | E_REMEMBER_APPLY_SIZE | E_REMEMBER_APPLY_LAYER | \
E_REMEMBER_APPLY_LOCKS | E_REMEMBER_APPLY_BORDER | E_REMEMBER_APPLY_STICKY | \
E_REMEMBER_APPLY_DESKTOP | E_REMEMBER_APPLY_SHADE | E_REMEMBER_APPLY_ZONE | \
E_REMEMBER_APPLY_SKIP_WINLIST | E_REMEMBER_APPLY_SKIP_PAGER | \
E_REMEMBER_APPLY_SKIP_TASKBAR | E_REMEMBER_APPLY_FULLSCREEN | E_REMEMBER_APPLY_ICON_PREF | \
E_REMEMBER_APPLY_OFFER_RESISTANCE
E_REMEMBER_APPLY_LOCKS | E_REMEMBER_APPLY_BORDER | E_REMEMBER_APPLY_STICKY | \
E_REMEMBER_APPLY_DESKTOP | E_REMEMBER_APPLY_SHADE | E_REMEMBER_APPLY_ZONE | \
E_REMEMBER_APPLY_SKIP_WINLIST | E_REMEMBER_APPLY_SKIP_PAGER | \
E_REMEMBER_APPLY_SKIP_TASKBAR | E_REMEMBER_APPLY_FULLSCREEN | E_REMEMBER_APPLY_ICON_PREF | \
E_REMEMBER_APPLY_OFFER_RESISTANCE
struct _E_Config_Dialog_Data
{
E_Border *border;
@ -687,7 +687,6 @@ _advanced_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_D
e_widget_list_object_append(of, ob, 1, 0, 0.5);
e_widget_toolbook_page_append(o, NULL, _("Identifiers"), of, 1, 1, 1, 1, 0.5, 0.0);
of = e_widget_table_add(evas, 0);
ob = e_widget_check_add(evas, _("Position"),
&(cfdata->remember.apply_pos));

View File

@ -24,16 +24,16 @@ struct _CFType
struct _E_Config_Dialog_Data
{
Evas *evas;
Evas_Object *l_modules;
Evas_Object *o_toolbar;
Evas_Object *b_load, *b_unload;
Evas_Object *o_desc;
Eina_List *types;
Evas *evas;
Evas_Object *l_modules;
Evas_Object *o_toolbar;
Evas_Object *b_load, *b_unload;
Evas_Object *o_desc;
Eina_List *types;
Ecore_Event_Handler *module_update;
struct
{
Eina_List *loaded, *unloaded;
Eina_List *loaded, *unloaded;
} selected;
};
@ -176,7 +176,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
Evas_Object *of, *ol;
e_dialog_resizable_set(cfd->dia, 1);
cfdata->evas = e_win_evas_get(cfd->dia->win);
of = e_widget_table_add(evas, 0);
@ -617,7 +617,6 @@ _widget_list_selection_changed(void *data, Evas_Object *obj __UNUSED__)
e_widget_disabled_set(cfdata->b_unload, 1);
}
}
if ((cfm) && (eina_list_count(cfdata->selected.loaded) + eina_list_count(cfdata->selected.unloaded) == 1))
description = cfm->comment;

View File

@ -8,43 +8,43 @@ struct _CFGadget
struct _E_Config_Dialog_Data
{
E_Gadcon *gc;
E_Gadcon_Site site;
E_Gadcon *gc;
E_Gadcon_Site site;
const char *sel;
const char *sel;
struct
{
Evas_Object *o_list;
} basic, advanced;
Evas_Object *class_list;
Evas_Object *o_add, *o_del;
Evas_Object *class_list;
Evas_Object *o_add, *o_del;
Ecore_Event_Handler *gcc_add;
Ecore_Event_Handler *gcc_del;
Ecore_Event_Handler *cc_del;
Ecore_Event_Handler *cc_add;
Ecore_Timer *load_timer;
Eina_Hash *gadget_hash;
Ecore_Timer *load_timer;
Eina_Hash *gadget_hash;
};
/* local function prototypes */
static void *_create_data(E_Config_Dialog *cfd);
static void _fill_data(E_Config_Dialog_Data *cfdata);
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static Eina_Bool _free_gadgets(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__);
static void *_create_data(E_Config_Dialog *cfd);
static void _fill_data(E_Config_Dialog_Data *cfdata);
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static Eina_Bool _free_gadgets(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__);
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
static Evas_Object *_advanced_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
static Eina_Bool _cb_load_timer(void *data);
static void _fill_list(E_Config_Dialog_Data *cfdata);
static void _fill_list_advanced(E_Config_Dialog_Data *cfdata, Eina_Bool, Eina_Bool);
static void _cb_list_selected(void *data);
static void _cb_add(void *data, void *data2 __UNUSED__);
static void _cb_del(void *data, void *data2 __UNUSED__);
static CFGadget *_search_hash(E_Config_Dialog_Data *cfdata, const char *name);
static Eina_Bool _cb_cc_add(E_Config_Dialog_Data *cfdata, int type, E_Event_Gadcon_Client_Class_Add *ev);
static Eina_Bool _cb_cc_del(E_Config_Dialog_Data *cfdata, int type, E_Event_Gadcon_Client_Class_Add *ev);
static Eina_Bool _cb_gcc_add(E_Config_Dialog_Data *cfdata, int type, E_Event_Gadcon_Client_Add *ev);
static Eina_Bool _cb_gcc_del(E_Config_Dialog_Data *cfdata, int type, E_Event_Gadcon_Client_Add *ev);
static Eina_Bool _cb_load_timer(void *data);
static void _fill_list(E_Config_Dialog_Data *cfdata);
static void _fill_list_advanced(E_Config_Dialog_Data *cfdata, Eina_Bool, Eina_Bool);
static void _cb_list_selected(void *data);
static void _cb_add(void *data, void *data2 __UNUSED__);
static void _cb_del(void *data, void *data2 __UNUSED__);
static CFGadget *_search_hash(E_Config_Dialog_Data *cfdata, const char *name);
static Eina_Bool _cb_cc_add(E_Config_Dialog_Data *cfdata, int type, E_Event_Gadcon_Client_Class_Add *ev);
static Eina_Bool _cb_cc_del(E_Config_Dialog_Data *cfdata, int type, E_Event_Gadcon_Client_Class_Add *ev);
static Eina_Bool _cb_gcc_add(E_Config_Dialog_Data *cfdata, int type, E_Event_Gadcon_Client_Add *ev);
static Eina_Bool _cb_gcc_del(E_Config_Dialog_Data *cfdata, int type, E_Event_Gadcon_Client_Add *ev);
/* local function prototypes */
static void
@ -91,14 +91,14 @@ _create_data(E_Config_Dialog *cfd)
_fill_data(cfdata);
cfdata->gcc_add = ecore_event_handler_add(E_EVENT_GADCON_CLIENT_ADD,
(Ecore_Event_Handler_Cb)_cb_gcc_add, cfdata);
(Ecore_Event_Handler_Cb)_cb_gcc_add, cfdata);
cfdata->gcc_del = ecore_event_handler_add(E_EVENT_GADCON_CLIENT_DEL,
(Ecore_Event_Handler_Cb)_cb_gcc_del, cfdata);
(Ecore_Event_Handler_Cb)_cb_gcc_del, cfdata);
cfdata->cc_add = ecore_event_handler_add(E_EVENT_GADCON_CLIENT_CLASS_ADD,
(Ecore_Event_Handler_Cb)_cb_cc_add, cfdata);
(Ecore_Event_Handler_Cb)_cb_cc_add, cfdata);
cfdata->cc_del = ecore_event_handler_add(E_EVENT_GADCON_CLIENT_CLASS_DEL,
(Ecore_Event_Handler_Cb)_cb_cc_del, cfdata);
(Ecore_Event_Handler_Cb)_cb_cc_del, cfdata);
return cfdata;
}
@ -487,7 +487,7 @@ _cb_del_advanced(void *data, void *data2 __UNUSED__)
E_Config_Gadcon_Client *cf_gcc;
const Eina_List *l, *sel, *ll, *lll, *llll;
E_Ilist_Item *ili;
int x = 0, refresh = 0;;
int x = 0, refresh = 0;
sel = e_widget_ilist_items_get(cfdata->advanced.o_list);
EINA_LIST_FOREACH_SAFE(sel, ll, lll, ili)
@ -686,13 +686,13 @@ _advanced_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
////////////////////////////////////////////////////////////
ot = e_widget_table_add(evas, EINA_FALSE);
cfdata->advanced.o_list =
cfdata->advanced.o_list =
e_widget_ilist_add(evas, (24 * e_scale), (24 * e_scale), &cfdata->sel);
e_widget_ilist_multi_select_set(cfdata->advanced.o_list, EINA_TRUE);
e_widget_size_min_get(cfdata->advanced.o_list, &mw, NULL);
if (mw < (200 * e_scale)) mw = (200 * e_scale);
e_widget_size_min_set(cfdata->advanced.o_list, mw, (160 * e_scale));
e_widget_table_object_append(ot, cfdata->advanced.o_list,
e_widget_table_object_append(ot, cfdata->advanced.o_list,
0, 0, 1, 1, 1, 1, 1, 1);
cfdata->o_del =
@ -706,12 +706,12 @@ _advanced_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
// ot = e_widget_list_add(evas, 0, 0);
ot = e_widget_table_add(evas, EINA_FALSE);
cfdata->class_list =
cfdata->class_list =
e_widget_ilist_add(evas, (24 * e_scale), (24 * e_scale), NULL);
e_widget_size_min_get(cfdata->class_list, &mw, NULL);
if (mw < (200 * e_scale)) mw = (200 * e_scale);
e_widget_size_min_set(cfdata->class_list, mw, (160 * e_scale));
e_widget_table_object_append(ot, cfdata->class_list,
e_widget_table_object_append(ot, cfdata->class_list,
0, 0, 1, 1, 1, 1, 1, 1);
// e_widget_list_object_append(ot, cfdata->class_list, 1, 1, 0.5);
@ -797,3 +797,4 @@ e_int_gadcon_config_hook(E_Gadcon *gc, const char *name, E_Gadcon_Site site)
{
_create_dialog(gc, name, site);
}

View File

@ -61,7 +61,7 @@ static void _e_int_menus_desktops_free_hook(void *obj);
static void _e_int_menus_desk_item_cb(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_int_menus_item_label_set(Efreet_Menu *entry, E_Menu_Item *mi);
static Efreet_Menu *_e_int_menus_apps_thread_new(E_Menu *m, const char *dir);
static Eina_Bool _e_int_menus_efreet_desktop_cache_update(void *d, int type, void *e);
static Eina_Bool _e_int_menus_efreet_desktop_cache_update(void *d, int type, void *e);
//static void _e_int_menus_apps_drag_finished(E_Drag *drag, int dropped __UNUSED__);
/* local subsystem globals */
@ -118,6 +118,7 @@ _TEST(void *d __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__)
e_dialog_content_set(dia, o_list, 100, 300);
e_dialog_show(dia);
}
#endif
/* externally accessible functions */
@ -849,7 +850,7 @@ _e_int_menus_apps_free_hook2(void *obj)
m = obj;
// XXX TODO: this should be automatic in e_menu, just get references right!
// XXX TODO: fix references and remove me!!!
EINA_LIST_FOREACH_SAFE (m->items, l, l_next, mi)
EINA_LIST_FOREACH_SAFE(m->items, l, l_next, mi)
{
if (mi->submenu)
e_object_del(E_OBJECT(mi->submenu));
@ -958,7 +959,7 @@ _e_int_menus_desktops_free_hook(void *obj)
m = obj;
// XXX TODO: this should be automatic in e_menu, just get references right!
// XXX TODO: fix references and remove me!!!
EINA_LIST_FOREACH_SAFE (m->items, l, l_next, mi)
EINA_LIST_FOREACH_SAFE(m->items, l, l_next, mi)
{
if (mi->submenu)
e_object_del(E_OBJECT(mi->submenu));
@ -1392,8 +1393,8 @@ _e_int_menus_clients_title_abbrv(const char *title)
memset(&abbv, 0, sizeof(abbv));
/* Advance to the end of the first half of the string. */
len = 0;
for (len2 = (max_len / 2) ; len2 ; len2--)
eina_unicode_utf8_get_next(title, &len);
for (len2 = (max_len / 2); len2; len2--)
eina_unicode_utf8_get_next(title, &len);
strncat(abbvptr, title, len);
abbvptr += len;
@ -1404,8 +1405,8 @@ _e_int_menus_clients_title_abbrv(const char *title)
/* Advance to the start of the second half of the string */
len = str_len = strlen(title);
for (len2 = (max_len / 2) ; len2 ; len2--)
eina_unicode_utf8_get_prev(title, &len);
for (len2 = (max_len / 2); len2; len2--)
eina_unicode_utf8_get_prev(title, &len);
strncpy(abbvptr, title + len, str_len);
abbvptr[str_len] = '\0';

View File

@ -2,31 +2,31 @@
struct _E_Config_Dialog_Data
{
E_Shelf *es;
E_Shelf *es;
E_Config_Shelf *escfg;
Evas_Object *o_autohide, *o_desk_list;
Eina_List *autohide_list, *desk_list;
Evas_Object *o_autohide, *o_desk_list;
Eina_List *autohide_list, *desk_list;
int layer, overlap;
int orient, fit_along;
int size;
const char *style;
int autohide, autohide_action;
double hide_timeout, hide_duration;
int desk_show_mode;
Eina_List *handlers;
int layer, overlap;
int orient, fit_along;
int size;
const char *style;
int autohide, autohide_action;
double hide_timeout, hide_duration;
int desk_show_mode;
Eina_List *handlers;
};
/* local function prototypes */
static void *_create_data(E_Config_Dialog *cfd);
static void _fill_data(E_Config_Dialog_Data *cfdata);
static void _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
static void *_create_data(E_Config_Dialog *cfd);
static void _fill_data(E_Config_Dialog_Data *cfdata);
static void _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
static Evas_Object *_basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata);
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static void _fill_styles(E_Config_Dialog_Data *cfdata, Evas_Object *obj);
static void _cb_autohide_change(void *data, Evas_Object *obj __UNUSED__);
static void _fill_desks(E_Config_Dialog_Data *cfdata);
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static void _fill_styles(E_Config_Dialog_Data *cfdata, Evas_Object *obj);
static void _cb_autohide_change(void *data, Evas_Object *obj __UNUSED__);
static void _fill_desks(E_Config_Dialog_Data *cfdata);
EAPI void
e_int_shelf_config(E_Shelf *es)
@ -447,7 +447,7 @@ _fill_styles(E_Config_Dialog_Data *cfdata, Evas_Object *obj)
e_livethumb_thumb_set(thumb, ow);
e_widget_ilist_append(obj, thumb, style, NULL, NULL, style);
if (!strcmp(cfdata->style, style))
e_widget_ilist_selected_set(obj, n);
e_widget_ilist_selected_set(obj, n);
n++;
}
@ -516,3 +516,4 @@ _fill_desks(E_Config_Dialog_Data *cfdata)
edje_thaw();
evas_event_thaw(evas);
}

View File

@ -1,16 +1,16 @@
#include "e.h"
/* local function protos */
static void *_create_data (E_Config_Dialog *cfd);
static void _fill_data (E_Config_Dialog_Data *cfdata);
static void _free_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static int _basic_apply (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 *_create_data(E_Config_Dialog *cfd);
static void _fill_data(E_Config_Dialog_Data *cfdata);
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static int _basic_apply(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);
struct _E_Config_Dialog_Data
{
E_Toolbar *tbar;
int orient;
int orient;
};
EAPI void
@ -28,8 +28,8 @@ e_int_toolbar_config(E_Toolbar *tbar)
v->basic.apply_cfdata = _basic_apply;
v->basic.create_widgets = _basic_create;
cfd = e_config_dialog_new(con, _("Toolbar Settings"), "E",
"_toolbar_config_dialog", "preferences-desktop-shelf",
0, v, tbar);
"_toolbar_config_dialog", "preferences-desktop-shelf",
0, v, tbar);
tbar->cfg_dlg = cfd;
}
@ -81,21 +81,22 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data
ot = e_widget_frametable_add(evas, _("Layout"), 1);
rg = e_widget_radio_group_new(&(cfdata->orient));
/*
ow = e_widget_radio_icon_add(evas, NULL, "preferences-position-left",
24, 24, E_GADCON_ORIENT_LEFT, rg);
e_widget_frametable_object_append(ot, ow, 0, 1, 1, 1, 1, 1, 1, 1);
*/
ow = e_widget_radio_icon_add(evas, NULL, "preferences-position-left",
24, 24, E_GADCON_ORIENT_LEFT, rg);
e_widget_frametable_object_append(ot, ow, 0, 1, 1, 1, 1, 1, 1, 1);
*/
ow = e_widget_radio_icon_add(evas, NULL, "preferences-position-top",
24, 24, E_GADCON_ORIENT_TOP, rg);
24, 24, E_GADCON_ORIENT_TOP, rg);
e_widget_frametable_object_append(ot, ow, 0, 0, 1, 1, 1, 1, 1, 1);
/*
ow = e_widget_radio_icon_add(evas, NULL, "preferences-position-right",
24, 24, E_GADCON_ORIENT_RIGHT, rg);
e_widget_frametable_object_append(ot, ow, 2, 1, 1, 1, 1, 1, 1, 1);
*/
ow = e_widget_radio_icon_add(evas, NULL, "preferences-position-right",
24, 24, E_GADCON_ORIENT_RIGHT, rg);
e_widget_frametable_object_append(ot, ow, 2, 1, 1, 1, 1, 1, 1, 1);
*/
ow = e_widget_radio_icon_add(evas, NULL, "preferences-position-bottom",
24, 24, E_GADCON_ORIENT_BOTTOM, rg);
24, 24, E_GADCON_ORIENT_BOTTOM, rg);
e_widget_frametable_object_append(ot, ow, 0, 1, 1, 1, 1, 1, 1, 1);
e_widget_list_object_append(o, ot, 1, 1, 0.5);
return o;
}

View File

@ -1054,3 +1054,4 @@ _e_intl_imc_dir_scan(const char *dir)
}
return imcs;
}

View File

@ -30,7 +30,6 @@ e_intl_data_shutdown(void)
return 1;
}
/* Get the input method configuration from the file */
EAPI E_Input_Method_Config *
e_intl_input_method_config_read(Eet_File *imc_file)
@ -40,7 +39,7 @@ e_intl_input_method_config_read(Eet_File *imc_file)
imc = NULL;
if (imc_file)
{
imc = (E_Input_Method_Config *) eet_data_read(imc_file, _e_intl_input_method_config_edd, "imc");
imc = (E_Input_Method_Config *)eet_data_read(imc_file, _e_intl_input_method_config_edd, "imc");
}
return imc;
}
@ -53,7 +52,7 @@ e_intl_input_method_config_write(Eet_File *imc_file, E_Input_Method_Config *imc)
if (imc_file)
{
ok = eet_data_write(imc_file, _e_intl_input_method_config_edd, "imc", imc, 0);
ok = eet_data_write(imc_file, _e_intl_input_method_config_edd, "imc", imc, 0);
}
return ok;
}
@ -63,13 +62,14 @@ e_intl_input_method_config_free(E_Input_Method_Config *imc)
{
if (imc)
{
if (imc->e_im_name) eina_stringshare_del(imc->e_im_name);
if (imc->gtk_im_module) eina_stringshare_del(imc->gtk_im_module);
if (imc->qt_im_module) eina_stringshare_del(imc->qt_im_module);
if (imc->xmodifiers) eina_stringshare_del(imc->xmodifiers);
if (imc->ecore_imf_module) eina_stringshare_del(imc->ecore_imf_module);
if (imc->e_im_exec) eina_stringshare_del(imc->e_im_exec);
if (imc->e_im_setup_exec) eina_stringshare_del(imc->e_im_setup_exec);
E_FREE(imc);
if (imc->e_im_name) eina_stringshare_del(imc->e_im_name);
if (imc->gtk_im_module) eina_stringshare_del(imc->gtk_im_module);
if (imc->qt_im_module) eina_stringshare_del(imc->qt_im_module);
if (imc->xmodifiers) eina_stringshare_del(imc->xmodifiers);
if (imc->ecore_imf_module) eina_stringshare_del(imc->ecore_imf_module);
if (imc->e_im_exec) eina_stringshare_del(imc->e_im_exec);
if (imc->e_im_setup_exec) eina_stringshare_del(imc->e_im_setup_exec);
E_FREE(imc);
}
}

View File

@ -27,12 +27,12 @@ e_ipc_init(void)
if (tmp) base = tmp;
tmp = getenv("SD_USER_SOCKETS_DIR");
if (tmp) base = tmp;
user = getenv("USER");
if (!user)
{
int uidint;
user = "__unknown__";
uidint = getuid();
if (uidint >= 0)
@ -41,31 +41,31 @@ e_ipc_init(void)
user = buf2;
}
}
disp = getenv("DISPLAY");
if (!disp) disp = ":0";
e_util_env_set("E_IPC_SOCKET", "");
pid = (int)getpid();
for (trynum = 0; trynum <= 4096; trynum++)
{
struct stat st;
int id1 = 0;
snprintf(buf, sizeof(buf), "%s/e-%s@%x",
base, user, id1);
mkdir(buf, S_IRWXU);
if (stat(buf, &st) == 0)
{
if ((st.st_uid == getuid()) &&
((st.st_mode & (S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)) ==
(S_IRWXU | S_IFDIR)))
((st.st_mode & (S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)) ==
(S_IRWXU | S_IFDIR)))
{
snprintf(buf3, sizeof(buf3), "%s/%s-%i",
buf, disp, pid);
_e_ipc_server = ecore_ipc_server_add
(ECORE_IPC_LOCAL_SYSTEM, buf3, 0, NULL);
(ECORE_IPC_LOCAL_SYSTEM, buf3, 0, NULL);
if (_e_ipc_server) break;
}
}
@ -146,50 +146,50 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event)
switch (e->minor)
{
case E_IPC_OP_EXEC_ACTION:
{
E_Ipc_2Str *req = NULL;
{
E_Ipc_2Str *req = NULL;
if (e_ipc_codec_2str_dec(e->data, e->size, &req))
{
Eina_List *m = e_manager_list();
int len, ok = 0;
void *d;
if (e_ipc_codec_2str_dec(e->data, e->size, &req))
{
Eina_List *m = e_manager_list();
int len, ok = 0;
void *d;
if (m)
{
E_Manager *man = eina_list_data_get(m);
if (m)
{
E_Manager *man = eina_list_data_get(m);
if (man)
{
E_Action *act = e_action_find(req->str1);
if (man)
{
E_Action *act = e_action_find(req->str1);
if ((act) && (act->func.go))
{
act->func.go(E_OBJECT(man), req->str2);
ok = 1;
}
}
}
if ((act) && (act->func.go))
{
act->func.go(E_OBJECT(man), req->str2);
ok = 1;
}
}
}
d = e_ipc_codec_int_enc(ok, &len);
if (d)
{
ecore_ipc_client_send(e->client,
E_IPC_DOMAIN_REPLY,
E_IPC_OP_EXEC_ACTION_REPLY,
0, 0, 0, d, len);
free(d);
}
d = e_ipc_codec_int_enc(ok, &len);
if (d)
{
ecore_ipc_client_send(e->client,
E_IPC_DOMAIN_REPLY,
E_IPC_OP_EXEC_ACTION_REPLY,
0, 0, 0, d, len);
free(d);
}
if (req)
{
E_FREE(req->str1);
E_FREE(req->str2);
E_FREE(req);
}
}
}
break;
if (req)
{
E_FREE(req->str1);
E_FREE(req->str2);
E_FREE(req);
}
}
}
break;
default:
break;
@ -209,20 +209,22 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event)
break;
case E_IPC_DOMAIN_ALERT:
{
switch (e->minor)
{
case E_ALERT_OP_RESTART:
if (getenv("E_START_MTRACK"))
e_util_env_set("MTRACK", "track");
ecore_app_restart();
break;
case E_ALERT_OP_EXIT:
exit(-11);
break;
}
}
break;
{
switch (e->minor)
{
case E_ALERT_OP_RESTART:
if (getenv("E_START_MTRACK"))
e_util_env_set("MTRACK", "track");
ecore_app_restart();
break;
case E_ALERT_OP_EXIT:
exit(-11);
break;
}
}
break;
default:
break;
}

View File

@ -28,9 +28,9 @@ static Eet_Data_Descriptor *_e_ipc_3int_3str_list_edd = NULL;
static Eet_Data_Descriptor *_e_ipc_str_4int_edd = NULL;
static Eet_Data_Descriptor *_e_ipc_str_4int_list_edd = NULL;
#define E_IPC_DD(Edd, Eddc, Name, Type) \
Eddc.name = Name; \
Eddc.size = sizeof (Type); \
#define E_IPC_DD(Edd, Eddc, Name, Type) \
Eddc.name = Name; \
Eddc.size = sizeof (Type); \
Edd = eet_data_descriptor_stream_new(&Eddc);
/* externally accessible functions */
@ -250,7 +250,7 @@ e_ipc_codec_str_enc(const char *str, int *size_ret)
{
E_Ipc_Str dat;
dat.str = (char *) str;
dat.str = (char *)str;
return eet_data_descriptor_encode(_e_ipc_str_edd, &dat, size_ret);
}
@ -271,8 +271,8 @@ e_ipc_codec_2str_enc(const char *str1, const char *str2, int *size_ret)
{
E_Ipc_2Str dat;
dat.str1 = (char *) str1;
dat.str2 = (char *) str2;
dat.str1 = (char *)str1;
dat.str2 = (char *)str2;
return eet_data_descriptor_encode(_e_ipc_2str_edd, &dat, size_ret);
}
@ -309,7 +309,7 @@ e_ipc_codec_str_list_dec(char *data, int bytes, Eina_List **dest)
if (!dat) return 0;
EINA_LIST_FOREACH(dat->list, l, str_node)
{
list = eina_list_append(list, str_node->str);
list = eina_list_append(list, str_node->str);
}
if (dest) *dest = list;
E_FREE_LIST(dat->list, free);
@ -329,9 +329,9 @@ e_ipc_codec_str_list_enc(Eina_List *list, int *size_ret)
dat.list = NULL;
EINA_LIST_FOREACH(list, l, str)
{
str_node = malloc(sizeof(E_Ipc_Str));
str_node->str = str;
dat.list = eina_list_append(dat.list, str_node);
str_node = malloc(sizeof(E_Ipc_Str));
str_node->str = str;
dat.list = eina_list_append(dat.list, str_node);
}
data = eet_data_descriptor_encode(_e_ipc_str_list_edd, &dat, size_ret);
E_FREE_LIST(dat.list, free);
@ -355,7 +355,7 @@ e_ipc_codec_str_int_enc(const char *str, int val, int *size_ret)
{
E_Ipc_Str_Int dat;
dat.str = (char *) str;
dat.str = (char *)str;
dat.val = val;
return eet_data_descriptor_encode(_e_ipc_str_int_edd, &dat, size_ret);
}
@ -398,8 +398,8 @@ e_ipc_codec_2str_int_enc(const char *str1, const char *str2, int val, int *size_
{
E_Ipc_2Str_Int dat;
dat.str1 = (char *) str1;
dat.str2 = (char *) str2;
dat.str1 = (char *)str1;
dat.str2 = (char *)str2;
dat.val = val;
return eet_data_descriptor_encode(_e_ipc_2str_int_edd, &dat, size_ret);
}
@ -446,8 +446,8 @@ e_ipc_codec_4int_2str_enc(int val1, int val2, int val3, int val4, const char *st
dat.val2 = val2;
dat.val3 = val3;
dat.val4 = val4;
dat.str1 = (char *) str1;
dat.str2 = (char *) str2;
dat.str1 = (char *)str1;
dat.str2 = (char *)str2;
return eet_data_descriptor_encode(_e_ipc_4int_2str_edd, &dat, size_ret);
}
@ -494,8 +494,8 @@ e_ipc_codec_5int_2str_enc(int val1, int val2, int val3, int val4, int val5, cons
dat.val3 = val3;
dat.val4 = val4;
dat.val5 = val5;
dat.str1 = (char *) str1;
dat.str2 = (char *) str2;
dat.str1 = (char *)str1;
dat.str2 = (char *)str2;
return eet_data_descriptor_encode(_e_ipc_5int_2str_edd, &dat, size_ret);
}
@ -540,10 +540,10 @@ e_ipc_codec_3int_4str_enc(int val1, int val2, int val3, const char *str1, const
dat.val1 = val1;
dat.val2 = val2;
dat.val3 = val3;
dat.str1 = (char *) str1;
dat.str2 = (char *) str2;
dat.str3 = (char *) str3;
dat.str4 = (char *) str4;
dat.str1 = (char *)str1;
dat.str2 = (char *)str2;
dat.str3 = (char *)str3;
dat.str4 = (char *)str4;
return eet_data_descriptor_encode(_e_ipc_3int_4str_edd, &dat, size_ret);
}
@ -588,9 +588,9 @@ e_ipc_codec_3int_3str_enc(int val1, int val2, int val3, const char *str1, const
dat.val1 = val1;
dat.val2 = val2;
dat.val3 = val3;
dat.str1 = (char *) str1;
dat.str2 = (char *) str2;
dat.str3 = (char *) str3;
dat.str1 = (char *)str1;
dat.str2 = (char *)str2;
dat.str3 = (char *)str3;
return eet_data_descriptor_encode(_e_ipc_3int_3str_edd, &dat, size_ret);
}
@ -618,27 +618,27 @@ e_ipc_codec_3int_3str_list_enc(Eina_List *list, int *size_ret)
EAPI int
e_ipc_codec_str_4int_dec(char *data, int bytes, E_Ipc_Str_4Int **dest)
{
E_Ipc_Str_4Int *dat;
E_Ipc_Str_4Int *dat;
if (!data) return 0;
dat = eet_data_descriptor_decode(_e_ipc_str_4int_edd, data, bytes);
if (!dat) return 0;
if (dest) *dest = dat;
return 1;
if (!data) return 0;
dat = eet_data_descriptor_decode(_e_ipc_str_4int_edd, data, bytes);
if (!dat) return 0;
if (dest) *dest = dat;
return 1;
}
EAPI void *
e_ipc_codec_str_4int_enc(const char *str1, int val1, int val2, int val3, int val4, int *size_ret)
{
E_Ipc_Str_4Int dat;
E_Ipc_Str_4Int dat;
dat.str = (char *) str1;
dat.val1 = val1;
dat.val2 = val2;
dat.val3 = val3;
dat.val4 = val4;
dat.str = (char *)str1;
dat.val1 = val1;
dat.val2 = val2;
dat.val3 = val3;
dat.val4 = val4;
return eet_data_descriptor_encode(_e_ipc_str_4int_edd, &dat, size_ret);
return eet_data_descriptor_encode(_e_ipc_str_4int_edd, &dat, size_ret);
}
EAPI int

View File

@ -3,44 +3,44 @@
/* FIXME: something is weird here - i had to reverse all stacking logic to make
* it work... */
typedef struct _E_Smart_Data E_Smart_Data;
typedef struct _E_Smart_Data E_Smart_Data;
typedef struct _E_Layout_Item E_Layout_Item;
struct _E_Smart_Data
{
Evas_Coord x, y, w, h;
Evas_Coord vw, vh;
Evas_Object *obj;
Evas_Object *clip;
int frozen;
unsigned char changed : 1;
Eina_List *items;
Evas_Coord x, y, w, h;
Evas_Coord vw, vh;
Evas_Object *obj;
Evas_Object *clip;
int frozen;
unsigned char changed : 1;
Eina_List *items;
};
struct _E_Layout_Item
{
E_Smart_Data *sd;
Evas_Coord x, y, w, h;
Evas_Object *obj;
E_Smart_Data *sd;
Evas_Coord x, y, w, h;
Evas_Object *obj;
};
/* local subsystem functions */
static E_Layout_Item *_e_layout_smart_adopt(E_Smart_Data *sd, Evas_Object *obj);
static void _e_layout_smart_disown(Evas_Object *obj);
static void _e_layout_smart_item_del_hook(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _e_layout_smart_reconfigure(E_Smart_Data *sd);
static void _e_layout_smart_move_resize_item(E_Layout_Item *li);
static void _e_layout_smart_disown(Evas_Object *obj);
static void _e_layout_smart_item_del_hook(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _e_layout_smart_reconfigure(E_Smart_Data *sd);
static void _e_layout_smart_move_resize_item(E_Layout_Item *li);
static void _e_layout_smart_init(void);
static void _e_layout_smart_add(Evas_Object *obj);
static void _e_layout_smart_del(Evas_Object *obj);
static void _e_layout_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
static void _e_layout_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
static void _e_layout_smart_show(Evas_Object *obj);
static void _e_layout_smart_hide(Evas_Object *obj);
static void _e_layout_smart_color_set(Evas_Object *obj, int r, int g, int b, int a);
static void _e_layout_smart_clip_set(Evas_Object *obj, Evas_Object *clip);
static void _e_layout_smart_clip_unset(Evas_Object *obj);
static void _e_layout_smart_init(void);
static void _e_layout_smart_add(Evas_Object *obj);
static void _e_layout_smart_del(Evas_Object *obj);
static void _e_layout_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
static void _e_layout_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
static void _e_layout_smart_show(Evas_Object *obj);
static void _e_layout_smart_hide(Evas_Object *obj);
static void _e_layout_smart_color_set(Evas_Object *obj, int r, int g, int b, int a);
static void _e_layout_smart_clip_set(Evas_Object *obj, Evas_Object *clip);
static void _e_layout_smart_clip_unset(Evas_Object *obj);
/* local subsystem globals */
static Evas_Smart *_e_smart = NULL;
@ -179,9 +179,9 @@ e_layout_child_lower(Evas_Object *obj)
if (!eina_list_data_find(li->sd->items, obj)) return;
if ((li->sd->items) && eina_list_next(li->sd->items))
{
li->sd->items = eina_list_remove(li->sd->items, obj);
evas_object_lower(obj);
li->sd->items = eina_list_prepend(li->sd->items, obj);
li->sd->items = eina_list_remove(li->sd->items, obj);
evas_object_lower(obj);
li->sd->items = eina_list_prepend(li->sd->items, obj);
}
}
@ -195,9 +195,9 @@ e_layout_child_raise(Evas_Object *obj)
if (!eina_list_data_find(li->sd->items, obj)) return;
if ((li->sd->items) && eina_list_next(li->sd->items))
{
li->sd->items = eina_list_remove(li->sd->items, obj);
evas_object_raise(obj);
li->sd->items = eina_list_append(li->sd->items, obj);
li->sd->items = eina_list_remove(li->sd->items, obj);
evas_object_raise(obj);
li->sd->items = eina_list_append(li->sd->items, obj);
}
}
@ -212,9 +212,9 @@ e_layout_child_lower_below(Evas_Object *obj, Evas_Object *below)
if (!eina_list_data_find(li->sd->items, obj)) return;
if ((li->sd->items) && eina_list_next(li->sd->items))
{
li->sd->items = eina_list_remove(li->sd->items, obj);
evas_object_stack_below(obj, below);
li->sd->items = eina_list_prepend_relative(li->sd->items, obj, below);
li->sd->items = eina_list_remove(li->sd->items, obj);
evas_object_stack_below(obj, below);
li->sd->items = eina_list_prepend_relative(li->sd->items, obj, below);
}
}
@ -229,9 +229,9 @@ e_layout_child_raise_above(Evas_Object *obj, Evas_Object *above)
if (!eina_list_data_find(li->sd->items, obj)) return;
if ((li->sd->items) && eina_list_next(li->sd->items))
{
li->sd->items = eina_list_remove(li->sd->items, obj);
evas_object_stack_above(obj, above);
li->sd->items = eina_list_append_relative(li->sd->items, obj, above);
li->sd->items = eina_list_remove(li->sd->items, obj);
evas_object_stack_above(obj, above);
li->sd->items = eina_list_append_relative(li->sd->items, obj, above);
}
}
@ -283,7 +283,7 @@ _e_layout_smart_adopt(E_Smart_Data *sd, Evas_Object *obj)
evas_object_smart_member_add(obj, li->sd->obj);
evas_object_data_set(obj, "e_layout_data", li);
evas_object_event_callback_add(obj, EVAS_CALLBACK_FREE,
_e_layout_smart_item_del_hook, NULL);
_e_layout_smart_item_del_hook, NULL);
if ((!evas_object_visible_get(sd->clip)) &&
(evas_object_visible_get(sd->obj)))
evas_object_show(sd->clip);
@ -299,12 +299,12 @@ _e_layout_smart_disown(Evas_Object *obj)
if (!li) return;
if (!li->sd->items)
{
if (evas_object_visible_get(li->sd->clip))
evas_object_hide(li->sd->clip);
if (evas_object_visible_get(li->sd->clip))
evas_object_hide(li->sd->clip);
}
evas_object_event_callback_del(obj,
EVAS_CALLBACK_FREE,
_e_layout_smart_item_del_hook);
EVAS_CALLBACK_FREE,
_e_layout_smart_item_del_hook);
evas_object_smart_member_del(obj);
evas_object_data_del(obj, "e_layout_data");
free(li);
@ -326,9 +326,9 @@ _e_layout_smart_reconfigure(E_Smart_Data *sd)
EINA_LIST_FOREACH(sd->items, l, obj)
{
E_Layout_Item *li;
li = evas_object_data_get(obj, "e_layout_data");
_e_layout_smart_move_resize_item(li);
E_Layout_Item *li;
li = evas_object_data_get(obj, "e_layout_data");
_e_layout_smart_move_resize_item(li);
}
sd->changed = 0;
}
@ -337,41 +337,41 @@ static void
_e_layout_smart_move_resize_item(E_Layout_Item *li)
{
evas_object_move(li->obj,
li->sd->x + ((li->x * li->sd->w) / li->sd->vw),
li->sd->y + ((li->y * li->sd->h) / li->sd->vh));
li->sd->x + ((li->x * li->sd->w) / li->sd->vw),
li->sd->y + ((li->y * li->sd->h) / li->sd->vh));
evas_object_resize(li->obj,
(li->w * li->sd->w) / li->sd->vw,
(li->h * li->sd->h) / li->sd->vh);
(li->w * li->sd->w) / li->sd->vw,
(li->h * li->sd->h) / li->sd->vh);
}
static void
_e_layout_smart_init(void)
{
if (_e_smart) return;
{
static const Evas_Smart_Class sc =
{
"e_layout",
EVAS_SMART_CLASS_VERSION,
_e_layout_smart_add,
_e_layout_smart_del,
_e_layout_smart_move,
_e_layout_smart_resize,
_e_layout_smart_show,
_e_layout_smart_hide,
_e_layout_smart_color_set,
_e_layout_smart_clip_set,
_e_layout_smart_clip_unset,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
{
static const Evas_Smart_Class sc =
{
"e_layout",
EVAS_SMART_CLASS_VERSION,
_e_layout_smart_add,
_e_layout_smart_del,
_e_layout_smart_move,
_e_layout_smart_resize,
_e_layout_smart_show,
_e_layout_smart_hide,
_e_layout_smart_color_set,
_e_layout_smart_clip_set,
_e_layout_smart_clip_unset,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
}
static void
@ -405,10 +405,10 @@ _e_layout_smart_del(Evas_Object *obj)
if (!sd) return;
while (sd->items)
{
Evas_Object *child;
Evas_Object *child;
child = eina_list_data_get(sd->items);
e_layout_unpack(child);
child = eina_list_data_get(sd->items);
e_layout_unpack(child);
}
evas_object_del(sd->clip);
free(sd);
@ -423,20 +423,20 @@ _e_layout_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
sd = evas_object_smart_data_get(obj);
if (!sd) return;
if ((x == sd->x) && (y == sd->y)) return;
{
Eina_List *l;
Evas_Coord dx, dy;
{
Eina_List *l;
Evas_Coord dx, dy;
dx = x - sd->x;
dy = y - sd->y;
EINA_LIST_FOREACH(sd->items, l, item)
{
Evas_Coord ox, oy;
dx = x - sd->x;
dy = y - sd->y;
EINA_LIST_FOREACH(sd->items, l, item)
{
Evas_Coord ox, oy;
evas_object_geometry_get(item, &ox, &oy, NULL, NULL);
evas_object_move(item, ox + dx, oy + dy);
}
}
evas_object_geometry_get(item, &ox, &oy, NULL, NULL);
evas_object_move(item, ox + dx, oy + dy);
}
}
sd->x = x;
sd->y = y;
}
@ -504,3 +504,4 @@ _e_layout_smart_clip_unset(Evas_Object *obj)
if (!sd) return;
evas_object_clip_unset(sd->clip);
}

View File

@ -34,7 +34,7 @@ e_log_init(void)
e_log_dom = eina_log_domain_register("e", EINA_COLOR_WHITE);
eina_log_domain_level_set("e", E_LOG_LEVEL);
eina_log_print_cb_set(_e_log_cb, NULL);
return (e_log_dom != -1);
return e_log_dom != -1;
}
EINTERN int
@ -44,3 +44,4 @@ e_log_shutdown(void)
e_log_dom = -1;
return 0;
}

View File

@ -132,7 +132,7 @@ _xdg_data_dirs_augment(void)
char newpath[4096], buf[4096];
if (!p) return;
snprintf(newpath, sizeof(newpath), "%s:%s/share", e_prefix_data_get(), p);
if (s)
{
@ -233,11 +233,11 @@ main(int argc, char **argv)
}
#ifdef TS_DO
#undef TS
# define TS(x) \
{ \
t1 = ecore_time_unix_get(); \
# define TS(x) \
{ \
t1 = ecore_time_unix_get(); \
printf("ESTART: %1.5f [%1.5f] - %s\n", t1 - t0, t1 - t2, x); \
t2 = t1; \
t2 = t1; \
}
#endif
TS("Eina Init Done");
@ -404,7 +404,7 @@ main(int argc, char **argv)
_e_main_shutdown(-1);
}
TS("Emotion Init Done");
_e_main_shutdown_push((void*)emotion_shutdown);
_e_main_shutdown_push((void *)emotion_shutdown);
#endif
/* e doesn't sync to compositor - it should be one */
@ -514,7 +514,7 @@ main(int argc, char **argv)
_e_main_shutdown_push(e_configure_option_shutdown);
_xdg_data_dirs_augment();
_fix_user_default_edj();
TS("E_Randr Init");
@ -1030,7 +1030,6 @@ main(int argc, char **argv)
e_test();
TS("E_Test Done");
if (e_config->show_splash)
e_init_status_set(_("Setup Shelves"));
TS("E_Shelf Init");
@ -1060,7 +1059,7 @@ main(int argc, char **argv)
inloop = EINA_TRUE;
e_util_env_set("E_RESTART", "1");
TS("MAIN LOOP AT LAST");
if (!setjmp(x_fatal_buff))
ecore_main_loop_begin();
@ -1207,8 +1206,8 @@ _e_main_parse_arguments(int argc, char **argv)
really_know = EINA_TRUE;
else if (!strcmp(argv[i], "-locked"))
locked = EINA_TRUE;
else if (!strcmp(argv[i], "-nopause"))
e_nopause = EINA_TRUE;
else if (!strcmp(argv[i], "-nopause"))
e_nopause = EINA_TRUE;
else if ((!strcmp(argv[i], "-h")) ||
(!strcmp(argv[i], "-help")) ||
(!strcmp(argv[i], "--help")))
@ -1884,7 +1883,7 @@ _e_main_cb_idle_before(void *data __UNUSED__)
if (!eb->func(eb->data)) eb->delete_me = 1;
}
}
EINA_LIST_FOREACH_SAFE (_idle_before_list, pl, l, eb)
EINA_LIST_FOREACH_SAFE(_idle_before_list, pl, l, eb)
{
if ((eb->once) || (eb->delete_me))
{
@ -1938,3 +1937,4 @@ _e_main_cb_startup_fake_end(void *data __UNUSED__)
e_init_hide();
return ECORE_CALLBACK_CANCEL;
}

View File

@ -956,7 +956,7 @@ _e_manager_cb_screensaver_on(void *data __UNUSED__, int ev_type __UNUSED__, void
e_desklock_show_autolocked();
else
timer_post_screensaver_lock = ecore_timer_add
(e_config->desklock_post_screensaver_time,
(e_config->desklock_post_screensaver_time,
_e_manager_cb_timer_post_screensaver_lock, NULL);
}
return ECORE_CALLBACK_PASS_ON;
@ -994,9 +994,11 @@ _e_manager_cb_client_message(void *data __UNUSED__, int ev_type __UNUSED__, void
switch (e_config->window_activehint_policy)
{
case 0: break;
case 1:
edje_object_signal_emit(bd->bg_object, "e,state,urgent", "e");
break;
default:
if (!bd->focused) e_border_activate(bd, EINA_TRUE);
else e_border_raise(bd);

View File

@ -7,12 +7,12 @@ struct _E_Maximize_Rect
int x1, yy1, x2, y2;
};
#define OBSTACLE(_x1, _y1, _x2, _y2) \
{ \
r = E_NEW(E_Maximize_Rect, 1); \
r->x1 = (_x1); r->yy1 = (_y1); r->x2 = (_x2); r->y2 = (_y2); \
rects = eina_list_append(rects, r); \
}
#define OBSTACLE(_x1, _y1, _x2, _y2) \
{ \
r = E_NEW(E_Maximize_Rect, 1); \
r->x1 = (_x1); r->yy1 = (_y1); r->x2 = (_x2); r->y2 = (_y2); \
rects = eina_list_append(rects, r); \
}
static void _e_maximize_border_rects_fill(E_Border *bd, Eina_List *list, int *x1, int *yy1, int *x2, int *y2, E_Maximize dir);
static void _e_maximize_border_rects_fill_both(E_Border *bd, Eina_List *rects, int *x1, int *yy1, int *x2, int *y2);
@ -47,71 +47,76 @@ e_maximize_border_dock_fit(E_Border *bd, int *x1, int *yy1, int *x2, int *y2)
bl = e_container_border_list_first(bd->zone->container);
while ((bd2 = e_container_border_list_next(bl)))
{
enum {
NONE,
TOP,
RIGHT,
BOTTOM,
LEFT
} edge = NONE;
enum
{
NONE,
TOP,
RIGHT,
BOTTOM,
LEFT
} edge = NONE;
if ((bd2->zone != bd->zone) || (bd2 == bd) ||
(bd2->client.netwm.type != ECORE_X_WINDOW_TYPE_DOCK))
continue;
if ((bd2->zone != bd->zone) || (bd2 == bd) ||
(bd2->client.netwm.type != ECORE_X_WINDOW_TYPE_DOCK))
continue;
if (((bd2->x == bd2->zone->x) || ((bd2->x + bd2->w) == (bd2->zone->x + bd2->zone->w))) &&
((bd2->y == bd2->zone->y) || ((bd2->x + bd2->h) == (bd2->zone->x + bd2->zone->h))))
{
/* corner */
if (bd2->w > bd2->h)
{
if (bd2->y == bd2->zone->y)
edge = TOP;
else if ((bd2->y + bd2->h) == (bd2->zone->y + bd2->zone->h))
edge = BOTTOM;
}
else
{
if ((bd2->x + bd2->w) == (bd2->zone->x + bd2->zone->w))
edge = RIGHT;
else if (bd2->x == bd2->zone->x)
edge = LEFT;
}
}
else
{
if (bd2->y == bd2->zone->y)
edge = TOP;
else if ((bd2->y + bd2->h) == (bd2->zone->y + bd2->zone->h))
edge = BOTTOM;
else if (bd2->x == bd2->zone->x)
edge = LEFT;
else if ((bd2->x + bd2->w) == (bd2->zone->x + bd2->zone->w))
edge = RIGHT;
}
if (((bd2->x == bd2->zone->x) || ((bd2->x + bd2->w) == (bd2->zone->x + bd2->zone->w))) &&
((bd2->y == bd2->zone->y) || ((bd2->x + bd2->h) == (bd2->zone->x + bd2->zone->h))))
{
/* corner */
if (bd2->w > bd2->h)
{
if (bd2->y == bd2->zone->y)
edge = TOP;
else if ((bd2->y + bd2->h) == (bd2->zone->y + bd2->zone->h))
edge = BOTTOM;
}
else
{
if ((bd2->x + bd2->w) == (bd2->zone->x + bd2->zone->w))
edge = RIGHT;
else if (bd2->x == bd2->zone->x)
edge = LEFT;
}
}
else
{
if (bd2->y == bd2->zone->y)
edge = TOP;
else if ((bd2->y + bd2->h) == (bd2->zone->y + bd2->zone->h))
edge = BOTTOM;
else if (bd2->x == bd2->zone->x)
edge = LEFT;
else if ((bd2->x + bd2->w) == (bd2->zone->x + bd2->zone->w))
edge = RIGHT;
}
switch (edge)
{
case TOP:
if ((bd2->y + bd2->h) > cy1)
cy1 = (bd2->y + bd2->h);
break;
case RIGHT:
if (bd2->x < cx2)
cx2 = bd2->x;
break;
case BOTTOM:
if (bd2->y < cy2)
cy2 = bd2->y;
break;
case LEFT:
if ((bd2->x + bd2->w) > cx1)
cx1 = (bd2->x + bd2->w);
break;
case NONE:
printf("Crazy people. Dock isn't at the edge.\n");
break;
}
switch (edge)
{
case TOP:
if ((bd2->y + bd2->h) > cy1)
cy1 = (bd2->y + bd2->h);
break;
case RIGHT:
if (bd2->x < cx2)
cx2 = bd2->x;
break;
case BOTTOM:
if (bd2->y < cy2)
cy2 = bd2->y;
break;
case LEFT:
if ((bd2->x + bd2->w) > cx1)
cx1 = (bd2->x + bd2->w);
break;
case NONE:
printf("Crazy people. Dock isn't at the edge.\n");
break;
}
}
e_container_border_list_free(bl);
@ -130,34 +135,34 @@ e_maximize_border_shelf_fill(E_Border *bd, int *x1, int *yy1, int *x2, int *y2,
EINA_LIST_FOREACH(e_shelf_list(), l, es)
{
Eina_List *ll;
E_Config_Shelf_Desk *sd;
Eina_List *ll;
E_Config_Shelf_Desk *sd;
if (es->cfg->overlap) continue;
if (es->zone != bd->zone) continue;
if (es->cfg->desk_show_mode)
{
EINA_LIST_FOREACH(es->cfg->desk_list, ll, sd)
{
if (!sd) continue;
if ((sd->x == bd->desk->x) && (sd->y == bd->desk->y))
{
OBSTACLE(es->x + es->zone->x, es->y + es->zone->y,
es->x + es->zone->x + es->w, es->y + es->zone->y + es->h);
break;
}
}
}
else
{
OBSTACLE(es->x + es->zone->x, es->y + es->zone->y,
es->x + es->zone->x + es->w, es->y + es->zone->y + es->h);
}
if (es->cfg->overlap) continue;
if (es->zone != bd->zone) continue;
if (es->cfg->desk_show_mode)
{
EINA_LIST_FOREACH(es->cfg->desk_list, ll, sd)
{
if (!sd) continue;
if ((sd->x == bd->desk->x) && (sd->y == bd->desk->y))
{
OBSTACLE(es->x + es->zone->x, es->y + es->zone->y,
es->x + es->zone->x + es->w, es->y + es->zone->y + es->h);
break;
}
}
}
else
{
OBSTACLE(es->x + es->zone->x, es->y + es->zone->y,
es->x + es->zone->x + es->w, es->y + es->zone->y + es->h);
}
}
if (rects)
{
_e_maximize_border_rects_fill(bd, rects, x1, yy1, x2, y2, dir);
E_FREE_LIST(rects, free);
_e_maximize_border_rects_fill(bd, rects, x1, yy1, x2, y2, dir);
E_FREE_LIST(rects, free);
}
}
@ -172,15 +177,15 @@ e_maximize_border_border_fill(E_Border *bd, int *x1, int *yy1, int *x2, int *y2,
bl = e_container_border_list_first(bd->zone->container);
while ((bd2 = e_container_border_list_next(bl)))
{
if ((bd2->zone != bd->zone) || (bd == bd2) || (bd2->desk != bd->desk && !bd2->sticky) || (bd2->iconic))
continue;
OBSTACLE(bd2->x, bd2->y, bd2->x + bd2->w, bd2->y + bd2->h);
if ((bd2->zone != bd->zone) || (bd == bd2) || (bd2->desk != bd->desk && !bd2->sticky) || (bd2->iconic))
continue;
OBSTACLE(bd2->x, bd2->y, bd2->x + bd2->w, bd2->y + bd2->h);
}
e_container_border_list_free(bl);
if (rects)
{
_e_maximize_border_rects_fill(bd, rects, x1, yy1, x2, y2, dir);
E_FREE_LIST(rects, free);
_e_maximize_border_rects_fill(bd, rects, x1, yy1, x2, y2, dir);
E_FREE_LIST(rects, free);
}
}
@ -200,10 +205,10 @@ _e_maximize_border_rects_fill(E_Border *bd, Eina_List *rects, int *x1, int *yy1,
bw = bd->w;
bh = bd->h;
if ((dir & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_HORIZONTAL)
_e_maximize_border_rects_fill_horiz(bd, rects, x1, x2, &bx, &by, &bw, &bh);
else if ((dir & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_VERTICAL)
_e_maximize_border_rects_fill_vert(bd, rects, yy1, y2, &bx, &by, &bw, &bh);
if ((dir & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_HORIZONTAL)
_e_maximize_border_rects_fill_horiz(bd, rects, x1, x2, &bx, &by, &bw, &bh);
else if ((dir & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_VERTICAL)
_e_maximize_border_rects_fill_vert(bd, rects, yy1, y2, &bx, &by, &bw, &bh);
}
}
@ -246,16 +251,16 @@ _e_maximize_border_rects_fill_both(E_Border *bd, Eina_List *rects, int *x1, int
if (((hx2 - hx1) * (hy2 - hy1)) > ((vx2 - vx1) * (vy2 - vy1)))
{
if (x1) *x1 = hx1;
if (yy1) *yy1 = hy1;
if (x2) *x2 = hx2;
if (y2) *y2 = hy2;
if (yy1) *yy1 = hy1;
if (x2) *x2 = hx2;
if (y2) *y2 = hy2;
}
else
{
if (x1) *x1 = vx1;
if (yy1) *yy1 = vy1;
if (x2) *x2 = vx2;
if (y2) *y2 = vy2;
if (yy1) *yy1 = vy1;
if (x2) *x2 = vx2;
if (y2) *y2 = vy2;
}
}
@ -275,11 +280,11 @@ _e_maximize_border_rects_fill_horiz(E_Border *bd, Eina_List *rects, int *x1, int
/* Expand left */
EINA_LIST_FOREACH(rects, l, rect)
{
if ((rect->x2 > cx1) && (rect->x2 <= *bx) &&
E_INTERSECTS(0, rect->yy1, bd->zone->w, (rect->y2 - rect->yy1), 0, *by, bd->zone->w, *bh))
{
cx1 = rect->x2;
}
if ((rect->x2 > cx1) && (rect->x2 <= *bx) &&
E_INTERSECTS(0, rect->yy1, bd->zone->w, (rect->y2 - rect->yy1), 0, *by, bd->zone->w, *bh))
{
cx1 = rect->x2;
}
}
*bw += (*bx - cx1);
*bx = cx1;
@ -287,11 +292,11 @@ _e_maximize_border_rects_fill_horiz(E_Border *bd, Eina_List *rects, int *x1, int
/* Expand right */
EINA_LIST_FOREACH(rects, l, rect)
{
if ((rect->x1 < cx2) && (rect->x1 >= (*bx + *bw)) &&
E_INTERSECTS(0, rect->yy1, bd->zone->w, (rect->y2 - rect->yy1), 0, *by, bd->zone->w, *bh))
{
cx2 = rect->x1;
}
if ((rect->x1 < cx2) && (rect->x1 >= (*bx + *bw)) &&
E_INTERSECTS(0, rect->yy1, bd->zone->w, (rect->y2 - rect->yy1), 0, *by, bd->zone->w, *bh))
{
cx2 = rect->x1;
}
}
*bw = (cx2 - cx1);
@ -315,11 +320,11 @@ _e_maximize_border_rects_fill_vert(E_Border *bd, Eina_List *rects, int *yy1, int
/* Expand up */
EINA_LIST_FOREACH(rects, l, rect)
{
if ((rect->y2 > cy1) && (rect->y2 <= *by) &&
E_INTERSECTS(rect->x1, 0, (rect->x2 - rect->x1), bd->zone->h, *bx, 0, *bw, bd->zone->h))
{
cy1 = rect->y2;
}
if ((rect->y2 > cy1) && (rect->y2 <= *by) &&
E_INTERSECTS(rect->x1, 0, (rect->x2 - rect->x1), bd->zone->h, *bx, 0, *bw, bd->zone->h))
{
cy1 = rect->y2;
}
}
*bh += (*by - cy1);
*by = cy1;
@ -327,14 +332,15 @@ _e_maximize_border_rects_fill_vert(E_Border *bd, Eina_List *rects, int *yy1, int
/* Expand down */
EINA_LIST_FOREACH(rects, l, rect)
{
if ((rect->yy1 < cy2) && (rect->yy1 >= (*by + *bh)) &&
E_INTERSECTS(rect->x1, 0, (rect->x2 - rect->x1), bd->zone->h, *bx, 0, *bw, bd->zone->h))
{
cy2 = rect->yy1;
}
if ((rect->yy1 < cy2) && (rect->yy1 >= (*by + *bh)) &&
E_INTERSECTS(rect->x1, 0, (rect->x2 - rect->x1), bd->zone->h, *bx, 0, *bw, bd->zone->h))
{
cy2 = rect->yy1;
}
}
*bh = (cy2 - cy1);
if (yy1) *yy1 = cy1;
if (y2) *y2 = cy2;
}

View File

@ -137,24 +137,24 @@ _e_menu_list_free_unref(Eina_List *l)
* are deleted before their parents
*/
EINA_LIST_REVERSE_FOREACH_SAFE(l, ll, lll, o)
{
e_object_unref(o);
l = eina_list_remove_list(l, ll);
}
{
e_object_unref(o);
l = eina_list_remove_list(l, ll);
}
return l;
}
/* macros for debugging menu refcounts */
#if 0
#define e_object_ref(X) do {\
int xx; \
xx = e_object_ref(X); \
INF("REF: %p || %d", X, xx); \
#define e_object_ref(X) do { \
int xx; \
xx = e_object_ref(X); \
INF("REF: %p || %d", X, xx); \
} while (0)
#define e_object_unref(X) do {\
int xx; \
xx = e_object_unref(X); \
INF("UNREF: %p || %d", X, xx); \
#define e_object_unref(X) do { \
int xx; \
xx = e_object_unref(X); \
INF("UNREF: %p || %d", X, xx); \
} while (0)
#endif
@ -557,7 +557,7 @@ e_menu_category_data_set(char *category, void *data)
}
EAPI E_Menu_Category_Callback *
e_menu_category_callback_add(char *category, void (*create_cb) (void *data, E_Menu *m, void *category_data), Ecore_Cb free_cb, void *data)
e_menu_category_callback_add(char *category, void (*create_cb)(void *data, E_Menu *m, void *category_data), Ecore_Cb free_cb, void *data)
{
E_Menu_Category *cat;
E_Menu_Category_Callback *cb = NULL;
@ -791,7 +791,7 @@ e_menu_item_submenu_set(E_Menu_Item *mi, E_Menu *sub)
0.5, 0.5, /* align */
ww, hh, /* min */
-1, -1 /* max */
);
);
return;
}
evas_object_del(mi->submenu_object);
@ -814,7 +814,7 @@ e_menu_item_submenu_set(E_Menu_Item *mi, E_Menu *sub)
0.5, 0.5, /* align */
ww, hh, /* min */
-1, -1 /* max */
);
);
edje_object_part_swallow(mi->bg_object, "e.swallow.content",
mi->container_object);
edje_object_size_min_calc(mi->bg_object, &ww, &hh);
@ -840,10 +840,10 @@ e_menu_item_submenu_set(E_Menu_Item *mi, E_Menu *sub)
if ((mi->submenu) || (mi->submenu_pre_cb.func))
{
if (e_theme_edje_object_set(mi->bg_object, "base/theme/menus",
"e/widgets/menu/default/submenu_bg"))
"e/widgets/menu/default/submenu_bg"))
return;
}
e_theme_edje_object_set(mi->bg_object, "base/theme/menus",
"e/widgets/menu/default/item_bg");
}
@ -961,7 +961,7 @@ e_menu_item_callback_set(E_Menu_Item *mi, void (*func)(void *data, E_Menu *m, E_
E_OBJECT_CHECK(mi);
E_OBJECT_TYPE_CHECK(mi, E_MENU_ITEM_TYPE);
mi->cb.func = func;
mi->cb.data = (void*)data;
mi->cb.data = (void *)data;
}
EAPI void
@ -979,7 +979,7 @@ e_menu_item_submenu_pre_callback_set(E_Menu_Item *mi, void (*func)(void *data, E
E_OBJECT_CHECK(mi);
E_OBJECT_TYPE_CHECK(mi, E_MENU_ITEM_TYPE);
mi->submenu_pre_cb.func = func;
mi->submenu_pre_cb.data = (void*)data;
mi->submenu_pre_cb.data = (void *)data;
if (!mi->submenu_post_cb.func)
mi->submenu_post_cb.func = _e_menu_cb_item_submenu_post_default;
}
@ -990,7 +990,7 @@ e_menu_item_submenu_post_callback_set(E_Menu_Item *mi, void (*func)(void *data,
E_OBJECT_CHECK(mi);
E_OBJECT_TYPE_CHECK(mi, E_MENU_ITEM_TYPE);
mi->submenu_post_cb.func = func;
mi->submenu_post_cb.data = (void*)data;
mi->submenu_post_cb.data = (void *)data;
}
EAPI void
@ -1150,7 +1150,7 @@ e_menu_idler_before(void)
((m->cur.h) != (m->prev.h)))
{
int w, h;
m->prev.w = m->cur.w;
m->prev.h = m->cur.h;
w = m->cur.w;
@ -1323,7 +1323,7 @@ _e_menu_free(E_Menu *m)
_e_menu_unrealize(m);
E_FREE(m->shape_rects);
m->shape_rects_num = 0;
EINA_LIST_FOREACH_SAFE (m->items, l, l_next, mi)
EINA_LIST_FOREACH_SAFE(m->items, l, l_next, mi)
e_object_del(E_OBJECT(mi));
if (m->in_active_list)
{
@ -1357,8 +1357,8 @@ _e_menu_item_free(E_Menu_Item *mi)
ref = e_object_ref_get(E_OBJECT(mi->submenu)) - 1;
e_object_unref(E_OBJECT(mi->submenu));
}
if (ref)
WRN("DANGLING SUBMENU FOR %s: REF(%d)||MENU(%p)", mi->label, ref, mi->submenu);
if (ref)
WRN("DANGLING SUBMENU FOR %s: REF(%d)||MENU(%p)", mi->label, ref, mi->submenu);
}
if (mi->menu->realized) _e_menu_item_unrealize(mi);
mi->menu->items = eina_list_remove(mi->menu->items, mi);
@ -1486,7 +1486,7 @@ no_submenu_item:
0.5, 0.5, /* align */
ww, hh, /* min */
-1, -1 /* max */
);
);
}
else if (mi->radio)
{
@ -1506,7 +1506,7 @@ no_submenu_item:
0.5, 0.5, /* align */
ww, hh, /* min */
-1, -1 /* max */
);
);
}
else
{
@ -1601,7 +1601,7 @@ no_submenu_item:
0.5, 0.5, /* align */
ww, hh, /* min */
-1, -1 /* max */
);
);
}
else
{
@ -1616,7 +1616,7 @@ no_submenu_item:
0.5, 0.5, /* align */
ww, hh, /* min */
-1, -1 /* max */
);
);
}
}
else
@ -1648,7 +1648,7 @@ no_submenu_item:
0.5, 0.5, /* align */
ww, hh, /* min */
-1, -1 /* max */
);
);
}
else
{
@ -1676,7 +1676,7 @@ no_submenu_item:
0.5, 0.5, /* align */
ww, hh, /* min */
-1, -1 /* max */
);
);
}
else
{
@ -1717,7 +1717,7 @@ _e_menu_realize(E_Menu *m)
E_Menu_Item *mi;
int ok = 0;
int w, h;
if (m->realized || (!m->items)) return;
m->realized = 1;
m->ecore_evas = e_canvas_new(m->zone->container->win,
@ -1888,7 +1888,7 @@ _e_menu_items_layout_update(E_Menu *m)
{
e_zone_useful_geometry_get(m->zone, NULL, NULL, NULL, &zh);
maxh = zh * 4;
if (maxh > 30000) maxh = 30000; // 32k x 32k mx coord limit for wins
if (maxh > 30000) maxh = 30000; // 32k x 32k mx coord limit for wins
max_items = (maxh / min_h) - 1;
}
EINA_LIST_FOREACH(m->items, l, mi)
@ -2787,8 +2787,8 @@ _e_menu_auto_place(E_Menu *m, int x, int y, int w, int h)
return 1;
}
else
/* T */
{
/* T */
m->cur.y = y + h;
if (x < (m->zone->x + ((m->zone->w * 1) / 3)))
m->cur.x = x;
@ -2814,8 +2814,8 @@ _e_menu_auto_place(E_Menu *m, int x, int y, int w, int h)
return 4;
}
else
/* R */
{
/* R */
m->cur.x = x - m->cur.w;
if (y < (m->zone->y + ((m->zone->h * 1) / 3)))
m->cur.y = y;

View File

@ -75,7 +75,7 @@ e_module_all_load(void)
char buf[128];
_e_modules_initting = EINA_TRUE;
e_config->modules =
eina_list_sort(e_config->modules, 0, _e_module_sort_priority);
@ -595,7 +595,7 @@ _e_module_cb_idler(void *data __UNUSED__)
}
ecore_event_add(E_EVENT_MODULE_INIT_END, NULL, NULL, NULL);
_e_modules_initting = EINA_FALSE;
_e_module_whitelist_check();
@ -655,80 +655,80 @@ _e_module_whitelist_check(void)
unsigned int known = 0;
int i;
const char *s;
const char *goodmods[] =
{
"access",
"backlight",
"battery",
"bluez4",
"clock",
"conf",
"conf_applications",
"conf_comp",
"conf_dialogs",
"conf_display",
"conf_edgebindings",
"conf_interaction",
"conf_intl",
"conf_keybindings",
"conf_menus",
"conf_paths",
"conf_performance",
"conf_randr",
"conf_shelves",
"conf_theme",
"conf_wallpaper2",
"conf_window_manipulation",
"conf_window_remembers",
"connman",
"cpufreq",
"everything",
"fileman",
"fileman_opinfo",
"gadman",
"ibar",
"ibox",
"illume2",
"illume-bluetooth",
"illume-home",
"illume-home-toggle",
"illume-indicator",
"illume-kbd-toggle",
"illume-keyboard",
"illume-mode-toggle",
"illume-softkey",
"layout",
"mixer",
"msgbus",
"notification",
"ofono",
"pager",
"physics",
"quickaccess",
"shot",
"start",
"syscon",
"systray",
"tasks",
"temperature",
"tiling",
"winlist",
"wizard",
"wl_drm",
"wl_screenshot",
"wl_shell",
"xkbswitch",
"echievements",
"music-control",
"conf2",
"appmenu",
NULL // end marker
};
const char *goodmods[] =
{
"access",
"backlight",
"battery",
"bluez4",
"clock",
"conf",
"conf_applications",
"conf_comp",
"conf_dialogs",
"conf_display",
"conf_edgebindings",
"conf_interaction",
"conf_intl",
"conf_keybindings",
"conf_menus",
"conf_paths",
"conf_performance",
"conf_randr",
"conf_shelves",
"conf_theme",
"conf_wallpaper2",
"conf_window_manipulation",
"conf_window_remembers",
"connman",
"cpufreq",
"everything",
"fileman",
"fileman_opinfo",
"gadman",
"ibar",
"ibox",
"illume2",
"illume-bluetooth",
"illume-home",
"illume-home-toggle",
"illume-indicator",
"illume-kbd-toggle",
"illume-keyboard",
"illume-mode-toggle",
"illume-softkey",
"layout",
"mixer",
"msgbus",
"notification",
"ofono",
"pager",
"physics",
"quickaccess",
"shot",
"start",
"syscon",
"systray",
"tasks",
"temperature",
"tiling",
"winlist",
"wizard",
"wl_drm",
"wl_screenshot",
"wl_shell",
"xkbswitch",
"echievements",
"music-control",
"conf2",
"appmenu",
NULL // end marker
};
EINA_LIST_FOREACH(_e_modules, l, m)
{
Eina_Bool ok;
if (!m->name) continue;
ok = EINA_FALSE;
for (i = 0; goodmods[i]; i++)
@ -780,7 +780,7 @@ _e_module_whitelist_check(void)
{
E_Dialog *dia;
Eina_Strbuf *sbuf;
dia = e_dialog_new(e_container_current_get(e_manager_current_get()),
"E", "_module_whitelist_dialog");
if (!dia)
@ -824,3 +824,4 @@ _e_module_whitelist_check(void)
eina_stringshare_del(s);
}
}

View File

@ -39,3 +39,4 @@ e_mouse_update(void)
return 1;
}

View File

@ -4,8 +4,8 @@ typedef struct _E_Msg_Event E_Msg_Event;
struct _E_Msg_Handler
{
void (*func) (void *data, const char *name, const char *info, int val, E_Object *obj, void *msgdata);
void *data;
void (*func)(void *data, const char *name, const char *info, int val, E_Object *obj, void *msgdata);
void *data;
unsigned char delete_me : 1;
};
@ -16,13 +16,13 @@ struct _E_Msg_Event
int val;
E_Object *obj;
void *msgdata;
void (*afterfunc) (void *data, E_Object *obj, void *msgdata);
void (*afterfunc)(void *data, E_Object *obj, void *msgdata);
void *afterdata;
};
/* local subsystem functions */
static Eina_Bool _e_msg_event_cb(void *data, int ev_type, void *ev);
static void _e_msg_event_free(void *data, void *ev);
static void _e_msg_event_free(void *data, void *ev);
/* local subsystem globals */
static Eina_List *handlers = NULL;
@ -43,7 +43,8 @@ e_msg_init(void)
EINTERN int
e_msg_shutdown(void)
{
while (handlers) e_msg_handler_del(eina_list_data_get(handlers));
while (handlers)
e_msg_handler_del(eina_list_data_get(handlers));
E_EVENT_MSG = 0;
if (hand) ecore_event_handler_del(hand);
hand = NULL;
@ -51,7 +52,7 @@ e_msg_shutdown(void)
}
EAPI void
e_msg_send(const char *name, const char *info, int val, E_Object *obj, void *msgdata, void (*afterfunc) (void *data, E_Object *obj, void *msgdata), void *afterdata)
e_msg_send(const char *name, const char *info, int val, E_Object *obj, void *msgdata, void (*afterfunc)(void *data, E_Object *obj, void *msgdata), void *afterdata)
{
unsigned int size, pos, name_len, info_len;
E_Msg_Event *ev;
@ -65,14 +66,14 @@ e_msg_send(const char *name, const char *info, int val, E_Object *obj, void *msg
pos = size;
if (name)
{
ev->name = ((char *)ev) + pos;
pos += name_len;
strcpy(ev->name, name);
ev->name = ((char *)ev) + pos;
pos += name_len;
strcpy(ev->name, name);
}
if (info)
{
ev->info = ((char *)ev) + pos;
strcpy(ev->info, info);
ev->info = ((char *)ev) + pos;
strcpy(ev->info, info);
}
ev->val = val;
ev->obj = obj;
@ -84,7 +85,7 @@ e_msg_send(const char *name, const char *info, int val, E_Object *obj, void *msg
}
EAPI E_Msg_Handler *
e_msg_handler_add(void (*func) (void *data, const char *name, const char *info, int val, E_Object *obj, void *msgdata), void *data)
e_msg_handler_add(void (*func)(void *data, const char *name, const char *info, int val, E_Object *obj, void *msgdata), void *data)
{
E_Msg_Handler *emsgh;
@ -101,13 +102,13 @@ e_msg_handler_del(E_Msg_Handler *emsgh)
{
if (processing_handlers > 0)
{
emsgh->delete_me = 1;
del_handlers = eina_list_append(del_handlers, emsgh);
emsgh->delete_me = 1;
del_handlers = eina_list_append(del_handlers, emsgh);
}
else
{
handlers = eina_list_remove(handlers, emsgh);
free(emsgh);
handlers = eina_list_remove(handlers, emsgh);
free(emsgh);
}
}
@ -124,14 +125,14 @@ _e_msg_event_cb(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
e = ev;
EINA_LIST_FOREACH(handlers, l, emsgh)
{
if (!emsgh->delete_me)
emsgh->func(emsgh->data, e->name, e->info, e->val, e->obj, e->msgdata);
if (!emsgh->delete_me)
emsgh->func(emsgh->data, e->name, e->info, e->val, e->obj, e->msgdata);
}
if (e->afterfunc) e->afterfunc(e->afterdata, e->obj, e->msgdata);
processing_handlers--;
if ((processing_handlers == 0) && (del_handlers))
{
E_FREE_LIST(del_handlers, e_msg_handler_del);
E_FREE_LIST(del_handlers, e_msg_handler_del);
}
return 1;
}
@ -146,3 +147,4 @@ _e_msg_event_free(void *data __UNUSED__, void *ev)
E_FREE(ev);
}

View File

@ -1,8 +1,8 @@
#include "e.h"
/* local subsystem functions */
static void _e_msgbus_request_name_cb(void *data, const EDBus_Message *msg,
EDBus_Pending *pending);
static void _e_msgbus_request_name_cb(void *data, const EDBus_Message *msg,
EDBus_Pending *pending);
static EDBus_Message *_e_msgbus_core_restart_cb(const EDBus_Service_Interface *iface,
const EDBus_Message *msg);
@ -31,9 +31,9 @@ static EDBus_Message *_e_msgbus_profile_add_cb(const EDBus_Service_Interface *if
static EDBus_Message *_e_msgbus_profile_delete_cb(const EDBus_Service_Interface *iface,
const EDBus_Message *msg);
#define E_MSGBUS_WIN_ACTION_CB_PROTO(NAME) \
static EDBus_Message *_e_msgbus_window_##NAME##_cb(const EDBus_Service_Interface *iface, \
const EDBus_Message *msg)
#define E_MSGBUS_WIN_ACTION_CB_PROTO(NAME) \
static EDBus_Message * _e_msgbus_window_##NAME##_cb(const EDBus_Service_Interface * iface, \
const EDBus_Message * msg)
E_MSGBUS_WIN_ACTION_CB_PROTO(list);
E_MSGBUS_WIN_ACTION_CB_PROTO(close);
@ -59,7 +59,7 @@ static const EDBus_Method module_methods[] = {
{ "Enable", EDBUS_ARGS({"s", "module"}), NULL, _e_msgbus_module_enable_cb },
{ "Disable", EDBUS_ARGS({"s", "module"}), NULL, _e_msgbus_module_disable_cb },
{ "List", NULL, EDBUS_ARGS({"a(si)", "modules"}),
_e_msgbus_module_list_cb },
_e_msgbus_module_list_cb },
{ }
};
@ -67,7 +67,7 @@ static const EDBus_Method profile_methods[] = {
{ "Set", EDBUS_ARGS({"s", "profile"}), NULL, _e_msgbus_profile_set_cb },
{ "Get", NULL, EDBUS_ARGS({"s", "profile"}), _e_msgbus_profile_get_cb },
{ "List", NULL, EDBUS_ARGS({"as", "array_profiles"}),
_e_msgbus_profile_list_cb },
_e_msgbus_profile_list_cb },
{ "Add", EDBUS_ARGS({"s", "profile"}), NULL, _e_msgbus_profile_add_cb },
{ "Delete", EDBUS_ARGS({"s", "profile"}), NULL, _e_msgbus_profile_delete_cb },
{ }
@ -75,18 +75,18 @@ static const EDBus_Method profile_methods[] = {
static const EDBus_Method window_methods[] = {
{ "List", NULL, EDBUS_ARGS({"a(si)", "array_of_window"}),
_e_msgbus_window_list_cb },
_e_msgbus_window_list_cb },
{ "Close", EDBUS_ARGS({"i", "window_id"}), NULL, _e_msgbus_window_close_cb },
{ "Kill", EDBUS_ARGS({"i", "window_id"}), NULL, _e_msgbus_window_kill_cb },
{ "Focus", EDBUS_ARGS({"i", "window_id"}), NULL, _e_msgbus_window_focus_cb },
{ "Iconify", EDBUS_ARGS({"i", "window_id"}), NULL,
_e_msgbus_window_iconify_cb },
_e_msgbus_window_iconify_cb },
{ "Uniconify", EDBUS_ARGS({"i", "window_id"}), NULL,
_e_msgbus_window_uniconify_cb },
_e_msgbus_window_uniconify_cb },
{ "Maximize", EDBUS_ARGS({"i", "window_id"}), NULL,
_e_msgbus_window_maximize_cb },
_e_msgbus_window_maximize_cb },
{ "Unmaximize", EDBUS_ARGS({"i", "window_id"}), NULL,
_e_msgbus_window_unmaximize_cb },
_e_msgbus_window_unmaximize_cb },
{ }
};
@ -437,55 +437,54 @@ _e_msgbus_window_list_cb(const EDBus_Service_Interface *iface __UNUSED__,
return reply;
}
#define E_MSGBUS_WIN_ACTION_CB_BEGIN(NAME) \
static EDBus_Message * \
_e_msgbus_window_##NAME##_cb(const EDBus_Service_Interface *iface __UNUSED__,\
const EDBus_Message *msg) \
{ \
E_Border *bd; \
int xwin;\
\
if (!edbus_message_arguments_get(msg, "i", &xwin)) \
return edbus_message_method_return_new(msg); \
bd = e_border_find_by_client_window(xwin);\
if (bd)\
{
#define E_MSGBUS_WIN_ACTION_CB_END \
}\
\
return edbus_message_method_return_new(msg);\
}
E_MSGBUS_WIN_ACTION_CB_BEGIN(close)
e_border_act_close_begin(bd);
E_MSGBUS_WIN_ACTION_CB_END
E_MSGBUS_WIN_ACTION_CB_BEGIN(kill)
e_border_act_kill_begin(bd);
E_MSGBUS_WIN_ACTION_CB_END
E_MSGBUS_WIN_ACTION_CB_BEGIN(focus)
e_border_focus_set(bd, 1, 1);
if (!bd->lock_user_stacking)
{
if (e_config->border_raise_on_focus)
e_border_raise(bd);
#define E_MSGBUS_WIN_ACTION_CB_BEGIN(NAME) \
static EDBus_Message * \
_e_msgbus_window_##NAME##_cb(const EDBus_Service_Interface * iface __UNUSED__, \
const EDBus_Message * msg) \
{ \
E_Border *bd; \
int xwin; \
\
if (!edbus_message_arguments_get(msg, "i", &xwin)) \
return edbus_message_method_return_new(msg); \
bd = e_border_find_by_client_window(xwin); \
if (bd) \
{
#define E_MSGBUS_WIN_ACTION_CB_END \
} \
\
return edbus_message_method_return_new(msg); \
}
E_MSGBUS_WIN_ACTION_CB_END
E_MSGBUS_WIN_ACTION_CB_BEGIN(iconify)
e_border_iconify(bd);
E_MSGBUS_WIN_ACTION_CB_END
E_MSGBUS_WIN_ACTION_CB_BEGIN(close)
e_border_act_close_begin(bd);
E_MSGBUS_WIN_ACTION_CB_END
E_MSGBUS_WIN_ACTION_CB_BEGIN(uniconify)
e_border_uniconify(bd);
E_MSGBUS_WIN_ACTION_CB_END
E_MSGBUS_WIN_ACTION_CB_BEGIN(kill)
e_border_act_kill_begin(bd);
E_MSGBUS_WIN_ACTION_CB_END
E_MSGBUS_WIN_ACTION_CB_BEGIN(maximize)
e_border_maximize(bd, e_config->maximize_policy);
E_MSGBUS_WIN_ACTION_CB_END
E_MSGBUS_WIN_ACTION_CB_BEGIN(focus)
e_border_focus_set(bd, 1, 1);
if (!bd->lock_user_stacking)
{
if (e_config->border_raise_on_focus)
e_border_raise(bd);
}
E_MSGBUS_WIN_ACTION_CB_END
E_MSGBUS_WIN_ACTION_CB_BEGIN(unmaximize)
e_border_unmaximize(bd, E_MAXIMIZE_BOTH);
E_MSGBUS_WIN_ACTION_CB_END
E_MSGBUS_WIN_ACTION_CB_BEGIN(iconify)
e_border_iconify(bd);
E_MSGBUS_WIN_ACTION_CB_END
E_MSGBUS_WIN_ACTION_CB_BEGIN(uniconify)
e_border_uniconify(bd);
E_MSGBUS_WIN_ACTION_CB_END
E_MSGBUS_WIN_ACTION_CB_BEGIN(maximize)
e_border_maximize(bd, e_config->maximize_policy);
E_MSGBUS_WIN_ACTION_CB_END
E_MSGBUS_WIN_ACTION_CB_BEGIN(unmaximize)
e_border_unmaximize(bd, E_MAXIMIZE_BOTH);
E_MSGBUS_WIN_ACTION_CB_END

View File

@ -2,11 +2,11 @@
typedef struct _Notification_Data
{
EDBus_Connection *conn;
EDBus_Service_Interface *iface;
E_Notification_Notify_Cb notify_cb;
E_Notification_Close_Cb close_cb;
void *data;
EDBus_Connection *conn;
EDBus_Service_Interface *iface;
E_Notification_Notify_Cb notify_cb;
E_Notification_Close_Cb close_cb;
void *data;
const E_Notification_Server_Info *server_info;
} Notification_Data;
@ -38,7 +38,7 @@ hints_dict_iter(void *data, const void *key, EDBus_Message_Iter *var)
n->icon.raw.channels = channels;
n->icon.raw.data = malloc(sizeof(char) * n->icon.raw.data_size);
EINA_SAFETY_ON_NULL_RETURN(n->icon.raw.data);
memcpy(n->icon.raw.data, raw_data, sizeof(char)*n->icon.raw.data_size);
memcpy(n->icon.raw.data, raw_data, sizeof(char) * n->icon.raw.data_size);
}
else if (!strcmp(key, "urgency"))
{
@ -111,7 +111,7 @@ capabilities_cb(const EDBus_Service_Interface *iface EINA_UNUSED, const EDBus_Me
for (i = 0; n_data->server_info->capabilities[i]; i++)
edbus_message_iter_arguments_append(array, "s",
n_data->server_info->capabilities[i]);
n_data->server_info->capabilities[i]);
edbus_message_iter_container_close(main_iter, array);
return reply;
}
@ -133,10 +133,10 @@ static const EDBus_Method methods[] = {
EDBUS_ARGS({"u", "id"}), notify_cb },
{ "CloseNotification", EDBUS_ARGS({"u", "id"}), NULL, close_notification_cb },
{ "GetCapabilities", NULL, EDBUS_ARGS({"as", "capabilities"}),
capabilities_cb },
capabilities_cb },
{ "GetServerInformation", NULL,
EDBUS_ARGS({"s", "name"}, {"s", "vendor"}, {"s", "version"}, {"s", "spec_version"}),
server_info_cb },
EDBUS_ARGS({"s", "name"}, {"s", "vendor"}, {"s", "version"}, {"s", "spec_version"}),
server_info_cb },
{ }
};
@ -148,9 +148,9 @@ enum
static const EDBus_Signal signals[] = {
[SIGNAL_NOTIFICATION_CLOSED] =
{ "NotificationClosed", EDBUS_ARGS({"u", "id"}, {"u", "reason"}) },
{ "NotificationClosed", EDBUS_ARGS({"u", "id"}, {"u", "reason"}) },
[SIGNAL_ACTION_INVOKED] =
{ "ActionInvoked", EDBUS_ARGS({"u", "id"}, {"s", "action_key"}) },
{ "ActionInvoked", EDBUS_ARGS({"u", "id"}, {"s", "action_key"}) },
{ }
};
@ -176,7 +176,7 @@ e_notification_server_register(const E_Notification_Server_Info *server_info, E_
n_data->iface = edbus_service_interface_register(n_data->conn, PATH, &desc);
n_data->notify_cb = n_cb;
n_data->close_cb = close_cb;
n_data->data = (void *) data;
n_data->data = (void *)data;
n_data->server_info = server_info;
edbus_name_request(n_data->conn, BUS,
EDBUS_NAME_REQUEST_FLAG_REPLACE_EXISTING, NULL, NULL);
@ -311,11 +311,11 @@ notification_client_dbus_send(E_Notification_Notify *notify, E_Notification_Clie
//build message
main_iter = edbus_message_iter_get(msg);
if (!edbus_message_iter_arguments_append(main_iter, "susssas",
notify->app_name ?: "",
notify->app_name ? : "",
notify->replaces_id,
notify->icon.icon ?: "",
notify->sumary ?: "",
notify->body ?: "",
notify->icon.icon ? : "",
notify->sumary ? : "",
notify->body ? : "",
&actions))
goto error;
edbus_message_iter_container_close(main_iter, actions);
@ -410,6 +410,7 @@ e_notification_client_send(E_Notification_Notify *notify, E_Notification_Client_
id = n_data->notify_cb(n_data->data, copy);
if (cb)
cb((void *) data, id);
cb((void *)data, id);
return EINA_TRUE;
}

View File

@ -30,19 +30,19 @@ e_obj_dialog_new(E_Container *con, char *title, char *class_name, char *class_cl
if (!con)
{
man = e_manager_current_get();
if (!man) return NULL;
con = e_container_current_get(man);
if (!con) con = e_container_number_get(man, 0);
if (!con) return NULL;
man = e_manager_current_get();
if (!man) return NULL;
con = e_container_current_get(man);
if (!con) con = e_container_number_get(man, 0);
if (!con) return NULL;
}
od = E_OBJECT_ALLOC(E_Obj_Dialog, E_OBJ_DIALOG_TYPE, _e_obj_dialog_free);
if (!od) return NULL;
od->win = e_win_new(con);
if (!od->win)
{
free(od);
return NULL;
free(od);
return NULL;
}
e_win_delete_callback_set(od->win, _e_obj_dialog_cb_delete);
e_win_resize_callback_set(od->win, _e_obj_dialog_cb_resize);
@ -80,8 +80,8 @@ e_obj_dialog_icon_set(E_Obj_Dialog *od, char *icon)
E_OBJECT_TYPE_CHECK(od, E_OBJ_DIALOG_TYPE);
if (od->win->border->internal_icon)
{
eina_stringshare_del(od->win->border->internal_icon);
od->win->border->internal_icon = NULL;
eina_stringshare_del(od->win->border->internal_icon);
od->win->border->internal_icon = NULL;
}
if (icon)
od->win->border->internal_icon = eina_stringshare_add(icon);
@ -104,9 +104,9 @@ e_obj_dialog_show(E_Obj_Dialog *od)
edje_object_size_max_get(od->bg_object, &w, &h);
if ((w > 0) && (h > 0))
{
if (w < mw) w = mw;
if (h < mh) h = mh;
e_win_size_max_set(od->win, w, h);
if (w < mw) w = mw;
if (h < mh) h = mh;
e_win_size_max_set(od->win, w, h);
}
s = edje_object_data_get(od->bg_object, "borderless");
if (s && (!strcmp(s, "1")))
@ -135,7 +135,7 @@ e_obj_dialog_obj_theme_set(E_Obj_Dialog *od, char *theme_cat, char *theme_obj)
evas_object_move(od->bg_object, 0, 0);
evas_object_show(od->bg_object);
edje_object_signal_callback_add(od->bg_object, "e,action,close", "",
_e_obj_dialog_cb_close, od);
_e_obj_dialog_cb_close, od);
}
/* local subsystem functions */
@ -177,3 +177,4 @@ _e_obj_dialog_cb_resize(E_Win *win)
od = win->data;
evas_object_resize(od->bg_object, od->win->w, od->win->h);
}

View File

@ -21,7 +21,7 @@ e_object_alloc(int size, int type, E_Object_Cleanup_Func cleanup_func)
if (!obj) return NULL;
obj->magic = E_OBJECT_MAGIC;
obj->type = type;
obj->references = 1;
obj->references = 1;
obj->cleanup_func = cleanup_func;
return obj;
}
@ -30,7 +30,7 @@ static void
_delay_del(void *data)
{
E_Object *obj = data;
obj->delay_del_job = NULL;
if (obj->del_att_func) obj->del_att_func(obj);
if (obj->del_func) obj->del_func(obj);
@ -158,12 +158,14 @@ e_bt(void)
{
int j;
for (j = 1; j < i; j++) putchar(' ');
for (j = 1; j < i; j++)
putchar(' ');
printf("%s\n", messages[i]);
}
free(messages);
}
}
#endif
EAPI int
@ -184,90 +186,90 @@ e_object_error(E_Object *obj)
bt[0] = 0;
if (messages)
{
for (i = 1; i < trace_num; i++)
{
strcat(bt, messages[i]);
strcat(bt, "\n");
}
free(messages);
for (i = 1; i < trace_num; i++)
{
strcat(bt, messages[i]);
strcat(bt, "\n");
}
free(messages);
}
/* if NULL obj then dump stacktrace */
if (!obj)
{
snprintf(buf, sizeof(buf),
"Object is NULL.\n"
"%s",
bt);
snprintf(buf, sizeof(buf),
"Object is NULL.\n"
"%s",
bt);
}
/* if obj pointer is non NULL, actually try an access and see if we segv */
else if (obj)
{
struct sigaction act, oact;
int magic = 0, segv = 0;
struct sigaction act, oact;
int magic = 0, segv = 0;
/* setup segv handler */
act.sa_handler = _e_object_segv;
act.sa_flags = SA_RESETHAND;
sigemptyset(&act.sa_mask);
sigaction(SIGSEGV, &act, &oact);
/* set a longjump to be within this if statement. only called if we */
/* segfault */
if (sigsetjmp(_e_object_segv_buf, 1))
{
sigaction(SIGSEGV, &oact, NULL);
segv = 1;
}
else
{
/* try access magic value */
magic = obj->magic;
/* if pointer is bogus we'd segv and so jump to the if () above */
/* contents, and thus reset segv handler and set segv flag. */
/* if not we just continue moving along here and reset handler */
sigaction(SIGSEGV, &oact, NULL);
}
/* if we segfaulted above... */
if (segv)
snprintf(buf, sizeof(buf),
"Object [%p] is an invalid/garbage pointer.\n"
"Segfault successfully avoided.\n"
"%s",
obj,
bt);
else
{
/* valid ram then... if we freed this object before */
if (magic == E_OBJECT_MAGIC_FREED)
snprintf(buf, sizeof(buf),
"Object [%p] is already freed.\n"
"%s",
obj,
bt);
/* garbage magic value - pointer to non object */
else if (magic != E_OBJECT_MAGIC)
snprintf(buf, sizeof(buf),
"Object [%p] has garbage magic (%x).\n"
"%s",
obj, magic,
bt);
else if (obj->references < 0)
snprintf(buf, sizeof(buf),
"Object [%p] has negative references (%i).\n"
"%s",
obj, obj->references,
bt);
else if (obj->references > 100)
snprintf(buf, sizeof(buf),
"Object [%p] has unusually high reference count (%i).\n"
"%s",
obj, obj->references,
bt);
/* it's all ok! */
else
{
return 0;
}
}
/* setup segv handler */
act.sa_handler = _e_object_segv;
act.sa_flags = SA_RESETHAND;
sigemptyset(&act.sa_mask);
sigaction(SIGSEGV, &act, &oact);
/* set a longjump to be within this if statement. only called if we */
/* segfault */
if (sigsetjmp(_e_object_segv_buf, 1))
{
sigaction(SIGSEGV, &oact, NULL);
segv = 1;
}
else
{
/* try access magic value */
magic = obj->magic;
/* if pointer is bogus we'd segv and so jump to the if () above */
/* contents, and thus reset segv handler and set segv flag. */
/* if not we just continue moving along here and reset handler */
sigaction(SIGSEGV, &oact, NULL);
}
/* if we segfaulted above... */
if (segv)
snprintf(buf, sizeof(buf),
"Object [%p] is an invalid/garbage pointer.\n"
"Segfault successfully avoided.\n"
"%s",
obj,
bt);
else
{
/* valid ram then... if we freed this object before */
if (magic == E_OBJECT_MAGIC_FREED)
snprintf(buf, sizeof(buf),
"Object [%p] is already freed.\n"
"%s",
obj,
bt);
/* garbage magic value - pointer to non object */
else if (magic != E_OBJECT_MAGIC)
snprintf(buf, sizeof(buf),
"Object [%p] has garbage magic (%x).\n"
"%s",
obj, magic,
bt);
else if (obj->references < 0)
snprintf(buf, sizeof(buf),
"Object [%p] has negative references (%i).\n"
"%s",
obj, obj->references,
bt);
else if (obj->references > 100)
snprintf(buf, sizeof(buf),
"Object [%p] has unusually high reference count (%i).\n"
"%s",
obj, obj->references,
bt);
/* it's all ok! */
else
{
return 0;
}
}
}
/* display actual error message */
e_error_message_show("%s", buf);
@ -275,9 +277,9 @@ e_object_error(E_Object *obj)
#else
if (!obj)
{
fprintf(stderr, "ERROR: Object is NULL. Add break point at %s:%d\n",
__FILE__, __LINE__);
return 1;
fprintf(stderr, "ERROR: Object is NULL. Add break point at %s:%d\n",
__FILE__, __LINE__);
return 1;
}
return 0;
#endif
@ -287,7 +289,7 @@ EAPI void
e_object_data_set(E_Object *obj, const void *data)
{
E_OBJECT_CHECK(obj);
obj->data = (void*)data;
obj->data = (void *)data;
}
EAPI void *
@ -315,7 +317,7 @@ EAPI void
e_object_delfn_clear(E_Object *obj)
{
E_Object_Delfn *dfn;
E_OBJECT_CHECK(obj);
if (obj->walking_list)
{
@ -335,7 +337,7 @@ e_object_delfn_clear(E_Object *obj)
}
EAPI E_Object_Delfn *
e_object_delfn_add(E_Object *obj, void (*func) (void *data, void *obj), void *data)
e_object_delfn_add(E_Object *obj, void (*func)(void *data, void *obj), void *data)
{
E_Object_Delfn *dfn;
E_OBJECT_CHECK_RETURN(obj, NULL);
@ -361,42 +363,42 @@ e_object_delfn_del(E_Object *obj, E_Object_Delfn *dfn)
}
/*
void
e_object_breadcrumb_add(E_Object *obj, char *crumb)
{
void
e_object_breadcrumb_add(E_Object *obj, char *crumb)
{
E_OBJECT_CHECK(obj);
obj->crumbs = eina_list_append(obj->crumbs, strdup(crumb));
}
}
void
e_object_breadcrumb_del(E_Object *obj, char *crumb)
{
void
e_object_breadcrumb_del(E_Object *obj, char *crumb)
{
Eina_List *l;
char *key;
E_OBJECT_CHECK(obj);
EINA_LIST_FOREACH(obj->crumbs, l, key)
{
if (!strcmp(crumb, key))
{
free(key);
obj->crumbs = eina_list_remove_list(obj->crumbs, l);
return;
}
if (!strcmp(crumb, key))
{
free(key);
obj->crumbs = eina_list_remove_list(obj->crumbs, l);
return;
}
}
}
}
void
e_object_breadcrumb_debug(E_Object *obj)
{
void
e_object_breadcrumb_debug(E_Object *obj)
{
Eina_List *l;
char *key;
E_OBJECT_CHECK(obj);
EINA_LISt_FOREACH(obj->crumbs, l, key)
printf("CRUMB: %s\n", key);
}
*/
}
*/
#ifdef OBJECT_PARANOIA_CHECK
/* local subsystem functions */
@ -405,4 +407,5 @@ _e_object_segv(int sig)
{
siglongjmp(_e_object_segv_buf, 1);
}
#endif

View File

@ -124,7 +124,7 @@ get_command(void *data, Efreet_Desktop *desktop __UNUSED__, char *command, int r
}
static char **
mime_open(const char *mime, const char * const *argv, int argc)
mime_open(const char *mime, const char *const *argv, int argc)
{
Efreet_Desktop *desktop = handler_find(mime);
Eina_List *files = NULL;
@ -181,7 +181,7 @@ append_single_quote_escaped(Eina_Strbuf *b, const char *str)
}
static char **
single_command_open(const char *command, const char * const *argv, int argc)
single_command_open(const char *command, const char *const *argv, int argc)
{
char **ret = calloc(2, sizeof(char *));
Eina_Strbuf *b;
@ -269,7 +269,7 @@ _terminal_get(const char *defaults_list)
Efreet_Desktop *tdesktop = NULL;
Efreet_Ini *ini;
const char *s;
ini = efreet_ini_new(defaults_list);
if ((ini) && (ini->data) &&
(efreet_ini_section_set(ini, "Default Applications")) &&
@ -286,20 +286,20 @@ static char **
terminal_open(void)
{
const char *terms[] =
{
"terminology.desktop",
"xterm.desktop",
"rxvt.desktop",
"gnome-terimnal.desktop",
"konsole.desktop",
NULL
};
{
"terminology.desktop",
"xterm.desktop",
"rxvt.desktop",
"gnome-terimnal.desktop",
"konsole.desktop",
NULL
};
const char *s;
char buf[PATH_MAX], **ret;
Efreet_Desktop *tdesktop = NULL, *td;
Eina_List *l;
int i;
s = efreet_data_home_get();
if (s)
{
@ -313,7 +313,7 @@ terminal_open(void)
tdesktop = _terminal_get(buf);
if (tdesktop) goto have_desktop;
}
for (i = 0; terms[i]; i++)
{
tdesktop = efreet_util_desktop_file_id_find(terms[i]);
@ -355,7 +355,7 @@ have_desktop:
}
static char **
browser_open(const char * const *argv, int argc)
browser_open(const char *const *argv, int argc)
{
const char *env = getenv("BROWSER");
if (env) return single_command_open(env, argv, argc);
@ -404,29 +404,30 @@ protocol_open(const char *str)
return ret;
}
static const struct type_mime {
static const struct type_mime
{
const char *type;
const char *mime;
} type_mimes[] = {
/* {"browser", "x-scheme-handler/http"}, */
{"mail", "x-scheme-handler/mailto"},
/* {"terminal", NULL}, */
{"filemanager", "x-scheme-handler/file"},
{"image", "image/jpeg"},
{"video", "video/x-mpeg"},
{"music", "audio/mp3"},
{NULL, NULL}
/* {"browser", "x-scheme-handler/http"}, */
{"mail", "x-scheme-handler/mailto"},
/* {"terminal", NULL}, */
{"filemanager", "x-scheme-handler/file"},
{"image", "image/jpeg"},
{"video", "video/x-mpeg"},
{"music", "audio/mp3"},
{NULL, NULL}
};
static const char *type_choices[] = {
"browser",
"mail",
"terminal",
"filemanager",
"image",
"video",
"music",
NULL
"browser",
"mail",
"terminal",
"filemanager",
"image",
"video",
"music",
NULL
};
static const Ecore_Getopt options = {
@ -454,12 +455,12 @@ main(int argc, char *argv[])
Eina_Bool quit_option = EINA_FALSE;
char *type = NULL;
Ecore_Getopt_Value values[] = {
ECORE_GETOPT_VALUE_STR(type),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_NONE
ECORE_GETOPT_VALUE_STR(type),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_BOOL(quit_option),
ECORE_GETOPT_VALUE_NONE
};
int args;
char **cmds;
@ -486,7 +487,7 @@ main(int argc, char *argv[])
if (strcmp(type, "terminal") == 0)
cmds = terminal_open();
else if (strcmp(type, "browser") == 0)
cmds = browser_open((const char * const *)argv + args, argc - args);
cmds = browser_open((const char *const *)argv + args, argc - args);
else
{
const struct type_mime *itr;
@ -496,7 +497,7 @@ main(int argc, char *argv[])
if (strcmp(type, itr->type) == 0)
{
cmds = mime_open(itr->mime,
(const char * const *)argv + args,
(const char *const *)argv + args,
argc - args);
break;
}
@ -516,7 +517,6 @@ main(int argc, char *argv[])
efreet_mime_shutdown();
efreet_shutdown();
/* No EFL, plain boring sequential system() calls */
if (!cmds)
return EXIT_FAILURE;
@ -541,3 +541,4 @@ main(int argc, char *argv[])
return ret;
}
}

View File

@ -278,3 +278,4 @@ _e_smart_init(void)
_e_smart = evas_smart_class_new(&sc);
}
}

View File

@ -13,42 +13,42 @@ e_place_zone_region_smart_cleanup(E_Zone *zone)
bl = e_container_border_list_first(desk->zone->container);
while ((border = e_container_border_list_next(bl)))
{
/* Build a list of windows on this desktop and not iconified. */
if ((border->desk == desk) && (!border->iconic) &&
(!border->lock_user_location))
{
int area;
Eina_List *ll;
E_Border *bd;
/* Build a list of windows on this desktop and not iconified. */
if ((border->desk == desk) && (!border->iconic) &&
(!border->lock_user_location))
{
int area;
Eina_List *ll;
E_Border *bd;
/* Ordering windows largest to smallest gives better results */
area = border->w * border->h;
EINA_LIST_FOREACH(borders, ll, bd)
{
int testarea;
/* Ordering windows largest to smallest gives better results */
area = border->w * border->h;
EINA_LIST_FOREACH(borders, ll, bd)
{
int testarea;
testarea = bd->w * bd->h;
/* Insert the border if larger than the current border */
if (area >= testarea)
{
borders = eina_list_prepend_relative(borders, border, bd);
break;
}
}
/* Looped over all borders without placing, so place at end */
if (!ll) borders = eina_list_append(borders, border);
}
testarea = bd->w * bd->h;
/* Insert the border if larger than the current border */
if (area >= testarea)
{
borders = eina_list_prepend_relative(borders, border, bd);
break;
}
}
/* Looped over all borders without placing, so place at end */
if (!ll) borders = eina_list_append(borders, border);
}
}
e_container_border_list_free(bl);
/* Loop over the borders moving each one using the smart placement */
EINA_LIST_FREE(borders, border)
{
int new_x, new_y;
int new_x, new_y;
e_place_zone_region_smart(zone, borders, border->x, border->y,
border->w, border->h, &new_x, &new_y);
e_border_move(border, new_x, new_y);
e_place_zone_region_smart(zone, borders, border->x, border->y,
border->w, border->h, &new_x, &new_y);
e_border_move(border, new_x, new_y);
}
}
@ -72,33 +72,33 @@ _e_place_coverage_border_add(E_Desk *desk, Eina_List *skiplist, int ar, int x, i
bl = e_container_border_list_first(desk->zone->container);
while ((bd = e_container_border_list_next(bl)))
{
ok = 1;
x2 = (bd->x - desk->zone->x); y2 = (bd->y - desk->zone->y); w2 = bd->w; h2 = bd->h;
EINA_LIST_FOREACH(skiplist, ll, bd2)
{
if (bd2 == bd)
{
ok = 0;
break;
}
}
if ((ok) &&
ok = 1;
x2 = (bd->x - desk->zone->x); y2 = (bd->y - desk->zone->y); w2 = bd->w; h2 = bd->h;
EINA_LIST_FOREACH(skiplist, ll, bd2)
{
if (bd2 == bd)
{
ok = 0;
break;
}
}
if ((ok) &&
E_INTERSECTS(x, y, w, h, x2, y2, w2, h2) &&
((bd->sticky) || (bd->desk == desk)) &&
(!bd->iconic) && (bd->visible))
{
x0 = x;
if (x < x2) x0 = x2;
x00 = (x + w);
if ((x2 + w2) < (x + w)) x00 = (x2 + w2);
yy0 = y;
if (y < y2) yy0 = y2;
y00 = (y + h);
if ((y2 + h2) < (y + h)) y00 = (y2 + h2);
iw = x00 - x0;
ih = y00 - yy0;
ar += (iw * ih);
}
{
x0 = x;
if (x < x2) x0 = x2;
x00 = (x + w);
if ((x2 + w2) < (x + w)) x00 = (x2 + w2);
yy0 = y;
if (y < y2) yy0 = y2;
y00 = (y + h);
if ((y2 + h2) < (y + h)) y00 = (y2 + h2);
iw = x00 - x0;
ih = y00 - yy0;
ar += (iw * ih);
}
}
e_container_border_list_free(bl);
return ar;
@ -113,25 +113,25 @@ _e_place_coverage_shelf_add(E_Zone *zone, int ar, int x, int y, int w, int h)
EINA_LIST_FOREACH(e_shelf_list(), l, es)
{
if (es->zone != zone) continue;
x2 = es->x; y2 = es->y; w2 = es->w; h2 = es->h;
if (E_INTERSECTS(x, y, w, h, x2, y2, w2, h2))
if (es->zone != zone) continue;
x2 = es->x; y2 = es->y; w2 = es->w; h2 = es->h;
if (E_INTERSECTS(x, y, w, h, x2, y2, w2, h2))
{
int x0, x00, yy0, y00;
int iw, ih;
if (!es->cfg->overlap) return 0x7fffffff;
x0 = x;
if (x < x2) x0 = x2;
x00 = (x + w);
if ((x2 + w2) < (x + w)) x00 = (x2 + w2);
yy0 = y;
if (y < y2) yy0 = y2;
y00 = (y + h);
if ((y2 + h2) < (y + h)) y00 = (y2 + h2);
iw = x00 - x0;
ih = y00 - yy0;
ar += (iw * ih);
x0 = x;
if (x < x2) x0 = x2;
x00 = (x + w);
if ((x2 + w2) < (x + w)) x00 = (x2 + w2);
yy0 = y;
if (y < y2) yy0 = y2;
y00 = (y + h);
if ((y2 + h2) < (y + h)) y00 = (y2 + h2);
iw = x00 - x0;
ih = y00 - yy0;
ar += (iw * ih);
}
}
return ar;
@ -140,13 +140,13 @@ _e_place_coverage_shelf_add(E_Zone *zone, int ar, int x, int y, int w, int h)
EAPI int
e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w, int h, int *rx, int *ry)
{
int a_w = 0, a_h = 0, a_alloc_w = 0, a_alloc_h = 0;
int *a_x = NULL, *a_y = NULL;
int zw, zh;
char *u_x = NULL, *u_y = NULL;
Eina_List *ll;
E_Border_List *bl;
E_Border *bd, *bd2;
int a_w = 0, a_h = 0, a_alloc_w = 0, a_alloc_h = 0;
int *a_x = NULL, *a_y = NULL;
int zw, zh;
char *u_x = NULL, *u_y = NULL;
Eina_List *ll;
E_Border_List *bl;
E_Border *bd, *bd2;
*rx = x;
*ry = y;
@ -157,8 +157,8 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w
if ((w <= 0) || (h <= 0))
{
printf("EEEK! trying to place 0x0 window!!!!\n");
return 1;
printf("EEEK! trying to place 0x0 window!!!!\n");
return 1;
}
/* FIXME: this NEEDS optimizing */
@ -187,167 +187,167 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
{
Eina_List *l;
E_Shelf *es;
Eina_List *l;
E_Shelf *es;
EINA_LIST_FOREACH(e_shelf_list(), l, es)
{
int bx, by, bw, bh;
EINA_LIST_FOREACH(e_shelf_list(), l, es)
{
int bx, by, bw, bh;
if (es->zone != desk->zone) continue;
if (es->zone != desk->zone) continue;
bx = es->x;
by = es->y;
bw = es->w;
bh = es->h;
if (!E_INTERSECTS(bx, by, bw, bh, 0, 0, zw, zh)) continue;
bx = es->x;
by = es->y;
bw = es->w;
bh = es->h;
if (!E_INTERSECTS(bx, by, bw, bh, 0, 0, zw, zh)) continue;
if (bx < 0)
{
bw += bx;
bx = 0;
}
if ((bx + bw) > zw) bw = zw - bx;
if (bx >= zw) continue;
if (by < 0)
{
bh += by;
by = 0;
}
if ((by + bh) > zh) bh = zh - by;
if (by >= zh) continue;
if (!u_x[bx])
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx;
u_x[bx] = 1;
}
if (!u_x[bx + bw])
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx + bw;
u_x[bx + bw] = 1;
}
if (!u_y[by])
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by;
u_y[by] = 1;
}
if (!u_y[by + bh])
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by + bh;
u_y[by + bh] = 1;
}
}
if (bx < 0)
{
bw += bx;
bx = 0;
}
if ((bx + bw) > zw) bw = zw - bx;
if (bx >= zw) continue;
if (by < 0)
{
bh += by;
by = 0;
}
if ((by + bh) > zh) bh = zh - by;
if (by >= zh) continue;
if (!u_x[bx])
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx;
u_x[bx] = 1;
}
if (!u_x[bx + bw])
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx + bw;
u_x[bx + bw] = 1;
}
if (!u_y[by])
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by;
u_y[by] = 1;
}
if (!u_y[by + bh])
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by + bh;
u_y[by + bh] = 1;
}
}
}
bl = e_container_border_list_first(desk->zone->container);
while ((bd = e_container_border_list_next(bl)))
{
int ok;
int bx, by, bw, bh;
int ok;
int bx, by, bw, bh;
ok = 1;
EINA_LIST_FOREACH(skiplist, ll, bd2)
{
if (bd2 == bd)
{
ok = 0;
break;
}
}
if (!ok) continue;
ok = 1;
EINA_LIST_FOREACH(skiplist, ll, bd2)
{
if (bd2 == bd)
{
ok = 0;
break;
}
}
if (!ok) continue;
if (!((bd->sticky) || (bd->desk == desk))) continue;
bx = bd->x - desk->zone->x;
by = bd->y - desk->zone->y;
bw = bd->w;
bh = bd->h;
bx = bd->x - desk->zone->x;
by = bd->y - desk->zone->y;
bw = bd->w;
bh = bd->h;
if (E_INTERSECTS(bx, by, bw, bh, 0, 0, zw, zh))
{
if (bx < 0)
{
bw += bx;
bx = 0;
}
if ((bx + bw) > zw) bw = zw - bx;
if (bx >= zw) continue;
if (by < 0)
{
bh += by;
by = 0;
}
if ((by + bh) > zh) bh = zh - by;
if (by >= zh) continue;
if (!u_x[bx])
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx;
u_x[bx] = 1;
}
if (!u_x[bx + bw])
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx + bw;
u_x[bx + bw] = 1;
}
if (!u_y[by])
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by;
u_y[by] = 1;
}
if (!u_y[by + bh])
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by + bh;
u_y[by + bh] = 1;
}
}
if (E_INTERSECTS(bx, by, bw, bh, 0, 0, zw, zh))
{
if (bx < 0)
{
bw += bx;
bx = 0;
}
if ((bx + bw) > zw) bw = zw - bx;
if (bx >= zw) continue;
if (by < 0)
{
bh += by;
by = 0;
}
if ((by + bh) > zh) bh = zh - by;
if (by >= zh) continue;
if (!u_x[bx])
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx;
u_x[bx] = 1;
}
if (!u_x[bx + bw])
{
a_w++;
if (a_w > a_alloc_w)
{
a_alloc_w += 32;
E_REALLOC(a_x, int, a_alloc_w);
}
a_x[a_w - 1] = bx + bw;
u_x[bx + bw] = 1;
}
if (!u_y[by])
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by;
u_y[by] = 1;
}
if (!u_y[by + bh])
{
a_h++;
if (a_h > a_alloc_h)
{
a_alloc_h += 32;
E_REALLOC(a_y, int, a_alloc_h);
}
a_y[a_h - 1] = by + bh;
u_y[by + bh] = 1;
}
}
}
qsort(a_x, a_w, sizeof(int), _e_place_cb_sort_cmp);
qsort(a_y, a_h, sizeof(int), _e_place_cb_sort_cmp);
@ -356,94 +356,94 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w
free(u_y);
{
int i, j;
int area = 0x7fffffff;
int i, j;
int area = 0x7fffffff;
for (j = 0; j < a_h - 1; j++)
{
for (i = 0; i < a_w - 1; i++)
{
if ((a_x[i] <= (zw - w)) &&
(a_y[j] <= (zh - h)))
{
int ar = 0;
{
for (i = 0; i < a_w - 1; i++)
{
if ((a_x[i] <= (zw - w)) &&
(a_y[j] <= (zh - h)))
{
int ar = 0;
ar = _e_place_coverage_border_add(desk, skiplist, ar,
a_x[i], a_y[j],
w, h);
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
ar = _e_place_coverage_shelf_add(desk->zone, ar,
a_x[i], a_y[j],
w, h);
if (ar < area)
{
area = ar;
*rx = a_x[i];
*ry = a_y[j];
if (ar == 0) goto done;
}
}
if ((a_x[i + 1] - w > 0) && (a_y[j] <= (zh - h)))
{
int ar = 0;
ar = _e_place_coverage_border_add(desk, skiplist, ar,
a_x[i], a_y[j],
w, h);
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
ar = _e_place_coverage_shelf_add(desk->zone, ar,
a_x[i], a_y[j],
w, h);
if (ar < area)
{
area = ar;
*rx = a_x[i];
*ry = a_y[j];
if (ar == 0) goto done;
}
}
if ((a_x[i + 1] - w > 0) && (a_y[j] <= (zh - h)))
{
int ar = 0;
ar = _e_place_coverage_border_add(desk, skiplist, ar,
a_x[i + 1] - w, a_y[j],
w, h);
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
ar = _e_place_coverage_shelf_add(desk->zone, ar,
a_x[i + 1] - w, a_y[j],
w, h);
if (ar < area)
{
area = ar;
*rx = a_x[i + 1] - w;
*ry = a_y[j];
if (ar == 0) goto done;
}
}
if ((a_x[i + 1] - w > 0) && (a_y[j + 1] - h > 0))
{
int ar = 0;
ar = _e_place_coverage_border_add(desk, skiplist, ar,
a_x[i + 1] - w, a_y[j],
w, h);
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
ar = _e_place_coverage_shelf_add(desk->zone, ar,
a_x[i + 1] - w, a_y[j],
w, h);
if (ar < area)
{
area = ar;
*rx = a_x[i + 1] - w;
*ry = a_y[j];
if (ar == 0) goto done;
}
}
if ((a_x[i + 1] - w > 0) && (a_y[j + 1] - h > 0))
{
int ar = 0;
ar = _e_place_coverage_border_add(desk, skiplist, ar,
a_x[i + 1] - w, a_y[j + 1] - h,
w, h);
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
ar = _e_place_coverage_shelf_add(desk->zone, ar,
a_x[i + 1] - w, a_y[j + 1] - h,
w, h);
if (ar < area)
{
area = ar;
*rx = a_x[i + 1] - w;
*ry = a_y[j + 1] - h;
if (ar == 0) goto done;
}
}
if ((a_x[i] <= (zw - w)) && (a_y[j + 1] - h > 0))
{
int ar = 0;
ar = _e_place_coverage_border_add(desk, skiplist, ar,
a_x[i + 1] - w, a_y[j + 1] - h,
w, h);
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
ar = _e_place_coverage_shelf_add(desk->zone, ar,
a_x[i + 1] - w, a_y[j + 1] - h,
w, h);
if (ar < area)
{
area = ar;
*rx = a_x[i + 1] - w;
*ry = a_y[j + 1] - h;
if (ar == 0) goto done;
}
}
if ((a_x[i] <= (zw - w)) && (a_y[j + 1] - h > 0))
{
int ar = 0;
ar = _e_place_coverage_border_add(desk, skiplist, ar,
a_x[i], a_y[j + 1] - h,
w, h);
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
ar = _e_place_coverage_shelf_add(desk->zone, ar,
a_x[i], a_y[j + 1] - h,
w, h);
if (ar < area)
{
area = ar;
*rx = a_x[i];
*ry = a_y[j + 1] - h;
if (ar == 0) goto done;
}
}
}
}
ar = _e_place_coverage_border_add(desk, skiplist, ar,
a_x[i], a_y[j + 1] - h,
w, h);
if (e_config->window_placement_policy == E_WINDOW_PLACEMENT_SMART)
ar = _e_place_coverage_shelf_add(desk->zone, ar,
a_x[i], a_y[j + 1] - h,
w, h);
if (ar < area)
{
area = ar;
*rx = a_x[i];
*ry = a_y[j + 1] - h;
if (ar == 0) goto done;
}
}
}
}
}
done:
done:
E_FREE(a_x);
E_FREE(a_y);
@ -509,3 +509,4 @@ e_place_zone_manual(E_Zone *zone, int w, int h, int *rx, int *ry)
return 1;
}

View File

@ -17,29 +17,29 @@ struct _E_Pointer_Stack
static Eina_List *_e_pointers = NULL;
static Eina_List *handlers = NULL;
static void _e_pointer_canvas_add(E_Pointer *p);
static void _e_pointer_canvas_del(E_Pointer *p);
static void _e_pointer_cb_move(void *data,
Evas *e __UNUSED__,
Evas_Object *obj __UNUSED__,
void *event_info);
static void _e_pointer_canvas_add(E_Pointer *p);
static void _e_pointer_canvas_del(E_Pointer *p);
static void _e_pointer_cb_move(void *data,
Evas *e __UNUSED__,
Evas_Object *obj __UNUSED__,
void *event_info);
static void _e_pointer_free(E_Pointer *p);
static void _e_pointer_stack_free(E_Pointer_Stack *elem);
static void _e_pointer_type_set(E_Pointer *p,
static void _e_pointer_type_set(E_Pointer *p,
const char *type);
static void _e_pointer_active_handle(E_Pointer *p);
static Eina_Bool _e_pointer_cb_mouse_down(void *data,
int type,
int type,
void *event);
static Eina_Bool _e_pointer_cb_mouse_up(void *data,
int type,
int type,
void *event);
static Eina_Bool _e_pointer_cb_mouse_move(void *data,
int type,
int type,
void *event);
static Eina_Bool _e_pointer_cb_mouse_wheel(void *data,
int type,
int type,
void *event);
static Eina_Bool _e_pointer_cb_idle_timer_pre(void *data);
static Eina_Bool _e_pointer_cb_idle_timer_wait(void *data);
@ -77,7 +77,7 @@ e_pointer_shutdown(void)
EAPI E_Pointer *
e_pointer_window_new(Ecore_X_Window win,
int filled)
int filled)
{
E_Pointer *p = NULL;
@ -151,8 +151,8 @@ e_pointer_hide(E_Pointer *p)
}
EAPI void
e_pointer_type_push(E_Pointer *p,
void *obj,
e_pointer_type_push(E_Pointer *p,
void *obj,
const char *type)
{
E_Pointer_Stack *stack;
@ -174,8 +174,8 @@ e_pointer_type_push(E_Pointer *p,
}
EAPI void
e_pointer_type_pop(E_Pointer *p,
void *obj,
e_pointer_type_pop(E_Pointer *p,
void *obj,
const char *type)
{
Eina_List *l;
@ -316,10 +316,10 @@ _e_pointer_canvas_del(E_Pointer *p)
}
static void
_e_pointer_cb_move(void *data,
Evas *e __UNUSED__,
_e_pointer_cb_move(void *data,
Evas *e __UNUSED__,
Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
void *event_info __UNUSED__)
{
E_Pointer *p;
Evas_Coord x, y;
@ -366,7 +366,7 @@ _e_pointer_stack_free(E_Pointer_Stack *elem)
}
static void
_e_pointer_type_set(E_Pointer *p,
_e_pointer_type_set(E_Pointer *p,
const char *type)
{
if (!p) return;
@ -489,7 +489,7 @@ _e_pointer_active_handle(E_Pointer *p)
static Eina_Bool
_e_pointer_cb_mouse_down(void *data __UNUSED__,
int type __UNUSED__,
int type __UNUSED__,
void *event __UNUSED__)
{
Eina_List *l;
@ -510,7 +510,7 @@ _e_pointer_cb_mouse_down(void *data __UNUSED__,
static Eina_Bool
_e_pointer_cb_mouse_up(void *data __UNUSED__,
int type __UNUSED__,
int type __UNUSED__,
void *event __UNUSED__)
{
Eina_List *l;
@ -531,7 +531,7 @@ _e_pointer_cb_mouse_up(void *data __UNUSED__,
static Eina_Bool
_e_pointer_cb_mouse_move(void *data __UNUSED__,
int type __UNUSED__,
int type __UNUSED__,
void *event __UNUSED__)
{
Eina_List *l;
@ -552,7 +552,7 @@ _e_pointer_cb_mouse_move(void *data __UNUSED__,
static Eina_Bool
_e_pointer_cb_mouse_wheel(void *data __UNUSED__,
int type __UNUSED__,
int type __UNUSED__,
void *event __UNUSED__)
{
Eina_List *l;
@ -626,17 +626,17 @@ _e_pointer_cb_idle_poller(void *data)
{
/* it moved - so we are not idle yet - record position and wait
* 4 secons more */
p->x = x;
p->y = y;
if (p->idle)
{
if (p->pointer_object)
edje_object_signal_emit(p->pointer_object,
"e,state,mouse,active", "e");
p->idle = 0;
}
/* use poller to check from now on */
return ECORE_CALLBACK_RENEW;
p->x = x;
p->y = y;
if (p->idle)
{
if (p->pointer_object)
edje_object_signal_emit(p->pointer_object,
"e,state,mouse,active", "e");
p->idle = 0;
}
/* use poller to check from now on */
return ECORE_CALLBACK_RENEW;
}
/* we are idle - report it if not idle before */
if (!p->idle)
@ -647,3 +647,4 @@ _e_pointer_cb_idle_poller(void *data)
}
return ECORE_CALLBACK_RENEW;
}

View File

@ -20,7 +20,7 @@ e_prefix_determine(char *argv0)
if (!pfx) return 0;
_prefix_path_data = eina_prefix_data_get(pfx);
_prefix_path_data_len= strlen(_prefix_path_data);
_prefix_path_data_len = strlen(_prefix_path_data);
#ifdef E_LOGGING
INF("=================================");
INF("Enlightenment relocation handling");
@ -135,3 +135,4 @@ e_prefix_data_snprintf(char *dst, size_t size, const char *fmt, ...)
va_end(ap);
return ret;
}

View File

@ -8,7 +8,7 @@
#define ECORE_X_RANDR_1_2 ((1 << 16) | 2)
#define ECORE_X_RANDR_1_3 ((1 << 16) | 3)
#define Ecore_X_Randr_None 0
#define Ecore_X_Randr_None 0
#define Ecore_X_Randr_Unset -1
/*
@ -89,7 +89,6 @@ _shutdown(void)
_event_listeners_remove();
}
/**
* @return EINA_TRUE if info could be refreshed, else EINA_FALSE
*/
@ -148,7 +147,7 @@ static void
_event_listeners_remove(void)
{
Ecore_Event_Handler *_event_handler = NULL;
EINA_LIST_FREE (_event_handlers, _event_handler)
EINA_LIST_FREE(_event_handlers, _event_handler)
ecore_event_handler_del(_event_handler);
if (e_randr_screen_info.randr_version >= ECORE_X_RANDR_1_2)
@ -156,3 +155,4 @@ _event_listeners_remove(void)
_12_event_listeners_remove();
}
}

View File

@ -30,7 +30,7 @@ _11_screen_info_new(void)
ecore_x_randr_screen_primary_output_current_size_get(e_randr_screen_info.root, NULL, NULL, NULL, NULL, &(randr_info_11->csize_index));
randr_info_11->corientation = ecore_x_randr_screen_primary_output_orientation_get(e_randr_screen_info.root);
randr_info_11->orientations = ecore_x_randr_screen_primary_output_orientations_get(e_randr_screen_info.root);
randr_info_11->rates = malloc(sizeof(Ecore_X_Randr_Refresh_Rate*) * nsizes);
randr_info_11->rates = malloc(sizeof(Ecore_X_Randr_Refresh_Rate *) * nsizes);
randr_info_11->nrates = malloc(sizeof(int) * nsizes);
for (i = 0; i < nsizes; i++)
{
@ -84,5 +84,6 @@ _11_screen_info_refresh(void)
_11_screen_info_free(e_randr_screen_info.rrvd_info.randr_info_11);
e_randr_screen_info.rrvd_info.randr_info_11 = _11_screen_info_new();
return (e_randr_screen_info.rrvd_info.randr_info_11 != NULL);
return e_randr_screen_info.rrvd_info.randr_info_11 != NULL;
}

View File

@ -24,7 +24,7 @@ _serialized_setup_11_new(void)
{
if (e_randr_screen_info.rrvd_info.randr_info_11->csize_index >= e_randr_screen_info.rrvd_info.randr_info_11->nsizes) goto _serialized_setup_11_new_failed_free_ss;
size = e_randr_screen_info.rrvd_info.randr_info_11->sizes + e_randr_screen_info.rrvd_info.randr_info_11->csize_index;
if (!size) goto _serialized_setup_11_new_failed_free_ss;;
if (!size) goto _serialized_setup_11_new_failed_free_ss; ;
rate = e_randr_screen_info.rrvd_info.randr_info_11->current_rate;
ori = e_randr_screen_info.rrvd_info.randr_info_11->corientation;
ss->size.width = size->width;
@ -73,8 +73,8 @@ _11_store_configuration(E_Randr_Configuration_Store_Modifier modifier __UNUSED__
e_config->randr_serialized_setup->serialized_setup_11 = _serialized_setup_11_new();
}
EAPI void e_randr_11_store_configuration(E_Randr_Configuration_Store_Modifier modifier __UNUSED__)
EAPI void
e_randr_11_store_configuration(E_Randr_Configuration_Store_Modifier modifier __UNUSED__)
{
_11_store_configuration(modifier);
e_config_save_queue();
@ -99,11 +99,11 @@ _11_try_restore_configuration(void)
Ecore_X_Randr_Screen_Size_MM *stored_size, *sizes = NULL;
int i = 0, nsizes;
#define SIZE_EQUAL(size) \
((stored_size->width == (size).width) \
&& (stored_size->height == (size).height) \
&& (stored_size->width_mm == (size).width_mm) \
&& (stored_size->height_mm == (size).height_mm))
#define SIZE_EQUAL(size) \
((stored_size->width == (size).width) \
&& (stored_size->height == (size).height) \
&& (stored_size->width_mm == (size).width_mm) \
&& (stored_size->height_mm == (size).height_mm))
if (!e_config->randr_serialized_setup->serialized_setup_11) return EINA_FALSE;
stored_size = &e_config->randr_serialized_setup->serialized_setup_11->size;
@ -137,3 +137,4 @@ _11_try_restore_configuration(void)
return EINA_FALSE;
}

View File

@ -7,7 +7,8 @@ static void _e_randr_ask_memorize_monitor_cb(void *data, E_Dialog *dia);
static E_Randr_Output_Info *_ask_output_info = NULL;
EINTERN void e_randr_12_ask_dialog_new(E_Randr_Output_Info *oi)
EINTERN void
e_randr_12_ask_dialog_new(E_Randr_Output_Info *oi)
{
E_Dialog *dia = NULL;
@ -19,10 +20,10 @@ EINTERN void e_randr_12_ask_dialog_new(E_Randr_Output_Info *oi)
e_dialog_title_set(dia, _("Position of New Monitor"));
e_dialog_icon_set(dia, "display", 64);
e_dialog_text_set(dia, _("<b>Where</b> should the newly connected monitor be put?"));
e_dialog_button_add(dia, _("Left"), "stock-left", _e_randr_ask_cb, (void*)ECORE_X_RANDR_OUTPUT_POLICY_LEFT);
e_dialog_button_add(dia, _("Right"), "stock-right", _e_randr_ask_cb, (void*)ECORE_X_RANDR_OUTPUT_POLICY_RIGHT);
e_dialog_button_add(dia, _("Above"), "stock-top", _e_randr_ask_cb, (void*)ECORE_X_RANDR_OUTPUT_POLICY_ABOVE);
e_dialog_button_add(dia, _("Below"), "stock-bottom", _e_randr_ask_cb, (void*)ECORE_X_RANDR_OUTPUT_POLICY_BELOW);
e_dialog_button_add(dia, _("Left"), "stock-left", _e_randr_ask_cb, (void *)ECORE_X_RANDR_OUTPUT_POLICY_LEFT);
e_dialog_button_add(dia, _("Right"), "stock-right", _e_randr_ask_cb, (void *)ECORE_X_RANDR_OUTPUT_POLICY_RIGHT);
e_dialog_button_add(dia, _("Above"), "stock-top", _e_randr_ask_cb, (void *)ECORE_X_RANDR_OUTPUT_POLICY_ABOVE);
e_dialog_button_add(dia, _("Below"), "stock-bottom", _e_randr_ask_cb, (void *)ECORE_X_RANDR_OUTPUT_POLICY_BELOW);
e_dialog_button_focus_num(dia, 1);
e_win_centered_set(dia->win, 1);
e_dialog_show(dia);
@ -48,7 +49,8 @@ _close_ret:
e_object_del(E_OBJECT(dia));
}
static void e_randr_12_memorize_monitor_dialog_new(void)
static void
e_randr_12_memorize_monitor_dialog_new(void)
{
E_Dialog *dia = NULL;
@ -58,8 +60,8 @@ static void e_randr_12_memorize_monitor_dialog_new(void)
e_dialog_title_set(dia, _("Memorize This Monitor?"));
e_dialog_icon_set(dia, "display", 64);
e_dialog_text_set(dia, _("Should the position of this monitor be <b>memorized</b>?"));
e_dialog_button_add(dia, _("Yes"), "stock-yes", _e_randr_ask_memorize_monitor_cb, (void*)EINA_TRUE);
e_dialog_button_add(dia, _("No"), "stock-no", _e_randr_ask_memorize_monitor_cb, (void*)EINA_FALSE);
e_dialog_button_add(dia, _("Yes"), "stock-yes", _e_randr_ask_memorize_monitor_cb, (void *)EINA_TRUE);
e_dialog_button_add(dia, _("No"), "stock-no", _e_randr_ask_memorize_monitor_cb, (void *)EINA_FALSE);
e_dialog_button_focus_num(dia, 1);
e_win_centered_set(dia->win, 1);
e_dialog_show(dia);
@ -70,12 +72,13 @@ _e_randr_ask_memorize_monitor_cb(void *data, E_Dialog *dia)
{
Eina_Bool memorize = (Eina_Bool)(intptr_t)data;
const E_Randr_Configuration_Store_Modifier modifier = (
E_RANDR_CONFIGURATION_STORE_RESOLUTIONS
| E_RANDR_CONFIGURATION_STORE_ARRANGEMENT
| E_RANDR_CONFIGURATION_STORE_ORIENTATIONS);
E_RANDR_CONFIGURATION_STORE_RESOLUTIONS
| E_RANDR_CONFIGURATION_STORE_ARRANGEMENT
| E_RANDR_CONFIGURATION_STORE_ORIENTATIONS);
if (memorize)
e_randr_store_configuration(modifier);
e_object_del(E_OBJECT(dia));
}

View File

@ -223,7 +223,7 @@ _crtc_according_to_policy_get(E_Randr_Crtc_Info *but, Ecore_X_Randr_Output_Polic
}
// get an initial value for ret
ret = (E_Randr_Crtc_Info*)eina_list_last_data_get(possible_crtcs);
ret = (E_Randr_Crtc_Info *)eina_list_last_data_get(possible_crtcs);
switch (policy)
{
@ -239,7 +239,7 @@ _crtc_according_to_policy_get(E_Randr_Crtc_Info *but, Ecore_X_Randr_Output_Polic
EINA_LIST_FOREACH(e_randr_screen_info.rrvd_info.randr_info_12->crtcs, iter, crtc_info)
{
if ((crtc_info->geometry.x + crtc_info->geometry.w) >
(ret->geometry.x + ret->geometry.w))
(ret->geometry.x + ret->geometry.w))
ret = crtc_info;
}
break;
@ -248,7 +248,7 @@ _crtc_according_to_policy_get(E_Randr_Crtc_Info *but, Ecore_X_Randr_Output_Polic
EINA_LIST_FOREACH(e_randr_screen_info.rrvd_info.randr_info_12->crtcs, iter, crtc_info)
{
if ((crtc_info->geometry.y + crtc_info->geometry.h) >
(ret->geometry.y + ret->geometry.h))
(ret->geometry.y + ret->geometry.h))
ret = crtc_info;
}
break;
@ -272,3 +272,4 @@ _crtc_according_to_policy_get(E_Randr_Crtc_Info *but, Ecore_X_Randr_Output_Polic
eina_list_free(possible_crtcs);
return ret;
}

View File

@ -1,8 +1,8 @@
#include "e_randr_private.h"
#include "e_randr.h"
E_Randr_Monitor_Info *_monitor_info_new(E_Randr_Output_Info *output_info);
static int _modes_size_sort_cb(const void *d1, const void *d2);
E_Randr_Monitor_Info *_monitor_info_new(E_Randr_Output_Info *output_info);
static int _modes_size_sort_cb(const void *d1, const void *d2);
void
_monitor_modes_refs_set(E_Randr_Monitor_Info *mi, Ecore_X_Randr_Output o)
@ -127,13 +127,13 @@ _output_info_free(E_Randr_Output_Info *output_info)
{
EINA_SAFETY_ON_NULL_RETURN(output_info);
eina_list_free(output_info->wired_clones);
eina_list_free(output_info->possible_crtcs);
eina_list_free(output_info->compatibility_list);
eina_stringshare_del(output_info->name);
_monitor_info_free(output_info->monitor);
output_info->monitor = NULL;
free(output_info);
eina_list_free(output_info->wired_clones);
eina_list_free(output_info->possible_crtcs);
eina_list_free(output_info->compatibility_list);
eina_stringshare_del(output_info->name);
_monitor_info_free(output_info->monitor);
output_info->monitor = NULL;
free(output_info);
}
void
@ -177,8 +177,8 @@ _outputs_to_array(Eina_List *outputs_info)
if (!outputs_info || !(ret = malloc(sizeof(Ecore_X_Randr_Output) * eina_list_count(outputs_info)))) return NULL;
EINA_LIST_FOREACH(outputs_info, output_iter, output_info)
/* output_info == NULL should _not_ be possible! */
ret[i++] = output_info ? output_info->xid : Ecore_X_Randr_None;
/* output_info == NULL should _not_ be possible! */
ret[i++] = output_info ? output_info->xid : Ecore_X_Randr_None;
return ret;
}
@ -187,7 +187,8 @@ _outputs_to_array(Eina_List *outputs_info)
* optionally limited by max_size_mode. If none are found, NULL is returned.
*/
Eina_List
*_outputs_common_modes_get(Eina_List *outputs, Ecore_X_Randr_Mode_Info *max_size_mode)
*
_outputs_common_modes_get(Eina_List *outputs, Ecore_X_Randr_Mode_Info *max_size_mode)
{
Eina_List *common_modes = NULL, *mode_iter, *output_iter, *mode_next, *output_next;
E_Randr_Output_Info *output_info;
@ -237,3 +238,4 @@ _modes_size_sort_cb(const void *d1, const void *d2)
return (mode1->width * mode1->height) - (mode2->width * mode2->height);
}

View File

@ -5,10 +5,10 @@
static const char *_POLICIES_STRINGS[] = {"ABOVE", "RIGHT", "BELOW", "LEFT", "CLONE", "NONE"};
static E_Randr_Serialized_Crtc *_serialized_crtc_new(E_Randr_Crtc_Info *crtc_info);
static inline int _sort_by_number_of_edids(const void *d1, const void *d2);
static inline Eina_List *_find_matching_outputs(Eina_List *sois);
static inline E_Randr_Crtc_Info *_find_matching_crtc(E_Randr_Serialized_Crtc *sc);
static E_Randr_Serialized_Crtc *_serialized_crtc_new(E_Randr_Crtc_Info *crtc_info);
static inline int _sort_by_number_of_edids(const void *d1, const void *d2);
static inline Eina_List *_find_matching_outputs(Eina_List *sois);
static inline E_Randr_Crtc_Info *_find_matching_crtc(E_Randr_Serialized_Crtc *sc);
static inline Ecore_X_Randr_Mode_Info *_find_matching_mode_info(Ecore_X_Randr_Mode_Info *mode);
/**********************************************************************
@ -87,8 +87,8 @@ _serialized_crtc_free(E_Randr_Serialized_Crtc *sc)
EINA_SAFETY_ON_NULL_RETURN(sc);
EINA_LIST_FREE (sc->outputs, so)
_serialized_output_free(so);
EINA_LIST_FREE(sc->outputs, so)
_serialized_output_free(so);
_mode_info_free(sc->mode_info);
free(sc);
}
@ -121,7 +121,8 @@ _eina_list_data_index_get(const Eina_List *list, const void *data)
}
Ecore_X_Randr_Mode_Info
*_mode_info_clone(const Ecore_X_Randr_Mode_Info *src)
*
_mode_info_clone(const Ecore_X_Randr_Mode_Info *src)
{
Ecore_X_Randr_Mode_Info *mi = NULL;
@ -142,7 +143,7 @@ Ecore_X_Randr_Mode_Info
mi->vTotal = src->vTotal;
if (src->nameLength > 0)
{
mi->name = (char*)eina_stringshare_add(src->name);
mi->name = (char *)eina_stringshare_add(src->name);
}
mi->nameLength = src->nameLength;
mi->modeFlags = src->modeFlags;
@ -151,7 +152,8 @@ Ecore_X_Randr_Mode_Info
}
E_Randr_Edid_Hash
*_monitor_edid_hash_clone(E_Randr_Monitor_Info *mi)
*
_monitor_edid_hash_clone(E_Randr_Monitor_Info *mi)
{
E_Randr_Edid_Hash *edid_hash;
@ -330,7 +332,7 @@ _outputs_policies_update(Eina_List *sops)
{
E_Randr_Serialized_Output_Policy *sop;
EINA_LIST_FREE (sops, sop)
EINA_LIST_FREE(sops, sop)
{
_serialized_output_policy_free(sop);
}
@ -443,7 +445,7 @@ _12_try_restore_configuration(void)
continue;
}
EINA_LIST_FOREACH(outputs_list, outputs_iter, output_info)
ecore_x_randr_output_mode_add(output_info->xid, mode);
ecore_x_randr_output_mode_add(output_info->xid, mode);
INF("E_RANDR: \tSerialized mode was added to the server manually using the name %s.", mi->name);
}
@ -452,7 +454,7 @@ _12_try_restore_configuration(void)
DBG("E_RANDR: \tRestoring CRTC %d (index %d) in mode %s.", ci->xid, sc->index, (mode == Ecore_X_Randr_None) ? "(disabled)" : mi->name);
DBG("E_RANDR: \t\tUsed outputs:");
EINA_LIST_FOREACH(outputs_list, outputs_iter, output_info)
DBG("\t\t%s", output_info->name);
DBG("\t\t%s", output_info->name);
// DEBUG END
ret &= ecore_x_randr_crtc_settings_set(e_randr_screen_info.root, ci->xid, outputs_array, eina_list_count(outputs_list), sc->pos.x, sc->pos.y, mode, sc->orientation);
@ -470,12 +472,12 @@ _12_serialized_setup_free(E_Randr_Serialized_Setup_12 *ss_12)
if (!ss_12) return;
EINA_LIST_FREE (ss_12->crtcs, sc)
EINA_LIST_FREE(ss_12->crtcs, sc)
{
_serialized_crtc_free(sc);
}
EINA_LIST_FREE (ss_12->edid_hashes, edid_hash)
free(edid_hash);
EINA_LIST_FREE(ss_12->edid_hashes, edid_hash)
free(edid_hash);
free(ss_12);
}
@ -483,7 +485,7 @@ _12_serialized_setup_free(E_Randr_Serialized_Setup_12 *ss_12)
EINTERN void
e_randr_12_serialized_setup_free(E_Randr_Serialized_Setup_12 *ss_12)
{
_12_serialized_setup_free(ss_12);
_12_serialized_setup_free(ss_12);
}
void
@ -491,7 +493,7 @@ _12_store_configuration(E_Randr_Configuration_Store_Modifier modifier)
{
if (modifier & (E_RANDR_CONFIGURATION_STORE_RESOLUTIONS | E_RANDR_CONFIGURATION_STORE_ARRANGEMENT | E_RANDR_CONFIGURATION_STORE_ORIENTATIONS))
{
e_config->randr_serialized_setup->serialized_setups_12 = _12_serialized_setup_update(e_config->randr_serialized_setup->serialized_setups_12);
e_config->randr_serialized_setup->serialized_setups_12 = _12_serialized_setup_update(e_config->randr_serialized_setup->serialized_setups_12);
}
if (modifier & E_RANDR_CONFIGURATION_STORE_POLICIES)
@ -536,7 +538,6 @@ _find_matching_outputs(Eina_List *sois)
INF("E_RANDR: \t\tComparing to output \"%s\"", oi->name);
if (!strncmp(so->name, oi->name, oi->name_length))
{
list = eina_list_append(list, oi);
break;
}
@ -565,18 +566,18 @@ _find_matching_mode_info(Ecore_X_Randr_Mode_Info *mode)
EINA_LIST_FOREACH(e_randr_screen_info.rrvd_info.randr_info_12->modes, iter, mi)
{
#define EQL(arg) (mi->arg == mode->arg)
if (EQL(width) &&
EQL(height) &&
EQL(dotClock) &&
EQL(hSyncStart) &&
EQL(hSyncEnd) &&
EQL(hTotal) &&
EQL(hSkew) &&
EQL(vSyncStart) &&
EQL(vSyncEnd) &&
EQL(vTotal) &&
EQL(modeFlags))
return mi;
if (EQL(width) &&
EQL(height) &&
EQL(dotClock) &&
EQL(hSyncStart) &&
EQL(hSyncEnd) &&
EQL(hTotal) &&
EQL(hSkew) &&
EQL(vSyncStart) &&
EQL(vSyncEnd) &&
EQL(vTotal) &&
EQL(modeFlags))
return mi;
#undef EQL
}
return NULL;
@ -585,8 +586,8 @@ _find_matching_mode_info(Ecore_X_Randr_Mode_Info *mode)
static int
_sort_by_number_of_edids(const void *d1, const void *d2)
{
const E_Randr_Serialized_Setup_12 *ss1 = (const E_Randr_Serialized_Setup_12*)d1;
const E_Randr_Serialized_Setup_12 *ss2 = (const E_Randr_Serialized_Setup_12*)d2;
const E_Randr_Serialized_Setup_12 *ss1 = (const E_Randr_Serialized_Setup_12 *)d1;
const E_Randr_Serialized_Setup_12 *ss2 = (const E_Randr_Serialized_Setup_12 *)d2;
EINA_SAFETY_ON_NULL_RETURN_VAL(ss1, 1);
EINA_SAFETY_ON_NULL_RETURN_VAL(ss2, -1);
@ -596,3 +597,4 @@ _sort_by_number_of_edids(const void *d1, const void *d2)
else
return -1;
}

View File

@ -1,9 +1,9 @@
#include "e_randr_private.h"
#include "e_randr.h"
#define ECORE_X_RANDR_1_1 ((1 << 16) | 1)
#define ECORE_X_RANDR_1_2 ((1 << 16) | 2)
#define ECORE_X_RANDR_1_3 ((1 << 16) | 3)
#define ECORE_X_RANDR_1_1 ((1 << 16) | 1)
#define ECORE_X_RANDR_1_2 ((1 << 16) | 2)
#define ECORE_X_RANDR_1_3 ((1 << 16) | 3)
/**********************************************************************
*
@ -19,11 +19,11 @@ e_randr_store_configuration(E_Randr_Configuration_Store_Modifier modifier)
e_config->randr_serialized_setup = e_randr_serialized_setup_new();
fprintf(stderr, "E_RANDR: Configuration shall be stored using the following modifier:%s\n%s%s%s%s",
((!modifier) ? "NONE" : ""),
((modifier & E_RANDR_CONFIGURATION_STORE_POLICIES) ? "\tPOLICIES\n" : ""),
((modifier & E_RANDR_CONFIGURATION_STORE_RESOLUTIONS) ? "\tRESOLUTIONS\n" : ""),
((modifier & E_RANDR_CONFIGURATION_STORE_ARRANGEMENT) ? "\tARRANGEMENTS\n" : ""),
((modifier & E_RANDR_CONFIGURATION_STORE_ORIENTATIONS) ? "\tORIENTATIONS\n" : ""));
((!modifier) ? "NONE" : ""),
((modifier & E_RANDR_CONFIGURATION_STORE_POLICIES) ? "\tPOLICIES\n" : ""),
((modifier & E_RANDR_CONFIGURATION_STORE_RESOLUTIONS) ? "\tRESOLUTIONS\n" : ""),
((modifier & E_RANDR_CONFIGURATION_STORE_ARRANGEMENT) ? "\tARRANGEMENTS\n" : ""),
((modifier & E_RANDR_CONFIGURATION_STORE_ORIENTATIONS) ? "\tORIENTATIONS\n" : ""));
if (e_randr_screen_info.randr_version == ECORE_X_RANDR_1_1)
{
@ -36,7 +36,7 @@ e_randr_store_configuration(E_Randr_Configuration_Store_Modifier modifier)
e_config_save_queue();
}
EAPI Eina_Bool
EAPI Eina_Bool
e_randr_try_restore_configuration(void)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(e_config, EINA_FALSE);
@ -54,10 +54,10 @@ e_randr_try_restore_configuration(void)
EINTERN E_Randr_Serialized_Setup *
e_randr_serialized_setup_new(void)
{
return E_NEW(E_Randr_Serialized_Setup, 1);
return E_NEW(E_Randr_Serialized_Setup, 1);
}
EINTERN void
EINTERN void
e_randr_serialized_setup_free(E_Randr_Serialized_Setup *ss)
{
E_Randr_Serialized_Setup_12 *serialized_setup_12 = NULL;
@ -79,3 +79,4 @@ e_randr_serialized_setup_free(E_Randr_Serialized_Setup *ss)
}
free(ss);
}

View File

@ -603,7 +603,7 @@ _e_remember_cb_hook_eval_post_new_border(void *data __UNUSED__, void *border)
if (!strncmp(bd->client.icccm.class, "e_fwin", 6))
{
if (!(e_config->remember_internal_windows & E_REMEMBER_INTERNAL_FM_WINS) &&
(!e_config->remember_internal_fm_windows))
(!e_config->remember_internal_fm_windows))
return;
}
else
@ -820,15 +820,15 @@ _e_remember_cb_hook_pre_post_fetch(void *data __UNUSED__, void *border)
// if (bd->zone->h != rem->prop.res_y)
// bd->y = (rem->prop.pos_y * bd->zone->h) / rem->prop.res_y;
if (
/* upper left */
(!E_INSIDE(bd->x, bd->y, 0, 0, bd->zone->w, bd->zone->h)) &&
/* upper right */
(!E_INSIDE(bd->x + bd->w, bd->y, 0, 0, bd->zone->w, bd->zone->h)) &&
/* lower left */
(!E_INSIDE(bd->x, bd->y + bd->h, 0, 0, bd->zone->w, bd->zone->h)) &&
/* lower right */
(!E_INSIDE(bd->x + bd->w, bd->y + bd->h, 0, 0, bd->zone->w, bd->zone->h))
)
/* upper left */
(!E_INSIDE(bd->x, bd->y, 0, 0, bd->zone->w, bd->zone->h)) &&
/* upper right */
(!E_INSIDE(bd->x + bd->w, bd->y, 0, 0, bd->zone->w, bd->zone->h)) &&
/* lower left */
(!E_INSIDE(bd->x, bd->y + bd->h, 0, 0, bd->zone->w, bd->zone->h)) &&
/* lower right */
(!E_INSIDE(bd->x + bd->w, bd->y + bd->h, 0, 0, bd->zone->w, bd->zone->h))
)
{
e_border_center_pos_get(bd, &bd->x, &bd->y);
rem->prop.pos_x = bd->x, rem->prop.pos_y = bd->y;

View File

@ -23,16 +23,18 @@ e_scale_update(void)
if (e_config->scale.use_dpi)
{
dpi = ecore_x_dpi_get();
e_scale = (double)dpi / (double)e_config->scale.base_dpi;
if (e_scale > e_config->scale.max) e_scale = e_config->scale.max;
else if (e_scale < e_config->scale.min) e_scale = e_config->scale.min;
dpi = ecore_x_dpi_get();
e_scale = (double)dpi / (double)e_config->scale.base_dpi;
if (e_scale > e_config->scale.max) e_scale = e_config->scale.max;
else if (e_scale < e_config->scale.min)
e_scale = e_config->scale.min;
}
else if (e_config->scale.use_custom)
{
e_scale = e_config->scale.factor;
if (e_scale > e_config->scale.max) e_scale = e_config->scale.max;
else if (e_scale < e_config->scale.min) e_scale = e_config->scale.min;
e_scale = e_config->scale.factor;
if (e_scale > e_config->scale.max) e_scale = e_config->scale.max;
else if (e_scale < e_config->scale.min)
e_scale = e_config->scale.min;
}
edje_scale_set(e_scale);
@ -40,3 +42,4 @@ e_scale_update(void)
e_util_env_set("E_SCALE", buf);
e_hints_scale_update();
}

View File

@ -30,12 +30,12 @@ EAPI int
e_screensaver_timeout_get(Eina_Bool use_idle)
{
int timeout = 0, count = (1 + _e_screensaver_ask_presentation_count);
if ((e_config->screensaver_enable) && (!e_config->mode.presentation) &&
((e_config->screen_actions_fullscreen_windows_ignore) ||
((!e_config->screen_actions_fullscreen_windows_ignore) && (!e_util_fullscreen_any()))))
timeout = e_config->screensaver_timeout * count;
if ((use_idle) && (!e_config->mode.presentation) &&
((e_config->screen_actions_fullscreen_windows_ignore) ||
((!e_config->screen_actions_fullscreen_windows_ignore) && (!e_util_fullscreen_any()))))
@ -61,7 +61,7 @@ e_screensaver_update(void)
Eina_Bool changed = EINA_FALSE;
timeout = e_screensaver_timeout_get(EINA_TRUE);
interval = e_config->screensaver_interval;
blanking = e_config->screensaver_blanking;
expose = e_config->screensaver_expose;
@ -183,20 +183,20 @@ _e_screensaver_ask_presentation_mode(void)
e_dialog_title_set(dia, _("Activate Presentation Mode?"));
e_dialog_icon_set(dia, "dialog-ask", 64);
e_dialog_text_set(dia,
_("You disabled the screensaver too fast.<br><br>"
"Would you like to enable <b>presentation</b> mode and "
"temporarily disable screen saver, lock and power saving?"));
_("You disabled the screensaver too fast.<br><br>"
"Would you like to enable <b>presentation</b> mode and "
"temporarily disable screen saver, lock and power saving?"));
e_object_del_attach_func_set(E_OBJECT(dia),
_e_screensaver_ask_presentation_del);
_e_screensaver_ask_presentation_del);
e_dialog_button_add(dia, _("Yes"), NULL,
_e_screensaver_ask_presentation_yes, NULL);
_e_screensaver_ask_presentation_yes, NULL);
e_dialog_button_add(dia, _("No"), NULL,
_e_screensaver_ask_presentation_no, NULL);
_e_screensaver_ask_presentation_no, NULL);
e_dialog_button_add(dia, _("No, but increase timeout"), NULL,
_e_screensaver_ask_presentation_no_increase, NULL);
_e_screensaver_ask_presentation_no_increase, NULL);
e_dialog_button_add(dia, _("No, and stop asking"), NULL,
_e_screensaver_ask_presentation_no_forever, NULL);
_e_screensaver_ask_presentation_no_forever, NULL);
e_dialog_button_focus_num(dia, 0);
e_widget_list_homogeneous_set(dia->box_object, 0);
@ -204,7 +204,7 @@ _e_screensaver_ask_presentation_mode(void)
e_dialog_show(dia);
evas_object_event_callback_add(dia->bg_object, EVAS_CALLBACK_KEY_DOWN,
_e_screensaver_ask_presentation_key_down, dia);
_e_screensaver_ask_presentation_key_down, dia);
_e_screensaver_ask_presentation_dia = dia;
}
@ -217,7 +217,7 @@ _e_screensaver_suspend_cb(void *data __UNUSED__)
{
if ((e_config->screensaver_suspend_on_ac) ||
(e_powersave_mode_get() > E_POWERSAVE_MODE_LOW))
e_sys_action_do(E_SYS_SUSPEND, NULL);
e_sys_action_do(E_SYS_SUSPEND, NULL);
}
return EINA_FALSE;
}
@ -228,10 +228,10 @@ _e_screensaver_handler_powersave_cb(void *data __UNUSED__, int type __UNUSED__,
if ((e_config->screensaver_suspend) && (_e_screensaver_on))
{
if (_e_screensaver_suspend_timer)
ecore_timer_del(_e_screensaver_suspend_timer);
ecore_timer_del(_e_screensaver_suspend_timer);
_e_screensaver_suspend_timer =
ecore_timer_add(e_config->screensaver_suspend_delay,
_e_screensaver_suspend_cb, NULL);
ecore_timer_add(e_config->screensaver_suspend_delay,
_e_screensaver_suspend_cb, NULL);
}
return ECORE_CALLBACK_PASS_ON;
}
@ -249,8 +249,8 @@ _e_screensaver_handler_screensaver_on_cb(void *data __UNUSED__, int type __UNUSE
}
if (e_config->screensaver_suspend)
_e_screensaver_suspend_timer =
ecore_timer_add(e_config->screensaver_suspend_delay,
_e_screensaver_suspend_cb, NULL);
ecore_timer_add(e_config->screensaver_suspend_delay,
_e_screensaver_suspend_cb, NULL);
last_start = ecore_loop_time_get();
_e_screensaver_ask_presentation_count = 0;
return ECORE_CALLBACK_PASS_ON;
@ -261,7 +261,7 @@ _e_screensaver_handler_screensaver_off_cb(void *data __UNUSED__, int type __UNUS
{
// e_screensaver_force_update();
// e_dpms_force_update();
_e_screensaver_on = EINA_FALSE;
if (_e_screensaver_suspend_timer)
{
@ -270,12 +270,12 @@ _e_screensaver_handler_screensaver_off_cb(void *data __UNUSED__, int type __UNUS
}
if ((last_start > 0.0) && (e_config->screensaver_ask_presentation))
{
double current = ecore_loop_time_get();
if ((last_start + e_config->screensaver_ask_presentation_timeout)
double current = ecore_loop_time_get();
if ((last_start + e_config->screensaver_ask_presentation_timeout)
>= current)
_e_screensaver_ask_presentation_mode();
last_start = 0.0;
_e_screensaver_ask_presentation_mode();
last_start = 0.0;
}
else if (_e_screensaver_ask_presentation_count)
_e_screensaver_ask_presentation_count = 0;
@ -304,9 +304,9 @@ _e_screensaver_handler_screensaver_notify_cb(void *data __UNUSED__, int type __U
saver_on = EINA_TRUE;
if (e_config->backlight.idle_dim)
{
double t = e_config->screensaver_timeout -
double t = e_config->screensaver_timeout -
e_config->backlight.timer;
if (t < 1.0) t = 1.0;
if (idle_timer)
{
@ -315,7 +315,7 @@ _e_screensaver_handler_screensaver_notify_cb(void *data __UNUSED__, int type __U
}
if (e_config->screensaver_enable)
idle_timer = ecore_timer_add
(t, _e_screensaver_idle_timer_cb, NULL);
(t, _e_screensaver_idle_timer_cb, NULL);
if (e_backlight_mode_get(NULL) != E_BACKLIGHT_MODE_DIM)
{
e_backlight_mode_set(NULL, E_BACKLIGHT_MODE_DIM);
@ -390,34 +390,34 @@ e_screensaver_init(void)
ecore_x_screensaver_custom_blanking_enable();
_e_screensaver_handler_on = ecore_event_handler_add
(E_EVENT_SCREENSAVER_ON, _e_screensaver_handler_screensaver_on_cb, NULL);
(E_EVENT_SCREENSAVER_ON, _e_screensaver_handler_screensaver_on_cb, NULL);
_e_screensaver_handler_off = ecore_event_handler_add
(E_EVENT_SCREENSAVER_OFF, _e_screensaver_handler_screensaver_off_cb, NULL);
(E_EVENT_SCREENSAVER_OFF, _e_screensaver_handler_screensaver_off_cb, NULL);
_e_screensaver_handler_screensaver_notify = ecore_event_handler_add
(ECORE_X_EVENT_SCREENSAVER_NOTIFY, _e_screensaver_handler_screensaver_notify_cb, NULL);
(ECORE_X_EVENT_SCREENSAVER_NOTIFY, _e_screensaver_handler_screensaver_notify_cb, NULL);
_e_screensaver_handler_config_mode = ecore_event_handler_add
(E_EVENT_CONFIG_MODE_CHANGED, _e_screensaver_handler_config_mode_cb, NULL);
(E_EVENT_CONFIG_MODE_CHANGED, _e_screensaver_handler_config_mode_cb, NULL);
_e_screensaver_handler_border_fullscreen = ecore_event_handler_add
(E_EVENT_BORDER_FULLSCREEN, _e_screensaver_handler_border_fullscreen_check_cb, NULL);
(E_EVENT_BORDER_FULLSCREEN, _e_screensaver_handler_border_fullscreen_check_cb, NULL);
_e_screensaver_handler_border_unfullscreen = ecore_event_handler_add
(E_EVENT_BORDER_UNFULLSCREEN, _e_screensaver_handler_border_fullscreen_check_cb, NULL);
(E_EVENT_BORDER_UNFULLSCREEN, _e_screensaver_handler_border_fullscreen_check_cb, NULL);
_e_screensaver_handler_border_remove = ecore_event_handler_add
(E_EVENT_BORDER_REMOVE, _e_screensaver_handler_border_fullscreen_check_cb, NULL);
(E_EVENT_BORDER_REMOVE, _e_screensaver_handler_border_fullscreen_check_cb, NULL);
_e_screensaver_handler_border_iconify = ecore_event_handler_add
(E_EVENT_BORDER_ICONIFY, _e_screensaver_handler_border_fullscreen_check_cb, NULL);
(E_EVENT_BORDER_ICONIFY, _e_screensaver_handler_border_fullscreen_check_cb, NULL);
_e_screensaver_handler_border_uniconify = ecore_event_handler_add
(E_EVENT_BORDER_UNICONIFY, _e_screensaver_handler_border_fullscreen_check_cb, NULL);
(E_EVENT_BORDER_UNICONIFY, _e_screensaver_handler_border_fullscreen_check_cb, NULL);
_e_screensaver_handler_border_desk_set = ecore_event_handler_add
(E_EVENT_BORDER_DESK_SET, _e_screensaver_handler_border_desk_set_cb, NULL);
(E_EVENT_BORDER_DESK_SET, _e_screensaver_handler_border_desk_set_cb, NULL);
_e_screensaver_handler_desk_show = ecore_event_handler_add
(E_EVENT_DESK_SHOW, _e_screensaver_handler_desk_show_cb, NULL);
(E_EVENT_DESK_SHOW, _e_screensaver_handler_desk_show_cb, NULL);
_e_screensaver_handler_powersave = ecore_event_handler_add
(E_EVENT_POWERSAVE_UPDATE, _e_screensaver_handler_powersave_cb, NULL);
(E_EVENT_POWERSAVE_UPDATE, _e_screensaver_handler_powersave_cb, NULL);
_e_screensaver_timeout = ecore_x_screensaver_timeout_get();
// _e_screensaver_interval = ecore_x_screensaver_interval_get();
_e_screensaver_blanking = ecore_x_screensaver_blank_get();
@ -442,13 +442,13 @@ e_screensaver_shutdown(void)
ecore_event_handler_del(_e_screensaver_handler_off);
_e_screensaver_handler_off = NULL;
}
if (_e_screensaver_suspend_timer)
{
ecore_timer_del(_e_screensaver_suspend_timer);
_e_screensaver_suspend_timer = NULL;
}
ecore_x_screensaver_custom_blanking_disable();
if (_e_screensaver_handler_powersave)
@ -513,3 +513,4 @@ e_screensaver_shutdown(void)
return 1;
}

View File

@ -62,7 +62,7 @@ struct _E_Smart_Data
unsigned char vbar_visible : 1;
unsigned char extern_pan : 1;
unsigned char one_dir_at_a_time : 1;
Eina_Bool key_nav : 1;
Eina_Bool key_nav : 1;
};
/* local subsystem functions */
@ -276,7 +276,7 @@ e_scrollframe_child_region_show(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Ev
/* Abort if the request region is already shown */
if ((px <= x) && (py <= y) && (x + w <= px + vw) && (y + h <= py + vh))
return;
return;
nx = px;
if (x < px) nx = x;
@ -394,15 +394,15 @@ e_scrollframe_key_navigation_set(Evas_Object *obj, Eina_Bool enabled)
{
API_ENTRY return;
if (enabled == sd->key_nav)
return;
return;
sd->key_nav = enabled;
if (sd->key_nav)
evas_object_event_callback_add(obj, EVAS_CALLBACK_KEY_DOWN,
_e_smart_event_key_down, sd);
evas_object_event_callback_add(obj, EVAS_CALLBACK_KEY_DOWN,
_e_smart_event_key_down, sd);
else
evas_object_event_callback_del_full(obj, EVAS_CALLBACK_KEY_DOWN,
_e_smart_event_key_down, sd);
evas_object_event_callback_del_full(obj, EVAS_CALLBACK_KEY_DOWN,
_e_smart_event_key_down, sd);
}
/* local subsystem functions */
@ -1157,3 +1157,4 @@ _e_smart_init(void)
_e_smart = evas_smart_class_new(&sc);
}
}

View File

@ -24,12 +24,12 @@ e_sha1_sum(unsigned char *data, int size, unsigned char *dst)
unsigned char buf[64], *d;
int idx, left, i;
const unsigned int magic[4] =
{
0x5a827999,
0x6ed9eba1,
0x8f1bbcdc,
0xca62c1d6
};
{
0x5a827999,
0x6ed9eba1,
0x8f1bbcdc,
0xca62c1d6
};
idx = 0;
digest[0] = 0x67452301;
@ -41,62 +41,62 @@ e_sha1_sum(unsigned char *data, int size, unsigned char *dst)
memset(buf, 0, sizeof(buf));
for (left = size, d = data; left > 0; left--, d++)
{
if ((idx == 0) && (left < 64))
{
memset(buf, 0, 60);
buf[60] = (size >> 24) & 0xff;
buf[61] = (size >> 16) & 0xff;
buf[62] = (size >> 8) & 0xff;
buf[63] = (size ) & 0xff;
}
buf[idx] = *d;
idx++;
if ((idx == 64) || (left == 1))
{
if ((left == 1) && (idx < 64)) buf[idx] = 0x80;
for (i = 0; i < 16; i++)
{
word[i] = (unsigned int)buf[(i * 4) ] << 24;
word[i] |= (unsigned int)buf[(i * 4) + 1] << 16;
word[i] |= (unsigned int)buf[(i * 4) + 2] << 8;
word[i] |= (unsigned int)buf[(i * 4) + 3];
}
for (i = 16; i < 80; i++)
word[i] = SHSH(1,
word[i - 3 ] ^ word[i - 8 ] ^
word[i - 14] ^ word[i - 16]);
wa = digest[0];
wb = digest[1];
wc = digest[2];
wd = digest[3];
we = digest[4];
if ((idx == 0) && (left < 64))
{
memset(buf, 0, 60);
buf[60] = (size >> 24) & 0xff;
buf[61] = (size >> 16) & 0xff;
buf[62] = (size >> 8) & 0xff;
buf[63] = (size) & 0xff;
}
buf[idx] = *d;
idx++;
if ((idx == 64) || (left == 1))
{
if ((left == 1) && (idx < 64)) buf[idx] = 0x80;
for (i = 0; i < 16; i++)
{
word[i] = (unsigned int)buf[(i * 4) ] << 24;
word[i] |= (unsigned int)buf[(i * 4) + 1] << 16;
word[i] |= (unsigned int)buf[(i * 4) + 2] << 8;
word[i] |= (unsigned int)buf[(i * 4) + 3];
}
for (i = 16; i < 80; i++)
word[i] = SHSH(1,
word[i - 3 ] ^ word[i - 8 ] ^
word[i - 14] ^ word[i - 16]);
wa = digest[0];
wb = digest[1];
wc = digest[2];
wd = digest[3];
we = digest[4];
for (i = 0; i < 80; i++)
{
if (i < 20)
t = SHSH(5, wa) + ((wb & wc) | ((~wb) & wd)) +
we + word[i] + magic[0];
else if (i < 40)
t = SHSH(5, wa) + (wb ^ wc ^ wd) +
we + word[i] + magic[1];
else if (i < 60)
t = SHSH(5, wa) + ((wb & wc) | (wb & wd) | (wc & wd)) +
we + word[i] + magic[2];
else if (i < 80)
t = SHSH(5, wa) + (wb ^ wc ^ wd) +
we + word[i] + magic[3];
we = wd;
wd = wc;
wc = SHSH(30, wb);
wb = wa;
wa = t;
}
digest[0] += wa;
digest[1] += wb;
digest[2] += wc;
digest[3] += wd;
digest[4] += we;
idx = 0;
}
{
if (i < 20)
t = SHSH(5, wa) + ((wb & wc) | ((~wb) & wd)) +
we + word[i] + magic[0];
else if (i < 40)
t = SHSH(5, wa) + (wb ^ wc ^ wd) +
we + word[i] + magic[1];
else if (i < 60)
t = SHSH(5, wa) + ((wb & wc) | (wb & wd) | (wc & wd)) +
we + word[i] + magic[2];
else if (i < 80)
t = SHSH(5, wa) + (wb ^ wc ^ wd) +
we + word[i] + magic[3];
we = wd;
wd = wc;
wc = SHSH(30, wb);
wb = wa;
wa = t;
}
digest[0] += wa;
digest[1] += wb;
digest[2] += wc;
digest[3] += wd;
digest[4] += we;
idx = 0;
}
}
t = htonl(digest[0]); digest[0] = t;

View File

@ -33,11 +33,11 @@ static const char *_e_shelf_orient_icon_name_get(E_Shelf *s);
static void _e_shelf_bindings_add(E_Shelf *es);
static void _e_shelf_bindings_del(E_Shelf *es);
static Eina_Bool _e_shelf_on_current_desk(E_Shelf *es, E_Event_Zone_Edge *ev);
static void _e_shelf_cb_dummy_del(E_Shelf *, Evas *e, Evas_Object *obj, void *event_info);
static void _e_shelf_cb_dummy_moveresize(E_Shelf *, Evas *e, Evas_Object *obj, void *event_info);
static void _e_shelf_cb_dummy_del(E_Shelf *, Evas *e, Evas_Object *obj, void *event_info);
static void _e_shelf_cb_dummy_moveresize(E_Shelf *, Evas *e, Evas_Object *obj, void *event_info);
static Eina_Bool _e_shelf_gadcon_populate_handler_cb(void *, int, void *);
static Eina_Bool _e_shelf_module_init_end_handler_cb(void *, int, void *);
static void _e_shelf_event_rename_end_cb(void *data, E_Event_Shelf *ev);
static void _e_shelf_event_rename_end_cb(void *data, E_Event_Shelf *ev);
static Eina_List *shelves = NULL;
static Eina_List *dummies = NULL;
@ -160,7 +160,7 @@ e_shelf_list_all(void)
if (s && d)
ret = eina_list_merge(s, d);
else
ret = d ?: s;
ret = d ? : s;
return ret;
}
@ -180,17 +180,17 @@ e_shelf_zone_dummy_new(E_Zone *zone, Evas_Object *obj, int id)
if (!es) return NULL;
es->id = id;
evas_object_geometry_get(obj, &es->x, &es->y, &es->w, &es->h);
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
(Evas_Object_Event_Cb)_e_shelf_cb_dummy_del, es);
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE,
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE,
(Evas_Object_Event_Cb)_e_shelf_cb_dummy_moveresize, es);
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE,
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE,
(Evas_Object_Event_Cb)_e_shelf_cb_dummy_moveresize, es);
es->zone = zone;
es->dummy = 1;
es->o_base = obj;
es->cfg = E_NEW(E_Config_Shelf, 1);
e_object_del_attach_func_set(E_OBJECT(es), _e_shelf_del_cb);
dummies = eina_list_append(dummies, es);
@ -232,24 +232,24 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, E
es->o_event = evas_object_rectangle_add(es->evas);
evas_object_color_set(es->o_event, 0, 0, 0, 0);
evas_object_resize(es->o_event, es->w, es->h);
evas_object_event_callback_add(es->o_event, EVAS_CALLBACK_MOUSE_DOWN,
evas_object_event_callback_add(es->o_event, EVAS_CALLBACK_MOUSE_DOWN,
_e_shelf_cb_mouse_down, es);
es->handlers =
es->handlers =
eina_list_append(es->handlers,
ecore_event_handler_add(E_EVENT_ZONE_EDGE_MOVE,
ecore_event_handler_add(E_EVENT_ZONE_EDGE_MOVE,
_e_shelf_cb_mouse_in, es));
es->o_base = edje_object_add(es->evas);
es->name = eina_stringshare_add(name);
evas_object_resize(es->o_base, es->w, es->h);
e_shelf_style_set(es, style);
if (es->popup)
{
evas_object_show(es->o_event);
evas_object_show(es->o_base);
ecore_x_netwm_window_type_set(es->popup->evas_win,
ecore_x_netwm_window_type_set(es->popup->evas_win,
ECORE_X_WINDOW_TYPE_DOCK);
}
else
@ -260,15 +260,15 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, E
evas_object_layer_set(es->o_base, layer);
}
es->gadcon =
es->gadcon =
e_gadcon_swallowed_new(es->name, es->id, es->o_base, "e.swallow.content");
if (es->name)
snprintf(buf, sizeof(buf), "%s", es->name);
else
snprintf(buf, sizeof(buf), _("Shelf #%d"), es->id);
es->gadcon->location =
e_gadcon_location_new(buf, E_GADCON_SITE_SHELF,
_e_shelf_gadcon_client_add, es,
es->gadcon->location =
e_gadcon_location_new(buf, E_GADCON_SITE_SHELF,
_e_shelf_gadcon_client_add, es,
_e_shelf_gadcon_client_remove, es);
e_gadcon_location_register(es->gadcon->location);
// hmm dnd in ibar and ibox kill this. ok. need to look into this more
@ -631,7 +631,7 @@ e_shelf_orient(E_Shelf *es, E_Gadcon_Orient orient)
E_OBJECT_CHECK(es);
E_OBJECT_IF_NOT_TYPE(es, E_SHELF_DUMMY_TYPE)
E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
if (!es->dummy)
{
@ -640,7 +640,7 @@ e_shelf_orient(E_Shelf *es, E_Gadcon_Orient orient)
e_shelf_orient_string_get(es));
edje_object_signal_emit(es->o_base, buf, "e");
edje_object_message_signal_process(es->o_base);
e_gadcon_location_set_icon_name(es->gadcon->location,
e_gadcon_location_set_icon_name(es->gadcon->location,
_e_shelf_orient_icon_name_get(es));
}
e_zone_useful_geometry_dirty(es->zone);
@ -869,18 +869,21 @@ e_shelf_position_calc(E_Shelf *es)
if (!e_zone_exists_direction(es->zone, E_ZONE_EDGE_LEFT)) break;
err = EINA_TRUE;
break;
case E_GADCON_ORIENT_RIGHT:
case E_GADCON_ORIENT_CORNER_RT:
case E_GADCON_ORIENT_CORNER_RB:
if (!e_zone_exists_direction(es->zone, E_ZONE_EDGE_RIGHT)) break;
err = EINA_TRUE;
break;
case E_GADCON_ORIENT_TOP:
case E_GADCON_ORIENT_CORNER_TL:
case E_GADCON_ORIENT_CORNER_TR:
if (!e_zone_exists_direction(es->zone, E_ZONE_EDGE_TOP)) break;
err = EINA_TRUE;
break;
case E_GADCON_ORIENT_BOTTOM:
case E_GADCON_ORIENT_CORNER_BL:
case E_GADCON_ORIENT_CORNER_BR:
@ -988,7 +991,7 @@ e_shelf_popup_set(E_Shelf *es, int popup)
evas_object_show(es->o_event);
evas_object_show(es->o_base);
e_popup_edje_bg_object_set(es->popup, es->o_base);
ecore_x_netwm_window_type_set(es->popup->evas_win,
ecore_x_netwm_window_type_set(es->popup->evas_win,
ECORE_X_WINDOW_TYPE_DOCK);
e_drop_xdnd_register_set(es->popup->evas_win, 1);
@ -1040,23 +1043,23 @@ e_shelf_autohide_set(E_Shelf *es, int autohide_type)
es->autohide = NULL;
/*
* see FIXME in _e_shelf_cb_mouse_in() for why these are commented out
es->handlers =
es->handlers =
eina_list_append(es->handlers,
ecore_event_handler_add(ECORE_X_EVENT_MOUSE_IN,
ecore_event_handler_add(ECORE_X_EVENT_MOUSE_IN,
_e_shelf_cb_mouse_in, es));
*/
*/
if (!es->cfg->autohide_show_action)
es->autohide = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE,
es->autohide = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE,
_e_shelf_cb_mouse_in, es);
/*
es->handlers =
es->handlers =
eina_list_append(es->handlers,
ecore_event_handler_add(ECORE_X_EVENT_MOUSE_OUT,
ecore_event_handler_add(ECORE_X_EVENT_MOUSE_OUT,
_e_shelf_cb_mouse_out, es));
if (!popup)
evas_object_event_callback_add(es->o_event, EVAS_CALLBACK_MOUSE_OUT,
evas_object_event_callback_add(es->o_event, EVAS_CALLBACK_MOUSE_OUT,
(Evas_Object_Event_Cb)_e_shelf_cb_mouse_out2, es);
*/
*/
}
EAPI E_Shelf *
@ -1120,8 +1123,8 @@ e_shelf_new_dialog(E_Zone *zone)
snprintf(buf, sizeof(buf), _("Shelf #%d"), eina_list_count(e_config->shelves));
return e_entry_dialog_show(_("Add New Shelf"), "preferences-desktop-shelf",
_("Name:"), buf, NULL, NULL,
_e_shelf_new_dialog_ok, NULL, zone);
_("Name:"), buf, NULL, NULL,
_e_shelf_new_dialog_ok, NULL, zone);
}
/* local subsystem functions */
@ -1266,11 +1269,11 @@ _e_shelf_free(E_Shelf *es)
}
if (es->dummy)
{
evas_object_event_callback_del_full(es->o_base, EVAS_CALLBACK_DEL,
evas_object_event_callback_del_full(es->o_base, EVAS_CALLBACK_DEL,
(Evas_Object_Event_Cb)_e_shelf_cb_dummy_del, es);
evas_object_event_callback_del_full(es->o_base, EVAS_CALLBACK_MOVE,
evas_object_event_callback_del_full(es->o_base, EVAS_CALLBACK_MOVE,
(Evas_Object_Event_Cb)_e_shelf_cb_dummy_moveresize, es);
evas_object_event_callback_del_full(es->o_base, EVAS_CALLBACK_RESIZE,
evas_object_event_callback_del_full(es->o_base, EVAS_CALLBACK_RESIZE,
(Evas_Object_Event_Cb)_e_shelf_cb_dummy_moveresize, es);
}
else
@ -1784,11 +1787,11 @@ _e_shelf_cb_menu_delete(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUS
}
e_object_ref(E_OBJECT(es));
e_confirm_dialog_show(_("Are you sure you want to delete this shelf?"),
e_confirm_dialog_show(_("Are you sure you want to delete this shelf?"),
"enlightenment",
_("You requested to delete this shelf.<br>"
"<br>"
"Are you sure you want to delete it?"),
"Are you sure you want to delete it?"),
_("Delete"), _("Keep"),
_e_shelf_cb_confirm_dialog_yes, NULL, data, NULL,
_e_shelf_cb_confirm_dialog_destroy, data);
@ -1927,30 +1930,30 @@ _e_shelf_cb_mouse_in(void *data, int type, void *event)
else
e_shelf_toggle(es, 0);
}
/*
else if (type == ECORE_X_EVENT_MOUSE_IN)
{
Ecore_X_Event_Mouse_In *ev;
/*
else if (type == ECORE_X_EVENT_MOUSE_IN)
{
Ecore_X_Event_Mouse_In *ev;
ev = event;
if ((!es->hidden) && (!es->menu))
{
int x, y, w, h;
evas_object_geometry_get(es->o_event, &x, &y, &w, &h);
if (!E_INSIDE(ev->x, ev->y, x, y, w, h))
e_shelf_toggle(es, 0);
}
if (!es->popup) return ECORE_CALLBACK_PASS_ON;
if (ev->win == es->popup->evas_win)
{
if (es->hidden || (!es->toggle))
{
edje_object_signal_emit(es->o_base, "e,state,focused", "e");
e_shelf_toggle(es, 1);
}
}
}
*/
ev = event;
if ((!es->hidden) && (!es->menu))
{
int x, y, w, h;
evas_object_geometry_get(es->o_event, &x, &y, &w, &h);
if (!E_INSIDE(ev->x, ev->y, x, y, w, h))
e_shelf_toggle(es, 0);
}
if (!es->popup) return ECORE_CALLBACK_PASS_ON;
if (ev->win == es->popup->evas_win)
{
if (es->hidden || (!es->toggle))
{
edje_object_signal_emit(es->o_base, "e,state,focused", "e");
e_shelf_toggle(es, 1);
}
}
}
*/
else if (type == ECORE_EVENT_MOUSE_MOVE)
{
Ecore_Event_Mouse_Move *ev;
@ -1970,10 +1973,10 @@ _e_shelf_cb_mouse_in(void *data, int type, void *event)
x = ev->root.x - es->zone->x, y = ev->root.y - es->zone->y;
if (inside)
inside = (
((E_INSIDE(x, y, es->x, es->y, es->w, es->h)) ||
(E_INSIDE(x, y, es->x - 2, es->y - 2, es->w + 4, es->h + 4)) ||
(E_INSIDE(x, y, es->x + 2, es->y + 2, es->w + 4, es->h + 4)))
);
((E_INSIDE(x, y, es->x, es->y, es->w, es->h)) ||
(E_INSIDE(x, y, es->x - 2, es->y - 2, es->w + 4, es->h + 4)) ||
(E_INSIDE(x, y, es->x + 2, es->y + 2, es->w + 4, es->h + 4)))
);
if (inside && es->popup)
{
if (es->autohide_timer)
@ -1998,6 +2001,7 @@ _e_shelf_cb_mouse_in(void *data, int type, void *event)
}
return ECORE_CALLBACK_PASS_ON;
}
#if 0
static void
_e_shelf_cb_mouse_out2(E_Shelf *es, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, Evas_Event_Mouse_Out *ev)
@ -2052,6 +2056,7 @@ _e_shelf_cb_mouse_out(void *data, int type, void *event)
}
return ECORE_CALLBACK_PASS_ON;
}
#endif
static void
_e_shelf_cb_dummy_moveresize(E_Shelf *es, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
@ -2360,9 +2365,9 @@ _e_shelf_cb_menu_rename(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUS
E_Shelf *es = data;
if (es->rename_dialog) return;
es->rename_dialog = e_entry_dialog_show(_("Rename Shelf"), "edit-rename",
_("Name:"), es->name, NULL, NULL,
_e_shelf_cb_menu_rename_yes_cb,
NULL, es);
_("Name:"), es->name, NULL, NULL,
_e_shelf_cb_menu_rename_yes_cb,
NULL, es);
e_object_data_set(E_OBJECT(es->rename_dialog), es);
e_object_del_attach_func_set(E_OBJECT(es->rename_dialog),
_e_shelf_cb_menu_rename_cb);
@ -2524,16 +2529,17 @@ _e_shelf_gadcon_client_add(void *data, E_Gadcon_Client *gcc, const E_Gadcon_Clie
evas_object_geometry_get(gc->o_container, NULL, NULL, &w, &h);
switch (gc->orient)
{
case E_GADCON_ORIENT_VERT:
case E_GADCON_ORIENT_LEFT:
case E_GADCON_ORIENT_RIGHT:
case E_GADCON_ORIENT_CORNER_LT:
case E_GADCON_ORIENT_CORNER_RT:
case E_GADCON_ORIENT_CORNER_LB:
case E_GADCON_ORIENT_CORNER_RB:
case E_GADCON_ORIENT_VERT:
case E_GADCON_ORIENT_LEFT:
case E_GADCON_ORIENT_RIGHT:
case E_GADCON_ORIENT_CORNER_LT:
case E_GADCON_ORIENT_CORNER_RT:
case E_GADCON_ORIENT_CORNER_LB:
case E_GADCON_ORIENT_CORNER_RB:
cf_gcc->geom.res = h;
break;
default:
default:
cf_gcc->geom.res = w;
}
}
@ -2543,7 +2549,8 @@ _e_shelf_gadcon_client_add(void *data, E_Gadcon_Client *gcc, const E_Gadcon_Clie
cf_gcc->geom.pos = cf_gcc->geom.res - cf_gcc->geom.size;
gc->cf->clients = eina_list_append(gc->cf->clients, cf_gcc);
}
else if (!e_gadcon_client_config_new(gc, cc->name)) return 0;
else if (!e_gadcon_client_config_new(gc, cc->name))
return 0;
e_gadcon_unpopulate(gc);
e_gadcon_populate(gc);
e_config_save_queue();
@ -2637,62 +2644,62 @@ _e_shelf_bindings_add(E_Shelf *es)
break;
case E_GADCON_ORIENT_LEFT:
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_LEFT,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_LEFT,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
break;
case E_GADCON_ORIENT_RIGHT:
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_RIGHT,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_RIGHT,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
break;
case E_GADCON_ORIENT_TOP:
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
break;
case E_GADCON_ORIENT_BOTTOM:
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
break;
case E_GADCON_ORIENT_CORNER_TL:
case E_GADCON_ORIENT_CORNER_LT:
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_LEFT,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_LEFT,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP_LEFT,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP_LEFT,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
break;
case E_GADCON_ORIENT_CORNER_TR:
case E_GADCON_ORIENT_CORNER_RT:
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_RIGHT,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_RIGHT,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP_RIGHT,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_TOP_RIGHT,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
break;
case E_GADCON_ORIENT_CORNER_BL:
case E_GADCON_ORIENT_CORNER_LB:
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_LEFT,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_LEFT,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM_LEFT,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM_LEFT,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
break;
case E_GADCON_ORIENT_CORNER_BR:
case E_GADCON_ORIENT_CORNER_RB:
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_RIGHT,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_RIGHT,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM_RIGHT,
e_bindings_edge_add(E_BINDING_CONTEXT_ZONE, E_ZONE_EDGE_BOTTOM_RIGHT,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
break;
}
@ -2706,7 +2713,7 @@ _e_shelf_bindings_del(E_Shelf *es)
snprintf(buf, sizeof(buf), "shelf.%d", es->id);
for (edge = E_ZONE_EDGE_LEFT; edge <= E_ZONE_EDGE_BOTTOM_LEFT; edge++)
e_bindings_edge_del(E_BINDING_CONTEXT_ZONE, edge,
e_bindings_edge_del(E_BINDING_CONTEXT_ZONE, edge,
E_BINDING_MODIFIER_NONE, 1, buf, NULL, 0);
}
@ -2718,13 +2725,12 @@ _e_shelf_on_current_desk(E_Shelf *es, E_Event_Zone_Edge *ev)
int on_current_desk = 0;
int on_all_desks = 1;
if (ev->zone != es->zone) return EINA_FALSE;
EINA_LIST_FOREACH(es->cfg->desk_list, ll, sd)
{
if (!sd) continue;
on_all_desks = 0;
if ((sd->x == ev->zone->desk_x_current) &&
if ((sd->x == ev->zone->desk_x_current) &&
(sd->y == ev->zone->desk_y_current))
{
on_current_desk = 1;
@ -2736,3 +2742,4 @@ _e_shelf_on_current_desk(E_Shelf *es, E_Event_Zone_Edge *ev)
return EINA_TRUE;
}

Some files were not shown because too many files have changed in this diff Show More