TizenRefApp-6364 Modify GUI of "Do not disturb view" according to latest GUI 26/71926/1
authorDmytro Dragan <dm.dragan@samsung.com>
Fri, 27 May 2016 14:32:39 +0000 (17:32 +0300)
committerDmytro Dragan <dm.dragan@samsung.com>
Fri, 27 May 2016 14:32:39 +0000 (17:32 +0300)
Change-Id: I9c0eb1b80adb8407df556dfe37bf2ab3304af9ed
Signed-off-by: Dmytro Dragan <dm.dragan@samsung.com>
.cproject
Build/makefile
inc/common-efl.h
inc/do-not-disturb-efl.h
project_def.prop
res/edje/setting_notification.edc [new file with mode: 0644]
src/CMakeLists.txt
src/common-efl.c
src/do-not-disturb-efl.c [new file with mode: 0644]
src/main.c

index 0456644..f1f4d1f 100644 (file)
--- a/.cproject
+++ b/.cproject
                                                                <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.core.631121004" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/aul/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&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/system&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony-client&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ug-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/vconf&quot;"/>
                                                                <option id="sbi.gnu.c.compiler.option.frameworks_inc.core.1209485355" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/aul/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&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/system&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony-client&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ug-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/vconf&quot;"/>
                                                                <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.core.1144903584" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/aul/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&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/system&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony-client&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ug-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/vconf&quot;"/>
                                                                <option id="sbi.gnu.c.compiler.option.frameworks_inc.core.65484556" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/aul/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&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/system&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony-client&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ug-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/vconf&quot;"/>
                </scannerConfigBuildInfo>
        </storageModule>
        <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+       <storageModule moduleId="refreshScope"/>
 </cproject>
index 4e2d6c5..d8ca234 100644 (file)
@@ -17,7 +17,8 @@ PROJ_ROOT := $(call BSLASH2SLASH,$(PROJPATH))
 -include basedef.mk
 -include tooldef.mk
 -include flags.mk
--include prepost.mk
+# deprecated. use build_def.prop file instead
+#-include prepost.mk
 
 APPTYPE := $(type)
 
@@ -71,11 +72,11 @@ M_OPT = -MMD -MP -MF"$(@:%.o=%.d)"
 FUNC_C2O = $(patsubst %.c,$(OBJ_OUTPUT)/%.o,$(1))
 FUNC_CPP2O = $(patsubst %.cpp,$(OBJ_OUTPUT)/%.o,$(1))
 FUNC_EDC2EDJ = $(patsubst %.edc,$(OUTPUT_DIR)/%.edj,$(1))
-FUNC_PO2MO = $(patsubst %.po,$(OUTPUT_DIR)/res/locale/%/LC_MESSAGES/$(LOWER_APPNAME).mo,$(notdir $(1)))
+FUNC_PO2MO = $(patsubst %.po,$(OUTPUT_DIR)/res/locale/%/LC_MESSAGES/$(subst $(basename $(APPID)).,,$(APPID)).mo,$(notdir $(1)))
 
 
-C_OBJS := $(call FUNC_C2O,$(C_SRCS)) 
-CPP_OBJS := $(call FUNC_CPP2O,$(CPP_SRCS)) 
+C_OBJS := $(call FUNC_C2O,$(C_SRCS))
+CPP_OBJS := $(call FUNC_CPP2O,$(CPP_SRCS))
 OBJS := $(C_OBJS) $(CPP_OBJS)
 EDJ_FILES := $(call FUNC_EDC2EDJ,$(EDCS))
 MO_FILES := $(call FUNC_PO2MO,$(POS))
@@ -121,7 +122,7 @@ INCS := $(addprefix -I$(PROJ_ROOT)/,$(USER_INC_DIRS)) \
                $(addprefix -include$(PROJ_ROOT)/,$(USER_INC_FILES)) \
                $(addprefix -include,$(USER_INC_FILES_ABS))
 
