filema_opingo gadget: when an operation need attention show a red led with a strobe (similar to terminology).

when the led is shown the user can press the notification to jump to the relative window.

NOTE:Atm this is implemented only in the gadget, if no one object I will port also in the filman window.

raster: hope your eagle-eye will like ;)




SVN revision: 79792
This commit is contained in:
Davide Andreoli 2012-11-28 22:38:34 +00:00
parent 43addec4c7
commit cd0fdfc3a7
5 changed files with 113 additions and 13 deletions

View File

@ -200,6 +200,8 @@ img/knob_sz_22.png \
img/knob_sz_24.png \
img/led_dark.png \
img/led_light.png \
img/led_red_light.png \
img/led_strobe.png \
img/led_tiny_green.png \
img/led_tiny_orange.png \
img/led_square_base.png \

View File

@ -1657,6 +1657,8 @@ group { name: "e/fileman/default/progress";
images.image: "media_busy_progress.png" COMP;
images.image: "sym_close_light_normal.png" COMP;
images.image: "sym_close_light_selected.png" COMP;
images.image: "led_red_light.png" COMP;
images.image: "led_strobe.png" COMP;
parts {
part { name: "base"; type: SPACER;
description { state: "default" 0.0;
@ -1708,6 +1710,19 @@ group { name: "e/fileman/default/progress";
visible: 1;
}
}
part { name: "led_clip"; type: RECT;
description { state: "default" 0.0;
rel1.offset: -20 -20;
rel2.offset: 19 19;
color: 255 255 255 0;
visible: 0;
}
description { state: "active" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255;
visible: 1;
}
}
part { name: "knob"; mouse_events: 0;
clip_to: "busy_clip";
description { state: "default" 0.0;
@ -1736,6 +1751,45 @@ group { name: "e/fileman/default/progress";
map.rotation.z: 360;
}
}
part { name: "attention_event"; mouse_events: 1;
type: RECT;
description { state: "default" 0.0;
color: 0 0 0 0;
visible: 0;
}
description { state: "active" 0.0;
color: 0 0 0 0;
visible: 1;
}
}
part { name: "led"; mouse_events: 0;
clip_to: "led_clip";
description { state: "default" 0.0;
image.normal: "led_red_light.png";
min: 30 30;
max: 30 30;
fixed: 1 1;
align: 0.0 0.5;
}
}
part { name: "led_spinner"; mouse_events: 0;
clip_to: "led_clip";
description { state: "default" 0.0;
rel1.to: "led";
rel2.to: "led";
min: 45 45;
max: 45 45;
fixed: 1 1;
image.normal: "led_strobe.png";
map.on: 1;
map.smooth: 1;
map.rotation.center: "led";
}
description { state: "spin" 0.0;
inherit: "default" 0.0;
map.rotation.z: 360;
}
}
part { name: "close";
description { state: "default" 0.0;
image.normal: "sym_close_light_normal.png";
@ -1835,6 +1889,36 @@ group { name: "e/fileman/default/progress";
action: STATE_SET "default" 0.0;
target: "knob_spinner";
}
program {
signal: "e,state,attention,start"; source: "e";
action: STATE_SET "active" 0.0;
target: "led_clip";
target: "attention_event";
}
program {
signal: "e,state,attention,stop"; source: "e";
action: STATE_SET "default" 0.0;
transition: SINUSOIDAL 0.6;
target: "led_clip";
target: "attention_event";
after: "led_stop_spin";
}
program { name: "led_spin";
signal: "e,state,attention,start"; source: "e";
action: STATE_SET "spin" 0.0;
transition: LINEAR 0.6;
target: "led_spinner";
after: "led_spin2";
}
program { name: "led_spin2";
action: STATE_SET "default" 0.0;
target: "led_spinner";
after: "led_spin";
}
program { name: "led_stop_spin";
action: ACTION_STOP;
target: "led_spin";
}
program {
signal: "mouse,down,1*"; source: "close_event";
action: STATE_SET "selected" 0.0;
@ -1849,10 +1933,11 @@ group { name: "e/fileman/default/progress";
signal: "mouse,clicked,1*"; source: "close_event";
action: SIGNAL_EMIT "e,fm,operation,abort" "";
}
/* XXX: implement these
program {
signal: "e,action,set,need_attention"; source: "e";
signal: "mouse,clicked,1*"; source: "attention_event";
action: SIGNAL_EMIT "e,fm,window,jump" "";
}
/* XXX: implement these
program {
signal: "e,action,set,normal"; source: "e";
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -58,7 +58,8 @@ _opinfo_op_registry_listener(void *data, const E_Fm2_Op_Registry_Entry *ere)
if (!o || !ere) return;
// Don't show if the operation keep less than 1 second
if (ere->start_time + 1.0 > ecore_loop_time_get()) return;
if (!ere->needs_attention && (ere->start_time + 1.0 > ecore_loop_time_get()))
return;
// Update icon
switch (ere->op)
@ -82,13 +83,7 @@ _opinfo_op_registry_listener(void *data, const E_Fm2_Op_Registry_Entry *ere)
default:
edje_object_signal_emit(o, "e,action,icon,unknown", "e");
}
// Update has/none linked efm window
if (e_win_evas_object_win_get(ere->e_fm))
edje_object_signal_emit(o, "state,set,window,exist", "fileman_opinfo");
else
edje_object_signal_emit(o, "state,set,window,absent", "fileman_opinfo");
// Update information text
switch (ere->status)
{
@ -175,11 +170,27 @@ _opinfo_op_registry_listener(void *data, const E_Fm2_Op_Registry_Entry *ere)
}
}
// Update attention
// Show/hide the red attention led
if (ere->needs_attention)
edje_object_signal_emit(o, "e,action,set,need_attention", "e");
{
if (!evas_object_data_get(o, "attention_started"))
{
evas_object_data_set(o, "attention_started", o);
edje_object_signal_emit(o, "e,state,attention,start", "e");
if (evas_object_data_get(o, "attention_stopped"))
evas_object_data_del(o, "attention_stopped");
}
}
else
edje_object_signal_emit(o, "e,action,set,normal", "e");
{
if (!evas_object_data_get(o, "attention_stopped"))
{
evas_object_data_set(o, "attention_stopped", o);
edje_object_signal_emit(o, "e,state,attention,stop", "e");
if (evas_object_data_get(o, "attention_started"))
evas_object_data_del(o, "attention_started");
}
}
// Update gauge
edje_object_part_drag_size_set(o, "e.gauge.bar",
@ -276,6 +287,8 @@ _opinfo_op_registry_entry_add_cb(void *data, __UNUSED__ int type, void *event)
e_theme_edje_object_set(o, "base/theme/fileman", "e/fileman/default/progress");
edje_object_signal_callback_add(o, "e,fm,operation,abort", "",
_opinfo_op_registry_abort_cb, (void*)(long)ere->id);
edje_object_signal_callback_add(o, "e,fm,window,jump", "",
_opinfo_op_registry_window_jump_cb, (void*)(long)ere->id);
e_box_pack_end(inst->o_box, o);
e_fm2_op_registry_entry_listener_add(ere, _opinfo_op_registry_listener,