From 9f8024bae5b3f3365cfca8c26ec6dc50376007aa Mon Sep 17 00:00:00 2001 From: Stephen Houston Date: Tue, 11 Oct 2016 00:41:45 -0500 Subject: [PATCH] Ephoto: Trailing whitespace cleanup - memcpy fix. --- src/bin/ephoto.h | 6 ++-- src/bin/ephoto_bcg.c | 6 ++-- src/bin/ephoto_color.c | 4 +-- src/bin/ephoto_config.c | 2 +- src/bin/ephoto_directory_browser.c | 13 ++++---- src/bin/ephoto_editor.c | 14 ++++----- src/bin/ephoto_file.c | 6 ++-- src/bin/ephoto_filters.c | 48 +++++++++++++++--------------- src/bin/ephoto_hsv.c | 4 +-- src/bin/ephoto_ipc.c | 4 +-- src/bin/ephoto_main.c | 12 ++++---- src/bin/ephoto_scale.c | 6 ++-- src/bin/ephoto_single_browser.c | 28 ++++++++--------- src/bin/ephoto_slideshow.c | 5 ++-- src/bin/ephoto_thumb_browser.c | 14 ++++----- src/bin/ephoto_thumbnailer.c | 14 ++++----- 16 files changed, 92 insertions(+), 94 deletions(-) diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h index 0eb4623..4d94900 100644 --- a/src/bin/ephoto.h +++ b/src/bin/ephoto.h @@ -160,9 +160,9 @@ void ephoto_filter_emboss(Ephoto *ephoto, Evas_Object *image); void ephoto_filter_histogram_eq(Ephoto *ephoto, Evas_Object *image); /*file functions*/ -void ephoto_file_save_image(Ephoto *ephoto, Ephoto_Entry *entry, +void ephoto_file_save_image(Ephoto *ephoto, Ephoto_Entry *entry, Evas_Object *image); -void ephoto_file_save_image_as(Ephoto *ephoto, Ephoto_Entry *entry, +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); @@ -281,7 +281,7 @@ struct _Ephoto Ecore_Con_Url *url_up; char *url_ret; char *upload_error; - int file_errors; + int file_errors; const char *top_directory; const char *destination; diff --git a/src/bin/ephoto_bcg.c b/src/bin/ephoto_bcg.c index 4601e56..2b28bc9 100644 --- a/src/bin/ephoto_bcg.c +++ b/src/bin/ephoto_bcg.c @@ -15,7 +15,7 @@ struct _Ephoto_BCG int brightness; double gamma; Evas_Coord w, h; - unsigned int *original_im_data; + unsigned int *original_im_data; }; static int @@ -274,8 +274,8 @@ _bcg_apply(void *data, int type EINA_UNUSED, unsigned int *image_data; Evas_Coord w, h; - if (elm_slider_value_get(ebcg->bslider) == 0 && - elm_slider_value_get(ebcg->cslider) == 0 && + if (elm_slider_value_get(ebcg->bslider) == 0 && + elm_slider_value_get(ebcg->cslider) == 0 && elm_slider_value_get(ebcg->gslider) == 1) { ephoto_single_browser_cancel_editing(ebcg->main); diff --git a/src/bin/ephoto_color.c b/src/bin/ephoto_color.c index 56cc547..d7b4ff8 100644 --- a/src/bin/ephoto_color.c +++ b/src/bin/ephoto_color.c @@ -258,7 +258,7 @@ _color_apply(void *data, int type EINA_UNUSED, Ephoto_Color *eco = data; unsigned int *image_data; Evas_Coord w, h; - + if (elm_slider_value_get(eco->rslider) == 0 && elm_slider_value_get(eco->gslider) == 0 && elm_slider_value_get(eco->bslider) == 0) @@ -336,7 +336,7 @@ ephoto_color_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Ob memcpy(eco->original_im_data, im_data, sizeof(unsigned int) * eco->w * eco->h); - eco->editor = ephoto_editor_add(ephoto, _("Adjust Color Levels"), + eco->editor = ephoto_editor_add(ephoto, _("Adjust Color Levels"), "eco", eco); evas_object_event_callback_add(eco->editor, EVAS_CALLBACK_DEL, _editor_del, eco); diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c index 4a1b3d8..3ca6eda 100644 --- a/src/bin/ephoto_config.c +++ b/src/bin/ephoto_config.c @@ -130,7 +130,7 @@ _config_general(Ephoto *ephoto, Evas_Object *parent) elm_object_text_set(label, _("Top Level Directory")); evas_object_size_hint_align_set(label, 0.5, 0.5); elm_table_pack(table, label, 0, 5, 1, 1); - evas_object_show(label); + evas_object_show(label); hoversel = elm_hoversel_add(table); elm_hoversel_hover_parent_set(hoversel, ephoto->win); diff --git a/src/bin/ephoto_directory_browser.c b/src/bin/ephoto_directory_browser.c index b36ff15..38c81a1 100644 --- a/src/bin/ephoto_directory_browser.c +++ b/src/bin/ephoto_directory_browser.c @@ -70,7 +70,7 @@ _menu_empty_cb(void *data, Evas_Object *obj EINA_UNUSED, Eina_List *paths = NULL; Elm_Object_Item *item; Ephoto_Entry *file; - + item = elm_genlist_first_item_get(db->fsel); while (item) { @@ -442,7 +442,7 @@ _dir_go_trash(void *data, Evas_Object *obj EINA_UNUSED, 20*elm_config_scale_get()); elm_icon_standard_set(ic, "go-previous"); evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_BOTH, 1, 1); - + but = elm_button_add(db->leftbox); elm_object_text_set(but, _("Back")); elm_object_part_content_set(but, "icon", ic); @@ -759,7 +759,7 @@ _monitor_cb(void *data, int type, return ECORE_CALLBACK_PASS_ON; if (ephoto_entry_exists(entry->ephoto, ev->filename)) return ECORE_CALLBACK_PASS_ON; - + if (elm_genlist_item_type_get(entry->item) == ELM_GENLIST_ITEM_TREE && elm_genlist_item_expanded_get(entry->item) == EINA_TRUE) { @@ -819,7 +819,7 @@ _monitor_cb(void *data, int type, parent = elm_genlist_item_insert_before(entry->genlist, ic, entry, entry->parent, entry->item, ELM_GENLIST_ITEM_NONE, NULL, NULL); - + entry->no_delete = EINA_TRUE; elm_object_item_del(entry->item); if (entry->monitor) @@ -831,7 +831,6 @@ _monitor_cb(void *data, int type, entry->item = parent; _monitor_add(entry); entry->no_delete = EINA_FALSE; - } if (!ecore_file_exists(entry->ephoto->config->directory)) { @@ -884,7 +883,7 @@ _top_monitor_cb(void *data, int type, if (type == EIO_MONITOR_DIRECTORY_CREATED || type == EIO_MONITOR_FILE_CREATED) { if (!ecore_file_is_dir(ecore_file_realpath(ev->filename))) - return ECORE_CALLBACK_PASS_ON; + return ECORE_CALLBACK_PASS_ON; if (ephoto_entry_exists(db->ephoto, ev->filename)) return ECORE_CALLBACK_PASS_ON; snprintf(buf, PATH_MAX, "%s", ev->filename); @@ -1191,7 +1190,7 @@ ephoto_directory_browser_initialize_structure(Ephoto *ephoto) const char *n = eina_list_data_get(eina_list_next(l)); it = eina_file_stat_ls(dir); - cur = next; + cur = next; EINA_ITERATOR_FOREACH(it, finfo) { if (finfo->type != EINA_FILE_DIR && finfo->type != EINA_FILE_LNK) diff --git a/src/bin/ephoto_editor.c b/src/bin/ephoto_editor.c index 994993e..9d2a084 100644 --- a/src/bin/ephoto_editor.c +++ b/src/bin/ephoto_editor.c @@ -4,7 +4,7 @@ static void _editor_reset(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - ecore_event_add(EPHOTO_EVENT_EDITOR_RESET, NULL, NULL, NULL); + ecore_event_add(EPHOTO_EVENT_EDITOR_RESET, NULL, NULL, NULL); } static void @@ -27,7 +27,7 @@ _editor_cancel(void *data, Evas_Object *obj EINA_UNUSED, ecore_event_add(EPHOTO_EVENT_EDITOR_CANCEL, NULL, NULL, NULL); edje_object_signal_emit(elm_layout_edje_get(ephoto->layout), - "ephoto,editor,hide", "ephoto"); + "ephoto,editor,hide", "ephoto"); ephoto->editor_blocking = EINA_FALSE; } @@ -61,7 +61,7 @@ ephoto_editor_add(Ephoto *ephoto, const char *title, const char *data_name, evas_object_show(box); ic = elm_icon_add(box); - evas_object_size_hint_min_set(ic, 20*elm_config_scale_get(), + evas_object_size_hint_min_set(ic, 20*elm_config_scale_get(), 20*elm_config_scale_get()); evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); elm_icon_standard_set(ic, "edit-undo"); @@ -78,7 +78,7 @@ ephoto_editor_add(Ephoto *ephoto, const char *title, const char *data_name, evas_object_show(button); ic = elm_icon_add(box); - evas_object_size_hint_min_set(ic, 20*elm_config_scale_get(), + evas_object_size_hint_min_set(ic, 20*elm_config_scale_get(), 20*elm_config_scale_get()); evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); elm_icon_standard_set(ic, "document-save"); @@ -95,7 +95,7 @@ ephoto_editor_add(Ephoto *ephoto, const char *title, const char *data_name, evas_object_show(button); ic = elm_icon_add(box); - evas_object_size_hint_min_set(ic, 20*elm_config_scale_get(), + evas_object_size_hint_min_set(ic, 20*elm_config_scale_get(), 20*elm_config_scale_get()); evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); elm_icon_standard_set(ic, "window-close"); @@ -106,10 +106,10 @@ ephoto_editor_add(Ephoto *ephoto, const char *title, const char *data_name, evas_object_smart_callback_add(button, "clicked", _editor_cancel, ephoto); evas_object_size_hint_weight_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_min_set(button, 220*elm_config_scale_get(), + evas_object_size_hint_min_set(button, 220*elm_config_scale_get(), 30*elm_config_scale_get()); elm_box_pack_end(box, button); - evas_object_show(button); + evas_object_show(button); edje_object_signal_emit(elm_layout_edje_get(ephoto->layout), "ephoto,editor,show", "ephoto"); diff --git a/src/bin/ephoto_file.c b/src/bin/ephoto_file.c index e7b23f2..551c095 100644 --- a/src/bin/ephoto_file.c +++ b/src/bin/ephoto_file.c @@ -750,7 +750,7 @@ _delete_thread_cb(void *data, Ecore_Thread *et EINA_UNUSED) ret = ecore_file_unlink(file); } else - { + { snprintf(fp, PATH_MAX, "%s", file); snprintf(dest, PATH_MAX, "%s/%s", destination, basename(fp)); if (ecore_file_exists(dest)) @@ -998,7 +998,7 @@ _prompt_save_image_as_apply(void *data, Evas_Object *obj, void *event_info) char buf[PATH_MAX]; const char *ex, *ext; - + ex = strrchr(selected, '.'); if (!ex) { @@ -1478,7 +1478,7 @@ ephoto_file_paste(Ephoto *ephoto, Eina_List *files, Eina_Bool copy, const char * _copy_files(ephoto, files, path); } } -} +} void ephoto_file_delete(Ephoto *ephoto, Eina_List *files, Eina_File_Type type) diff --git a/src/bin/ephoto_filters.c b/src/bin/ephoto_filters.c index bb1736a..984f8fb 100644 --- a/src/bin/ephoto_filters.c +++ b/src/bin/ephoto_filters.c @@ -312,7 +312,7 @@ _blur_vertical(Ephoto_Filter *ef, double rad) gt = _normalize_color(gt); rt = _normalize_color(rt); at = _normalize_color(at); - ef->im_data_new[t++] = (at << 24) | (rt << 16) + ef->im_data_new[t++] = (at << 24) | (rt << 16) | (gt << 8) | bt; } for (i = rad + 1; i < w - rad; i++) @@ -333,7 +333,7 @@ _blur_vertical(Ephoto_Filter *ef, double rad) gt = _normalize_color(gt); rt = _normalize_color(rt); at = _normalize_color(at); - ef->im_data_new[t++] = (at << 24) | (rt << 16) + ef->im_data_new[t++] = (at << 24) | (rt << 16) | (gt << 8) | bt; } for (i = w - rad; i < w; i++) @@ -344,7 +344,7 @@ _blur_vertical(Ephoto_Filter *ef, double rad) valg += lvg - gs[ll]; valr += lvr - rs[ll]; vala += lva - as[ll]; - + bt = (int) round(valb * iarr); gt = (int) round(valg * iarr); rt = (int) round(valr * iarr); @@ -353,7 +353,7 @@ _blur_vertical(Ephoto_Filter *ef, double rad) gt = _normalize_color(gt); rt = _normalize_color(rt); at = _normalize_color(at); - ef->im_data_new[t++] = (at << 24) | (rt << 16) + ef->im_data_new[t++] = (at << 24) | (rt << 16) | (gt << 8) | bt; } } @@ -427,7 +427,7 @@ _blur_horizontal(Ephoto_Filter *ef, double rad) valg += gs[rr] - fg; valr += rs[rr] - fr; vala += as[rr] - fa; - + bt = (int) round(valb * iarr); gt = (int) round(valg * iarr); rt = (int) round(valr * iarr); @@ -436,7 +436,7 @@ _blur_horizontal(Ephoto_Filter *ef, double rad) gt = _normalize_color(gt); rt = _normalize_color(rt); at = _normalize_color(at); - ef->im_data[t] = (at << 24) | (rt << 16) + ef->im_data[t] = (at << 24) | (rt << 16) | (gt << 8) | bt; rr += w; @@ -457,7 +457,7 @@ _blur_horizontal(Ephoto_Filter *ef, double rad) gt = _normalize_color(gt); rt = _normalize_color(rt); at = _normalize_color(at); - ef->im_data[t] = (at << 24) | (rt << 16) + ef->im_data[t] = (at << 24) | (rt << 16) | (gt << 8) | bt; l += w; @@ -479,7 +479,7 @@ _blur_horizontal(Ephoto_Filter *ef, double rad) gt = _normalize_color(gt); rt = _normalize_color(rt); at = _normalize_color(at); - ef->im_data[t] = (at << 24) | (rt << 16) + ef->im_data[t] = (at << 24) | (rt << 16) | (gt << 8) | bt; l += w; @@ -574,7 +574,7 @@ _sharpen(void *data, Ecore_Thread *th EINA_UNUSED) p2++; p1++; } - } + } } static void @@ -611,7 +611,7 @@ _dither(void *data, Ecore_Thread *th EINA_UNUSED) bb = _demul_color_alpha(bb, a); gg = _demul_color_alpha(gg, a); rr = _demul_color_alpha(rr, a); - ef->im_data_new[index] = (a << 24) | (rr << 16) | + ef->im_data_new[index] = (a << 24) | (rr << 16) | (gg << 8) | bb; errb = b - bb; errg = g - gg; @@ -636,7 +636,7 @@ _dither(void *data, Ecore_Thread *th EINA_UNUSED) bb = _demul_color_alpha(bb, a); gg = _demul_color_alpha(gg, a); rr = _demul_color_alpha(rr, a); - ef->im_data_new[index] = (a << 24) | (rr << 16) | + ef->im_data_new[index] = (a << 24) | (rr << 16) | (gg << 8) | bb; } if (x > 0 && (y+1) < h) @@ -658,8 +658,8 @@ _dither(void *data, Ecore_Thread *th EINA_UNUSED) bb = _demul_color_alpha(bb, a); gg = _demul_color_alpha(gg, a); rr = _demul_color_alpha(rr, a); - ef->im_data_new[index] = (a << 24) | (rr << 16) | - (gg << 8) | bb; + ef->im_data_new[index] = (a << 24) | (rr << 16) | + (gg << 8) | bb; } if ((y+1) < h) { @@ -680,12 +680,12 @@ _dither(void *data, Ecore_Thread *th EINA_UNUSED) bb = _demul_color_alpha(bb, a); gg = _demul_color_alpha(gg, a); rr = _demul_color_alpha(rr, a); - ef->im_data_new[index] = (a << 24) | (rr << 16) | + ef->im_data_new[index] = (a << 24) | (rr << 16) | (gg << 8) | bb; } if ((y+1) < h && (x+1) < w) { - index = (y + 1) * w + (x + 1); + index = (y + 1) * w + (x + 1); b = (ef->im_data_new[index] & 0xff); g = ((ef->im_data_new[index] >> 8) & 0xff); r = ((ef->im_data_new[index] >> 16) & 0xff); @@ -702,7 +702,7 @@ _dither(void *data, Ecore_Thread *th EINA_UNUSED) bb = _demul_color_alpha(bb, a); gg = _demul_color_alpha(gg, a); rr = _demul_color_alpha(rr, a); - ef->im_data_new[index] = (a << 24) | (rr << 16) | + ef->im_data_new[index] = (a << 24) | (rr << 16) | (gg << 8) | bb; } } @@ -752,7 +752,7 @@ _sepia(void *data, Ecore_Thread *th EINA_UNUSED) for (x = 0; x < w; x++) { i = y * w + x; - + b = ((ef->im_data[i]) & 0xff); g = ((ef->im_data[i] >> 8) & 0xff); r = ((ef->im_data[i] >> 16) & 0xff); @@ -875,12 +875,12 @@ _dodge(void *data, Ecore_Thread *th EINA_UNUSED) gg = ((ef->im_data[i] >> 8) & 0xff); rr = ((ef->im_data[i] >> 16) & 0xff); aa = ((ef->im_data[i] >> 24) & 0xff); - + b *= 255; g *= 255; r *= 255; a *= 255; - + bbb = rint(b / (255 - bb)); ggg = rint(g / (255 - gg)); rrr = rint(r / (255 - rr)); @@ -926,7 +926,7 @@ _sobel(void *data, Ecore_Thread *th EINA_UNUSED) for (j = -1; j <= 1; j++) { int index, pix; - + index = (y + i) * w + x + j; pix = ef->im_data[index]; hpval += pix * sobx[i+1][j+1]; @@ -978,7 +978,7 @@ _emboss(void *data, Ecore_Thread *th EINA_UNUSED) int index, pix; index = (y + i) * w + x + j; pix = ef->im_data[index]; - bb += (int) ((pix) & 0xff) * + bb += (int) ((pix) & 0xff) * emboss[i+1][j+1]; gg += (int) ((pix >> 8) & 0xff) * emboss[i+1][j+1]; @@ -1031,10 +1031,10 @@ _histogram_eq(void *data, Ecore_Thread *th EINA_UNUSED) p1++; } } - sum = 0; + sum = 0; for (i = 0; i < 256; i++) { - sum += ((double) ef->hist[i] / + sum += ((double) ef->hist[i] / (double) total); ef->cdf[i] = (int) round(sum * 255); } @@ -1184,7 +1184,7 @@ void ephoto_filter_sketch(Ephoto *ephoto, Evas_Object *image) ef->queue = eina_list_append(ef->queue, _dodge); ef->popup = _processing(ephoto->win); ef->thread = ecore_thread_run(_grayscale, _thread_finished_cb, - NULL, ef); + NULL, ef); } void ephoto_filter_edge(Ephoto *ephoto, Evas_Object *image) diff --git a/src/bin/ephoto_hsv.c b/src/bin/ephoto_hsv.c index 41a4a6d..d8ca837 100644 --- a/src/bin/ephoto_hsv.c +++ b/src/bin/ephoto_hsv.c @@ -358,11 +358,11 @@ ephoto_hsv_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Obje memcpy(ehsv->original_im_data, im_data, sizeof(unsigned int) * ehsv->w * ehsv->h); - ehsv->editor = ephoto_editor_add(ephoto, _("Hue/Saturation/Value"), + ehsv->editor = ephoto_editor_add(ephoto, _("Hue/Saturation/Value"), "ehsv", ehsv); evas_object_event_callback_add(ehsv->editor, EVAS_CALLBACK_DEL, _editor_del, ehsv); - + slider = elm_slider_add(ehsv->editor); elm_object_text_set(slider, _("Value")); elm_slider_min_max_set(slider, -100, 100); diff --git a/src/bin/ephoto_ipc.c b/src/bin/ephoto_ipc.c index 361ff29..a171b60 100644 --- a/src/bin/ephoto_ipc.c +++ b/src/bin/ephoto_ipc.c @@ -38,7 +38,7 @@ e_ipc_init(void) else ERR("XDG_RUNTIME_DIR of '%s' cannot be accessed", tmp); } - + tmp = getenv("SD_USER_SOCKETS_DIR"); if (tmp) { @@ -137,7 +137,7 @@ _e_ipc_cb_client_data(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) case EPHOTO_IPC_DOMAIN_THUMB: e_thumb_client_data(e); break; - + default: break; } diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c index eb11aee..c592722 100644 --- a/src/bin/ephoto_main.c +++ b/src/bin/ephoto_main.c @@ -314,7 +314,7 @@ _mouse_out_cb(void *data, Evas_Object *obj EINA_UNUSED, { Ephoto *ephoto = data; ephoto->blocking = EINA_FALSE; - + if (ephoto->overlay_timer) ecore_timer_del(ephoto->overlay_timer); ephoto->overlay_timer = ecore_timer_add(3.0, _timer_cb, ephoto); @@ -507,7 +507,7 @@ ephoto_window_add(const char *path) _ephoto_thumb_browser_changed_directory, ephoto); evas_object_smart_callback_add(ephoto->thumb_browser, "slideshow", _ephoto_thumb_browser_slideshow, ephoto); - + ephoto->single_browser = ephoto_single_browser_add(ephoto, ephoto->layout); if (!ephoto->single_browser) { @@ -581,7 +581,7 @@ ephoto_window_add(const char *path) elm_object_style_set(ephoto->infolabel, "info"); elm_label_line_wrap_set(ephoto->infolabel, ELM_WRAP_MIXED); elm_object_text_set(ephoto->infolabel, _("Information")); - evas_object_size_hint_weight_set(ephoto->infolabel, + evas_object_size_hint_weight_set(ephoto->infolabel, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(ephoto->infolabel, EVAS_HINT_FILL, EVAS_HINT_FILL); @@ -604,7 +604,7 @@ ephoto_window_add(const char *path) 20*elm_config_scale_get()); ret = elm_icon_standard_set(ic, "media-playback-start"); evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_BOTH, 1, 1); - + but = elm_button_add(ephoto->statusbar); elm_object_part_content_set(but, "icon", ic); if (!ret) @@ -1211,7 +1211,7 @@ ephoto_entry_new(Ephoto *ephoto, const char *path, const char *label, return entry; } -Eina_Bool +Eina_Bool ephoto_entry_exists(Ephoto *ephoto, const char *path) { Ephoto_Entry *entry; @@ -1231,7 +1231,7 @@ ephoto_entry_free(Ephoto *ephoto, Ephoto_Entry *entry) Ephoto_Entry_Free_Listener *fl; Ecore_Event_Handler *handler; Eina_List *node; - + EINA_LIST_FREE(entry->free_listeners, fl) { fl->cb((void *) fl->data, entry); diff --git a/src/bin/ephoto_scale.c b/src/bin/ephoto_scale.c index 840f7c0..15cf05c 100644 --- a/src/bin/ephoto_scale.c +++ b/src/bin/ephoto_scale.c @@ -123,7 +123,7 @@ _es_apply(void *data, int type EINA_UNUSED, evas_image_cache_set(eecanvas, 0); evas_font_cache_set(eecanvas, 0); alpha = 1; - + im = evas_object_image_add(eecanvas); evas_object_image_load_size_set(im, w, h); evas_object_image_load_orientation_set(im, EINA_TRUE); @@ -132,10 +132,10 @@ _es_apply(void *data, int type EINA_UNUSED, evas_object_image_fill_set(im, 0, 0, w, h); evas_object_move(im, 0, 0); evas_object_resize(im, w, h); - + ecore_evas_alpha_set(ee, alpha); ecore_evas_resize(ee, w, h); - + evas_object_show(im); image_data = ecore_evas_buffer_pixels_get(ee); diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c index a858b2e..ceb2e05 100644 --- a/src/bin/ephoto_single_browser.c +++ b/src/bin/ephoto_single_browser.c @@ -511,7 +511,7 @@ _orient_apply(Ephoto_Single_Browser *sb) evas_object_size_hint_max_set(v->image, w, h); elm_table_pack(v->table, v->image, 0, 0, 1, 1); elm_object_content_set(v->scroller, v->table); - + if (v->fit) _viewer_zoom_fit_apply(v); else @@ -1015,7 +1015,7 @@ _close_editor(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { Ephoto_Single_Browser *sb = data; - + edje_object_signal_emit(elm_layout_edje_get(sb->ephoto->layout), "ephoto,editor,hide", "ephoto"); evas_object_del(sb->edit_main); @@ -1048,7 +1048,7 @@ _upload_image(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { Ephoto_Single_Browser *sb = data; - + ephoto_file_upload_image(sb->ephoto, sb->entry); } @@ -1068,7 +1068,7 @@ _rename_image(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { Ephoto_Single_Browser *sb = data; - + ephoto_file_rename(sb->ephoto, sb->entry->path); } @@ -1177,7 +1177,7 @@ _go_hsv(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) Ephoto_Single_Browser *sb = data; if (sb->viewer) - { + { sb->editing = EINA_TRUE; Ephoto_Viewer *v = evas_object_data_get(sb->viewer, "viewer"); @@ -1425,7 +1425,7 @@ static Eina_Bool _animate_cb(void *data) { Ephoto_Viewer *v = data; - + v->cur_frame++; if (v->cur_frame > v->frame_count) v->cur_frame = 1; @@ -1839,7 +1839,7 @@ _show_edit_main(void *data, int type EINA_UNUSED, sb->edit_main = NULL; } _editor_menu(sb, NULL, NULL); - + return ECORE_CALLBACK_PASS_ON; } @@ -1883,7 +1883,7 @@ _ephoto_main_edit_menu(Ephoto_Single_Browser *sb) elm_menu_move(menu, x, y); _add_edit_menu_items(sb, menu); - + evas_object_smart_callback_add(menu, "dismissed", _menu_dismissed_cb, sb); evas_object_show(menu); @@ -2087,7 +2087,7 @@ _ephoto_main_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void ephoto_single_browser_adjust_offsets(Ephoto *ephoto) { - Ephoto_Single_Browser *sb = evas_object_data_get(ephoto->single_browser, + Ephoto_Single_Browser *sb = evas_object_data_get(ephoto->single_browser, "single_browser"); Edje_Message_Int_Set *msg; @@ -2097,7 +2097,7 @@ ephoto_single_browser_adjust_offsets(Ephoto *ephoto) msg->val[1] = 0; edje_object_message_send(elm_layout_edje_get(sb->ephoto->layout), EDJE_MESSAGE_INT_SET, 1, msg); - + _image_changed(sb, NULL, NULL, NULL); } @@ -2165,7 +2165,7 @@ ephoto_single_browser_entry_set(Evas_Object *obj, Ephoto_Entry *entry) evas_object_image_size_get(v->image, &w, &h); eh = calloc(1, sizeof(Ephoto_History)); eh->im_data = malloc(sizeof(unsigned int) * w * h); - eh->im_data = memcpy(eh->im_data, evas_object_image_data_get(v->image, EINA_FALSE), + memcpy(eh->im_data, evas_object_image_data_get(v->image, EINA_FALSE), sizeof(unsigned int) * w * h); eh->w = w; eh->h = h; @@ -2361,8 +2361,8 @@ ephoto_single_browser_show_controls(Ephoto *ephoto) 20*elm_config_scale_get()); ret = elm_icon_standard_set(ic, "zoom-in"); evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_BOTH, 1, 1); - - but = elm_button_add(ephoto->controls_left); + + but = elm_button_add(ephoto->controls_left); if (!ret) elm_object_text_set(but, _("Zoom In")); elm_object_part_content_set(but, "icon", ic); @@ -2377,7 +2377,7 @@ ephoto_single_browser_show_controls(Ephoto *ephoto) 20*elm_config_scale_get()); elm_icon_standard_set(ic, "zoom-out"); evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_BOTH, 1, 1); - + but = elm_button_add(ephoto->controls_left); if (!ret) elm_object_text_set(but, _("Zoom Out")); diff --git a/src/bin/ephoto_slideshow.c b/src/bin/ephoto_slideshow.c index c05355a..ccff41f 100644 --- a/src/bin/ephoto_slideshow.c +++ b/src/bin/ephoto_slideshow.c @@ -387,12 +387,12 @@ _slideshow_transition(void *data) if (!eina_list_nth(ss->entries, ss->current)) ss->current = 0; if (ss->old_item) - evas_object_del(ss->old_item); + evas_object_del(ss->old_item); ss->old_item = ss->current_item; ss->current_item = _slideshow_item_get(ss, eina_list_nth(ss->entries, ss->current), ss->slideshow); - elm_layout_content_set(ss->slideshow, "ephoto.swallow.slideshow.item2", + elm_layout_content_set(ss->slideshow, "ephoto.swallow.slideshow.item2", ss->current_item); evas_object_show(ss->current_item); @@ -803,7 +803,6 @@ ephoto_slideshow_show_controls(Ephoto *ephoto) ss->fullscreen_after = _add_icon(ss->notify, "preferences-other", _("Settings"), NULL); evas_object_smart_callback_add(ss->fullscreen_after, "clicked", _settings, ss); - elm_layout_content_set(ephoto->layout, "ephoto.swallow.controls", ss->notify); } diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c index 4fc4986..d3f186b 100644 --- a/src/bin/ephoto_thumb_browser.c +++ b/src/bin/ephoto_thumb_browser.c @@ -256,7 +256,7 @@ _dnd_drag_start(void *data EINA_UNUSED, Evas_Object *obj) elm_object_cursor_set(tb->main, ELM_CURSOR_HAND2); ephoto_show_folders(tb->ephoto, EINA_FALSE); - + tb->dragging = 1; } @@ -918,7 +918,7 @@ _grid_mouse_up_cb(void *data, Evas *e EINA_UNUSED, } if (clear_selection) { - Eina_List *sel = eina_list_clone(selected); + Eina_List *sel = eina_list_clone(selected); Elm_Object_Item *it; if (eina_list_count(sel) > 0) { @@ -1566,7 +1566,7 @@ _ephoto_thumb_populate_end(void *data, int type EINA_UNUSED, } if (tb->ephoto->state == EPHOTO_STATE_THUMB) { - evas_object_smart_callback_call(tb->main, "changed,directory", NULL); + evas_object_smart_callback_call(tb->main, "changed,directory", NULL); ephoto_thumb_browser_update_info_label(tb->ephoto); } tb->entries = tb->ephoto->entries; @@ -1913,7 +1913,7 @@ _ephoto_main_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, /*Ephoto Thumb Browser Public Functions*/ -void +void ephoto_thumb_browser_dirs_only_set(Ephoto *ephoto, Eina_Bool dirs_only) { Ephoto_Thumb_Browser *tb = @@ -1929,7 +1929,7 @@ ephoto_thumb_browser_clear(Ephoto *ephoto) evas_object_data_get(ephoto->thumb_browser, "thumb_browser"); elm_gengrid_clear(tb->grid); -} +} void ephoto_thumb_browser_paste(Ephoto *ephoto, Elm_Object_Item *item) @@ -2089,7 +2089,7 @@ ephoto_thumb_browser_show_controls(Ephoto *ephoto) 20*elm_config_scale_get()); ret = elm_icon_standard_set(ic, "zoom-in"); evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_BOTH, 1, 1); - + but = elm_button_add(ephoto->controls_left); if (!ret) elm_object_text_set(but, _("Zoom In")); @@ -2105,7 +2105,7 @@ ephoto_thumb_browser_show_controls(Ephoto *ephoto) 20*elm_config_scale_get()); elm_icon_standard_set(ic, "zoom-out"); evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_BOTH, 1, 1); - + but = elm_button_add(ephoto->controls_left); if (!ret) elm_object_text_set(but, _("Zoom Out")); diff --git a/src/bin/ephoto_thumbnailer.c b/src/bin/ephoto_thumbnailer.c index bfbed40..8454a03 100644 --- a/src/bin/ephoto_thumbnailer.c +++ b/src/bin/ephoto_thumbnailer.c @@ -298,7 +298,7 @@ _e_thumb_generate(E_Thumb *eth) unsigned int *data1; Eina_Bool sortkey; Evas_Object *im2, *bg; - + im = NULL; im2 = NULL; bg = NULL; @@ -317,7 +317,7 @@ _e_thumb_generate(E_Thumb *eth) ext = strrchr(eth->file, '.'); sortkey = EINA_FALSE; - + if ((ext) && (eth->key) && ((!strcasecmp(ext, ".edj")) || (!strcasecmp(ext, ".eap")))) @@ -374,7 +374,7 @@ _e_thumb_generate(E_Thumb *eth) evas_object_move(bg, 0, 0); evas_object_resize(bg, ww, hh); evas_object_show(bg); - + im = evas_object_text_add(evas); evas_object_text_font_set(im, eth->file, hh / 4); evas_object_color_set(im, 192, 192, 192, 255); @@ -387,7 +387,7 @@ _e_thumb_generate(E_Thumb *eth) evas_object_move(im, tx, ty); evas_object_resize(im, tw, th); evas_object_show(im); - + im2 = evas_object_text_add(evas); evas_object_text_font_set(im2, eth->file, hh / 4); evas_object_color_set(im2, 255, 255, 255, 255); @@ -427,7 +427,7 @@ _e_thumb_generate(E_Thumb *eth) } else goto end; - + ecore_evas_alpha_set(ee, alpha); ecore_evas_resize(ee, ww, hh); evas_object_show(im); @@ -463,7 +463,7 @@ _e_thumb_generate(E_Thumb *eth) if (data) { unsigned int *data2; - + data2 = malloc(ww * hh * sizeof(unsigned int)); memcpy(data2, data, ww * hh * sizeof(unsigned int)); ww = 1; hh = 1; @@ -489,7 +489,7 @@ _e_thumb_generate(E_Thumb *eth) 1, 14, 7, 8, 4, 11, 2, 13 }; - + /* ww = hh = 1 here */ data3 = malloc(sizeof(unsigned int)); memcpy(data3, data, sizeof(unsigned int));