Ephoto: Factor out common file operation code. Remove toolbar from thumb view.

v-1.6.0
Stephen okra Houston 8 years ago
parent d62984608a
commit e732d9b07d
  1. 1
      src/bin/Makefile.am
  2. 24
      src/bin/ephoto.h
  3. 1762
      src/bin/ephoto_file.c
  4. 16
      src/bin/ephoto_main.c
  5. 966
      src/bin/ephoto_single_browser.c
  6. 1478
      src/bin/ephoto_thumb_browser.c

@ -25,6 +25,7 @@ ephoto_SOURCES = \
ephoto_config.c \
ephoto_cropper.c \
ephoto_editor.c \
ephoto_file.c \
ephoto_filters.c \
ephoto_hsv.c \
ephoto_ipc.c \

@ -72,6 +72,7 @@ void ephoto_single_browser_entries_set(Evas_Object *obj, Eina_List *entries);
void ephoto_single_browser_entry_set(Evas_Object *obj, Ephoto_Entry *entry);
void ephoto_single_browser_path_pending_set(Evas_Object *obj,
const char *path);
void ephoto_single_browser_path_pending_unset(Evas_Object *obj);
void ephoto_single_browser_path_created(Evas_Object *obj, Ephoto_Entry *entry);
void ephoto_single_browser_image_data_update(Evas_Object *main,
Evas_Object *image, Eina_Bool finished, unsigned int *image_data, int w,
@ -131,6 +132,22 @@ void ephoto_filter_black_and_white(Evas_Object *main, Evas_Object *image);
void ephoto_filter_old_photo(Evas_Object *main, Evas_Object *image);
void ephoto_filter_histogram_eq(Evas_Object *main, Evas_Object *image);
/*file functions*/
void ephoto_file_save_image(Ephoto *ephoto, Ephoto_Entry *entry,
Evas_Object *image);
void ephoto_file_save_image_as(Ephoto *ephoto, Ephoto_Entry *entry,
Evas_Object *image);
void ephoto_file_upload_image(Ephoto *ephoto, Ephoto_Entry *entry);
void ephoto_file_new_dir(Ephoto *ephoto, const char *path);
void ephoto_file_rename(Ephoto *ephoto, const char *path);
void ephoto_file_move(Ephoto *ephoto, Eina_List *files, const char *path);
void ephoto_file_copy(Ephoto *ephoto, Eina_List *files, const char *path);
void ephoto_file_paste(Ephoto *ephoto, Eina_List *files, Eina_Bool copy,
const char *path);
void ephoto_file_delete(Ephoto *ephoto, Eina_List *files,
Eina_File_Type type);
void ephoto_file_empty_trash(Ephoto *ephoto, Eina_List *files);
/*data types and structures*/
enum _Ephoto_State
@ -208,6 +225,13 @@ struct _Ephoto
Eina_List *thumbs;
Ecore_File_Monitor *monitor;
Ecore_Idler *file_idler;
Eina_List *file_idler_pos;
Eina_List *upload_handlers;
Ecore_Con_Url *url_up;
char *url_ret;
char *upload_error;
int file_errors;
const char *top_directory;

File diff suppressed because it is too large Load Diff

@ -163,7 +163,21 @@ _win_free(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Ephoto *ephoto = data;
Ecore_Event_Handler *handler;
if (ephoto->file_idler)
ecore_idler_del(ephoto->file_idler);
if (ephoto->file_idler_pos)
eina_list_free(ephoto->file_idler_pos);
if (ephoto->upload_handlers)
EINA_LIST_FREE(ephoto->upload_handlers, handler)
ecore_event_handler_del(handler);
if (ephoto->url_up)
ecore_con_url_free(ephoto->url_up);
if (ephoto->url_ret)
free(ephoto->url_ret);
if (ephoto->upload_error)
free(ephoto->upload_error);
if (ephoto->top_directory)
eina_stringshare_del(ephoto->top_directory);
if (ephoto->timer.thumb_regen)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save