forked from enlightenment/enlightenment
add a urgent show function on the gadcon level and use that
(p.s. it's a good idea to recompile any extra module that you might use) SVN revision: 39686
This commit is contained in:
parent
355be05673
commit
30b11d23c8
|
@ -707,6 +707,17 @@ e_gadcon_util_lock_func_set(E_Gadcon *gc,
|
|||
gc->locked_set.data = data;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_gadcon_util_urgent_show_func_set(E_Gadcon *gc,
|
||||
void (*func) (void *data),
|
||||
void *data)
|
||||
{
|
||||
E_OBJECT_CHECK(gc);
|
||||
E_OBJECT_TYPE_CHECK(gc, E_GADCON_TYPE);
|
||||
gc->urgent_show.func = func;
|
||||
gc->urgent_show.data = data;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_gadcon_dnd_window_set(E_Gadcon *gc, Ecore_X_Window win)
|
||||
{
|
||||
|
@ -1343,6 +1354,13 @@ e_gadcon_locked_set(E_Gadcon *gc, int lock)
|
|||
}
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_gadcon_urgent_show(E_Gadcon *gc)
|
||||
{
|
||||
if (gc->urgent_show.func)
|
||||
gc->urgent_show.func(gc->urgent_show.data);
|
||||
}
|
||||
|
||||
/*
|
||||
* NOTE: x & y are relative to the o_box of the gadcon.
|
||||
*/
|
||||
|
|
|
@ -93,6 +93,11 @@ struct _E_Gadcon
|
|||
void (*func) (void *data, int lock);
|
||||
void *data;
|
||||
} locked_set;
|
||||
struct
|
||||
{
|
||||
void (*func) (void *data);
|
||||
void *data;
|
||||
} urgent_show;
|
||||
|
||||
E_Config_Dialog *config_dialog;
|
||||
unsigned char editing : 1;
|
||||
|
@ -222,6 +227,7 @@ EAPI void e_gadcon_ecore_evas_set(E_Gadcon *gc, Ecore_Evas *ee);
|
|||
EAPI int e_gadcon_canvas_zone_geometry_get(E_Gadcon *gc, int *x, int *y, int *w, int *h);
|
||||
EAPI void e_gadcon_util_menu_attach_func_set(E_Gadcon *gc, void (*func) (void *data, E_Gadcon_Client *gcc, E_Menu *menu), void *data);
|
||||
EAPI void e_gadcon_util_lock_func_set(E_Gadcon *gc, void (*func) (void *data, int lock), void *data);
|
||||
EAPI void e_gadcon_util_urgent_show_func_set(E_Gadcon *gc, void (*func) (void *data), void *data);
|
||||
EAPI void e_gadcon_dnd_window_set(E_Gadcon *gc, Ecore_X_Window win);
|
||||
EAPI Ecore_X_Window e_gadcon_dnd_window_get(E_Gadcon *gc);
|
||||
EAPI void e_gadcon_xdnd_window_set(E_Gadcon *gc, Ecore_X_Window win);
|
||||
|
@ -248,6 +254,7 @@ EAPI int e_gadcon_client_geometry_get(E_Gadcon_Client *gcc, int *x, int *y
|
|||
EAPI void e_gadcon_client_util_menu_items_append(E_Gadcon_Client *gcc, E_Menu *menu, int flags);
|
||||
EAPI void e_gadcon_client_util_menu_attach(E_Gadcon_Client *gcc);
|
||||
EAPI void e_gadcon_locked_set(E_Gadcon *gc, int lock);
|
||||
EAPI void e_gadcon_urgent_show(E_Gadcon *gc);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -17,6 +17,7 @@ static void _e_shelf_cb_menu_delete(void *data, E_Menu *m, E_Menu_Item *mi);
|
|||
static void _e_shelf_menu_append(E_Shelf *es, E_Menu *mn);
|
||||
static void _e_shelf_cb_menu_items_append(void *data, E_Gadcon_Client *gcc, E_Menu *mn);
|
||||
static void _e_shelf_cb_locked_set(void *data, int lock);
|
||||
static void _e_shelf_cb_urgent_show(void *data);
|
||||
static void _e_shelf_cb_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_info);
|
||||
static int _e_shelf_cb_mouse_in(void *data, int type, void *event);
|
||||
static int _e_shelf_cb_mouse_out(void *data, int type, void *event);
|
||||
|
@ -195,6 +196,8 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, i
|
|||
|
||||
e_gadcon_util_lock_func_set(es->gadcon,
|
||||
_e_shelf_cb_locked_set, es);
|
||||
e_gadcon_util_urgent_show_func_set(es->gadcon,
|
||||
_e_shelf_cb_urgent_show, es);
|
||||
|
||||
shelves = eina_list_append(shelves, es);
|
||||
|
||||
|
@ -1149,6 +1152,15 @@ _e_shelf_cb_locked_set(void *data, int lock)
|
|||
e_shelf_locked_set(es, lock);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_shelf_cb_urgent_show(void *data)
|
||||
{
|
||||
E_Shelf *es;
|
||||
|
||||
es = data;
|
||||
e_shelf_urgent_show(es);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_shelf_cb_menu_config(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||
{
|
||||
|
|
|
@ -1199,8 +1199,7 @@ _ibox_cb_event_border_urgent_change(void *data, int type, void *event)
|
|||
if (!ic) continue;
|
||||
if (ev->border->client.icccm.urgent)
|
||||
{
|
||||
if (b->inst->gcc->gadcon->shelf)
|
||||
e_shelf_urgent_show(b->inst->gcc->gadcon->shelf);
|
||||
e_gadcon_urgent_show(b->inst->gcc->gadcon);
|
||||
edje_object_signal_emit(ic->o_holder, "e,state,urgent", "e");
|
||||
edje_object_signal_emit(ic->o_holder2, "e,state,urgent", "e");
|
||||
}
|
||||
|
|
|
@ -1384,9 +1384,8 @@ _pager_cb_event_border_urgent_change(void *data, int type, void *event)
|
|||
{
|
||||
if (!(ev->border->iconic))
|
||||
{
|
||||
if (pd->pager && pd->pager->inst &&
|
||||
pd->pager->inst->gcc->gadcon->shelf && !pager_config->popup_urgent)
|
||||
e_shelf_urgent_show(pd->pager->inst->gcc->gadcon->shelf);
|
||||
if (pd->pager && pd->pager->inst && !pager_config->popup_urgent)
|
||||
e_gadcon_urgent_show(pd->pager->inst->gcc->gadcon);
|
||||
edje_object_signal_emit(pd->o_desk,
|
||||
"e,state,urgent", "e");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue