forked from enlightenment/enlightenment
parent
40f6e3bfdd
commit
ab62c5ccf1
|
@ -847,7 +847,7 @@ _e_drag_update(Ecore_X_Window root, int x, int y, Ecore_X_Atom action)
|
|||
leave_ev.y = y - dy;
|
||||
if (E_INSIDE(x, y, dx, dy, dw, dh) && _e_drag_win_matches(h, win, 1))
|
||||
{
|
||||
if(e_drop_handler_responsive_get(h)) responsive = 1;
|
||||
if (e_drop_handler_responsive_get(h)) responsive = 1;
|
||||
|
||||
if (!h->entered)
|
||||
{
|
||||
|
@ -1136,7 +1136,7 @@ _e_dnd_cb_mouse_move(void *data, int type, void *event)
|
|||
ev = event;
|
||||
if (ev->win != _drag_win) return 1;
|
||||
|
||||
if(!_xdnd) _e_drag_update(_drag_win_root, ev->x, ev->y, ECORE_X_ATOM_XDND_ACTION_PRIVATE);
|
||||
if (!_xdnd) _e_drag_update(_drag_win_root, ev->x, ev->y, ECORE_X_ATOM_XDND_ACTION_PRIVATE);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -1302,7 +1302,7 @@ _e_dnd_cb_event_dnd_position(void *data, int type, void *event)
|
|||
else
|
||||
{
|
||||
responsive = _e_drag_update(ev->win, ev->position.x, ev->position.y, ev->action);
|
||||
if(responsive)
|
||||
if (responsive)
|
||||
{
|
||||
ecore_x_dnd_send_status(1, 0, rect, _action);
|
||||
}
|
||||
|
|
|
@ -2525,7 +2525,7 @@ _e_fm2_file_paste(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
args = _e_fm_string_append_quoted(args, &size, &length, sd->realpath);
|
||||
|
||||
/* Roll the operation! */
|
||||
if(_e_fm_file_buffer_copying)
|
||||
if (_e_fm_file_buffer_copying)
|
||||
{
|
||||
_e_fm_client_file_copy(args);
|
||||
}
|
||||
|
@ -4295,7 +4295,7 @@ _e_fm_typebuf_timer_cb(void *data)
|
|||
Evas_Object *obj = data;
|
||||
E_Fm2_Smart_Data *sd;
|
||||
|
||||
if(!data) return 0;
|
||||
if (!data) return 0;
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return 0;
|
||||
|
||||
|
@ -4325,7 +4325,7 @@ _e_fm2_typebuf_char_append(Evas_Object *obj, const char *ch)
|
|||
_e_fm2_typebuf_match(obj);
|
||||
edje_object_part_text_set(sd->overlay, "e.text.typebuf_label", sd->typebuf.buf);
|
||||
|
||||
if(sd->typebuf.timer)
|
||||
if (sd->typebuf.timer)
|
||||
{
|
||||
ecore_timer_del(sd->typebuf.timer);
|
||||
}
|
||||
|
@ -4657,7 +4657,7 @@ _e_fm_file_reorder(const char *file, const char *dst, const char *relative, int
|
|||
void *data, *p;
|
||||
|
||||
data = alloca(length);
|
||||
if(!data) return;
|
||||
if (!data) return;
|
||||
|
||||
p = data;
|
||||
|
||||
|
@ -4677,10 +4677,10 @@ _e_fm_icon_save_position(const char *file, Evas_Coord x, Evas_Coord y, Evas_Coor
|
|||
{
|
||||
E_Fm2_Custom_File *cf, new;
|
||||
|
||||
if(!file) return;
|
||||
if (!file) return;
|
||||
|
||||
cf = e_fm2_custom_file_get(file);
|
||||
if(!cf)
|
||||
if (!cf)
|
||||
{
|
||||
memset(&new, 0, sizeof(E_Fm2_Custom_File));
|
||||
cf = &new;
|
||||
|
@ -4701,7 +4701,7 @@ _e_fm_drop_menu_copy_cb(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
{
|
||||
char *args = data;
|
||||
|
||||
if(!data) return;
|
||||
if (!data) return;
|
||||
|
||||
_e_fm_client_file_copy(args);
|
||||
}
|
||||
|
@ -4711,7 +4711,7 @@ _e_fm_drop_menu_move_cb(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
{
|
||||
char *args = data;
|
||||
|
||||
if(!data) return;
|
||||
if (!data) return;
|
||||
|
||||
_e_fm_client_file_move(args);
|
||||
}
|
||||
|
@ -4719,7 +4719,7 @@ _e_fm_drop_menu_move_cb(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
static void
|
||||
_e_fm_drop_menu_abort_cb(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||
{
|
||||
if(!data) return;
|
||||
if (!data) return;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -4727,7 +4727,7 @@ _e_fm_drop_menu_post_cb(void *data, E_Menu *m)
|
|||
{
|
||||
char *args = data;
|
||||
|
||||
if(!data) return;
|
||||
if (!data) return;
|
||||
|
||||
free(args);
|
||||
}
|
||||
|
@ -4742,7 +4742,7 @@ _e_fm_drop_menu(char *args)
|
|||
E_Zone *zone = NULL;
|
||||
int x, y;
|
||||
|
||||
if(!menu) return;
|
||||
if (!menu) return;
|
||||
|
||||
item = e_menu_item_new(menu);
|
||||
e_menu_item_label_set(item, _("Copy"));
|
||||
|
@ -4969,17 +4969,17 @@ _e_fm2_cb_dnd_drop(void *data, const char *type, void *event)
|
|||
}
|
||||
}
|
||||
|
||||
if(e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_COPY)
|
||||
if (e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_COPY)
|
||||
{
|
||||
_e_fm_client_file_copy(args);
|
||||
free(args);
|
||||
}
|
||||
else if(e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_MOVE)
|
||||
else if (e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_MOVE)
|
||||
{
|
||||
_e_fm_client_file_move(args);
|
||||
free(args);
|
||||
}
|
||||
else if(e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_ASK)
|
||||
else if (e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_ASK)
|
||||
{
|
||||
_e_fm_drop_menu(args);
|
||||
}
|
||||
|
@ -7396,7 +7396,7 @@ _e_fm2_file_delete_delete_cb(void *obj)
|
|||
static char *
|
||||
_e_fm_string_append_char(char *str, size_t *size, size_t *len, char c)
|
||||
{
|
||||
if(str == NULL)
|
||||
if (str == NULL)
|
||||
{
|
||||
str = malloc(4096);
|
||||
str[0] = '\x00';
|
||||
|
@ -7404,7 +7404,7 @@ _e_fm_string_append_char(char *str, size_t *size, size_t *len, char c)
|
|||
*len = 0;
|
||||
}
|
||||
|
||||
if(*len >= *size - 1)
|
||||
if (*len >= *size - 1)
|
||||
{
|
||||
*size += 1024;
|
||||
str = realloc(str, *size);
|
||||
|
@ -7467,7 +7467,7 @@ _e_fm2_file_delete_yes_cb(void *data, E_Dialog *dialog)
|
|||
if (e_filereg_file_protected(buf)) continue;
|
||||
|
||||
files = _e_fm_string_append_quoted(files, &size, &len, buf);
|
||||
if(l->next) files = _e_fm_string_append_char(files, &size, &len, ' ');
|
||||
if (l->next) files = _e_fm_string_append_char(files, &size, &len, ' ');
|
||||
}
|
||||
|
||||
eina_list_free(sel);
|
||||
|
|
|
@ -294,7 +294,7 @@ _e_fm2_volume_write(E_Volume *v)
|
|||
v->udi);
|
||||
fclose(f);
|
||||
|
||||
if(e_config->hal_desktop)
|
||||
if (e_config->hal_desktop)
|
||||
{
|
||||
snprintf(buf2, sizeof(buf2) - 1, "%s/Desktop/|%s_%d.desktop",
|
||||
e_user_homedir_get(), id, v->partition_number);
|
||||
|
@ -325,7 +325,7 @@ _e_fm2_volume_erase(E_Volume *v)
|
|||
ecore_file_unlink(buf);
|
||||
_e_fm2_file_force_update(buf);
|
||||
|
||||
if(e_config->hal_desktop)
|
||||
if (e_config->hal_desktop)
|
||||
{
|
||||
snprintf(buf, sizeof(buf) - 1, "%s/.e/e/fileman/favorites/|%s_%d.desktop",
|
||||
e_user_homedir_get(), id, v->partition_number);
|
||||
|
@ -510,7 +510,7 @@ e_fm2_hal_show_desktop_icons(void)
|
|||
{
|
||||
v = eina_list_data_get(l);
|
||||
|
||||
if(!v) continue;
|
||||
if (!v) continue;
|
||||
if (!v->storage) continue;
|
||||
|
||||
id = ecore_file_file_get(v->storage->udi);
|
||||
|
@ -521,7 +521,7 @@ e_fm2_hal_show_desktop_icons(void)
|
|||
snprintf(buf2, sizeof(buf2) - 1, "%s/Desktop/|%s_%d.desktop",
|
||||
e_user_homedir_get(), id, v->partition_number);
|
||||
|
||||
if(ecore_file_exists(buf) && !ecore_file_exists(buf2))
|
||||
if (ecore_file_exists(buf) && !ecore_file_exists(buf2))
|
||||
{
|
||||
ecore_file_symlink(buf, buf2);
|
||||
_e_fm2_file_force_update(buf2);
|
||||
|
@ -541,7 +541,7 @@ e_fm2_hal_hide_desktop_icons(void)
|
|||
{
|
||||
v = eina_list_data_get(l);
|
||||
|
||||
if(!v) continue;
|
||||
if (!v) continue;
|
||||
if (!v->storage) continue;
|
||||
|
||||
id = ecore_file_file_get(v->storage->udi);
|
||||
|
@ -549,7 +549,7 @@ e_fm2_hal_hide_desktop_icons(void)
|
|||
snprintf(buf, sizeof(buf) - 1, "%s/Desktop/|%s_%d.desktop",
|
||||
e_user_homedir_get(), id, v->partition_number);
|
||||
|
||||
if(ecore_file_exists(buf))
|
||||
if (ecore_file_exists(buf))
|
||||
{
|
||||
ecore_file_unlink(buf);
|
||||
_e_fm2_file_force_update(buf);
|
||||
|
|
|
@ -997,7 +997,7 @@ _e_fm_monitor_start(int id, const char *path)
|
|||
{
|
||||
E_Fm_Task *task = malloc(sizeof(E_Fm_Task));
|
||||
|
||||
if(!task) return;
|
||||
if (!task) return;
|
||||
|
||||
task->id = id;
|
||||
task->type = E_FM_OP_MONITOR_START;
|
||||
|
@ -1209,7 +1209,7 @@ _e_fm_task_node_get(int id)
|
|||
while(l)
|
||||
{
|
||||
task = eina_list_data_get(l);
|
||||
if(task->id == id)
|
||||
if (task->id == id)
|
||||
return l;
|
||||
|
||||
l = eina_list_next(l);
|
||||
|
@ -1242,9 +1242,9 @@ _e_fm_task_remove(E_Fm_Task *task)
|
|||
|
||||
_e_fm_tasks = eina_list_remove_list(_e_fm_tasks, l);
|
||||
|
||||
if(task->src) eina_stringshare_del(task->src);
|
||||
if(task->dst) eina_stringshare_del(task->dst);
|
||||
if(task->rel) eina_stringshare_del(task->rel);
|
||||
if (task->src) eina_stringshare_del(task->src);
|
||||
if (task->dst) eina_stringshare_del(task->dst);
|
||||
if (task->rel) eina_stringshare_del(task->rel);
|
||||
|
||||
free(task);
|
||||
}
|
||||
|
@ -1254,7 +1254,7 @@ _e_fm_mkdir_try(E_Fm_Task *task)
|
|||
{
|
||||
char buf[PATH_MAX + 4096];
|
||||
|
||||
if(mkdir(task->src, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) < 0)
|
||||
if (mkdir(task->src, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) < 0)
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "Cannot make directory '%s': %s.", task->src, strerror(errno));
|
||||
_e_client_send(task->id, E_FM_OP_ERROR_RETRY_ABORT, buf, strlen(buf) + 1);
|
||||
|
@ -1293,18 +1293,18 @@ _e_fm_handle_error_response(int id, E_Fm_Op_Type type)
|
|||
E_Fm_Task *task = _e_fm_task_get(id);
|
||||
E_Fm_Slave *slave = NULL;
|
||||
|
||||
if(!task)
|
||||
if (!task)
|
||||
{
|
||||
slave = _e_fm_slave_get(id);
|
||||
if(slave) _e_fm_slave_send(slave, type, NULL, 0);
|
||||
if (slave) _e_fm_slave_send(slave, type, NULL, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if(type == E_FM_OP_ERROR_RESPONSE_ABORT)
|
||||
if (type == E_FM_OP_ERROR_RESPONSE_ABORT)
|
||||
{
|
||||
_e_fm_task_remove(task);
|
||||
}
|
||||
else if(type == E_FM_OP_ERROR_RESPONSE_RETRY)
|
||||
else if (type == E_FM_OP_ERROR_RESPONSE_RETRY)
|
||||
{
|
||||
switch(task->type)
|
||||
{
|
||||
|
@ -2085,12 +2085,12 @@ _e_fm_reorder(const char *file, const char *dst, const char *relative, int after
|
|||
char buffer[PATH_MAX];
|
||||
char order[PATH_MAX];
|
||||
|
||||
if(!file || !dst || !relative) return;
|
||||
if(after != 0 && after != 1 && after != 2) return;
|
||||
if (!file || !dst || !relative) return;
|
||||
if (after != 0 && after != 1 && after != 2) return;
|
||||
// printf("%s:%s(%d) Reorder:\n\tfile = %s\n\tdst = %s\n\trelative = %s\n\tafter = %d\n", __FILE__, __FUNCTION__, __LINE__, file, dst, relative, after);
|
||||
|
||||
snprintf(order, sizeof(order), "%s/.order", dst);
|
||||
if(ecore_file_exists(order))
|
||||
if (ecore_file_exists(order))
|
||||
{
|
||||
FILE *forder;
|
||||
Eina_List *files = NULL, *l;
|
||||
|
|
|
@ -449,10 +449,10 @@ _e_fm_op_stdin_data(void *data, Ecore_Fd_Handler * fd_handler)
|
|||
|
||||
static void _e_fm_op_set_up_idlers()
|
||||
{
|
||||
if(!_e_fm_op_scan_idler_p)
|
||||
if (!_e_fm_op_scan_idler_p)
|
||||
_e_fm_op_scan_idler_p = ecore_idler_add(_e_fm_op_scan_idler, NULL);
|
||||
|
||||
if(!_e_fm_op_work_idler_p)
|
||||
if (!_e_fm_op_work_idler_p)
|
||||
_e_fm_op_work_idler_p = ecore_idler_add(_e_fm_op_work_idler, NULL);
|
||||
}
|
||||
|
||||
|
@ -478,7 +478,7 @@ static void _e_fm_op_set_up_idlers()
|
|||
|
||||
static void _e_fm_op_delete_idler(int *mark)
|
||||
{
|
||||
if(mark == &_e_fm_op_work_error)
|
||||
if (mark == &_e_fm_op_work_error)
|
||||
{
|
||||
ecore_idler_del(_e_fm_op_work_idler_p);
|
||||
_e_fm_op_work_idler_p = NULL;
|
||||
|
|
Loading…
Reference in New Issue