{
WorldClockView *world_clock_view = static_cast<WorldClockView *>(data);
-
- if (!strcmp(source, "main.world.map:arrow.left")) {
+ if (!strcmp(source, "arrow.left")) {
world_clock_view->OnLeftArrowClicked();
- } else if (!strcmp(source, "main.world.map:arrow.right")) {
+ } else if (!strcmp(source, "arrow.right")) {
world_clock_view->OnRightArrowClicked();
}
}
elm_layout_theme_set(world_clock_main_, "layout", "application", "default");
world_clock_ = elm_layout_add(world_clock_main_);
-
if(!elm_layout_file_set(world_clock_,
TizenAppUtils::GetResourcePath(TizenAppUtils::APP_DIR_RESOURCE, "edje/WorldClock.edj"),
"main")) {
FAT("Failed to load layout file");
}
-
ThemeExtension::AddTheme(TizenAppUtils::GetResourcePath(TizenAppUtils::APP_DIR_RESOURCE,
"edje/CitiesListItem.edj"));
-
evas_object_size_hint_align_set(world_clock_, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(world_clock_, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- edje_object_message_handler_set(elm_layout_edje_get(world_clock_), message_cb, NULL);
+ world_clock_map_ = elm_layout_add(world_clock_);
+ if(!elm_layout_file_set(world_clock_map_,
+ TizenAppUtils::GetResourcePath(TizenAppUtils::APP_DIR_RESOURCE, "edje/WorldClock.edj"),
+ "world.map")) {
+ FAT("Failed to load layout file");
+ }
+ evas_object_size_hint_align_set(world_clock_map_, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(world_clock_map_, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ edje_object_message_handler_set(elm_layout_edje_get(world_clock_map_), message_cb, NULL);
+
+ elm_object_part_content_set(world_clock_, "main.world.map", world_clock_map_);
CreateTimezoneDetails();
CreateCustomLocationsList(main.GetEvasObject());
elm_object_part_content_set(world_clock_main_, "elm.swallow.floatingbutton", fb);
elm_object_part_content_set(world_clock_main_, "elm.swallow.content", world_clock_);
+ elm_object_mirrored_automatic_set(world_clock_map_, EINA_FALSE);
+ elm_object_mirrored_set(world_clock_map_, EINA_FALSE);
+
eext_object_event_callback_add(world_clock_main_, EEXT_CALLBACK_MORE,
MoreButtonClicked, this);
- elm_layout_signal_callback_add(world_clock_, "timezone,go,left",
- "main.world.map:arrow.left", ChangeTimezoneCb,
+ elm_layout_signal_callback_add(world_clock_map_, "timezone,go,left",
+ "arrow.left", ChangeTimezoneCb,
static_cast<void *>(this));
- elm_layout_signal_callback_add(world_clock_, "timezone,go,right",
- "main.world.map:arrow.right", ChangeTimezoneCb,
+ elm_layout_signal_callback_add(world_clock_map_, "timezone,go,right",
+ "arrow.right", ChangeTimezoneCb,
static_cast<void *>(this));
time_delta = utils::GetSecondsToNextExactMinute();
FAT("Unable to create timer!");
map_ = new WorldClockMap(*this);
- elm_object_part_content_set(world_clock_, "main.world.map:map", map_->GetEvasObject());
+ elm_object_part_content_set(world_clock_map_, "map", map_->GetEvasObject());
time_format_change_listener_ = EventBus::AddListener<Time::PreferedTimeFormatChanged>(
std::bind(&WorldClockView::TimeFormatChanged, this));
msg->val[2] = PART_VISIBLE;
}
msg->val[3] = i;
- edje_object_message_send(elm_layout_edje_get(world_clock_), EDJE_MESSAGE_INT_SET,
+ 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);
}
void WorldClockView::UpdateGmtOffset(const model::Timezone *timezone)
{
const char *offset = OffsetToString(timezone->gmt_offset);
- elm_object_part_text_set(world_clock_, "main.world.map:timezone_offset", offset);
+ elm_object_part_text_set(world_clock_map_, "timezone_offset", offset);
}
void WorldClockView::UpdateTimezoneArea(const model::Timezone *timezone)
msg->val[0] = timezone->x_coord;
msg->val[1] = timezone->zone_width;
- edje_object_message_send(elm_layout_edje_get(world_clock_), EDJE_MESSAGE_INT_SET,
+ edje_object_message_send(elm_layout_edje_get(world_clock_map_), EDJE_MESSAGE_INT_SET,
MESSAGE_ID_SET_TIMEZONE, (void *) msg);
free(msg);
}