-$(C_OBJS) : $(OBJ_OUTPUT)/%.o : $(PROJ_ROOT)/%.c $(PLATFORM_INCS_FILE)  
+$(C_OBJS) : $(OBJ_OUTPUT)/%.o : $(PROJ_ROOT)/%.c $(PLATFORM_INCS_FILE)
        @echo '  Building file: $<'
        @echo '  Invoking: C Compiler'
        @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D))
@@ -141,8 +142,8 @@ CPP_INCS := $(addprefix -I$(PROJ_ROOT)/,$(USER_CPP_INC_DIRS)) \
                $(addprefix -I,$(USER_CPP_INC_DIRS_ABS)) \
                $(addprefix -include$(PROJ_ROOT)/,$(USER_CPP_INC_FILES)) \
                $(addprefix -include,$(USER_CPP_INC_FILES_ABS))
-               
-$(CPP_OBJS) : $(OBJ_OUTPUT)/%.o : $(PROJ_ROOT)/%.cpp $(PLATFORM_INCS_FILE)  
+
+$(CPP_OBJS) : $(OBJ_OUTPUT)/%.o : $(PROJ_ROOT)/%.cpp $(PLATFORM_INCS_FILE)
        @echo '  Building file: $<'
        @echo '  Invoking: C++ Compiler'
        @$(MKDIR) $(MKDIR_OP) $(subst $(BSLASH),/,$(@D))
@@ -163,18 +164,18 @@ preproc : $(OBJ_OUTPUT)
 ifneq ($(strip $(PREBUILD_COMMAND)),)
 ifneq ($(strip $(PREBUILD_DESC)),)
        @echo $(PREBUILD_DESC)
-endif  
+endif
        @echo $(shell $(PREBUILD_COMMAND))
-endif  
+endif
 
 
 postproc :
 ifneq ($(strip $(POSTBUILD_COMMAND)),)
 ifneq ($(strip $(POSTBUILD_DESC)),)
        @echo $(POSTBUILD_DESC)
-endif  
+endif
        @echo $(shell $(POSTBUILD_COMMAND))
-endif  
+endif
 
 ifneq ($(strip $(PLATFORM_INCS)),)
 $(PLATFORM_INCS_FILE) : $(OBJ_OUTPUT)
@@ -186,7 +187,7 @@ ifneq ($(findstring 3.82,$(MAKE_VERSION)),)
        $(file > $@,$(PLATFORM_INCS))
 else
        @echo $(PLATFORM_INCS) > $@
-endif   
+endif
 endif
 endif
 
@@ -226,7 +227,7 @@ ifneq ($$(strip $(8)),)
 EDC_$(1)_COMPILER_FLAGS += $$(addprefix -fd ,$$($(8)))
 endif
 
-$$(EDJ_FILES) : $$(OUTPUT_DIR)/%.edj : $$(PROJ_ROOT)/%.edc 
+$$(EDJ_FILES) : $$(OUTPUT_DIR)/%.edj : $$(PROJ_ROOT)/%.edc
        @echo '  Building file: $$<'
        @echo '  Invoking: EDC Resource Compiler'
        @$$(MKDIR) $$(MKDIR_OP) $$(subst $$(BSLASH),/,$$(@D))
index 6661122..849ce53 100755 (executable)
@@ -80,6 +80,8 @@ enum {
 Evas_Object *create_layout(Evas_Object *parent);
 Evas_Object *create_background(Evas_Object *parent);
 Evas_Object *create_naviframe(Evas_Object *parent);
+Evas_Object* create_icon(Evas_Object *parent, char* icon_path);
+Evas_Object* create_custom_layout(Evas_Object *parent, char* group_name);
 
 void gl_loaded_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED);
 void gl_realized_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info);
@@ -94,6 +96,7 @@ void append_gl_group_index(Evas_Object *genlist, char* text);
 void append_gl_item_list(Evas_Object *genlist, Eina_List* list, int style);
 void append_gl_start_option(Evas_Object *genlist, char *style, char *ugName);
 Elm_Widget_Item *append_gl_allow_all(Evas_Object *genlist);
