diff options
author | Jisung Ahn <jcastle.ahn@samsung.com> | 2012-08-24 15:48:53 +0900 |
---|---|---|
committer | Jisung Ahn <jcastle.ahn@samsung.com> | 2012-08-24 15:48:53 +0900 |
commit | 67fe0ebbcd88616e6f7f673861c3ba82ff3e81d5 (patch) | |
tree | f96fbd6be56d2017910d0cb127699cf964f78d17 | |
parent | cb356b175d8f42d9fd7f613a39e8d1528d3560b5 (diff) | |
download | ug-image-viewer-efl-67fe0ebbcd88616e6f7f673861c3ba82ff3e81d5.tar.gz ug-image-viewer-efl-67fe0ebbcd88616e6f7f673861c3ba82ff3e81d5.tar.bz2 ug-image-viewer-efl-67fe0ebbcd88616e6f7f673861c3ba82ff3e81d5.zip |
support "file://" prefix
Change-Id: Iffdef64bd50c4c0f42a96e7b1466189f3f6545f9
-rwxr-xr-x | main/src/control/ivug-parameter.c | 15 |
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); } |