INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
capi-appfw-application isf elementary
-efl-extension dlog capi-ui-inputmethod-manager
+efl-extension dlog capi-ui-inputmethod-manager capi-appfw-package-manager
)
FOREACH(flag ${pkgs_CFLAGS})
}
#endif
+void im_setting_list_popup_view_del(void *data)
+{
+ appdata *ad = (appdata *)data;
+ if (!ad || !ad->win)
+ return;
+
+ if (ad->popup) {
+ evas_object_del(ad->popup);
+ }
+ ad->popup = NULL;
+
+ if (ad->naviframe) {
+ elm_naviframe_item_pop(ad->naviframe);
+ }
+}
+
void
im_setting_list_popup_view_create(void *data)
{
#include <Elementary.h>
void im_setting_list_popup_view_create(void *data);
+void im_setting_list_popup_view_del(void *data);
#endif /* __INPUTMETHOD_SETTING_LIST_POPUP_VIEW_H */
#include <algorithm>
#include <tzplatform_config.h>
#include <inputmethod_manager.h>
+#include <package_manager.h>
+
#include "isf_control.h"
#define IM_SETTING_LIST_PACKAGE PACKAGE
static int g_active_ime_index = -1;
static list_item_text item_text[2];
static std::vector<gen_item_data> g_gen_item_data;
+static package_manager_h pkgmgr = NULL;
void im_setting_list_update_window(void *data);
elm_genlist_item_class_free(itc_im_list_title);
itc_im_list_title = NULL;
}
+
+ if (pkgmgr) {
+ package_manager_destroy(pkgmgr);
+ pkgmgr = NULL;
+ }
}
void im_setting_list_update_window(void *data)
im_setting_list_add_ime(ad);
}
+static void _package_manager_event_cb(const char *type, const char *package, package_manager_event_type_e event_type, package_manager_event_state_e event_state, int progress, package_manager_error_e error, void *user_data)
+{
+ appdata *ad = (appdata *)user_data;
+
+ if (!package || !type)
+ return;
+
+ if (event_state != PACKAGE_MANAGER_EVENT_STATE_COMPLETED)
+ return;
+
+ if (event_type == PACKAGE_MANAGER_EVENT_TYPE_INSTALL ||
+ event_type == PACKAGE_MANAGER_EVENT_TYPE_UNINSTALL ||
+ event_type == PACKAGE_MANAGER_EVENT_TYPE_UPDATE) {
+ LOGD("PACKAGE_MANAGER_EVENT type : %d", event_type);
+ /* Wait for updating IME package list in ISF */
+ usleep(20000);
+ im_setting_list_popup_view_del(ad);
+ im_setting_list_popup_view_create(ad);
+ }
+}
+
void
im_setting_list_app_create(void *data)
{
im_setting_list_bg_create(ad->win);
im_setting_list_load_ime_info();
+ if (!pkgmgr) {
+ int ret = package_manager_create(&pkgmgr);
+ if (ret == PACKAGE_MANAGER_ERROR_NONE) {
+ ret = package_manager_set_event_cb(pkgmgr, _package_manager_event_cb, ad);
+ if (ret == PACKAGE_MANAGER_ERROR_NONE) {
+ LOGD("package_manager_set_event_cb succeeded.\n");
+ } else {
+ LOGD("package_manager_set_event_cb failed(%d)\n", ret);
+ }
+ } else {
+ LOGD("package_manager_create failed(%d)\n", ret);
+ }
+ }
+
im_setting_list_list_create(ad);
evas_object_show(ad->win);
}
<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.inputmethod-setting" version="0.5.23" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.inputmethod-setting" version="0.5.24" install-location="internal-only">
<label>Keyboard setting</label>
<author email="shoum.chen@samsung.com" href="www.samsung.com">Shuoming Chen</author>
<description>Keyboard setting Application</description>
<privileges>
<privilege>http://tizen.org/privilege/appmanager.launch</privilege>
<privilege>http://tizen.org/privilege/imemanager</privilege>
+ <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
+ <privilege>http://tizen.org/privilege/packagemanager.install</privilege>
</privileges>
</manifest>
Name: org.tizen.inputmethod-setting
Summary: Input Method Setting Application
-Version: 0.5.23
+Version: 0.5.24
Release: 1
Group: Graphics & UI Framework/Input
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: gettext-tools
+BuildRequires: cmake
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(isf)
BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(dlog)
-BuildRequires: cmake
-BuildRequires: efl-extension-devel
+BuildRequires: pkgconfig(efl-extension)
BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: pkgconfig(capi-ui-inputmethod-manager)
+BuildRequires: pkgconfig(capi-appfw-package-manager)
Requires: %{name}-compat = %{version}-%{release}
# This if/endif is for GBM build optimization. This usage does not affect
# The unified build (profile is undefined) as it will return TRUE always.
CXXFLAGS="$CXXFLAGSBASE -D_MOBILE"
pushd build_mobile
-cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
+%cmake .. -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
-DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
-DTZ_SYS_RO_ICONS=%TZ_SYS_RO_ICONS
make %{?jobs:-j%jobs}
CFLAGS="$CFLAGSBASE -D_WEARABLE"
CXXFLAGS="$CXXFLAGSBASE -D_WEARABLE"
pushd build_wearable_rectangle
-cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
+%cmake .. -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
-DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
-DTZ_SYS_RO_ICONS=%TZ_SYS_RO_ICONS
make %{?jobs:-j%jobs}
CFLAGS="$CFLAGSBASE -D_WEARABLE -D_CIRCLE"
CXXFLAGS="$CXXFLAGSBASE -D_WEARABLE -D_CIRCLE"
pushd build_wearable_circle
-cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
+%cmake .. -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
-DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
-DTZ_SYS_RO_ICONS=%TZ_SYS_RO_ICONS
make %{?jobs:-j%jobs}
%if "%{?profile}"!="mobile" && "%{?profile}"!="wearable"
CFLAGS="$CFLAGSBASE"
CXXFLAGS="$CXXFLAGSBASE"
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
+%cmake . -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
-DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
-DTZ_SYS_RO_ICONS=%TZ_SYS_RO_ICONS
make %{?jobs:-j%jobs}