+void append_gl_full_item(Evas_Object *genlist, Evas_Object *(*fullContentCb)(Evas_Object* parent, void *data), void *cbData);
 
 
 void back_button_cb(void *data, Evas_Object *obj, void *event_info);
index aa0f068..e2b0e10 100755 (executable)
@@ -29,5 +29,6 @@
 
 
 void do_not_disturb_append_item_in_list(Evas_Object* genlist);
+Evas_Object *do_not_disturb_allowed_apps_cont_cb(Evas_Object* parent, void *data);
 
 #endif //__DO_NOT_DISTURB_EFL_H__
index 72afb9e..309b5a9 100644 (file)
@@ -9,13 +9,14 @@ type = app
 profile = mobile-3.0
 
 # C Sources
-USER_SRCS = src/excepted-apps-efl.c src/pkgmgr-setting-info.c src/notification-setting-info.c src/main.c src/common-efl.c 
+USER_SRCS = src/excepted-apps-efl.c src/pkgmgr-setting-info.c src/notification-setting-info.c src/main.c src/do-not-disturb-efl.c src/common-efl.c 
+USER_SRCS_ABS = 
 
 # EDC Sources
 USER_EDCS =  
 
 # PO Sources
-USER_POS = res/po/bn.po res/po/is.po res/po/ja_JP.po res/po/gu.po res/po/bg.po res/po/si.po res/po/gl.po res/po/pt_PT.po res/po/pl.po res/po/es_US.po res/po/mk.po res/po/ar.po res/po/uk.po res/po/fi.po res/po/lt.po res/po/ko_KR.po res/po/en.po res/po/et.po res/po/ta.po res/po/hr.po res/po/en_US.po res/po/fa.po res/po/ru_RU.po res/po/el_GR.po res/po/it_IT.po res/po/nl.po res/po/hu.po res/po/te.po res/po/he.po res/po/zh_TW.po res/po/kk.po res/po/eu.po res/po/ca.po res/po/cs.po res/po/fr_CA.po res/po/az.po res/po/fr.po res/po/ro.po res/po/sv.po res/po/ga.po res/po/ka.po res/po/sl.po res/po/pt_BR.po res/po/zh_HK.po res/po/uz.po res/po/ml.po res/po/hi.po res/po/kn.po res/po/tr_TR.po res/po/ur.po res/po/en_PH.po res/po/sk.po res/po/lv.po res/po/sr.po res/po/es_ES.po res/po/zh_CN.po res/po/hy.po res/po/nb.po res/po/th.po res/po/da.po res/po/de.po 
+USER_POS = res/po/bn.po res/po/is.po res/po/gu.po res/po/ja_JP.po res/po/bg.po res/po/si.po res/po/gl.po res/po/pt_PT.po res/po/pl.po res/po/es_US.po res/po/mk.po res/po/ar.po res/po/fi.po res/po/uk.po res/po/lt.po res/po/ko_KR.po res/po/en.po res/po/et.po res/po/ta.po res/po/hr.po res/po/en_US.po res/po/fa.po res/po/ru_RU.po res/po/el_GR.po res/po/it_IT.po res/po/nl.po res/po/hu.po res/po/te.po res/po/he.po res/po/zh_TW.po res/po/kk.po res/po/eu.po res/po/ca.po res/po/cs.po res/po/fr_CA.po res/po/az.po res/po/fr.po res/po/ro.po res/po/sv.po res/po/ga.po res/po/ka.po res/po/sl.po res/po/pt_BR.po res/po/uz.po res/po/zh_HK.po res/po/ml.po res/po/hi.po res/po/kn.po res/po/tr_TR.po res/po/ur.po res/po/en_PH.po res/po/sk.po res/po/lv.po res/po/sr.po res/po/es_ES.po res/po/zh_CN.po res/po/hy.po res/po/nb.po res/po/th.po res/po/da.po res/po/de.po 
 
 # User Defines
 USER_DEFS = 
@@ -49,15 +50,23 @@ USER_LIB_DIRS =
 USER_LIB_DIRS_ABS = 
 
 # EDC Resource Path
