summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJisung Ahn <jcastle.ahn@samsung.com>2012-08-24 06:48:53 (GMT)
committerJisung Ahn <jcastle.ahn@samsung.com>2012-08-24 06:48:53 (GMT)
commit67fe0ebbcd88616e6f7f673861c3ba82ff3e81d5 (patch)
treef96fbd6be56d2017910d0cb127699cf964f78d17
parentcb356b175d8f42d9fd7f613a39e8d1528d3560b5 (diff)
downloadug-image-viewer-efl-67fe0ebbcd88616e6f7f673861c3ba82ff3e81d5.zip
ug-image-viewer-efl-67fe0ebbcd88616e6f7f673861c3ba82ff3e81d5.tar.gz
ug-image-viewer-efl-67fe0ebbcd88616e6f7f673861c3ba82ff3e81d5.tar.bz2
support "file://" prefix
Change-Id: Iffdef64bd50c4c0f42a96e7b1466189f3f6545f9
-rwxr-xr-xmain/src/control/ivug-parameter.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/main/src/control/ivug-parameter.c b/main/src/control/ivug-parameter.c
index 5bc94c7..ae5232e 100755
--- a/main/src/control/ivug-parameter.c
+++ b/main/src/control/ivug-parameter.c
@@ -54,7 +54,9 @@
//default values
#define IVUG_DEFAULT_MODE IVUG_MODE_SINGLE
-#define IVUG_DEFAULT_INDEX (1) // First item
+#define IVUG_DEFAULT_INDEX (1) // First item
+
+#define IVUG_FILE_PREFIX "file://"
static inline
void _ivug_free(char **val)
@@ -355,8 +357,15 @@ ivug_param_create_from_bundle(service_h service)
service_get_extra_data (service, IVUG_BUNDLE_KEY_PATH, &szFilePath);
if ( szFilePath != NULL )
- {
- data->filepath = strdup(szFilePath);
+ {
+ if(strncmp(IVUG_FILE_PREFIX, szFilePath, strlen(IVUG_FILE_PREFIX)) == 0)
+ {
+ data->filepath = strdup(szFilePath + strlen(IVUG_FILE_PREFIX));
+ }
+ else
+ {
+ data->filepath = strdup(szFilePath);
+ }
MSG_IVUG_HIGH("Current File = %s", data->filepath);
_ivug_free(&szFilePath);
}