diff options
author | Viktor Kojouharov <vkojouharov@gmail.com> | 2006-10-24 14:32:22 +0000 |
---|---|---|
committer | Viktor Kojouharov <vkojouharov@gmail.com> | 2006-10-24 14:32:22 +0000 |
commit | d2515a119ef886de0ad925414c5b118471e05082 (patch) | |
tree | 345cb47497d39bba819d9afd4b09cd246b86bd44 /src/modules/ibox | |
parent | 3f591fce62f2aa326f3be1aef0091648cc423a7c (diff) | |
download | enlightenment-d2515a119ef886de0ad925414c5b118471e05082.tar.gz |
the pager and iconbox now emit a signal when a border changes state from urgent
to normal and the other way around.
for the themers: the iconbox icon, the pager window and the pager desk, receive
the signals e,state,urgent and e,state,not_urgent, so you can do something nice
with those.
SVN revision: 26772
Diffstat (limited to 'src/modules/ibox')
-rw-r--r-- | src/modules/ibox/e_mod_main.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/modules/ibox/e_mod_main.c b/src/modules/ibox/e_mod_main.c index 7d73e78f02..ec64011e4e 100644 --- a/src/modules/ibox/e_mod_main.c +++ b/src/modules/ibox/e_mod_main.c @@ -113,6 +113,7 @@ static int _ibox_cb_event_border_remove(void *data, int type, void *event); static int _ibox_cb_event_border_iconify(void *data, int type, void *event); static int _ibox_cb_event_border_uniconify(void *data, int type, void *event); static int _ibox_cb_event_border_icon_change(void *data, int type, void *event); +static int _ibox_cb_event_border_urgent_change(void *data, int type, void *event); static int _ibox_cb_event_border_zone_set(void *data, int type, void *event); static int _ibox_cb_event_desk_show(void *data, int type, void *event); static Config_Item *_ibox_config_item_get(const char *id); @@ -1146,6 +1147,31 @@ _ibox_cb_event_border_icon_change(void *data, int type, void *event) } static int +_ibox_cb_event_border_urgent_change(void *data, int type, void *event) +{ + E_Event_Border_Urgent_Change *ev; + IBox *b; + IBox_Icon *ic; + Evas_List *l, *ibox; + + ev = event; + /* update icon */ + ibox = _ibox_zone_find(ev->border->zone); + for (l = ibox; l; l = l->next) + { + b = l->data; + ic = _ibox_icon_find(b, ev->border); + if (!ic) continue; + if (ev->border->client.icccm.urgent) + edje_object_signal_emit(ic->o_holder2, "e,state,urgent", "e"); + else + edje_object_signal_emit(ic->o_holder2, "e,state,not_urgent", "e"); + } + + return 1; +} + +static int _ibox_cb_event_border_zone_set(void *data, int type, void *event) { E_Event_Border_Zone_Set *ev; @@ -1320,6 +1346,10 @@ e_modapi_init(E_Module *m) (E_EVENT_BORDER_ICON_CHANGE, _ibox_cb_event_border_icon_change, NULL)); ibox_config->handlers = evas_list_append (ibox_config->handlers, ecore_event_handler_add + (E_EVENT_BORDER_URGENT_CHANGE, + _ibox_cb_event_border_urgent_change, NULL)); + ibox_config->handlers = evas_list_append + (ibox_config->handlers, ecore_event_handler_add (E_EVENT_BORDER_ZONE_SET, _ibox_cb_event_border_zone_set, NULL)); ibox_config->handlers = evas_list_append (ibox_config->handlers, ecore_event_handler_add |