summaryrefslogtreecommitdiff
path: root/services/SettingsUI
diff options
context:
space:
mode:
authorm.kawonczyk <m.kawonczyk@samsung.com>2016-03-09 14:42:26 +0100
committerm.kawonczyk <m.kawonczyk@samsung.com>2016-03-11 09:58:57 +0100
commit01e24581aea4b612753a918140f79a6f2455b8a5 (patch)
tree7ac499b7cfb8111c3d72941a1564df9f1770dd87 /services/SettingsUI
parent652ed3cd1d8ec30723682cb2480b479c9f998511 (diff)
downloadbrowser-01e24581aea4b612753a918140f79a6f2455b8a5.tar.gz
browser-01e24581aea4b612753a918140f79a6f2455b8a5.tar.bz2
browser-01e24581aea4b612753a918140f79a6f2455b8a5.zip
[Browser][MT][Workaround] Added autofill profiles are not always visible.
[Issue] http://165.213.149.170/jira/browse/TWF-471 [Problem] Added autofill profiles are not always visible [Solution] Added 0.1 second timer before calling ewk_context_form_autofill_profile_get_all [Verify] Open autofill profiles in Settings. Add a profile, it should be visible on a list immediately. Change-Id: I175735a0701c82afca509301616f8102df055f33
Diffstat (limited to 'services/SettingsUI')
-rw-r--r--services/SettingsUI/AutoFillForm/AutoFillFormComposeView.cpp24
-rw-r--r--services/SettingsUI/AutoFillForm/AutoFillFormComposeView.h1
-rw-r--r--services/SettingsUI/AutoFillForm/AutoFillFormManager.cpp24
-rw-r--r--services/SettingsUI/AutoFillForm/AutoFillFormManager.h5
4 files changed, 39 insertions, 15 deletions
diff --git a/services/SettingsUI/AutoFillForm/AutoFillFormComposeView.cpp b/services/SettingsUI/AutoFillForm/AutoFillFormComposeView.cpp
index 4aa9c666..0dfd2c6e 100644
--- a/services/SettingsUI/AutoFillForm/AutoFillFormComposeView.cpp
+++ b/services/SettingsUI/AutoFillForm/AutoFillFormComposeView.cpp
@@ -457,18 +457,15 @@ void AutoFillFormComposeView::__done_button_cb(void* data, Evas_Object* /*obj*/,
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
AutoFillFormComposeView *view = static_cast<AutoFillFormComposeView*>(data);
-
- if (elm_entry_is_empty(view->m_entryFullName)) {
- elm_object_focus_set(view->m_cancelButton, EINA_TRUE); // Closing virtual keyboard by changing the focus
- return;
- }
-
if (view->applyEntryData() == EINA_FALSE)
return;
+#if !PROFILE_MOBILE
elm_object_focus_set(view->m_cancelButton, EINA_TRUE);
evas_object_hide(view->m_mainLayout);
+#endif
view->m_manager->refreshListView();
+ view->hide_action_bar();
}
void AutoFillFormComposeView::__cancel_button_cb(void* data, Evas_Object* /*obj*/, void* /*event_info*/)
@@ -476,11 +473,16 @@ void AutoFillFormComposeView::__cancel_button_cb(void* data, Evas_Object* /*obj*
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
AutoFillFormComposeView *view = static_cast<AutoFillFormComposeView*>(data);
- elm_object_signal_emit(view->m_action_bar, "hide,buttons,signal", "but_vis");
- elm_object_signal_emit(view->m_action_bar, "show,close,icon", "del_but");
- elm_object_signal_emit(view->m_action_bar,"back,icon,change", "del_but");
- elm_object_translatable_part_text_set(view->m_action_bar, "settings_title", "IDS_BR_BODY_AUTO_FILL_FORMS_T_TTS");
- view->hide();
+ view->hide_action_bar();
+}
+
+void AutoFillFormComposeView::hide_action_bar()
+{
+ elm_object_signal_emit(m_action_bar, "hide,buttons,signal", "but_vis");
+ elm_object_signal_emit(m_action_bar, "show,close,icon", "del_but");
+ elm_object_signal_emit(m_action_bar, "back,icon,change", "del_but");
+ elm_object_translatable_part_text_set(m_action_bar, "settings_title", "IDS_BR_BODY_AUTO_FILL_FORMS_T_TTS");
+ hide();
}
void AutoFillFormComposeView::__entry_changed_cb(void* data, Evas_Object* obj, void* /*event_info*/)
diff --git a/services/SettingsUI/AutoFillForm/AutoFillFormComposeView.h b/services/SettingsUI/AutoFillForm/AutoFillFormComposeView.h
index 7b3a534c..f58483df 100644
--- a/services/SettingsUI/AutoFillForm/AutoFillFormComposeView.h
+++ b/services/SettingsUI/AutoFillForm/AutoFillFormComposeView.h
@@ -72,6 +72,7 @@ private:
static void __entry_clicked_cb(void* data, Evas_Object* obj, void* event_info);
static void __entry_clear_button_clicked_cb(void* data, Evas_Object* obj, void* event_info);
static void __editfield_changed_cb(void* data, Evas_Object* obj, void* event_info);
+ void hide_action_bar();
AutoFillFormItem *m_itemForCompose;
AutoFillFormManager *m_manager;
diff --git a/services/SettingsUI/AutoFillForm/AutoFillFormManager.cpp b/services/SettingsUI/AutoFillForm/AutoFillFormManager.cpp
index c3b4aba1..b6ad2fc7 100644
--- a/services/SettingsUI/AutoFillForm/AutoFillFormManager.cpp
+++ b/services/SettingsUI/AutoFillForm/AutoFillFormManager.cpp
@@ -55,9 +55,27 @@ AutoFillFormManager::~AutoFillFormManager(void)
void AutoFillFormManager::refreshListView()
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- loadEntireItemList();
- if (m_listView)
- m_listView->refreshView();
+ m_timer = ecore_timer_add(0.2, load_list_timer, this);
+// TODO: Delete above workaround and uncomment bellow when task is fixed.
+// http://165.213.149.170/jira/browse/TWF-471
+// http://165.213.149.170/jira/browse/TWF-541
+
+// loadEntireItemList();
+// if (m_listView)
+// m_listView->refreshView();
+}
+
+Eina_Bool AutoFillFormManager::load_list_timer(void *data)
+{
+ BROWSER_LOGD("[%s,%d]", __func__, __LINE__);
+ AutoFillFormManager * aff = static_cast<AutoFillFormManager*>(data);
+
+ aff->loadEntireItemList();
+ if (aff->m_listView)
+ aff->m_listView->refreshView();
+
+ ecore_timer_del(aff->m_timer);
+ return ECORE_CALLBACK_CANCEL;
}
std::vector<AutoFillFormItem *> AutoFillFormManager::loadEntireItemList(void)
diff --git a/services/SettingsUI/AutoFillForm/AutoFillFormManager.h b/services/SettingsUI/AutoFillForm/AutoFillFormManager.h
index dc260b84..f5d5db03 100644
--- a/services/SettingsUI/AutoFillForm/AutoFillFormManager.h
+++ b/services/SettingsUI/AutoFillForm/AutoFillFormManager.h
@@ -20,7 +20,7 @@
#include <string>
#include <vector>
#include <boost/signals2/signal.hpp>
-
+#include <Ecore.h>
#include <Elementary.h>
#include <Evas.h>
@@ -67,6 +67,8 @@ public:
void rotateLandscape();
void rotatePortrait();
+ static Eina_Bool load_list_timer(void *data);
+
boost::signals2::signal<void ()> listViewBackClicked;
/* test */
@@ -79,6 +81,7 @@ private:
AutoFillFormComposeView *m_composer;
AutoProfileDeleteView *m_deleteView;
Ewk_Context* m_ewkContext;
+ Ecore_Timer* m_timer;
};
}