add global flag to show if teamwork media popup was forced

This commit is contained in:
Mike Blumenkrantz 2013-06-17 09:03:21 +01:00
parent d9b5a6b82f
commit b76275032c
2 changed files with 7 additions and 1 deletions

View File

@ -35,6 +35,7 @@ typedef struct Mod
Eina_Hash *media;
E_Popup *pop;
Eina_Bool sticky : 1;
Eina_Bool force : 1;
} Mod;
extern Teamwork_Config *tw_config;

View File

@ -353,6 +353,7 @@ dbus_link_show_helper(const char *uri, Eina_Bool signal_open)
break;
}
}
if (tw_mod->pop) tw_mod->force = signal_open;
}
static Eldbus_Message *
@ -376,7 +377,10 @@ dbus_link_hide_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbu
if (eldbus_message_arguments_get(msg, "s", &uri))
{
if (tw_mod->pop && (!tw_mod->sticky) && (!e_util_strcmp(e_object_data_get(E_OBJECT(tw_mod->pop)), uri)))
tw_hide(NULL);
{
tw_hide(NULL);
tw_mod->force = 0;
}
}
return eldbus_message_method_return_new(msg);
}
@ -409,6 +413,7 @@ dbus_link_mouse_out_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const
}
else
tw_hide(NULL);
tw_mod->force = 0;
}
}
return eldbus_message_method_return_new(msg);