From a09dea3b6aa25ffcc270867658976de086dd3e5e Mon Sep 17 00:00:00 2001 From: Manoj Das Date: Fri, 29 Mar 2013 06:04:17 +0530 Subject: [PATCH] Fixed Nabi Issues Change-Id: I08784cbe0a693cba4842cf66de1a0091fabe8d57 --- inc/IntBookmarkData.h | 20 +- inc/IntBookmarkPresentationModel.h | 1 + inc/IntHistoryData.h | 20 +- inc/IntHistoryPresentationModel.h | 4 + inc/IntIAddressbarEventListener.h | 2 +- inc/IntMainForm.h | 9 +- inc/IntPresentationModelBase.h | 16 + res/screen-size-normal/IDL_ADDRESSBAR.xml | 64 +-- res/screen-size-normal/IDL_ADD_BOOKMARK.xml | 12 +- .../IDL_CREATE_BOOKMARK_FOLDER.xml | 6 +- res/screen-size-normal/IDL_FIND_ON_PAGE.xml | 14 +- res/screen-size-normal/IDL_FORM.xml | 4 +- res/screen-size-normal/IDL_NOTIFICATION_PANEL.xml | 3 +- src/IntAddBookmarkForm.cpp | 13 +- src/IntAddressbar.cpp | 2 +- src/IntBookmarkData.cpp | 74 +++ src/IntBookmarkListForm.cpp | 58 +- src/IntBookmarkPresentationModel.cpp | 208 +++++++- src/IntBrightnessForm.cpp | 5 + src/IntEditBookmarkListForm.cpp | 3 +- src/IntEditHistoryListForm.cpp | 6 +- src/IntHistory.cpp | 68 +++ src/IntHistoryListForm.cpp | 14 +- src/IntHistoryPresentationModel.cpp | 583 ++++++++++++--------- src/IntMainForm.cpp | 308 +++++++---- src/IntNotificationPanel.cpp | 2 + src/IntPresentationModelBase.cpp | 288 +++++++++- 27 files changed, 1349 insertions(+), 458 deletions(-) diff --git a/inc/IntBookmarkData.h b/inc/IntBookmarkData.h index 81d18ec..054b3ac 100644 --- a/inc/IntBookmarkData.h +++ b/inc/IntBookmarkData.h @@ -26,7 +26,7 @@ #include - +#include /** * @enum BookmarkType * @@ -207,6 +207,21 @@ public: */ void SetUrl(const Tizen::Base::String& strUrl); + void SetFavIconBitmap(Tizen::Graphics::Bitmap& favIconImage); + + void SetFavIconBuffer(Tizen::Base::ByteBuffer& favIconBuffer); + + Tizen::Base::ByteBuffer* GetFavIconBuffer(); + + Tizen::Graphics::Bitmap* GetFavIconBitmap(); + + int GetFavIconWidth(); + + int GetFavIconHeight(); + + void SetFavIconWidth(int favIconWidth); + + void SetFavIconHeight(int favIconHeight); private: Tizen::Base::String __bookmarkId; type __bookmarkType; @@ -217,6 +232,9 @@ private: Tizen::Base::String __iconPath; Tizen::Base::DateTime __modifiedTime; Tizen::Base::String __parentId; + Tizen::Base::ByteBuffer* __pFavIconData; + int __favIconWidth; + int __favIconHeight; }; #endif //_INT_BOOKMARK_DATA_H_ diff --git a/inc/IntBookmarkPresentationModel.h b/inc/IntBookmarkPresentationModel.h index f7b4228..9481338 100644 --- a/inc/IntBookmarkPresentationModel.h +++ b/inc/IntBookmarkPresentationModel.h @@ -264,6 +264,7 @@ public: */ result SaveBookmark(BookmarkData& bookmark); + result SaveTempBookmark(BookmarkData& bookmark); private: /** * @brief The Default Constructor diff --git a/inc/IntHistoryData.h b/inc/IntHistoryData.h index 32f3e28..62cf6a3 100644 --- a/inc/IntHistoryData.h +++ b/inc/IntHistoryData.h @@ -207,7 +207,6 @@ public: */ void SetVisitedTime(const Tizen::Base::DateTime& strVisitedTime); - /** * This function sets visited count of a URL * @@ -216,6 +215,22 @@ public: */ void SetVisitedCount(int& visitedCount); + void SetFavIconBitmap(Tizen::Graphics::Bitmap& favIconImage); + + void SetFavIconBuffer(Tizen::Base::ByteBuffer& favIconBuffer); + + Tizen::Base::ByteBuffer* GetFavIconBuffer(); + + Tizen::Graphics::Bitmap* GetFavIconBitmap(); + + int GetFavIconWidth(); + + int GetFavIconHeight(); + + void SetFavIconWidth(int favIconWidth); + + void SetFavIconHeight(int favIconHeight); + private: Tizen::Base::String __bookmarkId; Tizen::Base::String __faviconId; @@ -227,6 +242,9 @@ private: Tizen::Graphics::Bitmap* __pThumbnail; int __visitedCount; Tizen::Base::DateTime __visitedTime; + Tizen::Base::ByteBuffer* __pFavIconData; + int __favIconWidth; + int __favIconHeight; }; #endif //_INT_HISTORY_DATA_H_ diff --git a/inc/IntHistoryPresentationModel.h b/inc/IntHistoryPresentationModel.h index bd8a4bd..dff81e4 100644 --- a/inc/IntHistoryPresentationModel.h +++ b/inc/IntHistoryPresentationModel.h @@ -130,6 +130,8 @@ public: */ result SaveHistory(History& history); + result SaveTempHistory(History& history); + /** * This function selects the history from the table * @@ -255,6 +257,8 @@ private: Tizen::Base::String GetStringFromDate(Tizen::Base::DateTime& date); static HistoryPresentationModel* __pHistoryPresentationModel; + + Tizen::Base::Collection::ArrayList *__pDataList; }; #endif //_INT_HISTORY_PRESENTATION_MODEL_H diff --git a/inc/IntIAddressbarEventListener.h b/inc/IntIAddressbarEventListener.h index 8d2a79e..46d31a7 100644 --- a/inc/IntIAddressbarEventListener.h +++ b/inc/IntIAddressbarEventListener.h @@ -39,7 +39,7 @@ class IAddressbarEventListener { public: virtual ~IAddressbarEventListener(void) {}; - virtual void OnAddressBarKeypadClosed(const Addressbar&) = 0; + virtual void OnAddressBarKeypadClosed(const Addressbar&, bool footerState = true ) = 0; virtual void OnAddressBarKeypadOpened(const Addressbar&) = 0; virtual void OnAddressBarKeypadWillOpen(const Addressbar&) = 0; //virtual void OnAddressBarModeChanged(const Addressbar&) = 0; diff --git a/inc/IntMainForm.h b/inc/IntMainForm.h index ad52e72..aaf2789 100644 --- a/inc/IntMainForm.h +++ b/inc/IntMainForm.h @@ -102,7 +102,7 @@ public: //IAddressbarEventListener void OnAddressCancelledClicked(const Addressbar&); - void OnAddressBarKeypadClosed(const Addressbar&); + void OnAddressBarKeypadClosed(const Addressbar&, bool footerState = true); void OnAddressBarKeypadOpened(const Addressbar&); @@ -126,6 +126,7 @@ public: //ILoadingeventListener virtual void OnEstimatedProgress(int progress); + virtual void OnFaviconReceived(const Tizen::Graphics::Bitmap& favicon); virtual bool OnHttpAuthenticationRequestedN(const Tizen::Base::String& host, const Tizen::Base::String& realm, const Tizen::Web::Controls::AuthenticationChallenge& authentication); @@ -135,9 +136,9 @@ public: virtual void OnKeypadWillOpen(Tizen::Ui::Control& source); - virtual void OnKeypadOpened(Tizen::Ui::Control& source){} + virtual void OnKeypadOpened(Tizen::Ui::Control& source); - virtual void OnKeypadClosed(Tizen::Ui::Control& source);; + virtual void OnKeypadClosed(Tizen::Ui::Control& source); virtual void OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction){} @@ -326,6 +327,7 @@ private: Tizen::Graphics::Point __webControlPosition; Tizen::Ui::Controls::ListContextItem* __pItemContext; + Tizen::Ui::Controls::ListContextItem* __pItemContextLandscape; Tizen::Base::Collection::ArrayList* __pMostVisitedSites; Tizen::Ui::Controls::EditField* __pFooterUrlField; Tizen::Ui::Controls::Button* __pGoBackBtn; @@ -335,6 +337,7 @@ private: Tizen::Ui::Controls::Label* __pFooterLabel; Tizen::Ui::Controls::Button* __pStopBtn; Tizen::Ui::Controls::Button* __pClearBtn; + }; #endif //_INT_MAIN_FORM_H_ diff --git a/inc/IntPresentationModelBase.h b/inc/IntPresentationModelBase.h index 08a2252..77a0bff 100644 --- a/inc/IntPresentationModelBase.h +++ b/inc/IntPresentationModelBase.h @@ -29,6 +29,8 @@ #include #include "IntTypes.h" +#include "IntBookmarkData.h" +#include "IntHistoryData.h" /** * @class PresentationModelBase @@ -103,6 +105,18 @@ public: */ result ExecuteQuery(const Tizen::Base::String& pszFormatQuery, int& nRowCount); + /** + * This function drops the existing tables from database + * + * @return An error code + * @param No parameter + * @exception E_SUCCESS The table is dropped successfully from database + * @exception E_FAILURE The table drop is unsuccessful + */ + result ExecuteBookmarkQuery(const Tizen::Base::String& pszFormatQuery, int& nRowCount, BookmarkData& bookmark); + + result ExecuteHistoryQuery(const Tizen::Base::String& pszFormatQuery, int& nRowCount, History& history); + result GetColumn(int nIndex, Tizen::Base::String& strVal); result GetColumn(int nIndex, int& nIntVal); @@ -111,6 +125,8 @@ public: result GetColumn(int nIndex, Tizen::Base::DateTime& dtVal); + result GetColumn(int nIndex,Tizen::Base::ByteBuffer& favIconBuffer); + static bool GetCurrentDateTime(Tizen::Base::DateTime& dt); /** diff --git a/res/screen-size-normal/IDL_ADDRESSBAR.xml b/res/screen-size-normal/IDL_ADDRESSBAR.xml index 9269724..6b299af 100644 --- a/res/screen-size-normal/IDL_ADDRESSBAR.xml +++ b/res/screen-size-normal/IDL_ADDRESSBAR.xml @@ -3,60 +3,60 @@ This XML file was automatically generated by UiBuilder - do not modify by hand. --> - + - - + + - - + + - - - + + + diff --git a/res/screen-size-normal/IDL_ADD_BOOKMARK.xml b/res/screen-size-normal/IDL_ADD_BOOKMARK.xml index c66046f..c31a6a6 100644 --- a/res/screen-size-normal/IDL_ADD_BOOKMARK.xml +++ b/res/screen-size-normal/IDL_ADD_BOOKMARK.xml @@ -19,7 +19,7 @@ - + @@ -38,12 +38,12 @@ - + - - + + - - + + - - + + diff --git a/res/screen-size-normal/IDL_FIND_ON_PAGE.xml b/res/screen-size-normal/IDL_FIND_ON_PAGE.xml index ae494d5..41150e8 100644 --- a/res/screen-size-normal/IDL_FIND_ON_PAGE.xml +++ b/res/screen-size-normal/IDL_FIND_ON_PAGE.xml @@ -4,29 +4,29 @@ --> - + @@ -41,7 +41,7 @@ @@ -52,7 +52,7 @@ - + diff --git a/res/screen-size-normal/IDL_FORM.xml b/res/screen-size-normal/IDL_FORM.xml index 455936b..0c98456 100644 --- a/res/screen-size-normal/IDL_FORM.xml +++ b/res/screen-size-normal/IDL_FORM.xml @@ -23,7 +23,7 @@