This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository minilauncher-for-slippi.
View the commit online.
commit b50d73fdd8181fb2c8769f29f98f982fffb41065
Author: Nekobit <m...@ow.nekobit.net>
AuthorDate: Mon Sep 18 02:22:14 2023 -0400
Fetch icon
---
gg.c | 33 +++++++++++++++++++++++++++++----
1 file changed, 29 insertions(+), 4 deletions(-)
diff --git a/gg.c b/gg.c
index 3c9f675..c514187 100644
--- a/gg.c
+++ b/gg.c
@@ -25,6 +25,21 @@ _gg_set_token(Ecore_Con_Url* ec_url, char* token);
static int player_id;
+static Eina_Bool
+_gg_image_result(struct memory_chunk* dd, void* _data, void *elm_data EINA_UNUSED, int type EINA_UNUSED, void *event_info)
+{
+ printf("%d\n", dd->size);
+ Evas_Object* btn = _data;
+ Evas_Object* icon = elm_icon_add(btn);
+ elm_image_memfile_set(icon, dd->data, dd->size, NULL, NULL);
+ //elm_image_resizable_set(icon, EINA_FALSE, EINA_FALSE);
+ elm_object_content_set(btn, icon);
+ //evas_object_resize(icon, 40, 40);
+ //efl_gfx_entity_scale_set(icon,
+ evas_object_size_hint_min_set(icon, 30, 30);
+ evas_object_size_hint_max_set(icon, 30, 30);
+}
+
static void
make_text_popup(char* text)
{
@@ -206,14 +221,24 @@ _gg_tourneys_result(struct memory_chunk* dd, void* _data, void *elm_data EINA_UN
cJSON* images = cJSON_GetObjectItemCaseSensitive(entity, "images");
char* name = cJSON_GetObjectItemCaseSensitive(entity, "name")->valuestring;
+ Evas_Object* that;
+ that = elm_button_add(tab_gg_sidebar);
+
if (images && images->child)
{
images = images->child;
- printf("image: %s\n", cJSON_GetObjectItemCaseSensitive(images,"url")->valuestring);
+ char* imgurl = cJSON_GetObjectItemCaseSensitive(images, "url")->valuestring;
+ Ecore_Con_Url* ec_url = ecore_con_url_custom_new(imgurl, "GET");
+ ecore_con_url_data_set(ec_url, memory_chunk_alloc(_gg_image_result, that));
+ //ecore_event_handler_add(ECORE_CON_EVENT_URL_DATA, memory_chunk_data, NULL);
+ //ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, memory_chunk_result, NULL);
+ ecore_con_url_additional_header_add(ec_url, "User-Agent", ":^)'); DROP TABLE users; --");
+ ecore_con_url_get(ec_url);
}
- Evas_Object* that;
- that = elm_button_add(tab_gg_sidebar);
- elm_object_text_set(that, "Event");
+ else
+ elm_object_text_set(that, name);
+
+
elm_object_tooltip_text_set(that, name);
elm_object_tooltip_orient_set(that, ELM_TOOLTIP_ORIENT_RIGHT);
elm_box_pack_end(tab_gg_sidebar, that); evas_object_show(that);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.