SIGNAL_COOL_DOWN_CHANGED,
cooldown_changed,
(void *)ops);
+
if (!release_handler) {
_E("Failed to add signal handler");
return -ENOMEM;
char data[8];
int ret;
+ _I("Poweroff is selected");
+ unload_simple_popup(ops);
+
param[0] = POWER_OPERATION_OFF;
snprintf(data, sizeof(data), "0");
param[1] = data;
if (ret < 0)
_E("Failed to request poweroff to deviced (%d)", ret);
+}
+static void cooldown_poweroff_terminate(const struct popup_ops *ops)
+{
terminate_if_no_popup();
}
{
_I("Warning is selected");
- remove_dbus_signal_handler();
-
unload_simple_popup(ops);
+}
+
+static void cooldown_warning_terminate(const struct popup_ops *ops)
+{
cooldown_send_warning_signal(ops);
- window_terminate();
+
+ remove_dbus_signal_handler();
+ terminate_if_no_popup();
}
static Eina_Bool beep_time_expired(void *data)
.left_text = "IDS_COM_SK_OK",
.left = cooldown_poweroff,
.pre = cooldown_poweroff_timer,
- .terminate = cooldown_poweroff,
+ .terminate = cooldown_poweroff_terminate,
};
static const struct popup_ops cooldown_poweron_ops = {
.left_text = "IDS_COM_SK_OK",
.left = cooldown_warning,
.pre = cooldown_warning_timer,
- .terminate = cooldown_warning,
+ .terminate = cooldown_warning_terminate,
};
/* Constructor to register cooldown button */
if (!ops) return -EINVAL;
ret = get_object_by_ops(ops, &obj);
- if (ret < 0) return -EINVAL;
+ if (ret < 0)
+ return -EINVAL;
win = get_window();
- if (!win) return -ENOMEM;
+ if (!win)
+ return -ENOMEM;
evas_object_show(win);
popup = elm_popup_add(win);
- if (!popup) return -ENOMEM;
+ if (!popup)
+ return -ENOMEM;
elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
static void usb_device_confirm_terminate(const struct popup_ops *ops)
{
_I("terminate usb device confirm popup");
- unload_simple_popup(ops);
send_result_dbus_signal(USB_DEVICE_CONFIRM_NOK);
terminate_if_no_popup();
}
static void usbhost_confirm_terminate(const struct popup_ops *ops)
{
_I("terminate usb device confirm popup");
- unload_simple_popup(ops);
terminate_if_no_popup();
}
elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
ret = usbhost_get_contents(b, content, sizeof(content));
- if (ret<0) return -EINVAL;
+ if (ret < 0)
+ return -EINVAL;
elm_object_text_set(label, content);
evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 0.0);