From: Hyunjee Kim Date: Mon, 17 Jun 2013 07:04:18 +0000 (+0900) Subject: Fix the notification for STMS X-Git-Tag: submit/tizen_2.2/20130714.151952~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d7bf7de8ee8a37378fc1cbb5967a20de26fdf83f;p=framework%2Fconnectivity%2Fmobileap-agent.git Fix the notification for STMS Change-Id: I224dca1a58878e0bb62d0ad36c9c4709ffaf15f4 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 45b36e4..86d7f34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ MESSAGE("Build type: ${CMAKE_BUILD_TYPE}") INCLUDE_DIRECTORIES(${INCLUDE_DIR}) INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs REQUIRED dlog dbus-glib-1 pmapi vconf notification libssl secure-storage capi-network-connection capi-network-bluetooth ${PRIVATE_REQUIRED_PKGS}) +pkg_check_modules(pkgs REQUIRED dlog dbus-glib-1 pmapi vconf notification libssl secure-storage capi-network-connection capi-network-bluetooth appcore-common ${PRIVATE_REQUIRED_PKGS}) FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) diff --git a/include/mobileap_common.h b/include/mobileap_common.h index 5760577..ab1e549 100644 --- a/include/mobileap_common.h +++ b/include/mobileap_common.h @@ -22,10 +22,6 @@ #include "mobileap_agent.h" -/* Need translation */ -#define MH_NOTI_STR "Connected device (%d)" -#define MH_NOTI_TITLE "Tethering" - gint _slist_find_station_by_interface(gconstpointer a, gconstpointer b); gint _slist_find_station_by_mac(gconstpointer a, gconstpointer b); gint _slist_find_station_by_ip_addr(gconstpointer a, gconstpointer b); diff --git a/include/mobileap_notification.h b/include/mobileap_notification.h index 77adfae..b457aa8 100644 --- a/include/mobileap_notification.h +++ b/include/mobileap_notification.h @@ -23,6 +23,18 @@ #define MH_NOTI_STR_MAX 50 #define MH_NOTI_ICON_PATH "/usr/ug/res/images/ug-setting-mobileap-efl/tethering.png" +#define MOBILEAP_LOCALE_COMMON_PKG "ug-setting-mobileap-efl" +#define MOBILEAP_LOCALE_COMMON_RES "/usr/ug/res/locale" + +#define _(str) dgettext(MOBILEAP_LOCALE_COMMON_PKG, str) + +#define MH_NOTI_STR _("IDS_MOBILEAP_POP_CONNECTED_DEVICES_C_PD") +#define MH_NOTI_TITLE _("IDS_MOBILEAP_BODY_TETHERING") +#define MH_NOTI_TIMEOUT_STR _("IDS_MOBILEAP_BODY_TAP_TO_CONFIGURE_TETHERING") +#define MH_NOTI_TIMEOUT_TITLE "Disable tethering by timeout" +#define MH_NOTI_BT_VISIBILITY_STR _("IDS_ST_BODY_BLUETOOTH_VISIBILITY_HAS_TIMED_OUT_YOUR_DEVICE_MIGHT_NOT_BE_FOUND") + + int _create_timeout_noti(const char *content, const char *title, const char *icon_path); int _delete_timeout_noti(void); diff --git a/packaging/mobileap-agent.spec b/packaging/mobileap-agent.spec index 0d0f3ec..21b6595 100644 --- a/packaging/mobileap-agent.spec +++ b/packaging/mobileap-agent.spec @@ -1,6 +1,6 @@ Name: mobileap-agent Summary: Mobile AP daemon for setting tethering environments -Version: 0.1.91 +Version: 0.1.92 Release: 1 Group: TO_BE/FILLED_IN License: Apache-2.0 @@ -16,6 +16,7 @@ BuildRequires: pkgconfig(libssl) BuildRequires: pkgconfig(secure-storage) BuildRequires: pkgconfig(capi-network-connection) BuildRequires: pkgconfig(capi-network-bluetooth) +BuildRequires: pkgconfig(appcore-common) BuildRequires: cmake Requires(post): /usr/bin/vconftool Requires: iptables diff --git a/src/mobileap_bluetooth.c b/src/mobileap_bluetooth.c index 38eceee..077f18a 100644 --- a/src/mobileap_bluetooth.c +++ b/src/mobileap_bluetooth.c @@ -256,7 +256,7 @@ static void __bt_adapter_state_changed(int result, bt_adapter_state_e adapter_st } else { ret = bt_adapter_get_visibility(&mode, &duration); if (ret == BT_ERROR_NONE && mode == BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE) - _create_status_noti("Bluetooth visible time is off. You may not find your device."); + _create_status_noti(MH_NOTI_BT_VISIBILITY_STR); } ret = __activate_bt_nap(obj); @@ -372,7 +372,7 @@ mobile_ap_error_code_e _enable_bt_tethering(TetheringObject *obj, } else { bt_ret = bt_adapter_get_visibility(&mode, &duration); if (bt_ret == BT_ERROR_NONE && mode == BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE) - _create_status_noti("Bluetooth visible time is off. You may not find your device."); + _create_status_noti(MH_NOTI_BT_VISIBILITY_STR); } diff --git a/src/mobileap_handler.c b/src/mobileap_handler.c index 0799cd5..c48e676 100644 --- a/src/mobileap_handler.c +++ b/src/mobileap_handler.c @@ -27,9 +27,6 @@ #include "mobileap_usb.h" #include "mobileap_notification.h" -/* Need translation */ -#define MH_NOTI_TIMEOUT_STR "Tap for setting" -#define MH_NOTI_TIMEOUT_TITLE "Disable tethering by timeout" typedef struct { guint src_id; diff --git a/src/mobileap_main.c b/src/mobileap_main.c index b7b14a2..421e8f7 100644 --- a/src/mobileap_main.c +++ b/src/mobileap_main.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "mobileap_agent.h" #include "mobileap_handler.h" @@ -35,6 +36,7 @@ #include "mobileap_wifi.h" #include "mobileap_usb.h" #include "mobileap_network.h" +#include "mobileap_notification.h" GType tethering_object_get_type(void); #define TETHERING_TYPE_OBJECT (tethering_object_get_type()) @@ -555,6 +557,9 @@ int main(int argc, char **argv) g_type_init(); #endif + if (appcore_set_i18n(MOBILEAP_LOCALE_COMMON_PKG, MOBILEAP_LOCALE_COMMON_RES) < 0) + goto failure; + if (vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_MODE, &mobileap_vconf_key)) { ERR("vconf_get_int FAIL\n"); mobileap_state = MOBILE_AP_STATE_NONE;