forked from enlightenment/terminology
media: turn off media on video playblack del.
if the object is deleted by media_stop(), then we must listen to it and emit "media,off". We should also clean up the config->background if it's temporary, so it's not restarted on the next main_media_update() (changing config options). SVN revision: 75582
This commit is contained in:
parent
e627bf93e4
commit
0accdc7ef5
|
@ -256,6 +256,15 @@ main_trans_update(const Config *config)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_cb_media_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
Config *config = data;
|
||||||
|
media = NULL;
|
||||||
|
edje_object_signal_emit(bg, "media,off", "terminology");
|
||||||
|
if (config->temporary) eina_stringshare_replace(&(config->background), NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
main_media_update(const Config *config)
|
main_media_update(const Config *config)
|
||||||
{
|
{
|
||||||
|
@ -264,8 +273,15 @@ main_media_update(const Config *config)
|
||||||
|
|
||||||
if ((config->background) && (config->background[0]))
|
if ((config->background) && (config->background[0]))
|
||||||
{
|
{
|
||||||
if (media) evas_object_del(media);
|
if (media)
|
||||||
|
{
|
||||||
|
evas_object_event_callback_del(media, EVAS_CALLBACK_DEL,
|
||||||
|
_cb_media_del);
|
||||||
|
evas_object_del(media);
|
||||||
|
}
|
||||||
o = media = media_add(win, config->background, config, MEDIA_BG, &type);
|
o = media = media_add(win, config->background, config, MEDIA_BG, &type);
|
||||||
|
evas_object_event_callback_add(media, EVAS_CALLBACK_DEL,
|
||||||
|
_cb_media_del, config);
|
||||||
edje_object_part_swallow(bg, "terminology.background", o);
|
edje_object_part_swallow(bg, "terminology.background", o);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
if (type == TYPE_IMG)
|
if (type == TYPE_IMG)
|
||||||
|
|
Loading…
Reference in New Issue