#define PACKAGEID "org.tizen.wallpaper-ui-service"
#endif
+typedef enum {
+ TIZEN_PROFILE_UNKNOWN = 0,
+ TIZEN_PROFILE_MOBILE = 0x1,
+ TIZEN_PROFILE_WEARABLE = 0x2,
+ TIZEN_PROFILE_TV = 0x4,
+ TIZEN_PROFILE_IVI = 0x8,
+ TIZEN_PROFILE_COMMON = 0x10,
+} tizen_profile_t;
+
+extern tizen_profile_t _get_tizen_profile();
+
+#define _MOBILE (_get_tizen_profile() == TIZEN_PROFILE_MOBILE)
+#define _COMMON (_get_tizen_profile() == TIZEN_PROFILE_COMMON)
+
/**
* @brief Enum for indicating type of selected image
*/
gic_for_main->func.del = _preview_grid_content_del;
/* Gallery icon */
- s_item = (Thumbnail *)calloc(1, sizeof(Thumbnail));
- if (s_item != NULL) {
- if (setting_type == WALLPAPER_TYPE_DEFAULT) {
- if (ad->last_preview_img_path != NULL) {
- s_item->path = strdup(ad->last_preview_img_path);
+ if (!_COMMON) {
+ s_item = (Thumbnail *)calloc(1, sizeof(Thumbnail));
+ if (s_item != NULL) {
+ if (setting_type == WALLPAPER_TYPE_DEFAULT) {
+ if (ad->last_preview_img_path != NULL) {
+ s_item->path = strdup(ad->last_preview_img_path);
+ } else {
+ char *iconPath = wallpaper_ui_service_get_icon_path("no_gallery_bg.png");
+ s_item->path = strdup(iconPath);
+ free(iconPath);
+ }
} else {
- char *iconPath = wallpaper_ui_service_get_icon_path("no_gallery_bg.png");
- s_item->path = strdup(iconPath);
- free(iconPath);
+ s_item->path = setting_value;
+ s_item->bSelected = EINA_TRUE;
+
+ edje_object_signal_emit(elm_layout_edje_get(s_item->content), "elm,focus_highlight,show", "app");
+ /*elm_object_signal_emit(ad->preview_layout, "show_preview", "preview_image"); */
}
- } else {
- s_item->path = setting_value;
- s_item->bSelected = EINA_TRUE;
- edje_object_signal_emit(elm_layout_edje_get(s_item->content), "elm,focus_highlight,show", "app");
- /*elm_object_signal_emit(ad->preview_layout, "show_preview", "preview_image"); */
+ s_item->type = WALLPAPER_TYPE_GALLERY;
+ s_item->index = index++;
+ s_item->item = elm_gengrid_item_append(ad->gengrid, gic_for_main, s_item, _gallery_clicked_cb, s_item);
+ s_item->title = strdup("IDS_LCKSCN_BODY_GALLERY");
+ elm_atspi_accessible_name_set(s_item->item, "IDS_LCKSCN_BODY_FROM_GALLERY");
+ elm_atspi_accessible_reading_info_type_set(s_item->item, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME);
+ elm_atspi_accessible_translation_domain_set(s_item->item, PKGNAME);
}
-
- s_item->type = WALLPAPER_TYPE_GALLERY;
- s_item->index = index++;
- s_item->item = elm_gengrid_item_append(ad->gengrid, gic_for_main, s_item, _gallery_clicked_cb, s_item);
- s_item->title = strdup("IDS_LCKSCN_BODY_GALLERY");
- elm_atspi_accessible_name_set(s_item->item, "IDS_LCKSCN_BODY_FROM_GALLERY");
- elm_atspi_accessible_reading_info_type_set(s_item->item, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME);
- elm_atspi_accessible_translation_domain_set(s_item->item, PKGNAME);
}
const char *defaultImageDir = wallpaper_ui_service_get_settings_wallpapers_path();
#include <Evas.h>
#include <vconf.h>
#include <system_settings.h>
+#include <system_info.h>
#include <media_content.h>
#include <fcntl.h>
#include <app_control_internal.h>
return MAX(w, h);
}
+tizen_profile_t _get_tizen_profile()
+{
+ static tizen_profile_t profile = TIZEN_PROFILE_UNKNOWN;
+ if (__builtin_expect(profile != TIZEN_PROFILE_UNKNOWN, 1))
+ return profile;
+
+ char *profileName;
+ system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
+ switch (*profileName) {
+ case 'm':
+ case 'M':
+ profile = TIZEN_PROFILE_MOBILE;
+ break;
+ case 'w':
+ case 'W':
+ profile = TIZEN_PROFILE_WEARABLE;
+ break;
+ case 't':
+ case 'T':
+ profile = TIZEN_PROFILE_TV;
+ break;
+ case 'i':
+ case 'I':
+ profile = TIZEN_PROFILE_IVI;
+ break;
+ default: // common or unknown ==> ALL ARE COMMON.
+ profile = TIZEN_PROFILE_COMMON;
+ }
+
+ free(profileName);
+ return profile;
+}
+
/* End of file */