code modification on Review comments and Nabi issue resolution N_SE-37703
authorchitta ranjan <chitta.rs@samsung.com>
Wed, 8 May 2013 06:27:28 +0000 (15:27 +0900)
committerchitta ranjan <chitta.rs@samsung.com>
Wed, 8 May 2013 06:52:32 +0000 (15:52 +0900)
Change-Id: Ib0ee3c93483a02364c5d01a1532f98b95a08a4d0
Signed-off-by: chitta ranjan <chitta.rs@samsung.com>
src/StDateTimeForm.cpp
src/StNfcForm.cpp

index 8850080..b5b38bc 100644 (file)
@@ -24,7 +24,7 @@
 #include "StSettingScenesList.h"
 #include "StTypes.h"
 
-using namespace Tizen::App;
+
 using namespace Tizen::Base;
 using namespace Tizen::Graphics;
 using namespace Tizen::Locales;
@@ -69,14 +69,11 @@ static const int H_TIME_FIELD = 150;
 
 static const int SECOND_CONTROL_ITEM = 1;
 static const int SECOND_TEXT_ITEM = 2;
-static int MIN_YEAR = 1980;
-static int MAX_YEAR = 2035;
+static const int MIN_YEAR = 1980;
+static const int MAX_YEAR = 2035;
 static const float RESIZE_RATE = 5.5;
 static const int DIVIDE_BY_TEN = 10;
 
-const String MinYearKey("MinYearKey");
-const String MaxYearKey("MaxYearKey");
-
 DateTimeForm::DateTimeForm(void)
 {
 }
@@ -104,27 +101,6 @@ DateTimeForm::OnInitializing(void)
        CreateHeader(ResourceManager::GetString(L"IDS_ST_BODY_DATE_AND_TIME"));
        CreateFooter();
        CreateTableView();
-       result r = E_FAILURE;
-       Tizen::App::AppRegistry* pAppRegistry = App::GetInstance()->GetAppRegistry();
-
-       r = pAppRegistry->Get(MinYearKey, MIN_YEAR);
-       if (r == E_KEY_NOT_FOUND)
-       {
-               pAppRegistry->Add(MinYearKey, MIN_YEAR);
-       }
-
-       r = pAppRegistry->Get(MaxYearKey, MAX_YEAR);
-       if (r == E_KEY_NOT_FOUND)
-       {
-               pAppRegistry->Add(MaxYearKey, MAX_YEAR);
-       }
-       r = pAppRegistry->Save();
-       if (IsFailed(r))
-       {
-               // Failed to save data to registry
-               AppLogDebug("OnInitialized failed to save data to registry with %s", GetErrorMessage(r));
-               return E_FAILURE;
-       }
 
        AppLogDebug("ENTER");
 
@@ -553,27 +529,24 @@ DateTimeForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 
                bool hourFormat = false;
 
-               Tizen::App::AppRegistry* pAppRegistry = App::GetInstance()->GetAppRegistry();
-
                EditDate* pEditDate = new (std::nothrow) EditDate();
                pEditDate->Construct(Point(0, 0), itemMainText);
                pEditDate->SetCurrentDate();
 
+               int minYear = MIN_YEAR;
+               int maxYear = MAX_YEAR;
+
                if (pEditDate->GetYear() < MIN_YEAR)
                {
-                       MIN_YEAR--;
-                       pAppRegistry->Set(MinYearKey, MIN_YEAR);
-                       pAppRegistry->Save();
+                       minYear = pEditDate->GetYear();
                }
 
                if (pEditDate->GetYear() > MAX_YEAR)
                {
-                       MAX_YEAR++;
-                       pAppRegistry->Set(MaxYearKey, MAX_YEAR);
-                       pAppRegistry->Save();
+                       maxYear = pEditDate->GetYear();
                }
 
-               pEditDate->SetYearRange(MIN_YEAR, MAX_YEAR);
+               pEditDate->SetYearRange(minYear, maxYear);
                pEditDate->AddDateChangeEventListener(*this);
                pEditDate->SetName(L"EditDate");
 
@@ -1042,4 +1015,4 @@ DateTimeForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection:
                        delete pArgs;
                }
        }
-}
\ No newline at end of file
+}
index c202506..0e63038 100644 (file)
@@ -430,11 +430,11 @@ NfcForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableVie
                        if (__isNfcBusy)
                        {
                                AppLogDebug("nfc turn on or off");
+                               __pTableView->SetItemChecked(groupIndex, itemIndex, !__pTableView->IsItemChecked(groupIndex, itemIndex));
                                return;
                        }
                        __isNfcBusy = true;
                        ToggleNfcActivateStatus(status);
-
                        __pTableView->UpdateTableView();
                }
                break;