forked from enlightenment/enlightenment
Added a config option for enabling/disabling the Popup on volume change via keybinding.
SVN revision: 53546
This commit is contained in:
parent
dd641e9259
commit
1feca166c6
|
@ -6,6 +6,7 @@ struct _E_Config_Dialog_Data
|
||||||
{
|
{
|
||||||
int lock_sliders;
|
int lock_sliders;
|
||||||
int show_locked;
|
int show_locked;
|
||||||
|
int keybindings_popup;
|
||||||
int card_num;
|
int card_num;
|
||||||
int channel;
|
int channel;
|
||||||
const char *card;
|
const char *card;
|
||||||
|
@ -21,6 +22,7 @@ struct _E_Config_Dialog_Data
|
||||||
Evas_Object *frame;
|
Evas_Object *frame;
|
||||||
Evas_Object *lock_sliders;
|
Evas_Object *lock_sliders;
|
||||||
Evas_Object *show_locked;
|
Evas_Object *show_locked;
|
||||||
|
Evas_Object *keybindings_popup;
|
||||||
} general;
|
} general;
|
||||||
struct mixer_config_ui_cards
|
struct mixer_config_ui_cards
|
||||||
{
|
{
|
||||||
|
@ -110,6 +112,7 @@ _create_data(E_Config_Dialog *dialog)
|
||||||
cfdata->conf = conf;
|
cfdata->conf = conf;
|
||||||
cfdata->lock_sliders = conf->lock_sliders;
|
cfdata->lock_sliders = conf->lock_sliders;
|
||||||
cfdata->show_locked = conf->show_locked;
|
cfdata->show_locked = conf->show_locked;
|
||||||
|
cfdata->keybindings_popup = conf->keybindings_popup;
|
||||||
cfdata->card = eina_stringshare_add(conf->card);
|
cfdata->card = eina_stringshare_add(conf->card);
|
||||||
_mixer_fill_cards_info(cfdata);
|
_mixer_fill_cards_info(cfdata);
|
||||||
_mixer_fill_channels_info(cfdata);
|
_mixer_fill_channels_info(cfdata);
|
||||||
|
@ -153,6 +156,7 @@ _basic_apply(E_Config_Dialog *dialog, E_Config_Dialog_Data *cfdata)
|
||||||
|
|
||||||
conf->lock_sliders = cfdata->lock_sliders;
|
conf->lock_sliders = cfdata->lock_sliders;
|
||||||
conf->show_locked = cfdata->show_locked;
|
conf->show_locked = cfdata->show_locked;
|
||||||
|
conf->keybindings_popup = cfdata->keybindings_popup;
|
||||||
|
|
||||||
card = eina_list_nth(cfdata->cards, cfdata->card_num);
|
card = eina_list_nth(cfdata->cards, cfdata->card_num);
|
||||||
if (card)
|
if (card)
|
||||||
|
@ -196,6 +200,10 @@ _basic_create_general(Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
evas, _("Show both sliders when locked"), &cfdata->show_locked);
|
evas, _("Show both sliders when locked"), &cfdata->show_locked);
|
||||||
e_widget_disabled_set(ui->show_locked, !cfdata->lock_sliders);
|
e_widget_disabled_set(ui->show_locked, !cfdata->lock_sliders);
|
||||||
e_widget_framelist_object_append(ui->frame, ui->show_locked);
|
e_widget_framelist_object_append(ui->frame, ui->show_locked);
|
||||||
|
|
||||||
|
ui->keybindings_popup = e_widget_check_add(
|
||||||
|
evas, _("Show Popup on volume change via keybindings"), &cfdata->keybindings_popup);
|
||||||
|
e_widget_framelist_object_append(ui->frame, ui->keybindings_popup);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -58,6 +58,7 @@ _mixer_gadget_configuration_defaults(E_Mixer_Gadget_Config *conf)
|
||||||
conf->channel_name = channel;
|
conf->channel_name = channel;
|
||||||
conf->lock_sliders = 1;
|
conf->lock_sliders = 1;
|
||||||
conf->show_locked = 0;
|
conf->show_locked = 0;
|
||||||
|
conf->keybindings_popup = 0;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1019,6 +1020,7 @@ _mixer_cb_volume_increase(E_Object *obj __UNUSED__, const char *params __UNUSED_
|
||||||
if (!ctxt->default_instance)
|
if (!ctxt->default_instance)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (ctxt->default_instance->conf->keybindings_popup)
|
||||||
_mixer_popup_timer_new(ctxt->default_instance);
|
_mixer_popup_timer_new(ctxt->default_instance);
|
||||||
_mixer_volume_increase(ctxt->default_instance);
|
_mixer_volume_increase(ctxt->default_instance);
|
||||||
}
|
}
|
||||||
|
@ -1038,6 +1040,7 @@ _mixer_cb_volume_decrease(E_Object *obj __UNUSED__, const char *params __UNUSED_
|
||||||
if (!ctxt->default_instance)
|
if (!ctxt->default_instance)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (ctxt->default_instance->conf->keybindings_popup)
|
||||||
_mixer_popup_timer_new(ctxt->default_instance);
|
_mixer_popup_timer_new(ctxt->default_instance);
|
||||||
_mixer_volume_decrease(ctxt->default_instance);
|
_mixer_volume_decrease(ctxt->default_instance);
|
||||||
}
|
}
|
||||||
|
@ -1057,6 +1060,7 @@ _mixer_cb_volume_mute(E_Object *obj __UNUSED__, const char *params __UNUSED__)
|
||||||
if (!ctxt->default_instance)
|
if (!ctxt->default_instance)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (ctxt->default_instance->conf->keybindings_popup)
|
||||||
_mixer_popup_timer_new(ctxt->default_instance);
|
_mixer_popup_timer_new(ctxt->default_instance);
|
||||||
_mixer_toggle_mute(ctxt->default_instance);
|
_mixer_toggle_mute(ctxt->default_instance);
|
||||||
}
|
}
|
||||||
|
@ -1140,6 +1144,7 @@ _mixer_gadget_configuration_descriptor_new(void)
|
||||||
return NULL;
|
return NULL;
|
||||||
E_CONFIG_VAL(conf_edd, E_Mixer_Gadget_Config, lock_sliders, INT);
|
E_CONFIG_VAL(conf_edd, E_Mixer_Gadget_Config, lock_sliders, INT);
|
||||||
E_CONFIG_VAL(conf_edd, E_Mixer_Gadget_Config, show_locked, INT);
|
E_CONFIG_VAL(conf_edd, E_Mixer_Gadget_Config, show_locked, INT);
|
||||||
|
E_CONFIG_VAL(conf_edd, E_Mixer_Gadget_Config, keybindings_popup, INT);
|
||||||
E_CONFIG_VAL(conf_edd, E_Mixer_Gadget_Config, card, STR);
|
E_CONFIG_VAL(conf_edd, E_Mixer_Gadget_Config, card, STR);
|
||||||
E_CONFIG_VAL(conf_edd, E_Mixer_Gadget_Config, channel_name, STR);
|
E_CONFIG_VAL(conf_edd, E_Mixer_Gadget_Config, channel_name, STR);
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ typedef struct E_Mixer_Gadget_Config
|
||||||
{
|
{
|
||||||
int lock_sliders;
|
int lock_sliders;
|
||||||
int show_locked;
|
int show_locked;
|
||||||
|
int keybindings_popup;
|
||||||
const char *card;
|
const char *card;
|
||||||
const char *channel_name;
|
const char *channel_name;
|
||||||
const char *id;
|
const char *id;
|
||||||
|
|
Loading…
Reference in New Issue