summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/win.c49
1 files changed, 24 insertions, 25 deletions
diff --git a/src/bin/win.c b/src/bin/win.c
index 6ff4daa..09c6bc4 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -4086,6 +4086,24 @@ _cb_media_loop(void *data,
4086} 4086}
4087 4087
4088static void 4088static void
4089_popmedia_queue_add(Term *term, const char *src,
4090 Eina_Bool from_user_interaction)
4091{
4092 struct Pop_Media *pm = calloc(1, sizeof(struct Pop_Media));
4093
4094 if (!pm)
4095 return;
4096
4097 pm->src = eina_stringshare_add(src);
4098 pm->from_user_interaction = from_user_interaction;
4099
4100 term->popmedia_queue = eina_list_append(term->popmedia_queue, pm);
4101 if (!term->popmedia)
4102 _popmedia_queue_process(term);
4103}
4104
4105
4106static void
4089_popmedia_show(Term *term, const char *src, Media_Type type) 4107_popmedia_show(Term *term, const char *src, Media_Type type)
4090{ 4108{
4091 Evas_Object *o; 4109 Evas_Object *o;
@@ -4094,14 +4112,15 @@ _popmedia_show(Term *term, const char *src, Media_Type type)
4094 EINA_SAFETY_ON_NULL_RETURN(config); 4112 EINA_SAFETY_ON_NULL_RETURN(config);
4095 if (term->popmedia) 4113 if (term->popmedia)
4096 { 4114 {
4097 const char *s; 4115 struct Pop_Media *pm;
4098 4116
4099 EINA_LIST_FREE(term->popmedia_queue, s) 4117 /* Flush queue */
4118 EINA_LIST_FREE(term->popmedia_queue, pm)
4100 { 4119 {
4101 eina_stringshare_del(s); 4120 eina_stringshare_del(pm->src);
4102 } 4121 }
4103 term->popmedia_queue = eina_list_append(term->popmedia_queue, 4122 /* queue new item */
4104 eina_stringshare_add(src)); 4123 _popmedia_queue_add(term, src, EINA_FALSE);
4105 edje_object_signal_emit(term->bg, "popmedia,off", "terminology"); 4124 edje_object_signal_emit(term->bg, "popmedia,off", "terminology");
4106 return; 4125 return;
4107 } 4126 }
@@ -4162,7 +4181,6 @@ _ty_http_head_delete(Ty_Http_Head *ty_head)
4162 free(ty_head); 4181 free(ty_head);
4163} 4182}
4164 4183
4165
4166static Eina_Bool 4184static Eina_Bool
4167_media_http_head_timeout(void *data) 4185_media_http_head_timeout(void *data)
4168{ 4186{
@@ -4307,8 +4325,6 @@ error:
4307 } 4325 }
4308} 4326}
4309 4327
4310
4311
4312static void 4328static void
4313_popmedia_queue_process(Term *term) 4329_popmedia_queue_process(Term *term)
4314{ 4330{
@@ -4327,23 +4343,6 @@ _popmedia_queue_process(Term *term)
4327} 4343}
4328 4344
4329static void 4345static void
4330_popmedia_queue_add(Term *term, const char *src,
4331 Eina_Bool from_user_interaction)
4332{
4333 struct Pop_Media *pm = calloc(1, sizeof(struct Pop_Media));
4334
4335 if (!pm)
4336 return;
4337
4338 pm->src = eina_stringshare_add(src);
4339 pm->from_user_interaction = from_user_interaction;
4340
4341 term->popmedia_queue = eina_list_append(term->popmedia_queue, pm);
4342 if (!term->popmedia)
4343 _popmedia_queue_process(term);
4344}
4345
4346static void
4347_cb_popup(void *data, 4346_cb_popup(void *data,
4348 Evas_Object *_obj EINA_UNUSED, 4347 Evas_Object *_obj EINA_UNUSED,
4349 void *event) 4348 void *event)