parent
c4cdd54b33
commit
c30aaf8dde
|
@ -172,16 +172,16 @@ e_config_init(void)
|
||||||
if (!_e_config_profile)
|
if (!_e_config_profile)
|
||||||
{
|
{
|
||||||
/* no profile config - try other means */
|
/* no profile config - try other means */
|
||||||
char *link = NULL;
|
char *lnk = NULL;
|
||||||
|
|
||||||
/* check symlink - if default is a symlink to another dir */
|
/* check symlink - if default is a symlink to another dir */
|
||||||
e_prefix_data_concat_static(buf, "data/config/default");
|
e_prefix_data_concat_static(buf, "data/config/default");
|
||||||
link = ecore_file_readlink(buf);
|
lnk = ecore_file_readlink(buf);
|
||||||
/* if so use just the filename as the profile - must be a local link */
|
/* if so use just the filename as the profile - must be a local link */
|
||||||
if (link)
|
if (lnk)
|
||||||
{
|
{
|
||||||
_e_config_profile = strdup(ecore_file_file_get(link));
|
_e_config_profile = strdup(ecore_file_file_get(lnk));
|
||||||
free(link);
|
free(lnk);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_e_config_profile = strdup("default");
|
_e_config_profile = strdup("default");
|
||||||
|
|
|
@ -86,12 +86,12 @@ e_container_new(E_Manager *man)
|
||||||
if (!getenv("EVAS_RENDER_MODE"))
|
if (!getenv("EVAS_RENDER_MODE"))
|
||||||
{
|
{
|
||||||
int have_comp = 0;
|
int have_comp = 0;
|
||||||
Eina_List *l;
|
Eina_List *ll;
|
||||||
E_Config_Module *em;
|
E_Config_Module *em;
|
||||||
|
|
||||||
// FIXME: major hack. checking in advance for comp. eventully comp
|
// FIXME: major hack. checking in advance for comp. eventully comp
|
||||||
// will be rolled into e17 core and this won't be needed
|
// will be rolled into e17 core and this won't be needed
|
||||||
EINA_LIST_FOREACH(e_config->modules, l, em)
|
EINA_LIST_FOREACH(e_config->modules, ll, em)
|
||||||
{
|
{
|
||||||
if (!strcmp(em->name, "comp"))
|
if (!strcmp(em->name, "comp"))
|
||||||
{
|
{
|
||||||
|
@ -1174,7 +1174,7 @@ _e_container_resize_handle(E_Container *con)
|
||||||
}
|
}
|
||||||
EINA_LIST_FREE(zones, zone)
|
EINA_LIST_FREE(zones, zone)
|
||||||
{
|
{
|
||||||
Eina_List *shelves, *ll, *del_shelves;
|
Eina_List *shelves, *ll2, *del_shelves;
|
||||||
E_Shelf *es;
|
E_Shelf *es;
|
||||||
E_Border_List *bl;
|
E_Border_List *bl;
|
||||||
E_Border *bd;
|
E_Border *bd;
|
||||||
|
@ -1182,7 +1182,7 @@ _e_container_resize_handle(E_Container *con)
|
||||||
/* delete any shelves on this zone */
|
/* delete any shelves on this zone */
|
||||||
shelves = e_shelf_list();
|
shelves = e_shelf_list();
|
||||||
del_shelves = NULL;
|
del_shelves = NULL;
|
||||||
EINA_LIST_FOREACH(shelves, ll, es)
|
EINA_LIST_FOREACH(shelves, ll2, es)
|
||||||
{
|
{
|
||||||
if (es->zone == zone)
|
if (es->zone == zone)
|
||||||
del_shelves = eina_list_append(del_shelves, es);
|
del_shelves = eina_list_append(del_shelves, es);
|
||||||
|
@ -1207,11 +1207,11 @@ _e_container_resize_handle(E_Container *con)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
E_Zone *zone;
|
E_Zone *z;
|
||||||
|
|
||||||
zone = e_container_zone_number_get(con, 0);
|
z = e_container_zone_number_get(con, 0);
|
||||||
e_zone_move_resize(zone, 0, 0, con->w, con->h);
|
e_zone_move_resize(z, 0, 0, con->w, con->h);
|
||||||
e_shelf_zone_move_resize_handle(zone);
|
e_shelf_zone_move_resize_handle(z);
|
||||||
}
|
}
|
||||||
|
|
||||||
ecore_event_add(E_EVENT_CONTAINER_RESIZE, ev, _e_container_event_container_resize_free, NULL);
|
ecore_event_add(E_EVENT_CONTAINER_RESIZE, ev, _e_container_event_container_resize_free, NULL);
|
||||||
|
|
|
@ -465,7 +465,7 @@ _e_desklock_cb_window_stack(void *data __UNUSED__,
|
||||||
Ecore_X_Window win;
|
Ecore_X_Window win;
|
||||||
E_Desklock_Popup_Data *edp;
|
E_Desklock_Popup_Data *edp;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Eina_Bool raise = EINA_TRUE;
|
Eina_Bool raise_win = EINA_TRUE;
|
||||||
|
|
||||||
if (type == ECORE_X_EVENT_WINDOW_STACK)
|
if (type == ECORE_X_EVENT_WINDOW_STACK)
|
||||||
win = ((Ecore_X_Event_Window_Stack*) event)->event_win;
|
win = ((Ecore_X_Event_Window_Stack*) event)->event_win;
|
||||||
|
@ -480,12 +480,12 @@ _e_desklock_cb_window_stack(void *data __UNUSED__,
|
||||||
{
|
{
|
||||||
if (win == edp->popup_wnd->evas_win)
|
if (win == edp->popup_wnd->evas_win)
|
||||||
{
|
{
|
||||||
raise = EINA_FALSE;
|
raise_win = EINA_FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (raise)
|
if (raise_win)
|
||||||
{
|
{
|
||||||
EINA_LIST_FOREACH(edd->elock_wnd_list, l, edp)
|
EINA_LIST_FOREACH(edd->elock_wnd_list, l, edp)
|
||||||
ecore_evas_raise(edp->popup_wnd->ecore_evas);
|
ecore_evas_raise(edp->popup_wnd->ecore_evas);
|
||||||
|
@ -661,18 +661,18 @@ _e_desklock_state_set(int state)
|
||||||
{
|
{
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
E_Desklock_Popup_Data *edp;
|
E_Desklock_Popup_Data *edp;
|
||||||
const char *signal, *text;
|
const char *signal_desklock, *text;
|
||||||
if (!edd) return;
|
if (!edd) return;
|
||||||
|
|
||||||
edd->state = state;
|
edd->state = state;
|
||||||
if (state == E_DESKLOCK_STATE_CHECKING)
|
if (state == E_DESKLOCK_STATE_CHECKING)
|
||||||
{
|
{
|
||||||
signal = "e,state,checking";
|
signal_desklock = "e,state,checking";
|
||||||
text = "Authenticating...";
|
text = "Authenticating...";
|
||||||
}
|
}
|
||||||
else if (state == E_DESKLOCK_STATE_INVALID)
|
else if (state == E_DESKLOCK_STATE_INVALID)
|
||||||
{
|
{
|
||||||
signal = "e,state,invalid";
|
signal_desklock = "e,state,invalid";
|
||||||
text = "The password you entered is invalid. Try again.";
|
text = "The password you entered is invalid. Try again.";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -680,8 +680,8 @@ _e_desklock_state_set(int state)
|
||||||
|
|
||||||
EINA_LIST_FOREACH(edd->elock_wnd_list, l, edp)
|
EINA_LIST_FOREACH(edd->elock_wnd_list, l, edp)
|
||||||
{
|
{
|
||||||
edje_object_signal_emit(edp->login_box, signal, "e.desklock");
|
edje_object_signal_emit(edp->login_box, signal_desklock, "e.desklock");
|
||||||
edje_object_signal_emit(edp->bg_object, signal, "e.desklock");
|
edje_object_signal_emit(edp->bg_object, signal_desklock, "e.desklock");
|
||||||
edje_object_part_text_set(edp->login_box, "e.text.title", text);
|
edje_object_part_text_set(edp->login_box, "e.text.title", text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1387,15 +1387,15 @@ _e_dnd_cb_event_dnd_selection(void *data __UNUSED__, int type __UNUSED__, void *
|
||||||
else if (_type_text_x_moz_url == _xdnd->type)
|
else if (_type_text_x_moz_url == _xdnd->type)
|
||||||
{
|
{
|
||||||
/* FIXME: Create a ecore x parser for this type */
|
/* FIXME: Create a ecore x parser for this type */
|
||||||
Ecore_X_Selection_Data *data;
|
Ecore_X_Selection_Data *sdata;
|
||||||
Eina_List *l = NULL;
|
Eina_List *l = NULL;
|
||||||
char file[PATH_MAX];
|
char file[PATH_MAX];
|
||||||
char *text;
|
char *text;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
data = ev->data;
|
sdata = ev->data;
|
||||||
text = (char *)data->data;
|
text = (char *)sdata->data;
|
||||||
size = MIN(data->length, PATH_MAX - 1);
|
size = MIN(sdata->length, PATH_MAX - 1);
|
||||||
/* A moz url _shall_ contain a space */
|
/* A moz url _shall_ contain a space */
|
||||||
/* FIXME: The data is two-byte unicode. Somewhere it
|
/* FIXME: The data is two-byte unicode. Somewhere it
|
||||||
* is written that the url and the text is separated by
|
* is written that the url and the text is separated by
|
||||||
|
|
|
@ -672,7 +672,7 @@ e_editable_unselect_all(Evas_Object *editable)
|
||||||
* Selects the word at the provided character index
|
* Selects the word at the provided character index
|
||||||
*/
|
*/
|
||||||
EAPI void
|
EAPI void
|
||||||
e_editable_select_word(Evas_Object *editable, int index)
|
e_editable_select_word(Evas_Object *editable, int idx)
|
||||||
{
|
{
|
||||||
E_Editable_Smart_Data *sd;
|
E_Editable_Smart_Data *sd;
|
||||||
int spos = 0, epos = -1, i = 0, pos = 0;
|
int spos = 0, epos = -1, i = 0, pos = 0;
|
||||||
|
@ -680,14 +680,14 @@ e_editable_select_word(Evas_Object *editable, int index)
|
||||||
if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR();
|
if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERRNR();
|
||||||
if ((!editable) || (!(sd = evas_object_smart_data_get(editable))))
|
if ((!editable) || (!(sd = evas_object_smart_data_get(editable))))
|
||||||
return;
|
return;
|
||||||
if ((index < 0) || (index >= sd->unicode_length)) return;
|
if ((idx < 0) || (idx >= sd->unicode_length)) return;
|
||||||
|
|
||||||
while (i < sd->char_length)
|
while (i < sd->char_length)
|
||||||
{
|
{
|
||||||
if (sd->text[i] == ' ')
|
if (sd->text[i] == ' ')
|
||||||
{
|
{
|
||||||
if (pos < index) spos = pos + 1;
|
if (pos < idx) spos = pos + 1;
|
||||||
else if (pos > index)
|
else if (pos > idx)
|
||||||
{
|
{
|
||||||
epos = pos;
|
epos = pos;
|
||||||
break;
|
break;
|
||||||
|
@ -758,7 +758,7 @@ e_editable_pos_get_from_coords(Evas_Object *editable, Evas_Coord x, Evas_Coord y
|
||||||
Evas_Coord tx, ty, tw, th;
|
Evas_Coord tx, ty, tw, th;
|
||||||
Evas_Coord cx, cw;
|
Evas_Coord cx, cw;
|
||||||
Evas_Coord canvas_x, canvas_y;
|
Evas_Coord canvas_x, canvas_y;
|
||||||
int index, pos, i, j;
|
int idx, pos, i, j;
|
||||||
const char *text;
|
const char *text;
|
||||||
|
|
||||||
if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERR(0);
|
if (evas_object_smart_smart_get(editable) != _e_editable_smart) SMARTERR(0);
|
||||||
|
@ -778,18 +778,18 @@ e_editable_pos_get_from_coords(Evas_Object *editable, Evas_Coord x, Evas_Coord y
|
||||||
pos = sd->unicode_length;
|
pos = sd->unicode_length;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
index = evas_object_text_char_coords_get(text_obj,
|
idx = evas_object_text_char_coords_get(text_obj,
|
||||||
canvas_x - tx, canvas_y - ty,
|
canvas_x - tx, canvas_y - ty,
|
||||||
&cx, NULL, &cw, NULL);
|
&cx, NULL, &cw, NULL);
|
||||||
text = evas_object_text_text_get(text_obj);
|
text = evas_object_text_text_get(text_obj);
|
||||||
if ((index >= 0) && (text))
|
if ((idx >= 0) && (text))
|
||||||
{
|
{
|
||||||
if ((canvas_x - tx) > (cx + (cw / 2))) index++;
|
if ((canvas_x - tx) > (cx + (cw / 2))) idx++;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
j = -1;
|
j = -1;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
while ((i < index) && (j != i))
|
while ((i < idx) && (j != i))
|
||||||
{
|
{
|
||||||
pos++;
|
pos++;
|
||||||
j = i;
|
j = i;
|
||||||
|
@ -887,7 +887,7 @@ _e_editable_text_insert(Evas_Object *editable, int pos, const char *text)
|
||||||
E_Editable_Smart_Data *sd;
|
E_Editable_Smart_Data *sd;
|
||||||
int char_length = -1, unicode_length = -1;
|
int char_length = -1, unicode_length = -1;
|
||||||
int prev_char_length, new_char_length, new_unicode_length;
|
int prev_char_length, new_char_length, new_unicode_length;
|
||||||
int index = 0, i = 0;
|
int idx = 0, i = 0;
|
||||||
|
|
||||||
if ((!editable) || (!(sd = evas_object_smart_data_get(editable))))
|
if ((!editable) || (!(sd = evas_object_smart_data_get(editable))))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -904,7 +904,7 @@ _e_editable_text_insert(Evas_Object *editable, int pos, const char *text)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < pos; i++)
|
for (i = 0; i < pos; i++)
|
||||||
index = evas_string_char_next_get(sd->text, index, NULL);
|
idx = evas_string_char_next_get(sd->text, idx, NULL);
|
||||||
|
|
||||||
if ((unicode_length <= 0) || (char_length <= 0)) return 0;
|
if ((unicode_length <= 0) || (char_length <= 0)) return 0;
|
||||||
|
|
||||||
|
@ -947,9 +947,9 @@ _e_editable_text_insert(Evas_Object *editable, int pos, const char *text)
|
||||||
sd->unicode_length = new_unicode_length;
|
sd->unicode_length = new_unicode_length;
|
||||||
sd->char_length = new_char_length;
|
sd->char_length = new_char_length;
|
||||||
|
|
||||||
if (prev_char_length > index)
|
if (prev_char_length > idx)
|
||||||
memmove(&sd->text[index + char_length], &sd->text[index], prev_char_length - index);
|
memmove(&sd->text[idx + char_length], &sd->text[idx], prev_char_length - idx);
|
||||||
strncpy(&sd->text[index], text, char_length);
|
strncpy(&sd->text[idx], text, char_length);
|
||||||
sd->text[sd->char_length] = '\0';
|
sd->text[sd->char_length] = '\0';
|
||||||
|
|
||||||
_e_editable_text_update(editable);
|
_e_editable_text_update(editable);
|
||||||
|
@ -1143,7 +1143,7 @@ _e_editable_char_geometry_get_from_pos(Evas_Object *editable, int utf_pos, Evas_
|
||||||
const Evas_Object *text_obj;
|
const Evas_Object *text_obj;
|
||||||
const char *text;
|
const char *text;
|
||||||
Evas_Coord x, w;
|
Evas_Coord x, w;
|
||||||
int index = 0, i, last_pos, ret;
|
int idx = 0, i, last_pos, ret;
|
||||||
|
|
||||||
if (cx) *cx = 0;
|
if (cx) *cx = 0;
|
||||||
if (cy) *cy = 0;
|
if (cy) *cy = 0;
|
||||||
|
@ -1172,9 +1172,9 @@ _e_editable_char_geometry_get_from_pos(Evas_Object *editable, int utf_pos, Evas_
|
||||||
last_pos = 0;
|
last_pos = 0;
|
||||||
|
|
||||||
for (i = 0; i < utf_pos; i++)
|
for (i = 0; i < utf_pos; i++)
|
||||||
index = evas_string_char_next_get(text, index, NULL);
|
idx = evas_string_char_next_get(text, idx, NULL);
|
||||||
|
|
||||||
ret = evas_object_text_char_pos_get(text_obj, index, &x, cy, &w, ch);
|
ret = evas_object_text_char_pos_get(text_obj, idx, &x, cy, &w, ch);
|
||||||
if (cx) *cx = x - 1 + (last_pos ? w : 0);
|
if (cx) *cx = x - 1 + (last_pos ? w : 0);
|
||||||
if (cw) *cw = last_pos ? 1 : w;
|
if (cw) *cw = last_pos ? 1 : w;
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -125,12 +125,12 @@ e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec,
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Efreet_Desktop *
|
EAPI Efreet_Desktop *
|
||||||
e_exec_startup_id_pid_find(int startup_id, pid_t pid)
|
e_exec_startup_id_pid_find(int id, pid_t pid)
|
||||||
{
|
{
|
||||||
E_Exec_Search search;
|
E_Exec_Search search;
|
||||||
|
|
||||||
search.desktop = NULL;
|
search.desktop = NULL;
|
||||||
search.startup_id = startup_id;
|
search.startup_id = id;
|
||||||
search.pid = pid;
|
search.pid = pid;
|
||||||
eina_hash_foreach(e_exec_instances, _e_exec_startup_id_pid_find, &search);
|
eina_hash_foreach(e_exec_instances, _e_exec_startup_id_pid_find, &search);
|
||||||
return search.desktop;
|
return search.desktop;
|
||||||
|
@ -459,8 +459,8 @@ _e_exec_startup_id_pid_find(const Eina_Hash *hash __UNUSED__, const void *key __
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_exec_error_dialog(Efreet_Desktop *desktop, const char *exec, Ecore_Exe_Event_Del *event,
|
_e_exec_error_dialog(Efreet_Desktop *desktop, const char *exec, Ecore_Exe_Event_Del *exe_event,
|
||||||
Ecore_Exe_Event_Data *error, Ecore_Exe_Event_Data *read)
|
Ecore_Exe_Event_Data *exe_error, Ecore_Exe_Event_Data *exe_read)
|
||||||
{
|
{
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
E_Config_Dialog_Data *cfdata;
|
E_Config_Dialog_Data *cfdata;
|
||||||
|
@ -477,9 +477,9 @@ _e_exec_error_dialog(Efreet_Desktop *desktop, const char *exec, Ecore_Exe_Event_
|
||||||
cfdata->desktop = desktop;
|
cfdata->desktop = desktop;
|
||||||
if (cfdata->desktop) efreet_desktop_ref(cfdata->desktop);
|
if (cfdata->desktop) efreet_desktop_ref(cfdata->desktop);
|
||||||
if (exec) cfdata->exec = strdup(exec);
|
if (exec) cfdata->exec = strdup(exec);
|
||||||
cfdata->error = error;
|
cfdata->error = exe_error;
|
||||||
cfdata->read = read;
|
cfdata->read = exe_read;
|
||||||
cfdata->event = *event;
|
cfdata->event = *exe_event;
|
||||||
|
|
||||||
v->create_cfdata = _create_data;
|
v->create_cfdata = _create_data;
|
||||||
v->free_cfdata = _free_data;
|
v->free_cfdata = _free_data;
|
||||||
|
|
|
@ -916,7 +916,7 @@ EAPI void
|
||||||
e_fm2_path_set(Evas_Object *obj, const char *dev, const char *path)
|
e_fm2_path_set(Evas_Object *obj, const char *dev, const char *path)
|
||||||
{
|
{
|
||||||
E_Fm2_Smart_Data *sd;
|
E_Fm2_Smart_Data *sd;
|
||||||
const char *realpath;
|
const char *real_path;
|
||||||
|
|
||||||
if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR();
|
if (evas_object_smart_smart_get(obj) != _e_fm2_smart) SMARTERRNR();
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
@ -956,10 +956,10 @@ e_fm2_path_set(Evas_Object *obj, const char *dev, const char *path)
|
||||||
sd->config->theme.fixed = EINA_FALSE;
|
sd->config->theme.fixed = EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
realpath = _e_fm2_dev_path_map(dev, path);
|
real_path = _e_fm2_dev_path_map(dev, path);
|
||||||
/* If the path doesn't exist, popup a dialog */
|
/* If the path doesn't exist, popup a dialog */
|
||||||
if (dev && strncmp(dev, "removable:", 10)
|
if (dev && strncmp(dev, "removable:", 10)
|
||||||
&& !ecore_file_exists(realpath))
|
&& !ecore_file_exists(real_path))
|
||||||
{
|
{
|
||||||
E_Manager *man;
|
E_Manager *man;
|
||||||
E_Container *con;
|
E_Container *con;
|
||||||
|
@ -977,7 +977,7 @@ e_fm2_path_set(Evas_Object *obj, const char *dev, const char *path)
|
||||||
e_dialog_title_set(dialog, _("Nonexistent path"));
|
e_dialog_title_set(dialog, _("Nonexistent path"));
|
||||||
e_dialog_icon_set(dialog, "dialog-error", 64);
|
e_dialog_icon_set(dialog, "dialog-error", 64);
|
||||||
|
|
||||||
snprintf(text, sizeof(text), _("%s doesn't exist."), realpath);
|
snprintf(text, sizeof(text), _("%s doesn't exist."), real_path);
|
||||||
|
|
||||||
e_dialog_text_set(dialog, text);
|
e_dialog_text_set(dialog, text);
|
||||||
e_win_centered_set(dialog->win, 1);
|
e_win_centered_set(dialog->win, 1);
|
||||||
|
@ -991,7 +991,7 @@ e_fm2_path_set(Evas_Object *obj, const char *dev, const char *path)
|
||||||
eina_stringshare_replace(&sd->dev, dev);
|
eina_stringshare_replace(&sd->dev, dev);
|
||||||
eina_stringshare_replace(&sd->path, path);
|
eina_stringshare_replace(&sd->path, path);
|
||||||
eina_stringshare_del(sd->realpath);
|
eina_stringshare_del(sd->realpath);
|
||||||
sd->realpath = realpath;
|
sd->realpath = real_path;
|
||||||
_e_fm2_queue_free(obj);
|
_e_fm2_queue_free(obj);
|
||||||
_e_fm2_regions_free(obj);
|
_e_fm2_regions_free(obj);
|
||||||
_e_fm2_icons_free(obj);
|
_e_fm2_icons_free(obj);
|
||||||
|
@ -1445,7 +1445,7 @@ e_fm2_all_list_get(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_fm2_select_set(Evas_Object *obj, const char *file, int select)
|
e_fm2_select_set(Evas_Object *obj, const char *file, int select_)
|
||||||
{
|
{
|
||||||
E_Fm2_Smart_Data *sd;
|
E_Fm2_Smart_Data *sd;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
@ -1460,7 +1460,7 @@ e_fm2_select_set(Evas_Object *obj, const char *file, int select)
|
||||||
{
|
{
|
||||||
if ((file) && (!strcmp(ic->info.file, file)))
|
if ((file) && (!strcmp(ic->info.file, file)))
|
||||||
{
|
{
|
||||||
if (select) _e_fm2_icon_select(ic);
|
if (select_) _e_fm2_icon_select(ic);
|
||||||
else _e_fm2_icon_deselect(ic);
|
else _e_fm2_icon_deselect(ic);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3267,12 +3267,12 @@ _e_fm2_dev_path_map(const char *dev, const char *path)
|
||||||
*/
|
*/
|
||||||
if (custom_desktop_dir)
|
if (custom_desktop_dir)
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t length;
|
||||||
|
|
||||||
custom_desktop_dir = e_util_shell_env_path_eval(custom_desktop_dir);
|
custom_desktop_dir = e_util_shell_env_path_eval(custom_desktop_dir);
|
||||||
len = strlen(custom_desktop_dir);
|
length = strlen(custom_desktop_dir);
|
||||||
|
|
||||||
if (len >= sizeof(buf))
|
if (length >= sizeof(buf))
|
||||||
{
|
{
|
||||||
free(custom_desktop_dir);
|
free(custom_desktop_dir);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -3282,13 +3282,13 @@ _e_fm2_dev_path_map(const char *dev, const char *path)
|
||||||
|
|
||||||
if (strcmp(path, "/"))
|
if (strcmp(path, "/"))
|
||||||
{
|
{
|
||||||
if (len + 1 + strlen(path) >= sizeof(buf))
|
if (length + 1 + strlen(path) >= sizeof(buf))
|
||||||
{
|
{
|
||||||
free(custom_desktop_dir);
|
free(custom_desktop_dir);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
buf[len++] = '-';
|
buf[length++] = '-';
|
||||||
strncpy(buf + len, path, sizeof(buf) - len);
|
strncpy(buf + length, path, sizeof(buf) - length);
|
||||||
}
|
}
|
||||||
free(custom_desktop_dir);
|
free(custom_desktop_dir);
|
||||||
}
|
}
|
||||||
|
@ -3496,16 +3496,16 @@ _e_fm2_buffer_fill(Evas_Object *obj)
|
||||||
Eina_List *sel;
|
Eina_List *sel;
|
||||||
char buf[PATH_MAX], *pfile;
|
char buf[PATH_MAX], *pfile;
|
||||||
int bufused, buffree;
|
int bufused, buffree;
|
||||||
const char *realpath;
|
const char *real_path;
|
||||||
const E_Fm2_Icon_Info *ici;
|
const E_Fm2_Icon_Info *ici;
|
||||||
|
|
||||||
sel = e_fm2_selected_list_get(obj);
|
sel = e_fm2_selected_list_get(obj);
|
||||||
if (!sel) return EINA_FALSE;
|
if (!sel) return EINA_FALSE;
|
||||||
|
|
||||||
realpath = e_fm2_real_path_get(obj);
|
real_path = e_fm2_real_path_get(obj);
|
||||||
if (!realpath) return EINA_FALSE;
|
if (!real_path) return EINA_FALSE;
|
||||||
|
|
||||||
bufused = eina_strlcpy(buf, realpath, sizeof(buf));
|
bufused = eina_strlcpy(buf, real_path, sizeof(buf));
|
||||||
if (bufused >= (int)sizeof(buf) - 2) return EINA_FALSE;
|
if (bufused >= (int)sizeof(buf) - 2) return EINA_FALSE;
|
||||||
|
|
||||||
if ((bufused > 0) && (buf[bufused - 1] != '/'))
|
if ((bufused > 0) && (buf[bufused - 1] != '/'))
|
||||||
|
@ -6769,7 +6769,7 @@ _e_fm2_cb_icon_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
|
||||||
E_Drag *d;
|
E_Drag *d;
|
||||||
Evas_Object *o, *o2;
|
Evas_Object *o, *o2;
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
const char *drag_types[] = { "text/uri-list" }, *realpath;
|
const char *drag_types[] = { "text/uri-list" }, *real_path;
|
||||||
char buf[PATH_MAX + 8], *p, *sel = NULL;
|
char buf[PATH_MAX + 8], *p, *sel = NULL;
|
||||||
E_Container *con = NULL;
|
E_Container *con = NULL;
|
||||||
Eina_List *sl;
|
Eina_List *sl;
|
||||||
|
@ -6808,8 +6808,8 @@ _e_fm2_cb_icon_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
|
||||||
if (ic->obj_icon) evas_object_hide(ic->obj_icon);
|
if (ic->obj_icon) evas_object_hide(ic->obj_icon);
|
||||||
ic->drag.start = EINA_FALSE;
|
ic->drag.start = EINA_FALSE;
|
||||||
evas_object_geometry_get(ic->obj, &x, &y, &w, &h);
|
evas_object_geometry_get(ic->obj, &x, &y, &w, &h);
|
||||||
realpath = e_fm2_real_path_get(ic->sd->obj);
|
real_path = e_fm2_real_path_get(ic->sd->obj);
|
||||||
p_offset = eina_strlcpy(buf, realpath, sizeof(buf));
|
p_offset = eina_strlcpy(buf, real_path, sizeof(buf));
|
||||||
if ((p_offset < 1) || (p_offset >= (int)sizeof(buf) - 2)) return;
|
if ((p_offset < 1) || (p_offset >= (int)sizeof(buf) - 2)) return;
|
||||||
if (buf[p_offset - 1] != '/')
|
if (buf[p_offset - 1] != '/')
|
||||||
{
|
{
|
||||||
|
|
|
@ -647,7 +647,7 @@ _e_fm_ipc_cb_server_data(void *data __UNUSED__, int type __UNUSED__, void *event
|
||||||
{
|
{
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
E_Dir *ed;
|
E_Dir *ed;
|
||||||
double stime;
|
double sync_time;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(_e_dirs, l, ed)
|
EINA_LIST_FOREACH(_e_dirs, l, ed)
|
||||||
{
|
{
|
||||||
|
@ -655,13 +655,13 @@ _e_fm_ipc_cb_server_data(void *data __UNUSED__, int type __UNUSED__, void *event
|
||||||
{
|
{
|
||||||
if (ed->sync == e->response)
|
if (ed->sync == e->response)
|
||||||
{
|
{
|
||||||
stime = ecore_time_get() - ed->sync_time;
|
sync_time = ecore_time_get() - ed->sync_time;
|
||||||
/* try keep round trips to round trip tolerance */
|
/* try keep round trips to round trip tolerance */
|
||||||
if
|
if
|
||||||
(stime < (DEF_ROUND_TRIP - DEF_ROUND_TRIP_TOLERANCE))
|
(sync_time < (DEF_ROUND_TRIP - DEF_ROUND_TRIP_TOLERANCE))
|
||||||
ed->sync_num += 1;
|
ed->sync_num += 1;
|
||||||
else if
|
else if
|
||||||
(stime > (DEF_ROUND_TRIP + DEF_ROUND_TRIP_TOLERANCE))
|
(sync_time > (DEF_ROUND_TRIP + DEF_ROUND_TRIP_TOLERANCE))
|
||||||
ed->sync_num -= 1;
|
ed->sync_num -= 1;
|
||||||
/* always sync at least 1 file */
|
/* always sync at least 1 file */
|
||||||
if (ed->sync_num < 1) ed->sync_num = 1;
|
if (ed->sync_num < 1) ed->sync_num = 1;
|
||||||
|
|
|
@ -198,24 +198,24 @@ e_fm2_mime_handler_mime_add(E_Fm2_Mime_Handler *handler, const char *mime)
|
||||||
|
|
||||||
/* associate a certain glob with a handler */
|
/* associate a certain glob with a handler */
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
e_fm2_mime_handler_glob_add(E_Fm2_Mime_Handler *handler, const char *glob)
|
e_fm2_mime_handler_glob_add(E_Fm2_Mime_Handler *handler, const char *glob_)
|
||||||
{
|
{
|
||||||
Eina_List *handlers = NULL;
|
Eina_List *handlers = NULL;
|
||||||
|
|
||||||
if ((!handler) || (!glob)) return 0;
|
if ((!handler) || (!glob_)) return 0;
|
||||||
|
|
||||||
/* if there's an entry for this glob already, then append to its list */
|
/* if there's an entry for this glob already, then append to its list */
|
||||||
if ((handlers = eina_hash_find(_glob_handlers, glob)))
|
if ((handlers = eina_hash_find(_glob_handlers, glob_)))
|
||||||
{
|
{
|
||||||
handlers = eina_list_append(handlers, handler);
|
handlers = eina_list_append(handlers, handler);
|
||||||
eina_hash_modify(_glob_handlers, glob, handlers);
|
eina_hash_modify(_glob_handlers, glob_, handlers);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* no previous entry for this glob, lets add one */
|
/* no previous entry for this glob, lets add one */
|
||||||
handlers = eina_list_append(handlers, handler);
|
handlers = eina_list_append(handlers, handler);
|
||||||
if (!_glob_handlers) _glob_handlers = eina_hash_string_superfast_new(NULL);
|
if (!_glob_handlers) _glob_handlers = eina_hash_string_superfast_new(NULL);
|
||||||
eina_hash_add(_glob_handlers, glob, handlers);
|
eina_hash_add(_glob_handlers, glob_, handlers);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -249,21 +249,21 @@ e_fm2_mime_handler_mime_del(E_Fm2_Mime_Handler *handler, const char *mime)
|
||||||
|
|
||||||
/* delete a certain handler for a certain glob */
|
/* delete a certain handler for a certain glob */
|
||||||
EAPI void
|
EAPI void
|
||||||
e_fm2_mime_handler_glob_del(E_Fm2_Mime_Handler *handler, const char *glob)
|
e_fm2_mime_handler_glob_del(E_Fm2_Mime_Handler *handler, const char *glob_)
|
||||||
{
|
{
|
||||||
Eina_List *handlers = NULL;
|
Eina_List *handlers = NULL;
|
||||||
|
|
||||||
if ((!handler) || (!glob)) return;
|
if ((!handler) || (!glob_)) return;
|
||||||
|
|
||||||
/* if there's an entry for this glob already, then remove from list */
|
/* if there's an entry for this glob already, then remove from list */
|
||||||
if ((handlers = eina_hash_find(_glob_handlers, glob)))
|
if ((handlers = eina_hash_find(_glob_handlers, glob_)))
|
||||||
{
|
{
|
||||||
handlers = eina_list_remove(handlers, handler);
|
handlers = eina_list_remove(handlers, handler);
|
||||||
if (handlers)
|
if (handlers)
|
||||||
eina_hash_modify(_glob_handlers, glob, handlers);
|
eina_hash_modify(_glob_handlers, glob_, handlers);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
eina_hash_del(_glob_handlers, glob, handlers);
|
eina_hash_del(_glob_handlers, glob_, handlers);
|
||||||
if (!eina_hash_population(_glob_handlers))
|
if (!eina_hash_population(_glob_handlers))
|
||||||
{
|
{
|
||||||
eina_hash_free(_glob_handlers);
|
eina_hash_free(_glob_handlers);
|
||||||
|
@ -285,16 +285,16 @@ e_fm2_mime_handler_mime_handlers_get(const char *mime)
|
||||||
/* get the list of glob handlers for a glob.
|
/* get the list of glob handlers for a glob.
|
||||||
NOTE: the list should be free()'ed */
|
NOTE: the list should be free()'ed */
|
||||||
EAPI Eina_List *
|
EAPI Eina_List *
|
||||||
e_fm2_mime_handler_glob_handlers_get(const char *glob)
|
e_fm2_mime_handler_glob_handlers_get(const char *glob_)
|
||||||
{
|
{
|
||||||
E_Fm2_Mime_Handler_Tuple *tuple = NULL;
|
E_Fm2_Mime_Handler_Tuple *tuple = NULL;
|
||||||
Eina_List *handlers = NULL;
|
Eina_List *handlers = NULL;
|
||||||
|
|
||||||
if ((!glob) || (!_glob_handlers)) return NULL;
|
if ((!glob_) || (!_glob_handlers)) return NULL;
|
||||||
|
|
||||||
tuple = E_NEW(E_Fm2_Mime_Handler_Tuple, 1);
|
tuple = E_NEW(E_Fm2_Mime_Handler_Tuple, 1);
|
||||||
tuple->list = NULL;
|
tuple->list = NULL;
|
||||||
tuple->str = glob;
|
tuple->str = glob_;
|
||||||
eina_hash_foreach(_glob_handlers, _e_fm2_mime_handler_glob_match_foreach, tuple);
|
eina_hash_foreach(_glob_handlers, _e_fm2_mime_handler_glob_match_foreach, tuple);
|
||||||
handlers = tuple->list;
|
handlers = tuple->list;
|
||||||
E_FREE(tuple);
|
E_FREE(tuple);
|
||||||
|
@ -346,15 +346,15 @@ e_fm2_mime_handler_mime_handlers_call_all(Evas_Object *obj, const char *path, co
|
||||||
|
|
||||||
/* call all handlers related to a certain glob */
|
/* call all handlers related to a certain glob */
|
||||||
EAPI void
|
EAPI void
|
||||||
e_fm2_mime_handler_glob_handlers_call_all(Evas_Object *obj, const char *path, const char *glob)
|
e_fm2_mime_handler_glob_handlers_call_all(Evas_Object *obj, const char *path, const char *glob_)
|
||||||
{
|
{
|
||||||
Eina_List *handlers = NULL;
|
Eina_List *handlers = NULL;
|
||||||
Eina_List *l = NULL;
|
Eina_List *l = NULL;
|
||||||
E_Fm2_Mime_Handler *handler = NULL;
|
E_Fm2_Mime_Handler *handler = NULL;
|
||||||
|
|
||||||
if ((!obj) || (!path) || (!glob)) return;
|
if ((!obj) || (!path) || (!glob_)) return;
|
||||||
|
|
||||||
handlers = e_fm2_mime_handler_glob_handlers_get(glob);
|
handlers = e_fm2_mime_handler_glob_handlers_get(glob_);
|
||||||
if (!handlers) return;
|
if (!handlers) return;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(handlers, l, handler)
|
EINA_LIST_FOREACH(handlers, l, handler)
|
||||||
|
|
|
@ -998,8 +998,8 @@ _e_fm_op_update_progress(E_Fm_Op_Task *task, off_t _plus_e_fm_op_done, off_t _pl
|
||||||
{
|
{
|
||||||
static int ppercent = -1;
|
static int ppercent = -1;
|
||||||
int percent;
|
int percent;
|
||||||
static double ctime = 0;
|
static double c_time = 0;
|
||||||
static double stime = 0;
|
static double s_time = 0;
|
||||||
double eta = 0;
|
double eta = 0;
|
||||||
static int peta = -1;
|
static int peta = -1;
|
||||||
static E_Fm_Op_Task *ptask = NULL;
|
static E_Fm_Op_Task *ptask = NULL;
|
||||||
|
@ -1019,13 +1019,13 @@ _e_fm_op_update_progress(E_Fm_Op_Task *task, off_t _plus_e_fm_op_done, off_t _pl
|
||||||
|
|
||||||
eta = peta;
|
eta = peta;
|
||||||
|
|
||||||
if (!stime) stime = ecore_time_get();
|
if (!s_time) s_time = ecore_time_get();
|
||||||
|
|
||||||
/* Update ETA once a second */
|
/* Update ETA once a second */
|
||||||
if ((_e_fm_op_done) && (ecore_time_get() - ctime > 1.0 ))
|
if ((_e_fm_op_done) && (ecore_time_get() - c_time > 1.0 ))
|
||||||
{
|
{
|
||||||
ctime = ecore_time_get();
|
c_time = ecore_time_get();
|
||||||
eta = (ctime - stime) * (_e_fm_op_total - _e_fm_op_done) / _e_fm_op_done;
|
eta = (c_time - s_time) * (_e_fm_op_total - _e_fm_op_done) / _e_fm_op_done;
|
||||||
eta = (int) (eta + 0.5);
|
eta = (int) (eta + 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1034,7 +1034,7 @@ _e_fm_op_update_progress(E_Fm_Op_Task *task, off_t _plus_e_fm_op_done, off_t _pl
|
||||||
ppercent = percent;
|
ppercent = percent;
|
||||||
peta = eta;
|
peta = eta;
|
||||||
ptask = task;
|
ptask = task;
|
||||||
_e_fm_op_update_progress_report(percent, eta, ctime - stime,
|
_e_fm_op_update_progress_report(percent, eta, c_time - s_time,
|
||||||
_e_fm_op_done, _e_fm_op_total,
|
_e_fm_op_done, _e_fm_op_total,
|
||||||
task->src.name, task->dst.name);
|
task->src.name, task->dst.name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,12 +229,12 @@ init_done:
|
||||||
}
|
}
|
||||||
if (!in_list)
|
if (!in_list)
|
||||||
{
|
{
|
||||||
E_Config_Module *em;
|
E_Config_Module *module;
|
||||||
|
|
||||||
em = E_NEW(E_Config_Module, 1);
|
module = E_NEW(E_Config_Module, 1);
|
||||||
em->name = eina_stringshare_add(m->name);
|
module->name = eina_stringshare_add(m->name);
|
||||||
em->enabled = 0;
|
module->enabled = 0;
|
||||||
e_config->modules = eina_list_append(e_config->modules, em);
|
e_config->modules = eina_list_append(e_config->modules, module);
|
||||||
e_config_save_queue();
|
e_config_save_queue();
|
||||||
}
|
}
|
||||||
if (modpath) eina_stringshare_del(modpath);
|
if (modpath) eina_stringshare_del(modpath);
|
||||||
|
|
|
@ -85,14 +85,14 @@ e_resist_container_border_position(E_Container *con, Eina_List *skiplist,
|
||||||
desk = e_desk_current_get(e_zone_current_get(con));
|
desk = e_desk_current_get(e_zone_current_get(con));
|
||||||
EINA_LIST_FOREACH(e_shelf_list(), l, es)
|
EINA_LIST_FOREACH(e_shelf_list(), l, es)
|
||||||
{
|
{
|
||||||
Eina_List *ll;
|
Eina_List *ll2;
|
||||||
E_Config_Shelf_Desk *sd;
|
E_Config_Shelf_Desk *sd;
|
||||||
|
|
||||||
if (es->zone->container == con)
|
if (es->zone->container == con)
|
||||||
{
|
{
|
||||||
if (es->cfg->desk_show_mode)
|
if (es->cfg->desk_show_mode)
|
||||||
{
|
{
|
||||||
EINA_LIST_FOREACH(es->cfg->desk_list, ll, sd)
|
EINA_LIST_FOREACH(es->cfg->desk_list, ll2, sd)
|
||||||
{
|
{
|
||||||
if (!sd) continue;
|
if (!sd) continue;
|
||||||
if ((sd->x == desk->x) && (sd->y == desk->y))
|
if ((sd->x == desk->x) && (sd->y == desk->y))
|
||||||
|
|
|
@ -15,7 +15,7 @@ e_sha1_sum(unsigned char *data, int size, unsigned char *dst)
|
||||||
{
|
{
|
||||||
unsigned int digest[5], word[80], wa, wb, wc, wd, we, t;
|
unsigned int digest[5], word[80], wa, wb, wc, wd, we, t;
|
||||||
unsigned char buf[64], *d;
|
unsigned char buf[64], *d;
|
||||||
int index, left, i;
|
int idx, left, i;
|
||||||
const unsigned int magic[4] =
|
const unsigned int magic[4] =
|
||||||
{
|
{
|
||||||
0x5a827999,
|
0x5a827999,
|
||||||
|
@ -24,7 +24,7 @@ e_sha1_sum(unsigned char *data, int size, unsigned char *dst)
|
||||||
0xca62c1d6
|
0xca62c1d6
|
||||||
};
|
};
|
||||||
|
|
||||||
index = 0;
|
idx = 0;
|
||||||
digest[0] = 0x67452301;
|
digest[0] = 0x67452301;
|
||||||
digest[1] = 0xefcdab89;
|
digest[1] = 0xefcdab89;
|
||||||
digest[2] = 0x98badcfe;
|
digest[2] = 0x98badcfe;
|
||||||
|
@ -34,7 +34,7 @@ e_sha1_sum(unsigned char *data, int size, unsigned char *dst)
|
||||||
memset(buf, 0, sizeof(buf));
|
memset(buf, 0, sizeof(buf));
|
||||||
for (left = size, d = data; left > 0; left--, d++)
|
for (left = size, d = data; left > 0; left--, d++)
|
||||||
{
|
{
|
||||||
if ((index == 0) && (left < 64))
|
if ((idx == 0) && (left < 64))
|
||||||
{
|
{
|
||||||
memset(buf, 0, 60);
|
memset(buf, 0, 60);
|
||||||
buf[60] = (size >> 24) & 0xff;
|
buf[60] = (size >> 24) & 0xff;
|
||||||
|
@ -42,11 +42,11 @@ e_sha1_sum(unsigned char *data, int size, unsigned char *dst)
|
||||||
buf[62] = (size >> 8) & 0xff;
|
buf[62] = (size >> 8) & 0xff;
|
||||||
buf[63] = (size ) & 0xff;
|
buf[63] = (size ) & 0xff;
|
||||||
}
|
}
|
||||||
buf[index] = *d;
|
buf[idx] = *d;
|
||||||
index++;
|
idx++;
|
||||||
if ((index == 64) || (left == 1))
|
if ((idx == 64) || (left == 1))
|
||||||
{
|
{
|
||||||
if ((left == 1) && (index < 64)) buf[index] = 0x80;
|
if ((left == 1) && (idx < 64)) buf[idx] = 0x80;
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
word[i] = (unsigned int)buf[(i * 4) ] << 24;
|
word[i] = (unsigned int)buf[(i * 4) ] << 24;
|
||||||
|
@ -88,7 +88,7 @@ e_sha1_sum(unsigned char *data, int size, unsigned char *dst)
|
||||||
digest[2] += wc;
|
digest[2] += wc;
|
||||||
digest[3] += wd;
|
digest[3] += wd;
|
||||||
digest[4] += we;
|
digest[4] += we;
|
||||||
index = 0;
|
idx = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -569,18 +569,18 @@ _e_table_smart_reconfigure(E_Smart_Data *sd)
|
||||||
EINA_LIST_FOREACH(sd->items, l, obj)
|
EINA_LIST_FOREACH(sd->items, l, obj)
|
||||||
{
|
{
|
||||||
E_Table_Item *ti;
|
E_Table_Item *ti;
|
||||||
Evas_Coord ww, hh, ow, oh, i;
|
Evas_Coord ww, hh, ow, oh, idx;
|
||||||
|
|
||||||
ti = evas_object_data_get(obj, "e_table_data");
|
ti = evas_object_data_get(obj, "e_table_data");
|
||||||
|
|
||||||
xx = x;
|
xx = x;
|
||||||
for (i = 0; i < ti->col; i++) xx += cols[i];
|
for (idx = 0; idx < ti->col; idx++) xx += cols[idx];
|
||||||
ww = 0;
|
ww = 0;
|
||||||
for (i = ti->col; i < (ti->col + ti->colspan); i++) ww += cols[i];
|
for (idx = ti->col; idx < (ti->col + ti->colspan); idx++) ww += cols[idx];
|
||||||
yy = y;
|
yy = y;
|
||||||
for (i = 0; i < ti->row; i++) yy += rows[i];
|
for (idx = 0; idx < ti->row; idx++) yy += rows[idx];
|
||||||
hh = 0;
|
hh = 0;
|
||||||
for (i = ti->row; i < (ti->row + ti->rowspan); i++) hh += rows[i];
|
for (idx = ti->row; idx < (ti->row + ti->rowspan); idx++) hh += rows[idx];
|
||||||
|
|
||||||
ow = ti->min.w;
|
ow = ti->min.w;
|
||||||
if (ti->fill_w) ow = ww;
|
if (ti->fill_w) ow = ww;
|
||||||
|
|
|
@ -427,13 +427,13 @@ _e_thumb_cb_exe_event_del(void *data __UNUSED__, int type __UNUSED__, void *even
|
||||||
{
|
{
|
||||||
while ((int) eina_list_count(_thumbnailers_exe) < _num_thumbnailers)
|
while ((int) eina_list_count(_thumbnailers_exe) < _num_thumbnailers)
|
||||||
{
|
{
|
||||||
Ecore_Exe *exe;
|
Ecore_Exe *exe_thumb;
|
||||||
char buf[4096];
|
char buf[4096];
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_thumb --nice=%d", e_prefix_lib_get(),
|
snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_thumb --nice=%d", e_prefix_lib_get(),
|
||||||
e_config->thumb_nice);
|
e_config->thumb_nice);
|
||||||
exe = ecore_exe_run(buf, NULL);
|
exe_thumb = ecore_exe_run(buf, NULL);
|
||||||
_thumbnailers_exe = eina_list_append(_thumbnailers_exe, exe);
|
_thumbnailers_exe = eina_list_append(_thumbnailers_exe, exe_thumb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
|
|
|
@ -417,7 +417,7 @@ _e_thumb_generate(E_Thumb *eth)
|
||||||
if (data)
|
if (data)
|
||||||
{
|
{
|
||||||
unsigned int *data3;
|
unsigned int *data3;
|
||||||
unsigned char id[(21 * 4) + 1];
|
unsigned char id2[(21 * 4) + 1];
|
||||||
int n, i;
|
int n, i;
|
||||||
int hi, si, vi;
|
int hi, si, vi;
|
||||||
float h, s, v;
|
float h, s, v;
|
||||||
|
@ -448,11 +448,11 @@ _e_thumb_generate(E_Thumb *eth)
|
||||||
vi = 20 * v; \
|
vi = 20 * v; \
|
||||||
if (si < 2) hi = 25;
|
if (si < 2) hi = 25;
|
||||||
#define SAVEHSV(h, s, v) \
|
#define SAVEHSV(h, s, v) \
|
||||||
id[n++] = 'a' + h; \
|
id2[n++] = 'a' + h; \
|
||||||
id[n++] = 'a' + v; \
|
id2[n++] = 'a' + v; \
|
||||||
id[n++] = 'a' + s;
|
id2[n++] = 'a' + s;
|
||||||
#define SAVEX(x) \
|
#define SAVEX(x) \
|
||||||
id[n++] = 'a' + x;
|
id2[n++] = 'a' + x;
|
||||||
#if 0
|
#if 0
|
||||||
HSV(data3[0]);
|
HSV(data3[0]);
|
||||||
SAVEHSV(hi, si, vi);
|
SAVEHSV(hi, si, vi);
|
||||||
|
@ -504,8 +504,8 @@ _e_thumb_generate(E_Thumb *eth)
|
||||||
SAVEX(si);
|
SAVEX(si);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
id[n++] = 0;
|
id2[n++] = 0;
|
||||||
eet_write(ef, "/thumbnail/sort_id", id, n, 1);
|
eet_write(ef, "/thumbnail/sort_id", id2, n, 1);
|
||||||
free(data3);
|
free(data3);
|
||||||
}
|
}
|
||||||
free(data2);
|
free(data2);
|
||||||
|
|
|
@ -116,36 +116,36 @@ e_util_zone_current_get(E_Manager *man)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI int
|
EAPI int
|
||||||
e_util_glob_match(const char *str, const char *glob)
|
e_util_glob_match(const char *str, const char *pattern)
|
||||||
{
|
{
|
||||||
if ((!str) || (!glob)) return 0;
|
if ((!str) || (!pattern)) return 0;
|
||||||
if (glob[0] == 0)
|
if (pattern[0] == 0)
|
||||||
{
|
{
|
||||||
if (str[0] == 0) return 1;
|
if (str[0] == 0) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!strcmp(glob, "*")) return 1;
|
if (!strcmp(pattern, "*")) return 1;
|
||||||
if (!fnmatch(glob, str, 0)) return 1;
|
if (!fnmatch(pattern, str, 0)) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI int
|
EAPI int
|
||||||
e_util_glob_case_match(const char *str, const char *glob)
|
e_util_glob_case_match(const char *str, const char *pattern)
|
||||||
{
|
{
|
||||||
const char *p;
|
const char *p;
|
||||||
char *tstr, *tglob, *tp;
|
char *tstr, *tglob, *tp;
|
||||||
|
|
||||||
if (glob[0] == 0)
|
if (pattern[0] == 0)
|
||||||
{
|
{
|
||||||
if (str[0] == 0) return 1;
|
if (str[0] == 0) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!strcmp(glob, "*")) return 1;
|
if (!strcmp(pattern, "*")) return 1;
|
||||||
tstr = alloca(strlen(str) + 1);
|
tstr = alloca(strlen(str) + 1);
|
||||||
for (tp = tstr, p = str; *p != 0; p++, tp++) *tp = tolower(*p);
|
for (tp = tstr, p = str; *p != 0; p++, tp++) *tp = tolower(*p);
|
||||||
*tp = 0;
|
*tp = 0;
|
||||||
tglob = alloca(strlen(glob) + 1);
|
tglob = alloca(strlen(pattern) + 1);
|
||||||
for (tp = tglob, p = glob; *p != 0; p++, tp++) *tp = tolower(*p);
|
for (tp = tglob, p = pattern; *p != 0; p++, tp++) *tp = tolower(*p);
|
||||||
*tp = 0;
|
*tp = 0;
|
||||||
if (!fnmatch(tglob, tstr, 0)) return 1;
|
if (!fnmatch(tglob, tstr, 0)) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -180,12 +180,12 @@ _e_wid_reconfigure(E_Widget_Data *wd)
|
||||||
else sx = wd->cx;
|
else sx = wd->cx;
|
||||||
for (x = sx; x < wd->dx; x++)
|
for (x = sx; x < wd->dx; x++)
|
||||||
{
|
{
|
||||||
Evas_Object *dw;
|
Evas_Object *dp;
|
||||||
|
|
||||||
dw = e_widget_deskpreview_desk_add(wd->obj, zone, x, y, mw, mh);
|
dp = e_widget_deskpreview_desk_add(wd->obj, zone, x, y, mw, mh);
|
||||||
evas_object_size_hint_aspect_set(dw, EVAS_ASPECT_CONTROL_BOTH, zone->w, zone->h);
|
evas_object_size_hint_aspect_set(dp, EVAS_ASPECT_CONTROL_BOTH, zone->w, zone->h);
|
||||||
evas_object_table_pack(wd->table, dw, x, y, 1, 1);
|
evas_object_table_pack(wd->table, dp, x, y, 1, 1);
|
||||||
wd->desks = eina_list_append(wd->desks, dw);
|
wd->desks = eina_list_append(wd->desks, dp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -131,12 +131,12 @@ e_widget_flist_has_parent_get(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_widget_flist_select_set(Evas_Object *obj, const char *file, int select)
|
e_widget_flist_select_set(Evas_Object *obj, const char *file, int s)
|
||||||
{
|
{
|
||||||
E_Widget_Data *wd = NULL;
|
E_Widget_Data *wd = NULL;
|
||||||
|
|
||||||
wd = e_widget_data_get(obj);
|
wd = e_widget_data_get(obj);
|
||||||
e_fm2_select_set(wd->o_fm, file, select);
|
e_fm2_select_set(wd->o_fm, file, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
|
|
@ -97,16 +97,16 @@ _e_xinerama_update(void)
|
||||||
n = ecore_x_xinerama_screen_count_get();
|
n = ecore_x_xinerama_screen_count_get();
|
||||||
if (n < 1)
|
if (n < 1)
|
||||||
{
|
{
|
||||||
E_Screen *scr;
|
E_Screen *screen;
|
||||||
|
|
||||||
scr = E_NEW(E_Screen, 1);
|
screen = E_NEW(E_Screen, 1);
|
||||||
scr->screen = 0;
|
screen->screen = 0;
|
||||||
scr->escreen = scr->screen;
|
screen->escreen = screen->screen;
|
||||||
scr->x = 0;
|
screen->x = 0;
|
||||||
scr->y = 0;
|
screen->y = 0;
|
||||||
scr->w = rw;
|
screen->w = rw;
|
||||||
scr->h = rh;
|
screen->h = rh;
|
||||||
all_screens = eina_list_append(all_screens, scr);
|
all_screens = eina_list_append(all_screens, screen);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -117,19 +117,19 @@ _e_xinerama_update(void)
|
||||||
/* get each xinerama screen geometry */
|
/* get each xinerama screen geometry */
|
||||||
if (ecore_x_xinerama_screen_geometry_get(i, &x, &y, &w, &h))
|
if (ecore_x_xinerama_screen_geometry_get(i, &x, &y, &w, &h))
|
||||||
{
|
{
|
||||||
E_Screen *scr;
|
E_Screen *screen;
|
||||||
|
|
||||||
printf("E17 INIT: XINERAMA SCREEN: [%i], %ix%i+%i+%i\n",
|
printf("E17 INIT: XINERAMA SCREEN: [%i], %ix%i+%i+%i\n",
|
||||||
i, w, h, x, y);
|
i, w, h, x, y);
|
||||||
/* add it to our list */
|
/* add it to our list */
|
||||||
scr = E_NEW(E_Screen, 1);
|
screen = E_NEW(E_Screen, 1);
|
||||||
scr->screen = i;
|
screen->screen = i;
|
||||||
scr->escreen = scr->screen;
|
screen->escreen = screen->screen;
|
||||||
scr->x = x;
|
screen->x = x;
|
||||||
scr->y = y;
|
screen->y = y;
|
||||||
scr->w = w;
|
screen->w = w;
|
||||||
scr->h = h;
|
screen->h = h;
|
||||||
all_screens = eina_list_append(all_screens, scr);
|
all_screens = eina_list_append(all_screens, screen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue