Ephoto: Apply patches from Vincent Torri (vtorri) that make Ephoto work on Windows.

This commit is contained in:
Stephen okra Houston 2016-01-22 15:24:32 -06:00
parent e74c645f5f
commit f7de0f1c0f
5 changed files with 13 additions and 11 deletions

View File

@ -31,7 +31,7 @@ have_po="yes"
],[
have_po="no"
])
AC_SUBST(LTLLIBINTL)
AC_SUBST([LTLLIBINTL])
if test "x$LIBINTL" = "x"; then
LIBINTL="$INTLLIBS"
fi

View File

@ -2,7 +2,7 @@
static void _ephoto_display_usage(void);
EAPI int
EAPI_MAIN int
elm_main(int argc, char **argv)
{
int r = 0;

View File

@ -29,10 +29,11 @@
# endif
#if HAVE_GETTEXT && ENABLE_NLS
#define _(string) gettext (string)
# include <libintl.h>
# define _(string) gettext (string)
#else
#define _(string) (string)
#define ngettext(String1, String2, Var) Var == 1 ? String1 : String2
# define _(string) (string)
# define ngettext(String1, String2, Var) Var == 1 ? String1 : String2
#endif
typedef struct _Ephoto_Config Ephoto_Config;

View File

@ -79,7 +79,7 @@ ephoto_config_free(Ephoto *ephoto)
}
static void
_close(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
_config_close_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Evas_Object *popup = data;
@ -87,7 +87,7 @@ _close(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
}
static void
_save(void *data, Evas_Object *obj EINA_UNUSED,
_config_save_cb(void *data, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Evas_Object *popup = data;
@ -527,7 +527,7 @@ ephoto_config_main(Ephoto *ephoto)
button = elm_button_add(popup);
elm_object_text_set(button, _("Save"));
elm_object_part_content_set(button, "icon", ic);
evas_object_smart_callback_add(button, "clicked", _save, popup);
evas_object_smart_callback_add(button, "clicked", _config_save_cb, popup);
elm_object_part_content_set(popup, "button1", button);
evas_object_show(button);
@ -539,7 +539,7 @@ ephoto_config_main(Ephoto *ephoto)
button = elm_button_add(popup);
elm_object_text_set(button, _("Close"));
elm_object_part_content_set(button, "icon", ic);
evas_object_smart_callback_add(button, "clicked", _close, popup);
evas_object_smart_callback_add(button, "clicked", _config_close_cb, popup);
elm_object_part_content_set(popup, "button2", button);
evas_object_show(button);

View File

@ -640,7 +640,8 @@ _thumb_gen_size_changed_timer_cb(void *data)
{
Ethumb_Thumb_Format format;
format = (long) evas_object_data_get(o, "ephoto_format");
format = (Ethumb_Thumb_Format) (uintptr_t)
evas_object_data_get(o, "ephoto_format");
if (format)
{
elm_thumb_format_set(o, format);
@ -753,7 +754,7 @@ ephoto_thumb_path_set(Evas_Object *obj, const char *path)
}
}
elm_thumb_format_set(obj, format);
evas_object_data_set(obj, "ephoto_format", (void *) (long) format);
evas_object_data_set(obj, "ephoto_format", (void *) (uintptr_t) format);
elm_thumb_crop_align_set(obj, 0.5, 0.5);
elm_thumb_aspect_set(obj, ETHUMB_THUMB_CROP);
elm_thumb_orientation_set(obj, ETHUMB_THUMB_ORIENT_ORIGINAL);