Skip to content

Commit

Permalink
Clipboard: unnecessary condition?
Browse files Browse the repository at this point in the history
  • Loading branch information
thewaiter committed Aug 4, 2022
1 parent 0b4487f commit cd601e2
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/modules/clipboard/e_mod_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,9 @@ _menu_fill(Instance *inst, Eina_Bool mouse_event)

inst->menu = e_menu_new();


if (!mouse_event){
e_menu_post_deactivate_callback_set(inst->menu, _cb_menu_post_deactivate, inst);
}
//~ if (!mouse_event){
//~ e_menu_post_deactivate_callback_set(inst->menu, _cb_menu_post_deactivate, inst);
//~ }

if (clip_inst->items){
Eina_List *it;
Expand Down Expand Up @@ -404,7 +403,6 @@ _menu_fill(Instance *inst, Eina_Bool mouse_event)
e_menu_item_submenu_set(mi, subm);

e_object_unref(E_OBJECT(subm));

}
}
else {
Expand Down Expand Up @@ -444,13 +442,15 @@ _menu_fill(Instance *inst, Eina_Bool mouse_event)
e_util_menu_item_theme_icon_set(mi, "preferences-system");
e_menu_item_callback_set(mi, _cb_config_show, NULL);

if (mouse_event) {
/* Deactivate callback */
if (mouse_event)
e_menu_post_deactivate_callback_set(inst->menu, _cb_menu_post_deactivate, inst);

/* Proper menu orientation
* We display not relatively to the gadget, but similarly to
* the start menu - thus the need for direction etc.
*/
switch (inst->gcc->gadcon->orient) {
switch (inst->gcc->gadcon->orient) {
case E_GADCON_ORIENT_TOP:
case E_GADCON_ORIENT_CORNER_TL:
case E_GADCON_ORIENT_CORNER_TR:
Expand Down Expand Up @@ -481,7 +481,6 @@ _menu_fill(Instance *inst, Eina_Bool mouse_event)
dir = E_MENU_POP_DIRECTION_AUTO;
break;
}
}
return dir;
}

Expand Down

0 comments on commit cd601e2

Please sign in to comment.