-USER_EDCS_IMAGE_DIRS = 
+USER_EDCS_IMAGE_DIRS = edje/images 
 USER_EDCS_IMAGE_DIRS_ABS = 
-USER_EDCS_SOUND_DIRS = 
+USER_EDCS_SOUND_DIRS = edje/sounds 
 USER_EDCS_SOUND_DIRS_ABS = 
-USER_EDCS_FONT_DIRS = 
+USER_EDCS_FONT_DIRS = edje/fonts 
 USER_EDCS_FONT_DIRS_ABS = 
 
 # EDC Flags
-USER_EXT_EDC_KEYS = 
+USER_EXT_EDC_KEYS = EDC0 
+
+USER_EXT_EDC0_EDCS = res/edje/setting_notification.edc 
+USER_EXT_EDC0_EDCS_IMAGE_DIRS = edje/images 
+USER_EXT_EDC0_EDCS_IMAGE_DIRS_ABS = 
+USER_EXT_EDC0_EDCS_SOUND_DIRS = edje/sounds 
+USER_EXT_EDC0_EDCS_SOUND_DIRS_ABS = 
+USER_EXT_EDC0_EDCS_FONT_DIRS = edje/fonts 
+USER_EXT_EDC0_EDCS_FONT_DIRS_ABS = 
 
 # Resource Filter
 USER_RES_INCLUDE = 
