extern Eina_Bool util_win_prop_angle_get(Ecore_X_Window win, int *curr);
extern int util_is_orf(void);
extern int util_check_noti_ani(const char* path);
+extern char *util_get_real_path(char *special_path);
extern void util_start_noti_ani(void* data);
extern void util_stop_noti_ani(void* data);
extern void util_send_status_message_start(void* data,double duration);
notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR, &icon_path);
if (icon_path == NULL || !ecore_file_exists(icon_path)) {
- if (icon_path != NULL && util_check_noti_ani(icon_path)) {
+
+ if (util_check_noti_ani(icon_path))
show_icon_with_path(data, icon_path);
- } else {
- notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, &icon_path);
-
- if (icon_path == NULL || !ecore_file_exists(icon_path)) {
- char *pkgname = NULL;
- char *icon_path_second = NULL;
- notification_get_pkgname(noti, &pkgname);
- icon_path_second = __indicator_ui_get_pkginfo_icon(pkgname);
-
- if (icon_path_second == NULL || !ecore_file_exists(icon_path_second))
- data->icon->img_obj.data = NULL;
- else
- show_icon_with_path(data, icon_path_second);
-
- if (icon_path_second != NULL)
- free(icon_path_second);
- } else
- show_icon_with_path(data, icon_path);
+ else {
+ char *real_path = util_get_real_path(icon_path);
+
+ if (real_path) {
+ show_icon_with_path(data, real_path);
+ free(real_path);
+ } else {
+ notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, &icon_path);
+
+ if (icon_path == NULL || !ecore_file_exists(icon_path)) {
+ char *pkgname = NULL;
+ char *icon_path_second = NULL;
+ notification_get_pkgname(noti, &pkgname);
+ icon_path_second = __indicator_ui_get_pkginfo_icon(pkgname);
+
+ if (icon_path_second == NULL || !ecore_file_exists(icon_path_second))
+ data->icon->img_obj.data = NULL;
+ else
+ show_icon_with_path(data, icon_path_second);
+
+ if (icon_path_second != NULL)
+ free(icon_path_second);
+ } else
+ show_icon_with_path(data, icon_path);
+ }
}
} else
show_icon_with_path(data, icon_path);
#define DIR_PREFIX "Theme_%02d_"
#define LABEL_STRING "<color=#%02x%02x%02x%02x>%s</color>"
+#define MSG_RESERVED "reserved://indicator/"
+
+#define MSG_NORMAL_STATUS_ICON MSG_RESERVED"icons/notify_message"
+#define MSG_FAILED_STATUS_ICON MSG_RESERVED"icons/notify_message_failed"
+#define MSG_DELIVER_REPORT_STATUS_ICON MSG_RESERVED"icons/delivery_report_message"
+#define MSG_READ_REPORT_STATUS_ICON MSG_RESERVED"icons/read_report_message"
+#define MSG_VOICE_MSG_STATUS_ICON MSG_RESERVED"icons/notify_voicemail"
+#define MSG_SIM_FULL_STATUS_ICON MSG_RESERVED"icons/sim_card_full"
+
+
typedef struct {
wifi_connection_state_changed_cb cb;
void *data;
void *data;
} runtime_info_handler_t;
+typedef struct {
+ char *path;
+ char *icon;
+} reserved_t;
+
static Eina_List *wifi_callbacks;
static Eina_List *wifi_device_callbacks;
static Eina_List *ss_callbacks;
static Eina_List *ri_callbacks;
static int wifi_init_cnt = 0;
+
+const reserved_t reserved_paths[] = {
+ {MSG_NORMAL_STATUS_ICON, "/Notify/B03_notify_message.png"},
+ {MSG_FAILED_STATUS_ICON, "/Notify/B03_notify_message_failed.png"},
+ {MSG_DELIVER_REPORT_STATUS_ICON, "/Event/B03_event_delivery_report_message.png"},
+ {MSG_READ_REPORT_STATUS_ICON, "/Event/B03_event_read_report_message.png"},
+ {MSG_VOICE_MSG_STATUS_ICON, "/Event/B03_Event_voicemail.png"},
+ {MSG_SIM_FULL_STATUS_ICON, "/SIM card full/B03_sim_card_full.png"}
+};
+
+
char *util_set_label_text_color(const char *txt)
{
Eina_Strbuf *temp_buf = NULL;
return 0;
}
+char *util_get_real_path(char *special_path)
+{
+ retv_if(!special_path, 0);
+
+ char *real_path = NULL;
+
+ int i;
+ for (i = 0; i < ARRAY_SIZE(reserved_paths); ++i) {
+ if(!strcmp(special_path, reserved_paths[i].path)) {
+
+ real_path = calloc(
+ strlen(util_get_icon_dir())
+ + strlen(reserved_paths[i].icon)
+ + 1,
+ sizeof(char));
+
+ if(!real_path)
+ return NULL;
+
+ snprintf(real_path,
+ strlen(util_get_icon_dir()) + strlen(reserved_paths[i].icon) + 1,
+ "%s%s", util_get_icon_dir(), reserved_paths[i].icon);
+ return real_path;
+ }
+ }
+
+ return NULL;
+}
void util_start_noti_ani(void* data)
{