static Eina_Bool
progressbar_timer_cb(void *data)
{
- Evas_Object *popup = data;
- Evas_Object *progressbar = evas_object_data_get(popup, "progressbar");
+ struct object_ops *obj = data;
+ Evas_Object *progressbar = evas_object_data_get(obj->popup, "progressbar");
double value = 0.0;
value = elm_progressbar_value_get(progressbar);
if (value == 1.0) {
- evas_object_data_del(popup, "timer");
- evas_object_del(popup);
+ evas_object_data_del(obj->popup, "timer");
+ overheat_poweroff(obj->ops);
return ECORE_CALLBACK_CANCEL;
}
value = value + 0.01;
unregister_handlers(ops);
}
+static bool overheat_skip(bundle *b, const struct popup_ops *ops)
+{
+ struct object_ops *obj;
+ int ret;
+
+ ret = get_object_by_ops(&overheat_ops, &obj);
+ if (ret == 0 && obj->popup)
+ return true;
+
+ ret = get_object_by_ops(&overheat_poweroff_warning_ops, &obj);
+ if (ret == 0 && obj->popup)
+ return true;
+
+ return false;
+}
+
int overheat_popup(bundle *b, const struct popup_ops *ops)
{
Evas_Object *popup;
evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_progressbar_pulse(progressbar, EINA_TRUE);
elm_object_part_content_set(layout, "processing", progressbar);
- timer = ecore_timer_add(0.3, progressbar_timer_cb, popup);
+ timer = ecore_timer_add(0.3, progressbar_timer_cb, obj);
evas_object_data_set(popup, "progressbar", progressbar);
evas_object_data_set(popup, "timer", timer);
static const struct popup_ops overheat_ops = {
.name = "overheat", //overheat first popup
.show = overheat_popup,
+ .skip = overheat_skip,
.pre = overheat_launch,
.terminate = overheat_terminate,
};