.prov_table = NULL,
};
+void _minictrl_sendview_rotation_event(const char* name, int angle);
+
static int _viewer_check(const char *name)
{
char *pos_start = NULL;
g_hash_table_insert(s_info.prov_table, g_strdup(name), vit);
DBG("success to add minicontrol %s", name);
- quickpanel_minictrl_rotation_report(vit->name, ad->angle);
+ _minictrl_sendview_rotation_event(vit->name, ad->angle);
}
static void _anim_init_resize(void *data)
case MINICONTROL_EVENT_REQUEST_ANGLE:
if (ad->list != NULL) {
SERR("need to broadcasting angle by %s ", name, event);
- quickpanel_minictrl_rotation_report(name, ad->angle);
+ _minictrl_sendview_rotation_event(name, ad->angle);
}
break;
default:
return QP_OK;
}
-HAPI void quickpanel_minictrl_rotation_report(const char* name, int angle)
+HAPI void quickpanel_minictrl_rotation_report(int angle)
+{
+ bundle *event_arg_bundle;
+
+ if (s_info.prov_table == NULL) {
+ return;
+ }
+
+ if (g_hash_table_size(s_info.prov_table) <= 0) {
+ return;
+ }
+
+ GHashTableIter iter;
+ gpointer key, value;
+
+ g_hash_table_iter_init (&iter, s_info.prov_table);
+ while (g_hash_table_iter_next (&iter, &key, &value))
+ {
+ SINFO("minicontrol name:%s rotation:%d", key, angle);
+ event_arg_bundle = bundle_create();
+ if (event_arg_bundle) {
+ char bundle_value_buffer[BUNDLE_BUFFER_LENGTH] = { 0, };
+ snprintf(bundle_value_buffer, sizeof(bundle_value_buffer) - 1, "%d", angle);
+ bundle_add_str(event_arg_bundle, "angle", bundle_value_buffer);
+ minicontrol_viewer_send_event(key, MINICONTROL_EVENT_REPORT_ANGLE, event_arg_bundle);
+ bundle_free(event_arg_bundle);
+ }
+ }
+}
+
+void _minictrl_sendview_rotation_event(const char* name, int angle)
{
bundle *event_arg_bundle;
return;
}
- SINFO("minicontrol name:%s rotation:%d", name, angle);
-
if (s_info.prov_table == NULL) {
return;
}
return;
}
+ SINFO("minicontrol name:%s rotation:%d", name, angle);
event_arg_bundle = bundle_create();
if (event_arg_bundle) {
char bundle_value_buffer[BUNDLE_BUFFER_LENGTH] = { 0, };
}
}
-
static void _minictrl_send_view_event_cb(gpointer key, gpointer value, gpointer user_data)
{
if (!key) {
#ifndef _QP_MINICONTROL_DEF_
#define _QP_MINICONTROL_DEF_
-extern void quickpanel_minictrl_rotation_report(const char* name, int angle);
+extern void quickpanel_minictrl_rotation_report(int angle);
#endif
return ret <= 0 ? NULL : buf;
}
+
+
+HAPI char *quickpanel_noti_util_get_text(notification_h noti, notification_text_type_e text_type)
+{
+ time_t time = 0;
+ char *text = NULL;
+ char buf[128] = {0,};
+
+ if (notification_get_time_from_text(noti, text_type, &time) == NOTIFICATION_ERROR_NONE) {
+ if ((int)time > 0) {
+ quickpanel_noti_util_get_time(time, buf, sizeof(buf));
+ text = buf;
+ }
+ } else {
+ notification_get_text(noti, text_type, &text);
+ }
+
+ DBG("text : %s", text);
+
+ if (text != NULL) {
+ return elm_entry_utf8_to_markup(text);
+ }
+
+ return NULL;
+}
+
extern int quickpanel_noti_util_get_event_count_from_noti(notification_h noti);
extern int quickpanel_noti_util_get_event_count_by_pkgname(const char *pkgname);
extern char *quickpanel_noti_util_get_time(time_t t, char *buf, int buf_len);
+extern char *quickpanel_noti_util_get_text(notification_h noti, notification_text_type_e text_type);
#endif
#endif
/* Get pkgname & id */
- noti_err = notification_get_text(noti,
- NOTIFICATION_TEXT_TYPE_TITLE,
- &text);
- if (noti_err == NOTIFICATION_ERROR_NONE && text != NULL) {
+ text = quickpanel_noti_util_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE);
+ if (text != NULL) {
quickpanel_common_util_char_replace(text, _NEWLINE, _SPACE);
_set_text_to_part(item, "elm.text.title", text);
#ifdef QP_SCREENREADER_ENABLE
#endif
}
- noti_err = notification_get_text(noti,
- NOTIFICATION_TEXT_TYPE_EVENT_COUNT,
- &text);
-
+ noti_err = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, &text);
if (noti_err == NOTIFICATION_ERROR_NONE && text != NULL) {
quickpanel_common_util_char_replace(text, _NEWLINE, _SPACE);
int count = atoi(text);
#endif
}
- noti_err = notification_get_text(noti,
- NOTIFICATION_TEXT_TYPE_CONTENT,
- &text);
- if (noti_err == NOTIFICATION_ERROR_NONE && text != NULL) {
+ text = quickpanel_noti_util_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT);
+ if (text != NULL) {
quickpanel_common_util_char_replace(text, _NEWLINE, _SPACE);
_set_text_to_part(item, "elm.text.content", text);
#ifdef QP_SCREENREADER_ENABLE
SDBG("percentage:%f size:%f", percentage, size);
- ret = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &text);
+ text = quickpanel_noti_util_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE);
if (ret == NOTIFICATION_ERROR_NONE && text != NULL) {
quickpanel_common_util_char_replace(text, _NEWLINE, _SPACE);
_set_text_to_part(item, "elm.text.title", text);
#endif
}
- ret = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT, &text);
- if (ret == NOTIFICATION_ERROR_NONE && text != NULL) {
+ text = quickpanel_noti_util_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT);
+ if (text != NULL) {
if (layout == NOTIFICATION_LY_ONGOING_EVENT) {
text_utf8 = elm_entry_utf8_to_markup(text);
if (text_utf8 != NULL) {
DBG("ROTATE:%d", angle);
+ quickpanel_minictrl_rotation_report(angle);
+
_ui_rotate(ad, angle);
}