Revert "mixer: Optionally select an external mixer application."

This reverts commit 97b1caef37.

we don't use tabs, don't even start with this.
This commit is contained in:
Mike Blumenkrantz 2014-09-15 19:28:08 -04:00
parent 97b1caef37
commit e7c0ae402f
3 changed files with 4 additions and 51 deletions

View File

@ -75,14 +75,6 @@ _basic_apply(E_Config_Dialog *dialog, E_Config_Dialog_Data *cfdata)
conf->desktop_notification = ctxt->desktop_notification;
conf->disable_pulse = ctxt->disable_pulse;
if ((ctxt->external_mixer_enabled) && (!strlen(ctxt->external_mixer_command)))
return 0;
conf->external_mixer_enabled = ctxt->external_mixer_enabled;
if (conf->external_mixer_command)
eina_stringshare_del(conf->external_mixer_command);
if (ctxt->external_mixer_enabled)
conf->external_mixer_command = eina_stringshare_add(ctxt->external_mixer_command);
}
return 1;
@ -93,7 +85,7 @@ _basic_create_general(E_Config_Dialog *dialog, Evas *evas, E_Config_Dialog_Data
{
struct mixer_config_ui_general *ui = &cfdata->ui.general;
E_Mixer_Module_Context *ctxt = dialog->data;
Evas_Object *label, *chk, *edit;
Evas_Object *label, *chk;
Eina_List *l;
int i;
@ -124,22 +116,15 @@ _basic_create_general(E_Config_Dialog *dialog, Evas *evas, E_Config_Dialog_Data
e_widget_list_object_append(cfdata->ui.list, ui->frame, 1, 1, 0.5);
chk = e_widget_check_add(evas, _("Display desktop notifications on volume change"), &ctxt->desktop_notification);
e_widget_check_checked_set(chk, ctxt->desktop_notification);
e_widget_check_checked_set(chk, ctxt->conf->desktop_notification);
#ifndef HAVE_ENOTIFY
e_widget_disabled_set(chk, EINA_TRUE);
#endif
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->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);
chk = e_widget_check_add(evas, _("Enable external Mixer Command"), &ctxt->external_mixer_enabled);
e_widget_check_checked_set(chk, ctxt->external_mixer_enabled);
e_widget_list_object_append(cfdata->ui.list, chk, 1, 1, 0.5);
edit = e_widget_entry_add(evas, &ctxt->external_mixer_command, NULL, NULL, NULL);
e_widget_list_object_append(cfdata->ui.list, edit, 1, 1, 0.5);
}
static void
@ -161,14 +146,6 @@ cb_mixer_call(void *data, void *data2 __UNUSED__)
return;
}
if (ctxt->conf->external_mixer_enabled)
{
E_Zone *zone;
zone = e_util_zone_current_get(e_manager_current_get());
e_exec (zone, NULL, ctxt->conf->external_mixer_command, NULL, NULL);
return;
}
ctxt->mixer_dialog = e_mixer_app_dialog_new(NULL, cb_mixer_app_del, ctxt);
for (l = ctxt->instances; l; l = l->next)

View File

@ -188,8 +188,6 @@ _mixer_module_configuration_new(void)
conf = E_NEW(E_Mixer_Module_Config, 1);
conf->desktop_notification = 1;
conf->disable_pulse = 0;
conf->external_mixer_enabled = 0;
conf->external_mixer_command = eina_stringshare_add("");
return conf;
}
@ -207,9 +205,6 @@ _mixer_module_configuration_free(E_Mixer_Module_Config *conf)
eina_hash_free(conf->gadgets);
}
eina_stringshare_del(conf->default_gc_id);
if (conf->external_mixer_command)
eina_stringshare_del(conf->external_mixer_command);
free(conf);
}
@ -511,14 +506,6 @@ _mixer_popup_cb_mixer(void *data, void *data2 __UNUSED__)
return;
}
if (ctxt->conf->external_mixer_enabled)
{
E_Zone *zone;
zone = e_util_zone_current_get(e_manager_current_get());
e_exec (zone, NULL, ctxt->conf->external_mixer_command, NULL, NULL);
return;
}
ctxt->mixer_dialog = e_mixer_app_dialog_new(NULL, _mixer_app_cb_del, ctxt);
_mixer_app_select_current(ctxt->mixer_dialog, inst);
@ -1225,8 +1212,6 @@ _mixer_module_configuration_descriptor_new(E_Config_DD *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, disable_pulse, INT);
E_CONFIG_VAL(conf_edd, E_Mixer_Module_Config, external_mixer_enabled, INT);
E_CONFIG_VAL(conf_edd, E_Mixer_Module_Config, external_mixer_command, STR);
return conf_edd;
}
@ -1302,11 +1287,6 @@ _mixer_module_configuration_setup(E_Mixer_Module_Context *ctxt)
ctxt->conf->version = MOD_CONFIG_FILE_VERSION;
ctxt->desktop_notification = ctxt->conf->desktop_notification;
ctxt->disable_pulse = ctxt->conf->disable_pulse;
ctxt->external_mixer_enabled = ctxt->conf->external_mixer_enabled;
if (ctxt->conf->external_mixer_command)
ctxt->external_mixer_command = strdup(ctxt->conf->external_mixer_command);
else
ctxt->external_mixer_command = strdup("");
}
static const char _act_increase[] = "volume_increase";

View File

@ -7,7 +7,7 @@
/* Increment for Major Changes */
#define MOD_CONFIG_FILE_EPOCH 1
/* Increment for Minor Changes (ie: user doesn't need a new config) */
#define MOD_CONFIG_FILE_GENERATION 1
#define MOD_CONFIG_FILE_GENERATION 0
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH * 1000000) + MOD_CONFIG_FILE_GENERATION)
typedef struct E_Mixer_Gadget_Config
@ -31,8 +31,6 @@ typedef struct E_Mixer_Module_Config
Eina_Hash *gadgets;
int desktop_notification;
int disable_pulse;
int external_mixer_enabled;
const char *external_mixer_command;
} E_Mixer_Module_Config;
typedef struct E_Mixer_Instance
@ -80,8 +78,6 @@ typedef struct E_Mixer_Module_Context
} actions;
int desktop_notification;
int disable_pulse;
int external_mixer_enabled;
char *external_mixer_command;
} E_Mixer_Module_Context;
EAPI extern E_Module_Api e_modapi;