forked from enlightenment/enlightenment
No need to use a switch when detecting mouse button. A simple one-line if
will work instead. SVN revision: 33064
This commit is contained in:
parent
207802377b
commit
a78f33109f
|
@ -280,9 +280,7 @@ _e_toolbar_cb_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_i
|
|||
|
||||
ev = event_info;
|
||||
tbar = data;
|
||||
switch (ev->button)
|
||||
{
|
||||
case 3:
|
||||
if (ev->button != 3) return;
|
||||
mn = e_menu_new();
|
||||
e_menu_post_deactivate_callback_set(mn, _e_toolbar_menu_cb_post, tbar);
|
||||
tbar->menu = mn;
|
||||
|
@ -292,10 +290,6 @@ _e_toolbar_cb_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_i
|
|||
e_menu_activate_mouse(mn, zone, x, y, 1, 1,
|
||||
E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
|
||||
e_util_evas_fake_mouse_up_later(tbar->gadcon->evas, ev->button);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -376,6 +370,7 @@ _e_toolbar_menu_del_hook(void *data)
|
|||
E_Menu_Item *mi;
|
||||
|
||||
mi = l->data;
|
||||
if (!mi) continue;
|
||||
if (mi->submenu) e_object_del(E_OBJECT(mi->submenu));
|
||||
}
|
||||
}
|
||||
|
@ -407,8 +402,7 @@ _e_toolbar_menu_cb_contents(void *data, E_Menu *mn, E_Menu_Item *mi)
|
|||
E_Toolbar *tbar;
|
||||
|
||||
tbar = data;
|
||||
if (!tbar->gadcon->config_dialog)
|
||||
e_int_gadcon_config_toolbar(tbar->gadcon);
|
||||
if (!tbar->gadcon->config_dialog) e_int_gadcon_config_toolbar(tbar->gadcon);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue