forked from enlightenment/enlightenment
e systray: use evas_object_visible_get() to know if icon was appended to box
Patch by: José Roberto de Souza <zehortigoza@profusion.mobi> SVN revision: 82414
This commit is contained in:
parent
d813da9fb5
commit
6f67cb6d15
|
@ -213,37 +213,34 @@ systray_notifier_item_update(Notifier_Item *item)
|
||||||
case STATUS_ACTIVE:
|
case STATUS_ACTIVE:
|
||||||
{
|
{
|
||||||
image_load(item->icon_name, item->icon_path, item->icon_object);
|
image_load(item->icon_name, item->icon_path, item->icon_object);
|
||||||
if (!item->in_box)
|
if (!evas_object_visible_get(item->icon_object))
|
||||||
{
|
{
|
||||||
systray_edje_box_append(item->host_inst->inst, box_part_name,
|
systray_edje_box_append(item->host_inst->inst, box_part_name,
|
||||||
item->icon_object);
|
item->icon_object);
|
||||||
evas_object_show(item->icon_object);
|
evas_object_show(item->icon_object);
|
||||||
}
|
}
|
||||||
item->in_box = EINA_TRUE;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case STATUS_PASSIVE:
|
case STATUS_PASSIVE:
|
||||||
{
|
{
|
||||||
if (item->in_box)
|
if (evas_object_visible_get(item->icon_object))
|
||||||
{
|
{
|
||||||
systray_edje_box_remove(item->host_inst->inst, box_part_name,
|
systray_edje_box_remove(item->host_inst->inst, box_part_name,
|
||||||
item->icon_object);
|
item->icon_object);
|
||||||
evas_object_hide(item->icon_object);
|
evas_object_hide(item->icon_object);
|
||||||
}
|
}
|
||||||
item->in_box = EINA_FALSE;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case STATUS_ATTENTION:
|
case STATUS_ATTENTION:
|
||||||
{
|
{
|
||||||
image_load(item->attention_icon_name, item->icon_path,
|
image_load(item->attention_icon_name, item->icon_path,
|
||||||
item->icon_object);
|
item->icon_object);
|
||||||
if (!item->in_box)
|
if (!evas_object_visible_get(item->icon_object))
|
||||||
{
|
{
|
||||||
systray_edje_box_append(item->host_inst->inst, box_part_name,
|
systray_edje_box_append(item->host_inst->inst, box_part_name,
|
||||||
item->icon_object);
|
item->icon_object);
|
||||||
evas_object_show(item->icon_object);
|
evas_object_show(item->icon_object);
|
||||||
}
|
}
|
||||||
item->in_box = EINA_TRUE;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -44,7 +44,6 @@ typedef struct _Notifier_Item
|
||||||
const char *menu_path;
|
const char *menu_path;
|
||||||
E_DBusMenu_Ctx *menu_data;
|
E_DBusMenu_Ctx *menu_data;
|
||||||
Eina_List *signals;
|
Eina_List *signals;
|
||||||
Eina_Bool in_box;
|
|
||||||
} Notifier_Item;
|
} Notifier_Item;
|
||||||
|
|
||||||
typedef void (*E_Notifier_Watcher_Item_Registered_Cb)(void *data, const char *service);
|
typedef void (*E_Notifier_Watcher_Item_Registered_Cb)(void *data, const char *service);
|
||||||
|
|
Loading…
Reference in New Issue