Minor refactories.

Signed-off-by: Wei-Chung Wen <morisato3711@gmail.com>
Fix plugin loxamail to well prompt warning dialog multiple times.

Change-Id: I5f7c7519a0be3f3a85b0afd5fb2729a8c6162785
Signed-off-by: Wei-Chung Wen <morisato3711@gmail.com>