/**
* @brief Enumeration for direction of time zone shift.
*/
- enum Direction{
+ enum Direction {
LEFT,//!< LEFT
RIGHT//!< RIGHT
};
class WorldClockPresenter {
public:
+
+ /**
+ * @brief Limits
+ */
+ enum Limits {
+ USER_LOCATIONS_LIMIT = 20
+ };
+
WorldClockPresenter(view::WorldClockView *view, model::WorldClock *model);
~WorldClockPresenter();
# This PO file is automatically generated by PO File Editor of Tizen Studio
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES CAN BE OVERWRITTEN
+msgid "IDS_CLOCK_TPOP_CANT_ADD_MORE_THAN_PD_CITIES"
+msgstr "Can't add more than %d cities."
+
msgid "IDS_CLOCK_BODY_PS1D_H_P2SD_M_AHEAD_ABB"
msgstr "%d h %d m ahead"
msgid "IDS_CLOCK_MAX_RECORDS_REACHED_POPUP_ABB"
msgstr "Maximum number of stopwatch records (%d) reached."
+
#include "Presenter/WorldClockPresenter.h"
#include "Utils/Log.h"
+#include "Utils/PopupManager.h"
namespace presenter {
void WorldClockPresenter::OnItemAdded()
{
+ if (model_->user_locations_.size() >= USER_LOCATIONS_LIMIT) {
+
+ char message[128] = {0,};
+ snprintf(message, sizeof(message),
+ _("IDS_CLOCK_TPOP_CANT_ADD_MORE_THAN_PD_CITIES"), USER_LOCATIONS_LIMIT);
+ utils::PopupManager::CreatePopup(*view_, std::string(message), 3);
+ return;
+ }
const model::Location *l = view_->GetLocationToAdd();
if (!l) {
ERR("Invalid Location object");
#include "Internal/WorldClockDefs.h"
#include "Utils/Log.h"
#include "Utils/Time.h"
+#include "Utils/PopupManager.h"
using namespace view;
using namespace utils;
void WorldClockView::PostItemExistMessage()
{
// TODO This text is temporary. Waiting for UX Designer response
- notification_status_message_post("Location already exists in the list");
+ utils::PopupManager::CreatePopup(*this, "Location already exists in the list", 3);
}