src/settings/modules/gps.c
src/settings/modules/wifi.c
src/settings/modules/sound-profile.c
- src/settings/settings_view_all.c
src/settings/settings_icon_common.c
src/settings/settings_gridbox.c
src/settings/settings_view_featured.c
src/page/pager.c
src/page/page_base.c
src/page/pager_common.c
- src/page/page_setting_all.c
src/quickpanel-ui.c
src/common.c
src/list_util.c
- src/quickpanel_debug_util.c
)
extern Evas_Object *quickpanel_page_base_create(Evas_Object *parent, void *data);
extern Evas_Object *quickpanel_page_base_view_get(const char *view_name);
-extern void quickpanel_page_base_focus_allow_set(Eina_Bool is_enable);
extern void quickpanel_page_secured_lock_set(qp_secured_lock_state_e state);
extern void quickpanel_page_secured_lock_text_set(void);
+++ /dev/null
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __QUICKPANEL_PAGE_SETTING_ALL_H__
-#define __QUICKPANEL_PAGE_SETTING_ALL_H__
-
-
-extern Evas_Object *quickpanel_page_setting_all_create(Evas_Object *parent, void *data);
-extern Evas_Object *quickpanel_page_setting_all_view_get(const char *view_name);
-extern void quickpanel_page_setting_all_view_set(const char *view_name, Evas_Object *view);
-extern void quickpanel_page_setting_all_freeze_set(Eina_Bool is_freeze);
-extern Eina_Bool quickpanel_page_setting_all_is_page_showed(void);
-extern void quickpanel_page_setting_all_focus_allow_set(Eina_Bool is_enable);
-
-#endif
extern Evas_Object *quickpanel_pager_view_get(const char *view_name);
extern int quickpanel_pager_current_page_get(void);
extern void quickpanel_pager_page_set(int page_index, int need_resize);
-extern void quickpanel_pager_mapbuf_set(int is_enable);
#endif
+++ /dev/null
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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.
- */
-
-
-
-#ifndef __QUICKPANEL_DEBUG_UTIL_H_
-#define __QUICKPANEL_DEBUG_UTIL_H_
-
-extern void debug_printf(char *fmt, ...);
-
-#endif /* __QUICKPANEL_DEBUG_UTIL_H_ */
+++ /dev/null
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __SETTING_VIEW_ALL_H__
-#define __SETTING_VIEW_ALL_H__
-
-extern void qp_setting_view_all_reload(Eina_List *list_all_module);
-extern void quickpanel_setting_view_all_reload(Eina_List *list_all_module);
-
-#endif /* __SETTING_VIEW_ALL_H__ */
BuildRequires: pkgconfig(edje)
BuildRequires: pkgconfig(icu-i18n)
BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(syspopup-caller)
BuildRequires: pkgconfig(bundle)
BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(syspopup-caller)
signal: "quickpanel.setting.show";
source: "quickpanel.prog";
target: "qp.base.rect.setting";
- target: "qp.base.setting.swallow";
}
program {
name: "setting.hide";
signal: "quickpanel.setting.hide";
source: "quickpanel.prog";
target: "qp.base.rect.setting";
- target: "qp.base.setting.swallow";
}
program {
name: "voice_icon.show";
description {
state: "default" 0.0;
min: 0 (3 + 30 + 3);
- fixed: 0 1;
+ fixed: 1 1;
align: 1.0 0.5;
rel1 {
relative : 0.0 0.5;
action: STATE_SET "disabled" 0.0;
target: "rect.button.clear_all";
target: "text.button.clear_all";
- target: "noti.clear.all.separator";
- target: "focus";
}
}
}
+++ /dev/null
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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 "../../inc/quickpanel_def.h"
-#include "color_classes.edc"
-
-#define SETTING_ALL_BG_COLOR "AO001"
-#define SETTING_ALL_SECTION_TEXT_COLOR "ATO006"
-
- group {
- name: "quickpanel/page_setting_all_base";
- parts {
- part {
- name: "background";
- type: SPACER;
- scale: 1;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- min: QP_WIN_W (QP_WIN_H - QP_DATE_H - QP_HANDLE_H);
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: QP_WIN_H (QP_WIN_W - QP_DATE_H - QP_HANDLE_H);
- }
- }
- part{
- name: "object.layout";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "background";}
- rel2 {to: "background";}
- align: 0.0 0.0;
- visible:1;
- }
- }
- }
- programs {
- program{
- name: "portrait";
- signal: "portrait";
- source: "prog";
- action: STATE_SET "portrait" 0.0;
- target: "background";
- }
- program{
- name: "landscape";
- signal: "landscape";
- source: "prog";
- action: STATE_SET "landscape" 0.0;
- target: "background";
- }
- }
- }
- group {
- name: "quickpanel/page_setting_all";
- parts {
- part {
- name: "background";
- type: RECT;
- scale: 1;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- min: QP_WIN_W (QP_WIN_H - QP_DATE_H - QP_HANDLE_H);
- visible: 1;
- color_class: SETTING_ALL_BG_COLOR;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: QP_WIN_H (QP_WIN_W - QP_DATE_H - QP_HANDLE_H);
- }
- }
- part {
- name: "rect.active.buttons";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 356;
- rel1 {
- relative: 0.0 0.0;
- to_x: "background";
- to_y: "background";
- }
- rel2 {
- relative: 1.0 0.0;
- to_x: "background";
- to_y: "background";
- }
- align: 0.0 0.0;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: 0 183;
- }
- }
- part{
- name: "object.active.buttons";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "rect.active.buttons";}
- rel2 {to: "rect.active.buttons";}
- visible:1;
- }
- }
- }
-
- programs {
- program{
- name: "portrait";
- signal: "portrait";
- source: "prog";
- action: STATE_SET "portrait" 0.0;
- target: "background";
- target: "rect.active.buttons";
- }
- program{
- name: "landscape";
- signal: "landscape";
- source: "prog";
- action: STATE_SET "landscape" 0.0;
- target: "background";
- target: "rect.active.buttons";
- }
- }
- }
action: STATE_SET "portrait" 0.0;
target: "setting.margin.left";
target: "setting.margin.right";
- target: "setting.container.swallow.wvga";
after: "background.default";
}
program {
action: STATE_SET "landscape" 0.0;
target: "setting.margin.left";
target: "setting.margin.right";
- target: "setting.container.swallow.wvga";
target: "background";
}
}
state: "default" 0.0;
min : QP_SETTING_ICON_BG_MIN_W_P_WVGA QP_SETTING_ICON_MIN_WH_WVGA;
max : QP_SETTING_ICON_BG_MIN_W_P_WVGA QP_SETTING_ICON_MIN_WH_WVGA;
+ fixed : 1 1;
rel1 {
relative : 0.0 1.0;
to: "padding.top";
repeat_events: 1;
description {
state: "default" 0.0;
+ fixed: 1 1;
min: QP_SETTING_ICON_MIN_WH_WVGA QP_SETTING_ICON_MIN_WH_WVGA;
max: QP_SETTING_ICON_MIN_WH_WVGA QP_SETTING_ICON_MIN_WH_WVGA;
description {
state: "default" 0.0;
min: 66 66;
+ fixed: 1 1;
rel1 {
relative: 0.5 0.5;
to: "icon.bg";
set_int(invert_on, 0);
}
public thumb_down() {
- if (get_int(invert_on) == 0) {
- set_state(PART:"level", "pressed", 0.0);
- set_state(PART:"level2", "pressed", 0.0);
- }
if (get_int(popup_show) == 1) {
emit("popup,show", "elm");
}
* limitations under the License.
*/
-#include <stdio.h>
#include <Elementary.h>
*/
-#include <stdio.h>
#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
+
#include <Elementary.h>
#include <app_manager.h>
evas_object_size_hint_weight_set(eo, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(eo, EVAS_HINT_FILL, EVAS_HINT_FILL);
- if (is_just_load == 1) {
+ if (is_just_load == 1)
elm_win_resize_object_add(parent, eo);
- }
+
+
evas_object_show(eo);
return eo;
char *info = NULL;
if (system_info_get_platform_string(SYSTEM_INFO_KEY_MODEL, &info) == 0) {
- if (info == NULL) {
+ if (info == NULL)
return 0;
- }
- if (!strncmp(QP_EMUL_STR, info, strlen(info))) {
+
+
+ if (!strncmp(QP_EMUL_STR, info, strlen(info)))
is_emul = 1;
- }
+
}
free(info);
height = (height % 2 != 0) ? height + 1 : height;
- if (ad->angle == 90 || ad->angle == 270) {
+ if (ad->angle == 90 || ad->angle == 270)
evas_object_resize(obj, ad->win_height, height * ad->scale);
- } else {
+ else
evas_object_resize(obj, ad->win_width, height * ad->scale);
- }
+
}
HAPI void quickpanel_uic_open_quickpanel(int reason)
int ret = 0;
ret = tzsh_quickpanel_service_hide(ad->quickpanel_service);
- if (ret != 0) {
+ if (ret != 0)
ERR("failed tzsh_quickpanel_service_hide");
- }
+
ret = appcore_flush_memory();
- if (ret != 0) {
+ if (ret != 0)
ERR("failed appcore_flush_memory");
- }
+
}
static Eina_Bool _quickpanel_close_timer_cb(void *data)
{
- if (_close_timer != NULL) {
+ if (_close_timer != NULL)
_close_timer = NULL;
- }
+
+
_quickpanel_close();
return ECORE_CALLBACK_CANCEL;
if (vconf_get_int(VCONFKEY_IDLE_LOCK_STATE, &is_lock_launched) == 0) {
if (is_lock_launched == VCONFKEY_IDLE_LOCK) {
ret = vconf_set_int(VCONFKEY_IDLE_LOCK_STATE, VCONFKEY_IDLE_UNLOCK);
- if (ret == 0) {
+ if (ret == 0)
ERR("unlock the lockscreen from quickpanel");
- } else {
+ else
ERR("failed to unlock the lockscreen from quickpanel");
- }
+
}
}
}
if (is_delay_needed) {
- if (_close_timer == NULL) {
+ if (_close_timer == NULL)
_close_timer = ecore_timer_add(DEL_TIMER_VALUE, _quickpanel_close_timer_cb, NULL);
- }
+
+
} else {
_quickpanel_close();
}
#include "settings_view_featured.h"
#include "preference.h"
#include "setting_utils.h"
-#include "page_setting_all.h"
#ifdef QP_SCREENREADER_ENABLE
#include "accessibility.h"
*/
static void _frame_focused(void *data, Evas_Object * obj, void *event_info)
{
- quickpanel_page_setting_all_focus_allow_set(EINA_FALSE);
+ DBG("");
}
static void _frame_unfocused(void *data, Evas_Object * obj, void *event_info)
{
- quickpanel_page_setting_all_focus_allow_set(EINA_TRUE);
+ DBG("");
}
+
static void _brightness_view_pos_set()
{
struct appdata *ad = quickpanel_get_app_data();
return;
}
- if (visible == EINA_FALSE) {
+ if (visible == EINA_FALSE)
elm_object_signal_emit(layout, "qp.handler.text,hide", "qp.handler.text");
- } else {
+ else
elm_object_signal_emit(layout, "qp.handler.text,show", "qp.handler.text");
- }
+
}
freezed_count = elm_object_scroll_freeze_get(viewer);
- if (freezed_count <= 0) {
+ if (freezed_count <= 0)
elm_object_scroll_freeze_push(viewer);
- }
+
}
freezed_count = elm_object_scroll_freeze_get(viewer);
- for (i = 0 ; i < freezed_count; i++) {
+ for (i = 0 ; i < freezed_count; i++)
elm_object_scroll_freeze_pop(viewer);
- }
+
}
item_type = (int*)evas_object_data_get(item, E_DATA_ITEM_LABEL_H);
- if(item_type != NULL)
+ if (item_type != NULL)
return (qp_item_type_e)*item_type;
return QP_ITEM_TYPE_NONE;
|| item_type == QP_ITEM_TYPE_NOTI) {
list_tmp = elm_box_children_get(obj);
if (list_tmp != NULL) {
- if (eina_list_count(list_tmp) != 0) {
+ if (eina_list_count(list_tmp) != 0)
evas_object_geometry_get(obj, NULL, NULL, NULL, &h);
- }
+
eina_list_free(list_tmp);
}
} else {
off_y += h;
h = 0;
- if (obj == first) {
+ if (obj == first)
break;
- }
+
}
}
evas_object_geometry_get(container, &x, &y, NULL, &h);
- if (off_y == 0 || y == 0) {
+ if (off_y == 0 || y == 0)
ERR("Failed get a valid height offset : %d %d", off_y, y);
- }
- if (coord_x != NULL) {
+
+ if (coord_x != NULL)
*coord_x = x;
- }
- if (coord_y != NULL) {
+
+
+ if (coord_y != NULL)
*coord_y = y + off_y;
- }
- if (item_list != NULL) {
+
+ if (item_list != NULL)
eina_list_free(item_list);
- }
+
}
Evas_Object *_list_util_get_first(Evas_Object *list, Evas_Object *new_obj)
EINA_LIST_FOREACH_SAFE(item_list, l, l_next, obj) {
if (obj != NULL) {
- if (_list_util_item_compare(obj, new_obj) > 0) {
+ if (_list_util_item_compare(obj, new_obj) > 0)
break;
- }
+
}
first = obj;
}
- if (item_list != NULL) {
+ if (item_list != NULL)
eina_list_free(item_list);
- }
+
return first;
}
quickpanel_vim_get_tweenmode(VI_OP_REORDER));
elm_transit_objects_final_state_keep_set(transit_layout, EINA_TRUE);
elm_transit_event_enabled_set(transit_layout, EINA_TRUE);
- if (transit != NULL) {
+ if (transit != NULL)
elm_transit_chain_transit_add(transit, transit_layout);
- } else {
+ else
elm_transit_go(transit_layout);
- }
+
}
}
}
- if (item_list != NULL) {
+ if (item_list != NULL)
eina_list_free(item_list);
- }
+
return transit_layout;
}
}
if (vi->item_type == QP_ITEM_TYPE_ONGOING_NOTI) {
- if (item_list != NULL) {
+ if (item_list != NULL)
eina_list_free(item_list);
- }
+
return;
}
}
}
- if (item_list != NULL) {
+ if (item_list != NULL)
eina_list_free(item_list);
- }
+
transit_fadein = elm_transit_add();
if (transit_fadein != NULL) {
quickpanel_vim_get_tweenmode(VI_OP_INSERT));
elm_transit_del_cb_set(transit_fadein, quickpanel_vi_done_cb_for_transit, vi);
- if (transit_layout != NULL) {
+ if (transit_layout != NULL)
elm_transit_chain_transit_add(transit_layout, transit_fadein);
- } else {
+ else
elm_transit_go(transit_fadein);
- }
+
} else {
- if (transit_layout != NULL) elm_transit_del(transit_layout);
+ if (transit_layout != NULL)
+ elm_transit_del(transit_layout);
+
quickpanel_vi_done(vi);
ERR("Failed to create all the transit");
}
evas_object_color_set(item, 255, 255, 255, 255);
- if (first == NULL) {
+ if (first == NULL)
elm_box_pack_start(container, item);
- } else {
+ else
elm_box_pack_after(container, item, first);
- }
+
}
static void _anim_job_delete(void *data)
}
}
- if (item_list != NULL) {
+ if (item_list != NULL)
eina_list_free(item_list);
- }
+
if (transit_layout != NULL) {
- elm_transit_del_cb_set(transit_layout, quickpanel_vi_done_cb_for_transit,
- vi);
+ elm_transit_del_cb_set(transit_layout, quickpanel_vi_done_cb_for_transit, vi);
} else if (transit_fadeout != NULL) {
- elm_transit_del_cb_set(transit_fadeout, quickpanel_vi_done_cb_for_transit,
- vi);
+ elm_transit_del_cb_set(transit_fadeout, quickpanel_vi_done_cb_for_transit, vi);
} else {
ERR("Failed to create all the transit");
quickpanel_vi_done(vi);
evas_object_move(item, -10000, -10000);
quickpanel_vi_object_event_freeze_set(item, EINA_FALSE);
}
+
if (vi->extra_flag_1 == 0 && item != NULL) {
evas_object_del(item);
item = NULL;
};
for (i = 0; anim_init_table[i].op_type != VI_OP_NONE; i++) {
- if (anim_init_table[i].op_type != vi->op_type) {
+ if (anim_init_table[i].op_type != vi->op_type)
continue;
- }
+
anim_init_table[i].handler(vi);
break;
};
for (i = 0; anim_job_table[i].op_type != VI_OP_NONE; i++) {
- if (anim_job_table[i].op_type != vi->op_type) {
+ if (anim_job_table[i].op_type != vi->op_type)
continue;
- }
+
anim_job_table[i].handler(vi);
break;
};
for (i = 0; anim_done_table[i].op_type != VI_OP_NONE; i++) {
- if (anim_done_table[i].op_type != vi->op_type) {
+ if (anim_done_table[i].op_type != vi->op_type)
continue;
- }
+
anim_done_table[i].handler(vi);
break;
retif(ad == NULL, , "invalid data.");
retif(ad->scroller == NULL, , "invalid data.");
- if (is_freeze == EINA_TRUE) {
+ if (is_freeze == EINA_TRUE)
_viewer_freeze(ad->scroller);
- } else {
+ else
_viewer_unfreeze(ad->scroller);
- }
}
* limitations under the License.
*/
-#include <stdio.h>
-#include <unistd.h>
+
#include <glib.h>
#include <unistd.h>
#include "quickpanel-ui.h"
#include "quickpanel_def.h"
#include "list_util.h"
-#include "quickpanel_debug_util.h"
#include "minictrl.h"
#include "vi_manager.h"
else
return 0;
- } else if (strstr(name, MINICONTROL_TYPE_STR_LOCKSCREEN) != NULL) {
+ } else if (strstr(name, MINICONTROL_TYPE_STR_LOCKSCREEN) != NULL)
return 0;
- }
return 1;
}
#endif
extern QP_Module vi_manager;
-extern QP_Module pager;
/* notification */
extern QP_Module noti;
/* do not change the order of modules, result may be changed up to order */
static QP_Module *modules[] = {
&vi_manager,
- &pager,
&qp_datetime_controller,
&qp_datetime_view,
#ifdef QP_SETTING_ENABLE
&settings,
&settings_view_featured,
- &settings_view_all,
#endif /* QP_SETTING_ENABLE */
#ifdef QP_MINICTRL_ENABLE
&minictrl,
retif(data == NULL, QP_FAIL, "Invalid parameter!");
for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
- if (modules[i]->init) {
+ if (modules[i]->init)
modules[i]->init(data);
- }
- if (modules[i]->init_job_cb) {
+
+ if (modules[i]->init_job_cb)
ecore_job_add(modules[i]->init_job_cb, data);
- }
+
}
return QP_OK;
retif(data == NULL, QP_FAIL, "Invalid parameter!");
for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
- if (modules[i]->fini) {
+ if (modules[i]->fini)
modules[i]->fini(data);
- }
+
}
return QP_OK;
retif(data == NULL, QP_FAIL, "Invalid parameter!");
for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
- if (modules[i]->suspend) {
+ if (modules[i]->suspend)
modules[i]->suspend(data);
- }
+
}
return QP_OK;
retif(data == NULL, QP_FAIL, "Invalid parameter!");
for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
- if (modules[i]->resume) {
+ if (modules[i]->resume)
modules[i]->resume(data);
- }
+
}
return QP_OK;
retif(data == NULL, QP_FAIL, "Invalid parameter!");
for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
- if (modules[i]->hib_enter) {
+ if (modules[i]->hib_enter)
modules[i]->hib_enter(data);
- }
+
}
return QP_OK;
retif(data == NULL, QP_FAIL, "Invalid parameter!");
for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
- if (modules[i]->hib_leave) {
+ if (modules[i]->hib_leave)
modules[i]->hib_leave(data);
- }
+
}
return QP_OK;
retif(data == NULL, , "Invalid parameter!");
for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
- if (modules[i]->lang_changed) {
+ if (modules[i]->lang_changed)
modules[i]->lang_changed(data);
- }
+
}
}
retif(data == NULL, , "Invalid parameter!");
for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
- if (modules[i]->refresh) {
+ if (modules[i]->refresh)
modules[i]->refresh(data);
- }
+
}
}
retif(data == NULL, QP_FAIL, "Invalid parameter!");
for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
- if (modules[i]->qp_opened) {
+ if (modules[i]->qp_opened)
modules[i]->qp_opened(data);
- }
+
}
return QP_OK;
retif(data == NULL, QP_FAIL, "Invalid parameter!");
for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
- if (modules[i]->qp_closed) {
+ if (modules[i]->qp_closed)
modules[i]->qp_closed(data);
- }
+
}
return QP_OK;
if (delay == 1) {
if (s_info.delay_timer == NULL) {
s_info.delay_timer = ecore_timer_add(DELAY_TIMER_VALUE, _activenoti_hide_timer_cb, NULL);
- if (!s_info.delay_timer) {
+ if (!s_info.delay_timer)
ERR("Failed to create a new timer for hide activenoti");
- }
+
}
} else {
_activenoti_delete_current_noti();
goto out;
}
- if (do_not_disturb_except) {
+ if (do_not_disturb_except)
ret = 0;
- } else {
+ else
ret = 1;
- }
+
}
out:
- if (system_setting) {
+ if (system_setting)
notification_system_setting_free_system_setting(system_setting);
- }
- if (setting) {
+
+ if (setting)
notification_setting_free_notification(setting);
- }
+
return ret;
}
int ret;
ret = notification_get_time(noti1, ¬i_time1);
- if (ret != NOTIFICATION_ERROR_NONE || noti_time1 == 0) {
+ if (ret != NOTIFICATION_ERROR_NONE || noti_time1 == 0)
notification_get_insert_time(noti1, ¬i_time1);
- }
+
ret = notification_get_time(noti2, ¬i_time2);
- if (ret != NOTIFICATION_ERROR_NONE || noti_time2 == 0) {
+ if (ret != NOTIFICATION_ERROR_NONE || noti_time2 == 0)
notification_get_insert_time(noti2, ¬i_time2);
- }
+
DBG("not_time1 : %d noti_time2 : %d", noti_time1, noti_time2);
ret = notification_get_time(info->noti, ¬i_time);
if (ret != NOTIFICATION_ERROR_NONE || noti_time == 0) {
ret = notification_get_insert_time(info->noti, ¬i_time);
- if (ret != NOTIFICATION_ERROR_NONE || noti_time == 0) {
+ if (ret != NOTIFICATION_ERROR_NONE || noti_time == 0)
DBG("notification_get_insert_time failed. time is 0 ret %d", ret);
- }
+
}
noti_time -= time(NULL);
} else {
info->timer = ecore_timer_add(8.0f - noti_time, _delete_timer_cb, info);
DBG("timer add");
- if (!info->timer) {
+ if (!info->timer)
DBG("ecore_timer_add failed");
- }
+
/**
* @todo
* Revise this.
notification_get_id(info->noti, NULL, &priv_id_from_list);
notification_get_id(noti, NULL, &priv_id_from_arg);
- if (priv_id_from_list != priv_id_from_arg) {
+ if (priv_id_from_list != priv_id_from_arg)
continue;
- }
+
}
s_info.auto_remove_list = eina_list_remove(s_info.auto_remove_list, info);
ecore_timer_del(info->timer);
notification_get_id(info->noti, NULL, &priv_id_from_list);
notification_get_id(noti, NULL, &priv_id_from_arg);
- if (priv_id_from_list != priv_id_from_arg) {
+ if (priv_id_from_list != priv_id_from_arg)
continue;
- }
+
}
s_info.non_auto_remove_list = eina_list_remove(s_info.non_auto_remove_list, info);
notification_free(info->noti);
if (!auto_remove) {
ret = _compare_noti_time(cur_noti, info->noti);
- if (ret > 0) {
+ if (ret > 0)
return NULL;
- }
+
}
s_info.non_auto_remove_list = eina_list_remove(s_info.non_auto_remove_list, info);
// .....
return noti;
}
- if (auto_remove == false) {
+ if (auto_remove == false)
return noti;
- }
+
info = eina_list_nth(s_info.auto_remove_list, 0);
if (info) {
*image_type = 1;
ret = notification_get_event_handler(noti, NOTIFICATION_EVENT_TYPE_CLICK_ON_THUMBNAIL, &app_control);
- if (ret != NOTIFICATION_ERROR_NONE) {
+ if (ret != NOTIFICATION_ERROR_NONE)
ERR("Failed to get handler from NOTIFICATION_EVENT_TYPE_CLICK_ON_THUMBNAIL");
- } else {
+ else
DBG("thumbnail_path : %s app_control = %p", temp_path, app_control);
- }
+
+
} else {
ret = notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, &temp_path);
if (ret == NOTIFICATION_ERROR_NONE && temp_path != NULL) {
ret = notification_get_event_handler(noti, NOTIFICATION_EVENT_TYPE_CLICK_ON_ICON, &app_control);
- if (ret != NOTIFICATION_ERROR_NONE) {
+ if (ret != NOTIFICATION_ERROR_NONE)
ERR("Failed to get handler from NOTIFICATION_EVENT_TYPE_CLICK_ON_ICON");
- } else {
+ else
DBG("icon_path : %s app_control = %p", temp_path, app_control);
- }
+
} else {
ret = notification_get_pkgname(noti, &pkgname);
if (ret == NOTIFICATION_ERROR_NONE && pkgname != NULL) {
icon = elm_image_add(parent);
if (!icon) {
ERR("Failed to create an image object");
- if (app_control) {
+ if (app_control)
app_control_destroy(app_control);
- }
+
return NULL;
}
if (ret == EINA_FALSE) {
evas_object_del(icon);
- if (icon_path) {
+ if (icon_path)
free(icon_path);
- }
- if (app_control) {
+
+ if (app_control)
app_control_destroy(app_control);
- }
+
return NULL;
}
elm_object_signal_callback_add(parent, "image_press" , "", _image_press_cb, app_control);
evas_object_event_callback_add(icon, EVAS_CALLBACK_DEL, _app_control_del_cb, app_control);
- if (icon_path) {
+ if (icon_path)
free(icon_path);
- }
+
return icon;
}
DBG("text : %s", text);
- if (text != NULL) {
+ if (text != NULL)
return elm_entry_utf8_to_markup(text);
- }
+
return NULL;
}
}
ret = notification_get_text_domain(noti, &domain, &dir);
- if (ret == NOTIFICATION_ERROR_NONE && domain != NULL && dir != NULL) {
+ if (ret == NOTIFICATION_ERROR_NONE && domain != NULL && dir != NULL)
bindtextdomain(domain, dir);
- }
+
tmp = _get_text(noti, NOTIFICATION_TEXT_TYPE_INFO_1);
if (tmp != NULL) {
notification_get_property(noti, &flags);
notification_get_type(noti, &type);
- if (flags & NOTIFICATION_PROP_DISABLE_APP_LAUNCH) {
+ if (flags & NOTIFICATION_PROP_DISABLE_APP_LAUNCH)
flag_launch = 0;
- } else {
+ else
flag_launch = 1;
- }
+
ret = notification_get_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_RESPONDING, NULL, &responding_service_handle);
- if (ret != NOTIFICATION_ERROR_NONE || responding_service_handle == NULL) {
+ if (ret != NOTIFICATION_ERROR_NONE || responding_service_handle == NULL)
DBG("NOTIFICATION_EXECUTE_TYPE_RESPONDING failed [%d]", ret);
- }
+
ret = notification_get_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, &single_service_handle);
- if (ret != NOTIFICATION_ERROR_NONE || single_service_handle == NULL) {
+ if (ret != NOTIFICATION_ERROR_NONE || single_service_handle == NULL)
DBG("NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH failed [%d]", ret);
- }
+
ret = notification_get_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_MULTI_LAUNCH, NULL, &multi_service_handle);
- if (ret != NOTIFICATION_ERROR_NONE || multi_service_handle == NULL) {
+ if (ret != NOTIFICATION_ERROR_NONE || multi_service_handle == NULL)
DBG("NOTIFICATION_EXECUTE_TYPE_MULTI_LAUNCH failed [%d]", ret);
- }
+
if (s_info.is_entry_activated) {
entry_text = _activenoti_get_entry_text();
- if (responding_service_handle != NULL) {
+ if (responding_service_handle != NULL)
bundle_add(responding_service_handle, APP_CONTROL_DATA_TEXT, entry_text);
- }
- if (single_service_handle != NULL) {
+
+ if (single_service_handle != NULL)
bundle_add(single_service_handle, APP_CONTROL_DATA_TEXT, entry_text);
- }
- if (multi_service_handle != NULL) {
+
+ if (multi_service_handle != NULL)
bundle_add(multi_service_handle, APP_CONTROL_DATA_TEXT, entry_text);
- }
- if (entry_text) {
+
+ if (entry_text)
free(entry_text);
- }
+
}
if (responding_service_handle != NULL) {
char *text_count = NULL;
notification_get_text(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, &text_count);
- if (text_count != NULL) {
+ if (text_count != NULL)
count = atoi(text_count);
- } else {
+ else
count = 1;
- }
+
+
if (single_service_handle != NULL && multi_service_handle == NULL) {
ret = quickpanel_common_launch_app(NULL, single_service_handle);
} else if (single_service_handle == NULL && multi_service_handle != NULL) {
ret = quickpanel_common_launch_app(NULL, multi_service_handle);
} else if (single_service_handle != NULL && multi_service_handle != NULL) {
- if (count <= 1) {
+
+ if (count <= 1)
ret = quickpanel_common_launch_app(NULL, single_service_handle);
- } else {
+ else
ret = quickpanel_common_launch_app(NULL, multi_service_handle);
- }
+
+
} else { //single_service_handle == NULL && multi_service_handle == NULL
DBG("there is no execution option in notification");
}
}
bg_img = elm_image_add(parent);
- if (!bg_img) {
+ if (!bg_img)
return NULL;
- }
+
evas_object_size_hint_weight_set(bg_img, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bg_img, EVAS_HINT_FILL, EVAS_HINT_FILL);
* The app_control is not used and no one cares it.
* So we have to release it from here if it is allocated.
*/
- if (app_control) {
+ if (app_control)
app_control_destroy(app_control);
- }
+
if (btn_cnt == 0) { // noti doesn't have button
evas_object_del(s_info.btnbox);
evas_object_size_hint_align_set(bt_layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
image = _get_btn_img(bt_layout, noti, btn_cnt);
- if (image != NULL) {
+ if (image != NULL)
elm_object_part_content_set(bt_layout, "content.button.image", image);
- }
+
btn_text = _get_text(noti, btn_cnt + NOTIFICATION_TEXT_TYPE_BUTTON_1);
if (btn_text != NULL) {
app_control_h app_control = data;
int ret = APP_CONTROL_ERROR_NONE;
- if (data != NULL) {
+ if (data != NULL)
entry_text = elm_entry_markup_to_utf8(elm_entry_entry_get(s_info.text_input_entry));
- }
+
ret = app_control_add_extra_data(app_control, APP_CONTROL_DATA_TEXT, entry_text);
evas_object_geometry_get(obj, NULL, NULL, NULL, &h);
DBG("ENTRY :: Height : %d", h);
- if (h < ENTRY_LINE_MAX_HEIGHT) {
+ if (h < ENTRY_LINE_MAX_HEIGHT)
quickpanel_noti_win_resize_height(s_info.activenoti, NOTI_LAYOUT_ENTRY, h - ENTRY_LINE_HEIGHT, false);
- } else {
+ else
quickpanel_noti_win_resize_height(s_info.activenoti, NOTI_LAYOUT_ENTRY, ENTRY_LINE_MAX_HEIGHT - ENTRY_LINE_HEIGHT, false);
- }
+
}
static bool _activenoti_check_text_input_type(notification_h noti)
if (ret != NOTIFICATION_ERROR_NONE || app_control == NULL) {
ERR("Notification Text Input handler is null");
- if (app_control) {
+ if (app_control)
app_control_destroy(app_control);
- }
+
}
ret = notification_get_text_input_max_length(noti, &text_length);
- if (ret == NOTIFICATION_ERROR_NONE) {
+ if (ret == NOTIFICATION_ERROR_NONE)
s_info.text_input_max_length = text_length;
- } else {
+ else
s_info.text_input_max_length = DEFAULT_TEXT_INPUT_MAX_LENGTH;
- }
+
placeholder_text = _get_text(noti, NOTIFICATION_TEXT_TYPE_TEXT_INPUT_PLACEHOLDER);
ret = notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_TEXT_INPUT_BUTTON, &button_icon_path);
- if (ret != NOTIFICATION_ERROR_NONE) {
+ if (ret != NOTIFICATION_ERROR_NONE)
button_icon_path = NULL;
- }
+
/* box -----------------------------------------------------------------------------------*/
box = elm_box_add(obj);
if (box == NULL) {
ERR("box is null");
- if (app_control) {
+ if (app_control)
app_control_destroy(app_control);
- }
+
return false;
}
evas_object_del(s_info.entrybox);
s_info.entrybox = NULL;
- if (app_control) {
+ if (app_control)
app_control_destroy(app_control);
- }
+
return false;
}
if (entry == NULL) {
DBG("failed to add a entry");
- if (app_control) {
+ if (app_control)
app_control_destroy(app_control);
- }
+
return false;
}
elm_entry_text_style_user_push(entry, "DEFAULT='font=Tizen:style=Regular font_size=43 color=#ffffff'");
- if (placeholder_text == NULL) {
+ if (placeholder_text == NULL)
snprintf(buf, sizeof(buf), "<font=Sans:style=Regular font_size=%d color=#ffffff>Text messages</font>", ENTRY_FONT_SIZE);
- } else {
+ else
snprintf(buf, sizeof(buf), "<font=Sans:style=Regular font_size=%d color=#ffffff>%s</font>", ENTRY_FONT_SIZE, placeholder_text);
- }
+
+
elm_object_part_text_set(entry, "elm.guide", buf);
elm_entry_input_panel_enabled_set(entry, EINA_TRUE);
elm_entry_editable_set(entry, EINA_TRUE);
if (send_button == NULL) {
DBG("failed to add a button");
- if (app_control) {
+ if (app_control)
app_control_destroy(app_control);
- }
+
return false;
}
evas_object_show(send_button);
Evas_Object *icon = elm_icon_add(send_button);
- if (button_icon_path == NULL) {
+ if (button_icon_path == NULL)
elm_image_file_set(icon, util_get_shared_res_file_path(DEFAULT_SEND_BUTTON_IMG), NULL);
- } else {
+ else
elm_image_file_set(icon, button_icon_path, NULL);
- }
+
evas_object_color_set(icon, BUTTON_COLOR);
evas_object_show(icon);
if (current_auto_remove == true) {
time_t noti_time = 0;
ret = notification_get_time(s_info.current_noti, ¬i_time);
- if (ret != NOTIFICATION_ERROR_NONE || noti_time == 0) {
+ if (ret != NOTIFICATION_ERROR_NONE || noti_time == 0)
notification_get_insert_time(s_info.current_noti, ¬i_time);
- }
+
+
noti_time = time(NULL) - noti_time;
s_info.close_timer = ecore_timer_add(DEL_TIMER_VALUE - noti_time, _activenoti_close_timer_cb, NULL);
}
}
bg_img = _get_bg_img(s_info.layout , s_info.current_noti);
- if (bg_img != NULL) {
+ if (bg_img != NULL)
elm_object_part_content_set(s_info.layout, "bg_img", bg_img);
- }
+
btn_cnt = _activenoti_create_button(s_info.layout, s_info.current_noti);
badge = elm_object_part_content_unset(s_info.layout, "icon_badge");
DBG("badget %p", badge);
- if (badge != NULL) {
+ if (badge != NULL)
evas_object_del(badge);
- }
+
badge = _activenoti_create_badge(s_info.layout, s_info.current_noti);
- if (badge != NULL) {
+ if (badge != NULL)
elm_object_part_content_set(s_info.layout, "icon_badge", badge);
- } else {
+ else
INFO("badge is NULL");
- }
- DBG("");
+
+
} else {
INFO("icon is NULL");
}
angle = elm_win_rotation_get(s_info.activenoti);
if (((angle == 0 || angle == 180) && (ad->angle == 90 || ad->angle == 270))
- || ((angle == 90 || angle == 270) && (ad->angle == 0 || ad->angle == 180))) {
- if (need_hide == 1) {
+ || ((angle == 90 || angle == 270) && (ad->angle == 0 || ad->angle == 180))) {
+
+ if (need_hide == 1)
evas_object_hide(s_info.activenoti);
- }
+
}
}
}
free(default_msg_tone);
}
}
- if (ret == PLAYER_ERROR_NONE) {
+
+ if (ret == PLAYER_ERROR_NONE)
quickpanel_media_player_id_set(priv_id);
- } else {
+ else
ERR("failed to play notification sound");
- }
+
break;
} else {
ERR("playable false, So unlock tone");
DBG("Reminded setting sound[%s]", default_msg_tone);
ret = quickpanel_media_player_play(SOUND_TYPE_NOTIFICATION, default_msg_tone);
free(default_msg_tone);
- if (ret == PLAYER_ERROR_NONE) {
+
+ if (ret == PLAYER_ERROR_NONE)
quickpanel_media_player_id_set(priv_id);
- } else {
+ else
ERR("failed to play notification sound(default)");
- }
+
}
break;
case NOTIFICATION_SOUND_TYPE_MAX:
return;
} else if (op_type == NOTIFICATION_OP_DELETE_ALL) {
- if (s_info.current_noti) {
+ if (s_info.current_noti)
_activenoti_hide(NULL, 0);
- }
+
_activenoti_remove_list();
}
{
retif(data == NULL, , "Invalid parameter!");
- if (s_info.activenoti != NULL) {
+ if (s_info.activenoti != NULL)
_activenoti_win_rotated(data, 1);
- }
+
}
static void _activenoti_qp_opened(void *data)
struct appdata *ad = data;
retif(ad == NULL, , "Invalid parameter!");
- if (_activenoti_has_pending_noti()) {
+ if (_activenoti_has_pending_noti())
_activenoti_remove_list();
- }
+
_activenoti_hide(NULL, 0);
}
notification_get_type(noti, ¬i_type);
- if (noti_type == NOTIFICATION_TYPE_NOTI) {
+ if (noti_type == NOTIFICATION_TYPE_NOTI)
handle->n_noti++;
- } else if (noti_type == NOTIFICATION_TYPE_ONGOING) {
+ else if (noti_type == NOTIFICATION_TYPE_ONGOING)
handle->n_ongoing++;
- }
+
DBG("n_noti = [%d] n_ongoing = [%d]", handle->n_noti, handle->n_ongoing);
return node;
if (item->noti != NULL) {
notification_get_type(item->noti, ¬i_type);
- if (noti_type == NOTIFICATION_TYPE_NOTI) {
+ if (noti_type == NOTIFICATION_TYPE_NOTI)
handle->n_noti--;
- } else if (noti_type == NOTIFICATION_TYPE_ONGOING) {
+ else if (noti_type == NOTIFICATION_TYPE_ONGOING)
handle->n_ongoing--;
- }
+
}
notification_free(item->noti);
item->noti = NULL;
item->view = NULL;
- if (g_hash_table_remove(handle->table, GINT_TO_POINTER(priv_id))) {
+ if (g_hash_table_remove(handle->table, GINT_TO_POINTER(priv_id)))
DBG("success to remove %d", priv_id);
- }
+
}
}
DBG("n_noti %d , n_ongoing %d ", handle->n_noti, handle->n_ongoing);
- if (noti_type == NOTIFICATION_TYPE_NOTI) {
+ if (noti_type == NOTIFICATION_TYPE_NOTI)
return handle->n_noti;
- } else if (noti_type == NOTIFICATION_TYPE_ONGOING) {
+ else if (noti_type == NOTIFICATION_TYPE_ONGOING)
return handle->n_ongoing;
- } else if (noti_type == NOTIFICATION_TYPE_NONE) {
+ else if (noti_type == NOTIFICATION_TYPE_NONE)
return handle->n_noti + handle->n_ongoing;
- }
+
return 0;
}
*/
-#include <stdio.h>
-#include <string.h>
+
#include <stdlib.h>
#include <Elementary.h>
retif(noti == NULL, 0, "Invalid parameter!");
notification_get_text(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, &text_count);
- if (text_count != NULL) {
+ if (text_count != NULL)
return atoi(text_count);
- }
+
+
return 1;
}
notification_get_detail_list(pkgname, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE, -1, ¬i_list);
if (noti_list != NULL) {
noti = notification_list_get_data(noti_list);
- if (noti != NULL) {
+ if (noti != NULL)
count = quickpanel_noti_util_get_event_count_from_noti(noti);
- }
+
+
notification_free_list(noti_list);
return count;
}
// remove .UTF-8
if (strlen(locale_tmp) > 0) {
char *p = strstr(locale_tmp, ".UTF-8");
- if (p) {
+ if (p)
*p = 0;
- }
+
}
free(locale);
- if (strlen(locale_tmp) > 0) {
+ if (strlen(locale_tmp) > 0)
return strdup(locale_tmp);
- }
+
return strdup("en_US");
}
localtime_r(&t, &loc_time);
- if (buf == NULL) {
+ if (buf == NULL)
return NULL;
- }
+
if (t < today) {
/* ascii to unicode for input skeleton */
} else {
strftime(bf1, sizeof(bf1), "%l:%M", &loc_time);
- if (loc_time.tm_hour >= 0 && loc_time.tm_hour < 12) {
+ if (loc_time.tm_hour >= 0 && loc_time.tm_hour < 12)
ret = snprintf(buf, buf_len, "%s%s", bf1, "AM");
- } else {
+ else
ret = snprintf(buf, buf_len, "%s%s", bf1, "PM");
- }
+
}
}
DBG("text : %s", text);
- if (text != NULL) {
+ if (text != NULL)
return elm_entry_utf8_to_markup(text);
- }
+
return NULL;
}
old_ic = elm_object_part_content_get(obj, part);
- if (quickpanel_animated_icon_is_same_icon(old_ic, file_path) == 1) {
+ if (quickpanel_animated_icon_is_same_icon(old_ic, file_path) == 1)
return old_ic;
- }
+
if (old_ic != NULL) {
elm_image_file_get(old_ic, &old_ic_path, NULL);
if (old_ic_path != NULL) {
- if (strcmp(old_ic_path, file_path) == 0) {
+ if (strcmp(old_ic_path, file_path) == 0)
return old_ic;
- }
+
}
elm_object_part_content_unset(obj, part);
old_text = elm_object_part_text_get(obj, part);
if (old_text != NULL) {
- if (strcmp(old_text, text) == 0) {
+ if (strcmp(old_text, text) == 0)
return;
- }
+
}
elm_object_part_text_set(obj, part, text);
elm_image_resizable_set(ic, EINA_FALSE, EINA_TRUE);
shared_icon_path = (char*)util_get_shared_res_file_path(QP_SHARED_ICON_FOLDER_NAME);
- if (!strncmp(main_icon_path, shared_icon_path, strlen(shared_icon_path))) {
+ if (!strncmp(main_icon_path, shared_icon_path, strlen(shared_icon_path)))
evas_object_color_set(ic, 155, 216, 226, 255);
- }
+
+
quickpanel_animated_image_add(ic);
}
elm_object_part_content_set(item, "elm.swallow.mainicon", ic);
}
}
- if (main_icon_path) {
+ if (main_icon_path)
free(main_icon_path);
- }
+
/* sub icon add*/
ret = notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB, &temp_path);
elm_object_signal_emit(item, "elm.icon.bg.show", "elm");
}
- if (sub_icon_path) {
+ if (sub_icon_path)
free(sub_icon_path);
- }
+
}
}
if (noti_err == NOTIFICATION_ERROR_NONE && text != NULL) {
quickpanel_common_util_char_replace(text, _NEWLINE, _SPACE);
int count = atoi(text);
- if (count > 999) {
+
+ if (count > 999)
_set_text_to_part(item, "elm.text.count", "999+");
- } else {
+ else
_set_text_to_part(item, "elm.text.count", text);
- }
+
+
is_exist_count = true;
#ifdef QP_SCREENREADER_ENABLE
_check_and_add_to_buffer(str_buf, text);
noti_err = notification_get_time(noti, ¬i_time);
- if (noti_time == 0.0) {
+ if (noti_time == 0.0)
noti_err = notification_get_insert_time(noti, ¬i_time);
- }
+
if (noti_err == NOTIFICATION_ERROR_NONE) {
quickpanel_noti_util_get_time(noti_time, buf, 512);
elm_object_signal_emit(item, "count.show", "prog");
}
- if (elm_object_part_text_get(item, "elm.text.time") != NULL) {
+ if (elm_object_part_text_get(item, "elm.text.time") != NULL)
elm_object_signal_emit(item, "title.short", "prog");
- }
+
const char *get_content = elm_object_part_text_get(item, "elm.text.content");
if (false == is_exist_count &&
*/
-#include <stdio.h>
#include <string.h>
#include <glib.h>
{
struct Internal_Data *wd = evas_object_data_get(obj, E_DATA_KEY);
- if (!wd) {
- return;
- }
-
- if (wd->content) {
+ if (wd != NULL && wd->content)
evas_object_show(wd->content);
- }
+
}
static void _resized(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
struct Internal_Data *wd = evas_object_data_get(obj, E_DATA_KEY);
if (wd) {
- if (wd->rotation_event_handler) {
+ if (wd->rotation_event_handler)
ecore_event_handler_del(wd->rotation_event_handler);
- }
+
+
free(wd);
}
int angle = 0;
struct Internal_Data *wd = evas_object_data_get(obj, E_DATA_KEY);
- if (!wd) {
+ if (!wd)
return;
- }
+
angle = elm_win_rotation_get(obj);
- if (angle % 90) {
+ if (angle % 90)
return;
- }
+
angle %= 360;
- if (angle < 0) {
+ if (angle < 0)
angle += 360;
- }
+
+
wd->angle = angle;
switch (angle) {
Ecore_Evas *ee = NULL;
win = elm_win_add(parent, "noti_win", ELM_WIN_NOTIFICATION);
- if (!win) {
+ if (!win)
return NULL;
- }
+
e = evas_object_evas_get(win);
if (!e) {
wd = (struct Internal_Data *) calloc(1, sizeof(struct Internal_Data));
if (!wd) {
- if (win) {
+ if (win)
evas_object_del(win);
- }
+
+
return NULL;
}
evas_object_data_set(win, E_DATA_KEY, wd);
{
struct Internal_Data *wd;
- if (!obj) {
+ if (!obj)
return;
- }
+
wd = evas_object_data_get(obj, E_DATA_KEY);
- if (!wd) {
+ if (!wd)
return;
- }
+
if (wd->content && content != NULL) {
evas_object_del(wd->content);
wd->content = content;
- if (!content) {
+ if (!content)
return;
- }
+
evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_resize(obj, wd->w, wd->h);
{
struct Internal_Data *wd;
- if (!obj) {
+ if (!obj)
return;
- }
+
wd = evas_object_data_get(obj, E_DATA_KEY);
- if (!wd) {
+ if (!wd)
return;
- }
+
DBG("Get WINDOW internal data : width %d scr_w : %d height : %d scr_h : %d angle %d", wd->w, wd->scr_w, wd->h, wd->scr_h, wd->angle);
- if (g_isLandscape && !force) {
+ if (g_isLandscape && !force)
return;
- }
+
wd->h = NOTI_HEIGHT + entry_extended_size;
{
struct Internal_Data *wd = evas_object_data_get(obj, E_DATA_KEY);
- if (!wd) {
+ if (!wd)
return;
- }
- if (orient >= NOTI_ORIENT_LAST) {
+
+ if (orient >= NOTI_ORIENT_LAST)
return;
- }
+
+
switch (orient) {
case NOTI_ORIENT_BOTTOM:
evas_object_move(obj, 0, wd->scr_h - wd->h);
return NULL;
}
-HAPI void quickpanel_page_base_focus_allow_set(Eina_Bool is_enable)
-{
- elm_object_tree_focus_allow_set(s_info.mapbuf, is_enable);
-}
-
HAPI void quickpanel_page_secured_lock_set(qp_secured_lock_state_e state)
{
Evas_Object *view = s_info.view;
+++ /dev/null
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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 <Elementary.h>
-
-#include <tzsh.h>
-#include <tzsh_quickpanel_service.h>
-
-#include "quickpanel-ui.h"
-#include "common_uic.h"
-#include "common.h"
-#include "pager.h"
-#include "pager_common.h"
-#include "list_util.h"
-#include "vi_manager.h"
-#include "settings_gridbox.h"
-#include "settings_view_all.h"
-#include "quickpanel_def.h"
-
-static void _mapbuf_enable_set(Eina_Bool is_enable);
-static void _content_resize(int width, int height, const char *signal);
-static int _up_cb(void *event_info, void *data);
-static int _down_cb(void *event_info, void *data);
-static int _scroll_start_cb(void *event_info, void *data);
-static int _scroll_done_cb(void *event_info, void *data);
-static int _page_changed_cb(void *event_info, void *data);
-
-static struct info {
- int is_scroll_freezed;
- Evas_Object *mapbuf;
- Evas_Object *view;
- Evas_Object *scroller;
- Evas_Object *layout;
- Evas_Object *view_section_1;
- Evas_Object *view_active_buttons;
-} s_info = {
- .is_scroll_freezed = 0,
- .mapbuf = NULL,
- .view = NULL,
- .scroller = NULL,
- .layout = NULL,
- .view_section_1 = NULL,
- .view_active_buttons = NULL,
-};
-
-static QP_Page_Handler page_handler = {
- .status = 0,
- .name = NULL,
-
- .mapbuf_enable_set = _mapbuf_enable_set,
- .content_resize = _content_resize,
- .down_cb = _down_cb,
- .up_cb = _up_cb,
- .scroll_start_cb = _scroll_start_cb,
- .scroll_done_cb = _scroll_done_cb,
- .page_changed_cb = _page_changed_cb,
-};
-
-static inline void _scroll_hold(Evas_Object *viewer)
-{
- int hold_count = 0;
- retif(viewer == NULL, , "Invalid parameter!");
-
- hold_count = elm_object_scroll_hold_get(viewer);
-
- if (hold_count <= 0) {
- elm_object_scroll_hold_push(viewer);
- }
-}
-
-static inline void _scroll_unhold(Evas_Object *viewer)
-{
- int i = 0, hold_count = 0;
- retif(viewer == NULL, , "Invalid parameter!");
-
- hold_count = elm_object_scroll_hold_get(viewer);
-
- for (i = 0 ; i < hold_count; i++) {
- elm_object_scroll_hold_pop(viewer);
- }
-}
-
-static void _mapbuf_enable_set(Eina_Bool is_enable)
-{
- Evas_Coord y;
-
- if (s_info.mapbuf != NULL) {
- elm_mapbuf_enabled_set(s_info.mapbuf, is_enable);
- }
-
- if (is_enable) {
- evas_object_geometry_get(s_info.mapbuf, NULL, &y, NULL, NULL);
- evas_object_move(s_info.view, 0, y);
- }
-}
-
-static void _content_resize(int width, int height, const char *signal)
-{
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, , "invalid parameter");
-
- if (s_info.view != NULL) {
- elm_object_signal_emit(s_info.view, signal, "prog");
- evas_object_size_hint_min_set(s_info.view, ELM_SCALE_SIZE(width), ELM_SCALE_SIZE(height));
- }
- if (s_info.layout != NULL) {
- elm_object_signal_emit(s_info.layout, signal, "prog");
- if (strcmp(signal, "portrait") == 0) {
- evas_object_size_hint_min_set(s_info.layout, ELM_SCALE_SIZE(width), ELM_SCALE_SIZE(height));
- } else {
- evas_object_size_hint_min_set(s_info.layout, ELM_SCALE_SIZE(width), ELM_SCALE_SIZE(height));
- }
- }
-}
-
-static int _up_cb(void *event_info, void *data)
-{
- if (s_info.is_scroll_freezed == 0) {
- quickpanel_page_scroll_hold_set(EINA_TRUE);
- }
-
- return QP_OK;
-}
-
-static int _down_cb(void *event_info, void *data)
-{
- if (s_info.is_scroll_freezed == 0) {
- quickpanel_page_scroll_hold_set(EINA_FALSE);
- }
-
- return QP_OK;
-}
-
-static int _scroll_start_cb(void *event_info, void *data)
-{
- return QP_OK;
-}
-
-static int _scroll_done_cb(void *event_info, void *data)
-{
- quickpanel_vim_set_state_suspend();
-
- return QP_OK;
-}
-
-static int _page_changed_cb(void *event_info, void *data)
-{
- return QP_OK;
-}
-
-static void _deleted_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- DBG("deleted view");
- if (s_info.view_active_buttons != NULL) {
- quickpanel_settings_gridbox_remove(s_info.view_active_buttons);
- }
- if (s_info.view_section_1 != NULL) {
- evas_object_del(s_info.view_section_1);
- }
- if (s_info.layout != NULL) {
- evas_object_del(s_info.layout);
- }
- if (s_info.scroller != NULL) {
- evas_object_del(s_info.scroller);
- }
- if (s_info.view != NULL) {
- evas_object_del(s_info.view);
- }
-
- s_info.mapbuf = NULL;
- s_info.view = NULL;
- s_info.scroller = NULL;
- s_info.layout = NULL;
- s_info.view_section_1 = NULL;
- s_info.view_active_buttons = NULL;
-}
-
-HAPI Evas_Object *quickpanel_page_setting_all_create(Evas_Object *parent, void *data)
-{
- Evas_Object *mapbuf = NULL;
- Evas_Object *view = NULL;
- Evas_Object *scroller = NULL;
- Evas_Object *layout = NULL;
-
- retif(parent == NULL, NULL, "invalid parameter");
-
- if (s_info.view == NULL) {
- mapbuf = elm_mapbuf_add(parent);
- elm_mapbuf_enabled_set(mapbuf, EINA_FALSE);
- elm_mapbuf_smooth_set(mapbuf, EINA_FALSE);
-
- view = quickpanel_uic_load_edj(mapbuf, util_get_res_file_path(DEFAULT_EDJ), "quickpanel/page_setting_all_base", 0);
- retif(view == NULL, NULL, "failed to load editing layout");
-
- scroller = elm_scroller_add(view);
- retif(!scroller, NULL, "fail to add scroller");
- elm_object_style_set(scroller, "list_effect");
- elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_TRUE);
- elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
- evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_fill_set(scroller, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_show(scroller);
-
- layout = quickpanel_uic_load_edj(scroller, util_get_res_file_path(DEFAULT_EDJ), "quickpanel/page_setting_all", 0);
- retif(layout == NULL, NULL, "failed to load editing layout");
-
- quickpanel_page_handler_set(mapbuf, &page_handler);
- evas_object_event_callback_add(mapbuf, EVAS_CALLBACK_DEL, _deleted_cb, NULL);
-
- elm_object_content_set(scroller, layout);
- elm_object_part_content_set(view, "object.layout", scroller);
-
- elm_object_content_set(mapbuf, view);
- evas_object_show(mapbuf);
-
- s_info.mapbuf = mapbuf;
- s_info.view = view;
- s_info.scroller = scroller;
- s_info.layout = layout;
- }
-
- return s_info.mapbuf;
-}
-
-HAPI Evas_Object *quickpanel_page_setting_all_view_get(const char *view_name)
-{
- retif(view_name == NULL, NULL, "invalid parameter");
-
- if (strcmp(view_name, "VIEW") == 0) {
- return s_info.view;
- } else if (strcmp(view_name, "LAYOUT") == 0) {
- return s_info.layout;
- } else if (strcmp(view_name, "SECTION.1") == 0) {
- return s_info.view_section_1;
- } else if (strcmp(view_name, "ACTIVE.BUTTONS") == 0) {
- return s_info.view_active_buttons;
- }
-
- return NULL;
-}
-
-HAPI void quickpanel_page_setting_all_view_set(const char *view_name, Evas_Object *view)
-{
- retif(s_info.view == NULL, , "invalid parameter");
- retif(s_info.layout == NULL, , "invalid parameter");
- retif(view_name == NULL, , "invalid parameter");
- retif(view == NULL, , "invalid parameter");
-
- if (strcmp(view_name, "SECTION.1") == 0) {
- elm_object_part_content_set(s_info.layout, "object.section.1", view);
- s_info.view_section_1 = view;
- } else if (strcmp(view_name, "ACTIVE.BUTTONS") == 0) {
- elm_object_part_content_set(s_info.layout, "object.active.buttons", view);
- s_info.view_active_buttons = view;
- }
-}
-
-HAPI void quickpanel_page_setting_all_freeze_set(Eina_Bool is_freeze)
-{
- if (is_freeze == EINA_TRUE) {
- s_info.is_scroll_freezed = 1;
- quickpanel_page_scroll_freeze_set(EINA_TRUE);
- _scroll_hold(s_info.scroller);
- } else {
- s_info.is_scroll_freezed = 0;
- quickpanel_page_scroll_freeze_set(EINA_FALSE);
- _scroll_unhold(s_info.scroller);
- }
-}
-
-HAPI Eina_Bool quickpanel_page_setting_all_is_page_showed(void)
-{
- if (quickpanel_pager_current_page_get() == PAGE_IDX_EDITING) {
- return EINA_TRUE;
- }
-
- return EINA_FALSE;
-}
-
-HAPI void quickpanel_page_setting_all_focus_allow_set(Eina_Bool is_enable)
-{
- elm_object_tree_focus_allow_set(s_info.mapbuf, is_enable);
-}
static void _opened(void *data);
static void _closed(void *data);
static void _refresh(void *data);
-static inline void _page_mapbuf_enable_set(Evas_Object *box, int is_enable);
-#define ENABLE_MAPBUF 0
typedef enum _qp_pager_state_type {
PAGER_STATE_NOT_READY = 0,
static inline void _set_state(qp_pager_state_type state)
{
- if (state == PAGER_STATE_IDLE) {
- _page_mapbuf_enable_set(s_info.view_box, 0);
- } else if (state == PAGER_STATE_WILL_SCROLL || state == PAGER_STATE_SCROLLING) {
- _page_mapbuf_enable_set(s_info.view_box, 1);
- }
s_info.state = state;
}
s_info.timer_scroll_adj = NULL;
}
- if (is_use_timer) {
+ if (is_use_timer)
s_info.timer_scroll_adj = ecore_timer_add(0.1, _page_adjust_timer_cb, NULL);
- } else {
+ else
_page_adjust_timer_cb(NULL);
- }
+
}
static inline int _current_page_index_get(void)
if (list != NULL) {
list_cnt = eina_list_count(list);
- if (index < list_cnt) {
+ if (index < list_cnt)
obj = (Evas_Object *)eina_list_nth(list, index);
- }
- eina_list_free(list);
- }
- return obj;
-}
-#if ENABLE_MAPBUF
-static void _mapbuf_job_cb(void *data)
-{
- Eina_List *list = NULL;
- Eina_List *l;
- Eina_List *l_next;
- Evas_Object *box = s_info.view_box;
- Evas_Object *item = NULL;
- int is_enable = (int)data;
- QP_Page_Handler *page_handler = NULL;
- retif(box == NULL, , "invalid parameter");
-
- list = elm_box_children_get(box);
- retif(list == NULL, , "empty box");
-
- SDBG("mapbuf enable:%d", is_enable);
-
- EINA_LIST_FOREACH_SAFE(list, l, l_next, item) {
- page_handler = quickpanel_page_handler_get(item);
- if (page_handler != NULL) {
- if (page_handler->mapbuf_enable_set != NULL) {
- if (elm_config_access_get() == EINA_FALSE) {
- if (is_enable == 1) {
- page_handler->mapbuf_enable_set(EINA_TRUE);
- } else {
- page_handler->mapbuf_enable_set(EINA_FALSE);
- }
- } else {
- page_handler->mapbuf_enable_set(EINA_FALSE);
- }
- }
- }
+ eina_list_free(list);
}
- eina_list_free(list);
-}
-#endif
-
-static inline void _page_mapbuf_enable_set(Evas_Object *box, int is_enable)
-{
-#if ENABLE_MAPBUF
- ecore_job_add(_mapbuf_job_cb, (void *)is_enable);
-#endif
+ return obj;
}
static inline void _page_resize(Evas_Object *box, int width, int height, const char *signal)
EINA_LIST_FOREACH_SAFE(list, l, l_next, item) {
page_handler = quickpanel_page_handler_get(item);
- if (page_handler != NULL) {
- if (page_handler->content_resize != NULL) {
- page_handler->content_resize(width, height, signal);
- }
- }
+ if (page_handler != NULL && page_handler->content_resize != NULL)
+ page_handler->content_resize(width, height, signal);
+
}
eina_list_free(list);
struct appdata *ad = (struct appdata *)data;
retif(ad == NULL, , "Invalid parameter!");
- if (ad->angle == 90 || ad->angle == 270) {
+ if (ad->angle == 90 || ad->angle == 270)
_page_resize(s_info.view_box, ad->win_height, ad->win_width - ELM_SCALE_SIZE((QP_DATE_H + QP_HANDLE_H)), "landscape");
- } else {
+ else
_page_resize(s_info.view_box, ad->win_width, ad->win_height - ELM_SCALE_SIZE((QP_DATE_H + QP_HANDLE_H)), "portrait");
- }
+
}
static Eina_Bool _up_cb(void *data, int type, void *event)
page_handler = quickpanel_page_handler_get(page);
retif(page_handler == NULL, EINA_FALSE, "no page handler found");
- if (page_handler->up_cb != NULL) {
+ if (page_handler->up_cb != NULL)
page_handler->up_cb(event, NULL);
- }
- if (_get_state() == PAGER_STATE_SCROLLING) {
+
+ if (_get_state() == PAGER_STATE_SCROLLING)
_page_adjust(1);
- }
+
return EINA_TRUE;
}
page_handler = quickpanel_page_handler_get(page);
retif(page_handler == NULL, EINA_FALSE, "no page handler found");
- if (page_handler->down_cb != NULL) {
+ if (page_handler->down_cb != NULL)
page_handler->down_cb(event, NULL);
- }
+
return EINA_TRUE;
}
page_handler = quickpanel_page_handler_get(page);
retif(page_handler == NULL, , "no page handler found");
- if (page_handler->scroll_start_cb != NULL) {
+ if (page_handler->scroll_start_cb != NULL)
page_handler->scroll_start_cb(event_info, NULL);
- }
+
}
}
page_handler = quickpanel_page_handler_get(page);
retif(page_handler == NULL, , "no page handler found");
- if (page_handler->scroll_done_cb != NULL) {
+ if (page_handler->scroll_done_cb != NULL)
page_handler->scroll_done_cb(event_info, NULL);
- }
- _page_mapbuf_enable_set(s_info.view_box, 0);
+
}
}
struct appdata *ad = (struct appdata *)data;
retif(ad == NULL, QP_FAIL, "Invalid parameter!");
- if (s_info.hdl_up != NULL) {
+ if (s_info.hdl_up != NULL)
ecore_event_handler_del(s_info.hdl_up);
- }
- if (s_info.hdl_down != NULL) {
+
+ if (s_info.hdl_down != NULL)
ecore_event_handler_del(s_info.hdl_down);
- }
+
return QP_OK;
}
struct appdata *ad = data;
retif(ad == NULL, , "Invalid parameter!");
- _page_mapbuf_enable_set(s_info.view_box, 0);
quickpanel_page_editing_icon_visible_status_update();
}
retif(s_info.view_scroller == NULL, , "Invalid parameter!");
_page_show(PAGE_IDX_MAIN);
- _page_mapbuf_enable_set(s_info.view_box, 0);
quickpanel_page_editing_icon_visible_status_update();
}
_page_rotation(ad);
}
+
static void _scroller_resized_cb(void *data, Evas * e,
Evas_Object * obj, void *event_info)
{
evas_object_event_callback_del(s_info.view_scroller, EVAS_CALLBACK_RESIZE, _scroller_resized_cb);
}
+
HAPI Evas_Object *quickpanel_pager_new(Evas_Object *parent, void *data)
{
Evas_Object *box = NULL;
retif(parent == NULL, NULL, "failed to memory allocation");
- if (s_info.view_scroller != NULL && s_info.view_box != NULL) {
+ if (s_info.view_scroller != NULL && s_info.view_box != NULL)
return s_info.view_scroller;
- }
+
scroller = elm_scroller_add(parent);
retif(!scroller, NULL, "fail to add scroller");
{
retif(view_name == NULL, NULL, "invalid parameter");
- if (strcmp(view_name, "SCROLLER") == 0) {
+ if (strcmp(view_name, "SCROLLER") == 0)
return s_info.view_scroller;
- } else if (strcmp(view_name, "BOX") == 0) {
+ else if (strcmp(view_name, "BOX") == 0)
return s_info.view_box;
- }
+
return NULL;
}
struct appdata *ad = quickpanel_get_app_data();
retif(ad == NULL, , "invalid parameter");
- if (need_resize) {
+ if (need_resize)
_page_rotation(ad);
- }
+
+
_page_show(page_index);
evas_object_show(s_info.view_scroller);
}
-HAPI void quickpanel_pager_mapbuf_set(int is_enable)
-{
- _page_mapbuf_enable_set(s_info.view_box, is_enable);
-}
hold_count = elm_object_scroll_hold_get(viewer);
- if (hold_count <= 0) {
+ if (hold_count <= 0)
elm_object_scroll_hold_push(viewer);
- }
+
}
static inline void _scroll_unhold(Evas_Object *viewer)
hold_count = elm_object_scroll_hold_get(viewer);
- for (i = 0 ; i < hold_count; i++) {
+ for (i = 0 ; i < hold_count; i++)
elm_object_scroll_hold_pop(viewer);
- }
+
}
static inline void _scroll_freeze(Evas_Object *viewer)
freezed_count = elm_object_scroll_freeze_get(viewer);
- if (freezed_count <= 0) {
+ if (freezed_count <= 0)
elm_object_scroll_freeze_push(viewer);
- }
+
}
static inline void _scroll_unfreeze(Evas_Object *viewer)
freezed_count = elm_object_scroll_freeze_get(viewer);
- for (i = 0 ; i < freezed_count; i++) {
+ for (i = 0 ; i < freezed_count; i++)
elm_object_scroll_freeze_pop(viewer);
- }
+
}
HAPI void quickpanel_page_handler_set(Evas_Object *page, QP_Page_Handler *handler)
Evas_Object *pager_scroller = quickpanel_pager_view_get("SCROLLER");
retif(pager_scroller == NULL, , "pager null");
- if (is_freeze) {
+ if (is_freeze)
_scroll_freeze(pager_scroller);
- } else {
+ else
_scroll_unfreeze(pager_scroller);
- }
+
}
HAPI void quickpanel_page_scroll_hold_set(Eina_Bool is_freeze)
Evas_Object *pager_scroller = quickpanel_pager_view_get("SCROLLER");
retif(pager_scroller == NULL, , "pager null");
- if (is_freeze) {
+ if (is_freeze)
_scroll_hold(pager_scroller);
- } else {
+ else
_scroll_unhold(pager_scroller);
- }
+
}
HAPI void quickpanel_page_get_recoordinated_pos(int local_x, int local_y, int *x, int *y)
break;
}
- if (x != NULL) {
+ if (x != NULL)
*x = rot_x;
- }
- if (y != NULL) {
+
+ if (y != NULL)
*y = rot_y;
- }
+
}
HAPI void quickpanel_page_get_touched_pos(int *x, int *y)
quickpanel_page_get_recoordinated_pos(local_x, local_y, &rot_x, &rot_y);
- if (x != NULL) {
+ if (x != NULL)
*x = rot_x;
- }
- if (y != NULL) {
+
+ if (y != NULL)
*y = rot_y;
- }
+
}
HAPI void quickpanel_page_editing_icon_visible_status_update(void)
ad = quickpanel_get_app_data();
retif(ad == NULL, , "invalid parameter");
- if (quickpanel_pager_current_page_get() == PAGE_IDX_EDITING) {
+ if (quickpanel_pager_current_page_get() == PAGE_IDX_EDITING)
is_visible = 1;
- } else {
+ else
is_visible = 0;
- }
+
quickpanel_datetime_editing_icon_visibility_set(is_visible);
}
* limitations under the License.
*/
-#include <stdio.h>
#include <app_preference.h>
#include <Elementary.h>
#include <tzsh.h>
{
retif(key == NULL, NULL, "invalid parameter");
- if (strcmp(key, PREF_BRIGHTNESS) == 0) {
+ if (strcmp(key, PREF_BRIGHTNESS) == 0)
return "OFF";
- } else if (strcmp(key, PREF_QUICKSETTING_ORDER) == 0) {
+ else if (strcmp(key, PREF_QUICKSETTING_ORDER) == 0)
return "wifi,gps,sound,rotate,bluetooth,mobile_data,assisitvelight,u_power_saving,wifi_hotspot,flightmode";
- } else if (strcmp(key, PREF_QUICKSETTING_FEATURED_NUM) == 0) {
+ else if (strcmp(key, PREF_QUICKSETTING_FEATURED_NUM) == 0)
return "11";
- } else if (strcmp(key, PREF_SHORTCUT_ENABLE) == 0) {
+ else if (strcmp(key, PREF_SHORTCUT_ENABLE) == 0)
return "ON";
- } else if (strcmp(key, PREF_SHORTCUT_EARPHONE_ORDER) == 0) {
+ else if (strcmp(key, PREF_SHORTCUT_EARPHONE_ORDER) == 0)
return "org.tizen.music-player,org.tizen.videos,org.tizen.phone,srfxzv8GKR.YouTube,org.tizen.voicerecorder";
- }
+
return NULL;
}
static inline int _key_validation_check(const char *key)
{
- if (strcmp(key, PREF_BRIGHTNESS) == 0) {
+ if (strcmp(key, PREF_BRIGHTNESS) == 0)
return 1;
- } else if (strcmp(key, PREF_QUICKSETTING_ORDER) == 0) {
+ else if (strcmp(key, PREF_QUICKSETTING_ORDER) == 0)
return 1;
- } else if (strcmp(key, PREF_QUICKSETTING_FEATURED_NUM) == 0) {
+ else if (strcmp(key, PREF_QUICKSETTING_FEATURED_NUM) == 0)
return 1;
- } else if (strcmp(key, PREF_SHORTCUT_ENABLE) == 0) {
+ else if (strcmp(key, PREF_SHORTCUT_ENABLE) == 0)
return 1;
- } else if (strcmp(key, PREF_SHORTCUT_EARPHONE_ORDER) == 0) {
+ else if (strcmp(key, PREF_SHORTCUT_EARPHONE_ORDER) == 0)
return 1;
- }
return 0;
}
-#include <stdio.h>
#include <signal.h>
#include <sys/utsname.h>
#include <Elementary.h>
#include "vi_manager.h"
#include "pager.h"
#include "page_base.h"
-#include "page_setting_all.h"
#include "settings.h"
#include "setting_module_api.h"
+++ /dev/null
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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 <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <time.h>
-#include <Elementary.h>
-#include <common.h>
-#include <glib.h>
-
-#define LINEMAX 256
-#define MAXFILELEN 1048576 /* 32000 */
-#define LOGFILE "/tmp/quickpanel.log"
-
-void debug_printf(char *fmt, ...)
-{
- va_list ap;
- FILE *fd = 0;
- char buf[LINEMAX] = { 0, };
- char debugString[LINEMAX] = { 0, };
-
- va_start(ap, fmt);
- vsnprintf(buf, sizeof(buf), fmt, ap);
- va_end(ap);
- int fileLen = 0;
- struct tm local_t;
- time_t current_time = 0;
- bzero((char *) &debugString, LINEMAX);
- time(¤t_time);
- /* local_t = gmtime(¤t_time); */
- gmtime_r(¤t_time, &local_t); /* for prevent 53555 */
- int len = snprintf(debugString, sizeof(debugString),
- "[%d-%02d-%02d, %02d:%02d:%02d]: ", local_t.tm_year + 1900,
- local_t.tm_mon + 1, local_t.tm_mday, local_t.tm_hour,
- local_t.tm_min, local_t.tm_sec);
- if (len == -1) {
- return;
- } else {
- debugString[len] = '\0';
- }
- len = g_strlcat(debugString, buf, LINEMAX);
- if (len >= LINEMAX) {
- /* TODO:ERROR handling */
- return;
- } else {
- debugString[len] = '\n';
- }
- /* FIXME this is for permission.. later we should fix and remove this... */
- /* system("chmod 666 "LOGFILE); */
- if ((fd = fopen(LOGFILE, "at+")) == NULL) {
- DBG("File fopen fail for writing Pwlock information");
- } else {
- int pid = -1;
- if (fwrite(debugString, strlen(debugString), 1, fd) < 1) {
- DBG("File fwrite fail for writing Pwlock information");
- fclose(fd);
- if ((pid = fork()) < 0) {
- } else if (pid == 0) {
- execl("/bin/rm", "rm", "-f", LOGFILE, (char *) 0);
- }
- /* system("rm -rf "LOGFILE); */
- } else {
- fseek(fd, 0l, SEEK_END);
- fileLen = ftell(fd);
- if (fileLen > MAXFILELEN) {
- fclose(fd);
- if ((pid = fork()) < 0) {
- return;
- } else if (pid == 0) {
- execl("/bin/rm", "rm", "-f", LOGFILE, (char *) 0);
- }
- /* system("rm -rf "LOGFILE); */
- } else {
- fclose(fd);
- }
- }
- }
-}
{
retif_nomsg(path == NULL, QP_ANIMATED_ICON_NONE);
- if (strncasecmp(path, PATH_DOWNLOAD, MIN(strlen(PATH_DOWNLOAD), strlen(path))) == 0) {
+ if (strncasecmp(path, PATH_DOWNLOAD, MIN(strlen(PATH_DOWNLOAD), strlen(path))) == 0)
return QP_ANIMATED_ICON_DOWNLOAD;
- } else if (strncasecmp(path, PATH_UPLOAD, MIN(strlen(PATH_UPLOAD), strlen(path))) == 0) {
+ else if (strncasecmp(path, PATH_UPLOAD, MIN(strlen(PATH_UPLOAD), strlen(path))) == 0)
return QP_ANIMATED_ICON_UPLOAD;
- } else if (strncasecmp(path, PATH_INSTALL, MIN(strlen(PATH_INSTALL), strlen(path))) == 0) {
+ else if (strncasecmp(path, PATH_INSTALL, MIN(strlen(PATH_INSTALL), strlen(path))) == 0)
return QP_ANIMATED_ICON_INSTALL;
- }
+
return QP_ANIMATED_ICON_NONE;
}
type = _animated_type_get(path);
- if (type == QP_ANIMATED_ICON_DOWNLOAD) {
+ if (type == QP_ANIMATED_ICON_DOWNLOAD)
layout_icon = "quickpanel/animated_icon_download";
- } else if (type == QP_ANIMATED_ICON_UPLOAD) {
+ else if (type == QP_ANIMATED_ICON_UPLOAD)
layout_icon = "quickpanel/animated_icon_upload";
- } else if (type == QP_ANIMATED_ICON_INSTALL) {
+ else if (type == QP_ANIMATED_ICON_INSTALL)
layout_icon = "quickpanel/animated_icon_install";
- } else {
+ else
return NULL;
- }
+
layout = elm_layout_add(parent);
if (layout != NULL) {
type_old = (qp_animated_icon_type)evas_object_data_get(view,
E_DATA_ANI_ICON_TYPE);
- if (type == type_old) {
+ if (type == type_old)
return 1;
- }
+
return 0;
}
struct appdata *ad = data;
retif(ad == NULL, , "Invalid parameter!");
- if (s_info.is_enabled) {
+ if (s_info.is_enabled)
return;
- }
+
quickpanel_datetime_datentime_event_set(0);
#ifdef QP_SETTING_ENABLE
- if (settings_view_featured.fini != NULL) {
+ if (settings_view_featured.fini != NULL)
settings_view_featured.fini(ad);
- }
+
#endif
#ifdef QP_BRIGHTNESS_ENABLE
- if (brightness_ctrl.fini != NULL) {
+ if (brightness_ctrl.fini != NULL)
brightness_ctrl.fini(ad);
- }
+
#endif
_delete_unpermitted_app();
struct appdata *ad = data;
retif(ad == NULL, , "Invalid parameter!");
- if (!s_info.is_enabled) {
+ if (!s_info.is_enabled)
return;
- }
+
quickpanel_datetime_datentime_event_set(1);
#ifdef QP_SETTING_ENABLE
- if (settings_view_featured.init != NULL) {
+ if (settings_view_featured.init != NULL)
settings_view_featured.init(ad);
- }
- if (settings_view_featured.init_job_cb != NULL) {
+
+
+ if (settings_view_featured.init_job_cb != NULL)
settings_view_featured.init_job_cb(ad);
- }
+
#endif
#ifdef QP_BRIGHTNESS_ENABLE
- if (brightness_ctrl.init != NULL) {
+ if (brightness_ctrl.init != NULL)
brightness_ctrl.init(ad);
- }
+
#endif
_delete_unpermitted_app();
int mode = 0;
if (vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &mode) == 0) {
- if (mode == SETTING_PSMODE_EMERGENCY) {
+ if (mode == SETTING_PSMODE_EMERGENCY)
_emergency_mode_start(data);
- } else {
+ else
_emergency_mode_stop(data);
- }
+
+
} else {
ERR("failed to get the value of VCONFKEY_SETAPPL_PSMODE");
}
_vconf_cb, ad);
msgif(ret != 0, "failed to notify key(VCONFKEY_SETAPPL_PSMODE) : %d", ret);
- if (quickpanel_emergency_mode_is_on()) {
+ if (quickpanel_emergency_mode_is_on())
s_info.is_enabled = 1;
- }
+
}
HAPI void quickpanel_emergency_mode_fini(void *data)
count = eina_list_count(s_info.permitted_apps);
for (i = 0; i < count; i++) {
permitted_app = (char *)eina_list_nth(s_info.permitted_apps, i);
- if (permitted_app != NULL && strcmp(permitted_app, appid) == 0) {
+ if (permitted_app != NULL && strcmp(permitted_app, appid) == 0)
return 1;
- }
+
}
return 0;
int mode = 0;
if (vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &mode) == 0) {
- if (mode == SETTING_PSMODE_EMERGENCY) {
+ if (mode == SETTING_PSMODE_EMERGENCY)
return 1;
- }
+
}
return 0;
DBG("Emergency mode filter is called: %s", pkgname);
if (!quickpanel_emergency_mode_is_permitted_app(pkgname)) {
- if (is_delete) {
+ if (is_delete)
notification_delete_by_priv_id(pkgname, NOTIFICATION_TYPE_NONE, priv_id);
- }
+
+
return 1;
}
HAPI int quickpanel_emergency_mode_syspopup_launch(void)
{
+
int ret;
bundle *b = NULL;
DBG("");
b = bundle_create();
- if (b == NULL) {
+ if (b == NULL)
return QP_FAIL;
- }
+
bundle_add(b, "_MODE_SYSTEM_POPUP_TYPE_", "POPUP_EMERGENCY_PSMODE");
ret = syspopup_launch(SETTING_SYSPOPUP, b);
DBG("");
bundle_free(b);
+
return QP_OK;
}
key_event = event;
if (!strcmp(key_event->keyname, KEY_HOME)) {
- if (ad->is_hardkey_cancel == EINA_FALSE) {
+ if (ad->is_hardkey_cancel == EINA_FALSE)
quickpanel_uic_close_quickpanel(false, 0);
- } else {
+ else
DBG("Cancel status, do nothing");
- }
+
} else if (!strcmp(key_event->keyname, KEY_CANCEL)) {
ad->is_hardkey_cancel = EINA_FALSE;
} else if (!strcmp(key_event->keyname, KEY_BACK)) {
if (ad->popup != NULL) {
Evas_Smart_Cb back_cb = evas_object_data_get(ad->popup, EDATA_BACKKEY_CB);
- if (back_cb != NULL) {
+ if (back_cb != NULL)
back_cb(ad->popup, ad->popup, NULL);
- }
+
+
} else {
quickpanel_uic_close_quickpanel(false, 0);
}
retif(key_event == NULL, EINA_FALSE, "Invalid parameter!");
retif(ad == NULL, EINA_FALSE, "Invalid parameter!");
- if (!strcmp(key_event->keyname, KEY_CANCEL)) {
+ if (!strcmp(key_event->keyname, KEY_CANCEL))
ad->is_hardkey_cancel = EINA_TRUE;
- } else if (!strcmp(key_event->keyname, KEY_QUICKPANEL)) {
+ else if (!strcmp(key_event->keyname, KEY_QUICKPANEL))
quickpanel_uic_toggle_openning_quickpanel();
- }
+
+
return EINA_FALSE;
}
Ecore_Event_Handler *hdl_key_up = NULL;
retif(ad == NULL, , "Invalid parameter!");
- if (elm_win_keygrab_set(ad->win, KEY_QUICKPANEL, 0, 0, 0, ELM_WIN_KEYGRAB_SHARED) == EINA_FALSE) {
+ if (elm_win_keygrab_set(ad->win, KEY_QUICKPANEL, 0, 0, 0, ELM_WIN_KEYGRAB_SHARED) == EINA_FALSE)
ERR("failed to grab KEY_QUICKPANEL");
- }
+
hdl_key_down = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _service_hardkey_down_cb, ad);
- if (hdl_key_down == NULL) {
+ if (hdl_key_down == NULL)
ERR("failed to add handler(ECORE_EVENT_KEY_DOWN)");
- }
+
+
ad->hdl_hardkey_down = hdl_key_down;
hdl_key_up = ecore_event_handler_add(ECORE_EVENT_KEY_UP, _service_hardkey_up_cb, ad);
- if (hdl_key_up == NULL) {
+ if (hdl_key_up == NULL)
ERR("failed to add handler(ECORE_EVENT_KEY_UP)");
- }
+
+
ad->hdl_hardkey_up = hdl_key_up;
ad->is_hardkey_cancel = EINA_FALSE;
}
ad->hdl_hardkey_down = NULL;
}
- if (elm_win_keygrab_unset(ad->win, KEY_QUICKPANEL, 0, 0) == EINA_FALSE) {
+ if (elm_win_keygrab_unset(ad->win, KEY_QUICKPANEL, 0, 0) == EINA_FALSE)
ERR("failed to ungrab KEY_QUICKPANEL");
- }
+
+
}
HAPI void quickpanel_keyboard_openning_init(void *data)
struct appdata *ad = data;
retif(ad == NULL, , "Invalid parameter!");
- if (elm_win_keygrab_set(ad->win, KEY_BACK, 0, 0, 0, ELM_WIN_KEYGRAB_EXCLUSIVE) == EINA_FALSE) {
+ if (elm_win_keygrab_set(ad->win, KEY_BACK, 0, 0, 0, ELM_WIN_KEYGRAB_EXCLUSIVE) == EINA_FALSE)
ERR("failed to grab KEY_BACK");
- }
- if (elm_win_keygrab_set(ad->win, KEY_MENU, 0, 0, 0, ELM_WIN_KEYGRAB_EXCLUSIVE) == EINA_FALSE) {
+
+ if (elm_win_keygrab_set(ad->win, KEY_MENU, 0, 0, 0, ELM_WIN_KEYGRAB_EXCLUSIVE) == EINA_FALSE)
ERR("failed to grab KEY_MENU");
- }
- if (elm_win_keygrab_set(ad->win, KEY_HOME, 0, 0, 0, ELM_WIN_KEYGRAB_SHARED) == EINA_FALSE) {
+
+ if (elm_win_keygrab_set(ad->win, KEY_HOME, 0, 0, 0, ELM_WIN_KEYGRAB_SHARED) == EINA_FALSE)
ERR("failed to grab KEY_HOME");
- }
+
}
struct appdata *ad = data;
retif(ad == NULL, , "Invalid parameter!");
- if (elm_win_keygrab_unset(ad->win, KEY_BACK, 0, 0) == EINA_FALSE) {
+ if (elm_win_keygrab_unset(ad->win, KEY_BACK, 0, 0) == EINA_FALSE)
ERR("failed to ungrab KEY_BACK");
- }
- if (elm_win_keygrab_unset(ad->win, KEY_MENU, 0, 0) == EINA_FALSE) {
+
+ if (elm_win_keygrab_unset(ad->win, KEY_MENU, 0, 0) == EINA_FALSE)
ERR("failed to ungrab KEY_MENU");
- }
- if (elm_win_keygrab_unset(ad->win, KEY_HOME, 0, 0) == EINA_FALSE) {
+
+ if (elm_win_keygrab_unset(ad->win, KEY_HOME, 0, 0) == EINA_FALSE)
ERR("failed to ungrab KEY_HOME");
- }
+
}
QP_LED_T *entry_1 = (QP_LED_T *)data1;
QP_LED_T *entry_2 = (QP_LED_T *)data2;
- if (entry_1 == NULL || entry_2 == NULL) {
+ if (entry_1 == NULL || entry_2 == NULL)
return 0;
- }
+
return entry_2->timestamp - entry_1->timestamp;
}
list_temp = s_led_info.list;
s_led_info.list = NULL;
EINA_LIST_FOREACH_SAFE(list_temp, l, n, led_entry) {
- if (led_entry != NULL) {
+ if (led_entry != NULL)
_led_entry_del(led_entry);
- }
+
}
eina_list_free(list_temp);
led_entry->op, led_entry->argb, led_entry->time_on, led_entry->time_off);
if (led_entry->op == NOTIFICATION_LED_OP_ON) {
- if ((ret = _led_set_mode(LED_MISSED_NOTI, LED_ON, led_entry->time_on, led_entry->time_off, 0)) == -1) {
+ if ((ret = _led_set_mode(LED_MISSED_NOTI, LED_ON, led_entry->time_on, led_entry->time_off, 0)) == -1)
ERR("failed led_set_mode:%d", ret);
- } else {
+ else
s_led_info.is_turned_on = 1;
- }
+
} else if (led_entry->op == NOTIFICATION_LED_OP_ON_CUSTOM_COLOR) {
- if ((ret = _led_set_mode(LED_MISSED_NOTI, LED_ON, led_entry->time_on, led_entry->time_off, led_entry->argb)) == -1) {
+ if ((ret = _led_set_mode(LED_MISSED_NOTI, LED_ON, led_entry->time_on, led_entry->time_off, led_entry->argb)) == -1)
ERR("failed led_set_mode:%d", ret);
- } else {
+ else
s_led_info.is_turned_on = 1;
- }
+
} else {
ERR("NOTIFICATION_LED_OP_OFF");
}
ERR("try to turn off LED");
retif(s_led_info.is_turned_on == 0 && is_force == 1, , "LED already turned off");
- if ((ret = _led_set_mode(LED_MISSED_NOTI, LED_OFF, 0, 0, 0)) == -1) {
+ if ((ret = _led_set_mode(LED_MISSED_NOTI, LED_OFF, 0, 0, 0)) == -1)
ERR("failed led_set_mode:%d", ret);
- } else {
+ else
s_led_info.is_turned_on = 0;
- }
+
}
HAPI void quickpanel_noti_led_proc(notification_h noti, int op_type)
//turn on or off LED
if (_is_led_enabled() == 1) {
led_entry = _led_list_get_first();
- if (led_entry != NULL) {
+ if (led_entry != NULL)
_noti_led_on(led_entry);
- } else {
+ else
_noti_led_off(0);
- }
+
} else {
_noti_led_off(0);
}
if (_is_led_enabled() == 1) {
led_entry = _led_list_get_first();
- if (led_entry != NULL) {
+ if (led_entry != NULL)
_noti_led_on(led_entry);
- } else {
+ else
_noti_led_off(1);
- }
+
} else {
_noti_led_off(1);
}
ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_LED_INDICATOR_NOTIFICATIONS, _led_option_vconf_cb, ad);
- if (ret != 0) {
- ERR("failed to notify key[%s] : %d",
- VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, ret);
- }
+ if (ret != 0)
+ ERR("failed to notify key[%s] : %d", VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, ret);
- if (nodes != NULL) {
+
+ if (nodes != NULL)
_led_init_data((noti_node *)nodes);
- }
+
}
HAPI void quickpanel_noti_led_fini(void *data)
retif(ad == NULL, , "Invalid parameter!");
ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_LED_INDICATOR_NOTIFICATIONS, _led_option_vconf_cb);
- if (ret != 0) {
+ if (ret != 0)
ERR("failed to ignore key[%s] : %d", VCONFKEY_SETAPPL_LED_INDICATOR_NOTIFICATIONS, ret);
- }
+
_led_list_clean_up();
}
#include <alarm.h>
#include <time.h>
-#include <unistd.h>
#include <vconf.h>
#include <system_settings.h>
#include <notification.h>
icon_path = BUTTON_ICON_NORMAL;
}
- if (icon_path == NULL) {
+ if (icon_path == NULL)
icon_path = BUTTON_ICON_NORMAL;
- }
+
image = quickpanel_setting_icon_image_new(view, icon_path);
quickpanel_setting_icon_content_set(view, image);
quickpanel_setting_icon_text_set(view, BUTTON_LABEL, state);
retif(module == NULL, , "Invalid parameter!");
ret = bt_adapter_get_state(&adapter_state);
- if (ret != BT_ERROR_NONE) {
+ if (ret != BT_ERROR_NONE)
DBG("bt_adapter_get_state failed [%d]", ret);
- }
- if (adapter_state == BT_ADAPTER_ENABLED) {
+
+ if (adapter_state == BT_ADAPTER_ENABLED)
quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_ON);
- } else {
+ else
quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_OFF);
- }
+
quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_TURN_OFF);
quickpanel_setting_module_icon_timer_del(module);
is_on = true;
}
- if (is_on == true) {
+ if (is_on == true)
quickpanel_setting_module_progress_mode_set(module, FLAG_ENABLE, FLAG_TURN_ON);
- } else {
+ else
quickpanel_setting_module_progress_mode_set(module, FLAG_ENABLE, FLAG_TURN_OFF);
- }
+
quickpanel_setting_module_icon_timer_add(module);
}
return;
}
- if (quickpanel_setting_module_is_icon_clickable(module) == 0) {
+ if (quickpanel_setting_module_is_icon_clickable(module) == 0)
return;
- }
- if (quickpanel_setting_module_dpm_state_get(module->name, &dpm_state) == 0) {
+
+ if (quickpanel_setting_module_dpm_state_get(module->name, &dpm_state) == 0)
return;
- }
+
if (dpm_state == 0) {
quickpanel_setting_module_syspopup_launch(DPM_SYSPOPUP, "id", "bluetooth");
icon_path = BUTTON_ICON_NORMAL;
}
- if (icon_path == NULL) {
+ if (icon_path == NULL)
icon_path = BUTTON_ICON_NORMAL;
- }
+
image = quickpanel_setting_icon_image_new(view, icon_path);
quickpanel_setting_icon_content_set(view, image);
quickpanel_setting_icon_text_set(view, BUTTON_LABEL, state);
ret = location_manager_is_enabled_method(LOCATIONS_METHOD_HYBRID, &status);
msgif(ret != 0, "fail to get LOCATIONS_METHOD_HYBRID:%d", ret);
- if (status == true) {
+ if (status == true)
quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_ON);
- } else {
+ else
quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_OFF);
- }
quickpanel_setting_module_icon_view_update(module,
quickpanel_setting_module_icon_state_get(module),
if (ret == false) {
if (enable == true) {
ret = location_manager_enable_method(LOCATIONS_METHOD_HYBRID, false);
- if (ret != 0) {
+ if (ret != 0)
ERR("Failed to set LOCATIONS_METHOD_HYBRID[%d]", ret);
- }
+
}
} else {
ERR("Failed to get Use my location[%d]", ret);
if (ret == false) {
if (enable == true) {
ret = location_manager_enable_method(LOCATIONS_METHOD_GPS, false);
- if (ret != 0) {
+ if (ret != 0)
ERR("Failed to set LOCATIONS_METHOD_GPS [%d]", ret);
- }
+
}
} else {
ERR("Failed to get GPS[%d]", ret);
if (ret == false) {
if (enable == true) {
ret = location_manager_enable_method(LOCATIONS_METHOD_WPS, false);
- if (ret != 0) {
+ if (ret != 0)
ERR("Failed to set LOCATIONS_METHOD_WPS [%d]", ret);
- }
+
}
} else {
ERR("Failed to get network[%d]", ret);
retif(module == NULL, , "Invalid parameter!");
- if (quickpanel_setting_module_is_icon_clickable(module) == 0) {
+ if (quickpanel_setting_module_is_icon_clickable(module) == 0)
return;
- }
- if (quickpanel_setting_module_dpm_state_get(module->name, &dpm_state) == 0) {
+
+ if (quickpanel_setting_module_dpm_state_get(module->name, &dpm_state) == 0)
return;
- }
+
if (dpm_state == 0) {
quickpanel_setting_module_syspopup_launch(DPM_SYSPOPUP, "id", "location");
};
for (i = 0; __table_handler[i].command; i++) {
- if (strcasecmp(__table_handler[i].command, command)) {
+ if (strcasecmp(__table_handler[i].command, command))
continue;
- }
+
if (__table_handler[i].handler != NULL) {
DBG("process:%s", command);
icon_path = BUTTON_ICON_NORMAL;
}
- if (icon_path == NULL) {
+ if (icon_path == NULL)
icon_path = BUTTON_ICON_NORMAL;
- }
+
image = quickpanel_setting_icon_image_new(view, icon_path);
quickpanel_setting_icon_content_set(view, image);
quickpanel_setting_icon_text_set(view, BUTTON_LABEL, state);
ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, &status);
msgif(ret != SYSTEM_SETTINGS_ERROR_NONE , "failed to notify key SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO : %d", ret);
- if (status == true) {
+ if (status == true)
quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_ON);
- } else {
+ else
quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_OFF);
- }
+
quickpanel_setting_module_icon_view_update(module, quickpanel_setting_module_icon_state_get(module), FLAG_VALUE_VOID);
}
INFO("sound : %d, vibration : %d", sound_status, vibration_status);
- if (sound_status == 1) {
+ if (sound_status == 1)
return SP_STATUS_SOUND;
- } else if (vibration_status == 1) {
+ else if (vibration_status == 1)
return SP_STATUS_VIBRATE;
- }
+
return SP_STATUS_MUTE;
}
static void _play_snd_job_cb(void *data)
{
- if (feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_SILENT_OFF) != FEEDBACK_ERROR_NONE) {
+ if (feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_SILENT_OFF) != FEEDBACK_ERROR_NONE)
ERR("failed to play a sound");
- }
+
}
static void _play_vib_job_cb(void *data)
{
- if (feedback_play_type(FEEDBACK_TYPE_VIBRATION, FEEDBACK_PATTERN_VIBRATION_ON) != FEEDBACK_ERROR_NONE) {
+ if (feedback_play_type(FEEDBACK_TYPE_VIBRATION, FEEDBACK_PATTERN_VIBRATION_ON) != FEEDBACK_ERROR_NONE)
ERR("failed to play a vibration");
- }
+
}
static void _view_update(Evas_Object *view, int state, int flag_extra_1, int flag_extra_2)
view = quickpanel_setting_icon_new(parent);
retif(view == NULL, NULL, "failed to create icon");
- if (module->label_get != NULL) {
+ if (module->label_get != NULL)
quickpanel_setting_icon_text_set(view, module->label_get(), ICON_VIEW_STATE_OFF);
- }
+
if (module->handler_press != NULL) {
- if (module->is_disable_feedback) {
+ if (module->is_disable_feedback)
quickpanel_setting_icon_click_cb_without_feedback_add(view, module->handler_press, module);
- } else {
+ else
quickpanel_setting_icon_click_cb_add(view, module->handler_press, module);
- }
+
}
evas_object_data_set(view, E_DATA_MODULE_INFO, module);
evas_object_show(view);
if (module->view_update != NULL) {
EINA_LIST_FOREACH_SAFE(module->view_list, l, l_next, view) {
- if (_icon_container_type_get(view) == container_type) {
+ if (_icon_container_type_get(view) == container_type)
return view;
- }
+
}
}
{
retif(module == NULL, , "invalid parameter");
- if (module->status_update != NULL) {
+ if (module->status_update != NULL)
module->status_update(module, flag_extra_1, flag_extra_2);
- }
+
}
HAPI int quickpanel_setting_module_is_icon_clickable(QP_Module_Setting *module)
retif(module == NULL, 0, "invalid parameter");
retif(module->loader == NULL, 0, "invalid parameter");
- if (module->loader->timer != NULL) {
+ if (module->loader->timer != NULL)
return 0;
- }
- if (module->loader->state_icon == STATE_ICON_BUSY) {
+
+ if (module->loader->state_icon == STATE_ICON_BUSY)
return 0;
- }
+
return 1;
}
#ifdef PROGRESSBAR_ENABLED
_progressbar_set(view, is_enable, is_request_on);
#else
- if (is_enable) {
+ if (is_enable)
quickpanel_setting_icon_state_progress_set(view);
- }
+
#endif
}
- if (is_enable == FLAG_ENABLE) {
+ if (is_enable == FLAG_ENABLE)
module->loader->state_icon = STATE_ICON_BUSY;
- } else {
+ else
module->loader->state_icon = STATE_ICON_IDLE;
- }
+
}
HAPI void quickpanel_setting_module_icon_destroy(QP_Module_Setting *module, Evas_Object *icon)
return;
}
- if (key != NULL && value != NULL) {
+
+ if (key != NULL && value != NULL)
app_control_add_extra_data(service, key, value);
- }
+
app_control_set_app_id(service, appid);
ret = app_control_send_launch_request(service, NULL, NULL);
- if (ret != APP_CONTROL_ERROR_NONE) {
+ if (ret != APP_CONTROL_ERROR_NONE)
ERR("Failed to send launch request[%d]", ret);
- }
+
+
app_control_destroy(service);
}
return 0;
}
- if (strncmp(module_name, "gps", strlen(module_name)) == 0) {
+ if (strncmp(module_name, "gps", strlen(module_name)) == 0)
ret = dpm_restriction_get_location_state(handle, &dpm_state);
- } else if (strncmp(module_name, "bluetooth", strlen(module_name)) == 0) {
+ else if (strncmp(module_name, "bluetooth", strlen(module_name)) == 0)
ret = dpm_restriction_get_bluetooth_mode_change_state(handle, &dpm_state);
- } else if (strncmp(module_name, "wifi", strlen(module_name)) == 0) {
+ else if (strncmp(module_name, "wifi", strlen(module_name)) == 0)
ret = dpm_restriction_get_wifi_state(handle, &dpm_state);
- }
+
dpm_manager_destroy(handle);
QP_Module_Setting *module = NULL;
module = quickpanel_settings_module_get_by_name(module_name);
- if (module->state_change) {
+ if (module->state_change)
module->state_change(module);
- }
+
}
#include "modules.h"
#include "settings.h"
#include "setting_utils.h"
-#include "pager.h"
-#include "pager_common.h"
#include "preference.h"
#ifdef QP_SCREENREADER_ENABLE
#include "list_util.h"
#include "quickpanel_def.h"
#include "settings_gridbox.h"
-#include "pager.h"
#define E_DATA_LAYOUT_PORTRAIT "layout_portrait"
#define E_DATA_LAYOUT_LANDSCAPE "layout_landscape"
retif(ad == NULL, NULL, "invalid data.");
retif(gridbox == NULL, NULL, "invalid parameter");
- if (ad->angle == 270 || ad->angle == 90) {
+ if (ad->angle == 270 || ad->angle == 90)
info_layout = evas_object_data_get(gridbox, E_DATA_LAYOUT_LANDSCAPE);
- } else {
+ else
info_layout = evas_object_data_get(gridbox, E_DATA_LAYOUT_PORTRAIT);
- }
+
return info_layout;
}
item_type = evas_object_data_get(icon, E_DATA_ITEM_TYPE);
retif(item_type == NULL, 1, "invalid parameter");
- if (strcmp(item_type, SETTINGS_GRIDBOX_ITEM_ICON) == 0) {
+ if (strcmp(item_type, SETTINGS_GRIDBOX_ITEM_ICON) == 0)
return 1;
- }
+
return 0;
}
int row_y = info_layout->padding_top
+ ((info_layout->child_h + info_layout->padding_between_v) * row);
- if (x != NULL) {
+ if (x != NULL)
*x = row_x;
- }
- if (y != NULL) {
+
+ if (y != NULL)
*y = row_y;
- }
+
}
static inline void _item_move_and_resize(Evas_Object *item, int x, int y, int w, int h)
_item_pos_get(order_children - 1, &off_x, &off_y, info_layout);
_item_move_and_resize(opt->obj, x + off_x + info_layout->child_w, y + off_y,
info_layout->padding_between_h, info_layout->child_h);
- if ((order_divider % info_layout->n_per_rows) == 0) {
+
+ if ((order_divider % info_layout->n_per_rows) == 0)
evas_object_hide(opt->obj);
- } else {
+ else
evas_object_show(opt->obj);
- }
+
+
order_divider++;
list_pos_info =
_position_info_add(list_pos_info, 0, order_obj, off_x + info_layout->child_w, off_y,
evas_object_data_del(gridbox, E_DATA_LAYOUT_PORTRAIT);
evas_object_data_del(gridbox, E_DATA_LAYOUT_LANDSCAPE);
- if (info_layout_portrait != NULL) {
+ if (info_layout_portrait != NULL)
free(info_layout_portrait);
- }
- if (info_layout_landscape != NULL) {
+
+
+ if (info_layout_landscape != NULL)
free(info_layout_landscape);
- }
+
}
HAPI Evas_Object *quickpanel_settings_gridbox_create(Evas_Object *parent, void *data)
{
evas_object_data_set(item, E_DATA_ITEM_TYPE, item_type);
- if (is_prepend == SETTINGS_GRIDBOX_PREPEND) {
+ if (is_prepend == SETTINGS_GRIDBOX_PREPEND)
elm_box_pack_start(gridbox, item);
- } else {
+ else
elm_box_pack_end(gridbox, item);
- }
+
}
HAPI void quickpanel_settings_gridbox_item_remove(Evas_Object *gridbox, Evas_Object *item)
retif(item_list == NULL, , "invalid parameter");
EINA_LIST_FOREACH_SAFE(item_list, l, l_next, obj) {
- if (obj != NULL) {
+ if (obj != NULL)
quickpanel_settings_gridbox_item_remove(gridbox, obj);
- }
+
}
eina_list_free(item_list);
Eina_List *item_list = elm_box_children_get(gridbox);
retif(item_list == NULL, , "invalid parameter");
- if (angle == 270 || angle == 90) {
+ if (angle == 270 || angle == 90)
signal = "icon.landscape";
- } else {
+ else
signal = "icon.portrait";
- }
+
EINA_LIST_FOREACH_SAFE(item_list, l, l_next, obj) {
if (obj != NULL) {
#include "setting_utils.h"
#include "setting_module_api.h"
#include "accessibility.h"
-#include "pager.h"
-#include "pager_common.h"
#define E_DATA_ICON_CLICKED_CB "clicked_cb"
#define E_DATA_ICON_ORIGINAL_OBJ "original_obj"
s_info.timer_longpress = NULL;
}
- quickpanel_page_get_touched_pos(&(s_info.down_x), NULL);
-
s_info.is_longpressed = EINA_FALSE;
s_info.timer_longpress = ecore_timer_add(TAP_AND_DELAY_LONG, _icon_handler_longpress, obj);
}
+++ /dev/null
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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 <Elementary.h>
-#include <glib.h>
-
-#include <notification.h>
-#include <tzsh.h>
-#include <tzsh_quickpanel_service.h>
-
-#include "common.h"
-#include "common_uic.h"
-#include "quickpanel-ui.h"
-#include "quickpanel_def.h"
-#include "modules.h"
-#include "preference.h"
-#include "settings.h"
-#include "setting_utils.h"
-#include "settings_gridbox.h"
-#include "setting_module_api.h"
-#include "settings_view_all.h"
-#include "pager.h"
-#include "pager_common.h"
-#include "page_setting_all.h"
-#include "accessibility.h"
-
-#ifdef QP_EMERGENCY_MODE_ENABLE
-#include "emergency_mode.h"
-#endif
-
-static int _init(void *data);
-static int _fini(void *data);
-static int _resume(void *data);
-static void _opened(void *data);
-static void _closed(void *data);
-static void _refresh(void *data);
-static void _view_icons_add(void);
-static void _view_icons_del(void);
-
-QP_Module settings_view_all = {
- .name = "settings_view_all",
- .init = _init,
- .fini = _fini,
- .resume = _resume,
- .qp_opened = _opened,
- .qp_closed = _closed,
- .refresh = _refresh,
- .lang_changed = NULL,
-};
-
-static int _icons_rotation_set(int angle)
-{
- Evas_Object *icon = NULL;
- Eina_List *icons = NULL;
- Evas_Object *section = NULL;
- Eina_List *l = NULL;
- const char *signal = NULL;
-
- retif(angle < 0, -1, "angle is %d", angle);
-
- section = quickpanel_page_setting_all_view_get("ACTIVE.BUTTONS");
- retif(!section, -1, "box is NULL");
-
- icons = elm_box_children_get(section);
- retif(!icons, -1, "icons list is NULL");
-
- if (angle % 180 == 0)
- signal = "icon.portrait";
- else
- signal = "icon.landscape";
-
-
- EINA_LIST_FOREACH(icons, l, icon) {
- elm_object_signal_emit(icon, signal, "quickpanl.prog");
- edje_object_message_signal_process(_EDJ(icon));
- }
-
- eina_list_free(icons);
-
- return 0;
-}
-
-static Evas_Object *_icon_create(QP_Module_Setting *module, Evas_Object *parent)
-{
- retif(module == NULL, NULL, "Invalid parameter!");
- retif(parent == NULL, NULL, "Invalid parameter!");
-
- return quickpanel_setting_module_icon_create(module, parent);
-}
-
-static Evas_Object *_divider_create(Evas_Object *parent)
-{
- Evas_Object *divider = NULL;
- retif(parent == NULL, NULL, "invalid parameter");
-
- struct appdata *ad = (struct appdata*)quickpanel_get_app_data();
- retif(ad == NULL, NULL, "application data is NULL");
-
- divider = quickpanel_uic_load_edj(parent, util_get_res_file_path(DEFAULT_EDJ), "quickpanel/setting_icon_divider", 0);
-
- retif(divider == NULL, NULL, "failed to load divider");
-
- return divider;
-}
-
-static void _icon_pack(Evas_Object *gridbox, Evas_Object *icon, int need_divider)
-{
- Evas_Object *divider = NULL;
- retif(gridbox == NULL, , "Invalid parameter!");
- retif(icon == NULL, , "Invalid parameter!");
-
- quickpanel_settings_gridbox_item_add(gridbox, icon, SETTINGS_GRIDBOX_ITEM_ICON, SETTINGS_GRIDBOX_APPEND);
-
- if (need_divider == 1) {
- divider = _divider_create(gridbox);
- if (divider != NULL) {
- quickpanel_settings_gridbox_item_add(gridbox, divider,
- SETTINGS_GRIDBOX_ITEM_DIVIDER, SETTINGS_GRIDBOX_APPEND);
- }
- }
-}
-
-static void _view_icons_add(void)
-{
- int index = 0, total = 0;
- Eina_List *l;
- Eina_List *l_next;
- Evas_Object *gridbox = NULL;
- Evas_Object *icon = NULL;
- QP_Module_Setting *module = NULL;
- Eina_List *list_all_icon = NULL;
- Evas_Object *layout = quickpanel_page_setting_all_view_get("LAYOUT");
- retif(layout == NULL, , "Invalid parameter!");
-
- quickpanel_settings_all_list_get(&list_all_icon);
- retif(list_all_icon == NULL, , "Invalid parameter!");
-
- gridbox = quickpanel_page_setting_all_view_get("ACTIVE.BUTTONS");
- if (gridbox == NULL) {
- gridbox = quickpanel_settings_gridbox_create(layout, quickpanel_get_app_data());
- quickpanel_page_setting_all_view_set("ACTIVE.BUTTONS", gridbox);
- }
-
- total = eina_list_count(list_all_icon);
- DBG("total:%d", total);
- EINA_LIST_FOREACH_SAFE(list_all_icon, l, l_next, module) {
- icon = _icon_create(module, gridbox);
- if (icon != NULL) {
- _icon_pack(gridbox, icon, (index != total - 1) ? 1 : 0);
- quickpanel_setting_module_icon_add(module, icon, QP_SETTING_ICON_CONTAINER_ALL_LIST);
- quickpanel_setting_module_icon_status_update(module, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
- }
- DBG("all list:%s", module->name);
- index++;
- }
-
- eina_list_free(list_all_icon);
-}
-
-static void _view_icons_del(void)
-{
- Eina_List *l;
- Eina_List *l_next;
- Evas_Object *icon = NULL;
- QP_Module_Setting *module = NULL;
- Eina_List *list_icons = NULL;
- Evas_Object *box = quickpanel_page_setting_all_view_get("ACTIVE.BUTTONS");
- retif(box == NULL, , "Invalid parameter!");
-
- list_icons = elm_box_children_get(box);
-
- EINA_LIST_FOREACH_SAFE(list_icons, l, l_next, icon) {
- module = quickpanel_setting_module_get_from_icon(icon);
- quickpanel_setting_module_icon_remove(module, icon);
- elm_box_unpack(box, icon);
- if (icon != NULL) {
- evas_object_del(icon);
- icon = NULL;
- }
- }
-
- eina_list_free(list_icons);
-}
-
-static int _view_create(void *data)
-{
- _view_icons_add();
-
- return QP_OK;
-}
-
-static int _view_destroy(void *data)
-{
- _view_icons_del();
-
- return QP_OK;
-}
-
-/*****************************************************************************
- *
- * Util functions
- *
- *****************************************************************************/
-static int _init(void *data)
-{
- struct appdata *ad = (struct appdata *)data;
- retif(ad == NULL, QP_FAIL, "Invalid parameter!");
-
- _view_create(data);
-
- return QP_OK;
-}
-
-static int _fini(void *data)
-{
- struct appdata *ad = (struct appdata *)data;
- retif(ad == NULL, QP_FAIL, "Invalid parameter!");
-
- _view_destroy(ad);
-
- return QP_OK;
-}
-
-static int _resume(void *data)
-{
- struct appdata *ad = data;
- retif(ad == NULL, QP_FAIL, "Invalid parameter!");
-
- return QP_OK;
-}
-
-static void _opened(void *data)
-{
- struct appdata *ad = data;
- retif(ad == NULL, , "Invalid parameter!");
-}
-
-static void _closed(void *data)
-{
- struct appdata *ad = data;
- retif(ad == NULL, , "Invalid parameter!");
-}
-
-static void _refresh(void *data)
-{
- struct appdata *ad = data;
- retif(ad == NULL, , "Invalid parameter!");
-
- _icons_rotation_set(ad->angle);
-}
-
-HAPI void quickpanel_setting_view_all_reload(Eina_List *list_all_module)
-{
- int index = 0, total = 0;
- Eina_List *l;
- Eina_List *l_next;
- Evas_Object *gridbox = NULL;
- Evas_Object *icon = NULL;
- QP_Module_Setting *module = NULL;
- retif(list_all_module == NULL, , "Invalid parameter!");
-
- gridbox = quickpanel_page_setting_all_view_get("ACTIVE.BUTTONS");
- retif(gridbox == NULL, , "Invalid parameter!");
-
- quickpanel_settings_gridbox_unpack_all(gridbox);
-
- total = eina_list_count(list_all_module);
- DBG("total:%d", total);
- EINA_LIST_FOREACH_SAFE(list_all_module, l, l_next, module) {
- if ((icon = quickpanel_setting_module_icon_get(module,
- QP_SETTING_ICON_CONTAINER_ALL_LIST)) == NULL) {
- icon = _icon_create(module, gridbox);
- }
- if (icon != NULL) {
- _icon_pack(gridbox, icon, (index != total - 1) ? 1 : 0);
- quickpanel_setting_module_icon_add(module, icon, QP_SETTING_ICON_CONTAINER_ALL_LIST);
- quickpanel_setting_module_icon_status_update(module, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
- }
- DBG("all list:%s", module->name);
- index++;
- }
-}
#include "settings_gridbox.h"
#include "setting_module_api.h"
#include "settings_view_featured.h"
-#include "pager.h"
-#include "pager_common.h"
#include "accessibility.h"
#ifdef QP_EMERGENCY_MODE_ENABLE
if (ad->win != NULL) {
focused_obj = elm_object_focused_object_get(ad->win);
- if (focused_obj != NULL) {
+ if (focused_obj != NULL)
elm_object_focus_set(focused_obj, EINA_FALSE);
- }
+
}
}
quickpanel_setting_container_rotation_set(ad->ly, ad->angle);
quickpanel_setting_icons_rotation_set(ad->ly, ad->angle);
- if (ad->is_opened == 0) {
+
+ if (ad->is_opened == 0)
quickpanel_setting_stop(ad->ly, 1);
- }
+
}
static void _lang_changed(void *data)
struct appdata *ad = data;
retif(ad == NULL, , "Invalid parameter!");
- if (ad->is_opened == 0) {
+ if (ad->is_opened == 0)
quickpanel_setting_stop(ad->ly, 0);
- }
+
}
HAPI Eina_Bool quickpanel_settings_is_in_left_edge(void)
{
- if (quickpanel_setting_scroll_page_get(quickpanel_get_app_data()) == 0) {
+ if (quickpanel_setting_scroll_page_get(quickpanel_get_app_data()) == 0)
return EINA_TRUE;
- }
+
return EINA_FALSE;
}
retif(box == NULL, , "Invalid parameter!");
#ifdef QP_EMERGENCY_MODE_ENABLE
- if (quickpanel_emergency_mode_is_on()) {
+ if (quickpanel_emergency_mode_is_on())
return;
- }
+
#endif
- if (quickpanel_uic_opened_reason_get() == OPENED_BY_CMD_SHOW_SETTINGS) {
+ if (quickpanel_uic_opened_reason_get() == OPENED_BY_CMD_SHOW_SETTINGS)
return;
- }
+
list_featured_icon = elm_box_children_get(box);
if (list_featured_icon != NULL) {
#include <Elementary.h>
-#include <stdio.h>
#include <stdlib.h>
#include <dlog.h>
#include <vconf.h>
#include "common.h"
#include "list_util.h"
#include "vi_manager.h"
-#include "pager.h"
static int _init(void *data);
static int _fini(void *data);
* workaround - turn off mapbuf
* if mapbuf is enabled, geometry information from object become invalid
*/
- quickpanel_pager_mapbuf_set(0);
if (vi->init_cb != NULL)
vi->init_cb(vi);