this is a rather large stress test of the improved version of uncrustify+config that I have been working on
as far as I can tell, it's perfect for non-headers header example following as soon as I finish making it space EINA_XYZ() args properly SVN revision: 53774
This commit is contained in:
parent
be3d7651e6
commit
76224aeb9e
232
src/bin/e_fm.c
232
src/bin/e_fm.c
|
@ -47,18 +47,23 @@ struct _E_Fm2_Smart_Data
|
|||
const char *path;
|
||||
const char *realpath;
|
||||
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
Evas_Coord w, h;
|
||||
} max, pmax;
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
Evas_Coord x, y;
|
||||
} pos;
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
Eina_List *list;
|
||||
int member_max;
|
||||
} regions;
|
||||
struct {
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
E_Fm_Cb func;
|
||||
void *data;
|
||||
} start, end, replace;
|
||||
|
@ -90,21 +95,24 @@ struct _E_Fm2_Smart_Data
|
|||
const char *custom_theme;
|
||||
const char *custom_theme_content;
|
||||
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
Evas_Object *obj, *obj2;
|
||||
Eina_List *last_insert;
|
||||
Eina_List **list_index;
|
||||
int iter;
|
||||
} tmp;
|
||||
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
Eina_List *actions;
|
||||
Ecore_Idler *idler;
|
||||
Ecore_Timer *timer;
|
||||
Eina_Bool deletions : 1;
|
||||
} live;
|
||||
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
char *buf;
|
||||
Ecore_Timer *timer;
|
||||
} typebuf;
|
||||
|
@ -121,7 +129,8 @@ struct _E_Fm2_Smart_Data
|
|||
Eina_Bool drop_all : 1;
|
||||
Eina_Bool drag : 1;
|
||||
Eina_Bool selecting : 1;
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
int ox, oy;
|
||||
int x, y, w, h;
|
||||
} selrect;
|
||||
|
@ -153,7 +162,8 @@ struct _E_Fm2_Icon
|
|||
|
||||
E_Fm2_Icon_Info info;
|
||||
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
Evas_Coord x, y;
|
||||
Eina_Bool start : 1;
|
||||
Eina_Bool dnd : 1;
|
||||
|
@ -204,7 +214,7 @@ struct _E_Fm2_Context_Menu_Data
|
|||
E_Fm2_Mime_Handler *handler;
|
||||
};
|
||||
|
||||
static const char *_e_fm2_dev_path_map(const char *dev, const char *path);
|
||||
static const char * _e_fm2_dev_path_map(const char *dev, const char *path);
|
||||
static void _e_fm2_file_add(Evas_Object *obj, const char *file, int unique, const char *file_rel, int after, E_Fm2_Finfo *finf);
|
||||
static void _e_fm2_file_del(Evas_Object *obj, const char *file);
|
||||
static void _e_fm2_queue_process(Evas_Object *obj);
|
||||
|
@ -219,13 +229,13 @@ static void _e_fm2_config_free(E_Fm2_Config *cfg);
|
|||
static void _e_fm2_dir_load_props(E_Fm2_Smart_Data *sd);
|
||||
static void _e_fm2_dir_save_props(E_Fm2_Smart_Data *sd);
|
||||
|
||||
static Evas_Object *_e_fm2_file_fm2_find(const char *file);
|
||||
static E_Fm2_Icon *_e_fm2_icon_find(Evas_Object *obj, const char *file);
|
||||
static const char *_e_fm2_uri_escape(const char *path);
|
||||
static Eina_List *_e_fm2_uri_path_list_get(Eina_List *uri_list);
|
||||
static Eina_List *_e_fm2_uri_icon_list_get(Eina_List *uri);
|
||||
static Evas_Object * _e_fm2_file_fm2_find(const char *file);
|
||||
static E_Fm2_Icon * _e_fm2_icon_find(Evas_Object *obj, const char *file);
|
||||
static const char * _e_fm2_uri_escape(const char *path);
|
||||
static Eina_List * _e_fm2_uri_path_list_get(Eina_List *uri_list);
|
||||
static Eina_List * _e_fm2_uri_icon_list_get(Eina_List *uri);
|
||||
|
||||
static E_Fm2_Icon *_e_fm2_icon_new(E_Fm2_Smart_Data *sd, const char *file, E_Fm2_Finfo *finf);
|
||||
static E_Fm2_Icon * _e_fm2_icon_new(E_Fm2_Smart_Data *sd, const char *file, E_Fm2_Finfo *finf);
|
||||
static void _e_fm2_icon_unfill(E_Fm2_Icon *ic);
|
||||
static int _e_fm2_icon_fill(E_Fm2_Icon *ic, E_Fm2_Finfo *finf);
|
||||
static void _e_fm2_icon_free(E_Fm2_Icon *ic);
|
||||
|
@ -233,7 +243,7 @@ static void _e_fm2_icon_realize(E_Fm2_Icon *ic);
|
|||
static void _e_fm2_icon_unrealize(E_Fm2_Icon *ic);
|
||||
static Eina_Bool _e_fm2_icon_visible(const E_Fm2_Icon *ic);
|
||||
static void _e_fm2_icon_label_set(E_Fm2_Icon *ic, Evas_Object *obj);
|
||||
static Evas_Object *_e_fm2_icon_icon_direct_set(E_Fm2_Icon *ic, Evas_Object *o, Evas_Smart_Cb gen_func, void *data, int force_gen);
|
||||
static Evas_Object * _e_fm2_icon_icon_direct_set(E_Fm2_Icon *ic, Evas_Object *o, Evas_Smart_Cb gen_func, void *data, int force_gen);
|
||||
static void _e_fm2_icon_icon_set(E_Fm2_Icon *ic);
|
||||
static void _e_fm2_icon_thumb(const E_Fm2_Icon *ic, Evas_Object *oic, int force);
|
||||
static void _e_fm2_icon_select(E_Fm2_Icon *ic);
|
||||
|
@ -248,8 +258,8 @@ static int _e_fm2_region_visible(E_Fm2_Region *rg);
|
|||
|
||||
static void _e_fm2_icon_make_visible(E_Fm2_Icon *ic);
|
||||
static void _e_fm2_icon_desel_any(Evas_Object *obj);
|
||||
static E_Fm2_Icon *_e_fm2_icon_first_selected_find(Evas_Object *obj);
|
||||
static E_Fm2_Icon *_e_fm2_icon_next_find(Evas_Object *obj, int next, int match_func(E_Fm2_Icon *ic, void *data), void *data);
|
||||
static E_Fm2_Icon * _e_fm2_icon_first_selected_find(Evas_Object *obj);
|
||||
static E_Fm2_Icon * _e_fm2_icon_next_find(Evas_Object *obj, int next, intmatch_func(E_Fm2_Icon * ic, void *data), void *data);
|
||||
|
||||
static void _e_fm2_icon_sel_first(Evas_Object *obj);
|
||||
static void _e_fm2_icon_sel_last(Evas_Object *obj);
|
||||
|
@ -297,7 +307,7 @@ static void _e_fm2_smart_resize(Evas_Object *object, Evas_Coord w, Evas_Coord h)
|
|||
static void _e_fm2_smart_show(Evas_Object *object);
|
||||
static void _e_fm2_smart_hide(Evas_Object *object);
|
||||
static void _e_fm2_smart_color_set(Evas_Object *obj, int r, int g, int b, int a);
|
||||
static void _e_fm2_smart_clip_set(Evas_Object *obj, Evas_Object * clip);
|
||||
static void _e_fm2_smart_clip_set(Evas_Object *obj, Evas_Object *clip);
|
||||
static void _e_fm2_smart_clip_unset(Evas_Object *obj);
|
||||
|
||||
static void _e_fm2_menu(Evas_Object *obj, unsigned int timestamp);
|
||||
|
@ -314,7 +324,7 @@ static void _e_fm2_view_menu_list_cb(void *data, E_Menu *m, E_Menu_Item *mi);
|
|||
static void _e_fm2_view_menu_use_default_cb(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_fm2_view_menu_set_background_cb(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_fm2_view_menu_set_overlay_cb(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_fm2_view_image_sel(E_Fm2_Smart_Data *sd, const char *title, void (*ok_cb) (void *data, E_Dialog *dia), void (*clear_cb) (void *data, E_Dialog *dia));
|
||||
static void _e_fm2_view_image_sel(E_Fm2_Smart_Data *sd, const char *title, void (*ok_cb)(void *data, E_Dialog *dia), void (*clear_cb)(void *data, E_Dialog *dia));
|
||||
static void _e_fm2_view_image_sel_close(void *data, E_Dialog *dia);
|
||||
static void _e_fm2_refresh(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_fm2_toggle_hidden_files(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
|
@ -333,24 +343,24 @@ static void _e_fm2_file_properties(void *data, E_Menu *m, E_Menu_Item *mi);
|
|||
static void _e_fm2_file_properties_delete_cb(void *obj);
|
||||
static void _e_fm2_file_do_rename(const char *text, E_Fm2_Icon *ic);
|
||||
|
||||
static Evas_Object* _e_fm2_icon_entry_widget_add(E_Fm2_Icon *ic);
|
||||
static Evas_Object * _e_fm2_icon_entry_widget_add(E_Fm2_Icon *ic);
|
||||
static void _e_fm2_icon_entry_widget_del(E_Fm2_Icon *ic);
|
||||
static void _e_fm2_icon_entry_widget_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
static void _e_fm2_icon_entry_widget_accept(E_Fm2_Icon *ic);
|
||||
|
||||
static E_Dialog* _e_fm_retry_abort_dialog(int pid, const char *str);
|
||||
static E_Dialog * _e_fm_retry_abort_dialog(int pid, const char *str);
|
||||
static void _e_fm_retry_abort_delete_cb(void *obj);
|
||||
static void _e_fm_retry_abort_retry_cb(void *data, E_Dialog *dialog);
|
||||
static void _e_fm_retry_abort_abort_cb(void *data, E_Dialog *dialog);
|
||||
|
||||
static E_Dialog* _e_fm_overwrite_dialog(int pid, const char *str);
|
||||
static E_Dialog * _e_fm_overwrite_dialog(int pid, const char *str);
|
||||
static void _e_fm_overwrite_delete_cb(void *obj);
|
||||
static void _e_fm_overwrite_no_cb(void *data, E_Dialog *dialog);
|
||||
static void _e_fm_overwrite_no_all_cb(void *data, E_Dialog *dialog);
|
||||
static void _e_fm_overwrite_yes_cb(void *data, E_Dialog *dialog);
|
||||
static void _e_fm_overwrite_yes_all_cb(void *data, E_Dialog *dialog);
|
||||
|
||||
static E_Dialog* _e_fm_error_dialog(int pid, const char *str);
|
||||
static E_Dialog * _e_fm_error_dialog(int pid, const char *str);
|
||||
static void _e_fm_error_delete_cb(void *obj);
|
||||
static void _e_fm_error_retry_cb(void *data, E_Dialog *dialog);
|
||||
static void _e_fm_error_abort_cb(void *data, E_Dialog *dialog);
|
||||
|
@ -405,8 +415,8 @@ static void _e_fm2_sel_rect_update(void *data);
|
|||
static inline void _e_fm2_context_menu_append(Evas_Object *obj, const char *path, Eina_List *l, E_Menu *mn, E_Fm2_Icon *ic);
|
||||
static int _e_fm2_context_list_sort(const void *data1, const void *data2);
|
||||
|
||||
static char *_e_fm_string_append_char(char *str, size_t *size, size_t *len, char c);
|
||||
static char *_e_fm_string_append_quoted(char *str, size_t *size, size_t *len, const char *src);
|
||||
static char * _e_fm_string_append_char(char *str, size_t *size, size_t *len, char c);
|
||||
static char * _e_fm_string_append_quoted(char *str, size_t *size, size_t *len, const char *src);
|
||||
|
||||
void _e_fm2_path_parent_set(Evas_Object *obj, const char *path);
|
||||
|
||||
|
@ -632,13 +642,13 @@ _e_fm2_op_registry_entry_print(const E_Fm2_Op_Registry_Entry *ere)
|
|||
const char *status;
|
||||
|
||||
if ((ere->status >= 0) &&
|
||||
(ere->status < sizeof(status_strings)/sizeof(status_strings[0])))
|
||||
(ere->status < sizeof(status_strings) / sizeof(status_strings[0])))
|
||||
status = status_strings[ere->status];
|
||||
else
|
||||
status = status_strings[0];
|
||||
|
||||
printf("id: %8d, op: %2d [%s] finished: %hhu, needs_attention: %hhu\n"
|
||||
" %3d%% (%"PRIi64"/%"PRIi64"), start_time: %10.0f, eta: %5ds, xwin: %#x\n"
|
||||
" %3d%% (%" PRIi64 "/%" PRIi64 "), start_time: %10.0f, eta: %5ds, xwin: %#x\n"
|
||||
" src=[%s]\n"
|
||||
" dst=[%s]\n",
|
||||
ere->id, ere->op, status, ere->finished, ere->needs_attention,
|
||||
|
@ -703,8 +713,8 @@ e_fm2_init(void)
|
|||
_e_fm2_smart_del, /* del */
|
||||
_e_fm2_smart_move, /* move */
|
||||
_e_fm2_smart_resize, /* resize */
|
||||
_e_fm2_smart_show,/* show */
|
||||
_e_fm2_smart_hide,/* hide */
|
||||
_e_fm2_smart_show, /* show */
|
||||
_e_fm2_smart_hide, /* hide */
|
||||
_e_fm2_smart_color_set, /* color_set */
|
||||
_e_fm2_smart_clip_set, /* clip_set */
|
||||
_e_fm2_smart_clip_unset, /* clip_unset */
|
||||
|
@ -2251,7 +2261,7 @@ e_fm2_icon_get(Evas *evas, E_Fm2_Icon *ic,
|
|||
if (o) return o;
|
||||
}
|
||||
|
||||
fallback:
|
||||
fallback:
|
||||
return _e_fm2_icon_explicit_theme_get(evas, ic, "text/plain", type_ret);
|
||||
}
|
||||
|
||||
|
@ -2385,7 +2395,7 @@ _e_fm_client_send_new(int minor, void *data, int size)
|
|||
static int id = 0;
|
||||
E_Fm2_Client *cl;
|
||||
|
||||
id ++;
|
||||
id++;
|
||||
cl = _e_fm2_client_get();
|
||||
if (!cl)
|
||||
{
|
||||
|
@ -2455,6 +2465,7 @@ _e_fm2_client_file_trash(const char *path, Evas_Object *e_fm)
|
|||
e_fm2_op_registry_entry_add(id, e_fm, E_FM_OP_TRASH, _e_fm2_operation_abort_internal);
|
||||
return id;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static int
|
||||
|
@ -2694,7 +2705,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
Eina_List *l, *dels = NULL;
|
||||
E_Fm2_Client *cl;
|
||||
|
||||
if (e->major != 6/*E_IPC_DOMAIN_FM*/) return;
|
||||
if (e->major != 6 /*E_IPC_DOMAIN_FM*/) return;
|
||||
EINA_LIST_FOREACH(_e_fm2_client_list, l, cl)
|
||||
{
|
||||
if (cl->cl == e->client) break;
|
||||
|
@ -2725,16 +2736,18 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
sd = evas_object_smart_data_get(obj);
|
||||
switch (e->minor)
|
||||
{
|
||||
case E_FM_OP_HELLO:/*hello*/
|
||||
case E_FM_OP_HELLO: /*hello*/
|
||||
// printf("E_FM_OP_HELLO\n");
|
||||
break;
|
||||
case E_FM_OP_OK:/*req ok*/
|
||||
|
||||
case E_FM_OP_OK: /*req ok*/
|
||||
// printf("E_FM_OP_OK\n");
|
||||
cl->req--;
|
||||
break;
|
||||
case E_FM_OP_FILE_ADD:/*file add*/
|
||||
|
||||
case E_FM_OP_FILE_ADD: /*file add*/
|
||||
// printf("E_FM_OP_FILE_ADD\n");
|
||||
case E_FM_OP_FILE_CHANGE:/*file change*/
|
||||
case E_FM_OP_FILE_CHANGE: /*file change*/
|
||||
// printf("E_FM_OP_FILE_CHANGE\n");
|
||||
{
|
||||
E_Fm2_Finfo finf;
|
||||
|
@ -2768,24 +2781,24 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
((!strcmp(evdir, "") || (!strcmp(dir, evdir)))))
|
||||
{
|
||||
// printf(" ch/add response = %i\n", e->response);
|
||||
if (e->response == 0)/*live changes*/
|
||||
if (e->response == 0) /*live changes*/
|
||||
{
|
||||
if (e->minor == E_FM_OP_FILE_ADD)/*file add*/
|
||||
if (e->minor == E_FM_OP_FILE_ADD) /*file add*/
|
||||
{
|
||||
_e_fm2_live_file_add
|
||||
(obj, ecore_file_file_get(path),
|
||||
NULL, 0, &finf);
|
||||
}
|
||||
else if (e->minor == E_FM_OP_FILE_CHANGE)/*file change*/
|
||||
else if (e->minor == E_FM_OP_FILE_CHANGE) /*file change*/
|
||||
{
|
||||
_e_fm2_live_file_changed
|
||||
(obj, (char *)ecore_file_file_get(path),
|
||||
&finf);
|
||||
}
|
||||
}
|
||||
else/*file add - listing*/
|
||||
else /*file add - listing*/
|
||||
{
|
||||
if (e->minor == E_FM_OP_FILE_ADD)/*file add*/
|
||||
if (e->minor == E_FM_OP_FILE_ADD) /*file add*/
|
||||
{
|
||||
if (!sd->scan_timer)
|
||||
{
|
||||
|
@ -2811,7 +2824,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
NULL, 0, &finf);
|
||||
}
|
||||
}
|
||||
if (e->response == 2)/* end of scan */
|
||||
if (e->response == 2) /* end of scan */
|
||||
{
|
||||
sd->listing = EINA_FALSE;
|
||||
if (sd->scan_timer)
|
||||
|
@ -2836,7 +2849,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
if ((sd->id == e->ref_to) && (path[0] == 0))
|
||||
{
|
||||
// printf(" end response = %i\n", e->response);
|
||||
if (e->response == 2)/* end of scan */
|
||||
if (e->response == 2) /* end of scan */
|
||||
{
|
||||
sd->listing = EINA_FALSE;
|
||||
if (sd->scan_timer)
|
||||
|
@ -2857,7 +2870,8 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
if (evdir) free(evdir);
|
||||
}
|
||||
break;
|
||||
case E_FM_OP_FILE_DEL:/*file del*/
|
||||
|
||||
case E_FM_OP_FILE_DEL: /*file del*/
|
||||
// printf("E_FM_OP_FILE_DEL\n");
|
||||
path = e->data;
|
||||
evdir = ecore_file_dir_get(path);
|
||||
|
@ -2868,7 +2882,8 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
}
|
||||
free(evdir);
|
||||
break;
|
||||
case E_FM_OP_MONITOR_END:/*mon dir del*/
|
||||
|
||||
case E_FM_OP_MONITOR_END: /*mon dir del*/
|
||||
// printf("E_FM_OP_MONITOR_END\n");
|
||||
path = e->data;
|
||||
if ((sd->id == e->ref_to) && (!strcmp(dir, path)))
|
||||
|
@ -2876,6 +2891,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
dels = eina_list_append(dels, obj);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2902,13 +2918,13 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
}
|
||||
switch (e->minor)
|
||||
{
|
||||
case E_FM_OP_MONITOR_SYNC:/*mon list sync*/
|
||||
case E_FM_OP_MONITOR_SYNC: /*mon list sync*/
|
||||
ecore_ipc_client_send(cl->cl, E_IPC_DOMAIN_FM, E_FM_OP_MONITOR_SYNC,
|
||||
0, 0, e->response,
|
||||
NULL, 0);
|
||||
break;
|
||||
|
||||
case E_FM_OP_STORAGE_ADD:/*storage add*/
|
||||
case E_FM_OP_STORAGE_ADD: /*storage add*/
|
||||
if ((e->data) && (e->size > 0))
|
||||
{
|
||||
E_Storage *s;
|
||||
|
@ -2918,7 +2934,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
}
|
||||
break;
|
||||
|
||||
case E_FM_OP_STORAGE_DEL:/*storage del*/
|
||||
case E_FM_OP_STORAGE_DEL: /*storage del*/
|
||||
if ((e->data) && (e->size > 0))
|
||||
{
|
||||
char *udi;
|
||||
|
@ -2930,7 +2946,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
}
|
||||
break;
|
||||
|
||||
case E_FM_OP_VOLUME_ADD:/*volume add*/
|
||||
case E_FM_OP_VOLUME_ADD: /*volume add*/
|
||||
if ((e->data) && (e->size > 0))
|
||||
{
|
||||
E_Volume *v;
|
||||
|
@ -2946,7 +2962,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
}
|
||||
break;
|
||||
|
||||
case E_FM_OP_VOLUME_DEL:/*volume del*/
|
||||
case E_FM_OP_VOLUME_DEL: /*volume del*/
|
||||
if ((e->data) && (e->size > 0))
|
||||
{
|
||||
char *udi;
|
||||
|
@ -2958,7 +2974,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
}
|
||||
break;
|
||||
|
||||
case E_FM_OP_MOUNT_DONE:/*mount done*/
|
||||
case E_FM_OP_MOUNT_DONE: /*mount done*/
|
||||
if ((e->data) && (e->size > 1))
|
||||
{
|
||||
E_Volume *v;
|
||||
|
@ -2985,7 +3001,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
}
|
||||
break;
|
||||
|
||||
case E_FM_OP_UNMOUNT_DONE:/*unmount done*/
|
||||
case E_FM_OP_UNMOUNT_DONE: /*unmount done*/
|
||||
if ((e->data) && (e->size > 1))
|
||||
{
|
||||
E_Volume *v;
|
||||
|
@ -3004,7 +3020,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
case E_FM_OP_EJECT_DONE:
|
||||
break;
|
||||
|
||||
case E_FM_OP_MOUNT_ERROR:/*mount error*/
|
||||
case E_FM_OP_MOUNT_ERROR: /*mount error*/
|
||||
if (e->data && (e->size > 1))
|
||||
{
|
||||
E_Volume *v;
|
||||
|
@ -3020,7 +3036,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
}
|
||||
break;
|
||||
|
||||
case E_FM_OP_UNMOUNT_ERROR:/*unmount error*/
|
||||
case E_FM_OP_UNMOUNT_ERROR: /*unmount error*/
|
||||
if (e->data && (e->size > 1))
|
||||
{
|
||||
E_Volume *v;
|
||||
|
@ -3049,7 +3065,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
}
|
||||
break;
|
||||
|
||||
case E_FM_OP_ERROR:/*error*/
|
||||
case E_FM_OP_ERROR: /*error*/
|
||||
{
|
||||
E_Dialog *dlg;
|
||||
printf("%s:%s(%d) Error from slave #%d: %s\n", __FILE__, __FUNCTION__, __LINE__, e->ref, (char *)e->data);
|
||||
|
@ -3058,7 +3074,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
}
|
||||
break;
|
||||
|
||||
case E_FM_OP_ERROR_RETRY_ABORT:/*error*/
|
||||
case E_FM_OP_ERROR_RETRY_ABORT: /*error*/
|
||||
{
|
||||
E_Dialog *dlg;
|
||||
printf("%s:%s(%d) Error from slave #%d: %s\n", __FILE__, __FUNCTION__, __LINE__, e->ref, (char *)e->data);
|
||||
|
@ -3067,7 +3083,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
}
|
||||
break;
|
||||
|
||||
case E_FM_OP_OVERWRITE:/*overwrite*/
|
||||
case E_FM_OP_OVERWRITE: /*overwrite*/
|
||||
{
|
||||
E_Dialog *dlg;
|
||||
printf("%s:%s(%d) Overwrite from slave #%d: %s\n", __FILE__, __FUNCTION__, __LINE__, e->ref, (char *)e->data);
|
||||
|
@ -3076,7 +3092,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
}
|
||||
break;
|
||||
|
||||
case E_FM_OP_PROGRESS:/*progress*/
|
||||
case E_FM_OP_PROGRESS: /*progress*/
|
||||
{
|
||||
int percent, seconds;
|
||||
off_t done, total;
|
||||
|
@ -3112,7 +3128,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
}
|
||||
break;
|
||||
|
||||
case E_FM_OP_QUIT:/*finished*/
|
||||
case E_FM_OP_QUIT: /*finished*/
|
||||
{
|
||||
E_Fm2_Op_Registry_Entry *ere = e_fm2_op_registry_entry_get(e->ref);
|
||||
if (ere)
|
||||
|
@ -3162,7 +3178,7 @@ _e_fm2_dev_path_map(const char *dev, const char *path)
|
|||
/* FIXME: also add other virtualized dirs like "backgrounds", "themes",
|
||||
* "favorites" */
|
||||
#define CMP(x) ((dev) && (e_util_glob_case_match(dev, x)))
|
||||
#define PRT(args...) snprintf(buf, sizeof(buf), ##args)
|
||||
#define PRT(args ...) snprintf(buf, sizeof(buf), ##args)
|
||||
|
||||
if (dev)
|
||||
{
|
||||
|
@ -3225,7 +3241,8 @@ _e_fm2_dev_path_map(const char *dev, const char *path)
|
|||
if (v)
|
||||
{
|
||||
if (!v->mount_point)
|
||||
v->mount_point = e_fm2_device_volume_mountpoint_get(v);;
|
||||
v->mount_point = e_fm2_device_volume_mountpoint_get(v);
|
||||
;
|
||||
if (PRT("%s/%s", v->mount_point, path) >= sizeof(buf))
|
||||
return NULL;
|
||||
}
|
||||
|
@ -3597,7 +3614,7 @@ _e_fm2_queue_process(Evas_Object *obj)
|
|||
}
|
||||
// double tt = ecore_time_get();
|
||||
// int queued = eina_list_count(sd->queue);
|
||||
/* take unsorted and insert into the icon list - reprocess regions */
|
||||
/* take unsorted and insert into the icon list - reprocess regions */
|
||||
t = ecore_time_get();
|
||||
if (!sd->tmp.last_insert)
|
||||
{
|
||||
|
@ -3874,14 +3891,20 @@ _e_fm2_icon_place_relative(E_Fm2_Icon *ic, E_Fm2_Icon *icr, int xrel, int yrel,
|
|||
ic->y = icr->y;
|
||||
|
||||
if (xrel > 0) ic->x += icr->w;
|
||||
else if (xrel < 0) ic->x -= ic->w;
|
||||
else if (xa == 1) ic->x += (icr->w - ic->w) / 2;
|
||||
else if (xa == 2) ic->x += icr->w - ic->w;
|
||||
else if (xrel < 0)
|
||||
ic->x -= ic->w;
|
||||
else if (xa == 1)
|
||||
ic->x += (icr->w - ic->w) / 2;
|
||||
else if (xa == 2)
|
||||
ic->x += icr->w - ic->w;
|
||||
|
||||
if (yrel > 0) ic->y += icr->h;
|
||||
else if (yrel < 0) ic->y -= ic->h;
|
||||
else if (ya == 1) ic->y += (icr->h - ic->h) / 2;
|
||||
else if (ya == 2) ic->y += icr->h - ic->h;
|
||||
else if (yrel < 0)
|
||||
ic->y -= ic->h;
|
||||
else if (ya == 1)
|
||||
ic->y += (icr->h - ic->h) / 2;
|
||||
else if (ya == 2)
|
||||
ic->y += icr->h - ic->h;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -3947,7 +3970,7 @@ _e_fm2_icons_place_icon(E_Fm2_Icon *ic)
|
|||
// ic->sd->icons_place = eina_list_remove_list(ic->sd->icons_place, pl);
|
||||
}
|
||||
}
|
||||
done:
|
||||
done:
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4052,23 +4075,29 @@ _e_fm2_icons_place(Evas_Object *obj)
|
|||
case E_FM2_VIEW_MODE_ICONS:
|
||||
_e_fm2_icons_place_icons(sd);
|
||||
break;
|
||||
|
||||
case E_FM2_VIEW_MODE_GRID_ICONS:
|
||||
_e_fm2_icons_place_grid_icons(sd);
|
||||
break;
|
||||
|
||||
case E_FM2_VIEW_MODE_CUSTOM_ICONS:
|
||||
_e_fm2_icons_place_custom_icons(sd);
|
||||
break;
|
||||
|
||||
case E_FM2_VIEW_MODE_CUSTOM_GRID_ICONS:
|
||||
/* FIXME: not going to implement this at this stage */
|
||||
_e_fm2_icons_place_custom_grid_icons(sd);
|
||||
break;
|
||||
|
||||
case E_FM2_VIEW_MODE_CUSTOM_SMART_GRID_ICONS:
|
||||
/* FIXME: not going to implement this at this stage */
|
||||
_e_fm2_icons_place_custom_smart_grid_icons(sd);
|
||||
break;
|
||||
|
||||
case E_FM2_VIEW_MODE_LIST:
|
||||
_e_fm2_icons_place_list(sd);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -4233,9 +4262,9 @@ _e_fm2_uri_parse(const char *val)
|
|||
if (*p == '%')
|
||||
{
|
||||
path[i] = *(++p);
|
||||
path[i+1] = *(++p);
|
||||
path[i + 1] = *(++p);
|
||||
path[i] = (char)strtol(&(path[i]), NULL, 16);
|
||||
path[i+1] = '\0';
|
||||
path[i + 1] = '\0';
|
||||
}
|
||||
else
|
||||
path[i] = *p;
|
||||
|
@ -4541,6 +4570,7 @@ _e_fm2_icon_fill(E_Fm2_Icon *ic, E_Fm2_Finfo *finf)
|
|||
ic->min_w = mw;
|
||||
ic->min_h = mh;
|
||||
break;
|
||||
|
||||
case E_FM2_VIEW_MODE_LIST:
|
||||
{
|
||||
obj = ic->sd->tmp.obj;
|
||||
|
@ -4575,6 +4605,7 @@ _e_fm2_icon_fill(E_Fm2_Icon *ic, E_Fm2_Finfo *finf)
|
|||
ic->min_w = mw;
|
||||
ic->min_h = mh;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -4936,7 +4967,7 @@ _e_fm2_icon_desktop_load(E_Fm2_Icon *ic)
|
|||
efreet_desktop_free(desktop);
|
||||
|
||||
return 1;
|
||||
error:
|
||||
error:
|
||||
eina_stringshare_del(ic->info.label);
|
||||
eina_stringshare_del(ic->info.comment);
|
||||
eina_stringshare_del(ic->info.generic);
|
||||
|
@ -5379,7 +5410,6 @@ _e_fm2_icon_sel_down(Evas_Object *obj)
|
|||
_e_fm2_icon_make_visible(ic_down);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_e_fm2_icon_sel_up(Evas_Object *obj)
|
||||
{
|
||||
|
@ -5454,7 +5484,6 @@ _e_fm2_icon_sel_up(Evas_Object *obj)
|
|||
_e_fm2_icon_make_visible(ic_up);
|
||||
}
|
||||
|
||||
|
||||
/* FIXME: prototype */
|
||||
static void
|
||||
_e_fm2_typebuf_show(Evas_Object *obj)
|
||||
|
@ -5502,6 +5531,7 @@ _e_fm2_typebuf_history_next(Evas_Object *obj)
|
|||
if (!sd) return;
|
||||
/* FIXME: do */
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static int
|
||||
|
@ -5536,7 +5566,7 @@ _e_fm2_typebuf_run(Evas_Object *obj)
|
|||
}
|
||||
|
||||
static int
|
||||
_e_fm2_typebuf_match_func(E_Fm2_Icon *ic, void* data)
|
||||
_e_fm2_typebuf_match_func(E_Fm2_Icon *ic, void *data)
|
||||
{
|
||||
char *tb = data;
|
||||
return (((ic->info.label) &&
|
||||
|
@ -6109,7 +6139,7 @@ _e_fm_drop_menu(char *args, Evas_Object *e_fm)
|
|||
if (!zone) goto error;
|
||||
e_menu_activate_mouse(menu, zone, x, y, 1, 1, E_MENU_POP_DIRECTION_DOWN, 0);
|
||||
|
||||
error:
|
||||
error:
|
||||
e_object_del(E_OBJECT(menu));
|
||||
}
|
||||
|
||||
|
@ -6443,7 +6473,6 @@ _e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, void *evas_event)
|
|||
ic->down_sel = EINA_TRUE;
|
||||
ic->last_selected = EINA_TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
if (sel_change)
|
||||
evas_object_smart_callback_call(ic->sd->obj, "selection_change", NULL);
|
||||
|
@ -6655,18 +6684,23 @@ _e_fm2_cb_icon_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
|
|||
case E_GADCON_TYPE:
|
||||
con = ((E_Gadcon *)(ic->sd->eobj))->zone->container;
|
||||
break;
|
||||
|
||||
case E_WIN_TYPE:
|
||||
con = ((E_Win *)(ic->sd->eobj))->container;
|
||||
break;
|
||||
|
||||
case E_ZONE_TYPE:
|
||||
con = ((E_Zone *)(ic->sd->eobj))->container;
|
||||
break;
|
||||
|
||||
case E_BORDER_TYPE:
|
||||
con = ((E_Border *)(ic->sd->eobj))->zone->container;
|
||||
break;
|
||||
|
||||
case E_POPUP_TYPE:
|
||||
con = ((E_Popup *)(ic->sd->eobj))->zone->container;
|
||||
break;
|
||||
|
||||
/* FIXME: add more types as needed */
|
||||
default:
|
||||
break;
|
||||
|
@ -6986,8 +7020,7 @@ _e_fm2_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event
|
|||
{
|
||||
/* FIXME: typebuf extras */
|
||||
if (sd->typebuf_visible)
|
||||
{ /* typebuf mode: delete */ }
|
||||
else
|
||||
{ /* typebuf mode: delete */ }else
|
||||
_e_fm2_file_delete(obj);
|
||||
}
|
||||
else if (!evas_key_modifier_is_set(ev->modifiers, "Control") &&
|
||||
|
@ -7141,7 +7174,7 @@ _e_fm2_cb_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__
|
|||
ny = y + h - sd->h;
|
||||
e_fm2_pan_set(sd->obj, nx, ny);
|
||||
evas_object_smart_callback_call(sd->obj, "pan_changed", NULL);
|
||||
*/
|
||||
*/
|
||||
|
||||
E_Fm2_Icon *ic;
|
||||
EINA_LIST_FOREACH(sd->icons, l, ic)
|
||||
|
@ -7222,11 +7255,13 @@ _e_fm2_cb_resize_job(void *data)
|
|||
_e_fm2_icons_place(sd->obj);
|
||||
_e_fm2_regions_populate(sd->obj);
|
||||
break;
|
||||
|
||||
case E_FM2_VIEW_MODE_GRID_ICONS:
|
||||
_e_fm2_regions_free(sd->obj);
|
||||
_e_fm2_icons_place(sd->obj);
|
||||
_e_fm2_regions_populate(sd->obj);
|
||||
break;
|
||||
|
||||
case E_FM2_VIEW_MODE_CUSTOM_ICONS:
|
||||
if (sd->config->view.fit_custom_pos)
|
||||
{
|
||||
|
@ -7242,6 +7277,7 @@ _e_fm2_cb_resize_job(void *data)
|
|||
_e_fm2_icons_place(sd->obj);
|
||||
_e_fm2_regions_populate(sd->obj);
|
||||
break;
|
||||
|
||||
case E_FM2_VIEW_MODE_CUSTOM_GRID_ICONS:
|
||||
/* FIXME: not going to implement this at this stage */
|
||||
_e_fm2_regions_free(sd->obj);
|
||||
|
@ -7249,6 +7285,7 @@ _e_fm2_cb_resize_job(void *data)
|
|||
_e_fm2_icons_place(sd->obj);
|
||||
_e_fm2_regions_populate(sd->obj);
|
||||
break;
|
||||
|
||||
case E_FM2_VIEW_MODE_CUSTOM_SMART_GRID_ICONS:
|
||||
/* FIXME: not going to implement this at this stage */
|
||||
_e_fm2_regions_free(sd->obj);
|
||||
|
@ -7256,6 +7293,7 @@ _e_fm2_cb_resize_job(void *data)
|
|||
_e_fm2_icons_place(sd->obj);
|
||||
_e_fm2_regions_populate(sd->obj);
|
||||
break;
|
||||
|
||||
case E_FM2_VIEW_MODE_LIST:
|
||||
if (sd->iconlist_changed)
|
||||
{
|
||||
|
@ -7270,6 +7308,7 @@ _e_fm2_cb_resize_job(void *data)
|
|||
_e_fm2_icons_place(sd->obj);
|
||||
_e_fm2_regions_populate(sd->obj);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -7330,7 +7369,7 @@ _e_fm2_cb_icon_sort(const void *data1, const void *data2)
|
|||
* FIXME: implement category sorting
|
||||
}
|
||||
else
|
||||
*/ {
|
||||
*/ {
|
||||
eina_strlcpy(buf1, l1, sizeof(buf1));
|
||||
eina_strlcpy(buf2, l2, sizeof(buf2));
|
||||
}
|
||||
|
@ -7933,7 +7972,8 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
|
|||
e_menu_item_callback_set(mi, _e_fm2_new_directory, sd);
|
||||
}
|
||||
}
|
||||
if (!ic->info.removable) {
|
||||
if (!ic->info.removable)
|
||||
{
|
||||
if (!(sd->icon_menu.flags & E_FM2_MENU_NO_CUT))
|
||||
{
|
||||
if (ecore_file_can_write(sd->realpath))
|
||||
|
@ -8012,7 +8052,7 @@ _e_fm2_icon_menu(E_Fm2_Icon *ic, Evas_Object *obj, unsigned int timestamp)
|
|||
if (st.st_mode & S_IWOTH) can_w = 1;
|
||||
}
|
||||
}
|
||||
*/ }
|
||||
*/ }
|
||||
else
|
||||
can_w = 1;
|
||||
|
||||
|
@ -8518,8 +8558,8 @@ _e_fm2_view_menu_use_default_cb(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
|
||||
static void
|
||||
_e_fm2_view_image_sel(E_Fm2_Smart_Data *sd, const char *title,
|
||||
void (*ok_cb) (void *data, E_Dialog *dia),
|
||||
void (*clear_cb) (void *data, E_Dialog *dia))
|
||||
void (*ok_cb)(void *data, E_Dialog *dia),
|
||||
void (*clear_cb)(void *data, E_Dialog *dia))
|
||||
{
|
||||
E_Manager *man;
|
||||
E_Container *con;
|
||||
|
@ -8836,7 +8876,7 @@ _e_fm2_file_rename(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
|
|||
}
|
||||
}
|
||||
|
||||
static Evas_Object*
|
||||
static Evas_Object *
|
||||
_e_fm2_icon_entry_widget_add(E_Fm2_Icon *ic)
|
||||
{
|
||||
Evas_Object *eo;
|
||||
|
@ -8947,7 +8987,7 @@ _e_fm2_file_do_rename(const char *text, E_Fm2_Icon *ic)
|
|||
}
|
||||
}
|
||||
|
||||
static E_Dialog*
|
||||
static E_Dialog *
|
||||
_e_fm_retry_abort_dialog(int pid, const char *str)
|
||||
{
|
||||
E_Manager *man;
|
||||
|
@ -9008,7 +9048,7 @@ _e_fm_retry_abort_abort_cb(void *data __UNUSED__, E_Dialog *dialog)
|
|||
e_object_del(E_OBJECT(dialog));
|
||||
}
|
||||
|
||||
static E_Dialog*
|
||||
static E_Dialog *
|
||||
_e_fm_overwrite_dialog(int pid, const char *str)
|
||||
{
|
||||
E_Manager *man;
|
||||
|
@ -9088,7 +9128,7 @@ _e_fm_overwrite_yes_all_cb(void *data __UNUSED__, E_Dialog *dialog)
|
|||
e_object_del(E_OBJECT(dialog));
|
||||
}
|
||||
|
||||
static E_Dialog*
|
||||
static E_Dialog *
|
||||
_e_fm_error_dialog(int pid, const char *str)
|
||||
{
|
||||
E_Manager *man;
|
||||
|
@ -9342,7 +9382,6 @@ _e_fm_string_append_char(char *str, size_t *size, size_t *len, char c)
|
|||
return str;
|
||||
}
|
||||
|
||||
|
||||
static char *
|
||||
_e_fm_string_append_quoted(char *str, size_t *size, size_t *len, const char *src)
|
||||
{
|
||||
|
@ -9433,9 +9472,6 @@ _e_fm2_refresh_job_cb(void *data)
|
|||
sd->refresh_job = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
_e_fm2_live_file_add(Evas_Object *obj, const char *file, const char *file_rel, int after, E_Fm2_Finfo *finf)
|
||||
{
|
||||
|
@ -9561,6 +9597,7 @@ _e_fm2_live_process(Evas_Object *obj)
|
|||
_e_fm2_file_add(obj, a->file, 1, a->file2, a->flags, &(a->finf));
|
||||
}
|
||||
break;
|
||||
|
||||
case FILE_DEL:
|
||||
if (!strcmp(a->file, ".order"))
|
||||
{
|
||||
|
@ -9574,6 +9611,7 @@ _e_fm2_live_process(Evas_Object *obj)
|
|||
sd->live.deletions = EINA_TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case FILE_CHANGE:
|
||||
if (!strcmp(a->file, ".order"))
|
||||
{
|
||||
|
@ -9614,6 +9652,7 @@ _e_fm2_live_process(Evas_Object *obj)
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -9854,3 +9893,4 @@ e_fm2_operation_abort(int id)
|
|||
e_fm2_op_registry_entry_abort(ere);
|
||||
e_fm2_op_registry_entry_unref(ere);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue