Added Gallery Widget for ABS Build 85/73085/1
authorbhutani.92 <bhutani.92@samsung.com>
Mon, 6 Jun 2016 11:49:31 +0000 (17:19 +0530)
committerbhutani.92 <bhutani.92@samsung.com>
Mon, 6 Jun 2016 11:49:31 +0000 (17:19 +0530)
Change-Id: If2d7b29104c8fe132766b88139d87c072d6cb751
Signed-off-by: bhutani.92 <bhutani.92@samsung.com>
.cproject
.project
widget/inc/gl_widget_debug.h
widget/res/preview_gallery_4x4.png [deleted file]
widget/shared/res/preview_gallery_4x4.png [new file with mode: 0644]
widget/src/gl_widget_create.c
widget/src/gl_widget_main.c
widget/tizen-manifest.xml

index 3856160be86987b4d14fa80a8df78bf90ddd7da2..9c78f4313b9d1235e202a55ddca31b2890e05b9d 100644 (file)
--- a/.cproject
+++ b/.cproject
@@ -38,6 +38,7 @@
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/chromium-ewk&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
@@ -95,6 +96,7 @@
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/service-adaptor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/chromium-ewk&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/service-adaptor&quot;"/>
                                                        <tool id="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib.1455957378" name="Archive Generator" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib"/>
                                                        <tool id="org.tizen.nativecore.tool.sbi.po.compiler.1467013362" name="PO Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.po.compiler"/>
                                                        <tool id="org.tizen.nativecore.tool.sbi.edc.compiler.626098173" name="EDC Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.edc.compiler">
-                                                               <option id="sbi.gnu.edc.compiler.option.misc.id.1317882362" name="Image Path (-id)" superClass="sbi.gnu.edc.compiler.option.misc.id" valueType="stringList">
+                                                               <option command="-id " id="sbi.gnu.edc.compiler.option.misc.id.1317882362" name="Image Path (-id)" superClass="sbi.gnu.edc.compiler.option.misc.id" valueType="stringList">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/edje/images&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/res/edje/images}&quot;"/>
                                                                </option>
-                                                               <option id="sbi.gnu.edc.compiler.option.misc.sd.1377446978" name="Sound Path (-sd)" superClass="sbi.gnu.edc.compiler.option.misc.sd" valueType="stringList">
+                                                               <option command="-sd " id="sbi.gnu.edc.compiler.option.misc.sd.1377446978" name="Sound Path (-sd)" superClass="sbi.gnu.edc.compiler.option.misc.sd" valueType="stringList">
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/edje/sounds&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/res/edje/sounds}&quot;"/>
                                                                </option>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/chromium-ewk&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/service-adaptor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/chromium-ewk&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/service-adaptor&quot;"/>
index 9d3b143ccc3eca01fa5b1f4d572feb908a0797f2..6abbe405fd673f6dad9c678274c498307e2ad171 100644 (file)
--- a/.project
+++ b/.project
@@ -32,7 +32,7 @@
        </natures>
        <filteredResources>
                <filter>
-                       <id>0</id>
+                       <id>1465204573885</id>
                        <name></name>
                        <type>26</type>
                        <matcher>
@@ -41,7 +41,7 @@
                        </matcher>
                </filter>
                <filter>
-                       <id>0</id>
+                       <id>1465204573892</id>
                        <name></name>
                        <type>6</type>
                        <matcher>
index a7eacb7cff48874a77d493bb1367cfc36016a13f..9b8bd7c0c2f09244f4bd3e16dfc4d0529e1fdb3e 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef GL_WIDGET_DEBUG_H
 #define GL_WIDGET_DEBUG_H
 
+#define LOG_TAG "GALLERY_WIDGET_APP"
+
 #if !defined(FLOG)
 #define DbgPrint(fmt, arg...)  dlog_print(DLOG_DEBUG, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
 #define ErrPrint(fmt, arg...)  dlog_print(DLOG_ERROR, LOG_TAG, "[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
diff --git a/widget/res/preview_gallery_4x4.png b/widget/res/preview_gallery_4x4.png
deleted file mode 100644 (file)
index d15566d..0000000
Binary files a/widget/res/preview_gallery_4x4.png and /dev/null differ
diff --git a/widget/shared/res/preview_gallery_4x4.png b/widget/shared/res/preview_gallery_4x4.png
new file mode 100644 (file)
index 0000000..d15566d
Binary files /dev/null and b/widget/shared/res/preview_gallery_4x4.png differ
index d7bf5fd18a23f9aee7e7b3294cfb5f03564c2c19..a036df75d0e3f44d4fac6fef1952b33f4dce1675 100644 (file)
@@ -33,7 +33,7 @@
 #define TIMER_INTERVAL 5
 #define WIDGET_HEIGHT 500
 #define WIDGET_WIDTH 500
-#define EDJE_FILE "edje/gallerywidget.edj"
+#define EDJE_FILE "gallerywidget.edj"
 #define GL_WIDGET_ARGV_IV_VIEW_BY              "View By"
 #define GL_WIDGET_ARGV_IV_VIEW_BY_FOLER        "By Folder"
 #define GL_WIDGET_ARGV_IV_PATH "Path"
@@ -699,8 +699,17 @@ void _gl_widget_create_edit_btn(_widget_data* widget_data)
                                                 EVAS_HINT_EXPAND);
                evas_object_size_hint_align_set(layoutButton, EVAS_HINT_FILL,
                                                EVAS_HINT_FILL);
+               char path[1024];
+               char *res_path = app_get_resource_path();
+               if (!res_path) {
+                       DbgPrint("Resource path not found");
+                       return;
+               }
+               DbgPrint("Resource path : %s", res_path);
+               snprintf(path, 1024, "%s%s", res_path, EDJE_FILE);
+               DbgPrint("path : %s", path);
                elm_layout_file_set(layoutButton,
-                                   "/usr/apps/org.tizen.gallery/res/edje/gallerywidget.edj",
+                               path,
                                    "today_button");
                elm_object_domain_translatable_part_text_set(layoutButton, "elm.text",
                        "gallery", "IDS_QP_ACBUTTON_EDIT_ABB");
@@ -835,8 +844,17 @@ int gl_widget_create(_widget_data *widget_data, int w, int h)
                return -1;
        }
 
+       char path[1024];
+       char *res_path = app_get_resource_path();
+       if (!res_path) {
+               DbgPrint("Resource path not found");
+               return -1;
+       }
+       DbgPrint("Resource path : %s", res_path);
+       snprintf(path, 1024, "%s%s", res_path, EDJE_FILE);
+       DbgPrint("path : %s", path);
        elm_layout_file_set(layout,
-                           "/usr/apps/org.tizen.gallery/res/edje/gallerywidget.edj",
+                           path,
                            "widget_custom_main");
        evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_resize(layout, WIDGET_WIDTH, WIDGET_HEIGHT);
@@ -864,7 +882,8 @@ int gl_widget_create(_widget_data *widget_data, int w, int h)
                                                layout);
        }
 
-       evas_object_resize(layout, w, h);
+//     evas_object_resize(layout, w, h);
+       elm_win_resize_object_add(widget_data->win, layout);
        evas_object_event_callback_add(widget_data->win, EVAS_CALLBACK_KEY_DOWN,
                                       gl_widget_key_down_cb, NULL);
 
index eaf307c8bdf2cd6c16c2a8fd1624070853309e56..1402fc5b210351c10f2c7dafc0c1fbd582853fe6 100644 (file)
@@ -24,7 +24,6 @@
 #include <widget_service.h>
 #include <widget_app.h>
 #include <widget_app_efl.h>
-
 #include <media_content.h>
 
 #include "gl_widget_debug.h"
@@ -53,7 +52,16 @@ int widget_Create(widget_context_h context, bundle *content, int w, int h, void
                DbgPrint("failed to create instance");
                return WIDGET_ERROR_OUT_OF_MEMORY;
        }
-       bindtextdomain(PACKAGE, "/usr/apps/org.tizen.gallery/res/locale");
+       char locale_path[1024];
+       char *res_path = app_get_resource_path();
+       if (!res_path) {
+               DbgPrint("Resource path not found");
+               return -1;
+       }
+       DbgPrint("Resource path : %s", res_path);
+       snprintf(locale_path, 1024, "%s%s", res_path, "locale");
+       DbgPrint("Locale path : %s", locale_path);
+       bindtextdomain(PACKAGE, locale_path);
 
        widget_data->win = win;
 
@@ -131,7 +139,6 @@ int widget_Resume(widget_context_h context, void *data)
 int widget_Resize(widget_context_h context, int w, int h, void *data)
 {
        struct widget_data *widget_data = NULL;
-
        widget_data = (struct widget_data *)getWidgetData(context);
        if (!widget_data) {
                return WIDGET_ERROR_INVALID_PARAMETER;
@@ -176,7 +183,7 @@ widget_class_h app_create(void *data)
                                     &app_language_changed, data);
        widget_app_add_event_handler(&region_changed_handler, APP_EVENT_REGION_FORMAT_CHANGED,
                                     &app_region_changed, data);
-
+//     elm_app_base_scale_set(1.8);
        widget_instance_lifecycle_callback_s ops;
        ops.create = widget_Create;
        ops.destroy = widget_Destroy;
index 94ed47b9f3386b327140c6459ade9334c6291c73..863492fe82305048b7b25853e5731e3a9e1167ca 100644 (file)
@@ -1,8 +1,60 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.gallery-widget" version="1.0.0">
+<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.gallery" version="2.0.0">
     <profile name="mobile"/>
-    <ui-application appid="org.tizen.gallery-widget" exec="gallery-widget" launch_mode="single" multiple="false" nodisplay="false" taskmanage="true" type="capp">
-        <label>widget</label>
-        <icon>org.tizen.gallery.png</icon>
-    </ui-application>
+    <widget-application appid="org.tizen.gallery.widget" exec="gallery-widget" hw-acceleration="on" main="true" update-period="0">
+        <label>Gallery</label>
+        <label xml:lang="az-az">Qalereya</label>
+        <label xml:lang="eu-es">Galeria</label>
+        <label xml:lang="bg-bg">Галерия</label>
+        <label xml:lang="ca-es">Galeria</label>
+        <label xml:lang="zh-cn">相册</label>
+        <label xml:lang="zh-hk">媒體瀏覽器</label>
+        <label xml:lang="zh-tw">媒體瀏覽器</label>
+        <label xml:lang="hr-hr">Album</label>
+        <label xml:lang="cs-cz">Galerie</label>
+        <label xml:lang="da-dk">Galleri</label>
+        <label xml:lang="nl-nl">Galerij</label>
+        <label xml:lang="en-gb">Gallery</label>
+        <label xml:lang="en-us">Gallery</label>
+        <label xml:lang="et-ee">Galerii</label>
+        <label xml:lang="fi-fi">Galleria</label>
+        <label xml:lang="fr-fr">Galerie</label>
+        <label xml:lang="gl-es">Galería</label>
+        <label xml:lang="ka-ge">გალერეა</label>
+        <label xml:lang="de-de">Galerie</label>
+        <label xml:lang="el-gr">Συλλογή</label>
+        <label xml:lang="hu-hu">Galéria</label>
+        <label xml:lang="is-is">Gallerí</label>
+        <label xml:lang="ga-ie">Gailearaí</label>
+        <label xml:lang="it-it">Galleria</label>
+        <label xml:lang="ja-jp">ギャラリー</label>
+        <label xml:lang="kk-kz">Галерея</label>
+        <label xml:lang="ko-kr">갤러리</label>
+        <label xml:lang="lv-lv">Galerija</label>
+        <label xml:lang="lt-lt">Galerija</label>
+        <label xml:lang="mk-mk">Галерија</label>
+        <label xml:lang="nb-no">Galleri</label>
+        <label xml:lang="pl-pl">Galeria</label>
+        <label xml:lang="pt-pt">Galeria</label>
+        <label xml:lang="pt-br">Galeria</label>
+        <label xml:lang="ro-ro">Galerie</label>
+        <label xml:lang="ru-ru">Галерея</label>
+        <label xml:lang="sr-rs">Galerija</label>
+        <label xml:lang="sk-sk">Galéria</label>
+        <label xml:lang="sl-si">Galerija</label>
+        <label xml:lang="es-es">Galería</label>
+        <label xml:lang="es-us">Galería</label>
+        <label xml:lang="sv-se">Galleri</label>
+        <label xml:lang="tr-tr">Galeri</label>
+        <label xml:lang="uk-ua">Галерея</label>
+        <label xml:lang="uz-uz">Galereya</label>
+        <label xml:lang="ar-ae">ﺎﺴﺗﻭﺪﻳﻭ</label>
+        <label xml:lang="zh-sg">画廊</label>
+        <label xml:lang="hi-in">गैलरी</label>
+        <label xml:lang="en-ph">Gallery</label>
+        <label xml:lang="fr-ca">Galerie</label>
+        <label xml:lang="ko-kr">앱DBox</label>
+        <icon>preview_gallery_4x4.png</icon>
+        <support-size preview="preview_gallery_4x4.png">4x4</support-size>
+    </widget-application>
 </manifest>