id->instance->OnItemToggled((uintptr_t)id->it);
}
-void SetItemRepeatIconVisibility(Elm_Object_Item *it, bool visible)
+static void SetItemRepeatIconVisibility(Elm_Object_Item *it, bool visible)
{
if (visible) {
elm_object_item_signal_emit(it, "show,repeat,icon", "clock");
void WorldClockView::UpdateTimezoneLocationsDots(const model::Timezone *timezone)
{
+ Edje_Message_Int_Set *msg = (Edje_Message_Int_Set *) new char[sizeof(Edje_Message_Int_Set) + 3 * sizeof(int)];
+ msg->count = 4;
+
for (unsigned int i = 0; i < 8; i++) {
- Edje_Message_Int_Set *msg;
- msg = (Edje_Message_Int_Set *) malloc(
- sizeof(Edje_Message_Int_Set) + 3 * sizeof(int));
- msg->count = 4;
if (i >= timezone->places.size()) {
msg->val[0] = 100;
msg->val[3] = i;
edje_object_message_send(elm_layout_edje_get(world_clock_map_), EDJE_MESSAGE_INT_SET,
MESSAGE_ID_SET_LOCATION_DOT_POSITION, (void *) msg);
- free(msg);
}
+ delete[] msg;
}
void WorldClockView::UpdateGmtOffset(const model::Timezone *timezone)
void WorldClockView::UpdateTimezoneArea(const model::Timezone *timezone)
{
- Edje_Message_Int_Set *msg = static_cast<Edje_Message_Int_Set *>
- (malloc(sizeof(Edje_Message_Int_Set) + sizeof(int)));
+ Edje_Message_Int_Set *msg = (Edje_Message_Int_Set *) new char[sizeof(Edje_Message_Int_Set) + sizeof(int)];
msg->count = 2;
msg->val[0] = timezone->x_coord;
edje_object_message_send(elm_layout_edje_get(world_clock_map_), EDJE_MESSAGE_INT_SET,
MESSAGE_ID_SET_TIMEZONE, (void *) msg);
- free(msg);
+ delete[] msg;
}
void WorldClockView::CreateTimezoneDetails()