diff --git a/res/edje/setting_notification.edc b/res/edje/setting_notification.edc
new file mode 100644 (file)
index 0000000..f420c02
--- /dev/null
@@ -0,0 +1,233 @@
+#define ALLOWED_APP_BG_H 191
+#define ALLOWED_APP_BG_W 98
+#define ALLOWED_APP_ICON_H 98
+#define ALLOWED_APP_ICON_W 98
+#define ALLOWED_APP_CENTER_PAD 13
+#define ALLOWED_APP_TEXT_OVER 40
+#define SIDE_PAD_W 32
+#define HEADER_TEXT_H 64
+#define SELECT_BUTTON_HOR_PAD_H 14
+#define SELECT_BUTTON_H 52
+#define SELECT_BUTTON_W 135
+#define GRID_PAD_H 15
+collections {
+   base_scale: 2.6;
+   styles {
+      style { name: "text_style";
+         base: "font=Samsungcondenced:style=Regular font_size=30 text_class=tizen align=center valign=top color=#000000 ellipsis=-1 wrap=mixed linesize=40";
+      }
+      style { name: "header_text_style";
+         base: "color=#3296A6FF font=Tizen:style=Regular font_size=32 text_class=tizen ellipsis=1.0";
+      }
+   }
+   group { name: "allow_noti_from_layout";
+      parts {
+         part { name: "bg";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               align: 0.5 0.5;
+               fixed: 0 0;
+               min: 0 0;
+               rel1.relative: 0.0 0.0;
+               rel2.relative: 1.0 1.0;
+            }
+         }
+         part { name: "elm.swallow.bg";
+            type: SWALLOW;
+            scale: 1;
+            mouse_events: 1;
+            description { state: "default" 0.0;
+               align: 0.5 0.5;
+               fixed: 0 0;
+               min: 0 0;
+               visible: 1;
+               rel1.to: "bg";
+               rel1.relative: 0.0 0.0;
+               rel2.to: "bg";
+               rel2.relative: 1.0 1.0;
+            }
+         }
+         part { name: "pad.side.left";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               align: 0.0 0.5;
+               fixed: 0 0;
+               min: SIDE_PAD_W 0;
+               max: SIDE_PAD_W -1;
+               rel1.to: "bg";
+               rel1.relative: 0.0 0.0;
+               rel2.to: "bg";
+               rel2.relative: 0.0 1.0;
+            }
+         }
+         part { name: "pad.side.right";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               fixed: 0 0;
+               min: SIDE_PAD_W 0;
+               max: SIDE_PAD_W -1;
+               rel1.to: "bg";
+               rel1.relative: 1.0 0.0;
+               rel2.to: "bg";
+               rel2.relative: 1.0 1.0;
+            }
+         }
+         part { name: "elm.text";
+            type: TEXTBLOCK;
+            scale: 1;
+            description { state: "default" 0.0;
+               align: 0.5 0.0;
+               fixed: 0 0;
+               min: 0 HEADER_TEXT_H;
+               max: -1 HEADER_TEXT_H;
+               visible: 1;
+               text.style: "header_text_style";
+               rel1.to: "pad.side.left";
+               rel1.relative: 1.0 0.0;
+               rel2.to: "pad.side.right";
+               rel2.relative: 0.0 0.0;
+            }
+         }
+         part { name: "pad.sel.top";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               align: 0.5 0.0;
+               fixed: 0 0;
+               min: 0 SELECT_BUTTON_HOR_PAD_H;
+               max: -1 SELECT_BUTTON_HOR_PAD_H;
+               rel1.to: "elm.text";
+               rel1.relative: 0.0 1.0;
+               rel2.to: "elm.text";
+               rel2.relative: 1.0 1.0;
+            }
+         }
+         part { name: "button";
+            type: SWALLOW;
+            scale: 1;
+            mouse_events: 1;
+            description { state: "default" 0.0;
+               align: 1.0 0.0;
+               fixed: 0 0;
+               min: SELECT_BUTTON_W SELECT_BUTTON_H;
+               max: SELECT_BUTTON_W SELECT_BUTTON_H;
+               visible: 1;
+               rel1.to: "pad.sel.top";
+               rel1.relative: 1.0 1.0;
+               rel2.to: "pad.side.right";
+               rel2.relative: 0.0 0.0;
+            }
+         }
+         part { name: "pad.sel.bottom";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               align: 0.5 0.0;
+               fixed: 0 0;
+               min: 0 SELECT_BUTTON_HOR_PAD_H;
+               max: -1 SELECT_BUTTON_HOR_PAD_H;
+               rel1.to_y: "button";
+               rel1.to_x: "pad.side.left";
+               rel1.relative: 1.0 1.0;
+               rel2.to: "pad.side.right";
+               rel2.relative: 0.0 1.0;
+            }
+         }
+         part { name: "pad.grid.top";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               align: 0.5 0.0;
+               fixed: 0 0;
+               min: 0 GRID_PAD_H;
+               max: -1 GRID_PAD_H;
+               rel1.to: "pad.sel.bottom";
+               rel1.relative: 0.0 1.0;
+               rel2.to: "pad.side.right";
+               rel2.relative: 0.0 1.0;
+            }
+         }
+         part { name: "grid";
+            type: SWALLOW;
+            scale: 1;
+            mouse_events: 1;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               fixed: 0 0;
+               min: 0 0;
+               visible: 1;
+               rel1.to: "pad.grid.top";
+               rel1.relative: 0.0 1.0;
+               rel2.to: "pad.grid.top";
+               rel2.relative: 0.0 1.0;
+            }
+         }
+      }
+   }
+   group { name: "allowed_app_layout";
+      parts {
+         part { name: "bg";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               align: 0.5 0.5;
+               fixed: 0 0;
+               min: (ALLOWED_APP_BG_W + ALLOWED_APP_TEXT_OVER) ALLOWED_APP_BG_H;
+               max: (ALLOWED_APP_BG_W + ALLOWED_APP_TEXT_OVER) ALLOWED_APP_BG_H;
+               rel1.relative: 0.0 0.0;
+               rel2.relative: 1.0 1.0;
+            }
+         }
+         part { name: "icon";
+            type: SWALLOW;
+            scale: 1;
+            mouse_events: 1;
+            description { state: "default" 0.0;
+               align: 0.5 0.0;
+               fixed: 0 0;
+               min: ALLOWED_APP_ICON_W ALLOWED_APP_ICON_H;
+               max: ALLOWED_APP_ICON_W ALLOWED_APP_ICON_H;
+               visible: 1;
+               rel1.to: "bg";
+               rel1.relative: 0.0 0.0;
+               rel2.to_x: "bg";
+               rel2.relative: 1.0 1.0;
+            }
+         }
+         part { name: "icon_text_padding";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               fixed: 0 0;
+               min: 0 ALLOWED_APP_CENTER_PAD;
+               max: -1 ALLOWED_APP_CENTER_PAD;
+               rel1.to: "icon";
+               rel1.relative: 0.0 1.0;
+               rel2.to_x: "bg";
+               rel2.relative: 1.0 1.0;
+            }
+         }
+         part { name: "text";
+            type: TEXTBLOCK;
+            scale: 1;
+            multiline: 1;
+            description { state: "default" 0.0;
+               rel1.to_y: "icon_text_padding";
+               rel1.relative: 0.0 1.0;
+               rel2.to_y: "bg";
+               rel2.relative: 1.0 0.0;
+               align: 0.5 0.0;
+               min: 0 0;
+               max: (ALLOWED_APP_BG_W + ALLOWED_APP_TEXT_OVER) 80;
+               text.style: "text_style";
+               text.min: 0 1;
+            }
+         }
+      }
+   }
+}
\ No newline at end of file
index 39bf3c9..3d2d147 100644 (file)
@@ -12,6 +12,7 @@ SET(SRCS
        main.c
        notification-setting-info.c
     pkgmgr-setting-info.c
+    do-not-disturb-efl.c
 )
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/inc/)
index a707554..12b39bf 100755 (executable)
@@ -123,7 +123,7 @@ void gl_del_cb(void *data, Evas_Object *obj EINA_UNUSED)
 {
 }
 
