security-privilege-manager
pkgmgr-info
vconf
+ capi-ui-efl-util
)
INCLUDE_DIRECTORIES(SYSTEM
)
ADD_CUSTOM_TARGET(popup_custom.edj
- COMMAND edje_cc -no-save res/popup_custom.edc res/popup_custom.edj
- DEPENDS res/popup_custom.edc
- )
+ COMMAND edje_cc -no-save res/popup_custom.edc res/popup_custom.edj
+ DEPENDS res/popup_custom.edc
+ )
ADD_DEPENDENCIES(${PROJECT_NAME} popup_custom.edj)
INSTALL(TARGETS ${TARGET_ASKUSER_NOTIFICATION} DESTINATION ${BIN_INSTALL_DIR})
#include <translator/Translator.h>
#include <libintl.h>
#include <vconf.h>
+#include <efl_util.h>
#include "Policy.h"
namespace AskUser {
GuiRunner *runner = static_cast<GuiRunner*>(data);
if (runner->m_shouldRaise)
- elm_win_raise(runner->m_win);
+ evas_object_show(runner->m_win);//elm_win_raise(runner->m_win);
else
elm_exit();
+
}
void GuiRunner::winClose()
{
ALOGD("Window close");
m_shouldRaise = false;
- elm_win_lower(m_win);
+ evas_object_hide(m_win);
}
// responseMap[allow][always]
elm_init(0, NULL);
//placeholder
- m_win = elm_win_add(NULL, popupTitle, ELM_WIN_DOCK);
+ m_win = elm_win_add(NULL, popupTitle, ELM_WIN_NOTIFICATION);
if (!m_win) {
ALOGE("EFL : Failed to add window");
throw Exception("Elementary failed");
}
+ efl_util_set_notification_window_level(m_win, EFL_UTIL_NOTIFICATION_LEVEL_2);
+
elm_win_autodel_set(m_win, EINA_TRUE);
elm_win_override_set(m_win, EINA_TRUE);
elm_win_alpha_set(m_win, EINA_TRUE);
ALOGE("textdomain failed");
}
-void GuiRunner::refresh()
-{
- char *popupTitle = dgettext(PROJECT_NAME, "IDS_IDLE_HEADER_PRIVACY_REQUEST");
- char *checkBoxText = dgettext(PROJECT_NAME, "IDS_ST_OPT_DONT_SHOW_AGAIN");
-#ifdef MOBILE_UI
- elm_object_part_text_set(m_popup, "title,text", popupTitle);
- elm_object_text_set(m_denyButton, dgettext(PROJECT_NAME, "IDS_IDLE_BUTTON_DENY"));
- elm_object_text_set(m_allowButton, dgettext(PROJECT_NAME, "IDS_IDLE_BUTTON_ALLOW_ABB7"));
-#elif defined(CIRCLE_UI)
- elm_object_part_text_set(m_layout, "elm.text.title", popupTitle);
-#endif
- elm_object_text_set(m_checkbox, checkBoxText);
- elm_check_state_set(m_checkbox, EINA_FALSE);
-}
-
NResponseType GuiRunner::popupRun(const std::string &app, const std::string &perm)
{
try {
setLocale();
- if (!m_initialized) {
- initialize();
- }
- refresh();
+ initialize();
+
m_running = true;
+
std::string appId;
std::string pkgLabel;
identifyApp(app, appId, pkgLabel);
evas_object_show(m_popup);
evas_object_show(m_win);
- elm_win_raise(m_win);
-
ALOGD("Showing popup");
elm_run();
ALOGD("Popup closed");