forked from enlightenment/enlightenment
mixer: add option disable_pulseaudio
- checkbox in module config - default to false - if set, do not start pulseaudio even if available
This commit is contained in:
parent
be68dc962e
commit
ac094ed72a
|
@ -74,6 +74,7 @@ _basic_apply(E_Config_Dialog *dialog, E_Config_Dialog_Data *cfdata)
|
||||||
conf->default_gc_id = eina_stringshare_add(id);
|
conf->default_gc_id = eina_stringshare_add(id);
|
||||||
|
|
||||||
conf->desktop_notification = ctxt->desktop_notification;
|
conf->desktop_notification = ctxt->desktop_notification;
|
||||||
|
conf->disable_pulse = ctxt->disable_pulse;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -120,6 +121,10 @@ _basic_create_general(E_Config_Dialog *dialog, Evas *evas, E_Config_Dialog_Data
|
||||||
e_widget_disabled_set(chk, EINA_TRUE);
|
e_widget_disabled_set(chk, EINA_TRUE);
|
||||||
#endif
|
#endif
|
||||||
e_widget_list_object_append(cfdata->ui.list, chk, 1, 1, 0.5);
|
e_widget_list_object_append(cfdata->ui.list, chk, 1, 1, 0.5);
|
||||||
|
|
||||||
|
chk = e_widget_check_add(evas, _("Disable PulseAudio"), &ctxt->disable_pulse);
|
||||||
|
e_widget_check_checked_set(chk, ctxt->conf->disable_pulse);
|
||||||
|
e_widget_list_object_append(cfdata->ui.list, chk, 1, 1, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -187,6 +187,7 @@ _mixer_module_configuration_new(void)
|
||||||
|
|
||||||
conf = E_NEW(E_Mixer_Module_Config, 1);
|
conf = E_NEW(E_Mixer_Module_Config, 1);
|
||||||
conf->desktop_notification = 1;
|
conf->desktop_notification = 1;
|
||||||
|
conf->disable_pulse = 0;
|
||||||
|
|
||||||
return conf;
|
return conf;
|
||||||
}
|
}
|
||||||
|
@ -1192,6 +1193,7 @@ _mixer_module_configuration_descriptor_new(E_Config_DD *gadget_conf_edd)
|
||||||
E_CONFIG_VAL(conf_edd, E_Mixer_Module_Config, default_gc_id, STR);
|
E_CONFIG_VAL(conf_edd, E_Mixer_Module_Config, default_gc_id, STR);
|
||||||
E_CONFIG_HASH(conf_edd, E_Mixer_Module_Config, gadgets, gadget_conf_edd);
|
E_CONFIG_HASH(conf_edd, E_Mixer_Module_Config, gadgets, gadget_conf_edd);
|
||||||
E_CONFIG_VAL(conf_edd, E_Mixer_Module_Config, desktop_notification, INT);
|
E_CONFIG_VAL(conf_edd, E_Mixer_Module_Config, desktop_notification, INT);
|
||||||
|
E_CONFIG_VAL(conf_edd, E_Mixer_Module_Config, disable_pulse, INT);
|
||||||
|
|
||||||
return conf_edd;
|
return conf_edd;
|
||||||
}
|
}
|
||||||
|
@ -1266,6 +1268,7 @@ _mixer_module_configuration_setup(E_Mixer_Module_Context *ctxt)
|
||||||
|
|
||||||
ctxt->conf->version = MOD_CONFIG_FILE_VERSION;
|
ctxt->conf->version = MOD_CONFIG_FILE_VERSION;
|
||||||
ctxt->desktop_notification = ctxt->conf->desktop_notification;
|
ctxt->desktop_notification = ctxt->conf->desktop_notification;
|
||||||
|
ctxt->disable_pulse = ctxt->conf->disable_pulse;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char _act_increase[] = "volume_increase";
|
static const char _act_increase[] = "volume_increase";
|
||||||
|
@ -1356,8 +1359,13 @@ e_modapi_init(E_Module *m)
|
||||||
|
|
||||||
_mixer_configure_registry_register();
|
_mixer_configure_registry_register();
|
||||||
e_gadcon_provider_register(&_gc_class);
|
e_gadcon_provider_register(&_gc_class);
|
||||||
if (!e_mixer_pulse_init()) e_mixer_default_setup();
|
if (!ctxt->disable_pulse)
|
||||||
else _mixer_pulse_setup();
|
{
|
||||||
|
if (!e_mixer_pulse_init()) e_mixer_default_setup();
|
||||||
|
else _mixer_pulse_setup();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
e_mixer_default_setup();
|
||||||
|
|
||||||
mixer_mod = m;
|
mixer_mod = m;
|
||||||
return ctxt;
|
return ctxt;
|
||||||
|
|
|
@ -30,6 +30,7 @@ typedef struct E_Mixer_Module_Config
|
||||||
const char *default_gc_id;
|
const char *default_gc_id;
|
||||||
Eina_Hash *gadgets;
|
Eina_Hash *gadgets;
|
||||||
int desktop_notification;
|
int desktop_notification;
|
||||||
|
int disable_pulse;
|
||||||
} E_Mixer_Module_Config;
|
} E_Mixer_Module_Config;
|
||||||
|
|
||||||
typedef struct E_Mixer_Instance
|
typedef struct E_Mixer_Instance
|
||||||
|
@ -75,6 +76,7 @@ typedef struct E_Mixer_Module_Context
|
||||||
E_Action *mute;
|
E_Action *mute;
|
||||||
} actions;
|
} actions;
|
||||||
int desktop_notification;
|
int desktop_notification;
|
||||||
|
int disable_pulse;
|
||||||
} E_Mixer_Module_Context;
|
} E_Mixer_Module_Context;
|
||||||
|
|
||||||
EAPI extern E_Module_Api e_modapi;
|
EAPI extern E_Module_Api e_modapi;
|
||||||
|
|
Loading…
Reference in New Issue