-static Evas_Object* _create_icon(Evas_Object *parent, char* icon)
+Evas_Object* create_icon(Evas_Object *parent, char* icon)
 {
        Evas_Object *img = elm_image_add(parent);
 
@@ -143,6 +143,21 @@ static Evas_Object* _create_icon(Evas_Object *parent, char* icon)
 
 }
 
+Evas_Object* create_custom_layout(Evas_Object *parent, char* group_name)
+{
+    Evas_Object *layout = create_layout(parent);
+    char edj_path[PATH_MAX] = {0, };
+
+    char* res_path = app_get_resource_path();
+    if (res_path) {
+        snprintf(edj_path, PATH_MAX, "%s%s", res_path, "edje/setting_notification.edj");
+        free(res_path);
+    }
+
+    elm_layout_file_set(layout, edj_path, group_name);
+    return layout;
+}
+
 static char *gl_group_index_text_get_cb(void *data, Evas_Object *obj, const char *part)
 {
        char *text = (char*)data;
@@ -229,7 +244,7 @@ static Evas_Object* gl_content_get_cb(void *data, Evas_Object *obj, const char *
 
        item_info_s *data_list = data;
        if (!strcmp(part, "elm.swallow.icon") || !strcmp(part, "elm.icon.left") ) {
-               Evas_Object *icon = _create_icon(obj, data_list->icon);
+               Evas_Object *icon = create_icon(obj, data_list->icon);
                evas_object_show(icon);
                return icon;
        }
@@ -436,3 +451,54 @@ void back_button_cb(void *data, Evas_Object *obj, void *event_info)
        ret_if(!data);
        elm_naviframe_item_pop(data);
 }
+
+typedef struct
+{
+        Evas_Object *(*fullContentCb)(Evas_Object* parent, void *data);
+        void *cbData;
+} full_content_data_s;
+
+static Evas_Object* _gl_full_content_get_cb(void *data, Evas_Object *obj, const char *part)
+{
+    retv_if(!data, NULL);
+    full_content_data_s *content_data = (full_content_data_s *)data;
+    if (!strcmp(part, "elm.swallow.content")) {
+        if(content_data->fullContentCb)
+            return content_data->fullContentCb(obj, content_data->cbData);
+    }
+    return NULL;
+}
+
+static void _gl_full_content_del_cb(void *data, Evas_Object *obj)
+{
+    ret_if(!data);
+    free(data);
+}
+
+void append_gl_full_item(Evas_Object *genlist, Evas_Object *(*fullContentCb)(Evas_Object* parent, void *data), void *cbData)
+{
+    Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new();
+    ret_if(!itc);
+
+    full_content_data_s *data = calloc(1, sizeof(full_content_data_s));
+    if(!data)
+    {
+        elm_genlist_item_class_free(itc);
+        return;
+    }
+    data->fullContentCb = fullContentCb;
+    data->cbData = cbData;
+    itc->item_style = "full";
+    itc->func.content_get = _gl_full_content_get_cb;
+    itc->func.del = _gl_full_content_del_cb;
+
+    Elm_Object_Item *genlist_item = elm_genlist_item_append(genlist,                        /* genlist object */
+                            itc,                            /* item class */
+                            data,                         /* item class user data */
+                            NULL,                           /* parent item */
+                            ELM_GENLIST_ITEM_NONE,          /* item type */
+                            gl_selected_cb,                 /* select smart callback */
+                            NULL);                      /* smart callback user data */
+    elm_genlist_item_select_mode_set(genlist_item, ELM_OBJECT_SELECT_MODE_NONE);
+    elm_genlist_item_class_free(itc);
+}
diff --git a/src/do-not-disturb-efl.c b/src/do-not-disturb-efl.c
new file mode 100644 (file)
index 0000000..ba65382
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2009 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "do-not-disturb-efl.h"
+#include "excepted-apps-efl.h"
+#include "common-efl.h"
+
+#define ALLOWED_LAYOUT_NAME "allow_noti_from_layout"
+#define ALLOWED_LAYOUT_TEXT_PART "elm.text"
+#define ALLOWED_LAYOUT_BUTTON_PART "button"
+#define ALLOWED_LAYOUT_GRID_PART "grid"
+
+#define APP_LAYOUT_NAME "allowed_app_layout"
+#define APP_LAYOUT_ICON_PART "icon"
+#define APP_LAYOUT_TEXT_PART "text"
+#define APP_LAYOUT_HEIGHT 191
+#define APP_LAYOUT_PAD 30
+#define APP_LAYOUT_HEADER 95 + 64
+#define ITEMS_PER_ROW 5
+
+extern ug_data g_ug_data;
+
+void do_not_disturb_append_item_in_list(Evas_Object* genlist)
+{
+    append_gl_start_option(genlist, "multiline", "do-not-disturb");
+    append_gl_full_item(genlist, do_not_disturb_allowed_apps_cont_cb, get_excepted_apps_list());
+}
+
+Evas_Object *do_not_disturb_allowed_apps_cont_cb(Evas_Object* parent, void *data)
+{
+    Evas_Object *full_layout = create_custom_layout(parent, ALLOWED_LAYOUT_NAME);
+    elm_object_part_text_set(full_layout, ALLOWED_LAYOUT_TEXT_PART, APP_STRING("IDS_QP_HEADER_ALLOW_NOTIFICATIONS_FROM_ABB"));
+
+    Evas_Object *select_button = elm_button_add(full_layout);
+    evas_object_size_hint_weight_set(select_button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(select_button, EVAS_HINT_FILL, EVAS_HINT_FILL);
+    elm_object_text_set(select_button, APP_STRING("IDS_ST_SK_SELECT_LITE"));
+    evas_object_smart_callback_add(select_button, "clicked", exception_application_clicked_cb, &g_ug_data);
+    evas_object_show(select_button);
+
+    elm_object_part_content_set(full_layout, ALLOWED_LAYOUT_BUTTON_PART,select_button);
+
+    retv_if(!data, full_layout);
+    Eina_List *allowed_apps_list = (Eina_List *)data;
+    Evas_Object *table = elm_table_add(full_layout);
+    elm_table_padding_set(table, 0, APP_LAYOUT_PAD);
+    int count = eina_list_count(allowed_apps_list);
+
+    int height = (APP_LAYOUT_HEIGHT + APP_LAYOUT_PAD) * (count / ITEMS_PER_ROW + (count % ITEMS_PER_ROW != 0 ? 1 : 0)) + APP_LAYOUT_HEADER;
+    evas_object_size_hint_min_set(table, 0, height);
+
+    int row_number = 0;
+    while(allowed_apps_list)
+    {
+        int items_in_row = 0;
+        while(allowed_apps_list && items_in_row < ITEMS_PER_ROW)
+        {
+            item_info_s *item = (item_info_s*)eina_list_data_get(allowed_apps_list);
+            Evas_Object *app_layout = create_custom_layout(table, APP_LAYOUT_NAME);
+
+            evas_object_show(app_layout);
+            Evas_Object *icon = create_icon(app_layout, item->icon);
+            evas_object_show(icon);
+            elm_object_part_content_set(app_layout, APP_LAYOUT_ICON_PART,icon);
+            elm_object_part_text_set(app_layout, APP_LAYOUT_TEXT_PART,item->name);
+            elm_table_pack(table, app_layout, items_in_row, row_number, 1, 1);
+
+            allowed_apps_list = eina_list_next(allowed_apps_list);
+            items_in_row++;
+        }
+        row_number++;
+    }
+
+    elm_object_part_content_set(full_layout, ALLOWED_LAYOUT_GRID_PART,table);
+
+    return full_layout;
+}
+
index 12eb0a2..a5b9951 100755 (executable)
@@ -73,13 +73,6 @@ static Eina_Bool _notifiacation_setting_main_pop_cb(void *data, Elm_Object_Item
        return EINA_FALSE;
 }
 
-void do_not_disturb_append_item_in_list(Evas_Object* genlist)
-{      
-       append_gl_start_option(genlist, "multiline", "do-not-disturb");
-       append_gl_group_index(genlist, APP_STRING("IDS_ST_HEADER_EXCLUDED_APPS_ABB"));
-       append_gl_item_list(genlist, get_excepted_apps_list(), ITEM_STYLE_ONE_ICON);
-}
-
 static Evas_Object* _create_do_not_disturb_gl(ug_data *ugd)
 {
        Evas_Object *parent = ugd->naviframe;
@@ -144,23 +137,6 @@ static void _create_do_not_disturb_view(void *data)
        /* Push to naviframe */
        ugd->navi_item = elm_naviframe_item_push(ugd->naviframe, APP_STRING("IDS_ST_HEADER_DO_NOT_DISTURB_ABB"), back_btn, NULL, ugd->list_main, NULL);
        elm_naviframe_item_pop_cb_set(ugd->navi_item, _notifiacation_setting_main_pop_cb, ugd);
-
-       /* Bottom Button */
-       Evas_Object *bottom_box = elm_box_add(ugd->naviframe);
-       evas_object_size_hint_weight_set(bottom_box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_size_hint_align_set(bottom_box, EVAS_HINT_FILL, EVAS_HINT_FILL);
-       elm_box_horizontal_set(bottom_box, EINA_TRUE);
-       evas_object_show(bottom_box);
-
-       Evas_Object *bottom_button = elm_button_add(bottom_box);
-       evas_object_show(bottom_button);
-       elm_object_style_set(bottom_button, "bottom");
-       evas_object_size_hint_weight_set(bottom_button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_size_hint_align_set(bottom_button, EVAS_HINT_FILL, 0.5);
-       elm_object_translatable_text_set(bottom_button, APP_STRING("IDS_ST_BUTTON_MANAGE_EXCLUDED_APPS_ABB"));
-       evas_object_smart_callback_add(bottom_button, "clicked", exception_application_clicked_cb, ugd);
-       elm_object_item_part_content_set(ugd->navi_item, "toolbar", bottom_box);
-       elm_box_pack_start(bottom_box, bottom_button);
 }
 
 static void _create_notif_view(void *data)
@@ -211,6 +187,7 @@ static bool on_create(void *priv)
 {
        NOTISET_DBG("START");
        ug_data *ugd = priv;
+       elm_app_base_scale_set(2.6);
 
        /* Create window */
        ugd->win = _create_win();