align, 0.5 0.0;
fixed, 1 1;
}
+ description {
+ state, "mute" 0.0;
+ inherit, "default" 0.0;
+ visible, 0;
+ }
}
part {
name, "padding.progressbar";
align, 0.5 0.0;
fixed, 1 1;
}
+ description {
+ state, "mute" 0.0;
+ inherit, "default" 0.0;
+ visible, 0;
+ }
}
part {
name, "padding.icon";
description {
state, "mute" 0.0;
inherit, "default" 0.0;
+ rel1 {
+ to, "part.volume";
+ relative, 0.5 0.5;
+ }
+ rel2 {
+ to, "part.volume";
+ relative, 0.5 0.5;
+ }
+ align, 0.5 0.5;
image.normal, "ic_volume_mute.png";
}
}
signal, SIGNAL_SHOW_MUTE;
source, SOURCE_PROGRAM;
action, STATE_SET "mute" 0.0;
+ target, PART_VOLUME_TEXT;
+ target, PART_VOLUME_PROGRESSBAR;
target, PART_VOLUME_ICON;
}
program {
signal, SIGNAL_HIDE_MUTE;
source, SOURCE_PROGRAM;
action, STATE_SET "default" 0.0;
+ target, PART_VOLUME_TEXT;
+ target, PART_VOLUME_PROGRESSBAR;
target, PART_VOLUME_ICON;
}
}
ad = data;
- _hide(ad);
-
ad->hide_timer = NULL;
+ if (!volume_is_mute())
+ _hide(ad);
+
return ECORE_CALLBACK_CANCEL;
}
if (ad->hide_timer)
ecore_timer_reset(ad->hide_timer);
+ else
+ ad->hide_timer = ecore_timer_add(HIDE_DUR, _hide_timer, ad);
if (!strcmp(ev->keyname, KEY_VOLUMEUP) ||
!strcmp(ev->keyname, KEY_VOLUMEUP_REMOTE)) {
{
int vol, r;
- r = sound_manager_get_volume(SOUND_TYPE_MEDIA, &vol);
- if (r < 0)
- return -1;
-
- return vol;
+ if (volume_is_mute())
+ return volume;
+ else {
+ r = sound_manager_get_volume(SOUND_TYPE_MEDIA, &vol);
+ if (r < 0)
+ return -1;
+
+ return vol;
+ }
}