Fix nasty formatting. Remove event_feed when showing menu as it's not
needed. SVN revision: 39822
This commit is contained in:
parent
8c3bd8614d
commit
1aff532015
24
e_mod_main.c
24
e_mod_main.c
|
@ -64,8 +64,7 @@ _gc_init (E_Gadcon * gc, const char *name, const char *id, const char *style)
|
|||
inst = E_NEW(Instance, 1);
|
||||
|
||||
inst->ci = _tclock_config_item_get(id);
|
||||
if (!inst->ci->id)
|
||||
inst->ci->id = eina_stringshare_add (id);
|
||||
if (!inst->ci->id) inst->ci->id = eina_stringshare_add(id);
|
||||
|
||||
o = edje_object_add(gc->evas);
|
||||
snprintf(buf, sizeof (buf), "%s/tclock.edj",
|
||||
|
@ -164,8 +163,7 @@ _gc_id_new (E_Gadcon_Client_Class *client_class)
|
|||
}
|
||||
|
||||
static void
|
||||
_tclock_cb_mouse_down (void *data, Evas * e, Evas_Object * obj,
|
||||
void *event_info)
|
||||
_tclock_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Instance *inst;
|
||||
Evas_Event_Mouse_Down *ev;
|
||||
|
@ -197,8 +195,6 @@ _tclock_cb_mouse_down (void *data, Evas * e, Evas_Object * obj,
|
|||
()), x + ev->output.x,
|
||||
y + ev->output.y, 1, 1,
|
||||
E_MENU_POP_DIRECTION_AUTO, ev->timestamp);
|
||||
evas_event_feed_mouse_up (inst->gcc->gadcon->evas, ev->button,
|
||||
EVAS_BUTTON_NONE, ev->timestamp, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -300,8 +296,7 @@ _tclock_cb_mouse_out(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
|||
static void
|
||||
_tclock_menu_cb_post(void *data, E_Menu *m)
|
||||
{
|
||||
if (!tclock_config->menu)
|
||||
return;
|
||||
if (!tclock_config->menu) return;
|
||||
e_object_del(E_OBJECT(tclock_config->menu));
|
||||
tclock_config->menu = NULL;
|
||||
}
|
||||
|
@ -320,8 +315,7 @@ _tclock_config_updated (Config_Item *ci)
|
|||
{
|
||||
Eina_List *l;
|
||||
|
||||
if (!tclock_config)
|
||||
return;
|
||||
if (!tclock_config) return;
|
||||
for (l = tclock_config->instances; l; l = l->next)
|
||||
{
|
||||
Instance *inst;
|
||||
|
@ -410,6 +404,7 @@ _tclock_config_item_get (const char *id)
|
|||
if (tclock_config->items)
|
||||
{
|
||||
const char *p;
|
||||
|
||||
ci = eina_list_last(tclock_config->items)->data;
|
||||
p = strrchr(ci->id, '.');
|
||||
if (p) num = atoi(p + 1) + 1;
|
||||
|
@ -422,10 +417,8 @@ _tclock_config_item_get (const char *id)
|
|||
for (l = tclock_config->items; l; l = l->next)
|
||||
{
|
||||
ci = l->data;
|
||||
if (!ci->id)
|
||||
continue;
|
||||
if (!strcmp (ci->id, id))
|
||||
return ci;
|
||||
if (!ci->id) continue;
|
||||
if (!strcmp(ci->id, id)) return ci;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -443,8 +436,7 @@ _tclock_config_item_get (const char *id)
|
|||
}
|
||||
|
||||
EAPI E_Module_Api e_modapi = {
|
||||
E_MODULE_API_VERSION,
|
||||
"TClock"
|
||||
E_MODULE_API_VERSION, "TClock"
|
||||
};
|
||||
|
||||
EAPI void *
|
||||
|
|
Loading…
Reference in New Issue