From: hyunuktak Date: Fri, 11 Mar 2016 05:57:14 +0000 (+0900) Subject: Modified directory path by tizen platform config X-Git-Tag: submit/tizen/20160314.024633^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7fb36e7be5e9c0a338593d89fb063167613de39e;hp=d7814f8916728f46159d7921486973badc17dc6f;p=platform%2Fcore%2Fconnectivity%2Fnet-popup.git Modified directory path by tizen platform config Change-Id: I4e72f49edc02ef86117f51aef4d0a63ab8997dcc Signed-off-by: hyunuktak --- diff --git a/packaging/net.netpopup.spec b/packaging/net.netpopup.spec index 4b2fe6a..46ac8aa 100644 --- a/packaging/net.netpopup.spec +++ b/packaging/net.netpopup.spec @@ -1,6 +1,6 @@ Name: net.netpopup Summary: Network Notification Popup applicationa -Version: 0.2.80 +Version: 0.2.81 Release: 1 Group: App/Network License: Flora-1.1 diff --git a/src/net-popup.c b/src/net-popup.c index dde51df..ad6c1f0 100755 --- a/src/net-popup.c +++ b/src/net-popup.c @@ -33,24 +33,25 @@ #include #include #include +#include #include "net-popup.h" #include "net-popup-strings.h" #define LOCALEDIR "/usr/share/locale" -#define NETPOPUP_EDJ "/usr/ug/res/edje/net-popup/netpopup-custom.edj" -#define QP_PRELOAD_NOTI_ICON_PATH "/usr/apps/org.tizen.quickpanel/shared/res/noti_icons/Wi-Fi" +#define NETPOPUP_EDJ tzplatform_mkpath(TZ_SYS_RO_UG, "/res/edje/net-popup/netpopup-custom.edj") +#define QP_PRELOAD_NOTI_ICON_PATH tzplatform_mkpath(TZ_SYS_RO_APP, "/org.tizen.quickpanel/shared/res/noti_icons/Wi-Fi") #define NETCONFIG_NOTIFICATION_WIFI_ICON \ - "/usr/share/icons/noti_wifi_in_range.png" + tzplatform_mkpath(TZ_SYS_RO_ICONS, "/noti_wifi_in_range.png") #define NETCONFIG_NOTIFICATION_WIFI_ICON_LITE \ - "/usr/share/icons/noti_wifi_in_range_ongoing.png" + tzplatform_mkpath(TZ_SYS_RO_ICONS, "/noti_wifi_in_range_ongoing.png") #define NETCONFIG_NOTIFICATION_WIFI_CAPTIVE_ICON \ - "/usr/share/icons/B03_notify_Wi-fi_range.png" + tzplatform_mkpath(TZ_SYS_RO_ICONS, "/B03_notify_Wi-fi_range.png") #define NETCONFIG_NOTIFICATION_WIFI_IN_RANGE_ICON \ - "/usr/share/icons/Q02_Notification_wifi_in_range.png" + tzplatform_mkpath(TZ_SYS_RO_ICONS, "/Q02_Notification_wifi_in_range.png") #define NETCONFIG_NOTIFICATION_WIFI_IN_RANGE_ICON_LITE \ - "/usr/share/icons/noti_wifi_in_range.png" + tzplatform_mkpath(TZ_SYS_RO_ICONS, "/noti_wifi_in_range.png") #define NETCONFIG_NOTIFICATION_WIFI_FOUND_TITLE \ dgettext(PACKAGE, "IDS_COM_BODY_WI_FI_NETWORKS_AVAILABLE") #define NETCONFIG_NOTIFICATION_WIFI_FOUND_CONTENT \ @@ -60,6 +61,7 @@ #define NETCONFIG_NOTIFICATION_WIFI_PORTAL_CONTENT "\"%s\"" #define USER_RESP_LEN 30 +#define ICON_PATH_LEN 128 #define RESP_REMAIN_CONNECTED "RESP_REMAIN_CONNECTED" #define RESP_WIFI_TETHERING_OFF "RESP_TETHERING_TYPE_WIFI_OFF" #define RESP_WIFI_AP_TETHERING_OFF "RESP_TETHERING_TYPE_WIFI_AP_OFF" @@ -738,6 +740,7 @@ static int __net_popup_show_popup(app_control_h request, void *data) static void __net_popup_add_found_ap_noti(void) { int ret = 0, noti_flags = 0; + char icon_path[ICON_PATH_LEN]; notification_h noti = NULL; notification_list_h noti_list = NULL; notification_error_e noti_err = NOTIFICATION_ERROR_NONE; @@ -762,8 +765,8 @@ static void __net_popup_add_found_ap_noti(void) goto error; } - noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, - QP_PRELOAD_NOTI_ICON_PATH"/noti_wifi_in_range.png"); + g_snprintf(icon_path, sizeof(icon_path), "%s%s", QP_PRELOAD_NOTI_ICON_PATH, "/noti_wifi_in_range.png"); + noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, icon_path); if(noti_err != NOTIFICATION_ERROR_NONE) { log_print(NET_POPUP, "Failed to notification_set_image : %d", noti_err); goto error; @@ -856,6 +859,7 @@ static void __net_popup_add_portal_noti(app_control_h request) int ret = 0; int noti_flags = 0; char *ap_name = NULL; + char icon_path[ICON_PATH_LEN]; notification_h noti = NULL; app_control_h service_handle = NULL; notification_list_h noti_list = NULL; @@ -899,8 +903,8 @@ static void __net_popup_add_portal_noti(app_control_h request) goto error; } - noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, - QP_PRELOAD_NOTI_ICON_PATH"/noti_wifi_in_range.png"); + g_snprintf(icon_path, sizeof(icon_path), "%s%s", QP_PRELOAD_NOTI_ICON_PATH, "/noti_wifi_in_range.png"); + noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, icon_path); if(noti_err != NOTIFICATION_ERROR_NONE) { log_print(NET_POPUP, "fail to notification_set_image : %d", noti_err); goto error;