Fix nasty formatting. Remove event_feed when showing menu as it's not

needed.



SVN revision: 39822
This commit is contained in:
Christopher Michael 2009-03-31 17:29:12 +00:00
parent 8c3bd8614d
commit 1aff532015
2 changed files with 257 additions and 265 deletions

View File

@ -64,8 +64,7 @@ _gc_init (E_Gadcon * gc, const char *name, const char *id, const char *style)
inst = E_NEW(Instance, 1); inst = E_NEW(Instance, 1);
inst->ci = _tclock_config_item_get(id); inst->ci = _tclock_config_item_get(id);
if (!inst->ci->id) if (!inst->ci->id) inst->ci->id = eina_stringshare_add(id);
inst->ci->id = eina_stringshare_add (id);
o = edje_object_add(gc->evas); o = edje_object_add(gc->evas);
snprintf(buf, sizeof (buf), "%s/tclock.edj", snprintf(buf, sizeof (buf), "%s/tclock.edj",
@ -164,8 +163,7 @@ _gc_id_new (E_Gadcon_Client_Class *client_class)
} }
static void static void
_tclock_cb_mouse_down (void *data, Evas * e, Evas_Object * obj, _tclock_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
void *event_info)
{ {
Instance *inst; Instance *inst;
Evas_Event_Mouse_Down *ev; Evas_Event_Mouse_Down *ev;
@ -197,8 +195,6 @@ _tclock_cb_mouse_down (void *data, Evas * e, Evas_Object * obj,
()), x + ev->output.x, ()), x + ev->output.x,
y + ev->output.y, 1, 1, y + ev->output.y, 1, 1,
E_MENU_POP_DIRECTION_AUTO, ev->timestamp); 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 static void
_tclock_menu_cb_post(void *data, E_Menu *m) _tclock_menu_cb_post(void *data, E_Menu *m)
{ {
if (!tclock_config->menu) if (!tclock_config->menu) return;
return;
e_object_del(E_OBJECT(tclock_config->menu)); e_object_del(E_OBJECT(tclock_config->menu));
tclock_config->menu = NULL; tclock_config->menu = NULL;
} }
@ -320,8 +315,7 @@ _tclock_config_updated (Config_Item *ci)
{ {
Eina_List *l; Eina_List *l;
if (!tclock_config) if (!tclock_config) return;
return;
for (l = tclock_config->instances; l; l = l->next) for (l = tclock_config->instances; l; l = l->next)
{ {
Instance *inst; Instance *inst;
@ -410,6 +404,7 @@ _tclock_config_item_get (const char *id)
if (tclock_config->items) if (tclock_config->items)
{ {
const char *p; const char *p;
ci = eina_list_last(tclock_config->items)->data; ci = eina_list_last(tclock_config->items)->data;
p = strrchr(ci->id, '.'); p = strrchr(ci->id, '.');
if (p) num = atoi(p + 1) + 1; 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) for (l = tclock_config->items; l; l = l->next)
{ {
ci = l->data; ci = l->data;
if (!ci->id) if (!ci->id) continue;
continue; if (!strcmp(ci->id, id)) return ci;
if (!strcmp (ci->id, id))
return ci;
} }
} }
@ -443,8 +436,7 @@ _tclock_config_item_get (const char *id)
} }
EAPI E_Module_Api e_modapi = { EAPI E_Module_Api e_modapi = {
E_MODULE_API_VERSION, E_MODULE_API_VERSION, "TClock"
"TClock"
}; };
EAPI void * EAPI void *